diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/AUTHORS deepin-terminal-5.4.13/3rdparty/terminalwidget/AUTHORS --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/AUTHORS 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,15 @@ +Originally forked from Konsole by + +Revived by Petr Vanek + +Contributors: + +Adam Treat +Chris Mueller +Christian Surlykke +Daniel O'Neill +Francisco Ballina +Georg Rudoy <0xd34df00d@gmail.com> +Jerome Leclanche +Petr Vanek +@kulti diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/CHANGELOG deepin-terminal-5.4.13/3rdparty/terminalwidget/CHANGELOG --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/CHANGELOG 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/CHANGELOG 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,320 @@ +qtermwidget-0.14.1 / 2019-02-25 +=============================== + + * Bumped version to 0.14.1 + * Only translations was changed. + +qtermwidget-0.14.0 / 2019-01-25 +=============================== + + * Bumped version to 0.14.0 + The big bump was needed to prevent conflicts with translations + that were former built out of lxqt-l10n and have version 0.13.0 + * Clarify the licenses used in qtermwidget and added the missed root licenses + * Implementation fixes: + - kpty: use openpty() on mac + - kpty: make it work on OpenBSD + - kptyprocess: ensure .bash_history is correctly written out + - kb-layouts: Make Backspace behaves the same as xterm + - tools: Drop the ability to bundle kb-layouts and colorschemes + - SearchBar: Fix visual glitches in search-bar + - TerminalDisplay: Fixed link mouseover after recent changes + - TerminalDisplay: Redraw cursor after cursor type changed + - Vt102Emulation: Fix handling of ST (String Terminator) for OSC (Operating System Commands) + - qterminal: Correct deleting of HotSpot list items + - qterminal: Removed unnecessary checks + - ColorScheme: Fixed local variable will be copied despite being returned by name + - ColorScheme: Fixed error return-std-move + - Removed unnecessary checks + - Suppressed compilation warnings + - Don't use automatic string conversions + - Marked some functions const + - Implemented terminal margins + * Improved cmake scripting + - Set cmake_minimum_required to 3.1.0 + - Removed locale compile definitons + - Removed QUIET from find_package + * Moved translations from lxqt-l10n back to qtermwidget + - Removed obsolete translation fuctionality + - Added translation promo in README.md + * Translation updates + +qtermwidget-0.9.0 / 2018-05-21 +============================== + + * Bumped minor version to 9 + * Take transient scrollbars into account + * CMake: Prevent in-source builds + * Refactor and fixes Python binding + * kptyprocess: Try to terminate the shell process + * New color scheme: Ubuntu inspired + * Fixed some github pathes in uris + * Add a comment for potential future breakage + * Use wstring in TerminalCharacterDecoder for UCS-4 compatibility + * Support UTF-32 characters correctly + * Fix "bold and intensive" colors + * New color scheme: Tango (#167) + * Finish SGR mouse protocol (1006) + * Fix build of example with latest lxqt-build-tools + * Expose bracket text function + * Drop Qt foreach. + * Revert deletions in .sip file + * fix python bindings + * Expose terminal size hint API + * Remove class name + * Return something + * Expose bidi option + * Add an example for remote terminal + * Makes the use of libutempter optional + * Fix behavior of scroll up (SU) + * Install cmake files in LIBDIR as they are architecture dependend + * Check if utempter.h header exists (mainly for FreeBSD) + * Need lxqt-build-tools 0.4.0 + +qtermwidget-0.8.0 / 2017-10-21 +================== + + * Release 0.8.0: Update changelog + * FIX: #46 fix vertical font truncation + * bump versions + * Really fallback to /bin/sh when $SHELL is missing or invalid + * README: don't recommend building from source + * Improve README + * Don't export github templates + * Support REP escape sequence defined in ECMA-48, section 8.3.103 + * Fix build issue related to utmpx in Mac OSX Sierra + * Remove the deprecation notice + * Handle DECSCUSR signals + * Copied issue template + * Update building instructions + * Require Qt 5.6+ + * This commit allows the consumer of qtermwidget to capture the (#111) + * Allow the terminal display to be smaller than the size hint (#123) + * Backport Vt102 emulation fixes (#113) + * Backport the default.keytab from Konsole + * Fixes (#122) + * Updated README, Added support for PyQT 5.7 + * Fix memory leak in hotspot (URLs & emails) detection + * Adds superbuild support + * Use target_compile_definitions() instead of add_definitions() + * Update find_package() documentation + * Use the lxqt_create_pkgconfig_file + * Improve lxqt_translate_ts() use + * Adds COMPONENT to the install files + * Renames test app to example. Make it work + * Drop include_directories() for in tree dirs + * Use the CMake Targets way + * Pack Utf8Proc stuff + * Adds export header + * Use LXQtCompilerSettings + * Packs compile definitions + * Adds package version file + * Removes Qt4 stuff + * Add translation mechanism + * Use const iterators when possible. + * Enable strict iterators for debug builds + * TerminalDisplay: Make resizing "Size" translatable + * Exposes receivedData signal to users of QTermWidget + * Exposes sessions autoClose property to QTermWidget + +qtermwidget-0.7.1 / 2016-12-21 +================== + + * Release 0.7.1: Update changelog + * Bump patch version (#105) + * Added a modified Breeze color scheme (#104) + * Accept hex color strings as well (#101) + * Remove the stale lib/README (#102) + * Implement background images (#95) + * Implement other BOX DRAWING characters (#98) + * Preparations for context menu actions on URLs (#97) + * Drop the ancient wcwidth impl. and use utf8proc if possible (#99) + * Remove widget size checks in setVTFont() (#86) + * Delete unused tooltip code (#81) + * Fix size of the array passed to memset() (#79) + * Remove cpack (#93) + +qtermwidget-0.7.0 / 2016-09-24 +================== + + * Release 0.7.0: Add changelog + * Bump version to 0.7.0 (#92) + * Add Solarized Color Schemes + * Update README.md + * qtermwidget: Unify title & icon propagation + * lib: Fix FTBFS (struct vs. class mismatch) + * Add 'const' decorators + * Expose titleChanged() signal + * Fix building instructions + * cmake support changes + * Make addCustomColorSchemeDir() static and check for duplicates + * Address review comments + * Allow app to add custom color sheme locations + * Avoid enums duplication + * Add support for setting keyboard cursor shape + * Remove assignment to self + * Backport konsole changes to fix memory leaks + * Remove __FILE__ macros + * Replace assert() with Q_ASSERT() + * Fix ASan error about delete size mismatch + * Add support for GNU/Hurd to kpty.cpp. + * fixes kfreebsd builds on debian and derivatives + * Fix indenations (misleading-indentation warning) + * Remove Q_DECL_OVERRIDE macros + * typo Higlight + * Remove noisy qDebugs + * Bracketed paste mode implementation + * Use function setWorldTranfer for Qpainter instead of setWorldMatrix + * Modify treatment drawing double width character + * pyqt5 bindings + * pyqt5 bindings + * Avoid checking uninitialized member + simplify condition + * Use markdown for README and improve it a bit + * Remove support for Qt <= 5.4 + * Remove Designer plugin + * Fix LICENSE text and name + * Remove Changelog + * Remove empty TODO file + * Remove PyQt4 bindings + * Sort out terminal resizing + * Rebase Vt102Emulation to Konsole + * Enable terminal resizing from the emulator + * Clean up trailing whitespaces + * implemented start TTY for external recipient; + * Fix: typo in TerminalDisplay + * add method for get pty slave fd; + * add method for get pty slave fd; + * Use GNUInstallDirs in CMakeLists.txt to stop hardcoding paths + * Set the '_notifiedActivity' flag early + * Also expose signals and slots to pyqt + * Get/set selection end in python bindings + * Avoid calling winId() on Qt5. + * Fix TerminalDisplay::getCharacterPosition for proportional fonts + * Handle proportional fonts a bit better + * Expose more functionality through the python bindings (#23) + * Allow stopping test.py with ctrl-C + * Fix 'getSelectionEnd' + * Make whitespace consistent (tabs->spaces) + * Fix python binding compile errors #23 + * Add event to notify the application that the shell application uses mouse. + * Change mouseMarks only when needed. This might be useful if an application wants to be notified of the event. + * Prevents deleting the last line when resizing. + +qtermwidget-0.6.0 / 2014-10-21 +================== + + * Release 0.6.0 + * Update AUTHORS + * Update INSTALL instructions + * CMakeLists.txt cleanup + * osx: link fixes + * fixed #57 Linux emulation does not seem to support Ctrl+Arrows (warning: I have no clue what I did...) + * Fix Qt4 compilation + * qterminal #64 No drag & drop support + * fixed qterminal #71 qt5 version ignoring page up / down + * Fixed a typo in CMakeLists.txt. + +qtermwidget-0.5.1 / 2014-07-14 +================== + + * fixed 'make dist'; version bump + * Url activation & filters #21 + * Proxy activity/silence methods to Session in QTermWidget. + * Emit activity() and silence() signals instead of KNotification. + * Support bells. + * Support bells. + * Added QTermWidget::urlActivated(QUrl) signal. + * Emit UrlFilter::activated() instead of QDesktopServices::openUrl(). + * Derive Filter from QObject. + * Add UrlFilter. + * Activate link filters on ctrl+click. + * Update filters on resize and screen events. + * Const-correctness for QTermWidget API. + * Load arbitrary schemes by path via setColorScheme(). + * ColorSchemeManager::loadCustomColorScheme(const QString& path). + * Unified schemeName() usage. + * fixed #17 lib/ShellCommand.cpp:66: possible =/== mixup + * Delete CMakeLists.txt.user + * new API selectedText() + * new API methods (thanks to William Brumley) + * fixed #11 compile against Qt 5 (Qt4 and Qt5 supported and waguely tested) + * build simplified: qtermwidget is versioned (libqtermwidget4 for Qt4, 5 for Qt5...). Better cmake support. + * fixed broken API for sendText() - const missing + * mail address change + * Current Working Directory for linux. Part of #8. More implementations welcomed... + * Add a method for get working directory in class QTermWidget + * Fix missing cleanup for temporary history files + * a potential improvement for #9 font fractional pixels causes spacing errors + * fix #2 update various documentations for debian packaging + * fix #10 Update FSF address + +qtermwidget-0.4.0 / 2013-04-16 +================== + + * readme updated + * Added pasteSelection-slot and corrected two nonsense comments + * qt/embedded doesn't ship with a Monospace font (and it won't use system fonts even if they exist). Using 'fixed' instead works fine + * Without this, the terminal display area will permanently lose focus when consoleq's Find dialog is called up. + * This is only needed when using Qt/E built for DirectFB display. DirectFB blocks SIGINT and some other signals, so any terminal app (be it Qt or otherwise) must call sigprocmask() to unblock them. Without this, ^C doesn't work. + * The control and tab keys don't work in Qt/E. This fixes it, but maybe not in the most elegant way. The trouble seems to be that _codec->fromUnicode(event->text()) doesn't handle control characters in qt-embedded. + * Fix resize label + * Search code cleanup + * Change searchbar background color to red(ish) when no match found + * Fix search, find-next when selection is one character long + * Hotkeys for search: Return->find-next, Shift-Return->find-previous, Escape->hide searchbar + * Added search functionality + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Fix logical error + * Add zoom. Add choice action after paste clipboard + * Add zoom. Add choice action after paste clipboard + * Add Shift+KeyEnd and Shift+KeyHome to go line 0 and line end. No move screenwindow when copy and paste with keyboard + * fix for text drawing in qt>=4.8,x + * constructor for Qt Designer + * test commit + * clear() slot implemented + * fix the scroll at the end again + * The escape key is always needed for terminal programs like vim. + * Add resource files and the appropriate paths to enable bundling of color schemes and keyboard layouts into the actual executable. + * Add a define which will be used to bundle the color schemes and keyboard layouts as resource files with the executable itself instead of putting them on disk. + * scrollToEnd() method provided to trigger 'snapping' the terminal to cursor tracked position (typically the extreme value of the scrollbar, or the 'end') Some signal-fu particular to keyPressEvent(QKeyEvent *) done to make the above usable, no existing dependent implementations should be disturbed by this. + * revert workaround for key on end + * scroll to bottom on input + * scrollToEnd() method provided to trigger 'snapping' the terminal to cursor tracked position (typically the extreme value of the scrollbar, or the 'end') Some signal-fu particular to keyPressEvent(QKeyEvent *) done to make the above usable, no existing dependent implementations should be disturbed by this. + * improved sample app for testing + * macosx compile fix + * arguments work correctly for custom shells too + * lib has to be built first in any case + * merge changes from the experimental "bundle" repository + * fix for kb-layout location on mac (mainly) + * rpm builds + * mac universal build helper + * build cleanup; make dist; various readmes updated + * make availableKeyBindings static + * transparency support + * font display fix on mac (widths in int) + * qt designer plugin + * correct lib ID for mac + * remove the KDE legacy code + * code reformatted after resync + * display stuff synced from konsole again to improve color scheme handling + * focus in/out signals + * correct shell detection (BSD, Christopher VdoP) + * library location on BSD + * patches to build on BSD by Christopher VdoP + * K&R formatting + * K&R formatting + * merge with qscite + * fixed KB finding + sort + * key layouts can be read and provided to widget + * install keyboard bindings; handle KB in src code; allow to get and set KB + * fix for includes and 64bit builds + * port to macosx + * initial import diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/CMakeLists.txt deepin-terminal-5.4.13/3rdparty/terminalwidget/CMakeLists.txt --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/CMakeLists.txt 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,339 @@ +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level +# CMakeLists.txt file even before calling the project() command. +# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION) +# command to specify that the current project code is written for the given range of CMake +# versions. +project(terminalwidget) + +include(GNUInstallDirs) +include(GenerateExportHeader) +include(CMakePackageConfigHelpers) +include(CheckFunctionExists) +include(CheckIncludeFile) + +option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) +option(BUILD_EXAMPLE "Build example application. Default OFF." OFF) +option(TERMINALWIDGET_USE_UTEMPTER "Uses the libutempter library. Mainly for FreeBSD" OFF) +option(TERMINALWIDGET_BUILD_PYTHON_BINDING "Build python binding" OFF) +option(USE_UTF8PROC "Use libutf8proc for better Unicode support. Default OFF" OFF) + + +# just change version for releases +set(TERMINALWIDGET_VERSION_MAJOR "0") +set(TERMINALWIDGET_VERSION_MINOR "14") +set(TERMINALWIDGET_VERSION_PATCH "1") + +set(TERMINALWIDGET_VERSION "${TERMINALWIDGET_VERSION_MAJOR}.${TERMINALWIDGET_VERSION_MINOR}.${TERMINALWIDGET_VERSION_PATCH}") + +# additional cmake files +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_INSTALL_PREFIX "/usr") + +# Minimum Versions +set(QT_MINIMUM_VERSION "5.7.1") +set(LXQTBT_MINIMUM_VERSION "0.6.0") + +find_package(Qt5Widgets "${QT_MINIMUM_VERSION}" REQUIRED) +find_package(Qt5LinguistTools "${QT_MINIMUM_VERSION}" REQUIRED) +find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) + +if(USE_UTF8PROC) + find_package(Utf8Proc REQUIRED) +endif() + +#注释掉下面这行,否则无法支持命令行cmake构建 +#include(LXQtPreventInSourceBuilds) +include(LXQtTranslateTs) +include(LXQtCompilerSettings NO_POLICY_SCOPE) +include(LXQtCreatePkgConfigFile) + +if(APPLE) + if(CMAKE_VERSION VERSION_GREATER 3.9) + cmake_policy(SET CMP0068 NEW) + set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) + endif() +endif() + +set(TERMINALWIDGET_LIBRARY_NAME terminalwidget5) + + +# main library + +set(SRCS + lib/BlockArray.cpp + lib/ColorScheme.cpp + lib/CharacterFormat.cpp + lib/Emulation.cpp + lib/Filter.cpp + lib/history/HistoryFile.cpp + lib/history/HistoryScroll.cpp + lib/history/HistoryScrollFile.cpp + lib/history/HistoryScrollNone.cpp + lib/history/HistoryType.cpp + lib/history/HistoryTypeFile.cpp + lib/history/HistoryTypeNone.cpp + lib/history/compact/CompactHistoryBlock.cpp + lib/history/compact/CompactHistoryBlockList.cpp + lib/history/compact/CompactHistoryLine.cpp + lib/history/compact/CompactHistoryScroll.cpp + lib/history/compact/CompactHistoryType.cpp + lib/HistorySearch.cpp + lib/KeyboardTranslator.cpp + lib/konsole_wcwidth.cpp + lib/kprocess.cpp + lib/kpty.cpp + lib/kptydevice.cpp + lib/kptyprocess.cpp + lib/ProcessInfo.cpp + lib/Pty.cpp + lib/qtermwidget.cpp + lib/Screen.cpp + lib/ScreenWindow.cpp + lib/SearchBar.cpp + lib/Session.cpp + lib/SessionManager.cpp + lib/ShellCommand.cpp + lib/TerminalCharacterDecoder.cpp + lib/TerminalDisplay.cpp + lib/tools.cpp + lib/Vt102Emulation.cpp +) + +# Only the Headers that need to be moc'd go here +set(HDRS + lib/Emulation.h + lib/Filter.h + lib/history/HistoryFile.h + lib/history/HistoryScroll.h + lib/history/HistoryScrollFile.h + lib/history/HistoryScrollNone.h + lib/history/HistoryType.h + lib/history/HistoryTypeFile.h + lib/history/HistoryTypeNone.h + lib/history/compact/CompactHistoryBlock.h + lib/history/compact/CompactHistoryBlockList.h + lib/history/compact/CompactHistoryLine.h + lib/history/compact/CompactHistoryScroll.h + lib/history/compact/CompactHistoryType.h + lib/HistorySearch.h + lib/kprocess.h + lib/kptydevice.h + lib/kptyprocess.h + lib/ProcessInfo.h + lib/Pty.h + lib/qtermwidget.h + lib/ScreenWindow.h + lib/SearchBar.h + lib/Session.h + lib/SessionManager.h + lib/TerminalDisplay.h + lib/Vt102Emulation.h +) + +set(UI + lib/SearchBar.ui +) + +# for distribution +set(HDRS_DISTRIB + lib/qtermwidget.h + lib/Emulation.h + lib/Filter.h + lib/Session.h + lib/SessionManager.h + lib/history/HistoryFile.h + lib/history/HistoryScroll.h + lib/history/HistoryScrollFile.h + lib/history/HistoryScrollNone.h + lib/history/HistoryType.h + lib/history/HistoryTypeFile.h + lib/history/HistoryTypeNone.h + lib/history/compact/CompactHistoryBlock.h + lib/history/compact/CompactHistoryBlockList.h + lib/history/compact/CompactHistoryLine.h + lib/history/compact/CompactHistoryScroll.h + lib/history/compact/CompactHistoryType.h + lib/BlockArray.h + lib/Character.h + lib/CharacterColor.h + lib/TerminalDisplay.h +) + +# dirs +set(KB_LAYOUT_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/kb-layouts") +message(STATUS "Keyboard layouts will be installed in: ${KB_LAYOUT_DIR}") + +set(COLORSCHEMES_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/color-schemes") +message(STATUS "Color schemes will be installed in: ${COLORSCHEMES_DIR}" ) + +set(TRANSLATIONS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/translations") +message(STATUS "Translations will be installed in: ${TRANSLATIONS_DIR}") + +set(TERMINALWIDGET_INCLUDE_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/${TERMINALWIDGET_LIBRARY_NAME}") + +CHECK_FUNCTION_EXISTS(updwtmpx HAVE_UPDWTMPX) + +qt5_wrap_cpp(MOCS ${HDRS}) +qt5_wrap_ui(UI_SRCS ${UI}) +set(PKG_CONFIG_REQ "Qt5Widgets") + +lxqt_translate_ts(TERMINALWIDGET_QM + TRANSLATION_DIR "lib/translations" + UPDATE_TRANSLATIONS + ${UPDATE_TRANSLATIONS} + SOURCES + ${SRCS} ${HDRS} ${UI} + INSTALL_DIR + ${TRANSLATIONS_DIR} + COMPONENT + Runtime +) + +add_library(${TERMINALWIDGET_LIBRARY_NAME} SHARED ${SRCS} ${MOCS} ${UI_SRCS} ${TERMINALWIDGET_QM}) +target_link_libraries(${TERMINALWIDGET_LIBRARY_NAME} Qt5::Widgets) +if (USE_TEST) + #仅在单元测试模式下设置fvisibility为default + target_compile_options(${TERMINALWIDGET_LIBRARY_NAME} PUBLIC "-fvisibility=default") +endif() +set_target_properties( ${TERMINALWIDGET_LIBRARY_NAME} PROPERTIES + SOVERSION ${TERMINALWIDGET_VERSION_MAJOR} + VERSION ${TERMINALWIDGET_VERSION} + ) + + +if(APPLE) + target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME} + PRIVATE + "HAVE_UTMPX" + "UTMPX_COMPAT" + ) +endif() + +if(HAVE_UPDWTMPX) + target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME} + PRIVATE + "HAVE_UPDWTMPX" + ) +endif() + +if (TERMINALWIDGET_USE_UTEMPTER) + CHECK_INCLUDE_FILE(utempter.h HAVE_UTEMPTER) + if (HAVE_UTEMPTER) + target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME} PRIVATE + "HAVE_UTEMPTER" + ) + target_link_libraries(${TERMINALWIDGET_LIBRARY_NAME} ulog) + endif() +endif() + +if (UTF8PROC_FOUND) + target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME} + PRIVATE + "HAVE_UTF8PROC" + ) + target_include_directories(${TERMINALWIDGET_LIBRARY_NAME} + INTERFACE + ${UTF8PROC_INCLUDE_DIRS} + ) + target_link_libraries(${TERMINALWIDGET_LIBRARY_NAME} + ${UTF8PROC_LIBRARIES} + ) + string(APPEND PKG_CONFIG_REQ ", libutf8proc") +endif() + +if(APPLE) + set (CMAKE_SKIP_RPATH 1) + # this is a must to load the lib correctly + set_target_properties(${TERMINALWIDGET_LIBRARY_NAME} PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}) +endif() + +target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME} + PRIVATE + "KB_LAYOUT_DIR=\"${KB_LAYOUT_DIR}\"" + "COLORSCHEMES_DIR=\"${COLORSCHEMES_DIR}\"" + "TRANSLATIONS_DIR=\"${TRANSLATIONS_DIR}\"" + "HAVE_POSIX_OPENPT" + "HAVE_SYS_TIME_H" +) + + +generate_export_header(${TERMINALWIDGET_LIBRARY_NAME} + EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/lib/qtermwidget_export.h" + EXPORT_MACRO_NAME TERMINALWIDGET_EXPORT +) + +target_include_directories(${TERMINALWIDGET_LIBRARY_NAME} + PUBLIC + "$" + "$" + INTERFACE + "$" + "$" +) + +write_basic_package_version_file( + "${CMAKE_BINARY_DIR}/${TERMINALWIDGET_LIBRARY_NAME}-config-version.cmake" + VERSION ${TERMINALWIDGET_VERSION} + COMPATIBILITY AnyNewerVersion +) + +install(FILES + "${CMAKE_BINARY_DIR}/${TERMINALWIDGET_LIBRARY_NAME}-config-version.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${TERMINALWIDGET_LIBRARY_NAME}" + COMPONENT Devel +) + +install(EXPORT + "${TERMINALWIDGET_LIBRARY_NAME}-targets" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${TERMINALWIDGET_LIBRARY_NAME}" + COMPONENT Devel +) + +install(FILES + ${HDRS_DISTRIB} "${CMAKE_CURRENT_BINARY_DIR}/lib/qtermwidget_export.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${TERMINALWIDGET_LIBRARY_NAME}" + COMPONENT Devel +) +# keyboard layouts +install(DIRECTORY + lib/kb-layouts/ + DESTINATION "${KB_LAYOUT_DIR}" + COMPONENT Runtime + FILES_MATCHING PATTERN "*.keytab" +) +# color schemes +install(DIRECTORY + lib/color-schemes/ + DESTINATION "${COLORSCHEMES_DIR}" + COMPONENT Runtime + FILES_MATCHING PATTERN "*.*schem*" +) + +lxqt_create_pkgconfig_file( + PACKAGE_NAME ${TERMINALWIDGET_LIBRARY_NAME} + DESCRIPTIVE_NAME ${TERMINALWIDGET_LIBRARY_NAME} + DESCRIPTION "TerminalWidget library for Qt ${TERMINALWIDGET_VERSION_MAJOR}.x" + INCLUDEDIRS ${TERMINALWIDGET_LIBRARY_NAME} + LIBS ${TERMINALWIDGET_LIBRARY_NAME} + REQUIRES ${PKG_CONFIG_REQ} + VERSION ${TERMINALWIDGET_VERSION} + INSTALL + COMPONENT Devel +) + +install(TARGETS ${TERMINALWIDGET_LIBRARY_NAME} + DESTINATION "${CMAKE_INSTALL_LIBDIR}" + EXPORT "${TERMINALWIDGET_LIBRARY_NAME}-targets" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PUBLIC_HEADER + COMPONENT Runtime +) + +export(TARGETS ${TERMINALWIDGET_LIBRARY_NAME} + FILE "${CMAKE_BINARY_DIR}/${TERMINALWIDGET_LIBRARY_NAME}-targets.cmake" + EXPORT_LINK_INTERFACE_LIBRARIES +) +# end of main library diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/COPYING-CMAKE-SCRIPTS deepin-terminal-5.4.13/3rdparty/terminalwidget/COPYING-CMAKE-SCRIPTS --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/COPYING-CMAKE-SCRIPTS 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/COPYING-CMAKE-SCRIPTS 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +LICENSE.BSD-3-clause \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/BlockArray.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/BlockArray.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/BlockArray.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/BlockArray.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,381 @@ +/* + This file is part of Konsole, an X terminal. + Copyright (C) 2000 by Stephan Kulow + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#include + +// Own +#include "BlockArray.h" + +// System +#include +#include +#include +#include + + +using namespace Konsole; + +static int blocksize = 0; + +BlockArray::BlockArray() + : size(0), + current(size_t(-1)), + index(size_t(-1)), + lastmap(nullptr), + lastmap_index(size_t(-1)), + lastblock(nullptr), ion(-1), + length(0) +{ + // lastmap_index = index = current = size_t(-1); + if (blocksize == 0) { + blocksize = ((sizeof(Block) / getpagesize()) + 1) * getpagesize(); + } + +} + +BlockArray::~BlockArray() +{ + setHistorySize(0); + Q_ASSERT(!lastblock); +} + +size_t BlockArray::append(Block * block) +{ + if (!size) { + return size_t(-1); + } + + ++current; + if (current >= size) { + current = 0; + } + + int rc; + rc = lseek(ion, current * blocksize, SEEK_SET); + if (rc < 0) { + perror("HistoryBuffer::add.seek"); + setHistorySize(0); + return size_t(-1); + } + rc = write(ion, block, blocksize); + if (rc < 0) { + perror("HistoryBuffer::add.write"); + setHistorySize(0); + return size_t(-1); + } + + length++; + if (length > size) { + length = size; + } + + ++index; + + delete block; + return current; +} + +size_t BlockArray::newBlock() +{ + if (!size) { + return size_t(-1); + } + append(lastblock); + + lastblock = new Block(); + return index + 1; +} + +Block * BlockArray::lastBlock() const +{ + return lastblock; +} + +bool BlockArray::has(size_t i) const +{ + if (i == index + 1) { + return true; + } + + if (i > index) { + return false; + } + if (index - i >= length) { + return false; + } + return true; +} + +const Block * BlockArray::at(size_t i) +{ + if (i == index + 1) { + return lastblock; + } + + if (i == lastmap_index) { + return lastmap; + } + + if (i > index) { + qDebug() << "BlockArray::at() i > index\n"; + return nullptr; + } + +// if (index - i >= length) { +// kDebug(1211) << "BlockArray::at() index - i >= length\n"; +// return 0; +// } + + size_t j = i; // (current - (index - i) + (index/size+1)*size) % size ; + + Q_ASSERT(j < size); + unmap(); + + Block * block = (Block *)mmap(nullptr, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); + + if (block == (Block *)-1) { + perror("mmap"); + return nullptr; + } + + lastmap = block; + lastmap_index = i; + + return block; +} + +void BlockArray::unmap() +{ + if (lastmap) { + int res = munmap((char *)lastmap, blocksize); + if (res < 0) { + perror("munmap"); + } + } + lastmap = nullptr; + lastmap_index = size_t(-1); +} + +bool BlockArray::setSize(size_t newsize) +{ + return setHistorySize(newsize * 1024 / blocksize); +} + +bool BlockArray::setHistorySize(size_t newsize) +{ +// kDebug(1211) << "setHistorySize " << size << " " << newsize; + + if (size == newsize) { + return false; + } + + unmap(); + + if (!newsize) { + delete lastblock; + lastblock = nullptr; + if (ion >= 0) { + close(ion); + } + ion = -1; + current = size_t(-1); + return true; + } + + if (!size) { + FILE * tmp = tmpfile(); + if (!tmp) { + perror("konsole: cannot open temp file.\n"); + } else { + ion = dup(fileno(tmp)); + if (ion<0) { + perror("konsole: cannot dup temp file.\n"); + fclose(tmp); + } + } + if (ion < 0) { + return false; + } + + Q_ASSERT(!lastblock); + + lastblock = new Block(); + size = newsize; + return false; + } + + if (newsize > size) { + increaseBuffer(); + size = newsize; + return false; + } else { + decreaseBuffer(newsize); + int status = ftruncate(ion, length*blocksize); + if (status < 0) { + perror("ftruncate"); + } + + size = newsize; + + return true; + } +} + +void moveBlock(FILE * fion, int cursor, int newpos, char * buffer2) +{ + int res = fseek(fion, cursor * blocksize, SEEK_SET); + if (res) { + perror("fseek"); + } + res = fread(buffer2, blocksize, 1, fion); + if (res != 1) { + perror("fread"); + } + + res = fseek(fion, newpos * blocksize, SEEK_SET); + if (res) { + perror("fseek"); + } + res = fwrite(buffer2, blocksize, 1, fion); + if (res != 1) { + perror("fwrite"); + } + // printf("moving block %d to %d\n", cursor, newpos); +} + +void BlockArray::decreaseBuffer(size_t newsize) +{ + if (index < newsize) { // still fits in whole + return; + } + + int offset = (current - (newsize - 1) + size) % size; + + if (!offset) { + return; + } + + // The Block constructor could do somthing in future... + char * buffer1 = new char[blocksize]; + + FILE * fion = fdopen(dup(ion), "w+b"); + if (!fion) { + delete [] buffer1; + perror("fdopen/dup"); + return; + } + + int firstblock; + if (current <= newsize) { + firstblock = current + 1; + } else { + firstblock = 0; + } + + //size_t oldpos; + for (size_t i = 0, cursor=firstblock; i < newsize; i++) { + size_t oldpos = (size + cursor + offset) % size; + moveBlock(fion, oldpos, cursor, buffer1); + if (oldpos < newsize) { + cursor = oldpos; + } else { + cursor++; + } + } + + current = newsize - 1; + length = newsize; + + delete [] buffer1; + + fclose(fion); + +} + +void BlockArray::increaseBuffer() +{ + if (index < size) { // not even wrapped once + return; + } + + int offset = (current + size + 1) % size; + if (!offset) { // no moving needed + return; + } + + // The Block constructor could do somthing in future... + char * buffer1 = new char[blocksize]; + char * buffer2 = new char[blocksize]; + + int runs = 1; + int bpr = size; // blocks per run + + if (size % offset == 0) { + bpr = size / offset; + runs = offset; + } + + FILE * fion = fdopen(dup(ion), "w+b"); + if (!fion) { + perror("fdopen/dup"); + delete [] buffer1; + delete [] buffer2; + return; + } + + //int res; + for (int i = 0; i < runs; i++) { + // free one block in chain + int firstblock = (offset + i) % size; + int res = fseek(fion, firstblock * blocksize, SEEK_SET); + if (res) { + perror("fseek"); + } + res = fread(buffer1, blocksize, 1, fion); + if (res != 1) { + perror("fread"); + } + //int newpos = 0; + for (int j = 1, cursor=firstblock; j < bpr; j++) { + cursor = (cursor + offset) % size; + int newpos = (cursor - offset + size) % size; + moveBlock(fion, cursor, newpos, buffer2); + } + res = fseek(fion, i * blocksize, SEEK_SET); + if (res) { + perror("fseek"); + } + res = fwrite(buffer1, blocksize, 1, fion); + if (res != 1) { + perror("fwrite"); + } + } + current = size - 1; + length = size; + + delete [] buffer1; + delete [] buffer2; + + fclose(fion); + +} + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/BlockArray.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/BlockArray.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/BlockArray.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/BlockArray.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,131 @@ +/* + This file is part of Konsole, an X terminal. + Copyright (C) 2000 by Stephan Kulow + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#ifndef BLOCKARRAY_H +#define BLOCKARRAY_H + +#include + +//#error Do not use in KDE 2.1 + +#define QTERMWIDGET_BLOCKSIZE (1 << 12) +#define ENTRIES ((QTERMWIDGET_BLOCKSIZE - sizeof(size_t) ) / sizeof(unsigned char)) + +namespace Konsole { + +struct Block { + Block() { + memset((void*)data, 0, sizeof(data)); + size = 0; + } + unsigned char data[ENTRIES]; + size_t size; +}; + +// /////////////////////////////////////////////////////// + +class BlockArray { +public: + /** + * Creates a history file for holding + * maximal size blocks. If more blocks + * are requested, then it drops earlier + * added ones. + */ + BlockArray(); + + /// destructor + ~BlockArray(); + + /** + * adds the Block at the end of history. + * This may drop other blocks. + * + * The ownership on the block is transfered. + * An unique index number is returned for accessing + * it later (if not yet dropped then) + * + * Note, that the block may be dropped completely + * if history is turned off. + */ + size_t append(Block * block); + + /** + * gets the block at the index. Function may return + * 0 if the block isn't available any more. + * + * The returned block is strictly readonly as only + * maped in memory - and will be invalid on the next + * operation on this class. + */ + const Block * at(size_t index); + + /** + * reorders blocks as needed. If newsize is null, + * the history is emptied completely. The indices + * returned on append won't change their semantic, + * but they may not be valid after this call. + */ + bool setHistorySize(size_t newsize); + + size_t newBlock(); + + Block * lastBlock() const; + + /** + * Convenient function to set the size in KBytes + * instead of blocks + */ + bool setSize(size_t newsize); + + size_t len() const { + return length; + } + + bool has(size_t index) const; + + size_t getCurrent() const { + return current; + } + +private: + void unmap(); + void increaseBuffer(); + void decreaseBuffer(size_t newsize); + + size_t size; + // current always shows to the last inserted block + size_t current; + size_t index; + + Block * lastmap; + size_t lastmap_index; + Block * lastblock; + + int ion; + size_t length; + +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterColor.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterColor.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterColor.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterColor.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,292 @@ +/* + This file is part of Konsole, KDE's terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef CHARACTERCOLOR_H +#define CHARACTERCOLOR_H + +// Qt +#include + +//#include +#define KDE_NO_EXPORT + +namespace Konsole +{ + +/** + * An entry in a terminal display's color palette. + * + * A color palette is an array of 16 ColorEntry instances which map + * system color indexes (from 0 to 15) into actual colors. + * + * Each entry can be set as bold, in which case any text + * drawn using the color should be drawn in bold. + * + * Each entry can also be transparent, in which case the terminal + * display should avoid drawing the background for any characters + * using the entry as a background. + */ +class ColorEntry +{ +public: + /** Specifies the weight to use when drawing text with this color. */ + enum FontWeight + { + /** Always draw text in this color with a bold weight. */ + Bold, + /** Always draw text in this color with a normal weight. */ + Normal, + /** + * Use the current font weight set by the terminal application. + * This is the default behavior. + */ + UseCurrentFormat + }; + + /** + * Constructs a new color palette entry. + * + * @param c The color value for this entry. + * @param tr Specifies that the color should be transparent when used as a background color. + * @param weight Specifies the font weight to use when drawing text with this color. + */ + ColorEntry(QColor c, bool tr, FontWeight weight = UseCurrentFormat) + : color(c), transparent(tr), fontWeight(weight) {} + + /** + * Constructs a new color palette entry with an undefined color, and + * with the transparent and bold flags set to false. + */ + ColorEntry() : transparent(false), fontWeight(UseCurrentFormat) {} + + /** The color value of this entry for display. */ + QColor color; + + /** + * If true character backgrounds using this color should be transparent. + * This is not applicable when the color is used to render text. + */ + bool transparent; + /** + * Specifies the font weight to use when drawing text with this color. + * This is not applicable when the color is used to draw a character's background. + */ + FontWeight fontWeight; +}; + + +// Attributed Character Representations /////////////////////////////// + +// Colors + +#define BASE_COLORS (2+8) +#define INTENSITIES 2 +#define TABLE_COLORS (INTENSITIES*BASE_COLORS) + +#define DEFAULT_FORE_COLOR 0 +#define DEFAULT_BACK_COLOR 1 + +//a standard set of colors using black text on a white background. +//defined in TerminalDisplay.cpp + +extern const ColorEntry base_color_table[TABLE_COLORS] KDE_NO_EXPORT; + +/* CharacterColor is a union of the various color spaces. + + Assignment is as follows: + + Type - Space - Values + + 0 - Undefined - u: 0, v:0 w:0 + 1 - Default - u: 0..1 v:intense w:0 + 2 - System - u: 0..7 v:intense w:0 + 3 - Index(256) - u: 16..255 v:0 w:0 + 4 - RGB - u: 0..255 v:0..256 w:0..256 + + Default colour space has two separate colours, namely + default foreground and default background colour. +*/ + +#define COLOR_SPACE_UNDEFINED 0 +#define COLOR_SPACE_DEFAULT 1 +#define COLOR_SPACE_SYSTEM 2 +#define COLOR_SPACE_256 3 +#define COLOR_SPACE_RGB 4 + +/** + * Describes the color of a single character in the terminal. + */ +class CharacterColor +{ + friend class Character; + +public: + /** Constructs a new CharacterColor whoose color and color space are undefined. */ + CharacterColor() + : _colorSpace(COLOR_SPACE_UNDEFINED), + _u(0), + _v(0), + _w(0) + {} + + /** + * Constructs a new CharacterColor using the specified @p colorSpace and with + * color value @p co + * + * The meaning of @p co depends on the @p colorSpace used. + * + * TODO : Document how @p co relates to @p colorSpace + * + * TODO : Add documentation about available color spaces. + */ + CharacterColor(quint8 colorSpace, int co) + : _colorSpace(colorSpace), + _u(0), + _v(0), + _w(0) + { + switch (colorSpace) + { + case COLOR_SPACE_DEFAULT: + _u = co & 1; + break; + case COLOR_SPACE_SYSTEM: + _u = co & 7; + _v = (co >> 3) & 1; + break; + case COLOR_SPACE_256: + _u = co & 255; + break; + case COLOR_SPACE_RGB: + _u = co >> 16; + _v = co >> 8; + _w = co; + break; + default: + _colorSpace = COLOR_SPACE_UNDEFINED; + } + } + + /** + * Returns true if this character color entry is valid. + */ + bool isValid() const + { + return _colorSpace != COLOR_SPACE_UNDEFINED; + } + + /** + * Set the value of this color from a normal system color to the corresponding intensive + * system color if it's not already an intensive system color. + * + * This is only applicable if the color is using the COLOR_SPACE_DEFAULT or COLOR_SPACE_SYSTEM + * color spaces. + */ + void setIntensive(); + + /** + * Returns the color within the specified color @p palette + * + * The @p palette is only used if this color is one of the 16 system colors, otherwise + * it is ignored. + */ + QColor color(const ColorEntry* palette) const; + + /** + * Compares two colors and returns true if they represent the same color value and + * use the same color space. + */ + friend bool operator == (const CharacterColor& a, const CharacterColor& b); + /** + * Compares two colors and returns true if they represent different color values + * or use different color spaces. + */ + friend bool operator != (const CharacterColor& a, const CharacterColor& b); + +private: + quint8 _colorSpace; + + // bytes storing the character color + quint8 _u; + quint8 _v; + quint8 _w; +}; + +inline bool operator == (const CharacterColor& a, const CharacterColor& b) +{ + return a._colorSpace == b._colorSpace && + a._u == b._u && + a._v == b._v && + a._w == b._w; +} +inline bool operator != (const CharacterColor& a, const CharacterColor& b) +{ + return !operator==(a,b); +} + +inline const QColor color256(quint8 u, const ColorEntry* base) +{ + // 0.. 16: system colors + if (u < 8) return base[u+2 ].color; + u -= 8; + if (u < 8) return base[u+2+BASE_COLORS].color; + u -= 8; + + // 16..231: 6x6x6 rgb color cube + if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0, + ((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0, + ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); + u -= 216; + + // 232..255: gray, leaving out black and white + int gray = u*10+8; return QColor(gray,gray,gray); +} + +inline QColor CharacterColor::color(const ColorEntry* base) const +{ + switch (_colorSpace) + { + case COLOR_SPACE_DEFAULT: return base[_u+0+(_v?BASE_COLORS:0)].color; + case COLOR_SPACE_SYSTEM: return base[_u+2+(_v?BASE_COLORS:0)].color; + case COLOR_SPACE_256: return color256(_u,base); + case COLOR_SPACE_RGB: return {_u,_v,_w}; + case COLOR_SPACE_UNDEFINED: return QColor(); + } + + Q_ASSERT(false); // invalid color space + + return QColor(); +} + +inline void CharacterColor::setIntensive() +{ + if (_colorSpace == COLOR_SPACE_SYSTEM || _colorSpace == COLOR_SPACE_DEFAULT) + { + _v = 1; + } +} + + +} + +#endif // CHARACTERCOLOR_H + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterFormat.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterFormat.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterFormat.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterFormat.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#include "CharacterFormat.h" + +using namespace Konsole; + +bool CharacterFormat::equalsFormat(const CharacterFormat &other) const +{ + return (other.rendition & ~RE_EXTENDED_CHAR) == (rendition & ~RE_EXTENDED_CHAR) + && other.fgColor == fgColor && other.bgColor == bgColor; +} + +bool CharacterFormat::equalsFormat(const Character &c) const +{ + return (c.rendition & ~RE_EXTENDED_CHAR) == (rendition & ~RE_EXTENDED_CHAR) + && c.foregroundColor == fgColor && c.backgroundColor == bgColor; +} + +void CharacterFormat::setFormat(const Character &c) +{ + rendition = c.rendition; + fgColor = c.foregroundColor; + bgColor = c.backgroundColor; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterFormat.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterFormat.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/CharacterFormat.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/CharacterFormat.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef CHARACTERFORMAT_H +#define CHARACTERFORMAT_H + +#include "Character.h" + +typedef quint16 RenditionFlags; + +namespace Konsole +{ + +class CharacterFormat +{ +public: + bool equalsFormat(const CharacterFormat &other) const; + bool equalsFormat(const Character &c) const; + void setFormat(const Character &c); + + CharacterColor fgColor, bgColor; + quint16 startPos; + RenditionFlags rendition; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Character.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Character.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Character.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Character.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,280 @@ +/* + This file is part of Konsole, KDE's terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef CHARACTER_H +#define CHARACTER_H + +// Qt +#include +#include + +// Local +#include "CharacterColor.h" +#include "konsole_wcwidth.h" + +namespace Konsole +{ + +typedef unsigned char LineProperty; + +static const int LINE_DEFAULT = 0; +static const int LINE_WRAPPED = (1 << 0); +static const int LINE_DOUBLEWIDTH = (1 << 1); +static const int LINE_DOUBLEHEIGHT = (1 << 2); + +#define DEFAULT_RENDITION 0 +#define RE_BOLD (1 << 0) +#define RE_BLINK (1 << 1) +#define RE_UNDERLINE (1 << 2) +#define RE_REVERSE (1 << 3) // Screen only +#define RE_INTENSIVE (1 << 3) // Widget only +#define RE_ITALIC (1 << 4) +#define RE_CURSOR (1 << 5) +#define RE_EXTENDED_CHAR (1 << 6) +#define RE_FAINT (1 << 7) +#define RE_STRIKEOUT (1 << 8) +#define RE_CONCEAL (1 << 9) +#define RE_OVERLINE (1 << 10) + +/** + * Unicode character in the range of U+2500 ~ U+257F are known as line + * characters, or box-drawing characters. Currently, konsole draws those + * characters itself, instead of using the glyph provided by the font. + * Unfortunately, the triple and quadruple dash lines (┄┅┆┇┈┉┊┋) are too + * detailed too be drawn cleanly at normal font scales without anti + * -aliasing, so those are drawn as regular characters. + */ +inline bool isSupportedLineChar(quint16 codePoint) +{ + return (codePoint & 0xFF80) == 0x2500 // Unicode block: Mathematical Symbols - Box Drawing + && !(0x2504 <= codePoint && codePoint <= 0x250B); // Triple and quadruple dash range +} + +/** + * A single character in the terminal which consists of a unicode character + * value, foreground and background colors and a set of rendition attributes + * which specify how it should be drawn. + */ +class Character +{ +public: + /** + * Constructs a new character. + * + * @param _c The unicode character value of this character. + * @param _f The foreground color used to draw the character. + * @param _b The color used to draw the character's background. + * @param _r A set of rendition flags which specify how this character is to be drawn. + */ + inline Character(quint16 _c = ' ', + CharacterColor _f = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR), + CharacterColor _b = CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR), + quint8 _r = DEFAULT_RENDITION) + : character(_c), rendition(_r), foregroundColor(_f), backgroundColor(_b) {} + + union + { + /** The unicode character value for this character. */ + uint character; + /** + * Experimental addition which allows a single Character instance to contain more than + * one unicode character. + * + * charSequence is a hash code which can be used to look up the unicode + * character sequence in the ExtendedCharTable used to create the sequence. + */ + quint16 charSequence; + }; + + /** A combination of RENDITION flags which specify options for drawing the character. */ + quint8 rendition; + + /** The foreground color used to draw this character. */ + CharacterColor foregroundColor; + /** The color used to draw this character's background. */ + CharacterColor backgroundColor; + + /** + * Returns true if this character has a transparent background when + * it is drawn with the specified @p palette. + */ + bool isTransparent(const ColorEntry* palette) const; + /** + * Returns true if this character should always be drawn in bold when + * it is drawn with the specified @p palette, independent of whether + * or not the character has the RE_BOLD rendition flag. + */ + ColorEntry::FontWeight fontWeight(const ColorEntry* base) const; + + /** + * returns true if the format (color, rendition flag) of the compared characters is equal + */ + bool equalsFormat(const Character &other) const; + + /** + * Compares two characters and returns true if they have the same unicode character value, + * rendition and colors. + */ + friend bool operator == (const Character& a, const Character& b); + /** + * Compares two characters and returns true if they have different unicode character values, + * renditions or colors. + */ + friend bool operator != (const Character& a, const Character& b); + + inline bool isLineChar() const + { + if (rendition & RE_EXTENDED_CHAR) { + return false; + } else { + return isSupportedLineChar(character); + } + } + + inline bool isSpace() const + { + if (rendition & RE_EXTENDED_CHAR) { + return false; + } else { + return QChar(character).isSpace(); + } + } + + inline int width() const { + return width(character); + } + + static int width(uint ucs4) { + return characterWidth(ucs4); + } + + static int stringWidth(const uint *ucs4Str, int len) { + int w = 0; + for (int i = 0; i < len; ++i) { + w += width(ucs4Str[i]); + } + return w; + } + + inline static int stringWidth(const QString &str) { + QVector ucs4Str = str.toUcs4(); + return stringWidth(ucs4Str.constData(), ucs4Str.length()); + } +}; + +inline bool operator == (const Character& a, const Character& b) +{ + return a.character == b.character && + a.rendition == b.rendition && + a.foregroundColor == b.foregroundColor && + a.backgroundColor == b.backgroundColor; +} + +inline bool operator != (const Character& a, const Character& b) +{ + return !operator==(a, b); +} + +inline bool Character::isTransparent(const ColorEntry* base) const +{ + return ((backgroundColor._colorSpace == COLOR_SPACE_DEFAULT) && + base[backgroundColor._u+0+(backgroundColor._v?BASE_COLORS:0)].transparent) + || ((backgroundColor._colorSpace == COLOR_SPACE_SYSTEM) && + base[backgroundColor._u+2+(backgroundColor._v?BASE_COLORS:0)].transparent); +} + +inline bool Character::equalsFormat(const Character& other) const +{ + return backgroundColor == other.backgroundColor + && foregroundColor == other.foregroundColor + && rendition == other.rendition; +} + +inline ColorEntry::FontWeight Character::fontWeight(const ColorEntry* base) const +{ + if (backgroundColor._colorSpace == COLOR_SPACE_DEFAULT) + return base[backgroundColor._u+0+(backgroundColor._v?BASE_COLORS:0)].fontWeight; + else if (backgroundColor._colorSpace == COLOR_SPACE_SYSTEM) + return base[backgroundColor._u+2+(backgroundColor._v?BASE_COLORS:0)].fontWeight; + else + return ColorEntry::UseCurrentFormat; +} + +extern unsigned short vt100_graphics[32]; + + +/** + * A table which stores sequences of unicode characters, referenced + * by hash keys. The hash key itself is the same size as a unicode + * character ( ushort ) so that it can occupy the same space in + * a structure. + */ +class ExtendedCharTable +{ +public: + /** Constructs a new character table. */ + ExtendedCharTable(); + ~ExtendedCharTable(); + + /** + * Adds a sequences of unicode characters to the table and returns + * a hash code which can be used later to look up the sequence + * using lookupExtendedChar() + * + * If the same sequence already exists in the table, the hash + * of the existing sequence will be returned. + * + * @param unicodePoints An array of unicode character points + * @param length Length of @p unicodePoints + */ + uint createExtendedChar(uint* unicodePoints , ushort length); + /** + * Looks up and returns a pointer to a sequence of unicode characters + * which was added to the table using createExtendedChar(). + * + * @param hash The hash key returned by createExtendedChar() + * @param length This variable is set to the length of the + * character sequence. + * + * @return A unicode character sequence of size @p length. + */ + uint* lookupExtendedChar(uint hash , ushort& length) const; + + /** The global ExtendedCharTable instance. */ + static ExtendedCharTable instance; +private: + // calculates the hash key of a sequence of unicode points of size 'length' + uint extendedCharHash(uint* unicodePoints , ushort length) const; + // tests whether the entry in the table specified by 'hash' matches the + // character sequence 'unicodePoints' of size 'length' + bool extendedCharMatch(uint hash , uint* unicodePoints , ushort length) const; + // internal, maps hash keys to character sequence buffers. The first ushort + // in each value is the length of the buffer, followed by the ushorts in the buffer + // themselves. + QHash extendedCharTable; +}; + +} +Q_DECLARE_TYPEINFO(Konsole::Character, Q_MOVABLE_TYPE); + +#endif // CHARACTER_H + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorScheme.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorScheme.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorScheme.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorScheme.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,869 @@ +/* + This source file is part of Konsole, a terminal emulator. + + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "ColorScheme.h" +#include "tools.h" + +// Qt +#include +#include +#include +#include +#include +#include +#include + + +// KDE +//#include +//#include +//#include +//#include +//#include +//#include + +using namespace Konsole; + +const ColorEntry ColorScheme::defaultTable[TABLE_COLORS] = + // The following are almost IBM standard color codes, with some slight + // gamma correction for the dim colors to compensate for bright X screens. + // It contains the 8 ansiterm/xterm colors in 2 intensities. +{ + ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry( +QColor(0xFF,0xFF,0xFF), true), // Dfore, Dback + ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry( +QColor(0xB2,0x18,0x18), false), // Black, Red + ColorEntry( QColor(0x18,0xB2,0x18), false), ColorEntry( +QColor(0xB2,0x68,0x18), false), // Green, Yellow + ColorEntry( QColor(0x18,0x18,0xB2), false), ColorEntry( +QColor(0xB2,0x18,0xB2), false), // Blue, Magenta + ColorEntry( QColor(0x18,0xB2,0xB2), false), ColorEntry( +QColor(0xB2,0xB2,0xB2), false), // Cyan, White + // intensive + ColorEntry( QColor(0x00,0x00,0x00), false), ColorEntry( +QColor(0xFF,0xFF,0xFF), true), + ColorEntry( QColor(0x68,0x68,0x68), false), ColorEntry( +QColor(0xFF,0x54,0x54), false), + ColorEntry( QColor(0x54,0xFF,0x54), false), ColorEntry( +QColor(0xFF,0xFF,0x54), false), + ColorEntry( QColor(0x54,0x54,0xFF), false), ColorEntry( +QColor(0xFF,0x54,0xFF), false), + ColorEntry( QColor(0x54,0xFF,0xFF), false), ColorEntry( +QColor(0xFF,0xFF,0xFF), false) +}; + +const char* const ColorScheme::colorNames[TABLE_COLORS] = +{ + "Foreground", + "Background", + "Color0", + "Color1", + "Color2", + "Color3", + "Color4", + "Color5", + "Color6", + "Color7", + "ForegroundIntense", + "BackgroundIntense", + "Color0Intense", + "Color1Intense", + "Color2Intense", + "Color3Intense", + "Color4Intense", + "Color5Intense", + "Color6Intense", + "Color7Intense" +}; +// dummy silently comment out the tr_NOOP +#define tr_NOOP +const char* const ColorScheme::translatedColorNames[TABLE_COLORS] = +{ + tr_NOOP("Foreground"), + tr_NOOP("Background"), + tr_NOOP("Color 1"), + tr_NOOP("Color 2"), + tr_NOOP("Color 3"), + tr_NOOP("Color 4"), + tr_NOOP("Color 5"), + tr_NOOP("Color 6"), + tr_NOOP("Color 7"), + tr_NOOP("Color 8"), + tr_NOOP("Foreground (Intense)"), + tr_NOOP("Background (Intense)"), + tr_NOOP("Color 1 (Intense)"), + tr_NOOP("Color 2 (Intense)"), + tr_NOOP("Color 3 (Intense)"), + tr_NOOP("Color 4 (Intense)"), + tr_NOOP("Color 5 (Intense)"), + tr_NOOP("Color 6 (Intense)"), + tr_NOOP("Color 7 (Intense)"), + tr_NOOP("Color 8 (Intense)") +}; + +ColorScheme::ColorScheme() + : _opacity(1.0) + , _table(nullptr) + , _randomTable(nullptr) +{ +} + +ColorScheme::ColorScheme(const ColorScheme& other) + : _opacity(other._opacity) + , _table(nullptr) + , _randomTable(nullptr) +{ + setName(other.name()); + setDescription(other.description()); + + if ( other._table != nullptr ) + { + for ( int i = 0 ; i < TABLE_COLORS ; i++ ) + setColorTableEntry(i,other._table[i]); + } + + if ( other._randomTable != nullptr ) + { + for ( int i = 0 ; i < TABLE_COLORS ; i++ ) + { + const RandomizationRange& range = other._randomTable[i]; + setRandomizationRange(i,range.hue,range.saturation,range.value); + } + } +} +ColorScheme::~ColorScheme() +{ + delete[] _table; + delete[] _randomTable; +} + +void ColorScheme::setDescription(const QString& description) { _description = description; } +QString ColorScheme::description() const { return _description; } + +void ColorScheme::setName(const QString& name) { _name = name; } +QString ColorScheme::name() const { return _name; } + +void ColorScheme::setColorTableEntry(int index , const ColorEntry& entry) +{ + Q_ASSERT( index >= 0 && index < TABLE_COLORS ); + + if ( !_table ) + { + _table = new ColorEntry[TABLE_COLORS]; + + for (int i=0;i= 0 && index < TABLE_COLORS ); + + if ( randomSeed != 0 ) + qsrand(randomSeed); + + ColorEntry entry = colorTable()[index]; + + if ( randomSeed != 0 && + _randomTable != nullptr && + !_randomTable[index].isNull() ) + { + const RandomizationRange& range = _randomTable[index]; + + + int hueDifference = range.hue ? (qrand() % range.hue) - range.hue/2 : 0; + int saturationDifference = range.saturation ? (qrand() % range.saturation) - range.saturation/2 : 0; + int valueDifference = range.value ? (qrand() % range.value) - range.value/2 : 0; + + QColor& color = entry.color; + + int newHue = qAbs( (color.hue() + hueDifference) % MAX_HUE ); + int newValue = qMin( qAbs(color.value() + valueDifference) , 255 ); + int newSaturation = qMin( qAbs(color.saturation() + saturationDifference) , 255 ); + + color.setHsv(newHue,newSaturation,newValue); + } + + return entry; +} +void ColorScheme::getColorTable(ColorEntry* table , uint randomSeed) const +{ + for ( int i = 0 ; i < TABLE_COLORS ; i++ ) + table[i] = colorEntry(i,randomSeed); +} +bool ColorScheme::randomizedBackgroundColor() const +{ + return _randomTable == nullptr ? false : !_randomTable[1].isNull(); +} +void ColorScheme::setRandomizedBackgroundColor(bool randomize) +{ + // the hue of the background colour is allowed to be randomly + // adjusted as much as possible. + // + // the value and saturation are left alone to maintain read-ability + if ( randomize ) + { + setRandomizationRange( 1 /* background color index */ , MAX_HUE , 255 , 0 ); + } + else + { + if ( _randomTable ) + setRandomizationRange( 1 /* background color index */ , 0 , 0 , 0 ); + } +} + +void ColorScheme::setRandomizationRange( int index , quint16 hue , quint8 saturation , + quint8 value ) +{ + Q_ASSERT( hue <= MAX_HUE ); + Q_ASSERT( index >= 0 && index < TABLE_COLORS ); + + if ( _randomTable == nullptr ) + _randomTable = new RandomizationRange[TABLE_COLORS]; + + _randomTable[index].hue = hue; + _randomTable[index].value = value; + _randomTable[index].saturation = saturation; +} + +const ColorEntry* ColorScheme::colorTable() const +{ + if ( _table ) + return _table; + else + return defaultTable; +} +QColor ColorScheme::foregroundColor() const +{ + return colorTable()[0].color; +} +QColor ColorScheme::backgroundColor() const +{ + return colorTable()[1].color; +} +bool ColorScheme::hasDarkBackground() const +{ + // value can range from 0 - 255, with larger values indicating higher brightness. + // so 127 is in the middle, anything less is deemed 'dark' + return backgroundColor().value() < 127; +} +void ColorScheme::setOpacity(qreal opacity) { _opacity = opacity; } +qreal ColorScheme::opacity() const { return _opacity; } + +void ColorScheme::read(const QString & fileName) +{ + QSettings s(fileName, QSettings::IniFormat); + s.beginGroup(QLatin1String("General")); + + _description = s.value(QLatin1String("Description"), QObject::tr("Un-named Color Scheme")).toString(); + _opacity = s.value(QLatin1String("Opacity"),qreal(1.0)).toDouble(); + s.endGroup(); + + for (int i=0 ; i < TABLE_COLORS ; i++) + { + readColorEntry(&s, i); + } +} +#if 0 +// implemented upstream - user apps +void ColorScheme::read(KConfig& config) +{ + KConfigGroup configGroup = config.group("General"); + + QString description = configGroup.readEntry("Description", QObject::tr("Un-named Color Scheme")); + + _description = tr(description.toUtf8()); + _opacity = configGroup.readEntry("Opacity",qreal(1.0)); + + for (int i=0 ; i < TABLE_COLORS ; i++) + { + readColorEntry(config,i); + } +} +void ColorScheme::write(KConfig& config) const +{ + KConfigGroup configGroup = config.group("General"); + + configGroup.writeEntry("Description",_description); + configGroup.writeEntry("Opacity",_opacity); + + for (int i=0 ; i < TABLE_COLORS ; i++) + { + RandomizationRange random = _randomTable != 0 ? _randomTable[i] : RandomizationRange(); + writeColorEntry(config,colorNameForIndex(i),colorTable()[i],random); + } +} +#endif + +QString ColorScheme::colorNameForIndex(int index) +{ + Q_ASSERT( index >= 0 && index < TABLE_COLORS ); + + return QString::fromLatin1(colorNames[index]); +} +QString ColorScheme::translatedColorNameForIndex(int index) +{ + Q_ASSERT( index >= 0 && index < TABLE_COLORS ); + + return QString::fromLatin1(translatedColorNames[index]); +} + +void ColorScheme::readColorEntry(QSettings * s , int index) +{ + QString colorName = colorNameForIndex(index); + + s->beginGroup(colorName); + + ColorEntry entry; + + QVariant colorValue = s->value(QLatin1String("Color")); + QString colorStr; + int r, g, b; + bool ok = false; + // XXX: Undocumented(?) QSettings behavior: values with commas are parsed + // as QStringList and others QString + if (colorValue.type() == QVariant::StringList) + { + QStringList rgbList = colorValue.toStringList(); + colorStr = rgbList.join(QLatin1Char(',')); + if (rgbList.count() == 3) + { + bool parse_ok; + + ok = true; + r = rgbList[0].toInt(&parse_ok); + ok = ok && parse_ok && (r >= 0 && r <= 0xff); + g = rgbList[1].toInt(&parse_ok); + ok = ok && parse_ok && (g >= 0 && g <= 0xff); + b = rgbList[2].toInt(&parse_ok); + ok = ok && parse_ok && (b >= 0 && b <= 0xff); + } + } + else + { + colorStr = colorValue.toString(); + QRegularExpression hexColorPattern(QLatin1String("^#[0-9a-f]{6}$"), + QRegularExpression::CaseInsensitiveOption); + if (hexColorPattern.match(colorStr).hasMatch()) + { + // Parsing is always ok as already matched by the regexp + r = colorStr.midRef(1, 2).toInt(nullptr, 16); + g = colorStr.midRef(3, 2).toInt(nullptr, 16); + b = colorStr.midRef(5, 2).toInt(nullptr, 16); + ok = true; + } + } + if (!ok) + { + qWarning().nospace() << "Invalid color value " << colorStr + << " for " << colorName << ". Fallback to black."; + r = g = b = 0; + } + entry.color = QColor(r, g, b); + + entry.transparent = s->value(QLatin1String("Transparent"),false).toBool(); + + // Deprecated key from KDE 4.0 which set 'Bold' to true to force + // a color to be bold or false to use the current format + // + // TODO - Add a new tri-state key which allows for bold, normal or + // current format + if (s->contains(QLatin1String("Bold"))) + entry.fontWeight = s->value(QLatin1String("Bold"),false).toBool() ? ColorEntry::Bold : + ColorEntry::UseCurrentFormat; + + quint16 hue = s->value(QLatin1String("MaxRandomHue"),0).toInt(); + quint8 value = s->value(QLatin1String("MaxRandomValue"),0).toInt(); + quint8 saturation = s->value(QLatin1String("MaxRandomSaturation"),0).toInt(); + + setColorTableEntry( index , entry ); + + if ( hue != 0 || value != 0 || saturation != 0 ) + setRandomizationRange( index , hue , saturation , value ); + + s->endGroup(); +} +#if 0 +// implemented upstream - user apps +void ColorScheme::writeColorEntry(KConfig& config , const QString& colorName, const ColorEntry& entry , const RandomizationRange& random) const +{ + KConfigGroup configGroup(&config,colorName); + + configGroup.writeEntry("Color",entry.color); + configGroup.writeEntry("Transparency",(bool)entry.transparent); + if (entry.fontWeight != ColorEntry::UseCurrentFormat) + { + configGroup.writeEntry("Bold",entry.fontWeight == ColorEntry::Bold); + } + + // record randomization if this color has randomization or + // if one of the keys already exists + if ( !random.isNull() || configGroup.hasKey("MaxRandomHue") ) + { + configGroup.writeEntry("MaxRandomHue",(int)random.hue); + configGroup.writeEntry("MaxRandomValue",(int)random.value); + configGroup.writeEntry("MaxRandomSaturation",(int)random.saturation); + } +} +#endif + +// +// Work In Progress - A color scheme for use on KDE setups for users +// with visual disabilities which means that they may have trouble +// reading text with the supplied color schemes. +// +// This color scheme uses only the 'safe' colors defined by the +// KColorScheme class. +// +// A complication this introduces is that each color provided by +// KColorScheme is defined as a 'background' or 'foreground' color. +// Only foreground colors are allowed to be used to render text and +// only background colors are allowed to be used for backgrounds. +// +// The ColorEntry and TerminalDisplay classes do not currently +// support this restriction. +// +// Requirements: +// - A color scheme which uses only colors from the KColorScheme class +// - Ability to restrict which colors the TerminalDisplay widget +// uses as foreground and background color +// - Make use of KGlobalSettings::allowDefaultBackgroundImages() as +// a hint to determine whether this accessible color scheme should +// be used by default. +// +// +// -- Robert Knight 21/07/2007 +// +AccessibleColorScheme::AccessibleColorScheme() + : ColorScheme() +{ +#if 0 +// It's not finished in konsole and it breaks Qt4 compilation as well + // basic attributes + setName("accessible"); + setDescription(QObject::tr("Accessible Color Scheme")); + + // setup colors + const int ColorRoleCount = 8; + + const KColorScheme colorScheme(QPalette::Active); + + QBrush colors[ColorRoleCount] = + { + colorScheme.foreground( colorScheme.NormalText ), + colorScheme.background( colorScheme.NormalBackground ), + + colorScheme.foreground( colorScheme.InactiveText ), + colorScheme.foreground( colorScheme.ActiveText ), + colorScheme.foreground( colorScheme.LinkText ), + colorScheme.foreground( colorScheme.VisitedText ), + colorScheme.foreground( colorScheme.NegativeText ), + colorScheme.foreground( colorScheme.NeutralText ) + }; + + for ( int i = 0 ; i < TABLE_COLORS ; i++ ) + { + ColorEntry entry; + entry.color = colors[ i % ColorRoleCount ].color(); + + setColorTableEntry( i , entry ); + } +#endif +} + +KDE3ColorSchemeReader::KDE3ColorSchemeReader( QIODevice* device ) : + _device(device) +{ +} +ColorScheme* KDE3ColorSchemeReader::read() +{ + Q_ASSERT( _device->openMode() == QIODevice::ReadOnly || + _device->openMode() == QIODevice::ReadWrite ); + + ColorScheme* scheme = new ColorScheme(); + + QRegExp comment(QLatin1String("#.*$")); + while ( !_device->atEnd() ) + { + QString line(QString::fromUtf8(_device->readLine())); + line.remove(comment); + line = line.simplified(); + + if ( line.isEmpty() ) + continue; + + if ( line.startsWith(QLatin1String("color")) ) + { + if (!readColorLine(line,scheme)) + qDebug() << "Failed to read KDE 3 color scheme line" << line; + } + else if ( line.startsWith(QLatin1String("title")) ) + { + if (!readTitleLine(line,scheme)) + qDebug() << "Failed to read KDE 3 color scheme title line" << line; + } + else + { + qDebug() << "KDE 3 color scheme contains an unsupported feature, '" << + line << "'"; + } + } + + return scheme; +} +bool KDE3ColorSchemeReader::readColorLine(const QString& line,ColorScheme* scheme) +{ + QStringList list = line.split(QLatin1Char(' ')); + + if (list.count() != 7) + return false; + if (list.first() != QLatin1String("color")) + return false; + + int index = list[1].toInt(); + int red = list[2].toInt(); + int green = list[3].toInt(); + int blue = list[4].toInt(); + int transparent = list[5].toInt(); + int bold = list[6].toInt(); + + const int MAX_COLOR_VALUE = 255; + + if( (index < 0 || index >= TABLE_COLORS ) + || (red < 0 || red > MAX_COLOR_VALUE ) + || (blue < 0 || blue > MAX_COLOR_VALUE ) + || (green < 0 || green > MAX_COLOR_VALUE ) + || (transparent != 0 && transparent != 1 ) + || (bold != 0 && bold != 1) ) + return false; + + ColorEntry entry; + entry.color = QColor(red,green,blue); + entry.transparent = ( transparent != 0 ); + entry.fontWeight = ( bold != 0 ) ? ColorEntry::Bold : ColorEntry::UseCurrentFormat; + + scheme->setColorTableEntry(index,entry); + return true; +} +bool KDE3ColorSchemeReader::readTitleLine(const QString& line,ColorScheme* scheme) +{ + if( !line.startsWith(QLatin1String("title")) ) + return false; + + int spacePos = line.indexOf(QLatin1Char(' ')); + if( spacePos == -1 ) + return false; + + QString description = line.mid(spacePos+1); + + scheme->setDescription(description); + return true; +} +ColorSchemeManager::ColorSchemeManager() + : _haveLoadedAll(false) +{ +} +ColorSchemeManager::~ColorSchemeManager() +{ + QHashIterator iter(_colorSchemes); + while (iter.hasNext()) + { + iter.next(); + delete iter.value(); + } +} +void ColorSchemeManager::loadAllColorSchemes() +{ + int failed = 0; + + QList nativeColorSchemes = listColorSchemes(); + QListIterator nativeIter(nativeColorSchemes); + while ( nativeIter.hasNext() ) + { + if ( !loadColorScheme( nativeIter.next() ) ) + failed++; + } + + QList kde3ColorSchemes = listKDE3ColorSchemes(); + QListIterator kde3Iter(kde3ColorSchemes); + while ( kde3Iter.hasNext() ) + { + if ( !loadKDE3ColorScheme( kde3Iter.next() ) ) + failed++; + } + + if ( failed > 0 ){ + qDebug() << "failed to load " << failed << " color schemes."; + } + + qDebug() << "load all color schemes"; + //qDebug() << "nativeColorSchemes" << nativeColorSchemes ; + //qDebug() << "kde3ColorSchemes" << kde3ColorSchemes; + _haveLoadedAll = true; +} +QList ColorSchemeManager::allColorSchemes() +{ + if ( !_haveLoadedAll ) + { + loadAllColorSchemes(); + } + + return _colorSchemes.values(); +} +bool ColorSchemeManager::loadKDE3ColorScheme(const QString& filePath) +{ + QFile file(filePath); + if (!filePath.endsWith(QLatin1String(".schema")) || !file.open(QIODevice::ReadOnly)) + return false; + + KDE3ColorSchemeReader reader(&file); + ColorScheme* scheme = reader.read(); + scheme->setName(QFileInfo(file).baseName()); + file.close(); + + if (scheme->name().isEmpty()) + { + qDebug() << "color scheme name is not valid."; + delete scheme; + return false; + } + + QFileInfo info(filePath); + + if ( !_colorSchemes.contains(info.baseName()) ) + _colorSchemes.insert(scheme->name(),scheme); + else + { + qDebug() << "color scheme with name" << scheme->name() << "has already been" << + "found, ignoring."; + delete scheme; + } + + return true; +} +#if 0 +void ColorSchemeManager::addColorScheme(ColorScheme* scheme) +{ + _colorSchemes.insert(scheme->name(),scheme); + + // save changes to disk + QString path = KGlobal::dirs()->saveLocation("data","konsole/") + scheme->name() + ".colorscheme"; + KConfig config(path , KConfig::NoGlobals); + + scheme->write(config); +} +#endif + +bool ColorSchemeManager::loadCustomColorScheme(const QString& path) +{ + if (path.endsWith(QLatin1String(".colorscheme"))) + return loadColorScheme(path); + else if (path.endsWith(QLatin1String(".schema"))) + return loadKDE3ColorScheme(path); + else + return false; +} + +void ColorSchemeManager::addCustomColorSchemeDir(const QString& custom_dir) +{ + add_custom_color_scheme_dir(custom_dir); +} + +bool ColorSchemeManager::loadColorScheme(const QString& filePath) +{ + if ( !filePath.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(filePath) ) + return false; + + QFileInfo info(filePath); + + const QString& schemeName = info.baseName(); + + ColorScheme* scheme = new ColorScheme(); + scheme->setName(schemeName); + scheme->read(filePath); + + if (scheme->name().isEmpty()) + { + qDebug() << "Color scheme in" << filePath << "does not have a valid name and was not loaded."; + delete scheme; + return false; + } + + if ( !_colorSchemes.contains(schemeName) ) + { + _colorSchemes.insert(schemeName,scheme); + } + else + { + qDebug() << "color scheme with name" << schemeName << "has already been" << + "found, ignoring."; + + delete scheme; + } + + return true; +} +QList ColorSchemeManager::listKDE3ColorSchemes() +{ + QList ret; + for (const QString &scheme_dir : get_color_schemes_dirs()) + { + const QString dname(scheme_dir); + QDir dir(dname); + QStringList filters; + filters << QLatin1String("*.schema"); + dir.setNameFilters(filters); + const QStringList list = dir.entryList(filters); + for (const QString &i : list) + ret << dname + QLatin1Char('/') + i; + } + return ret; + //return KGlobal::dirs()->findAllResources("data", + // "konsole/*.schema", + // KStandardDirs::NoDuplicates); + // +} +QList ColorSchemeManager::listColorSchemes() +{ + QList ret; + for (const QString &scheme_dir : get_color_schemes_dirs()) + { + const QString dname(scheme_dir); + QDir dir(dname); + QStringList filters; + filters << QLatin1String("*.colorscheme"); + dir.setNameFilters(filters); + const QStringList list = dir.entryList(filters); + for (const QString &i : list) + ret << dname + QLatin1Char('/') + i; + } + return ret; +// return KGlobal::dirs()->findAllResources("data", +// "konsole/*.colorscheme", +// KStandardDirs::NoDuplicates); +} +const ColorScheme ColorSchemeManager::_defaultColorScheme; +const ColorScheme* ColorSchemeManager::defaultColorScheme() const +{ + return &_defaultColorScheme; +} +bool ColorSchemeManager::deleteColorScheme(const QString& name) +{ + Q_ASSERT( _colorSchemes.contains(name) ); + + // lookup the path and delete + QString path = findColorSchemePath(name); + if ( QFile::remove(path) ) + { + _colorSchemes.remove(name); + return true; + } + else + { + qDebug() << "Failed to remove color scheme -" << path; + return false; + } +} + +/******************************************************************************* + 1. @函数: realodColorScheme + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 重新加载主题 +*******************************************************************************/ +void ColorSchemeManager::realodColorScheme(const QString &origName) +{ + qDebug() << "realodColorScheme:" << origName; + if (!origName.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(origName)) { + return; + } + + QFileInfo info(origName); + const QString &schemeName = info.baseName(); + ColorScheme *scheme = new ColorScheme(); + scheme->setName(schemeName); + scheme->read(origName); + + if (scheme->name().isEmpty()) { + qDebug() << "Color scheme in" << origName << "does not have a valid name and was not loaded."; + delete scheme; + return; + } + + if (_colorSchemes.contains(schemeName)) { + qDebug() << "(_colorSchemes.contains(schemeName))"; + const ColorScheme *needDeletScheme = _colorSchemes[schemeName]; + delete needDeletScheme; + _colorSchemes[schemeName] = scheme; + } +} + +QString ColorSchemeManager::findColorSchemePath(const QString& name) const +{ +// QString path = KStandardDirs::locate("data","konsole/"+name+".colorscheme"); + const QStringList dirs = get_color_schemes_dirs(); + if ( dirs.isEmpty() ) + return QString(); + + const QString dir = dirs.first(); + QString path(dir + QLatin1Char('/')+ name + QLatin1String(".colorscheme")); + if ( !path.isEmpty() ) + return path; + + //path = KStandardDirs::locate("data","konsole/"+name+".schema"); + path = dir + QLatin1Char('/')+ name + QLatin1String(".schema"); + + return path; +} +const ColorScheme* ColorSchemeManager::findColorScheme(const QString& name) +{ + if ( name.isEmpty() ) + return defaultColorScheme(); + + if ( _colorSchemes.contains(name) ) + return _colorSchemes[name]; + else + { + // look for this color scheme + QString path = findColorSchemePath(name); + if ( !path.isEmpty() && loadColorScheme(path) ) + { + return findColorScheme(name); + } + else + { + if (!path.isEmpty() && loadKDE3ColorScheme(path)) + return findColorScheme(name); + } + + qDebug() << "Could not find color scheme - " << name; + + return nullptr; + } +} +Q_GLOBAL_STATIC(ColorSchemeManager, theColorSchemeManager) +ColorSchemeManager* ColorSchemeManager::instance() +{ + return theColorSchemeManager; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorScheme.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorScheme.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorScheme.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorScheme.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,368 @@ +/* + This source file is part of Konsole, a terminal emulator. + + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COLORSCHEME_H +#define COLORSCHEME_H + +// Qt +#include +#include +#include +#include +#include +#include + +// Konsole +#include "CharacterColor.h" + +class QIODevice; +//class KConfig; + +namespace Konsole +{ + +/** + * Represents a color scheme for a terminal display. + * + * The color scheme includes the palette of colors used to draw the text and character backgrounds + * in the display and the opacity level of the display background. + */ +class ColorScheme +{ +public: + /** + * Constructs a new color scheme which is initialised to the default color set + * for Konsole. + */ + ColorScheme(); + ColorScheme(const ColorScheme& other); + ~ColorScheme(); + + /** Sets the descriptive name of the color scheme. */ + void setDescription(const QString& description); + /** Returns the descriptive name of the color scheme. */ + QString description() const; + + /** Sets the name of the color scheme */ + void setName(const QString& name); + /** Returns the name of the color scheme */ + QString name() const; + +#if 0 +// Implemented upstream - in user apps + /** Reads the color scheme from the specified configuration source */ + void read(KConfig& config); + /** Writes the color scheme to the specified configuration source */ + void write(KConfig& config) const; +#endif + void read(const QString & filename); + + /** Sets a single entry within the color palette. */ + void setColorTableEntry(int index , const ColorEntry& entry); + + /** + * Copies the color entries which form the palette for this color scheme + * into @p table. @p table should be an array with TABLE_COLORS entries. + * + * @param table Array into which the color entries for this color scheme + * are copied. + * @param randomSeed Color schemes may allow certain colors in their + * palette to be randomized. The seed is used to pick the random color. + */ + void getColorTable(ColorEntry* table, uint randomSeed = 0) const; + + /** + * Retrieves a single color entry from the table. + * + * See getColorTable() + */ + ColorEntry colorEntry(int index , uint randomSeed = 0) const; + + /** + * Convenience method. Returns the + * foreground color for this scheme, + * this is the primary color used to draw the + * text in this scheme. + */ + QColor foregroundColor() const; + /** + * Convenience method. Returns the background color for + * this scheme, this is the primary color used to + * draw the terminal background in this scheme. + */ + QColor backgroundColor() const; + + /** + * Returns true if this color scheme has a dark background. + * The background color is said to be dark if it has a value of less than 127 + * in the HSV color space. + */ + bool hasDarkBackground() const; + + /** + * Sets the opacity level of the display background. @p opacity ranges + * between 0 (completely transparent background) and 1 (completely + * opaque background). + * + * Defaults to 1. + * + * TODO: More documentation + */ + void setOpacity(qreal opacity); + /** + * Returns the opacity level for this color scheme, see setOpacity() + * TODO: More documentation + */ + qreal opacity() const; + + /** + * Enables randomization of the background color. This will cause + * the palette returned by getColorTable() and colorEntry() to + * be adjusted depending on the value of the random seed argument + * to them. + */ + void setRandomizedBackgroundColor(bool randomize); + + /** Returns true if the background color is randomized. */ + bool randomizedBackgroundColor() const; + + static QString colorNameForIndex(int index); + static QString translatedColorNameForIndex(int index); + +private: + // specifies how much a particular color can be randomized by + class RandomizationRange + { + public: + RandomizationRange() : hue(0) , saturation(0) , value(0) {} + + bool isNull() const + { + return ( hue == 0 && saturation == 0 && value == 0 ); + } + + quint16 hue; + quint8 saturation; + quint8 value; + }; + + // returns the active color table. if none has been set specifically, + // this is the default color table. + const ColorEntry* colorTable() const; + +#if 0 +// implemented upstream - user apps + // reads a single colour entry from a KConfig source + // and sets the palette entry at 'index' to the entry read. + void readColorEntry(KConfig& config , int index); + // writes a single colour entry to a KConfig source + void writeColorEntry(KConfig& config , const QString& colorName, const ColorEntry& entry,const RandomizationRange& range) const; +#endif + void readColorEntry(QSettings *s, int index); + + // sets the amount of randomization allowed for a particular color + // in the palette. creates the randomization table if + // it does not already exist + void setRandomizationRange( int index , quint16 hue , quint8 saturation , quint8 value ); + + QString _description; + QString _name; + qreal _opacity; + ColorEntry* _table; // pointer to custom color table or 0 if the default + // color scheme is being used + + + static const quint16 MAX_HUE = 340; + + RandomizationRange* _randomTable; // pointer to randomization table or 0 + // if no colors in the color scheme support + // randomization + + static const char* const colorNames[TABLE_COLORS]; + static const char* const translatedColorNames[TABLE_COLORS]; + + static const ColorEntry defaultTable[]; // table of default color entries +}; + +/** + * A color scheme which uses colors from the standard KDE color palette. + * + * This is designed primarily for the benefit of users who are using specially + * designed colors. + * + * TODO Implement and make it the default on systems with specialized KDE + * color schemes. + */ +class AccessibleColorScheme : public ColorScheme +{ +public: + AccessibleColorScheme(); +}; + +/** + * Reads a color scheme stored in the .schema format used in the KDE 3 incarnation + * of Konsole + * + * Only the basic essentials ( title and color palette entries ) are currently + * supported. Additional options such as background image and background + * blend colors are ignored. + */ +class KDE3ColorSchemeReader +{ +public: + /** + * Constructs a new reader which reads from the specified device. + * The device should be open in read-only mode. + */ + explicit KDE3ColorSchemeReader( QIODevice* device ); + + /** + * Reads and parses the contents of the .schema file from the input + * device and returns the ColorScheme defined within it. + * + * Returns a null pointer if an error occurs whilst parsing + * the contents of the file. + */ + ColorScheme* read(); + +private: + // reads a line from the file specifying a colour palette entry + // format is: color [index] [red] [green] [blue] [transparent] [bold] + bool readColorLine(const QString& line , ColorScheme* scheme); + bool readTitleLine(const QString& line , ColorScheme* scheme); + + QIODevice* _device; +}; + +/** + * Manages the color schemes available for use by terminal displays. + * See ColorScheme + */ +class ColorSchemeManager +{ +public: + + /** + * Constructs a new ColorSchemeManager and loads the list + * of available color schemes. + * + * The color schemes themselves are not loaded until they are first + * requested via a call to findColorScheme() + */ + ColorSchemeManager(); + /** + * Destroys the ColorSchemeManager and saves any modified color schemes to disk. + */ + ~ColorSchemeManager(); + + /** + * Returns the default color scheme for Konsole + */ + const ColorScheme* defaultColorScheme() const; + + /** + * Returns the color scheme with the given name or 0 if no + * scheme with that name exists. If @p name is empty, the + * default color scheme is returned. + * + * The first time that a color scheme with a particular name is + * requested, the configuration information is loaded from disk. + */ + const ColorScheme* findColorScheme(const QString& name); + +#if 0 + /** + * Adds a new color scheme to the manager. If @p scheme has the same name as + * an existing color scheme, it replaces the existing scheme. + * + * TODO - Ensure the old color scheme gets deleted + */ + void addColorScheme(ColorScheme* scheme); +#endif + /** + * Deletes a color scheme. Returns true on successful deletion or false otherwise. + */ + bool deleteColorScheme(const QString& name); + + //重新加载主题 + void realodColorScheme(const QString &origName); + + /** + * Returns a list of the all the available color schemes. + * This may be slow when first called because all of the color + * scheme resources on disk must be located, read and parsed. + * + * Subsequent calls will be inexpensive. + */ + QList allColorSchemes(); + + /** Returns the global color scheme manager instance. */ + static ColorSchemeManager* instance(); + + /** @brief Loads a custom color scheme under given \em path. + * + * The \em path may refer to either KDE 4 .colorscheme or KDE 3 + * .schema file + * + * The loaded color scheme is available under the name equal to + * the base name of the \em path via the allColorSchemes() and + * findColorScheme() methods after this call if loaded successfully. + * + * @param[in] path The path to KDE 4 .colorscheme or KDE 3 .schema. + * @return Whether the color scheme is loaded successfully. + */ + bool loadCustomColorScheme(const QString& path); + + /** + * @brief Allows to add a custom location of color schemes. + * + * @param[in] custom_dir Custom location of color schemes (must end with /). + */ + void addCustomColorSchemeDir(const QString& custom_dir); + +private: + // loads a color scheme from a KDE 4+ .colorscheme file + bool loadColorScheme(const QString& path); + // loads a color scheme from a KDE 3 .schema file + bool loadKDE3ColorScheme(const QString& path); + // returns a list of paths of color schemes in the KDE 4+ .colorscheme file format + QList listColorSchemes(); + // returns a list of paths of color schemes in the .schema file format + // used in KDE 3 + QList listKDE3ColorSchemes(); + // loads all of the color schemes + void loadAllColorSchemes(); + // finds the path of a color scheme + QString findColorSchemePath(const QString& name) const; + + QHash _colorSchemes; + QSet _modifiedSchemes; + + bool _haveLoadedAll; + + static const ColorScheme _defaultColorScheme; +}; + +} + +Q_DECLARE_METATYPE(const Konsole::ColorScheme*) + +#endif //COLORSCHEME_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnLightYellow.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnLightYellow.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnLightYellow.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnLightYellow.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Black on Light Yellow + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 221 1 0 # regular background color (Light Yellow) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 221 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnRandomLight.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnRandomLight.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnRandomLight.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnRandomLight.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[Background] +Bold=false +Color=247,247,214 +Transparency=true +MaxRandomHue=340 + +[BackgroundIntense] +Bold=false +Color=255,255,221 +Transparency=true + +[Color0] +Bold=false +Color=0,0,0 +Transparency=false + +[Color0Intense] +Bold=false +Color=104,104,104 +Transparency=false + +[Color1] +Bold=false +Color=178,24,24 +Transparency=false + +[Color1Intense] +Bold=false +Color=255,84,84 +Transparency=false + +[Color2] +Bold=false +Color=24,178,24 +Transparency=false + +[Color2Intense] +Bold=false +Color=84,255,84 +Transparency=false + +[Color3] +Bold=false +Color=178,104,24 +Transparency=false + +[Color3Intense] +Bold=false +Color=255,255,84 +Transparency=false + +[Color4] +Bold=false +Color=24,24,178 +Transparency=false + +[Color4Intense] +Bold=false +Color=84,84,255 +Transparency=false + +[Color5] +Bold=false +Color=178,24,178 +Transparency=false + +[Color5Intense] +Bold=false +Color=255,84,255 +Transparency=false + +[Color6] +Bold=false +Color=24,178,178 +Transparency=false + +[Color6Intense] +Bold=false +Color=84,255,255 +Transparency=false + +[Color7] +Bold=false +Color=178,178,178 +Transparency=false + +[Color7Intense] +Bold=false +Color=255,255,255 +Transparency=false + +[Foreground] +Bold=false +Color=0,0,0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=0,0,0 +Transparency=false + +[General] +Description=Black on Random Light +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnWhite.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnWhite.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BlackOnWhite.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BlackOnWhite.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Black on White + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 248 248 248 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 255 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BreezeModified.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BreezeModified.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/BreezeModified.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/BreezeModified.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,95 @@ +[Background] +Color=49,54,59 + +[BackgroundFaint] +Color=49,54,59 + +[BackgroundIntense] +Color=35,38,41 + +[Color0] +Color=7,54,66 + +[Color0Faint] +Color=32,43,54 + +[Color0Intense] +Color=255,85,0 + +[Color1] +Color=237,21,21 + +[Color1Faint] +Color=120,50,40 + +[Color1Intense] +Color=192,57,43 + +[Color2] +Color=17,209,22 + +[Color2Faint] +Color=23,162,98 + +[Color2Intense] +Color=28,220,154 + +[Color3] +Color=246,116,0 + +[Color3Faint] +Color=182,86,25 + +[Color3Intense] +Color=253,188,75 + +[Color4] +Color=29,153,243 + +[Color4Faint] +Color=27,102,143 + +[Color4Intense] +Color=61,174,233 + +[Color5] +Color=155,89,182 + +[Color5Faint] +Color=97,74,115 + +[Color5Intense] +Color=142,68,173 + +[Color6] +Color=26,188,156 + +[Color6Faint] +Color=24,108,96 + +[Color6Intense] +Color=22,160,133 + +[Color7] +Color=239,240,241 + +[Color7Faint] +Color=99,104,109 + +[Color7Intense] +Color=252,252,252 + +[Foreground] +Color=239,240,241 + +[ForegroundFaint] +Color=220,230,231 + +[ForegroundIntense] +Color=252,252,252 + +[General] +Description=BreezeModified +Opacity=0.95 +Wallpaper= + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Dark.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Dark.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Dark.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Dark.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ + +[Background] +Bold=true +Color=37,37,37 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=0,0,0 +Transparency=false + +[Color0] +Bold=true +Color=0,0,0 +Transparency=false + +[Color0Intense] +Bold=true +Color=104,104,104 +Transparency=false + +[Color1] +Bold=true +Color=178,24,24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255,84,84 +Transparency=false + +[Color2] +Bold=true +Color=24,178,24 +Transparency=false + +[Color2Intense] +Bold=true +Color=133,153,0 +Transparency=false + +[Color3] +Bold=true +Color=178,104,24 +Transparency=false + +[Color3Intense] +Bold=true +Color=255,255,84 +Transparency=false + +[Color4] +Bold=true +Color=52,101,164 +Transparency=false + +[Color4Intense] +Bold=true +Color=52,101,164 +Transparency=false + +[Color5] +Bold=true +Color=225,30,225 +Transparency=false + +[Color5Intense] +Bold=true +Color=30,144,255 +Transparency=false + +[Color6] +Bold=true +Color=24,178,178 +Transparency=false + +[Color6Intense] +Bold=true +Color=253,246,227 +Transparency=false + +[Color7] +Bold=true +Color=238,232,213 +Transparency=false + +[Color7Intense] +Bold=true +Color=255,255,255 +Transparency=false + +[Foreground] +Bold=true +Color=0,205,0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=0,205,0 +Transparency=false + +[General] +Description=Green on Black +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/DarkPastels.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/DarkPastels.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/DarkPastels.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/DarkPastels.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,103 @@ +[Background] +Bold=false +Color=44,44,44 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=44,44,44 +Transparency=false + +[Color0] +Bold=false +Color=63,63,63 +Transparency=false + +[Color0Intense] +Bold=true +Color=112,144,128 +Transparency=false + +[Color1] +Bold=false +Color=112,80,80 +Transparency=false + +[Color1Intense] +Bold=true +Color=220,163,163 +Transparency=false + +[Color2] +Bold=false +Color=96,180,138 +Transparency=false + +[Color2Intense] +Bold=true +Color=114,213,163 +Transparency=false + +[Color3] +Bold=false +Color=223,175,143 +Transparency=false + +[Color3Intense] +Bold=true +Color=240,223,175 +Transparency=false + +[Color4] +Bold=false +Color=154,184,215 +Transparency=false + +[Color4Intense] +Bold=true +Color=148,191,243 +Transparency=false + +[Color5] +Bold=false +Color=220,140,195 +Transparency=false + +[Color5Intense] +Bold=true +Color=236,147,211 +Transparency=false + +[Color6] +Bold=false +Color=140,208,211 +Transparency=false + +[Color6Intense] +Bold=true +Color=147,224,227 +Transparency=false + +[Color7] +Bold=false +Color=220,220,204 +Transparency=false + +[Color7Intense] +Bold=true +Color=255,255,255 +Transparency=false + +[Foreground] +Bold=false +Color=220,220,204 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=220,220,204 +Transparency=false + +[General] +Description=Dark Pastels +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/GreenOnBlack.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/GreenOnBlack.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/GreenOnBlack.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/GreenOnBlack.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ + +[Background] +Bold=false +Color=0,0,0 +Transparency=false + +[BackgroundIntense] +Bold=false +Color=0,0,0 +Transparency=false + +[Color0] +Bold=false +Color=0,0,0 +Transparency=false + +[Color0Intense] +Bold=false +Color=104,104,104 +Transparency=false + +[Color1] +Bold=false +Color=250,75,75 +Transparency=false + +[Color1Intense] +Bold=false +Color=255,84,84 +Transparency=false + +[Color2] +Bold=false +Color=24,178,24 +Transparency=false + +[Color2Intense] +Bold=false +Color=84,255,84 +Transparency=false + +[Color3] +Bold=false +Color=178,104,24 +Transparency=false + +[Color3Intense] +Bold=false +Color=255,255,84 +Transparency=false + +[Color4] +Bold=false +Color=92,167,251 +Transparency=false + +[Color4Intense] +Bold=false +Color=84,84,255 +Transparency=false + +[Color5] +Bold=false +Color=225,30,225 +Transparency=false + +[Color5Intense] +Bold=false +Color=255,84,255 +Transparency=false + +[Color6] +Bold=false +Color=24,178,178 +Transparency=false + +[Color6Intense] +Bold=false +Color=84,255,255 +Transparency=false + +[Color7] +Bold=false +Color=178,178,178 +Transparency=false + +[Color7Intense] +Bold=false +Color=255,255,255 +Transparency=false + +[Foreground] +Bold=false +Color=24,240,24 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=24,240,24 +Transparency=false + +[General] +Description=Green on Black +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/BlackOnLightColor.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/BlackOnLightColor.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/BlackOnLightColor.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/BlackOnLightColor.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Black on Light Color + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +rcolor 1 30 255 1 0 # regular background color (Light Color) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 221 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/DarkPicture.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/DarkPicture.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/DarkPicture.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/DarkPicture.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Marble + +image tile Blkmarble.jpg + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 255 255 255 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 1 # intensive foreground color +color 11 0 0 0 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Example.Schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Example.Schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Example.Schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Example.Schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Ugly 1 + +# add a wallpaper, if you like. Second word one of { tile,center,full } + +image tile /opt/kde/share/wallpapers/dancy_pants.jpg + + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 255 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 255 0 0 0 0 # regular color 1 Red +color 4 0 255 0 0 0 # regular color 2 Green +color 5 255 255 0 0 0 # regular color 3 Yellow +color 6 0 0 255 0 0 # regular color 4 Blue +color 7 255 0 255 0 0 # regular color 5 Magenta +color 8 0 255 255 0 0 # regular color 6 Cyan +color 9 255 255 255 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 255 1 1 # intensive background color + +color 12 0 0 0 0 1 # intensive color 0 +color 13 255 0 0 0 1 # intensive color 1 +color 14 0 255 0 0 1 # intensive color 2 +color 15 255 255 0 0 1 # intensive color 3 +color 16 0 0 255 0 1 # intensive color 4 +color 17 255 0 255 0 1 # intensive color 5 +color 18 0 255 255 0 1 # intensive color 6 +color 19 255 255 255 0 1 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenOnBlack.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenOnBlack.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenOnBlack.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenOnBlack.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Green on Black + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 24 240 24 0 0 # regular foreground color (Green) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 24 240 24 0 1 # intensive foreground color +color 11 0 0 0 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint_MC.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint_MC.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint_MC.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint_MC.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +# linux color schema for konsole + +title Green Tint with Transparent MC + +transparency 0.3 0 150 0 + +# FIXME +# +# The flaw in this schema is that "blick" comes out on the +# Linux console as intensive background, really. +# Since this is not used in clients you'll hardly notice +# it in practice. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 178 178 178 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 0 0 0 1 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/GreenTint.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +# linux color schema for konsole + +title Green Tint + +transparency 0.3 0 150 0 + +# FIXME +# +# The flaw in this schema is that "blick" comes out on the +# Linux console as intensive background, really. +# Since this is not used in clients you'll hardly notice +# it in practice. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 178 178 178 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/LightPicture.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/LightPicture.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/LightPicture.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/LightPicture.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title Paper + +image tile Paper01.jpg + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 255 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 255 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Linux.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Linux.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Linux.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Linux.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +# linux color schema for konsole + +title Linux Colors + +# FIXME +# +# The flaw in this schema is that "blick" comes out on the +# Linux console as intensive background, really. +# Since this is not used in clients you'll hardly notice +# it in practice. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 178 178 178 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/README.default.Schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/README.default.Schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/README.default.Schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/README.default.Schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +# default scheme for konsole (only here for documentation purposes) + +# the title is to appear in the menu. + +title Konsole Defaults + +# image tile /opt/kde/share/wallpapers/gray2.jpg + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 255 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 255 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/README.Schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/README.Schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/README.Schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/README.Schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,132 @@ +[README.Schema] + +The schemata offered in the Options/Schema menu are +taken from from configurations files with a *.schema +pattern either located in $KDEDIR/share/apps/konsole +or ~/.kde/share/apps/konsole. + +Schemata allow to configure the color set that konsole +uses, together with some more information on rendition +processing. + +Syntax + + File + :: { [Line] ['#' Comment] '\n' } + + Line + :: "title" Title + :: "image" Usage PathToPictureFile + :: "transparency" Fade Red Green Blue + :: "color" Slot Red Green Blue Transparent Bold + :: "rcolor" Slot Saturation Value Transparent Bold + :: "sysfg" Slot Transparent Bold + :: "sysbg" Slot Transparent Bold + +Meaning + + - Title is the text to appear in the Option/Schema menu. + It should be unique among all other schemata therefore. + + - The "image" clause allows to place an image on the + konsole's background. + + - Usage can be either + - "tile" - the image is tilewise replicated. + - "center" - the image is centered. + - "full" - the image is stretched to fit the window size. + + - The Path of the picture can both be relative + (to kde wallpapers) or absolute. + + When a schema uses a background image (or transparency) + one has to make at least one color slot transparent to + achive any visible effect. Please read below about the + "Transparent" field in color,sysbg,sysfg. + + - The "transparency" clause picks and uses the background + of the desktop as if it where an image together with + a fade effect. This effect will fade the background + to the specified color. + + The "Fade" is a real value between 0 and 1, indicating + the strength of the fade. A value of 0 will not change + the image, a value of 1 will make it the fade color + everywhere, and in between. This will make the "glas" + of the window be of the color given in the clause and + being more(1) or less(0) intransparent. + + - The remaining clauses (color,sysbg,sysfg) are used + to setup konsoles rendition system. + + To this end, konsole offers 20 color slots. + + Slot Meaning + ----- -------------------------- + 0 regular foreground color + 1 regular background color + 2-9 regular bgr color 0-7 + 10 intensive foreground color + 11 intensive background color + 12-19 intensive bgr color 0-7 + + The traditional meaning of the "bgr" color codes + has a bitwise interpretation of an additive three + primary color scheme inherited from early EGA + color terminals. + + Color Bits Colors + ----- ---- ------- + 0 000 Black + 1 001 Red + 2 010 Green + 3 011 Yellow + 4 100 Blue + 5 101 Magenta + 6 110 Cyan + 7 111 White + + One may or may not stick to this tradition. + Konsole allows to assign colors freely to slots. + + The slots fall apart into two groups, regular + and intensive colors. The later are used when + BOLD rendition is used by the client. + + Each of the groups have a default fore- and + background color and the said bgr colors. + Normal terminal processing will simply use + the default colors. + + The color desired for a slot is indicated + in the Red Green Blue fields of the color + clause. Use the sysfg or the sysbg clause + to indicate the default fore and background + colors of the desktop. + + To specify randomized color for a slot use + the clause rcolor. The two parameters to it + being Saturation - the amount of colour, + and Value, the darkness of the colour. + + To use transparency/images and to simulate + the behavior of the xterm, one can supply + two additional tags to each slot: + - Transparent (0/1) meaning to show the + background picture, if any. + - Bold (0/1) to render characters bold. + + +If you know about the escape codes, you might have +noticed that intensive and bold rendition are sort +of confused. This is inherited by the xterm which +konsole is simulating. + +One can use the colortest.sh script supplied +with the konsole source distribution to test +a schema. + +The schema installed with konsole are more or +less demonstrations and not really beauty, +beside the Linux.schema, perhaps, which is +made after the VGA colors. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/syscolor.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/syscolor.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/syscolor.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/syscolor.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +# schema that uses system colors + +# the title is to appear in the menu. + +title System Colors + +# image none + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +sysfg 0 0 0 # regular foreground color (system) +sysbg 1 1 0 # regular background color (system) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 1 # intensive foreground color +color 11 255 255 255 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_darkbg.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_darkbg.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_darkbg.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_darkbg.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# linux color schema for konsole + +title Transparent, Dark Background + +transparency 0.75 0 0 0 + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 255 255 255 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_lightbg.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_lightbg.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_lightbg.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_lightbg.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,51 @@ +# linux color schema for konsole + +title Transparent, Light Background + +transparency 0.1 0 0 0 + +# This is a schema for very light backgrounds. It makes some +# hacks about the colors to make Midnight Commander transparent +# and with suitable colors. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 50 50 50 0 0 # regular foreground color (DarkGray) +color 1 200 200 200 1 0 # regular background color (White) + +# color 2 0 0 0 0 0 # regular color 0 Black +color 2 200 200 200 1 0 # regular background color (White) +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +#color 6 24 24 178 0 0 # regular color 4 Blue +color 6 0 0 0 1 0 # regular color 4 Blue +# Blue is transparent, to make MC transparent + +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +# color 9 178 178 178 0 0 # regular color 7 White +color 9 50 50 50 0 0 # regular foreground color (DarkGray) + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 0 0 0 0 0 # intensive foreground color +color 11 255 255 255 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_MC.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_MC.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_MC.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent_MC.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,51 @@ +# linux color schema for konsole + +title Transparent for MC + +transparency 0.35 0 0 0 + +# FIXME +# +# The flaw in this schema is that "blick" comes out on the +# Linux console as intensive background, really. +# Since this is not used in clients you'll hardly notice +# it in practice. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 178 178 178 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +#color 6 24 24 178 0 0 # regular color 4 Blue +color 6 0 0 0 1 0 # regular color 4 Blue + +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/Transparent.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +# linux color schema for konsole + +title Transparent Konsole + +transparency 0.35 0 0 0 + +# FIXME +# +# The flaw in this schema is that "blick" comes out on the +# Linux console as intensive background, really. +# Since this is not used in clients you'll hardly notice +# it in practice. + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 178 178 178 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 0 # intensive foreground color +color 11 104 104 104 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/vim.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/vim.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/vim.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/vim.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,40 @@ +# VIM-recommended color schema for konsole + +# VIM (VI improved) in "help xiterm" recommends these colors for xterm. + +title VIM Colors + +# foreground colors ------------------------------- + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 255 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 192 0 0 0 0 # regular color 1 Red +color 4 0 128 0 0 0 # regular color 2 Green +color 5 128 128 0 0 0 # regular color 3 Yellow +color 6 0 0 192 0 0 # regular color 4 Blue +color 7 192 0 192 0 0 # regular color 5 Magenta +color 8 0 128 128 0 0 # regular color 6 Cyan +color 9 192 192 192 0 0 # regular color 7 White + +# intensive colors ------------------------------------------- + +color 10 77 77 77 0 1 # intensive foreground color +color 11 255 255 255 1 1 # intensive background color + +color 12 128 128 128 0 0 # intensive color 0 +color 13 255 96 96 0 0 # intensive color 1 +color 14 0 255 0 0 0 # intensive color 2 +color 15 255 255 0 0 0 # intensive color 3 +color 16 128 128 255 0 0 # intensive color 4 +color 17 255 64 255 0 0 # intensive color 5 +color 18 0 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/XTerm.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/XTerm.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/historic/XTerm.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/historic/XTerm.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,46 @@ +# xterm color schema for konsole + +# xterm colors can be configured (almost) like +# konsole colors can. This is the uncustomized +# xterm schema. +# Please refere to your local xterm setup files +# if this schema differs. + +title XTerm Colors + +# foreground colors ------------------------------- + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | red grn blu | | +# V V--color--V V V + +color 0 0 0 0 0 0 # regular foreground color (Black) +color 1 255 255 255 1 0 # regular background color (White) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 205 0 0 0 0 # regular color 1 Red +color 4 0 205 0 0 0 # regular color 2 Green +color 5 205 205 0 0 0 # regular color 3 Yellow +color 6 0 0 205 0 0 # regular color 4 Blue +color 7 205 0 205 0 0 # regular color 5 Magenta +color 8 0 205 205 0 0 # regular color 6 Cyan +color 9 229 229 229 0 0 # regular color 7 White + +# intensive colors ------------------------------------------- + +# for some strange reason, intensive colors are bold, also. + +color 10 77 77 77 0 1 # intensive foreground color +color 11 255 255 255 1 1 # intensive background color + +color 12 77 77 77 0 1 # intensive color 0 +color 13 255 0 0 0 1 # intensive color 1 +color 14 0 255 0 0 1 # intensive color 2 +color 15 255 255 0 0 1 # intensive color 3 +color 16 0 0 255 0 1 # intensive color 4 +color 17 255 0 255 0 1 # intensive color 5 +color 18 0 255 255 0 1 # intensive color 6 +color 19 255 255 255 0 1 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Light.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Light.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Light.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Light.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ + +[Background] +Bold=true +Color=248,248,248 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=255,255,255 +Transparency=false + +[Color0] +Bold=true +Color=0,0,0 +Transparency=false + +[Color0Intense] +Bold=true +Color=104,104,104 +Transparency=false + +[Color1] +Bold=true +Color=178,24,24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255,84,84 +Transparency=false + +[Color2] +Bold=true +Color=24,178,24 +Transparency=false + +[Color2Intense] +Bold=true +Color=133,153,0 +Transparency=false + +[Color3] +Bold=true +Color=178,104,24 +Transparency=false + +[Color3Intense] +Bold=true +Color=233,233,79 +Transparency=false + +[Color4] +Bold=true +Color=24,24,178 +Transparency=false + +[Color4Intense] +Bold=true +Color=52,101,164 +Transparency=false + +[Color5] +Bold=true +Color=225,30,225 +Transparency=false + +[Color5Intense] +Bold=true +Color=30,144,255 +Transparency=false + +[Color6] +Bold=true +Color=24,178,178 +Transparency=false + +[Color6Intense] +Bold=true +Color=24,178,178 +Transparency=false + +[Color7] +Bold=true +Color=238,232,213 +Transparency=false + +[Color7Intense] +Bold=true +Color=238,232,213 +Transparency=false + +[Foreground] +Bold=true +Color=0,0,0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=0,0,0 +Transparency=false + +[General] +Description=Green on Black +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Linux.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Linux.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Linux.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Linux.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,100 @@ +[Background] +Bold=false +Color=0,0,0 + +[BackgroundIntense] +Bold=false +Color=104,104,104 + +[Color0] +Bold=false +Color=0,0,0 + + +[Color0Intense] +Bold=false +Color=104,104,104 + + +[Color1] +Bold=false +Color=178,24,24 + + +[Color1Intense] +Bold=false +Color=255,84,84 + + +[Color2] +Bold=false +Color=24,178,24 + + +[Color2Intense] +Bold=false +Color=84,255,84 + + +[Color3] +Bold=false +Color=178,104,24 + + +[Color3Intense] +Bold=false +Color=255,255,84 + + +[Color4] +Bold=false +Color=24,24,178 + + +[Color4Intense] +Bold=false +Color=84,84,255 + + +[Color5] +Bold=false +Color=178,24,178 + + +[Color5Intense] +Bold=false +Color=255,84,255 + + +[Color6] +Bold=false +Color=24,178,178 + + +[Color6Intense] +Bold=false +Color=84,255,255 + + +[Color7] +Bold=false +Color=178,178,178 + + +[Color7Intense] +Bold=false +Color=255,255,255 + + +[Foreground] +Bold=false +Color=178,178,178 + + +[ForegroundIntense] +Bold=false +Color=255,255,255 + + +[General] +Description=Linux Colors diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Solarized.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Solarized.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Solarized.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Solarized.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,93 @@ +[Color0] +Color=7,54,66 + +[Color0Intense] +Color=0,43,54 + +[Color0Faint] +Color=6,48,59 + +[Color1] +Color=220,50,47 + +[Color1Intense] +Color=203,75,22 + +[Color1Faint] +Color=147,33,31 + +[Color2] +Color=133,153,0 + +[Color2Intense] +Color=88,110,117 + +[Color2Faint] +Color=94,106,0 + +[Color3] +Color=181,137,0 + +[Color3Intense] +Color=101,123,131 + +[Color3Faint] +Color=138,103,0 + +[Color4] +Color=38,139,210 + +[Color4Intense] +Color=131,148,150 + +[Color4Faint] +Color=20,77,115 + +[Color5] +Color=211,54,130 + +[Color5Intense] +Color=108,113,196 + +[Color5Faint] +Color=120,30,75 + +[Color6] +Color=42,161,152 + +[Color6Intense] +Color=147,161,161 + +[Color6Faint] +Color=24,94,88 + +[Color7] +Color=238,232,213 + +[Color7Intense] +Color=253,246,227 + +[Color7Faint] +Color=171,167,154 + +[Background] +Color=0,43,54 + +[BackgroundIntense] +Color=7,54,66 + +[BackgroundFaint] +Color=0,43,54 + +[Foreground] +Color=131,148,150 + +[ForegroundIntense] +Color=147,161,161 + +[ForegroundFaint] +Color=106,119,121 + +[General] +Description=Solarized +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/SolarizedLight.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/SolarizedLight.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/SolarizedLight.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/SolarizedLight.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,93 @@ +[Color0] +Color=7,54,66 + +[Color0Intense] +Color=0,43,54 + +[Color0Faint] +Color=8,65,80 + +[Color1] +Color=220,50,47 + +[Color1Intense] +Color=203,75,22 + +[Color1Faint] +Color=222,81,81 + +[Color2] +Color=133,153,0 + +[Color2Intense] +Color=88,110,117 + +[Color2Faint] +Color=153,168,39 + +[Color3] +Color=181,137,0 + +[Color3Intense] +Color=101,123,131 + +[Color3Faint] +Color=213,170,49 + +[Color4] +Color=38,139,210 + +[Color4Intense] +Color=131,148,150 + +[Color4Faint] +Color=80,173,226 + +[Color5] +Color=211,54,130 + +[Color5Intense] +Color=108,113,196 + +[Color5Faint] +Color=223,92,158 + +[Color6] +Color=42,161,152 + +[Color6Intense] +Color=147,161,161 + +[Color6Faint] +Color=78,211,200 + +[Color7] +Color=238,232,213 + +[Color7Intense] +Color=253,246,227 + +[Color7Faint] +Color=238,232,213 + +[Background] +Color=253,246,227 + +[BackgroundIntense] +Color=238,232,213 + +[BackgroundFaint] +Color=253,246,227 + +[Foreground] +Color=101,123,131 + +[ForegroundIntense] +Color=88,110,117 + +[ForegroundFaint] +Color=141,172,182 + +[General] +Description=Solarized Light +Opacity=1 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Tango.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Tango.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Tango.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Tango.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,71 @@ +[General] +Description=Tango + +[Background] +Color=0,0,0 + +[BackgroundIntense] +Color=104,104,104 + +[Foreground] +;Color=211,215,207 +Color=255,255,255 + +[ForegroundIntense] +Color=255,255,255 + +; black +[Color0] +Color=0,0,0 + +[Color0Intense] +Color=85,87,83 + +; red +[Color1] +Color=204,0,0 + +[Color1Intense] +Color=239,41,41 + +; green +[Color2] +Color=78,154,6 + +[Color2Intense] +Color=138,226,52 + +; yellow +[Color3] +Color=196,160,0 + +[Color3Intense] +Color=252,233,79 + +; blue +[Color4] +Color=52,101,164 + +[Color4Intense] +Color=114,159,207 + +; magenta +[Color5] +Color=117,80,123 + +[Color5Intense] +Color=173,127,168 + +; aqua +[Color6] +Color=6,152,154 + +[Color6Intense] +Color=52,226,226 + +; grey +[Color7] +Color=211,215,207 + +[Color7Intense] +Color=238,238,236 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme10.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme10.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme10.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme10.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Light Mode Color +Name=one light + +[Background] +Bold=true +Color=248, 248, 248 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=248, 248, 248 +Transparency=false + +[Color0] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color0Intense] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=65, 147, 62 +Transparency=false + +[Color3] +Bold=true +Color=133, 85, 4 +Transparency=false + +[Color3Intense] +Bold=true +Color=133, 85, 4 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=49, 94, 238 +Transparency=false + +[Color5] +Bold=true +Color=147, 0, 146 +Transparency=false + +[Color5Intense] +Bold=true +Color=147, 0, 146 +Transparency=false + +[Color6] +Bold=true +Color=14, 111, 173 +Transparency=false + +[Color6Intense] +Bold=true +Color=14, 111, 173 +Transparency=false + +[Color7] +Bold=true +Color=142, 143, 150 +Transparency=false + +[Color7Intense] +Bold=true +Color=142, 143, 150 +Transparency=false + +[Foreground] +Bold=true +Color=0, 0, 0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=0, 0, 0 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme1.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme1.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme1.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme1.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=elementary + +[Background] +Bold=true +Color=16, 16, 16 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=16, 16, 16 +Transparency=false + +[Color0] +Bold=true +Color=48, 48, 48 +Transparency=false + +[Color0Intense] +Bold=true +Color=48, 48, 48 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=106, 176, 23 +Transparency=false + +[Color3] +Bold=true +Color=255, 192, 5 +Transparency=false + +[Color3Intense] +Bold=true +Color=255, 192, 5 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=0, 79, 158 +Transparency=false + +[Color5] +Bold=true +Color=236, 0, 72 +Transparency=false + +[Color5Intense] +Bold=true +Color=236, 0, 72 +Transparency=false + +[Color6] +Bold=true +Color=42, 167, 231 +Transparency=false + +[Color6Intense] +Bold=true +Color=42, 167, 231 +Transparency=false + +[Color7] +Bold=true +Color=242, 242, 242 +Transparency=false + +[Color7Intense] +Bold=true +Color=242, 242, 242 +Transparency=false + +[Foreground] +Bold=true +Color=242, 242, 242 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=242, 242, 242 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme2.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme2.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme2.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme2.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=empathy + +[Background] +Bold=true +Color=49, 9, 36 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=49, 9, 36 +Transparency=false + +[Color0] +Bold=true +Color=46, 52, 54 +Transparency=false + +[Color0Intense] +Bold=true +Color=46, 52, 54 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=78, 154, 6 +Transparency=false + +[Color3] +Bold=true +Color=223, 216, 65 +Transparency=false + +[Color3Intense] +Bold=true +Color=223, 216, 65 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=46, 100, 166 +Transparency=false + +[Color5] +Bold=true +Color=117, 80, 123 +Transparency=false + +[Color5Intense] +Bold=true +Color=117, 80, 123 +Transparency=false + +[Color6] +Bold=true +Color=134, 188, 38 +Transparency=false + +[Color6Intense] +Bold=true +Color=134, 188, 38 +Transparency=false + +[Color7] +Bold=true +Color=211, 215, 207 +Transparency=false + +[Color7Intense] +Bold=true +Color=211, 215, 207 +Transparency=false + +[Foreground] +Bold=true +Color=198, 174, 190 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=198, 174, 190 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme3.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme3.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme3.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme3.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=tomorrow night blue + +[Background] +Bold=true +Color=29, 31, 33 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=29, 31, 33 +Transparency=false + +[Color0] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color0Intense] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=181, 189, 104 +Transparency=false + +[Color3] +Bold=true +Color=240, 198, 116 +Transparency=false + +[Color3Intense] +Bold=true +Color=240, 198, 116 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=129, 162, 190 +Transparency=false + +[Color5] +Bold=true +Color=178, 147, 187 +Transparency=false + +[Color5Intense] +Bold=true +Color=178, 147, 187 +Transparency=false + +[Color6] +Bold=true +Color=138, 190, 183 +Transparency=false + +[Color6Intense] +Bold=true +Color=138, 190, 183 +Transparency=false + +[Color7] +Bold=true +Color=255, 254, 254 +Transparency=false + +[Color7Intense] +Bold=true +Color=255, 254, 254 +Transparency=false + +[Foreground] +Bold=true +Color=141, 178, 172 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=141, 178, 172 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme4.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme4.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme4.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme4.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=bim + +[Background] +Bold=true +Color=1, 40, 73 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=1, 40, 73 +Transparency=false + +[Color0] +Bold=true +Color=44, 36, 35 +Transparency=false + +[Color0Intense] +Bold=true +Color=44, 36, 35 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=169, 238, 85 +Transparency=false + +[Color3] +Bold=true +Color=245, 162, 85 +Transparency=false + +[Color3Intense] +Bold=true +Color=245, 162, 85 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=94, 162, 236 +Transparency=false + +[Color5] +Bold=true +Color=169, 87, 236 +Transparency=false + +[Color5Intense] +Bold=true +Color=169, 87, 236 +Transparency=false + +[Color6] +Bold=true +Color=94, 238, 160 +Transparency=false + +[Color6Intense] +Bold=true +Color=94, 238, 160 +Transparency=false + +[Color7] +Bold=true +Color=145, 137, 136 +Transparency=false + +[Color7Intense] +Bold=true +Color=145, 137, 136 +Transparency=false + +[Foreground] +Bold=true +Color=255, 213, 0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=255, 213, 0 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme5.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme5.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme5.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme5.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=freya + +[Background] +Bold=true +Color=0, 0, 0 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color0] +Bold=true +Color=7, 54, 66 +Transparency=false + +[Color0Intense] +Bold=true +Color=7, 54, 66 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=133, 153, 0 +Transparency=false + +[Color3] +Bold=true +Color=181, 137, 0 +Transparency=false + +[Color3Intense] +Bold=true +Color=181, 137, 0 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=38, 139, 210 +Transparency=false + +[Color5] +Bold=true +Color=236, 0, 72 +Transparency=false + +[Color5Intense] +Bold=true +Color=236, 0, 72 +Transparency=false + +[Color6] +Bold=true +Color=42, 161, 152 +Transparency=false + +[Color6Intense] +Bold=true +Color=42, 161, 152 +Transparency=false + +[Color7] +Bold=true +Color=148, 163, 165 +Transparency=false + +[Color7Intense] +Bold=true +Color=148, 163, 165 +Transparency=false + +[Foreground] +Bold=true +Color=35, 181, 211 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=35, 181, 211 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme6.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme6.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme6.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme6.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=hybrid + +[Background] +Bold=true +Color=20, 20, 20 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=20, 20, 20 +Transparency=false + +[Color0] +Bold=true +Color=40, 42, 46 +Transparency=false + +[Color0Intense] +Bold=true +Color=40, 42, 46 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=140, 148, 64 +Transparency=false + +[Color3] +Bold=true +Color=222, 147, 95 +Transparency=false + +[Color3Intense] +Bold=true +Color=222, 147, 95 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=95, 129, 157 +Transparency=false + +[Color5] +Bold=true +Color=133, 103, 143 +Transparency=false + +[Color5Intense] +Bold=true +Color=133, 103, 143 +Transparency=false + +[Color6] +Bold=true +Color=94, 141, 135 +Transparency=false + +[Color6Intense] +Bold=true +Color=94, 141, 135 +Transparency=false + +[Color7] +Bold=true +Color=150, 152, 150 +Transparency=false + +[Color7Intense] +Bold=true +Color=150, 152, 150 +Transparency=false + +[Foreground] +Bold=true +Color=254, 144, 0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=254, 144, 0 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme7.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme7.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme7.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme7.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=ocean dark + +[Background] +Bold=true +Color=28, 31, 39 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=28, 31, 39 +Transparency=false + +[Color0] +Bold=true +Color=79, 79, 79 +Transparency=false + +[Color0Intense] +Bold=true +Color=79, 79, 79 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=175, 211, 131 +Transparency=false + +[Color3] +Bold=true +Color=229, 192, 121 +Transparency=false + +[Color3Intense] +Bold=true +Color=229, 192, 121 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=125, 144, 164 +Transparency=false + +[Color5] +Bold=true +Color=164, 121, 157 +Transparency=false + +[Color5Intense] +Bold=true +Color=164, 121, 157 +Transparency=false + +[Color6] +Bold=true +Color=133, 166, 165 +Transparency=false + +[Color6Intense] +Bold=true +Color=133, 166, 165 +Transparency=false + +[Color7] +Bold=true +Color=238, 237, 238 +Transparency=false + +[Color7Intense] +Bold=true +Color=238, 237, 238 +Transparency=false + +[Foreground] +Bold=true +Color=99, 124, 206 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=99, 124, 206 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme8.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme8.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme8.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme8.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Dark Mode Color +Name=deepin + +[Background] +Bold=true +Color=0, 0, 0 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color0] +Bold=true +Color=7, 54, 66 +Transparency=false + +[Color0Intense] +Bold=true +Color=7, 54, 66 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color2Intense] +Bold=true +Color=133, 153, 0 +Transparency=false + +[Color3] +Bold=true +Color=181, 137, 0 +Transparency=false + +[Color3Intense] +Bold=true +Color=181, 137, 0 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=52, 101, 164 +Transparency=false + +[Color5] +Bold=true +Color=211, 54, 130 +Transparency=false + +[Color5Intense] +Bold=true +Color=211, 54, 130 +Transparency=false + +[Color6] +Bold=true +Color=42, 161, 152 +Transparency=false + +[Color6Intense] +Bold=true +Color=42, 161, 152 +Transparency=false + +[Color7] +Bold=true +Color=238, 232, 213 +Transparency=false + +[Color7Intense] +Bold=true +Color=238, 232, 213 +Transparency=false + +[Foreground] +Bold=true +Color=0, 205, 0 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=0, 205, 0 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme9.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme9.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Theme9.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Theme9.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +[General] +Description=Deepin Terminal Light Mode Color +Name=ura + +[Background] +Bold=true +Color=254, 255, 238 +Transparency=false + +[BackgroundIntense] +Bold=true +Color=254, 255, 238 +Transparency=false + +[Color0] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color0Intense] +Bold=true +Color=0, 0, 0 +Transparency=false + +[Color1] +Bold=true +Color=178, 24, 24 +Transparency=false + +[Color1Intense] +Bold=true +Color=255, 84, 84 +Transparency=false + +[Color2] +Bold=true +Color=111, 194, 27 +Transparency=false + +[Color2Intense] +Bold=true +Color=24, 178, 24 +Transparency=false + +[Color3] +Bold=true +Color=194, 111, 27 +Transparency=false + +[Color3Intense] +Bold=true +Color=194, 111, 27 +Transparency=false + +[Color4] +Bold=true +Color=24, 24, 178 +Transparency=false + +[Color4Intense] +Bold=true +Color=27, 111, 194 +Transparency=false + +[Color5] +Bold=true +Color=111, 27, 194 +Transparency=false + +[Color5Intense] +Bold=true +Color=111, 27, 194 +Transparency=false + +[Color6] +Bold=true +Color=27, 194, 111 +Transparency=false + +[Color6Intense] +Bold=true +Color=27, 194, 111 +Transparency=false + +[Color7] +Bold=true +Color=128, 128, 128 +Transparency=false + +[Color7Intense] +Bold=true +Color=128, 128, 128 +Transparency=false + +[Foreground] +Bold=true +Color=57, 53, 44 +Transparency=false + +[ForegroundIntense] +Bold=true +Color=57, 53, 44 +Transparency=false + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Ubuntu.colorscheme deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Ubuntu.colorscheme --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/Ubuntu.colorscheme 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/Ubuntu.colorscheme 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,67 @@ +[General] +Description=Ubuntu +Opacity=1 +Wallpaper= + +[Background] +Color=48,10,36 +MaxRandomHue=0 +MaxRandomSaturation=0 +MaxRandomValue=0 + +[BackgroundIntense] +Color=48,10,36 + +[Color0] +Color=46,52,54 + +[Color0Intense] +Color=85,87,83 + +[Color1] +Color=204,0,0 + +[Color1Intense] +Color=239,41,41 + +[Color2] +Color=78,154,6 + +[Color2Intense] +Color=138,226,52 + +[Color3] +Color=196,160,0 + +[Color3Intense] +Color=252,233,79 + +[Color4] +Color=52,101,164 + +[Color4Intense] +Color=114,159,207 + +[Color5] +Color=117,80,123 + +[Color5Intense] +Color=173,127,168 + +[Color6] +Color=6,152,154 + +[Color6Intense] +Color=52,226,226 + +[Color7] +Color=211,215,207 + +[Color7Intense] +Color=238,238,236 + +[Foreground] +Color=238,238,236 + +[ForegroundIntense] +Color=238,238,236 \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/WhiteOnBlack.schema deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/WhiteOnBlack.schema --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/color-schemes/WhiteOnBlack.schema 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/color-schemes/WhiteOnBlack.schema 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +# example scheme for konsole + +# the title is to appear in the menu. + +title White on Black + +# foreground colors + +# note that the default background color is flagged +# to become transparent when an image is present. + +# slot transparent bold +# | | | +# V V--color--V V V + +color 0 255 255 255 0 0 # regular foreground color (White) +color 1 0 0 0 1 0 # regular background color (Black) + +color 2 0 0 0 0 0 # regular color 0 Black +color 3 178 24 24 0 0 # regular color 1 Red +color 4 24 178 24 0 0 # regular color 2 Green +color 5 178 104 24 0 0 # regular color 3 Yellow +color 6 24 24 178 0 0 # regular color 4 Blue +color 7 178 24 178 0 0 # regular color 5 Magenta +color 8 24 178 178 0 0 # regular color 6 Cyan +color 9 178 178 178 0 0 # regular color 7 White + +# intensive colors + +# instead of changing the colors, we've flaged the text to become bold + +color 10 255 255 255 0 1 # intensive foreground color +color 11 0 0 0 1 0 # intensive background color + +color 12 104 104 104 0 0 # intensive color 0 +color 13 255 84 84 0 0 # intensive color 1 +color 14 84 255 84 0 0 # intensive color 2 +color 15 255 255 84 0 0 # intensive color 3 +color 16 84 84 255 0 0 # intensive color 4 +color 17 255 84 255 0 0 # intensive color 5 +color 18 84 255 255 0 0 # intensive color 6 +color 19 255 255 255 0 0 # intensive color 7 diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorTables.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorTables.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ColorTables.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ColorTables.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,76 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef _COLOR_TABLE_H +#define _COLOR_TABLE_H + +#include "CharacterColor.h" + +//using namespace Konsole; +#if 0 +static const ColorEntry whiteonblack_color_table[TABLE_COLORS] = { + // normal + ColorEntry(QColor(0xFF,0xFF,0xFF), false ), ColorEntry( QColor(0x00,0x00,0x00), true ), // Dfore, Dback + ColorEntry(QColor(0x00,0x00,0x00), false ), ColorEntry( QColor(0xB2,0x18,0x18), false ), // Black, Red + ColorEntry(QColor(0x18,0xB2,0x18), false ), ColorEntry( QColor(0xB2,0x68,0x18), false ), // Green, Yellow + ColorEntry(QColor(0x18,0x18,0xB2), false ), ColorEntry( QColor(0xB2,0x18,0xB2), false ), // Blue, Magenta + ColorEntry(QColor(0x18,0xB2,0xB2), false ), ColorEntry( QColor(0xB2,0xB2,0xB2), false ), // Cyan, White + // intensiv + ColorEntry(QColor(0x00,0x00,0x00), false ), ColorEntry( QColor(0xFF,0xFF,0xFF), true ), + ColorEntry(QColor(0x68,0x68,0x68), false ), ColorEntry( QColor(0xFF,0x54,0x54), false ), + ColorEntry(QColor(0x54,0xFF,0x54), false ), ColorEntry( QColor(0xFF,0xFF,0x54), false ), + ColorEntry(QColor(0x54,0x54,0xFF), false ), ColorEntry( QColor(0xFF,0x54,0xFF), false ), + ColorEntry(QColor(0x54,0xFF,0xFF), false ), ColorEntry( QColor(0xFF,0xFF,0xFF), false ) +}; + +static const ColorEntry greenonblack_color_table[TABLE_COLORS] = { + ColorEntry(QColor( 24, 240, 24), false), ColorEntry(QColor( 0, 0, 0), true), + ColorEntry(QColor( 0, 0, 0), false), ColorEntry(QColor( 178, 24, 24), false), + ColorEntry(QColor( 24, 178, 24), false), ColorEntry(QColor( 178, 104, 24), false), + ColorEntry(QColor( 24, 24, 178), false), ColorEntry(QColor( 178, 24, 178), false), + ColorEntry(QColor( 24, 178, 178), false), ColorEntry(QColor( 178, 178, 178), false), + // intensive colors + ColorEntry(QColor( 24, 240, 24), false ), ColorEntry(QColor( 0, 0, 0), true ), + ColorEntry(QColor( 104, 104, 104), false ), ColorEntry(QColor( 255, 84, 84), false ), + ColorEntry(QColor( 84, 255, 84), false ), ColorEntry(QColor( 255, 255, 84), false ), + ColorEntry(QColor( 84, 84, 255), false ), ColorEntry(QColor( 255, 84, 255), false ), + ColorEntry(QColor( 84, 255, 255), false ), ColorEntry(QColor( 255, 255, 255), false ) +}; + +static const ColorEntry blackonlightyellow_color_table[TABLE_COLORS] = { + ColorEntry(QColor( 0, 0, 0), false), ColorEntry(QColor( 255, 255, 221), true), + ColorEntry(QColor( 0, 0, 0), false), ColorEntry(QColor( 178, 24, 24), false), + ColorEntry(QColor( 24, 178, 24), false), ColorEntry(QColor( 178, 104, 24), false), + ColorEntry(QColor( 24, 24, 178), false), ColorEntry(QColor( 178, 24, 178), false), + ColorEntry(QColor( 24, 178, 178), false), ColorEntry(QColor( 178, 178, 178), false), + ColorEntry(QColor( 0, 0, 0), false), ColorEntry(QColor( 255, 255, 221), true), + ColorEntry(QColor(104, 104, 104), false), ColorEntry(QColor( 255, 84, 84), false), + ColorEntry(QColor( 84, 255, 84), false), ColorEntry(QColor( 255, 255, 84), false), + ColorEntry(QColor( 84, 84, 255), false), ColorEntry(QColor( 255, 84, 255), false), + ColorEntry(QColor( 84, 255, 255), false), ColorEntry(QColor( 255, 255, 255), false) +}; + + +#endif + + +#endif + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/default.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/default.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/default.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/default.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,128 @@ +# [README.default.Keytab] Buildin Keyboard Table +# +# To customize your keyboard, copy this file to something +# ending with .keytab and change it to meet you needs. +# Please read the README.KeyTab and the README.keyboard +# in this case. +# +# -------------------------------------------------------------- + +keyboard "Default (XFree 4)" + +# -------------------------------------------------------------- +# +# Note that this particular table is a "risc" version made to +# ease customization without bothering with obsolete details. +# See VT100.keytab for the more hairy stuff. +# +# -------------------------------------------------------------- + +# common keys + +key Escape : "\E" + +key Tab -Shift : "\t" +key Tab +Shift+Ansi : "\E[Z" +key Tab +Shift-Ansi : "\t" +key Backtab +Ansi : "\E[Z" +key Backtab -Ansi : "\t" + +key Return-Shift-NewLine : "\r" +key Return-Shift+NewLine : "\r\n" + +key Return+Shift : "\EOM" + +# Backspace and Delete codes are preserving CTRL-H. + +key Backspace : "\x7f" + +# Arrow keys in VT52 mode +# shift up/down are reserved for scrolling. +# shift left/right are reserved for switching between tabs (this is hardcoded). + +key Up -Shift-Ansi : "\EA" +key Down -Shift-Ansi : "\EB" +key Right-Shift-Ansi : "\EC" +key Left -Shift-Ansi : "\ED" + +# Arrow keys in ANSI mode with Application - and Normal Cursor Mode) + +key Up -Shift-AnyMod+Ansi+AppCuKeys : "\EOA" +key Down -Shift-AnyMod+Ansi+AppCuKeys : "\EOB" +key Right -Shift-AnyMod+Ansi+AppCuKeys : "\EOC" +key Left -Shift-AnyMod+Ansi+AppCuKeys : "\EOD" + +key Up -Shift-AnyMod+Ansi-AppCuKeys : "\E[A" +key Down -Shift-AnyMod+Ansi-AppCuKeys : "\E[B" +key Right -Shift-AnyMod+Ansi-AppCuKeys : "\E[C" +key Left -Shift-AnyMod+Ansi-AppCuKeys : "\E[D" + +key Up -Shift+AnyMod+Ansi : "\E[1;*A" +key Down -Shift+AnyMod+Ansi : "\E[1;*B" +key Right -Shift+AnyMod+Ansi : "\E[1;*C" +key Left -Shift+AnyMod+Ansi : "\E[1;*D" + +# other grey PC keys + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Home -AnyMod -AppCuKeys : "\E[H" +key End -AnyMod -AppCuKeys : "\E[F" +key Home -AnyMod +AppCuKeys : "\EOH" +key End -AnyMod +AppCuKeys : "\EOF" +key Home +AnyMod : "\E[1;*H" +key End +AnyMod : "\E[1;*F" + +key Insert -AnyMod : "\E[2~" +key Delete -AnyMod : "\E[3~" +key Insert +AnyMod : "\E[2;*~" +key Delete +AnyMod : "\E[3;*~" + +key Prior -Shift-AnyMod : "\E[5~" +key Next -Shift-AnyMod : "\E[6~" +key Prior -Shift+AnyMod : "\E[5;*~" +key Next -Shift+AnyMod : "\E[6;*~" + +# Function keys +key F1 -AnyMod : "\EOP" +key F2 -AnyMod : "\EOQ" +key F3 -AnyMod : "\EOR" +key F4 -AnyMod : "\EOS" +key F5 -AnyMod : "\E[15~" +key F6 -AnyMod : "\E[17~" +key F7 -AnyMod : "\E[18~" +key F8 -AnyMod : "\E[19~" +key F9 -AnyMod : "\E[20~" +key F10 -AnyMod : "\E[21~" +key F11 -AnyMod : "\E[23~" +key F12 -AnyMod : "\E[24~" + +key F1 +AnyMod : "\EO*P" +key F2 +AnyMod : "\EO*Q" +key F3 +AnyMod : "\EO*R" +key F4 +AnyMod : "\EO*S" +key F5 +AnyMod : "\E[15;*~" +key F6 +AnyMod : "\E[17;*~" +key F7 +AnyMod : "\E[18;*~" +key F8 +AnyMod : "\E[19;*~" +key F9 +AnyMod : "\E[20;*~" +key F10 +AnyMod : "\E[21;*~" +key F11 +AnyMod : "\E[23;*~" +key F12 +AnyMod : "\E[24;*~" + +# Work around dead keys + +key Space +Control : "\x00" + +# Some keys are used by konsole to cause operations. +# The scroll* operations refer to the history buffer. + +key Up +Shift-AppScreen : scrollLineUp +key Prior +Shift-AppScreen : scrollPageUp +key Down +Shift-AppScreen : scrollLineDown +key Next +Shift-AppScreen : scrollPageDown + +key ScrollLock : scrollLock + +# keypad characters are not offered differently by Qt. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/DefaultTranslatorText.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/DefaultTranslatorText.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/DefaultTranslatorText.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/DefaultTranslatorText.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,23 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +"keyboard \"Fallback Key Translator\"\n" +"key Tab : \"\\t\" \0" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Emulation.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Emulation.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Emulation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Emulation.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,597 @@ +/* + Copyright 2007-2008 Robert Knight + Copyright 1997,1998 by Lars Doelle + Copyright 1996 by Matthias Ettrich + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "Emulation.h" + +// System +#include +#include +#include +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// KDE +//#include + +// Konsole +#include "KeyboardTranslator.h" +#include "Screen.h" +#include "TerminalCharacterDecoder.h" +#include "ScreenWindow.h" +#include "Session.h" +#include "SessionManager.h" +#include "TerminalDisplay.h" + +using namespace Konsole; + +Emulation::Emulation() : + _currentScreen(nullptr), + _codec(nullptr), + _decoder(nullptr), + _keyTranslator(nullptr), + _usesMouse(false), + _bracketedPasteMode(false) +{ + // create screens with a default size + _screen[0] = new Screen(40, 80); + _screen[1] = new Screen(40, 80); + _currentScreen = _screen[0]; + + QObject::connect(&_bulkTimer1, SIGNAL(timeout()), this, SLOT(showBulk())); + QObject::connect(&_bulkTimer2, SIGNAL(timeout()), this, SLOT(showBulk())); + + // listen for mouse status changes + connect(this, SIGNAL(programUsesMouseChanged(bool)), + SLOT(usesMouseChanged(bool))); + connect(this, SIGNAL(programBracketedPasteModeChanged(bool)), + SLOT(bracketedPasteModeChanged(bool))); + + connect(this, &Emulation::cursorChanged, [this](KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) { + emit titleChanged(50, QString(QLatin1String("CursorShape=%1;BlinkingCursorEnabled=%2")) + .arg(static_cast(cursorShape)).arg(blinkingCursorEnabled)); + }); + /******** Add by ut001000 renfeixiang 2020-07-16:增加初始化保存开始的屏幕行列数 Begin***************/ +// _lastcol = _currentScreen->getColumns(); +// _lastline = _currentScreen->getLines(); + /******** Add by ut001000 renfeixiang 2020-07-16:增加 End***************/ +} + +bool Emulation::programUsesMouse() const +{ + return _usesMouse; +} + +void Emulation::usesMouseChanged(bool usesMouse) +{ + _usesMouse = usesMouse; +} + +bool Emulation::programBracketedPasteMode() const +{ + return _bracketedPasteMode; +} + +void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode) +{ + _bracketedPasteMode = bracketedPasteMode; +} + +ScreenWindow *Emulation::createWindow() +{ + ScreenWindow *window = new ScreenWindow(); + window->setScreen(_currentScreen); + _windows << window; + + connect(window, SIGNAL(selectionChanged()), + this, SLOT(bufferedUpdate())); + + connect(this, SIGNAL(outputChanged()), + window, SLOT(notifyOutputChanged())); + return window; +} + +Emulation::~Emulation() +{ + QListIterator windowIter(_windows); + + while (windowIter.hasNext()) { + delete windowIter.next(); + } + + delete _screen[0]; + delete _screen[1]; + delete _decoder; + + if (nullptr != _keyTranslator) { + delete _keyTranslator; + _keyTranslator = nullptr; + } +} + +void Emulation::setScreen(int n) +{ + Screen *old = _currentScreen; + _currentScreen = _screen[n & 1]; + if (_currentScreen != old) { + // tell all windows onto this emulation to switch to the newly active screen + for (ScreenWindow *window : qAsConst(_windows)) + window->setScreen(_currentScreen); + } +} + +void Emulation::clearHistory() +{ + _screen[0]->setScroll(_screen[0]->getScroll(), false); +} +void Emulation::setHistory(const HistoryType &t) +{ + _screen[0]->setScroll(t); + + showBulk(); +} + +const HistoryType &Emulation::history() const +{ + return _screen[0]->getScroll(); +} + +void Emulation::setCodec(const QTextCodec *qtc) +{ + if (qtc) + _codec = qtc; + else + setCodec(LocaleCodec); + + delete _decoder; + _decoder = _codec->makeDecoder(); + + emit useUtf8Request(utf8()); +} + +void Emulation::setCodec(EmulationCodec codec) +{ + if (codec == Utf8Codec) + setCodec(QTextCodec::codecForName("utf8")); + else if (codec == LocaleCodec) + setCodec(QTextCodec::codecForLocale()); +} + +void Emulation::setSessionId(int sessionId) +{ + _sessionId = sessionId; +} + +void Emulation::setBackspaceMode(char *key, int length) +{ + KeyboardTranslator::Entry entry = _keyTranslator->findEntry( + Qt::Key_Backspace, + Qt::NoModifier, + KeyboardTranslator::NoState); + + KeyboardTranslator::Entry newEntry; + KeyboardTranslator::States flags = KeyboardTranslator::NoState; + KeyboardTranslator::States flagMask = KeyboardTranslator::NoState; + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + Qt::KeyboardModifiers modifierMask = Qt::NoModifier; + KeyboardTranslator::Command command = KeyboardTranslator::NoCommand; + newEntry.setKeyCode(Qt::Key_Backspace); + newEntry.setState(flags); + newEntry.setStateMask(flagMask); + newEntry.setModifiers(modifiers); + newEntry.setModifierMask(modifierMask); + newEntry.setText(QByteArray(key, length)); + newEntry.setCommand(command); + _keyTranslator->replaceEntry(entry, newEntry); +} + +void Emulation::setDeleteMode(char *key, int length) +{ + KeyboardTranslator::Entry entry = _keyTranslator->findEntry( + Qt::Key_Delete, + Qt::NoModifier, + KeyboardTranslator::NoState); + + KeyboardTranslator::Entry newEntry; + KeyboardTranslator::States flags = KeyboardTranslator::NoState; + KeyboardTranslator::States flagMask = KeyboardTranslator::NoState; + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + Qt::KeyboardModifiers modifierMask = Qt::NoModifier; + KeyboardTranslator::Command command = KeyboardTranslator::NoCommand; + newEntry.setKeyCode(Qt::Key_Delete); + newEntry.setState(flags); + newEntry.setStateMask(flagMask); + newEntry.setModifiers(modifiers); + newEntry.setModifierMask(modifierMask); + newEntry.setText(QByteArray(key, length)); + newEntry.setCommand(command); + _keyTranslator->replaceEntry(entry, newEntry); +} + +void Emulation::setKeyBindings(const QString &name) +{ + _keyTranslator = KeyboardTranslatorManager::instance()->getTranslator(name); +} + +QString Emulation::keyBindings() const +{ + return _keyTranslator->name(); +} + +void Emulation::receiveChar(wchar_t c) +// process application unicode input to terminal +// this is a trivial scanner +{ + c &= 0xff; + switch (c) { + case '\b' : _currentScreen->backspace(); break; + case '\t' : _currentScreen->tab(); break; + case '\n' : _currentScreen->newLine(); break; + case '\r' : _currentScreen->toStartOfLine(); break; + case 0x07 : emit stateSet(NOTIFYBELL); + break; + default : _currentScreen->displayCharacter(c); break; + }; +} + +void Emulation::sendKeyEvent(QKeyEvent *ev) +{ + emit stateSet(NOTIFYNORMAL); + + if (!ev->text().isEmpty()) { + // A block of text + // Note that the text is proper unicode. + // We should do a conversion here + emit sendData(ev->text().toUtf8().constData(), ev->text().length(), _codec); + } +} + +void Emulation::sendString(const char *, int) +{ + // default implementation does nothing +} + +void Emulation::sendMouseEvent(int /*buttons*/, int /*column*/, int /*row*/, int /*eventType*/) +{ + // default implementation does nothing +} + +/* + We are doing code conversion from locale to unicode first. +TODO: Character composition from the old code. See #96536 +*/ + +void Emulation::receiveData(const char *text, int length, bool isCommandExec) +{ + emit stateSet(NOTIFYACTIVITY); + + bufferedUpdate(); + + /* XXX: the following code involves encoding & decoding of "UTF-16 + * surrogate pairs", which does not work with characters higher than + * U+10FFFF + * https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates + */ + QString utf16Text = ""; + + if (QString(_codec->name()).toUpper().startsWith("GB") && !isCommandExec) { + if (_decoder != nullptr) { + delete _decoder; + } + QTextCodec *textCodec = QTextCodec::codecForName("UTF-8"); + _decoder = textCodec->makeDecoder(); + utf16Text = _decoder->toUnicode(text, length); + + QTextCodec* gbk = QTextCodec::codecForName(_codec->name()); + QByteArray gbkarr = gbk->fromUnicode(utf16Text); + + if (_decoder != nullptr) { + delete _decoder; + } + textCodec = QTextCodec::codecForName(_codec->name()); + _decoder = textCodec->makeDecoder(); + utf16Text = _decoder->toUnicode(gbkarr); + } + else { + utf16Text = _decoder->toUnicode(text, length); + } + + //fix bug 67102 打开超长名称的文件夹,终端界面光标位置不在最后一位 + //bash 提示符很长的情况下,会有较大概率以五个\b字符结尾,导致光标错位 + if (utf16Text.startsWith("\u001B]0;") && utf16Text.endsWith("\b\b\b\b\b")) { + Session *currSession = SessionManager::instance()->idToSession(_sessionId); + if (currSession && (QStringLiteral("bash") == currSession->foregroundProcessName())) { + utf16Text.replace("\b\b\b\b\b", ""); + } + } + + std::wstring unicodeText = utf16Text.toStdWString(); + + //send characters to terminal emulator + for (size_t i = 0; i < unicodeText.length(); i++) + receiveChar(unicodeText[i]); + + //look for z-modem indicator + //-- someone who understands more about z-modems that I do may be able to move + //this check into the above for loop? + for (int i = 0; i < length; i++) { + if (text[i] == '\030') { + if ((length - i - 1 > 3) && (strncmp(text + i + 1, "B00", 3) == 0)) + emit zmodemDetected(); + } + } +} + +//OLDER VERSION +//This version of onRcvBlock was commented out because +// a) It decoded incoming characters one-by-one, which is slow in the current version of Qt (4.2 tech preview) +// b) It messed up decoding of non-ASCII characters, with the result that (for example) chinese characters +// were not printed properly. +// +//There is something about stopping the _decoder if "we get a control code halfway a multi-byte sequence" (see below) +//which hasn't been ported into the newer function (above). Hopefully someone who understands this better +//can find an alternative way of handling the check. + + +/*void Emulation::onRcvBlock(const char *s, int len) +{ + emit notifySessionState(NOTIFYACTIVITY); + + bufferedUpdate(); + for (int i = 0; i < len; i++) + { + + QString result = _decoder->toUnicode(&s[i],1); + int reslen = result.length(); + + // If we get a control code halfway a multi-byte sequence + // we flush the _decoder and continue with the control code. + if ((s[i] < 32) && (s[i] > 0)) + { + // Flush _decoder + while(!result.length()) + result = _decoder->toUnicode(&s[i],1); + reslen = 1; + result.resize(reslen); + result[0] = QChar(s[i]); + } + + for (int j = 0; j < reslen; j++) + { + if (result[j].characterategory() == QChar::Mark_NonSpacing) + _currentScreen->compose(result.mid(j,1)); + else + onRcvChar(result[j].unicode()); + } + if (s[i] == '\030') + { + if ((len-i-1 > 3) && (strncmp(s+i+1, "B00", 3) == 0)) + emit zmodemDetected(); + } + } +}*/ + +void Emulation::writeToStream(TerminalCharacterDecoder *_decoder, + int startLine, + int endLine) +{ + _currentScreen->writeLinesToStream(_decoder, startLine, endLine); +} + +int Emulation::lineCount() const +{ + // sum number of lines currently on _screen plus number of lines in history + return _currentScreen->getLines() + _currentScreen->getHistLines(); +} + +int Emulation::columnCount() const +{ + return _currentScreen->getColumns(); +} + +#define BULK_TIMEOUT1 10 +#define BULK_TIMEOUT2 40 + +void Emulation::showBulk() +{ + _bulkTimer1.stop(); + _bulkTimer2.stop(); + + emit outputChanged(); + + _currentScreen->resetScrolledLines(); + _currentScreen->resetDroppedLines(); +} + +void Emulation::bufferedUpdate() +{ + _bulkTimer1.setSingleShot(true); + _bulkTimer1.start(BULK_TIMEOUT1); + if (!_bulkTimer2.isActive()) { + _bulkTimer2.setSingleShot(true); + _bulkTimer2.start(BULK_TIMEOUT2); + } +} + +char Emulation::eraseChar() const +{ + return '\b'; +} + +void Emulation::setImageSize(int lines, int columns) +{ + if ((lines < 1) || (columns < 1)) + return; + + QSize screenSize[2] = { QSize(_screen[0]->getColumns(), + _screen[0]->getLines()), + QSize(_screen[1]->getColumns(), + _screen[1]->getLines()) + }; + QSize newSize(columns, lines); + + if (newSize == screenSize[0] && newSize == screenSize[1]) + return; + + _screen[0]->resizeImage(lines, columns); + _screen[1]->resizeImage(lines, columns); + + emit imageSizeChanged(lines, columns); + + bufferedUpdate(); +} + +QSize Emulation::imageSize() const +{ + return {_currentScreen->getColumns(), _currentScreen->getLines()}; +} + +uint ExtendedCharTable::extendedCharHash(uint *unicodePoints, ushort length) const +{ + uint hash = 0; + for (ushort i = 0 ; i < length ; i++) { + hash = 31 * hash + unicodePoints[i]; + } + return hash; +} +bool ExtendedCharTable::extendedCharMatch(uint hash, uint *unicodePoints, ushort length) const +{ + uint *entry = extendedCharTable[hash]; + + // compare given length with stored sequence length ( given as the first ushort in the + // stored buffer ) + if (entry == nullptr || entry[0] != length) + return false; + // if the lengths match, each character must be checked. the stored buffer starts at + // entry[1] + for (int i = 0 ; i < length ; i++) { + if (entry[i + 1] != unicodePoints[i]) + return false; + } + return true; +} + +uint ExtendedCharTable::createExtendedChar(uint *unicodePoints, ushort length) +{ + + // look for this sequence of points in the table + uint hash = extendedCharHash(unicodePoints, length); + const uint initialHash = hash; + bool triedCleaningSolution = false; + + // check existing entry for match + while (extendedCharTable.contains(hash) && hash != 0) { // 0 has a special meaning for chars so we don't use it + if (extendedCharMatch(hash, unicodePoints, length)) { + // this sequence already has an entry in the table, + // return its hash + return hash; + } + // if hash is already used by another, different sequence of unicode character + // points then try next hash + hash++; + + if (hash == initialHash) { + if (!triedCleaningSolution) { + triedCleaningSolution = true; + // All the hashes are full, go to all Screens and try to free any + // This is slow but should happen very rarely + QSet usedExtendedChars; + const QList sessionsList = SessionManager::instance()->sessions(); + for (const Session *s : sessionsList) { + const QList displayList = s->views(); + for (const TerminalDisplay *display : displayList) { + usedExtendedChars += display->screenWindow()->screen()->usedExtendedChars(); + } + } + + QHash::iterator it = extendedCharTable.begin(); + QHash::iterator itEnd = extendedCharTable.end(); + while (it != itEnd) { + if (usedExtendedChars.contains(it.key())) { + ++it; + } else { + it = extendedCharTable.erase(it); + } + } + } else { + qDebug() << "Using all the extended char hashes, going to miss this extended character"; + return 0; + } + } + } + + // add the new sequence to the table and + // return that index + auto buffer = new uint[length + 1]; + buffer[0] = length; + for (int i = 0; i < length; i++) { + buffer[i + 1] = unicodePoints[i]; + } + + extendedCharTable.insert(hash, buffer); + + return hash; +} + +uint *ExtendedCharTable::lookupExtendedChar(uint hash, ushort &length) const +{ + // lookup index in table and if found, set the length + // argument and return a pointer to the character sequence + + uint *buffer = extendedCharTable[hash]; + if (buffer != nullptr) { + length = ushort(buffer[0]); + return buffer + 1; + } + length = 0; + return nullptr; +} + +ExtendedCharTable::ExtendedCharTable() +{ +} +ExtendedCharTable::~ExtendedCharTable() +{ + // free all allocated character buffers + QHashIterator iter(extendedCharTable); + while (iter.hasNext()) { + iter.next(); + delete[] iter.value(); + } +} + +// global instance +ExtendedCharTable ExtendedCharTable::instance; + + +//#include "Emulation.moc" + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Emulation.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Emulation.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Emulation.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Emulation.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,544 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef EMULATION_H +#define EMULATION_H + +// System +#include + +// Qt +#include +//#include +#include +#include +#include + +#include "qtermwidget_export.h" + +namespace Konsole { + +class KeyboardTranslator; +class HistoryType; +class Screen; +class ScreenWindow; +class TerminalCharacterDecoder; + +/** + * This enum describes the available states which + * the terminal emulation may be set to. + * + * These are the values used by Emulation::stateChanged() + */ +enum { + /** The emulation is currently receiving user input. */ + NOTIFYNORMAL = 0, + /** + * The terminal program has triggered a bell event + * to get the user's attention. + */ + NOTIFYBELL = 1, + /** + * The emulation is currently receiving data from its + * terminal input. + */ + NOTIFYACTIVITY = 2, + + // unused here? + NOTIFYSILENCE = 3 +}; + +/** + * Base class for terminal emulation back-ends. + * + * The back-end is responsible for decoding an incoming character stream and + * producing an output image of characters. + * + * When input from the terminal is received, the receiveData() slot should be called with + * the data which has arrived. The emulation will process the data and update the + * screen image accordingly. The codec used to decode the incoming character stream + * into the unicode characters used internally can be specified using setCodec() + * + * The size of the screen image can be specified by calling setImageSize() with the + * desired number of lines and columns. When new lines are added, old content + * is moved into a history store, which can be set by calling setHistory(). + * + * The screen image can be accessed by creating a ScreenWindow onto this emulation + * by calling createWindow(). Screen windows provide access to a section of the + * output. Each screen window covers the same number of lines and columns as the + * image size returned by imageSize(). The screen window can be moved up and down + * and provides transparent access to both the current on-screen image and the + * previous output. The screen windows emit an outputChanged signal + * when the section of the image they are looking at changes. + * Graphical views can then render the contents of a screen window, listening for notifications + * of output changes from the screen window which they are associated with and updating + * accordingly. + * + * The emulation also is also responsible for converting input from the connected views such + * as keypresses and mouse activity into a character string which can be sent + * to the terminal program. Key presses can be processed by calling the sendKeyEvent() slot, + * while mouse events can be processed using the sendMouseEvent() slot. When the character + * stream has been produced, the emulation will emit a sendData() signal with a pointer + * to the character buffer. This data should be fed to the standard input of the terminal + * process. The translation of key presses into an output character stream is performed + * using a lookup in a set of key bindings which map key sequences to output + * character sequences. The name of the key bindings set used can be specified using + * setKeyBindings() + * + * The emulation maintains certain state information which changes depending on the + * input received. The emulation can be reset back to its starting state by calling + * reset(). + * + * The emulation also maintains an activity state, which specifies whether + * terminal is currently active ( when data is received ), normal + * ( when the terminal is idle or receiving user input ) or trying + * to alert the user ( also known as a "Bell" event ). The stateSet() signal + * is emitted whenever the activity state is set. This can be used to determine + * how long the emulation has been active/idle for and also respond to + * a 'bell' event in different ways. + */ +class TERMINALWIDGET_EXPORT Emulation : public QObject +{ + Q_OBJECT + +public: + + /** + * This enum describes the available shapes for the keyboard cursor. + * See setKeyboardCursorShape() + */ + enum class KeyboardCursorShape { + /** A rectangular block which covers the entire area of the cursor character. */ + BlockCursor = 0, + /** + * A single flat line which occupies the space at the bottom of the cursor + * character's area. + */ + UnderlineCursor = 1, + /** + * An cursor shaped like the capital letter 'I', similar to the IBeam + * cursor used in Qt/KDE text editors. + */ + IBeamCursor = 2 + }; + + + /** Constructs a new terminal emulation */ + Emulation(); + ~Emulation() override; + + /** + * Creates a new window onto the output from this emulation. The contents + * of the window are then rendered by views which are set to use this window using the + * TerminalDisplay::setScreenWindow() method. + */ + ScreenWindow *createWindow(); + + /** Returns the size of the screen image which the emulation produces */ + QSize imageSize() const; + + /** + * Returns the total number of lines, including those stored in the history. + */ + int lineCount() const; + /** + * Returns the total number of columns. + */ + int columnCount() const; + + /** + * Sets the history store used by this emulation. When new lines + * are added to the output, older lines at the top of the screen are transferred to a history + * store. + * + * The number of lines which are kept and the storage location depend on the + * type of store. + */ + void setHistory(const HistoryType &); + /** Returns the history store used by this emulation. See setHistory() */ + const HistoryType &history() const; + /** Clears the history scroll. */ + void clearHistory(); + + /** + * Copies the output history from @p startLine to @p endLine + * into @p stream, using @p decoder to convert the terminal + * characters into text. + * + * @param decoder A decoder which converts lines of terminal characters with + * appearance attributes into output text. PlainTextDecoder is the most commonly + * used decoder. + * @param startLine Index of first line to copy + * @param endLine Index of last line to copy + */ + virtual void writeToStream(TerminalCharacterDecoder *decoder, int startLine, int endLine); + + /** Returns the codec used to decode incoming characters. See setCodec() */ + const QTextCodec *codec() const + { + return _codec; + } + /** Sets the codec used to decode incoming characters. */ + void setCodec(const QTextCodec *); + + /** + * Convenience method. + * Returns true if the current codec used to decode incoming + * characters is UTF-8 + */ + bool utf8() const + { + Q_ASSERT(_codec); + return _codec->mibEnum() == 106; + } + + + /** TODO Document me */ + virtual char eraseChar() const; + + /** + * Sets the key bindings used to key events + * ( received through sendKeyEvent() ) into character + * streams to send to the terminal. + */ + void setKeyBindings(const QString &name); + /** + * Returns the name of the emulation's current key bindings. + * See setKeyBindings() + */ + QString keyBindings() const; + + /** + * Copies the current image into the history and clears the screen. + */ + virtual void clearEntireScreen() = 0; + + /** Resets the state of the terminal. */ + virtual void reset() = 0; + + /** + * Returns true if the active terminal program wants + * mouse input events. + * + * The programUsesMouseChanged() signal is emitted when this + * changes. + */ + bool programUsesMouse() const; + + bool programBracketedPasteMode() const; + + /******** Modify by ut000610 daizhengwen 2020-06-02: 重新设置键盘配置****************/ + void setKeyTranslator(const KeyboardTranslator *keyTranslator); + /********************* Modify by ut000610 daizhengwen End ************************/ + + /******** Modify by ut000610 daizhengwen 2020-06-02: 设置删除和退格按钮****************/ + void setBackspaceMode(char *key, int length); + void setDeleteMode(char *key, int length); + /********************* Modify by ut000610 daizhengwen End ************************/ + + //用于保存当前Emulator对应的sessionId + void setSessionId(int sessionId); + +public slots: + + /** Change the size of the emulation's image */ + virtual void setImageSize(int lines, int columns); + + /** + * Interprets a sequence of characters and sends the result to the terminal. + * This is equivalent to calling sendKeyEvent() for each character in @p text in succession. + */ + virtual void sendText(const QString &text) = 0; + + /** + * Interprets a key press event and emits the sendData() signal with + * the resulting character stream. + */ + virtual void sendKeyEvent(QKeyEvent *); + + /** + * Converts information about a mouse event into an xterm-compatible escape + * sequence and emits the character sequence via sendData() + */ + virtual void sendMouseEvent(int buttons, int column, int line, int eventType); + + /** + * Sends a string of characters to the foreground terminal process. + * + * @param string The characters to send. + * @param length Length of @p string or if set to a negative value, @p string will + * be treated as a null-terminated string and its length will be determined automatically. + */ + virtual void sendString(const char *string, int length = -1) = 0; + + /** + * Processes an incoming stream of characters. receiveData() decodes the incoming + * character buffer using the current codec(), and then calls receiveChar() for + * each unicode character in the resulting buffer. + * + * receiveData() also starts a timer which causes the outputChanged() signal + * to be emitted when it expires. The timer allows multiple updates in quick + * succession to be buffered into a single outputChanged() signal emission. + * + * @param buffer A string of characters received from the terminal program. + * @param len The length of @p buffer + */ + void receiveData(const char *buffer, int len, bool isCommandExec); + +signals: + + /** + * Emitted when a buffer of data is ready to send to the + * standard input of the terminal. + * + * @param data The buffer of data ready to be sent + * @param len The length of @p data in bytes + */ + void sendData(const char *data, int len, const QTextCodec *codec); + + /** + * Requests that sending of input to the emulation + * from the terminal process be suspended or resumed. + * + * @param suspend If true, requests that sending of + * input from the terminal process' stdout be + * suspended. Otherwise requests that sending of + * input be resumed. + */ + void lockPtyRequest(bool suspend); + + /** + * Requests that the pty used by the terminal process + * be set to UTF 8 mode. + * + * TODO: More documentation + */ + void useUtf8Request(bool); + + /** + * Emitted when the activity state of the emulation is set. + * + * @param state The new activity state, one of NOTIFYNORMAL, NOTIFYACTIVITY + * or NOTIFYBELL + */ + void stateSet(int state); + + /** TODO Document me */ + void zmodemDetected(); + + + /** + * Requests that the color of the text used + * to represent the tabs associated with this + * emulation be changed. This is a Konsole-specific + * extension from pre-KDE 4 times. + * + * TODO: Document how the parameter works. + */ + void changeTabTextColorRequest(int color); + + /** + * This is emitted when the program running in the shell indicates whether or + * not it is interested in mouse events. + * + * @param usesMouse This will be true if the program wants to be informed about + * mouse events or false otherwise. + */ + void programUsesMouseChanged(bool usesMouse); + + void programBracketedPasteModeChanged(bool bracketedPasteMode); + + /** + * Emitted when the contents of the screen image change. + * The emulation buffers the updates from successive image changes, + * and only emits outputChanged() at sensible intervals when + * there is a lot of terminal activity. + * + * Normally there is no need for objects other than the screen windows + * created with createWindow() to listen for this signal. + * + * ScreenWindow objects created using createWindow() will emit their + * own outputChanged() signal in response to this signal. + */ + void outputChanged(); + + /** + * Emitted when the program running in the terminal wishes to update the + * session's title. This also allows terminal programs to customize other + * aspects of the terminal emulation display. + * + * This signal is emitted when the escape sequence "\033]ARG;VALUE\007" + * is received in the input string, where ARG is a number specifying what + * should change and VALUE is a string specifying the new value. + * + * TODO: The name of this method is not very accurate since this method + * is used to perform a whole range of tasks besides just setting + * the user-title of the session. + * + * @param title Specifies what to change. + *
    + *
  • 0 - Set window icon text and session title to @p newTitle
  • + *
  • 1 - Set window icon text to @p newTitle
  • + *
  • 2 - Set session title to @p newTitle
  • + *
  • 11 - Set the session's default background color to @p newTitle, + * where @p newTitle can be an HTML-style string ("#RRGGBB") or a named + * color (eg 'red', 'blue'). + * See http://doc.trolltech.com/4.2/qcolor.html#setNamedColor for more + * details. + *
  • + *
  • 31 - Supposedly treats @p newTitle as a URL and opens it (NOT IMPLEMENTED)
  • + *
  • 32 - Sets the icon associated with the session. @p newTitle is the name + * of the icon to use, which can be the name of any icon in the current KDE icon + * theme (eg: 'konsole', 'kate', 'folder_home')
  • + *
+ * @param newTitle Specifies the new title + */ + + void titleChanged(int title, const QString &newTitle); + + /** + * Emitted when the program running in the terminal changes the + * screen size. + */ + void imageSizeChanged(int lineCount, int columnCount); + + /** + * Emitted when the setImageSize() is called on this emulation for + * the first time. + */ + void imageSizeInitialized(); + + /** + * Emitted after receiving the escape sequence which asks to change + * the terminal emulator's size + */ + void imageResizeRequest(const QSize &sizz); + + /** + * Emitted when the terminal program requests to change various properties + * of the terminal display. + * + * A profile change command occurs when a special escape sequence, followed + * by a string containing a series of name and value pairs is received. + * This string can be parsed using a ProfileCommandParser instance. + * + * @param text A string expected to contain a series of key and value pairs in + * the form: name=value;name2=value2 ... + */ + void profileChangeCommandReceived(const QString &text); + + /** + * Emitted when a flow control key combination ( Ctrl+S or Ctrl+Q ) is pressed. + * @param suspendKeyPressed True if Ctrl+S was pressed to suspend output or Ctrl+Q to + * resume output. + */ + void flowControlKeyPressed(bool suspendKeyPressed); + + /** + * Emitted when the cursor shape or its blinking state is changed via + * DECSCUSR sequences. + * + * @param cursorShape One of 3 possible values in KeyboardCursorShape enum + * @param blinkingCursorEnabled Whether to enable blinking or not + */ + void cursorChanged(KeyboardCursorShape cursorShape, bool blinkingCursorEnabled); + +protected: + virtual void setMode(int mode) = 0; + virtual void resetMode(int mode) = 0; + + /** + * Processes an incoming character. See receiveData() + * @p ch A unicode character code. + */ + virtual void receiveChar(wchar_t ch); + + /** + * Sets the active screen. The terminal has two screens, primary and alternate. + * The primary screen is used by default. When certain interactive programs such + * as Vim are run, they trigger a switch to the alternate screen. + * + * @param index 0 to switch to the primary screen, or 1 to switch to the alternate screen + */ + void setScreen(int index); + + enum EmulationCodec { + LocaleCodec = 0, + Utf8Codec = 1 + }; + void setCodec(EmulationCodec codec); // codec number, 0 = locale, 1=utf8 + + + QList _windows; + + Screen *_currentScreen; // pointer to the screen which is currently active, + // this is one of the elements in the screen[] array + + Screen *_screen[2]; // 0 = primary screen ( used by most programs, including the shell + // scrollbars are enabled in this mode ) + // 1 = alternate ( used by vi , emacs etc. + // scrollbars are not enabled in this mode ) + + + //decodes an incoming C-style character stream into a unicode QString using + //the current text codec. (this allows for rendering of non-ASCII characters in text files etc.) + const QTextCodec *_codec; + QTextDecoder *_decoder; + /******** Modify by ut000610 daizhengwen 2020-06-02: 让这个值能被修改****************/ + /*const */KeyboardTranslator *_keyTranslator; // the keyboard layout + /********************* Modify by ut000610 daizhengwen End ************************/ + +protected slots: + /** + * Schedules an update of attached views. + * Repeated calls to bufferedUpdate() in close succession will result in only a single update, + * much like the Qt buffered update of widgets. + */ + void bufferedUpdate(); + +private slots: + + // triggered by timer, causes the emulation to send an updated screen image to each + // view + void showBulk(); + + void usesMouseChanged(bool usesMouse); + + void bracketedPasteModeChanged(bool bracketedPasteMode); + +private: + bool _usesMouse; + bool _bracketedPasteMode; + QTimer _bulkTimer1; + QTimer _bulkTimer2; + + int _sessionId; + + /******** Add by ut001000 renfeixiang 2020-07-16:增加保存上一次的屏幕行列数,用于比较终端屏宽是否发生变化 Begin***************/ +// int _lastcol = 0; +// int _lastline = 0; + /******** Add by ut001000 renfeixiang 2020-07-16:增加 End***************/ +}; + +} + +#endif // ifndef EMULATION_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ExtendedDefaultTranslator.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ExtendedDefaultTranslator.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ExtendedDefaultTranslator.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ExtendedDefaultTranslator.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,95 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +"keyboard \"Default (XFree 4)\"" +"key Escape : \"\\E\"" +"key Tab -Shift : \"\\t\"\n" +"key Tab +Shift+Ansi : \"\\E[Z\"\n" +"key Tab +Shift-Ansi : \"\\t\"\n" +"key Backtab +Ansi : \"\\E[Z\"\n" +"key Backtab -Ansi : \"\\t\"\n" +"key Return-Shift-NewLine : \"\\r\"\n" +"key Return-Shift+NewLine : \"\\r\\n\"\n" +"key Return+Shift : \"\\EOM\"\n" +"key Backspace : \"\\x7f\"\n" +"key Up -Shift-Ansi : \"\\EA\"\n" +"key Down -Shift-Ansi : \"\\EB\"\n" +"key Right-Shift-Ansi : \"\\EC\"\n" +"key Left -Shift-Ansi : \"\\ED\"\n" +"key Up -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOA\"\n" +"key Down -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOB\"\n" +"key Right -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOC\"\n" +"key Left -Shift-AnyMod+Ansi+AppCuKeys : \"\\EOD\"\n" +"key Up -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[A\"\n" +"key Down -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[B\"\n" +"key Right -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[C\"\n" +"key Left -Shift-AnyMod+Ansi-AppCuKeys : \"\\E[D\"\n" +"key Up -Shift+AnyMod+Ansi : \"\\E[1;*A\"\n" +"key Down -Shift+AnyMod+Ansi : \"\\E[1;*B\"\n" +"key Right -Shift+AnyMod+Ansi : \"\\E[1;*C\"\n" +"key Left -Shift+AnyMod+Ansi : \"\\E[1;*D\"\n" +"key Enter+NewLine : \"\\r\\n\"\n" +"key Enter-NewLine : \"\\r\"\n" +"key Home -AnyMod -AppCuKeys : \"\\E[H\" \n" +"key End -AnyMod -AppCuKeys : \"\\E[F\" \n" +"key Home -AnyMod +AppCuKeys : \"\\EOH\" \n" +"key End -AnyMod +AppCuKeys : \"\\EOF\" \n" +"key Home +AnyMod : \"\\E[1;*H\"\n" +"key End +AnyMod : \"\\E[1;*F\"\n" +"key Insert -AnyMod : \"\\E[2~\"\n" +"key Delete -AnyMod : \"\\E[3~\"\n" +"key Insert +AnyMod : \"\\E[2;*~\"\n" +"key Delete +AnyMod : \"\\E[3;*~\"\n" +"key Prior -Shift-AnyMod : \"\\E[5~\"\n" +"key Next -Shift-AnyMod : \"\\E[6~\"\n" +"key Prior -Shift+AnyMod : \"\\E[5;*~\"\n" +"key Next -Shift+AnyMod : \"\\E[6;*~\"\n" +"key F1 -AnyMod : \"\\EOP\"\n" +"key F2 -AnyMod : \"\\EOQ\"\n" +"key F3 -AnyMod : \"\\EOR\"\n" +"key F4 -AnyMod : \"\\EOS\"\n" +"key F5 -AnyMod : \"\\E[15~\"\n" +"key F6 -AnyMod : \"\\E[17~\"\n" +"key F7 -AnyMod : \"\\E[18~\"\n" +"key F8 -AnyMod : \"\\E[19~\"\n" +"key F9 -AnyMod : \"\\E[20~\"\n" +"key F10 -AnyMod : \"\\E[21~\"\n" +"key F11 -AnyMod : \"\\E[23~\"\n" +"key F12 -AnyMod : \"\\E[24~\"\n" +"key F1 +AnyMod : \"\\EO*P\"\n" +"key F2 +AnyMod : \"\\EO*Q\"\n" +"key F3 +AnyMod : \"\\EO*R\"\n" +"key F4 +AnyMod : \"\\EO*S\"\n" +"key F5 +AnyMod : \"\\E[15;*~\"\n" +"key F6 +AnyMod : \"\\E[17;*~\"\n" +"key F7 +AnyMod : \"\\E[18;*~\"\n" +"key F8 +AnyMod : \"\\E[19;*~\"\n" +"key F9 +AnyMod : \"\\E[20;*~\"\n" +"key F10 +AnyMod : \"\\E[21;*~\"\n" +"key F11 +AnyMod : \"\\E[23;*~\"\n" +"key F12 +AnyMod : \"\\E[24;*~\"\n" +"key Space +Control : \"\\x00\"\n" +"key Up +Shift-AppScreen : scrollLineUp\n" +"key Prior +Shift-AppScreen : scrollPageUp\n" +"key Down +Shift-AppScreen : scrollLineDown\n" +"key Next +Shift-AppScreen : scrollPageDown\n" +"key ScrollLock : scrollLock\n" +"\0" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Filter.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Filter.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Filter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Filter.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,593 @@ +/* + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "Filter.h" +#include "SessionManager.h" + +// System +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// KDE +//#include +//#include + +// Konsole +#include "TerminalCharacterDecoder.h" +#include "konsole_wcwidth.h" + +using namespace Konsole; + +FilterChain::~FilterChain() +{ + QMutableListIterator iter(*this); + + while (iter.hasNext()) { + Filter *filter = iter.next(); + iter.remove(); + delete filter; + } +} + +void FilterChain::addFilter(Filter *filter) +{ + append(filter); +} +void FilterChain::removeFilter(Filter *filter) +{ + removeAll(filter); +} +bool FilterChain::containsFilter(Filter *filter) +{ + return contains(filter); +} +void FilterChain::reset() +{ + QListIterator iter(*this); + while (iter.hasNext()) + iter.next()->reset(); +} +void FilterChain::setBuffer(const QString *buffer, const QList *linePositions) +{ + QListIterator iter(*this); + while (iter.hasNext()) + iter.next()->setBuffer(buffer, linePositions); +} +void FilterChain::process() +{ + QListIterator iter(*this); + while (iter.hasNext()) + iter.next()->process(); +} +void FilterChain::clear() +{ + QList::clear(); +} +Filter::HotSpot *FilterChain::hotSpotAt(int line, int column) const +{ + QListIterator iter(*this); + while (iter.hasNext()) { + Filter *filter = iter.next(); + Filter::HotSpot *spot = filter->hotSpotAt(line, column); + if (spot != nullptr) { + return spot; + } + } + + return nullptr; +} + +QList FilterChain::hotSpots() const +{ + QList list; + QListIterator iter(*this); + while (iter.hasNext()) { + Filter *filter = iter.next(); + list << filter->hotSpots(); + } + return list; +} +//QList FilterChain::hotSpotsAtLine(int line) const; + +void FilterChain::setSessionId(int sessionId) +{ + _sessionId = sessionId; +} + +TerminalImageFilterChain::TerminalImageFilterChain() + : _buffer(nullptr) + , _linePositions(nullptr) +{ +} + +TerminalImageFilterChain::~TerminalImageFilterChain() +{ + delete _buffer; + delete _linePositions; +} + +//判断是否包含>=两种类型的提示符结尾字符(比如: root@zhangsan-PC# echo $ XXXXX 这种情况) +//防止截取shell提示符出错,比如将'root@zhangsan-PC# echo $ XXXXX'中的'root@zhangsan-PC# echo '截取出来当作提示符 +bool isContainOtherPromptEnd(QString promptLine, QString currPromptEnd) +{ + //四不同类型的提示符结尾字符 + QString promptEnds = QString("$#%>"); + promptEnds.remove(currPromptEnd); + + for (int i=0; i &lineProperties) +{ + if (empty()) + return; + + // reset all filters and hotspots + reset(); + + PlainTextDecoder decoder; + decoder.setTrailingWhitespace(false); + + // setup new shared buffers for the filters to process on + QString *newBuffer = new QString(); + QList *newLinePositions = new QList(); + setBuffer(newBuffer, newLinePositions); + + // free the old buffers + delete _buffer; + delete _linePositions; + + _buffer = newBuffer; + _linePositions = newLinePositions; + + QTextStream lineStream(_buffer); + decoder.begin(&lineStream); + + QString lastLine = ""; + for (int i = 0 ; i < lines ; i++) { + _linePositions->append(_buffer->length()); + decoder.decodeLine(image + i * columns, columns, LINE_DEFAULT); + + // pretend that each line ends with a newline character. + // this prevents a link that occurs at the end of one line + // being treated as part of a link that occurs at the start of the next line + // + // the downside is that links which are spread over more than one line are not + // highlighted. + // + // TODO - Use the "line wrapped" attribute associated with lines in a + // terminal image to avoid adding this imaginary character for wrapped + // lines + if (!(lineProperties.value(i, LINE_DEFAULT) & LINE_WRAPPED)) + lineStream << QLatin1Char('\n'); + + QString tempLine = lineStream.readAll().trimmed(); + if (tempLine.length() > 0) { + lastLine = tempLine; + } + } + decoder.end(); + + /* fix bug 33638 使用sudo apt-get install csh ksh zsh tcsh安装其它shell后,执行卸载终端未弹出卸载弹框 */ + + if (lastLine.length() > 0) { + //优化了截取并保存当前shell提示符的判断,暂时没有考虑PS1被修改的情况(若考虑的话实现起来太复杂) + //目前针对sh/bash/csh/tcsh/ksh/zsh这几种类型的shell做了处理 + QString promptEnds = QString("$#%>"); + for (int i=0; isaveCurrShellPrompt(_sessionId, lastLine); + break; + } + } + } + + QString strShellPrompt = SessionManager::instance()->getCurrShellPrompt(_sessionId); + + bool isRootUser = strShellPrompt.endsWith("#"); + + QString strCurrBuffer = (*_buffer).trimmed(); + if (strCurrBuffer.length() > 0) { + //获取并保存当前正在输入的命令 + if (isRootUser) { + QString strCommand = strCurrBuffer.split(strShellPrompt).last(); + if (!strCommand.contains("sudo ")) { + strCommand = QString("sudo %1").arg(strCommand); + } + SessionManager::instance()->saveCurrShellCommand(_sessionId, strCommand); + } else { + QString strCommand = strCurrBuffer.split(strShellPrompt).last(); + SessionManager::instance()->saveCurrShellCommand(_sessionId, strCommand); + } + } +} + +Filter::Filter() : + _linePositions(nullptr), + _buffer(nullptr) +{ +} + +Filter::~Filter() +{ + qDeleteAll(_hotspotList); + _hotspotList.clear(); +} +void Filter::reset() +{ + qDeleteAll(_hotspotList); + _hotspots.clear(); + _hotspotList.clear(); +} + +void Filter::setBuffer(const QString *buffer, const QList *linePositions) +{ + _buffer = buffer; + _linePositions = linePositions; +} + +void Filter::getLineColumn(int position, int &startLine, int &startColumn) +{ + Q_ASSERT(_linePositions); + Q_ASSERT(_buffer); + + + for (int i = 0 ; i < _linePositions->count() ; i++) { + int nextLine = 0; + + if (i == _linePositions->count() - 1) + nextLine = _buffer->length() + 1; + else + nextLine = _linePositions->value(i + 1); + + if (_linePositions->value(i) <= position && position < nextLine) { + startLine = i; + startColumn = Character::stringWidth(buffer()->mid(_linePositions->value(i), position - _linePositions->value(i))); + return; + } + } +} + + +/*void Filter::addLine(const QString& text) +{ + _linePositions << _buffer.length(); + _buffer.append(text); +}*/ + +const QString *Filter::buffer() +{ + return _buffer; +} +Filter::HotSpot::~HotSpot() +{ +} +void Filter::addHotSpot(HotSpot *spot) +{ + _hotspotList << spot; + + for (int line = spot->startLine() ; line <= spot->endLine() ; line++) { + _hotspots.insert(line, spot); + } +} +QList Filter::hotSpots() const +{ + return _hotspotList; +} +QList Filter::hotSpotsAtLine(int line) const +{ + return _hotspots.values(line); +} + +Filter::HotSpot *Filter::hotSpotAt(int line, int column) const +{ + QListIterator spotIter(_hotspots.values(line)); + + while (spotIter.hasNext()) { + HotSpot *spot = spotIter.next(); + + if (spot->startLine() == line && spot->startColumn() > column) + continue; + if (spot->endLine() == line && spot->endColumn() < column) + continue; + + return spot; + } + + return nullptr; +} + +Filter::HotSpot::HotSpot(int startLine, int startColumn, int endLine, int endColumn) + : _startLine(startLine) + , _startColumn(startColumn) + , _endLine(endLine) + , _endColumn(endColumn) + , _type(NotSpecified) +{ +} +QList Filter::HotSpot::actions() +{ + return QList(); +} +int Filter::HotSpot::startLine() const +{ + return _startLine; +} +int Filter::HotSpot::endLine() const +{ + return _endLine; +} +int Filter::HotSpot::startColumn() const +{ + return _startColumn; +} +int Filter::HotSpot::endColumn() const +{ + return _endColumn; +} +Filter::HotSpot::Type Filter::HotSpot::type() const +{ + return _type; +} +void Filter::HotSpot::setType(Type type) +{ + _type = type; +} + +RegExpFilter::RegExpFilter() +{ +} + +RegExpFilter::HotSpot::HotSpot(int startLine, int startColumn, int endLine, int endColumn) + : Filter::HotSpot(startLine, startColumn, endLine, endColumn) +{ + setType(Marker); +} + +void RegExpFilter::HotSpot::activate(const QString &) +{ +} + +void RegExpFilter::HotSpot::setCapturedTexts(const QStringList &texts) +{ + _capturedTexts = texts; +} +QStringList RegExpFilter::HotSpot::capturedTexts() const +{ + return _capturedTexts; +} + +void RegExpFilter::setRegExp(const QRegExp ®Exp) +{ + _searchText = regExp; +} +QRegExp RegExpFilter::regExp() const +{ + return _searchText; +} +/*void RegExpFilter::reset(int) +{ + _buffer = QString(); +}*/ +void RegExpFilter::process() +{ + int pos = 0; + const QString *text = buffer(); + + Q_ASSERT(text); + + // ignore any regular expressions which match an empty string. + // otherwise the while loop below will run indefinitely + static const QString emptyString; + if (_searchText.exactMatch(emptyString)) + return; + + while (pos >= 0) { + pos = _searchText.indexIn(*text, pos); + + if (pos >= 0) { + int startLine = 0; + int endLine = 0; + int startColumn = 0; + int endColumn = 0; + + getLineColumn(pos, startLine, startColumn); + getLineColumn(pos + _searchText.matchedLength(), endLine, endColumn); + + RegExpFilter::HotSpot *spot = newHotSpot(startLine, startColumn, + endLine, endColumn); + spot->setCapturedTexts(_searchText.capturedTexts()); + + addHotSpot(spot); + pos += _searchText.matchedLength(); + + // if matchedLength == 0, the program will get stuck in an infinite loop + if (_searchText.matchedLength() == 0) + pos = -1; + } + } +} + +RegExpFilter::HotSpot *RegExpFilter::newHotSpot(int startLine, int startColumn, + int endLine, int endColumn) +{ + return new RegExpFilter::HotSpot(startLine, startColumn, + endLine, endColumn); +} +RegExpFilter::HotSpot *UrlFilter::newHotSpot(int startLine, int startColumn, int endLine, + int endColumn) +{ + HotSpot *spot = new UrlFilter::HotSpot(startLine, startColumn, + endLine, endColumn); + connect(spot->getUrlObject(), &FilterObject::activated, this, &UrlFilter::activated); + return spot; +} + +UrlFilter::HotSpot::HotSpot(int startLine, int startColumn, int endLine, int endColumn) + : RegExpFilter::HotSpot(startLine, startColumn, endLine, endColumn) + , _urlObject(new FilterObject(this)) +{ + setType(Link); +} + +UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const +{ + QString url = capturedTexts().constFirst(); + + if (FullUrlRegExp.exactMatch(url)) + return StandardUrl; + else if (EmailAddressRegExp.exactMatch(url)) + return Email; + else + return Unknown; +} + +void UrlFilter::HotSpot::activate(const QString &actionName) +{ + QString url = capturedTexts().constFirst(); + + const UrlType kind = urlType(); + + if (actionName == QLatin1String("copy-action")) { + QApplication::clipboard()->setText(url); + return; + } + + if (actionName.isEmpty() || actionName == QLatin1String("open-action") || actionName == QLatin1String("click-action")) { + if (kind == StandardUrl) { + // if the URL path does not include the protocol ( eg. "www.kde.org" ) then + // prepend http:// ( eg. "www.kde.org" --> "http://www.kde.org" ) + if (!url.contains(QLatin1String("://"))) { + url.prepend(QLatin1String("http://")); + } + } else if (kind == Email) { + url.prepend(QLatin1String("mailto:")); + } + + _urlObject->emitActivated(QUrl(url, QUrl::StrictMode), actionName != QLatin1String("click-action")); + } +} + +// Note: Altering these regular expressions can have a major effect on the performance of the filters +// used for finding URLs in the text, especially if they are very general and could match very long +// pieces of text. +// Please be careful when altering them. + +//regexp matches: +// full url: +// protocolname:// or www. followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot +/** modify begin by ut001121 zhangmeng 20201215 for 1040-4 Ctrl键+鼠标点击超链接打开网页 */ +/** del +const QRegExp UrlFilter::FullUrlRegExp(QLatin1String("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]"));*/ +const QRegExp UrlFilter::FullUrlRegExp(QLatin1String("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[\\w-.@]+" + "([:]((6553[0-5])|[655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[0-9])[^0-9])?" + "([/][\\w\\-\\@?^=%&/~\\+#.]+)?")); +/** modify end by ut001121 */ + +// email address: +// [word chars, dots or dashes]@[word chars, dots or dashes].[word chars] +const QRegExp UrlFilter::EmailAddressRegExp(QLatin1String("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b")); + +// matches full url or email address +const QRegExp UrlFilter::CompleteUrlRegExp(QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + + EmailAddressRegExp.pattern() + QLatin1Char(')')); + +UrlFilter::UrlFilter() +{ + setRegExp(CompleteUrlRegExp); +} + +UrlFilter::HotSpot::~HotSpot() +{ + delete _urlObject; +} + +void FilterObject::emitActivated(const QUrl &url, bool fromContextMenu) +{ + emit activated(url, fromContextMenu); +} + +void FilterObject::activate() +{ + _filter->activate(sender()->objectName()); +} + +FilterObject *UrlFilter::HotSpot::getUrlObject() const +{ + return _urlObject; +} + +QList UrlFilter::HotSpot::actions() +{ + QList list; + + const UrlType kind = urlType(); + + QAction *openAction = new QAction(_urlObject); + QAction *copyAction = new QAction(_urlObject);; + + Q_ASSERT(kind == StandardUrl || kind == Email); + + if (kind == StandardUrl) { + openAction->setText(QObject::tr("Open link")); + copyAction->setText(QObject::tr("Copy link")); + } else if (kind == Email) { + openAction->setText(QObject::tr("Send email to...")); + copyAction->setText(QObject::tr("Copy email address")); + } + + // object names are set here so that the hotspot performs the + // correct action when activated() is called with the triggered + // action passed as a parameter. + openAction->setObjectName(QLatin1String("open-action")); + copyAction->setObjectName(QLatin1String("copy-action")); + + QObject::connect(openAction, &QAction::triggered, _urlObject, &FilterObject::activate); + QObject::connect(copyAction, &QAction::triggered, _urlObject, &FilterObject::activate); + + list << openAction; + list << copyAction; + + return list; +} + +//#include "Filter.moc" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Filter.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Filter.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Filter.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Filter.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,389 @@ +/* + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef FILTER_H +#define FILTER_H + +// Qt +#include +#include +#include +#include +#include +#include + +// Local +#include "qtermwidget_export.h" + +namespace Konsole { + +typedef unsigned char LineProperty; +class Character; + +/** + * A filter processes blocks of text looking for certain patterns (such as URLs or keywords from a list) + * and marks the areas which match the filter's patterns as 'hotspots'. + * + * Each hotspot has a type identifier associated with it ( such as a link or a highlighted section ), + * and an action. When the user performs some activity such as a mouse-click in a hotspot area ( the exact + * action will depend on what is displaying the block of text which the filter is processing ), the hotspot's + * activate() method should be called. Depending on the type of hotspot this will trigger a suitable response. + * + * For example, if a hotspot represents a URL then a suitable action would be opening that URL in a web browser. + * Hotspots may have more than one action, in which case the list of actions can be obtained using the + * actions() method. + * + * Different subclasses of filter will return different types of hotspot. + * Subclasses must reimplement the process() method to examine a block of text and identify sections of interest. + * When processing the text they should create instances of Filter::HotSpot subclasses for sections of interest + * and add them to the filter's list of hotspots using addHotSpot() + */ +class TERMINALWIDGET_EXPORT Filter : public QObject +{ +public: + /** + * Represents an area of text which matched the pattern a particular filter has been looking for. + * + * Each hotspot has a type identifier associated with it ( such as a link or a highlighted section ), + * and an action. When the user performs some activity such as a mouse-click in a hotspot area ( the exact + * action will depend on what is displaying the block of text which the filter is processing ), the hotspot's + * activate() method should be called. Depending on the type of hotspot this will trigger a suitable response. + * + * For example, if a hotspot represents a URL then a suitable action would be opening that URL in a web browser. + * Hotspots may have more than one action, in which case the list of actions can be obtained using the + * actions() method. These actions may then be displayed in a popup menu or toolbar for example. + */ + class HotSpot + { + public: + /** + * Constructs a new hotspot which covers the area from (@p startLine,@p startColumn) to (@p endLine,@p endColumn) + * in a block of text. + */ + HotSpot(int startLine, int startColumn, int endLine, int endColumn); + virtual ~HotSpot(); + + enum Type { + // the type of the hotspot is not specified + NotSpecified, + // this hotspot represents a clickable link + Link, + // this hotspot represents a marker + Marker + }; + + /** Returns the line when the hotspot area starts */ + int startLine() const; + /** Returns the line where the hotspot area ends */ + int endLine() const; + /** Returns the column on startLine() where the hotspot area starts */ + int startColumn() const; + /** Returns the column on endLine() where the hotspot area ends */ + int endColumn() const; + /** + * Returns the type of the hotspot. This is usually used as a hint for views on how to represent + * the hotspot graphically. eg. Link hotspots are typically underlined when the user mouses over them + */ + Type type() const; + /** + * Causes the an action associated with a hotspot to be triggered. + * + * @param action The action to trigger. This is + * typically empty ( in which case the default action should be performed ) or + * one of the object names from the actions() list. In which case the associated + * action should be performed. + */ + virtual void activate(const QString &action = QString()) = 0; + /** + * Returns a list of actions associated with the hotspot which can be used in a + * menu or toolbar + */ + virtual QList actions(); + + protected: + /** Sets the type of a hotspot. This should only be set once */ + void setType(Type type); + + private: + int _startLine; + int _startColumn; + int _endLine; + int _endColumn; + Type _type; + + }; + + /** Constructs a new filter. */ + Filter(); + ~Filter() override; + + /** Causes the filter to process the block of text currently in its internal buffer */ + virtual void process() = 0; + + /** + * Empties the filters internal buffer and resets the line count back to 0. + * All hotspots are deleted. + */ + void reset(); + + /** Adds a new line of text to the filter and increments the line count */ + //void addLine(const QString& string); + + /** Returns the hotspot which covers the given @p line and @p column, or 0 if no hotspot covers that area */ + HotSpot *hotSpotAt(int line, int column) const; + + /** Returns the list of hotspots identified by the filter */ + QList hotSpots() const; + + /** Returns the list of hotspots identified by the filter which occur on a given line */ + QList hotSpotsAtLine(int line) const; + + /** + * TODO: Document me + */ + void setBuffer(const QString *buffer, const QList *linePositions); + +protected: + /** Adds a new hotspot to the list */ + void addHotSpot(HotSpot *); + /** Returns the internal buffer */ + const QString *buffer(); + /** Converts a character position within buffer() to a line and column */ + void getLineColumn(int position, int &startLine, int &startColumn); + +private: + QMultiHash _hotspots; + QList _hotspotList; + + const QList *_linePositions; + const QString *_buffer; +}; + +/** + * A filter which searches for sections of text matching a regular expression and creates a new RegExpFilter::HotSpot + * instance for them. + * + * Subclasses can reimplement newHotSpot() to return custom hotspot types when matches for the regular expression + * are found. + */ +class TERMINALWIDGET_EXPORT RegExpFilter : public Filter +{ +public: + /** + * Type of hotspot created by RegExpFilter. The capturedTexts() method can be used to find the text + * matched by the filter's regular expression. + */ + class HotSpot : public Filter::HotSpot + { + public: + HotSpot(int startLine, int startColumn, int endLine, int endColumn); + void activate(const QString &action = QString()) override; + + /** Sets the captured texts associated with this hotspot */ + void setCapturedTexts(const QStringList &texts); + /** Returns the texts found by the filter when matching the filter's regular expression */ + QStringList capturedTexts() const; + private: + QStringList _capturedTexts; + }; + + /** Constructs a new regular expression filter */ + RegExpFilter(); + + /** + * Sets the regular expression which the filter searches for in blocks of text. + * + * Regular expressions which match the empty string are treated as not matching + * anything. + */ + void setRegExp(const QRegExp &text); + /** Returns the regular expression which the filter searches for in blocks of text */ + QRegExp regExp() const; + + /** + * Reimplemented to search the filter's text buffer for text matching regExp() + * + * If regexp matches the empty string, then process() will return immediately + * without finding results. + */ + void process() override; + +protected: + /** + * Called when a match for the regular expression is encountered. Subclasses should reimplement this + * to return custom hotspot types + */ + virtual RegExpFilter::HotSpot *newHotSpot(int startLine, int startColumn, + int endLine, int endColumn); + +private: + QRegExp _searchText; +}; + +class FilterObject; + +/** A filter which matches URLs in blocks of text */ +class TERMINALWIDGET_EXPORT UrlFilter : public RegExpFilter +{ + Q_OBJECT +public: + /** + * Hotspot type created by UrlFilter instances. The activate() method opens a web browser + * at the given URL when called. + */ + class HotSpot : public RegExpFilter::HotSpot + { + public: + HotSpot(int startLine, int startColumn, int endLine, int endColumn); + ~HotSpot() override; + + FilterObject *getUrlObject() const; + + QList actions() override; + + /** + * Open a web browser at the current URL. The url itself can be determined using + * the capturedTexts() method. + */ + void activate(const QString &action = QString()) override; + + private: + enum UrlType { + StandardUrl, + Email, + Unknown + }; + UrlType urlType() const; + + FilterObject *_urlObject; + }; + + UrlFilter(); + +protected: + RegExpFilter::HotSpot *newHotSpot(int, int, int, int) override; + +private: + + static const QRegExp FullUrlRegExp; + static const QRegExp EmailAddressRegExp; + + // combined OR of FullUrlRegExp and EmailAddressRegExp + static const QRegExp CompleteUrlRegExp; +signals: + void activated(const QUrl &url, bool fromContextMenu); +}; + +class TERMINALWIDGET_EXPORT FilterObject : public QObject +{ + Q_OBJECT +public: + explicit FilterObject(Filter::HotSpot *filter) : _filter(filter) {} + + void emitActivated(const QUrl &url, bool fromContextMenu); +public slots: + void activate(); +private: + Filter::HotSpot *_filter; +signals: + void activated(const QUrl &url, bool fromContextMenu); +}; + +/** + * A chain which allows a group of filters to be processed as one. + * The chain owns the filters added to it and deletes them when the chain itself is destroyed. + * + * Use addFilter() to add a new filter to the chain. + * When new text to be filtered arrives, use addLine() to add each additional + * line of text which needs to be processed and then after adding the last line, use + * process() to cause each filter in the chain to process the text. + * + * After processing a block of text, the reset() method can be used to set the filter chain's + * internal cursor back to the first line. + * + * The hotSpotAt() method will return the first hotspot which covers a given position. + * + * The hotSpots() and hotSpotsAtLine() method return all of the hotspots in the text and on + * a given line respectively. + */ +class TERMINALWIDGET_EXPORT FilterChain : protected QList +{ +public: + virtual ~FilterChain(); + + /** Adds a new filter to the chain. The chain will delete this filter when it is destroyed */ + void addFilter(Filter *filter); + /** Removes a filter from the chain. The chain will no longer delete the filter when destroyed */ + void removeFilter(Filter *filter); + /** Returns true if the chain contains @p filter */ + bool containsFilter(Filter *filter); + /** Removes all filters from the chain */ + void clear(); + + /** Resets each filter in the chain */ + void reset(); + /** + * Processes each filter in the chain + */ + void process(); + + /** Sets the buffer for each filter in the chain to process. */ + void setBuffer(const QString *buffer, const QList *linePositions); + + /** Returns the first hotspot which occurs at @p line, @p column or 0 if no hotspot was found */ + Filter::HotSpot *hotSpotAt(int line, int column) const; + /** Returns a list of all the hotspots in all the chain's filters */ + QList hotSpots() const; + /** Returns a list of all hotspots at the given line in all the chain's filters */ + QList hotSpotsAtLine(int line) const; + + void setSessionId(int sessionId); + +protected: + int _sessionId; +}; + +/** A filter chain which processes character images from terminal displays */ +class TERMINALWIDGET_EXPORT TerminalImageFilterChain : public FilterChain +{ +public: + TerminalImageFilterChain(); + ~TerminalImageFilterChain() override; + + /** + * Set the current terminal image to @p image. + * + * @param image The terminal image + * @param lines The number of lines in the terminal image + * @param columns The number of columns in the terminal image + * @param lineProperties The line properties to set for image + */ + void setImage(const Character *const image, int lines, int columns, + const QVector &lineProperties); + +private: + QString *_buffer; + QList *_linePositions; +}; + +} + +typedef Konsole::Filter Filter; + +#endif //FILTER_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,87 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "CompactHistoryBlock.h" + +using namespace Konsole; + +constexpr size_t BLOCK_LENGTH = 4096 * 64 ; // 256kb + +CompactHistoryBlock::CompactHistoryBlock(size_t blockLength) : + _blockLength(BLOCK_LENGTH), + _tail(nullptr), + _blockStart(nullptr), + _allocCount(0) +{ + if (blockLength > _blockLength) { + _blockLength = blockLength; + } + + _head = static_cast(mmap(nullptr, _blockLength, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0)); + Q_ASSERT(_head != MAP_FAILED); + _tail = _blockStart = _head; +} + +CompactHistoryBlock::~CompactHistoryBlock() +{ + //free(_blockStart); + munmap(_blockStart, _blockLength); +} + +unsigned int CompactHistoryBlock::remaining() +{ + return _blockStart + _blockLength - _tail; +} + +unsigned CompactHistoryBlock::length() +{ + return _blockLength; +} + +bool CompactHistoryBlock::contains(void *addr) +{ + return addr >= _blockStart && addr < (_blockStart + _blockLength); +} + +bool CompactHistoryBlock::isInUse() +{ + return _allocCount != 0; +} + +void *CompactHistoryBlock::allocate(size_t size) +{ + Q_ASSERT(size > 0); + if (_tail - _blockStart + size > _blockLength) { + return nullptr; + } + + void *block = _tail; + _tail += size; + ////qDebug() << "allocated " << length << " bytes at address " << block; + _allocCount++; + return block; +} + +void CompactHistoryBlock::deallocate() +{ + _allocCount--; + Q_ASSERT(_allocCount >= 0); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlock.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,57 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COMPACTHISTORYBLOCK_H +#define COMPACTHISTORYBLOCK_H + +// Konsole +#include "../../Character.h" + +// System +#include + +namespace Konsole +{ + +class CompactHistoryBlock +{ +public: + CompactHistoryBlock(size_t blockLength = 0); + + virtual ~CompactHistoryBlock(); + + virtual unsigned int remaining(); + + virtual unsigned length(); + + virtual void *allocate(size_t size); + virtual bool contains(void *addr); + + virtual void deallocate(); + virtual bool isInUse(); + +private: + size_t _blockLength; + quint8 *_head; + quint8 *_tail; + quint8 *_blockStart; + int _allocCount; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,78 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "CompactHistoryBlockList.h" + +// Qt + +using namespace Konsole; + +CompactHistoryBlockList::CompactHistoryBlockList() + : list(QList()) +{ +} + +void *CompactHistoryBlockList::allocate(size_t size) +{ + CompactHistoryBlock *block; + if (list.isEmpty() || list.last()->remaining() < size) { + block = new CompactHistoryBlock(size); + list.append(block); + ////qDebug() << "new block created, remaining " << block->remaining() << "number of blocks=" << list.size(); + } else { + block = list.last(); + ////qDebug() << "old block used, remaining " << block->remaining(); + } + return block->allocate(size); +} + +void CompactHistoryBlockList::deallocate(void *ptr) +{ + Q_ASSERT(!list.isEmpty()); + + int i = 0; + CompactHistoryBlock *block = list.at(i); + while (i < list.size() && !block->contains(ptr)) { + i++; + block = list.at(i); + } + + Q_ASSERT(i < list.size()); + + block->deallocate(); + + if (!block->isInUse()) { + list.removeAt(i); + delete block; + ////qDebug() << "block deleted, new size = " << list.size(); + } +} + +int CompactHistoryBlockList::length() +{ + return list.size(); +} + +CompactHistoryBlockList::~CompactHistoryBlockList() +{ + qDeleteAll(list.begin(), list.end()); + list.clear(); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryBlockList.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,43 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COMPACTHISTORYBLOCKLIST_H +#define COMPACTHISTORYBLOCKLIST_H + +#include +#include "CompactHistoryBlock.h" + +namespace Konsole +{ + +class CompactHistoryBlockList +{ +public: + CompactHistoryBlockList(); + ~CompactHistoryBlockList(); + + void *allocate(size_t size); + void deallocate(void *); + int length(); + +private: + QList list; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,121 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "CompactHistoryLine.h" + +using namespace Konsole; + +void *CompactHistoryLine::operator new(size_t size, CompactHistoryBlockList &blockList) +{ + return blockList.allocate(size); +} + +void CompactHistoryLine::operator delete(void *) +{ + /* do nothing, deallocation from pool is done in destructor*/ +} + +CompactHistoryLine::CompactHistoryLine(const TextLine &line, CompactHistoryBlockList &bList) : + _blockListRef(bList), + _formatArray(nullptr), + _text(nullptr), + _formatLength(0), + _wrapped(false) +{ + if (!line.isEmpty()) { + _length = line.size(); + + // count number of different formats in this text line + Character c = line[0]; + _formatLength = 1; + for (auto &k : line) { + if (!(k.equalsFormat(c))) { + _formatLength++; // format change detected + c = k; + } + } + + _formatArray = static_cast(_blockListRef.allocate(sizeof(CharacterFormat) * _formatLength)); + Q_ASSERT(_formatArray != nullptr); + _text = static_cast(_blockListRef.allocate(sizeof(uint) * line.size())); + Q_ASSERT(_text != nullptr); + + c = line[0]; + _formatArray[0].setFormat(c); + _formatArray[0].startPos = 0; + for (int i = 0, k = 1; i < _length; i++) { + if (!line[i].equalsFormat(c)) { + c = line[i]; + _formatArray[k].setFormat(c); + _formatArray[k].startPos = i; + k++; + } + _text[i] = line[i].character; + } + + _wrapped = false; + } +} + +CompactHistoryLine::~CompactHistoryLine() +{ + if (_length > 0) { + _blockListRef.deallocate(_text); + _blockListRef.deallocate(_formatArray); + } + _blockListRef.deallocate(this); +} + +void CompactHistoryLine::getCharacters(Character *array, int size, int startColumn) +{ + Q_ASSERT(startColumn >= 0 && size >= 0); + Q_ASSERT(startColumn + size <= static_cast(getLength())); + + int formatPos = 0; + while ((formatPos + 1) < _formatLength && startColumn >= _formatArray[formatPos + 1].startPos) { + formatPos++; + } + + for (int i = startColumn; i < size + startColumn; i++) { + if ((formatPos + 1) < _formatLength && i == _formatArray[formatPos + 1].startPos) { + formatPos++; + } + array[i - startColumn] = Character(_text[i], + _formatArray[formatPos].fgColor, + _formatArray[formatPos].bgColor, + _formatArray[formatPos].rendition); + } +} + +bool CompactHistoryLine::isWrapped() const +{ + return _wrapped; +} + +void CompactHistoryLine::setWrapped(bool value) +{ + _wrapped = value; +} + +unsigned int CompactHistoryLine::getLength() const +{ + return _length; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryLine.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,57 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COMPACTHISTORYLINE_H +#define COMPACTHISTORYLINE_H + +#include + +#include "../../CharacterFormat.h" +#include "CompactHistoryBlockList.h" + +namespace Konsole +{ + +typedef QVector TextLine; + +class CompactHistoryLine +{ +public: + CompactHistoryLine(const TextLine &, CompactHistoryBlockList &blockList); + virtual ~CompactHistoryLine(); + + // custom new operator to allocate memory from custom pool instead of heap + static void *operator new(size_t size, CompactHistoryBlockList &blockList); + static void operator delete(void *); + + virtual void getCharacters(Character *array, int size, int startColumn); + virtual bool isWrapped() const; + virtual void setWrapped(bool value); + virtual unsigned int getLength() const; + +protected: + CompactHistoryBlockList &_blockListRef; + CharacterFormat *_formatArray; + int _length; + uint *_text; + int _formatLength; + bool _wrapped; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,228 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +// Own +#include "CompactHistoryScroll.h" + +#include "CompactHistoryType.h" + +using namespace Konsole; + +CompactHistoryScroll::CompactHistoryScroll(unsigned int maxLineCount) : + HistoryScroll(new CompactHistoryType(maxLineCount)), + _lines(), + _blockList(), + _maxLineCount(0) +{ + ////qDebug() << "scroll of length " << maxLineCount << " created"; + setMaxNbLines(maxLineCount); +} + +CompactHistoryScroll::~CompactHistoryScroll() +{ + qDeleteAll(_lines.begin(), _lines.end()); + _lines.clear(); +} + +void CompactHistoryScroll::addCellsVector(const TextLine &cells) +{ + CompactHistoryLine *line; + line = new (_blockList) CompactHistoryLine(cells, _blockList); + + _lines.append(line); + + if (_lines.size() > static_cast(_maxLineCount)) { + delete _lines.takeAt(0); + } +} + +void CompactHistoryScroll::addCells(const Character a[], int count) +{ + TextLine newLine(count); + std::copy(a, a + count, newLine.begin()); + addCellsVector(newLine); +} + +void CompactHistoryScroll::addLine(bool previousWrapped) +{ + CompactHistoryLine *line = _lines.last(); + ////qDebug() << "last line at address " << line; + line->setWrapped(previousWrapped); +} + +int CompactHistoryScroll::getLines() +{ + return _lines.size(); +} + +int CompactHistoryScroll::getMaxLines() +{ + return static_cast(_maxLineCount); +} + +int CompactHistoryScroll::getLineLen(int lineNumber) +{ + if ((lineNumber < 0) || (lineNumber >= _lines.size())) { + //qDebug() << "requested line invalid: 0 < " << lineNumber << " < " <<_lines.size(); + //Q_ASSERT(lineNumber >= 0 && lineNumber < _lines.size()); + return 0; + } + CompactHistoryLine *line = _lines[lineNumber]; + ////qDebug() << "request for line at address " << line; + return line->getLength(); +} + +void CompactHistoryScroll::getCells(int lineNumber, int startColumn, int count, Character buffer[]) +{ + if (count == 0) { + return; + } + Q_ASSERT(lineNumber < _lines.size()); + CompactHistoryLine *line = _lines[lineNumber]; + Q_ASSERT(startColumn >= 0); + Q_ASSERT(static_cast(startColumn) <= line->getLength() - count); + line->getCharacters(buffer, count, startColumn); +} + +void CompactHistoryScroll::setMaxNbLines(unsigned int lineCount) +{ + _maxLineCount = lineCount; + + while (_lines.size() > static_cast(lineCount)) { + delete _lines.takeAt(0); + } + ////qDebug() << "set max lines to: " << _maxLineCount; +} + +void CompactHistoryScroll::insertCellsVector(int position, const TextLine &cells) +{ + CompactHistoryLine *line = new (_blockList) CompactHistoryLine(cells, _blockList); + + _lines.insert(position, line); + + if (_lines.size() > static_cast(_maxLineCount)) { + delete _lines.takeAt(0); + } +} + +void CompactHistoryScroll::insertCells(int position, const Character a[], int count) +{ + TextLine newLine(count); + std::copy(a, a + count, newLine.begin()); + insertCellsVector(position, newLine); +} + +void CompactHistoryScroll::removeCells(int position) +{ + delete _lines.takeAt(position); +} + +void CompactHistoryScroll::setCellsAt(int position, const Character a[], int count) +{ + TextLine newLine(count); + std::copy(a, a + count, newLine.begin()); + setCellsVectorAt(position, newLine); +} + +void CompactHistoryScroll::setCellsVectorAt(int position, const TextLine &cells) +{ + CompactHistoryLine *line = new (_blockList) CompactHistoryLine(cells, _blockList); + + delete _lines.takeAt(position); + _lines.insert(position, line); +} + +void CompactHistoryScroll::setLineAt(int position, bool previousWrapped) +{ + CompactHistoryLine *line = _lines.at(position); + + line->setWrapped(previousWrapped); +} + +bool CompactHistoryScroll::isWrappedLine(int lineNumber) +{ + Q_ASSERT(lineNumber < _lines.size()); + return _lines[lineNumber]->isWrapped(); +} + +int CompactHistoryScroll::reflowLines(int columns) +{ + auto getCharacterBuffer = [](int size) { + static QVector characterBuffer(1024); + if (characterBuffer.count() < size) { + characterBuffer.resize(size); + } + + return characterBuffer.data(); + }; + + // Join the line and move the data to next line if needed + int removedLines = 0; + int currentPos = 0; + if (getLines() > MAX_REFLOW_LINES) { + currentPos = getLines() - MAX_REFLOW_LINES; + } + while (currentPos < getLines()) { + int curr_linelen = getLineLen(currentPos); + // Join wrapped line in current history position + if (isWrappedLine(currentPos) && currentPos < getLines() - 1) { + int next_linelen = getLineLen(currentPos + 1); + auto *new_line = getCharacterBuffer(curr_linelen + next_linelen); + bool new_line_property = isWrappedLine(currentPos + 1); + + // Join the lines + getCells(currentPos, 0, curr_linelen, new_line); + getCells(currentPos + 1, 0, next_linelen, new_line + curr_linelen); + + // save the new_line in history and remove the next line + setCellsAt(currentPos, new_line, curr_linelen + next_linelen); + setLineAt(currentPos, new_line_property); + removeCells(currentPos + 1); + continue; + } + + // if the current line > columns it will need a new line + if (curr_linelen > columns) { + bool removeLine = getLines() == getMaxLines(); + auto *curr_line = getCharacterBuffer(curr_linelen); + bool curr_line_property = isWrappedLine(currentPos); + getCells(currentPos, 0, curr_linelen, curr_line); + + setCellsAt(currentPos, curr_line, columns); + setLineAt(currentPos, true); + if (currentPos < getMaxLines() - 1) { + int correctPosition = (getLines() == getMaxLines()) ? 0 : 1; + insertCells(currentPos + 1, curr_line + columns, curr_linelen - columns); + setLineAt(currentPos + correctPosition, curr_line_property); + } else { + addCells(curr_line + columns, curr_linelen - columns); + addLine(curr_line_property); + currentPos--; + } + if (removeLine) { + removedLines += 1; + } + } + currentPos++; + } + return removedLines; +} + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryScroll.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,66 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COMPACTHISTORYSCROLL_H +#define COMPACTHISTORYSCROLL_H + +#include "history/HistoryScroll.h" +#include "history/compact/CompactHistoryLine.h" + +namespace Konsole +{ + +class CompactHistoryScroll : public HistoryScroll +{ + typedef QList HistoryArray; + +public: + explicit CompactHistoryScroll(unsigned int maxLineCount = 1000); + ~CompactHistoryScroll() override; + + int getLines() override; + int getMaxLines() override; + int getLineLen(int lineNumber) override; + void getCells(int lineNumber, int startColumn, int count, Character buffer[]) override; + bool isWrappedLine(int lineNumber) override; + + void addCells(const Character a[], int count) override; + void addCellsVector(const TextLine &cells) override; + void addLine(bool previousWrapped = false) override; + + void insertCellsVector(int position, const TextLine &cells) override; + void insertCells(int position, const Character a[], int count) override; + void removeCells(int position) override; + + void setMaxNbLines(unsigned int lineCount); + void setCellsAt(int position, const Character a[], int count) override; + void setCellsVectorAt(int position, const TextLine &cells) override; + void setLineAt(int position, bool previousWrapped) override; + + int reflowLines(int columns) override; + +private: + bool hasDifferentColors(const TextLine &line) const; + HistoryArray _lines; + CompactHistoryBlockList _blockList; + + unsigned int _maxLineCount; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,80 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +// Own +#include "CompactHistoryType.h" + +#include "CompactHistoryScroll.h" + +using namespace Konsole; + +// Reasonable line size +static const int LINE_SIZE = 1024; + +CompactHistoryType::CompactHistoryType(unsigned int nbLines) : + _maxLines(nbLines) +{ +} + +bool CompactHistoryType::isEnabled() const +{ + return true; +} + +int CompactHistoryType::maximumLineCount() const +{ + return _maxLines; +} + +HistoryScroll *CompactHistoryType::scroll(HistoryScroll *old) const +{ + if (old != nullptr) { + auto *newBuffer = dynamic_cast(old); + if (newBuffer != nullptr) { + newBuffer->setMaxNbLines(_maxLines); + return newBuffer; + } + + newBuffer = new CompactHistoryScroll(_maxLines); + + Character line[LINE_SIZE]; + int lines = old->getLines(); + int i = qMax((lines - (int)_maxLines - 1), 0); + for (; i < lines; i++) { + int size = old->getLineLen(i); + if (size > LINE_SIZE) { + auto tmp_line = new Character[size]; + old->getCells(i, 0, size, tmp_line); + newBuffer->addCells(tmp_line, size); + newBuffer->addLine(old->isWrappedLine(i)); + delete[] tmp_line; + } else { + old->getCells(i, 0, size, line); + newBuffer->addCells(line, size); + newBuffer->addLine(old->isWrappedLine(i)); + } + } + + delete old; + return newBuffer; + } + return new CompactHistoryScroll(_maxLines); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/compact/CompactHistoryType.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,42 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef COMPACTHISTORYTYPE_H +#define COMPACTHISTORYTYPE_H + +#include "../HistoryType.h" + +namespace Konsole +{ + +class CompactHistoryType : public HistoryType +{ +public: + explicit CompactHistoryType(unsigned int nbLines); + + bool isEnabled() const override; + int maximumLineCount() const override; + + HistoryScroll *scroll(HistoryScroll *) const override; + +protected: + unsigned int _maxLines; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryFile.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryFile.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryFile.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryFile.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,198 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +// Own +#include "HistoryFile.h" +#include +#include + +// System +#include +#include + +// Qt +#include +#include +#include + +using namespace Konsole; + +Q_GLOBAL_STATIC(QString, historyFileLocation) + +// History File /////////////////////////////////////////// +HistoryFile::HistoryFile() : + _length(0), + _fileMap(nullptr), + _readWriteBalance(0) +{ + // Determine the temp directory once + // This class is called 3 times for each "unlimited" scrollback. + // This has the down-side that users must restart to + // load changes. + if (!historyFileLocation.exists()) { + QString fileLocation; + // Validate file location + const QFileInfo fi(fileLocation); + if (fileLocation.isEmpty() || !fi.exists() || !fi.isDir() || !fi.isWritable()) { + qDebug()<<"Invalid scrollback folder "<applicationPid(), _tmpFile.handle()); +#endif + // On some systems QTemporaryFile creates unnamed file. + // Do not interfere in such cases. + if (_tmpFile.exists()) { + // Remove file entry from filesystem. Since the file + // is opened, it will still be available for reading + // and writing. This guarantees the file won't remain + // in filesystem after process termination, even when + // there was a crash. + unlink(QFile::encodeName(_tmpFile.fileName()).constData()); + } + } +} + +HistoryFile::~HistoryFile() +{ + if (_fileMap != nullptr) { + unmap(); + } +} + +//TODO: Mapping the entire file in will cause problems if the history file becomes exceedingly large, +//(ie. larger than available memory). HistoryFile::map() should only map in sections of the file at a time, +//to avoid this. +void HistoryFile::map() +{ + Q_ASSERT(_fileMap == nullptr); + + if (_tmpFile.flush()) { + Q_ASSERT(_tmpFile.size() >= _length); + _fileMap = _tmpFile.map(0, _length); + } + + //if mmap'ing fails, fall back to the read-lseek combination + if (_fileMap == nullptr) { + _readWriteBalance = 0; + //qDebug() << "mmap'ing history failed. errno = " << errno; + } +} + +void HistoryFile::unmap() +{ + Q_ASSERT(_fileMap != nullptr); + + if (_tmpFile.unmap(_fileMap)) { + _fileMap = nullptr; + } + + Q_ASSERT(_fileMap == nullptr); + +} + +void HistoryFile::add(const char *buffer, qint64 count) +{ + if (_fileMap != nullptr) { + unmap(); + } + + if (_readWriteBalance < INT_MAX) { + _readWriteBalance++; + } + + qint64 rc = 0; + + if (!_tmpFile.seek(_length)) { + perror("HistoryFile::add.seek"); + return; + } + rc = _tmpFile.write(buffer, count); + if (rc < 0) { + perror("HistoryFile::add.write"); + return; + } + _length += rc; +} + +void HistoryFile::get(char *buffer, qint64 size, qint64 loc) +{ + + if (loc < 0 || size < 0 || loc + size > _length) { + fprintf(stderr, "getHist(...,%lld,%lld): invalid args.\n", size, loc); + return; + } + + //count number of get() calls vs. number of add() calls. + //If there are many more get() calls compared with add() + //calls (decided by using MAP_THRESHOLD) then mmap the log + //file to improve performance. + if (_readWriteBalance > INT_MIN) { + _readWriteBalance--; + } + if ((_fileMap == nullptr) && _readWriteBalance < MAP_THRESHOLD) { + map(); + } + + if (_fileMap != nullptr) { + memcpy(buffer, _fileMap + loc, size); + } else { + qint64 rc = 0; + + if (!_tmpFile.seek(loc)) { + perror("HistoryFile::get.seek"); + return; + } + rc = _tmpFile.read(buffer, size); + if (rc < 0) { + perror("HistoryFile::get.read"); + return; + } + } +} + +void HistoryFile::removeLast(qint64 loc) +{ + if (loc < 0 || loc > _length) { + fprintf(stderr, "removeLast(%lld): invalid args.\n", loc); + return; + } + _length = loc; +} + +qint64 HistoryFile::len() const +{ + return _length; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryFile.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryFile.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryFile.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryFile.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,65 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYFILE_H +#define HISTORYFILE_H + +// Qt +#include + +namespace Konsole +{ + +/* + An extendable tmpfile(1) based buffer. +*/ +class HistoryFile +{ +public: + HistoryFile(); + virtual ~HistoryFile(); + + virtual void add(const char *buffer, qint64 count); + virtual void get(char *buffer, qint64 size, qint64 loc); + virtual void removeLast(qint64 loc); + virtual qint64 len() const; + + //mmaps the file in read-only mode + void map(); + //un-mmaps the file + void unmap(); + +private: + qint64 _length; + QTemporaryFile _tmpFile; + + //pointer to start of mmap'ed file data, or 0 if the file is not mmap'ed + uchar *_fileMap; + + //incremented whenever 'add' is called and decremented whenever + //'get' is called. + //this is used to detect when a large number of lines are being read and processed from the history + //and automatically mmap the file for better performance (saves the overhead of many lseek-read calls). + int _readWriteBalance; + + //when _readWriteBalance goes below this threshold, the file will be mmap'ed automatically + static const int MAP_THRESHOLD = -1000; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScroll.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScroll.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScroll.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScroll.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,41 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "HistoryScroll.h" + +#include "HistoryType.h" + +using namespace Konsole; + +HistoryScroll::HistoryScroll(HistoryType *t) : + _historyType(t) +{ +} + +HistoryScroll::~HistoryScroll() +{ + delete _historyType; +} + +bool HistoryScroll::hasScroll() +{ + return true; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollFile.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollFile.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollFile.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollFile.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,219 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "HistoryScrollFile.h" + +#include "HistoryTypeFile.h" + +/* + The history scroll makes a Row(Row(Cell)) from + two history buffers. The index buffer contains + start of line positions which refer to the cells + buffer. + + Note that index[0] addresses the second line + (line #1), while the first line (line #0) starts + at 0 in cells. +*/ + +using namespace Konsole; + +HistoryScrollFile::HistoryScrollFile() : + HistoryScroll(new HistoryTypeFile()) +{ +} + +HistoryScrollFile::~HistoryScrollFile() +{ +} + +int HistoryScrollFile::getLines() +{ + return _index.len() / sizeof(qint64); +} + +int HistoryScrollFile::getMaxLines() +{ + return getLines(); +} + +int HistoryScrollFile::getLineLen(int lineno) +{ + return (startOfLine(lineno + 1) - startOfLine(lineno)) / sizeof(Character); +} + +bool HistoryScrollFile::isWrappedLine(int lineno) +{ + if (lineno >= 0 && lineno <= getLines()) { + unsigned char flag = 0; + _lineflags.get(reinterpret_cast(&flag), sizeof(unsigned char), + (lineno)*sizeof(unsigned char)); + return flag != 0u; + } + return false; +} + +qint64 HistoryScrollFile::startOfLine(int lineno) +{ + if (lineno <= 0) { + return 0; + } + if (lineno <= getLines()) { + qint64 res = 0; + _index.get(reinterpret_cast(&res), sizeof(qint64), (lineno - 1)*sizeof(qint64)); + return res; + } + return _cells.len(); +} + +void HistoryScrollFile::getCells(int lineno, int colno, int count, Character res[]) +{ + _cells.get(reinterpret_cast(res), count * sizeof(Character), startOfLine(lineno) + colno * sizeof(Character)); +} + +void HistoryScrollFile::addCells(const Character text[], int count) +{ + _cells.add(reinterpret_cast(text), count * sizeof(Character)); +} + +void HistoryScrollFile::addLine(bool previousWrapped) +{ + qint64 locn = _cells.len(); + _index.add(reinterpret_cast(&locn), sizeof(qint64)); + unsigned char flags = previousWrapped ? 0x01 : 0x00; + _lineflags.add(reinterpret_cast(&flags), sizeof(char)); +} + +void HistoryScrollFile::insertCells(int, const Character[], int) +{ +} + +void HistoryScrollFile::removeCells(int) +{ + qint64 res = (getLines() - 2) * sizeof(qint64); + if (getLines() < 2) { + _cells.removeLast(0); + } else { + _index.get(reinterpret_cast(&res), sizeof(qint64), res); + _cells.removeLast(res); + } + res = qMax(0, getLines() - 1); + _index.removeLast(res * sizeof(qint64)); + _lineflags.removeLast(res * sizeof(unsigned char)); +} + +void HistoryScrollFile::insertCellsVector(int, const QVector &) +{ +} + +void HistoryScrollFile::setCellsAt(int, const Character text[], int count) +{ + qint64 res = (getLines() - 2) * sizeof(qint64); + if (getLines() < 2) { + _cells.removeLast(0); + } else { + _index.get(reinterpret_cast(&res), sizeof(qint64), res); + _cells.removeLast(res); + } + _cells.add(reinterpret_cast(text), count * sizeof(Character)); +} + +void HistoryScrollFile::setCellsVectorAt(int, const QVector &) +{ +} + +int HistoryScrollFile::reflowLines(int columns) +{ + HistoryFile *reflowFile = new HistoryFile; + reflowData newLine; + + auto reflowLineLen = [] (qint64 start, qint64 end) { + return (int)((end - start) / sizeof(Character)); + }; + auto setNewLine = [] (reflowData &change, qint64 index, bool lineflag) { + change.index = index; + change.lineFlag = lineflag; + }; + + // First all changes are saved on an auxiliary file, no real index is changed + int currentPos = 0; + if (getLines() > MAX_REFLOW_LINES) { + currentPos = getLines() - MAX_REFLOW_LINES; + } + while (currentPos < getLines()) { + qint64 startLine = startOfLine(currentPos); + qint64 endLine = startOfLine(currentPos + 1); + + // Join the lines if they are wrapped + while (isWrappedLine(currentPos)) { + currentPos++; + endLine = startOfLine(currentPos + 1); + } + + // Now reflow the lines + while (reflowLineLen(startLine, endLine) > columns) { + startLine += (qint64)columns * sizeof(Character); + setNewLine(newLine, startLine, true); + reflowFile->add(reinterpret_cast(&newLine), sizeof(reflowData)); + } + setNewLine(newLine, endLine, false); + reflowFile->add(reinterpret_cast(&newLine), sizeof(reflowData)); + currentPos++; + } + + // Erase data from index and flag data + if (getLines() > MAX_REFLOW_LINES) { + currentPos = getLines() - MAX_REFLOW_LINES; + _index.removeLast(currentPos * sizeof(qint64)); + _lineflags.removeLast(currentPos * sizeof(char)); + } else { + _index.removeLast(0); + _lineflags.removeLast(0); + } + + // Now save the new indexes and properties to proper files + int totalLines = reflowFile->len() / sizeof(reflowData); + currentPos = 0; + while (currentPos < totalLines) { + reflowFile->get(reinterpret_cast(&newLine), sizeof(reflowData), currentPos * sizeof(reflowData)); + + unsigned char flags = newLine.lineFlag ? 0x01 : 0x00; + _lineflags.add(reinterpret_cast(&flags), sizeof(char)); + _index.add(reinterpret_cast(&newLine.index), sizeof(qint64)); + currentPos++; + } + + delete reflowFile; + return 0; +} + +void HistoryScrollFile::setLineAt(int, bool previousWrapped) +{ + qint64 locn = qMax(0, getLines() - 1); + _index.removeLast(locn * sizeof(qint64)); + _lineflags.removeLast(locn * sizeof(unsigned char)); + + locn = _cells.len(); + _index.add(reinterpret_cast(&locn), sizeof(qint64)); + + unsigned char flags = previousWrapped ? 0x01 : 0x00; + _lineflags.add(reinterpret_cast(&flags), sizeof(char)); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollFile.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollFile.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollFile.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollFile.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,71 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYSCROLLFILE_H +#define HISTORYSCROLLFILE_H + +// History +#include "HistoryFile.h" +#include "HistoryScroll.h" + +namespace Konsole +{ + +////////////////////////////////////////////////////////////////////// +// File-based history (e.g. file log, no limitation in length) +////////////////////////////////////////////////////////////////////// + +class HistoryScrollFile : public HistoryScroll +{ +public: + explicit HistoryScrollFile(); + ~HistoryScrollFile() override; + + int getLines() override; + int getMaxLines() override; + int getLineLen(int lineno) override; + void getCells(int lineno, int colno, int count, Character res[]) override; + bool isWrappedLine(int lineno) override; + + void addCells(const Character text[], int count) override; + void addLine(bool previousWrapped = false) override; + + // Modify history + void insertCellsVector(int position, const QVector &cells) override; + void insertCells(int position, const Character a[], int count) override; + void removeCells(int position) override; + void setCellsAt(int position, const Character a[], int count) override; + void setCellsVectorAt(int position, const QVector &cells) override; + void setLineAt(int position, bool previousWrapped) override; + int reflowLines(int columns) override; + +private: + qint64 startOfLine(int lineno); + + HistoryFile _index; // lines Row(qint64) + HistoryFile _cells; // text Row(Character) + HistoryFile _lineflags; // flags Row(unsigned char) + + struct reflowData { // data to reflow lines + qint64 index; + bool lineFlag; + }; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScroll.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScroll.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScroll.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScroll.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,86 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYSCROLL_H +#define HISTORYSCROLL_H + +// Konsole +#include "../Character.h" + +// Qt +#include + +namespace Konsole +{ +////////////////////////////////////////////////////////////////////// +// Abstract base class for file and buffer versions +////////////////////////////////////////////////////////////////////// +class HistoryType; + +class HistoryScroll +{ +public: + explicit HistoryScroll(HistoryType *); + virtual ~HistoryScroll(); + + virtual bool hasScroll(); + + // access to history + virtual int getLines() = 0; + virtual int getMaxLines() = 0; + virtual int getLineLen(int lineno) = 0; + virtual void getCells(int lineno, int colno, int count, Character res[]) = 0; + virtual bool isWrappedLine(int lineNumber) = 0; + + // adding lines. + virtual void addCells(const Character a[], int count) = 0; + // convenience method - this is virtual so that subclasses can take advantage + // of QVector's implicit copying + virtual void addCellsVector(const QVector &cells) + { + addCells(cells.data(), cells.size()); + } + + virtual void addLine(bool previousWrapped = false) = 0; + + // modify history + virtual void insertCellsVector(int position, const QVector &cells) = 0; + virtual void insertCells(int position, const Character a[], int count) = 0; + virtual void removeCells(int position) = 0; + virtual void setCellsAt(int position, const Character a[], int count) = 0; + virtual void setCellsVectorAt(int position, const QVector &cells) = 0; + virtual void setLineAt(int position, bool previousWrapped) = 0; + virtual int reflowLines(int columns) = 0; + + // + // FIXME: Passing around constant references to HistoryType instances + // is very unsafe, because those references will no longer + // be valid if the history scroll is deleted. + // + const HistoryType &getType() const + { + return *_historyType; + } + +protected: + HistoryType *_historyType; + const int MAX_REFLOW_LINES = 20000; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollNone.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollNone.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollNone.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollNone.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +// Own +#include "HistoryScrollNone.h" + +#include "HistoryTypeNone.h" + +using namespace Konsole; + +// History Scroll None ////////////////////////////////////// + +HistoryScrollNone::HistoryScrollNone() : + HistoryScroll(new HistoryTypeNone()) +{ +} + +HistoryScrollNone::~HistoryScrollNone() +{ +} + +bool HistoryScrollNone::hasScroll() +{ + return false; +} + +int HistoryScrollNone::getLines() +{ + return 0; +} + +int HistoryScrollNone::getMaxLines() +{ + return 0; +} + +int HistoryScrollNone::getLineLen(int) +{ + return 0; +} + +bool HistoryScrollNone::isWrappedLine(int /*lineno*/) +{ + return false; +} + +void HistoryScrollNone::getCells(int, int, int, Character []) +{ +} + +void HistoryScrollNone::addCells(const Character [], int) +{ +} + +void HistoryScrollNone::addLine(bool) +{ +} + +void HistoryScrollNone::insertCells(int , const Character [], int) +{ +} + +void HistoryScrollNone::removeCells(int ) +{ +} + +void HistoryScrollNone::insertCellsVector(int , const QVector &) +{ +} + +void HistoryScrollNone::setCellsAt(int , const Character [], int) +{ +} + +void HistoryScrollNone::setCellsVectorAt(int , const QVector &) +{ +} + +int HistoryScrollNone::reflowLines(int) +{ + return 0; +} + +void HistoryScrollNone::setLineAt(int , bool) +{ +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollNone.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollNone.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryScrollNone.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryScrollNone.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,58 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYSCROLLNONE_H +#define HISTORYSCROLLNONE_H + +#include "HistoryScroll.h" + +namespace Konsole +{ + +////////////////////////////////////////////////////////////////////// +// Nothing-based history (no history :-) +////////////////////////////////////////////////////////////////////// +class HistoryScrollNone : public HistoryScroll +{ +public: + HistoryScrollNone(); + ~HistoryScrollNone() override; + + bool hasScroll() override; + + int getLines() override; + int getMaxLines() override; + int getLineLen(int lineno) override; + void getCells(int lineno, int colno, int count, Character res[]) override; + bool isWrappedLine(int lineno) override; + + void addCells(const Character a[], int count) override; + void addLine(bool previousWrapped = false) override; + + // Modify history (do nothing here) + void insertCellsVector(int position, const QVector &cells) override; + void insertCells(int position, const Character a[], int count) override; + void removeCells(int position) override; + void setCellsAt(int position, const Character a[], int count) override; + void setCellsVectorAt(int position, const QVector &cells) override; + void setLineAt(int position, bool previousWrapped) override; + int reflowLines(int) override; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryType.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryType.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryType.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryType.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,37 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "HistoryType.h" + +using namespace Konsole; + +HistoryType::HistoryType() +{ +} + +HistoryType::~HistoryType() +{ +} + +bool HistoryType::isUnlimited() const +{ + return maximumLineCount() == -1; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeFile.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeFile.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeFile.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeFile.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,71 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "HistoryTypeFile.h" +#include "HistoryFile.h" +#include "HistoryScrollFile.h" + +using namespace Konsole; + +// Reasonable line size +static const int LINE_SIZE = 1024; + +HistoryTypeFile::HistoryTypeFile() +{ +} + +bool HistoryTypeFile::isEnabled() const +{ + return true; +} + +HistoryScroll *HistoryTypeFile::scroll(HistoryScroll *old) const +{ + if (dynamic_cast(old) != nullptr) { + return old; // Unchanged. + } + HistoryScroll *newScroll = new HistoryScrollFile(); + + Character line[LINE_SIZE]; + int lines = (old != nullptr) ? old->getLines() : 0; + for (int i = 0; i < lines; i++) { + int size = old->getLineLen(i); + if (size > LINE_SIZE) { + auto tmp_line = new Character[size]; + old->getCells(i, 0, size, tmp_line); + newScroll->addCells(tmp_line, size); + newScroll->addLine(old->isWrappedLine(i)); + delete [] tmp_line; + } else { + old->getCells(i, 0, size, line); + newScroll->addCells(line, size); + newScroll->addLine(old->isWrappedLine(i)); + } + } + + delete old; + return newScroll; +} + +int HistoryTypeFile::maximumLineCount() const +{ + return -1; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeFile.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeFile.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeFile.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeFile.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,39 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYTYPEFILE_H +#define HISTORYTYPEFILE_H + +#include "HistoryType.h" + +namespace Konsole +{ + +class HistoryTypeFile : public HistoryType +{ +public: + explicit HistoryTypeFile(); + + bool isEnabled() const override; + int maximumLineCount() const override; + + HistoryScroll *scroll(HistoryScroll *) const override; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryType.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryType.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryType.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryType.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,55 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYTYPE_H +#define HISTORYTYPE_H + +#include "HistoryScroll.h" + +namespace Konsole +{ + +class HistoryType +{ +public: + HistoryType(); + virtual ~HistoryType(); + + /** + * Returns true if the history is enabled ( can store lines of output ) + * or false otherwise. + */ + virtual bool isEnabled() const = 0; + /** + * Returns the maximum number of lines which this history type + * can store or -1 if the history can store an unlimited number of lines. + */ + virtual int maximumLineCount() const = 0; + /** + * Converts from one type of HistoryScroll to another or if given the + * same type, returns it. + */ + virtual HistoryScroll *scroll(HistoryScroll *) const = 0; + /** + * Returns true if the history size is unlimited. + */ + bool isUnlimited() const; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeNone.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeNone.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeNone.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeNone.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "HistoryTypeNone.h" +#include "HistoryScrollNone.h" + +using namespace Konsole; + +HistoryTypeNone::HistoryTypeNone() +{ +} + +bool HistoryTypeNone::isEnabled() const +{ + return false; +} + +HistoryScroll *HistoryTypeNone::scroll(HistoryScroll *old) const +{ + delete old; + return new HistoryScrollNone(); +} + +int HistoryTypeNone::maximumLineCount() const +{ + return 0; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeNone.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeNone.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/history/HistoryTypeNone.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/history/HistoryTypeNone.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,39 @@ +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef HISTORYTYPENONE_H +#define HISTORYTYPENONE_H + +#include "HistoryType.h" + +namespace Konsole +{ + +class HistoryTypeNone : public HistoryType +{ +public: + HistoryTypeNone(); + + bool isEnabled() const override; + int maximumLineCount() const override; + + HistoryScroll *scroll(HistoryScroll *) const override; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/HistorySearch.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/HistorySearch.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/HistorySearch.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/HistorySearch.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,348 @@ +/* + Copyright 2013 Christian Surlykke + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ +#include +#include +#include + +#include "TerminalCharacterDecoder.h" +#include "Emulation.h" +#include "HistorySearch.h" + +HistorySearch::HistorySearch(EmulationPtr emulation, + QString searchText, + bool forwards, + bool isLastForwards, + int startColumn, + int startLine, + QObject *parent) : + QObject(parent), + m_emulation(emulation), + m_searchText(searchText), + m_forwards(forwards), + m_isLastForwards(isLastForwards), + m_startColumn(startColumn), + m_startLine(startLine), + m_foundStartColumn(0), + m_foundStartLine(0), + m_foundEndColumn(0), + m_foundEndLine(0), + m_loseChinese(0), + m_matchChinese(0), + m_lastBackwardsPosition(-1) +{ +} + +HistorySearch::~HistorySearch() +{ +} + +void HistorySearch::search(int currBackwardsPosition, int lastFoundStartColumn, int lastFoundStartLine) +{ + bool found = false; + + m_currBackwardsPosition = currBackwardsPosition; + m_lastFoundStartColumn = lastFoundStartColumn; + m_lastFoundStartLine = lastFoundStartLine; + + if (!m_searchText.isEmpty()) { + if (m_forwards) { + found = search(m_startColumn, m_startLine, -1, m_emulation->lineCount()) || search(0, 0, m_startColumn, m_startLine); + } else { + found = search(0, 0, m_startColumn, m_startLine) || search(m_startColumn, m_startLine, -1, m_emulation->lineCount()); + } + + if (found) { + emit matchFound(m_foundStartColumn, m_foundStartLine, m_foundEndColumn, m_foundEndLine, m_lastBackwardsPosition, m_loseChinese, m_matchChinese); + } else { + emit noMatchFound(); + } + } + + deleteLater(); +} + +bool HistorySearch::search(int startColumn, int startLine, int endColumn, int endLine) +{ + qDebug() << "search from" << startColumn << "," << startLine + << "to" << endColumn << "," << endLine; + + int linesRead = 0; + int linesToRead = endLine - startLine + 1; + + qDebug() << "linesToRead:" << linesToRead; + + QString stringBackwardsAfterForwards; + QTextStream backwardsAfterForwardsStream(&stringBackwardsAfterForwards); + + QString string; + QTextStream searchStream(&string); + // We read process history from (and including) startLine to (and including) endLine in + // blocks of at most 10K lines so that we do not use unhealthy amounts of memory + int blockSize; + while ((blockSize = qMin(10000, linesToRead - linesRead)) > 0) { + + PlainTextDecoder decoder; + decoder.begin(&searchStream); + decoder.setRecordLinePositions(true); + + // Calculate lines to read and read them + int blockStartLine = m_forwards ? startLine + linesRead : endLine - linesRead - blockSize + 1; + int blockEndLine = blockStartLine + blockSize - 1; + m_emulation->writeToStream(&decoder, blockStartLine, blockEndLine); + + decoder.end(); + + // We search between startColumn in the first line of the string and endColumn in the last + // line of the string. First we calculate the position (in the string) of endColumn in the + // last line of the string + int endPosition; + + // The String that Emulator.writeToStream produces has a newline at the end, and so ends with an + // empty line - we ignore that. + int numberOfLinesInString = decoder.linePositions().size() - 1; + if (numberOfLinesInString > 0 && endColumn > -1) { + endPosition = decoder.linePositions().at(numberOfLinesInString - 1) + endColumn; + qDebug() << "endPosition 0:" << endPosition; + if (!m_forwards) { + qDebug() << "numberOfLinesInString string.size():" << string.size(); + if ((endPosition - string.size()) > 0) { + endPosition = string.size(); + qDebug() << "endPosition 1:" << endPosition; + } + else { + qDebug() << "m_currBackwardsPosition:" << m_currBackwardsPosition; + //上次进行正向搜索,当前采用反向搜索 + if (m_isLastForwards) { + PlainTextDecoder decoder; + decoder.begin(&backwardsAfterForwardsStream); + decoder.setRecordLinePositions(false); + int blockStartLine = 0; + int blockEndLine = m_lastFoundStartLine-1; + if (-1 == blockEndLine) { + blockEndLine = m_emulation->lineCount(); + } + m_emulation->writeToStream(&decoder, blockStartLine, blockEndLine); + + decoder.end(); + + endPosition = stringBackwardsAfterForwards.length() + endColumn; + qDebug() << "endPosition 2:" << endPosition; + } + else { + qDebug() << "endPosition now is:" << endPosition; + //endPosition值比上次搜索结果的位置还大,则重新计算endPosition + if (m_currBackwardsPosition > -1) { + if ((endPosition - m_currBackwardsPosition > m_searchText.length())) { + endPosition = m_currBackwardsPosition - m_searchText.length(); + qDebug() << "endPosition > m_currBackwardsPosition 111:" << endPosition; + } + else { + endPosition = m_currBackwardsPosition; + qDebug() << "endPosition < m_currBackwardsPosition 222:" << endPosition; + } + } + qDebug() << "endPosition 3:" << endPosition; + } + } + + //保存上次反向搜索的结束位置 + if (endPosition != -1) { + m_lastBackwardsPosition = endPosition; + qDebug() << "backwards save m_lastBackwardsPosition 1:" << m_lastBackwardsPosition; + } + } + } else { + if (m_forwards) { + endPosition = string.size(); + qDebug() << "endPosition 4:" << endPosition; + } + else { + endPosition = endColumn; + //保存上次反向搜索的结束位置 + if (endPosition != -1) { + m_lastBackwardsPosition = endPosition; + qDebug() << "backwards save m_lastBackwardsPosition2:" << m_lastBackwardsPosition; + } + qDebug() << "endPosition 5!!!!!!!!!!!! == endColumn:" << endPosition; + } + } + + qDebug() << "At last, endPosition is:" << endPosition; + + // So now we can log for m_regExp in the string between startColumn and endPosition + int matchStart = -1; + if (m_forwards) { + matchStart = string.indexOf(m_searchText, startColumn, Qt::CaseSensitive); + qDebug() << "forwards matchStart:" << matchStart << ", startColumn:" << startColumn; + if (matchStart >= endPosition) { + matchStart = -1; + qDebug() << "forwards matchStart == -1:" << matchStart; + } + } else { + qDebug() << "string:" << string; + qDebug() << "m_lastBackwardsPosition:" << m_lastBackwardsPosition; + qDebug() << "string length:" << string.length() << ", endPosition:" << endPosition; + //考虑了查找结果在第一行的情况 + if (0 == startLine && startLine == endLine && endPosition > endColumn) { + endPosition = endColumn; + } + + matchStart = string.lastIndexOf(m_searchText, endPosition - 1, Qt::CaseSensitive); + if (matchStart != -1) { + m_lastBackwardsPosition = matchStart; + qDebug() << "backwards save m_lastBackwardsPosition3:" << m_lastBackwardsPosition; + } + qDebug() << "backwards matchStart:" << matchStart << ", startColumn:" << startColumn; +// if (matchStart < startColumn) { +// matchStart = -1; +// qDebug() << "backwards matchStart == -1:" << matchStart; +// } + } + + if (matchStart > -1) { + int matchEnd = matchStart + m_searchText.length() - 1; + qDebug() << "Found in string from" << matchStart << "to" << matchEnd; + + // Translate startPos and endPos to startColum, startLine, endColumn and endLine in history. + int startLineNumberInString = findLineNumberInString(decoder.linePositions(), matchStart); + m_foundStartColumn = matchStart - decoder.linePositions().at(startLineNumberInString); + m_foundStartLine = startLineNumberInString + startLine + linesRead; + + int endLineNumberInString = findLineNumberInString(decoder.linePositions(), matchEnd); + m_foundEndColumn = matchEnd - decoder.linePositions().at(endLineNumberInString); + m_foundEndLine = endLineNumberInString + startLine + linesRead; + + //特殊情况, 反向查找需要重新计算下endPosition并保存到m_lastBackwardsPosition + if (!m_forwards) { + //考虑了查找结果在第一行的情况 + if (0 == m_foundStartLine && m_foundStartLine == m_foundEndLine) { + m_lastBackwardsPosition = m_foundStartColumn; + qDebug() << "!!! ready to change m_foundStartColumn: " << m_foundStartColumn; + qDebug() << "!!! ready to change m_foundEndColumn: " << m_foundEndColumn; + qDebug() << "!!! ready to change m_foundStartLine: " << m_foundStartLine; + qDebug() << "!!! ready to change m_foundEndLine: " << m_foundEndLine; + } + else if (-1 == endPosition || -1 == endColumn) { + QString stringAfterSearch; + QTextStream afterSearchStream(&stringAfterSearch); + PlainTextDecoder decoder; + decoder.begin(&afterSearchStream); + decoder.setRecordLinePositions(false); + int blockStartLine = 0; + int blockEndLine = m_foundStartLine-1; + if (-1 == blockEndLine) { + blockEndLine = m_emulation->lineCount(); + } + m_emulation->writeToStream(&decoder, blockStartLine, blockEndLine); + + decoder.end(); + + m_lastBackwardsPosition = stringAfterSearch.length() + m_foundStartColumn; + qDebug() << "!!! ready to change m_lastBackwardsPosition: " << m_lastBackwardsPosition; + } + } + + //看看能不能从m_foundEndColumn m_foundEndLine和m_foundStartColumn m_foundStartLine推算出目前查找的字符串index + //在正向查找的时候,保存当前indexOf(search, totalString) 到 m_lastBackwardsPosition + // 总共读了多少行,记录下字符串总长度,加上当前偏移量 + + qDebug() << "m_foundStartColumn" << m_foundStartColumn + << "m_foundStartLine" << m_foundStartLine + << "m_foundEndColumn" << m_foundEndColumn + << "m_foundEndLine" << m_foundEndLine; + + /***add begin by ut001121 zhangmeng 20200515 修复BUG22626***/ + /** + string: aaa-------------bbbbbbbbbbbbb-------ccc + | || | + match pos:| |matchStart matchEnd + lose pos: loseStart loseEnd | + line pos: lineStart lineEnd + + 存在特殊情况:一个完整的物理行显示在终端被分成多个逻辑行 + */ + //中文字符正则表达式 + QRegExp regEx("[\u4E00-\u9FA5,《。》、?;:【】~!¥()]+"); + + //未匹配的串-物理行开始和结束位置 + int loseEnd = matchStart; + int loseStart = string.lastIndexOf('\n', loseEnd) + 1; + //qDebug() << "loseStart" << loseStart << "loseEnd" << loseEnd ; + +// if (loseStart < 0 || loseStart > loseEnd) { +// qDebug() << "========loseStart and loseEnd is not expected" << loseStart << loseEnd; +// exit(-1); +// } + + //未匹配的串-物理行字符串 + QString loseStr = string.mid(loseStart, loseEnd - loseStart); + //qDebug() << "loseStr" << loseStr << m_lineChinese; + + //未匹配的串-逻辑行字符串 + int loseEndLineNumberInString = findLineNumberInString(decoder.linePositions(), loseEnd); + int loseEndColumn = matchStart - decoder.linePositions().at(loseEndLineNumberInString); + QString logicLoseStr = loseStr.right(loseEndColumn); + m_loseChinese = logicLoseStr.count(regEx); + //qDebug() << "logicLoseStr" << logicLoseStr << m_lineChinese << loseEndColumn; + + //匹配内容是否跨多个逻辑行 + if (m_foundStartLine == m_foundEndLine) { + /* + * 单逻辑行匹配情况 + * 匹配字符的当前逻辑行:(匹配字符-当前逻辑行-开始位置)--->(匹配字符-当前逻辑行-结束位置 + */ + //匹配字符包含中文字符数量 + QString txt = m_searchText;//m_regExp.pattern(); + m_matchChinese = txt.count(regEx); + m_matchChinese += m_loseChinese; + } else { + /* + * 多逻辑行匹配情况 + * 匹配字符的尾行逻辑行:(匹配字符-尾行逻辑行-开始位置)--->(匹配字符-尾行逻辑行-结束位置) + */ + QString macthStr = string.mid(loseStart, matchEnd - loseStart + 1); + QString tailMacthStr = macthStr.right(m_foundEndColumn + 1); + //qDebug() << "tailMacthStr" << tailMacthStr; + m_matchChinese = tailMacthStr.count(regEx) ; + /* + * 跨行匹配不计算m_loseChinese + * m_matchChinese += m_loseChinese; + */ + } + /***add end by ut001121***/ + return true; + } + + + linesRead += blockSize; + } + + qDebug() << "Not found"; + return false; +} + + +int HistorySearch::findLineNumberInString(QList linePositions, int position) +{ + int lineNum = 0; + while (lineNum + 1 < linePositions.size() && linePositions[lineNum + 1] <= position) + lineNum++; + + return lineNum; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/HistorySearch.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/HistorySearch.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/HistorySearch.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/HistorySearch.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,84 @@ +/* + Copyright 2013 Christian Surlykke + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ +#ifndef TASK_H +#define TASK_H + +#include +#include +#include + +#include +#include + +#include "Emulation.h" +#include "TerminalCharacterDecoder.h" + +using namespace Konsole; + +typedef QPointer EmulationPtr; + +class HistorySearch : public QObject +{ + Q_OBJECT + +public: + explicit HistorySearch(EmulationPtr emulation, + QString searchText, + bool forwards, + bool isLastForwards, + int startColumn, + int startLine, + QObject* parent); + + ~HistorySearch() override; + + void search(int currBackwardsPosition, int lastFoundStartColumn, int lastFoundStartLine); + +signals: + void matchFound(int startColumn, int startLine, int endColumn, int endLine, int lastBackwardsPosition, int loseChinese, int matchChinese); + void noMatchFound(); + +private: + bool search(int startColumn, int startLine, int endColumn, int endLine); + int findLineNumberInString(QList linePositions, int position); + + + EmulationPtr m_emulation; + QString m_searchText; + bool m_forwards; + bool m_isLastForwards; + int m_startColumn; + int m_startLine; + + int m_foundStartColumn; + int m_foundStartLine; + int m_foundEndColumn; + int m_foundEndLine; + + int m_loseChinese; + int m_matchChinese; + int m_currBackwardsPosition; + int m_lastBackwardsPosition; + + int m_lastFoundStartColumn; + int m_lastFoundStartLine; +}; + +#endif /* TASK_H */ + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/default.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/default.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/default.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/default.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,184 @@ +# [README.default.Keytab] Default Keyboard Table +# +# To customize your keyboard, copy this file to something +# ending with .keytab and change it to meet you needs. +# Please read the README.KeyTab and the README.keyboard +# in this case. +# +# -------------------------------------------------------------- + +keyboard "Default (XFree 4)" + +# -------------------------------------------------------------- +# +# Note that this particular table is a "risc" version made to +# ease customization without bothering with obsolete details. +# See VT100.keytab for the more hairy stuff. +# +# -------------------------------------------------------------- + +# common keys + +key Escape : "\E" + +key Tab -Shift : "\t" +key Tab +Shift+Ansi : "\E[Z" +key Tab +Shift-Ansi : "\t" +key Backtab +Ansi : "\E[Z" +key Backtab -Ansi : "\t" + +key Return-Shift-NewLine : "\r" +key Return-Shift+NewLine : "\r\n" + +key Return+Shift : "\EOM" + +# Backspace and Delete codes are preserving CTRL-H. +# +# old +# Backspace without CTRL sends '^H'; this matches XTerm behaviour +# BS, hex \x08, \b +# new +# Backspace without CTRL sends '^?'; this matches gnome-terminal +key Backspace -Control : "\x7f" + +# Match xterm behaviour: Backspace sends '^?' when Control is pressed +key Backspace +Control : "\x7f" + +# Arrow keys in VT52 mode +# shift up/down are reserved for scrolling. +# shift left/right are reserved for switching between tabs (this is hardcoded). + +key Up -Shift-Ansi : "\EA" +key Down -Shift-Ansi : "\EB" +key Right-Shift-Ansi : "\EC" +key Left -Shift-Ansi : "\ED" + +# Arrow keys in ANSI mode with Application - and Normal Cursor Mode) + +key Up -Shift-AnyMod+Ansi+AppCuKeys : "\EOA" +key Down -Shift-AnyMod+Ansi+AppCuKeys : "\EOB" +key Right -Shift-AnyMod+Ansi+AppCuKeys : "\EOC" +key Left -Shift-AnyMod+Ansi+AppCuKeys : "\EOD" + +key Up -Shift-AnyMod+Ansi-AppCuKeys : "\E[A" +key Down -Shift-AnyMod+Ansi-AppCuKeys : "\E[B" +key Right -Shift-AnyMod+Ansi-AppCuKeys : "\E[C" +key Left -Shift-AnyMod+Ansi-AppCuKeys : "\E[D" + +key Up -Shift+AnyMod+Ansi : "\E[1;*A" +key Down -Shift+AnyMod+Ansi : "\E[1;*B" +key Right -Shift+AnyMod+Ansi : "\E[1;*C" +key Left -Shift+AnyMod+Ansi : "\E[1;*D" + +key Up +Shift+AppScreen : "\E[1;*A" +key Down +Shift+AppScreen : "\E[1;*B" +key Left +Shift+AppScreen : "\E[1;*D" +key Right +Shift+AppScreen : "\E[1;*C" + +# Keypad keys with NumLock ON +# (see "Numeric Keypad" section at http://www.nw.com/nw/WWW/products/wizcon/vt100.html ) +# +# Not enabled for now because it breaks the keypad in Vim. +# +#key 0 +KeyPad+AppKeyPad : "\EOp" +#key 1 +KeyPad+AppKeyPad : "\EOq" +#key 2 +KeyPad+AppKeyPad : "\EOr" +#key 3 +KeyPad+AppKeyPad : "\EOs" +#key 4 +KeyPad+AppKeyPad : "\EOt" +#key 5 +KeyPad+AppKeyPad : "\EOu" +#key 6 +KeyPad+AppKeyPad : "\EOv" +#key 7 +KeyPad+AppKeyPad : "\EOw" +#key 8 +KeyPad+AppKeyPad : "\EOx" +#key 9 +KeyPad+AppKeyPad : "\EOy" +#key + +KeyPad+AppKeyPad : "\EOl" +#key - +KeyPad+AppKeyPad : "\EOm" +#key . +KeyPad+AppKeyPad : "\EOn" +#key * +KeyPad+AppKeyPad : "\EOM" +#key Enter +KeyPad+AppKeyPad : "\r" + +# Keypad keys with NumLock Off +key Up -Shift+Ansi+AppCuKeys+KeyPad : "\EOA" +key Down -Shift+Ansi+AppCuKeys+KeyPad : "\EOB" +key Right -Shift+Ansi+AppCuKeys+KeyPad : "\EOC" +key Left -Shift+Ansi+AppCuKeys+KeyPad : "\EOD" + +key Up -Shift+Ansi-AppCuKeys+KeyPad : "\E[A" +key Down -Shift+Ansi-AppCuKeys+KeyPad : "\E[B" +key Right -Shift+Ansi-AppCuKeys+KeyPad : "\E[C" +key Left -Shift+Ansi-AppCuKeys+KeyPad : "\E[D" + +key Home +AppCuKeys+KeyPad : "\EOH" +key End +AppCuKeys+KeyPad : "\EOF" +key Home -AppCuKeys+KeyPad : "\E[H" +key End -AppCuKeys+KeyPad : "\E[F" + +key Insert +KeyPad : "\E[2~" +key Delete +KeyPad : "\E[3~" +key PgUp -Shift+KeyPad : "\E[5~" +key PgDown -Shift+KeyPad : "\E[6~" + +# other grey PC keys + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Home -AnyMod-AppCuKeys : "\E[H" +key End -AnyMod-AppCuKeys : "\E[F" +key Home -AnyMod+AppCuKeys : "\EOH" +key End -AnyMod+AppCuKeys : "\EOF" +key Home +AnyMod : "\E[1;*H" +key End +AnyMod : "\E[1;*F" + +key Insert -AnyMod : "\E[2~" +key Delete -AnyMod : "\E[3~" +key Insert +AnyMod : "\E[2;*~" +key Delete +AnyMod : "\E[3;*~" + +key PgUp -Shift-AnyMod : "\E[5~" +key PgDown -Shift-AnyMod : "\E[6~" +key PgUp -Shift+AnyMod : "\E[5;*~" +key PgDown -Shift+AnyMod : "\E[6;*~" + +# Function keys +key F1 -AnyMod : "\EOP" +key F2 -AnyMod : "\EOQ" +key F3 -AnyMod : "\EOR" +key F4 -AnyMod : "\EOS" +key F5 -AnyMod : "\E[15~" +key F6 -AnyMod : "\E[17~" +key F7 -AnyMod : "\E[18~" +key F8 -AnyMod : "\E[19~" +key F9 -AnyMod : "\E[20~" +key F10 -AnyMod : "\E[21~" +key F11 -AnyMod : "\E[23~" +key F12 -AnyMod : "\E[24~" + +key F1 +AnyMod : "\EO*P" +key F2 +AnyMod : "\EO*Q" +key F3 +AnyMod : "\EO*R" +key F4 +AnyMod : "\EO*S" +key F5 +AnyMod : "\E[15;*~" +key F6 +AnyMod : "\E[17;*~" +key F7 +AnyMod : "\E[18;*~" +key F8 +AnyMod : "\E[19;*~" +key F9 +AnyMod : "\E[20;*~" +key F10 +AnyMod : "\E[21;*~" +key F11 +AnyMod : "\E[23;*~" +key F12 +AnyMod : "\E[24;*~" + +# Work around dead keys + +key Space +Control : "\x00" + +# Some keys are used by konsole to cause operations. +# The scroll* operations refer to the history buffer. + +key Up +Shift-AppScreen : scrollLineUp +key PgUp +Shift-AppScreen : scrollPageUp +key Home +Shift-AppScreen : scrollUpToTop +key Down +Shift-AppScreen : scrollLineDown +key PgDown +Shift-AppScreen : scrollPageDown +key End +Shift-AppScreen : scrollDownToBottom + +key ScrollLock : scrollLock + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/historic/vt100.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/historic/vt100.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/historic/vt100.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/historic/vt100.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,133 @@ +# [vt100.keytab] Konsole Keyboard Table (VT100 keys) +# +# -------------------------------------------------------------- + +keyboard "vt100 (historical)" + +# -------------------------------------------------------------- +# +# This configuration table allows to customize the +# meaning of the keys. +# +# The syntax is that each entry has the form : +# +# "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) +# +# Keynames are those defined in with the +# "Qt::Key_" removed. (We'd better insert the list here) +# +# Mode names are : +# +# - Shift +# - Alt +# - Control +# +# The VT100 emulation has two modes that can affect the +# sequences emitted by certain keys. These modes are +# under control of the client program. +# +# - Newline : effects Return and Enter key. +# - Application : effects Up and Down key. +# +# - Ansi : effects Up and Down key (This is for VT52, really). +# +# Operations are +# +# - scrollUpLine +# - scrollUpPage +# - scrollDownLine +# - scrollDownPage +# +# - emitSelection +# +# If the key is not found here, the text of the +# key event as provided by QT is emitted, possibly +# preceeded by ESC if the Alt key is pressed. +# +# -------------------------------------------------------------- + +key Escape : "\E" +key Tab : "\t" + +# VT100 can add an extra \n after return. +# The NewLine mode is set by an escape sequence. + +key Return-NewLine : "\r" +key Return+NewLine : "\r\n" + +# Some desperately try to save the ^H. + +key Backspace : "\x7f" +key Delete : "\E[3~" + +# These codes are for the VT52 mode of VT100 +# The Ansi mode (i.e. VT100 mode) is set by +# an escape sequence + +key Up -Shift-Ansi : "\EA" +key Down -Shift-Ansi : "\EB" +key Right-Shift-Ansi : "\EC" +key Left -Shift-Ansi : "\ED" + +# VT100 emits a mode bit together +# with the arrow keys.The AppCuKeys +# mode is set by an escape sequence. + +key Up -Shift+Ansi+AppCuKeys : "\EOA" +key Down -Shift+Ansi+AppCuKeys : "\EOB" +key Right-Shift+Ansi+AppCuKeys : "\EOC" +key Left -Shift+Ansi+AppCuKeys : "\EOD" + +key Up -Shift+Ansi-AppCuKeys : "\E[A" +key Down -Shift+Ansi-AppCuKeys : "\E[B" +key Right-Shift+Ansi-AppCuKeys : "\E[C" +key Left -Shift+Ansi-AppCuKeys : "\E[D" + +# function keys (FIXME: make pf1-pf4) + +key F1 : "\E[11~" +key F2 : "\E[12~" +key F3 : "\E[13~" +key F4 : "\E[14~" +key F5 : "\E[15~" + +key F6 : "\E[17~" +key F7 : "\E[18~" +key F8 : "\E[19~" +key F9 : "\E[20~" +key F10 : "\E[21~" +key F11 : "\E[23~" +key F12 : "\E[24~" + +key Home : "\E[H" +key End : "\E[F" + +key PgUp -Shift : "\E[5~" +key PgDown -Shift : "\E[6~" +key Insert -Shift : "\E[2~" + +# Keypad-Enter. See comment on Return above. + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Space +Control : "\x00" + +# some of keys are used by konsole. + +key Up +Shift : scrollLineUp +key PgUp +Shift : scrollPageUp +key Down +Shift : scrollLineDown +key PgDown +Shift : scrollPageDown + +key ScrollLock : scrollLock + + +#---------------------------------------------------------- + +# keypad characters as offered by Qt +# cannot be recognized as such. + +#---------------------------------------------------------- + +# Following other strings as emitted by konsole. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/historic/x11r5.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/historic/x11r5.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/historic/x11r5.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/historic/x11r5.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,71 @@ +# [x11r5.Keytab] Keyboard Table for X11 R5 + +keyboard "XTerm (XFree 3.x.x)" + +# -------------------------------------------------------------- +# +# Note that this particular table is a "risc" version made to +# ease customization without bothering with obsolete details. +# See VT100.keytab for the more hairy stuff. +# +# -------------------------------------------------------------- + +# common keys + +key Escape : "\E" +key Tab : "\t" + +key Return : "\r" + +# Backspace and Delete codes are preserving CTRL-H. + +key Backspace : "\x7f" + +# cursor keys + +key Up -Shift : "\EOA" +key Down -Shift : "\EOB" +key Right -Shift : "\EOC" +key Left -Shift : "\EOD" + +# other grey PC keys + +key Enter : "\r" + +key Home : "\E[1~" +key Insert-Shift : "\E[2~" +key Delete : "\E[3~" +key End : "\E[4~" +key PgUp -Shift : "\E[5~" +key PgDown -Shift : "\E[6~" + +# function keys + +key F1 : "\E[11~" +key F2 : "\E[12~" +key F3 : "\E[13~" +key F4 : "\E[14~" +key F5 : "\E[15~" +key F6 : "\E[17~" +key F7 : "\E[18~" +key F8 : "\E[19~" +key F9 : "\E[20~" +key F10 : "\E[21~" +key F11 : "\E[23~" +key F12 : "\E[24~" + +# Work around dead keys + +key Space +Control : "\x00" + +# Some keys are used by konsole to cause operations. +# The scroll* operations refer to the history buffer. + +key Up +Shift : scrollLineUp +key PgUp +Shift : scrollPageUp +key Down +Shift : scrollLineDown +key PgDown +Shift : scrollPageDown + +key ScrollLock : scrollLock + +# keypad characters are not offered differently by Qt. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/linux.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/linux.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/linux.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/linux.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,138 @@ +# [linux.keytab] Konsole Keyboard Table (Linux console keys) +# +# -------------------------------------------------------------- + +# NOT TESTED, MAY NEED SOME CLEANUPS +keyboard "Linux console" + +# -------------------------------------------------------------- +# +# This configuration table allows to customize the +# meaning of the keys. +# +# The syntax is that each entry has the form : +# +# "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) +# +# Keynames are those defined in with the +# "Qt::Key_" removed. (We'd better insert the list here) +# +# Mode names are : +# +# - Shift +# - Alt +# - Control +# +# The VT100 emulation has two modes that can affect the +# sequences emitted by certain keys. These modes are +# under control of the client program. +# +# - Newline : effects Return and Enter key. +# - Application : effects Up and Down key. +# +# - Ansi : effects Up and Down key (This is for VT52, really). +# +# Operations are +# +# - scrollUpLine +# - scrollUpPage +# - scrollDownLine +# - scrollDownPage +# +# - emitSelection +# +# If the key is not found here, the text of the +# key event as provided by QT is emitted, possibly +# preceeded by ESC if the Alt key is pressed. +# +# -------------------------------------------------------------- + +key Escape : "\E" +key Tab : "\t" + +# VT100 can add an extra \n after return. +# The NewLine mode is set by an escape sequence. + +key Return-NewLine : "\r" +key Return+NewLine : "\r\n" + +# Some desperately try to save the ^H. + +key Backspace : "\x7f" +key Delete : "\E[3~" + +# These codes are for the VT52 mode of VT100 +# The Ansi mode (i.e. VT100 mode) is set by +# an escape sequence + +key Up -Shift-Ansi : "\EA" +key Down -Shift-Ansi : "\EB" +key Right-Shift-Ansi : "\EC" +key Left -Shift-Ansi : "\ED" + +# VT100 emits a mode bit together +# with the arrow keys.The AppCuKeys +# mode is set by an escape sequence. + +key Up -Shift+Ansi+AppCuKeys : "\EOA" +key Down -Shift+Ansi+AppCuKeys : "\EOB" +key Right-Shift+Ansi+AppCuKeys : "\EOC" +key Left -Shift+Ansi+AppCuKeys : "\EOD" + +key Up -Shift+Ansi-AppCuKeys : "\E[A" +key Down -Shift+Ansi-AppCuKeys : "\E[B" +key Right-Shift+Ansi-AppCuKeys : "\E[C" +key Left -Shift+Ansi-AppCuKeys : "\E[D" + +key Up -Shift+AnyMod+Ansi : "\E[1;*A" +key Down -Shift+AnyMod+Ansi : "\E[1;*B" +key Right -Shift+AnyMod+Ansi : "\E[1;*C" +key Left -Shift+AnyMod+Ansi : "\E[1;*D" + +# linux functions keys F1-F5 differ from xterm + +key F1 : "\E[[A" +key F2 : "\E[[B" +key F3 : "\E[[C" +key F4 : "\E[[D" +key F5 : "\E[[E" + +key F6 : "\E[17~" +key F7 : "\E[18~" +key F8 : "\E[19~" +key F9 : "\E[20~" +key F10 : "\E[21~" +key F11 : "\E[23~" +key F12 : "\E[24~" + +key Home : "\E[1~" +key End : "\E[4~" + +key PgUp -Shift : "\E[5~" +key PgDown -Shift : "\E[6~" +key Insert -Shift : "\E[2~" + +# Keypad-Enter. See comment on Return above. + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Space +Control : "\x00" + +# some of keys are used by konsole. + +key Up +Shift : scrollLineUp +key PgUp +Shift : scrollPageUp +key Down +Shift : scrollLineDown +key PgDown +Shift : scrollPageDown + +key ScrollLock : scrollLock + +#---------------------------------------------------------- + +# keypad characters as offered by Qt +# cannot be recognized as such. + +#---------------------------------------------------------- + +# Following other strings as emitted by konsole. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/macbook.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/macbook.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/macbook.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/macbook.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,175 @@ +# [README.default.Keytab] Buildin Keyboard Table +# +# To customize your keyboard, copy this file to something +# ending with .keytab and change it to meet you needs. +# Please read the README.KeyTab and the README.keyboard +# in this case. +# +# -------------------------------------------------------------- + +keyboard "Default (XFree 4)" + +# -------------------------------------------------------------- +# +# Note that this particular table is a "risc" version made to +# ease customization without bothering with obsolete details. +# See VT100.keytab for the more hairy stuff. +# +# -------------------------------------------------------------- + +# common keys + +key Escape : "\x1b" + +#key Control : "^" + +key Tab -Shift : "\t" +key Tab +Shift+Ansi : "\E[Z" +key Tab +Shift-Ansi : "\t" +key Backtab +Ansi : "\E[Z" +key Backtab -Ansi : "\t" + +key Return-Shift-NewLine : "\r" +key Return-Shift+NewLine : "\r\n" + +key Return+Shift : "\EOM" + +# Backspace and Delete codes are preserving CTRL-H. + +key Backspace : "\x7f" + +# Arrow keys in VT52 mode +# shift up/down are reserved for scrolling. +# shift left/right are reserved for switching between tabs (this is hardcoded). + + +# Command + C +# on mac - Control=Command, Meta=Ctrl +# do not use Control+C for interrupt signal - it's used for "Copy to clipboard" +#key Control +C : "\x03" +key Meta +C: "\x03" + + +# Arrow keys in ANSI mode with Application - and Normal Cursor Mode) + +key Up -Shift+Ansi-AppCuKeys : "\E[A" +key Down -Shift+Ansi-AppCuKeys : "\E[B" +key Right-Shift+Ansi-AppCuKeys : "\E[C" +key Left -Shift+Ansi-AppCuKeys : "\E[D" + +key Up -Ansi : "\E[1;*A" +key Down -Ansi : "\E[1;*B" +key Right -Ansi : "\E[1;*C" +key Left -Ansi : "\E[1;*D" + +#key Up -Shift-Ansi : "\EA" +#key Down -Shift-Ansi : "\EB" +#key Right-Shift-Ansi : "\EC" +#key Left -Shift-Ansi : "\ED" + +#key Up -Shift-AnyMod+Ansi-AppCuKeys : "\E[A" +#key Down -Shift-AnyMod+Ansi-AppCuKeys : "\E[B" +#key Right -Shift-AnyMod+Ansi-AppCuKeys : "\E[C" +#key Left -Shift-AnyMod+Ansi-AppCuKeys : "\E[D" + +#key Up -Shift-AnyMod+Ansi-AppCuKeys : "\EOA" +#key Down -Shift-AnyMod+Ansi-AppCuKeys : "\EOB" +#key Right -Shift-AnyMod+Ansi-AppCuKeys : "\EOC" +#key Left -Shift-AnyMod+Ansi-AppCuKeys : "\EOD" + +#key Up -Shift-AnyMod+Ansi : "\E[1;*A" +#key Down -Shift-AnyMod+Ansi : "\E[1;*B" +#key Right -Shift-AnyMod+Ansi : "\E[1;*C" +#key Left -Shift-AnyMod+Ansi : "\E[1;*D" + +# other grey PC keys + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Home -AnyMod -AppCuKeys : "\E[H" +key End -AnyMod -AppCuKeys : "\E[F" +key Home -AnyMod +AppCuKeys : "\EOH" +key End -AnyMod +AppCuKeys : "\EOF" +key Home +AnyMod : "\E[1;*H" +key End +AnyMod : "\E[1;*F" + +key Insert -AnyMod : "\E[2~" +key Delete -AnyMod : "\E[3~" +key Insert +AnyMod : "\E[2;*~" +key Delete +AnyMod : "\E[3;*~" + +key PgUp -Shift-AnyMod : "\E[5~" +key PgDown -Shift-AnyMod : "\E[6~" +key PgUp -Shift+AnyMod : "\E[5;*~" +key PgDown -Shift+AnyMod : "\E[6;*~" + +# Function keys +#key F1 -AnyMod : "\EOP" +#key F2 -AnyMod : "\EOQ" +#key F3 -AnyMod : "\EOR" +#key F4 -AnyMod : "\EOS" +#define ALT_KP_0 "\033Op" +#define ALT_KP_1 "\033Oq" +#define ALT_KP_2 "\033Or" +#define ALT_KP_3 "\033Os" +#define ALT_KP_4 "\033Ot" +#define ALT_KP_5 "\033Ou" +#define ALT_KP_6 "\033Ov" +#define ALT_KP_7 "\033Ow" +#define ALT_KP_8 "\033Ox" +#define ALT_KP_9 "\033Oy" + +key F1 -AnyMod : "\EOP" +key F2 -AnyMod : "\EOQ" +key F3 -AnyMod : "\EOR" +key F4 -AnyMod : "\EOS" +key F5 -AnyMod : "\EOT" +key F6 -AnyMod : "\EOU" +key F7 -AnyMod : "\EOV" +key F8 -AnyMod : "\EOW" +key F9 -AnyMod : "\EOX" +key F10 -AnyMod : "\EOY" + +#key F5 -AnyMod : "\E[15~" +#key F6 -AnyMod : "\E[17~" +#key F7 -AnyMod : "\E[18~" +#key F8 -AnyMod : "\E[19~" +#key F9 -AnyMod : "\E[20~" +#key F10 -AnyMod : "\E[21~" +#key F11 -AnyMod : "\E[23~" +#key F12 -AnyMod : "\E[24~" + +#key F1 +AnyMod : "\EO*P" +#key F2 +AnyMod : "\EO*Q" +#key F3 +AnyMod : "\EO*R" +#key F4 +AnyMod : "\EO*S" +#key F5 +AnyMod : "\E[15;*~" +#key F6 +AnyMod : "\E[17;*~" +#key F7 +AnyMod : "\E[18;*~" +#key F8 +AnyMod : "\E[19;*~" +#key F9 +AnyMod : "\E[20;*~" +#key F10 +AnyMod : "\E[21;*~" +#key F11 +AnyMod : "\E[23;*~" +#key F12 +AnyMod : "\E[24;*~" + +# Work around dead keys + +key Space +Control : "\x00" + +# Some keys are used by konsole to cause operations. +# The scroll* operations refer to the history buffer. + +key Up +Shift-AppScreen : scrollLineUp +key PgUp +Shift-AppScreen : scrollPageUp +key Down +Shift-AppScreen : scrollLineDown +key PgDown +Shift-AppScreen : scrollPageDown + +#key Up +Shift : scrollLineUp +#key Prior +Shift : scrollPageUp +#key Down +Shift : scrollLineDown +#key Next +Shift : scrollPageDown + +key ScrollLock : scrollLock + +# keypad characters are not offered differently by Qt. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/README deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/README --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/README 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/README 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +[README.KeyTab] + +The keytabs offered in the Options/Keyboard menu are +taken from from configurations files with a *.keytab +pattern either located in $KDEDIR/share/apps/konsole +or ~/.kde/share/apps/konsole. + +Keytabs allow to configure the behavior of konsole +on keyboard events, especially for functions keys. +Please have a look into the README.keyboard file, too. + +The syntax is that each entry has the form : + + "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) + +Keynames are those defined in with the +"Qt::Key_" prefix removed. + +Mode names are: + + - Shift : Shift Key pressed + - Alt : Alt Key pressed + - Control : Control Key pressed + + ( The VT100 emulation has modes that can affect the + sequences emitted by certain keys. These modes are + under control of the client program. + + - Newline : effects Return and Enter key. + - Application : effects Up and Down key. + - Ansi : effects Up and Down key (This is for VT52, really). + + Since sending a state to a program that has set the state + itself is positivly wrong and obsolete design, better forget + about this nasty detail. I may well remove this "feature" + in a future clean up round. ) + + A "+" preceeding a Modename means the Key is pressed. + A "-" preceeding a Modename means the Key is not pressed. + If no mode is given it means don't care. + + Note that the combination of Key and Modes (set/reset) + has to be unique. This means, that + + key A + Shift : "A" + key A : "a" + + will not accept the small letter "a" rule as expected, + one has to add a "- Shift" to the last clause. Use + the stdout/stderr dianostics of konsole when modifying + keytabs to find problems like this. + +Operations are + + - scrollUpLine : scroll up one line in the history log + - scrollUpPage : scroll up one page in the history log + - scrollDownLine : scroll down one line in the history log + - scrollDownPage : scroll down one page in the history log + - emitClipboard : "paste" the current clipboard + - emitSelection : "paste" the current selection + +Strings have the syntax of C strings, +one may use the following escapes: + + - \E - escape + - \\ - backslash + - \" - double quote + - \t - tab + - \r - return + - \n - newline + - \b - backspace + - \xHH - where HH are two hex digits diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/solaris.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/solaris.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/solaris.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/solaris.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,108 @@ +# [solaris.keytab] Konsole Keyboard Table +# + +keyboard "Solaris console" + +# -------------------------------------------------------------- +# +# This configuration table allows to customize the +# meaning of the keys. +# +# The syntax is that each entry has the form : +# +# "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) +# +# Keynames are those defined in with the +# "Qt::Key_" removed. (We'd better insert the list here) +# +# Mode names are : +# +# - Shift +# - Alt +# - Control +# +# The VT100 emulation has two modes that can affect the +# sequences emitted by certain keys. These modes are +# under control of the client program. +# +# +# - Newline : effects Return and Enter key. +# - Application : effects Up and Down key. +# +# - Ansi : effects Up and Down key (This is for VT52, really). +# +# Operations are +# +# - scrollUpLine +# - scrollUpPage +# - scrollDownLine +# - scrollDownPage +# +# - emitSelection +# +# If the key is not found here, the text of the +# key event as provided by QT is emitted, possibly +# preceeded by ESC if the Alt key is pressed. +# +# -------------------------------------------------------------- + +key Escape : "\E" +key Tab : "\t" + +key Return-Alt : "\r" +key Return+Alt : "\E\r" + +# Backspace and Delete codes are preserving CTRL-H. + +key Backspace : "\x08" +#key Delete : "\x7F" + +# cursor keys + +key Up -Shift : "\EOA" +key Down -Shift : "\EOB" +key Right -Shift : "\EOC" +key Left -Shift : "\EOD" + +# other grey PC keys + +key Enter : "\r" + +key Home : "\E[1~" +key Insert-Shift : "\E[2~" +key Delete : "\E[3~" +key End : "\E[4~" +key PgUp -Shift : "\E[5~" +key PgDown -Shift : "\E[6~" + +# function keys + +key F1 : "\E[11~" +key F2 : "\E[12~" +key F3 : "\E[13~" +key F4 : "\E[14~" +key F5 : "\E[15~" +key F6 : "\E[17~" +key F7 : "\E[18~" +key F8 : "\E[19~" +key F9 : "\E[20~" +key F10 : "\E[21~" +key F11 : "\E[23~" +key F12 : "\E[24~" + +# Work around dead keys + +key Space +Control : "\x00" + +# Some keys are used by konsole to cause operations. +# The scroll* operations refer to the history buffer. + +#key Left +Shift : prevSession +#key Right +Shift : nextSession +key Up +Shift : scrollLineUp +key PgUp +Shift : scrollPageUp +key Down +Shift : scrollLineDown +key PgDown +Shift : scrollPageDown +#key Insert+Shift : emitSelection + +# keypad characters are not offered differently by Qt. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/vt420pc.keytab deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/vt420pc.keytab --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kb-layouts/vt420pc.keytab 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kb-layouts/vt420pc.keytab 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,168 @@ +# +# NOTE: This keyboard binding is not installed because it +# apparently doesn't work with actual VT420 systems +# (see BUG:170220) +# +# [vt420pc.keytab] Konsole Keyboard Table (VT420pc keys) +# adapted by ferdinand gassauer f.gassauer@aon.at +# Nov 2000 +# +################################################################ +# +# The escape sequences emmited by the +# keys Shift+F1 to Shift+F12 might not fit your needs +# +################# IMPORTANT NOTICE ############################# +# the key bindings (Kcontrol -> look and feel -> keybindgs) +# overrule the settings in this file. The key bindings might be +# changed by the user WITHOUT notification of the maintainer of +# the keytab file. Konsole will not work as expected by +# the maintainer of the keytab file. +################################################################ +# +# -------------------------------------------------------------- + +keyboard "DEC VT420 Terminal" + +# -------------------------------------------------------------- +# +# This configuration table allows to customize the +# meaning of the keys. +# +# The syntax is that each entry has the form : +# +# "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) +# +# Keynames are those defined in with the +# "Qt::Key_" removed. (We'd better insert the list here) +# +# Mode names are : +# +# - Shift +# - Alt +# - Control +# +# The VT100 emulation has two modes that can affect the +# sequences emitted by certain keys. These modes are +# under control of the client program. +# +# - Newline : effects Return and Enter key. +# - Application : effects Up and Down key. +# +# - Ansi : effects Up and Down key (This is for VT52, really). +# +# Operations are +# +# - scrollUpLine +# - scrollUpPage +# - scrollDownLine +# - scrollDownPage +# +# - emitSelection +# +# If the key is not found here, the text of the +# key event as provided by QT is emitted, possibly +# preceeded by ESC if the Alt key is pressed. +# +# -------------------------------------------------------------- + +key Escape : "\E" +key Tab : "\t" +key Backtab: "\E[Z" + +# VT100 can add an extra \n after return. +# The NewLine mode is set by an escape sequence. + +key Return-NewLine : "\r" +key Return+NewLine : "\r\n" + +# Some desperately try to save the ^H. +# may be not everyone wants this + +key Backspace : "\x08" # Control H +key Delete : "\x7f" + +# These codes are for the VT420pc +# The Ansi mode (i.e. VT100 mode) is set by +# an escape sequence + +key Up -Shift-Ansi : "\EA" +key Down -Shift-Ansi : "\EB" +key Right-Shift-Ansi : "\EC" +key Left -Shift-Ansi : "\ED" + +# VT100 emits a mode bit together +# with the arrow keys.The AppCuKeys +# mode is set by an escape sequence. + +key Up -Shift+Ansi+AppCuKeys : "\EOA" +key Down -Shift+Ansi+AppCuKeys : "\EOB" +key Right-Shift+Ansi+AppCuKeys : "\EOC" +key Left -Shift+Ansi+AppCuKeys : "\EOD" + +key Up -Shift+Ansi-AppCuKeys : "\E[A" +key Down -Shift+Ansi-AppCuKeys : "\E[B" +key Right-Shift+Ansi-AppCuKeys : "\E[C" +key Left -Shift+Ansi-AppCuKeys : "\E[D" + +# function keys + +key F1 -Shift : "\E[11~" +key F2 -Shift : "\E[12~" +key F3 -Shift : "\E[13~" +key F4 -Shift : "\E[14~" +key F5 -Shift : "\E[15~" +key F6 -Shift : "\E[17~" +key F7 -Shift : "\E[18~" +key F8 -Shift : "\E[19~" +key F9 -Shift : "\E[20~" +key F10-Shift : "\E[21~" +key F11-Shift : "\E[23~" +key F12-Shift : "\E[24~" +# +# Shift F1-F12 +# +key F1 +Shift : "\E[11;2~" +key F2 +Shift : "\E[12;2~" +key F3 +Shift : "\E[13;2~" +key F4 +Shift : "\E[14;2~" +key F5 +Shift : "\E[15;2~" +key F6 +Shift : "\E[17;2~" +key F7 +Shift : "\E[18;2~" +key F8 +Shift : "\E[19;2~" +key F9 +Shift : "\E[20;2~" +key F10+Shift : "\E[21;2~" +key F11+Shift : "\E[23;2~" +key F12+Shift : "\E[24;2~" + +key Home : "\E[H" +key End : "\E[F" + +key PgUp -Shift : "\E[5~" +key PgDown -Shift : "\E[6~" +key Insert -Shift : "\E[2~" + +# Keypad-Enter. See comment on Return above. + +key Enter+NewLine : "\r\n" +key Enter-NewLine : "\r" + +key Space +Control : "\x00" + +# some of keys are used by konsole. + +key Up +Shift : scrollLineUp +key PgUp +Shift : scrollPageUp +key Down +Shift : scrollLineDown +key PgDown +Shift : scrollPageDown + +key ScrollLock : scrollLock + +#---------------------------------------------------------- + +# keypad characters as offered by Qt +# cannot be recognized as such. + +#---------------------------------------------------------- + +# Following other strings as emitted by konsole. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/KeyboardTranslator.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/KeyboardTranslator.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/KeyboardTranslator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/KeyboardTranslator.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,940 @@ +/* + This source file is part of Konsole, a terminal emulator. + + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "KeyboardTranslator.h" + +// System +#include +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include + +#include "tools.h" + +// KDE +//#include +//#include +//#include + +using namespace Konsole; + + +const QByteArray KeyboardTranslatorManager::defaultTranslatorText( +"keyboard \"Fallback Key Translator\"\n" +"key Tab : \"\\t\"" +); + +#ifdef Q_OS_MAC +// On Mac, Qt::ControlModifier means Cmd, and MetaModifier means Ctrl +const Qt::KeyboardModifier KeyboardTranslator::CTRL_MOD = Qt::MetaModifier; +#else +const Qt::KeyboardModifier KeyboardTranslator::CTRL_MOD = Qt::ControlModifier; +#endif + +KeyboardTranslatorManager::KeyboardTranslatorManager() + : _haveLoadedAll(false) +{ +} +KeyboardTranslatorManager::~KeyboardTranslatorManager() +{ + qDeleteAll(_translators); +} +QString KeyboardTranslatorManager::findTranslatorPath(const QString& name) +{ + return QString(get_kb_layout_dir() + name + QLatin1String(".keytab")); + //return KGlobal::dirs()->findResource("data","konsole/"+name+".keytab"); +} + +void KeyboardTranslatorManager::findTranslators() +{ + QDir dir(get_kb_layout_dir()); + QStringList filters; + filters << QLatin1String("*.keytab"); + dir.setNameFilters(filters); + QStringList list = dir.entryList(filters); +// QStringList list = KGlobal::dirs()->findAllResources("data", +// "konsole/*.keytab", +// KStandardDirs::NoDuplicates); + + // add the name of each translator to the list and associated + // the name with a null pointer to indicate that the translator + // has not yet been loaded from disk + QStringListIterator listIter(list); + while (listIter.hasNext()) + { + QString translatorPath = listIter.next(); + + QString name = QFileInfo(translatorPath).baseName(); + + if ( !_translators.contains(name) ) + _translators.insert(name,0); + } + + _haveLoadedAll = true; +} + +const KeyboardTranslator* KeyboardTranslatorManager::findTranslator(const QString& name) +{ + if ( name.isEmpty() ) + return defaultTranslator(); + + if ( _translators.contains(name) && _translators[name] != 0 ) + return _translators[name]; + + KeyboardTranslator* translator = loadTranslator(name); + + if ( translator != nullptr ) + _translators[name] = translator; + else if ( !name.isEmpty() ) + qDebug() << "Unable to load translator" << name; + + return translator; +} + +bool KeyboardTranslatorManager::saveTranslator(const KeyboardTranslator* translator) +{ +qDebug() << "KeyboardTranslatorManager::saveTranslator" << "unimplemented"; +Q_UNUSED(translator); +#if 0 + const QString path = KGlobal::dirs()->saveLocation("data","konsole/")+translator->name() + +".keytab"; + + //kDebug() << "Saving translator to" << path; + + QFile destination(path); + if (!destination.open(QIODevice::WriteOnly | QIODevice::Text)) + { + qDebug() << "Unable to save keyboard translation:" + << destination.errorString(); + return false; + } + + { + KeyboardTranslatorWriter writer(&destination); + writer.writeHeader(translator->description()); + + QListIterator iter(translator->entries()); + while ( iter.hasNext() ) + writer.writeEntry(iter.next()); + } + + destination.close(); +#endif + return true; +} + +KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(const QString& name) +{ + const QString& path = findTranslatorPath(name); + + QFile source(path); + qDebug() << __FUNCTION__ << path << endl; + if (name.isEmpty() || !source.open(QIODevice::ReadOnly | QIODevice::Text)) + return nullptr; + + return loadTranslator(&source,name); +} + +const KeyboardTranslator* KeyboardTranslatorManager::defaultTranslator() +{ + // Try to find the default.keytab file if it exists, otherwise + // fall back to the hard-coded one + const KeyboardTranslator* translator = findTranslator(QLatin1String("default")); + if (!translator) + { + QBuffer textBuffer; + textBuffer.setData(defaultTranslatorText); + textBuffer.open(QIODevice::ReadOnly); + translator = loadTranslator(&textBuffer,QLatin1String("fallback")); + } + return translator; +} + +KeyboardTranslator* KeyboardTranslatorManager::loadTranslator(QIODevice* source,const QString& name) +{ + KeyboardTranslator* translator = new KeyboardTranslator(name); + KeyboardTranslatorReader reader(source); + translator->setDescription( reader.description() ); + while ( reader.hasNextEntry() ) + translator->addEntry(reader.nextEntry()); + + source->close(); + + if ( !reader.parseError() ) + { + return translator; + } + else + { + delete translator; + return nullptr; + } +} + +KeyboardTranslatorWriter::KeyboardTranslatorWriter(QIODevice* destination) +: _destination(destination) +{ + Q_ASSERT( destination && destination->isWritable() ); + + _writer = new QTextStream(_destination); +} +KeyboardTranslatorWriter::~KeyboardTranslatorWriter() +{ + delete _writer; +} +void KeyboardTranslatorWriter::writeHeader( const QString& description ) +{ + *_writer << "keyboard \"" << description << '\"' << '\n'; +} +void KeyboardTranslatorWriter::writeEntry( const KeyboardTranslator::Entry& entry ) +{ + QString result; + if ( entry.command() != KeyboardTranslator::NoCommand ) + result = entry.resultToString(); + else + result = QLatin1Char('\"') + entry.resultToString() + QLatin1Char('\"'); + + *_writer << QLatin1String("key ") << entry.conditionToString() << QLatin1String(" : ") << result << QLatin1Char('\n'); +} + + +// each line of the keyboard translation file is one of: +// +// - keyboard "name" +// - key KeySequence : "characters" +// - key KeySequence : CommandName +// +// KeySequence begins with the name of the key ( taken from the Qt::Key enum ) +// and is followed by the keyboard modifiers and state flags ( with + or - in front +// of each modifier or flag to indicate whether it is required ). All keyboard modifiers +// and flags are optional, if a particular modifier or state is not specified it is +// assumed not to be a part of the sequence. The key sequence may contain whitespace +// +// eg: "key Up+Shift : scrollLineUp" +// "key Next-Shift : "\E[6~" +// +// (lines containing only whitespace are ignored, parseLine assumes that comments have +// already been removed) +// + +KeyboardTranslatorReader::KeyboardTranslatorReader( QIODevice* source ) + : _source(source) + , _hasNext(false) +{ + // read input until we find the description + while ( _description.isEmpty() && !source->atEnd() ) + { + QList tokens = tokenize( QString::fromUtf8(source->readLine()) ); + if ( !tokens.isEmpty() && tokens.first().type == Token::TitleKeyword ) + _description = tokens[1].text; + } + // read first entry (if any) + readNext(); +} +void KeyboardTranslatorReader::readNext() +{ + // find next entry + while ( !_source->atEnd() ) + { + const QList& tokens = tokenize( QString::fromUtf8(_source->readLine()) ); + if ( !tokens.isEmpty() && tokens.first().type == Token::KeyKeyword ) + { + KeyboardTranslator::States flags = KeyboardTranslator::NoState; + KeyboardTranslator::States flagMask = KeyboardTranslator::NoState; + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + Qt::KeyboardModifiers modifierMask = Qt::NoModifier; + + int keyCode = Qt::Key_unknown; + + decodeSequence(tokens[1].text.toLower(), + keyCode, + modifiers, + modifierMask, + flags, + flagMask); + + KeyboardTranslator::Command command = KeyboardTranslator::NoCommand; + QByteArray text; + + // get text or command + if ( tokens[2].type == Token::OutputText ) + { + text = tokens[2].text.toLocal8Bit(); + } + else if ( tokens[2].type == Token::Command ) + { + // identify command + if (!parseAsCommand(tokens[2].text,command)) + qDebug() << "Command" << tokens[2].text << "not understood."; + } + + KeyboardTranslator::Entry newEntry; + newEntry.setKeyCode( keyCode ); + newEntry.setState( flags ); + newEntry.setStateMask( flagMask ); + newEntry.setModifiers( modifiers ); + newEntry.setModifierMask( modifierMask ); + newEntry.setText( text ); + newEntry.setCommand( command ); + + _nextEntry = newEntry; + + _hasNext = true; + + return; + } + } + + _hasNext = false; +} + +bool KeyboardTranslatorReader::parseAsCommand(const QString& text,KeyboardTranslator::Command& command) +{ + if ( text.compare(QLatin1String("erase"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::EraseCommand; + else if ( text.compare(QLatin1String("scrollpageup"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::ScrollPageUpCommand; + else if ( text.compare(QLatin1String("scrollpagedown"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::ScrollPageDownCommand; + else if ( text.compare(QLatin1String("scrolllineup"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::ScrollLineUpCommand; + else if ( text.compare(QLatin1String("scrolllinedown"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::ScrollLineDownCommand; + else if ( text.compare(QLatin1String("scrolllock"),Qt::CaseInsensitive) == 0 ) + command = KeyboardTranslator::ScrollLockCommand; + else if ( text.compare(QLatin1String("scrolluptotop"),Qt::CaseInsensitive) == 0) + command = KeyboardTranslator::ScrollUpToTopCommand; + else if ( text.compare(QLatin1String("scrolldowntobottom"),Qt::CaseInsensitive) == 0) + command = KeyboardTranslator::ScrollDownToBottomCommand; + else + return false; + + return true; +} + +bool KeyboardTranslatorReader::decodeSequence(const QString& text, + int& keyCode, + Qt::KeyboardModifiers& modifiers, + Qt::KeyboardModifiers& modifierMask, + KeyboardTranslator::States& flags, + KeyboardTranslator::States& flagMask) +{ + bool isWanted = true; + //bool endOfItem = false; + QString buffer; + + Qt::KeyboardModifiers tempModifiers = modifiers; + Qt::KeyboardModifiers tempModifierMask = modifierMask; + KeyboardTranslator::States tempFlags = flags; + KeyboardTranslator::States tempFlagMask = flagMask; + + for ( int i = 0 ; i < text.count() ; i++ ) + { + const QChar& ch = text[i]; + bool isFirstLetter = i == 0; + bool isLastLetter = ( i == text.count()-1 ); + bool endOfItem = true; + if ( ch.isLetterOrNumber() ) + { + endOfItem = false; + buffer.append(ch); + } else if ( isFirstLetter ) + { + buffer.append(ch); + } + + if ( (endOfItem || isLastLetter) && !buffer.isEmpty() ) + { + Qt::KeyboardModifier itemModifier = Qt::NoModifier; + int itemKeyCode = 0; + KeyboardTranslator::State itemFlag = KeyboardTranslator::NoState; + + if ( parseAsModifier(buffer,itemModifier) ) + { + tempModifierMask |= itemModifier; + + if ( isWanted ) + tempModifiers |= itemModifier; + } + else if ( parseAsStateFlag(buffer,itemFlag) ) + { + tempFlagMask |= itemFlag; + + if ( isWanted ) + tempFlags |= itemFlag; + } + else if ( parseAsKeyCode(buffer,itemKeyCode) ) + keyCode = itemKeyCode; + else + qDebug() << "Unable to parse key binding item:" << buffer; + + buffer.clear(); + } + + // check if this is a wanted / not-wanted flag and update the + // state ready for the next item + if ( ch == QLatin1Char('+') ) + isWanted = true; + else if ( ch == QLatin1Char('-') ) + isWanted = false; + } + + modifiers = tempModifiers; + modifierMask = tempModifierMask; + flags = tempFlags; + flagMask = tempFlagMask; + + return true; +} + +bool KeyboardTranslatorReader::parseAsModifier(const QString& item , Qt::KeyboardModifier& modifier) +{ + if ( item == QLatin1String("shift") ) + modifier = Qt::ShiftModifier; + else if ( item == QLatin1String("ctrl") || item == QLatin1String("control") ) + modifier = Qt::ControlModifier; + else if ( item == QLatin1String("alt") ) + modifier = Qt::AltModifier; + else if ( item == QLatin1String("meta") ) + modifier = Qt::MetaModifier; + else if ( item == QLatin1String("keypad") ) + modifier = Qt::KeypadModifier; + else + return false; + + return true; +} +bool KeyboardTranslatorReader::parseAsStateFlag(const QString& item , KeyboardTranslator::State& flag) +{ + if ( item == QLatin1String("appcukeys") || item == QLatin1String("appcursorkeys") ) + flag = KeyboardTranslator::CursorKeysState; + else if ( item == QLatin1String("ansi") ) + flag = KeyboardTranslator::AnsiState; + else if ( item == QLatin1String("newline") ) + flag = KeyboardTranslator::NewLineState; + else if ( item == QLatin1String("appscreen") ) + flag = KeyboardTranslator::AlternateScreenState; + else if ( item == QLatin1String("anymod") || item == QLatin1String("anymodifier") ) + flag = KeyboardTranslator::AnyModifierState; + else if ( item == QLatin1String("appkeypad") ) + flag = KeyboardTranslator::ApplicationKeypadState; + else + return false; + + return true; +} +bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode) +{ + QKeySequence sequence = QKeySequence::fromString(item); + if ( !sequence.isEmpty() ) + { + keyCode = sequence[0]; + + if ( sequence.count() > 1 ) + { + qDebug() << "Unhandled key codes in sequence: " << item; + } + } + // additional cases implemented for backwards compatibility with KDE 3 + else if ( item == QLatin1String("prior") ) + keyCode = Qt::Key_PageUp; + else if ( item == QLatin1String("next") ) + keyCode = Qt::Key_PageDown; + else + return false; + + return true; +} + +QString KeyboardTranslatorReader::description() const +{ + return _description; +} +bool KeyboardTranslatorReader::hasNextEntry() +{ + return _hasNext; +} +KeyboardTranslator::Entry KeyboardTranslatorReader::createEntry( const QString& condition , + const QString& result ) +{ + QString entryString = QString::fromLatin1("keyboard \"temporary\"\nkey "); + entryString.append(condition); + entryString.append(QLatin1String(" : ")); + + // if 'result' is the name of a command then the entry result will be that command, + // otherwise the result will be treated as a string to echo when the key sequence + // specified by 'condition' is pressed + KeyboardTranslator::Command command; + if (parseAsCommand(result,command)) + entryString.append(result); + else + entryString.append(QLatin1Char('\"') + result + QLatin1Char('\"')); + + QByteArray array = entryString.toUtf8(); + QBuffer buffer(&array); + buffer.open(QIODevice::ReadOnly); + KeyboardTranslatorReader reader(&buffer); + + KeyboardTranslator::Entry entry; + if ( reader.hasNextEntry() ) + entry = reader.nextEntry(); + + return entry; +} + +KeyboardTranslator::Entry KeyboardTranslatorReader::nextEntry() +{ + Q_ASSERT( _hasNext ); + KeyboardTranslator::Entry entry = _nextEntry; + readNext(); + return entry; +} +bool KeyboardTranslatorReader::parseError() +{ + return false; +} +QList KeyboardTranslatorReader::tokenize(const QString& line) +{ + QString text = line; + + // remove comments + bool inQuotes = false; + int commentPos = -1; + for (int i=text.length()-1;i>=0;i--) + { + QChar ch = text[i]; + if (ch == QLatin1Char('\"')) + inQuotes = !inQuotes; + else if (ch == QLatin1Char('#') && !inQuotes) + commentPos = i; + } + if (commentPos != -1) + text.remove(commentPos,text.length()); + + text = text.simplified(); + + // title line: keyboard "title" + static QRegExp title(QLatin1String("keyboard\\s+\"(.*)\"")); + // key line: key KeySequence : "output" + // key line: key KeySequence : command + static QRegExp key(QLatin1String("key\\s+([\\w\\+\\s\\-\\*\\.]+)\\s*:\\s*(\"(.*)\"|\\w+)")); + + QList list; + if ( text.isEmpty() ) + { + return list; + } + + if ( title.exactMatch(text) ) + { + Token titleToken = { Token::TitleKeyword , QString() }; + Token textToken = { Token::TitleText , title.capturedTexts().at(1) }; + + list << titleToken << textToken; + } + else if ( key.exactMatch(text) ) + { + Token keyToken = { Token::KeyKeyword , QString() }; + Token sequenceToken = { Token::KeySequence , key.capturedTexts().value(1).remove(QLatin1Char(' ')) }; + + list << keyToken << sequenceToken; + + if ( key.capturedTexts().at(3).isEmpty() ) + { + // capturedTexts()[2] is a command + Token commandToken = { Token::Command , key.capturedTexts().at(2) }; + list << commandToken; + } + else + { + // capturedTexts()[3] is the output string + Token outputToken = { Token::OutputText , key.capturedTexts().at(3) }; + list << outputToken; + } + } + else + { + qDebug() << "Line in keyboard translator file could not be understood:" << text; + } + + return list; +} + +QList KeyboardTranslatorManager::allTranslators() +{ + if ( !_haveLoadedAll ) + { + findTranslators(); + } + + return _translators.keys(); +} + +KeyboardTranslator *KeyboardTranslatorManager::getTranslator(const QString &name) +{ + if ( name.isEmpty() ) { + // Try to find the default.keytab file if it exists, otherwise + // fall back to the hard-coded one + KeyboardTranslator *translator = loadTranslator(QLatin1String("default")); + if (!translator) { + QBuffer textBuffer; + textBuffer.setData(defaultTranslatorText); + textBuffer.open(QIODevice::ReadOnly); + translator = loadTranslator(&textBuffer, QLatin1String("fallback")); + } + return translator; + } + + if ( _translators.contains(name) && _translators[name] != 0 ) + return _translators[name]; + + KeyboardTranslator *translator = loadTranslator(name); + + if ( translator != 0 ) + _translators[name] = translator; + else if ( !name.isEmpty() ) + qDebug() << "Unable to load translator" << name; + + return translator; +} + +KeyboardTranslator::Entry::Entry() +: _keyCode(0) +, _modifiers(Qt::NoModifier) +, _modifierMask(Qt::NoModifier) +, _state(NoState) +, _stateMask(NoState) +, _command(NoCommand) +{ +} + +bool KeyboardTranslator::Entry::operator==(const Entry& rhs) const +{ + return _keyCode == rhs._keyCode && + _modifiers == rhs._modifiers && + _modifierMask == rhs._modifierMask && + _state == rhs._state && + _stateMask == rhs._stateMask && + _command == rhs._command && + _text == rhs._text; +} + +bool KeyboardTranslator::Entry::matches(int keyCode , + Qt::KeyboardModifiers modifiers, + States testState) const +{ +#ifdef Q_OS_MAC + // On Mac, arrow keys are considered part of keypad. Ignore that. + modifiers &= ~Qt::KeypadModifier; +#endif + + if ( _keyCode != keyCode ) + return false; + + if ( (modifiers & _modifierMask) != (_modifiers & _modifierMask) ) + return false; + + // if modifiers is non-zero, the 'any modifier' state is implicit + if ( (modifiers & ~Qt::KeypadModifier) != 0 ) + testState |= AnyModifierState; + + if ( (testState & _stateMask) != (_state & _stateMask) ) + return false; + + // special handling for the 'Any Modifier' state, which checks for the presence of + // any or no modifiers. In this context, the 'keypad' modifier does not count. + bool anyModifiersSet = modifiers != 0 && modifiers != Qt::KeypadModifier; + bool wantAnyModifier = _state & KeyboardTranslator::AnyModifierState; + if ( _stateMask & KeyboardTranslator::AnyModifierState ) + { + if ( wantAnyModifier != anyModifiersSet ) + return false; + } + + return true; +} +QByteArray KeyboardTranslator::Entry::escapedText(bool expandWildCards,Qt::KeyboardModifiers modifiers) const +{ + QByteArray result(text(expandWildCards,modifiers)); + + for ( int i = 0 ; i < result.count() ; i++ ) + { + char ch = result[i]; + char replacement = 0; + + switch ( ch ) + { + case 27 : replacement = 'E'; break; + case 8 : replacement = 'b'; break; + case 12 : replacement = 'f'; break; + case 9 : replacement = 't'; break; + case 13 : replacement = 'r'; break; + case 10 : replacement = 'n'; break; + default: + // any character which is not printable is replaced by an equivalent + // \xhh escape sequence (where 'hh' are the corresponding hex digits) + if ( !QChar(QLatin1Char(ch)).isPrint() ) + replacement = 'x'; + } + + if ( replacement == 'x' ) + { + result.replace(i,1,"\\x"+QByteArray(1,ch).toHex()); + } else if ( replacement != 0 ) + { + result.remove(i,1); + result.insert(i,'\\'); + result.insert(i+1,replacement); + } + } + + return result; +} +QByteArray KeyboardTranslator::Entry::unescape(const QByteArray& input) const +{ + QByteArray result(input); + + for ( int i = 0 ; i < result.count()-1 ; i++ ) + { + + QByteRef ch = result[i]; + if ( ch == '\\' ) + { + char replacement[2] = {0,0}; + int charsToRemove = 2; + bool escapedChar = true; + + switch ( result[i+1] ) + { + case 'E' : replacement[0] = 27; break; + case 'b' : replacement[0] = 8 ; break; + case 'f' : replacement[0] = 12; break; + case 't' : replacement[0] = 9 ; break; + case 'r' : replacement[0] = 13; break; + case 'n' : replacement[0] = 10; break; + case 'x' : + { + // format is \xh or \xhh where 'h' is a hexadecimal + // digit from 0-9 or A-F which should be replaced + // with the corresponding character value + char hexDigits[3] = {0}; + + if ( (i < result.count()-2) && isxdigit(result[i+2]) ) + hexDigits[0] = result[i+2]; + if ( (i < result.count()-3) && isxdigit(result[i+3]) ) + hexDigits[1] = result[i+3]; + + unsigned charValue = 0; + sscanf(hexDigits,"%x",&charValue); + + replacement[0] = (char)charValue; + charsToRemove = 2 + strlen(hexDigits); + } + break; + default: + escapedChar = false; + } + + if ( escapedChar ) + result.replace(i,charsToRemove,replacement); + } + } + + return result; +} + +void KeyboardTranslator::Entry::insertModifier( QString& item , int modifier ) const +{ + if ( !(modifier & _modifierMask) ) + return; + + if ( modifier & _modifiers ) + item += QLatin1Char('+'); + else + item += QLatin1Char('-'); + + if ( modifier == Qt::ShiftModifier ) + item += QLatin1String("Shift"); + else if ( modifier == Qt::ControlModifier ) + item += QLatin1String("Ctrl"); + else if ( modifier == Qt::AltModifier ) + item += QLatin1String("Alt"); + else if ( modifier == Qt::MetaModifier ) + item += QLatin1String("Meta"); + else if ( modifier == Qt::KeypadModifier ) + item += QLatin1String("KeyPad"); +} +void KeyboardTranslator::Entry::insertState( QString& item , int state ) const +{ + if ( !(state & _stateMask) ) + return; + + if ( state & _state ) + item += QLatin1Char('+') ; + else + item += QLatin1Char('-') ; + + if ( state == KeyboardTranslator::AlternateScreenState ) + item += QLatin1String("AppScreen"); + else if ( state == KeyboardTranslator::NewLineState ) + item += QLatin1String("NewLine"); + else if ( state == KeyboardTranslator::AnsiState ) + item += QLatin1String("Ansi"); + else if ( state == KeyboardTranslator::CursorKeysState ) + item += QLatin1String("AppCursorKeys"); + else if ( state == KeyboardTranslator::AnyModifierState ) + item += QLatin1String("AnyModifier"); + else if ( state == KeyboardTranslator::ApplicationKeypadState ) + item += QLatin1String("AppKeypad"); +} +QString KeyboardTranslator::Entry::resultToString(bool expandWildCards,Qt::KeyboardModifiers modifiers) const +{ + if ( !_text.isEmpty() ) + return QString::fromLatin1(escapedText(expandWildCards,modifiers)); + else if ( _command == EraseCommand ) + return QLatin1String("Erase"); + else if ( _command == ScrollPageUpCommand ) + return QLatin1String("ScrollPageUp"); + else if ( _command == ScrollPageDownCommand ) + return QLatin1String("ScrollPageDown"); + else if ( _command == ScrollLineUpCommand ) + return QLatin1String("ScrollLineUp"); + else if ( _command == ScrollLineDownCommand ) + return QLatin1String("ScrollLineDown"); + else if ( _command == ScrollLockCommand ) + return QLatin1String("ScrollLock"); + else if (_command == ScrollUpToTopCommand) + return QLatin1String("ScrollUpToTop"); + else if (_command == ScrollDownToBottomCommand) + return QLatin1String("ScrollDownToBottom"); + + return QString(); +} +QString KeyboardTranslator::Entry::conditionToString() const +{ + QString result = QKeySequence(_keyCode).toString(); + + insertModifier( result , Qt::ShiftModifier ); + insertModifier( result , Qt::ControlModifier ); + insertModifier( result , Qt::AltModifier ); + insertModifier( result , Qt::MetaModifier ); + insertModifier( result , Qt::KeypadModifier ); + + insertState( result , KeyboardTranslator::AlternateScreenState ); + insertState( result , KeyboardTranslator::NewLineState ); + insertState( result , KeyboardTranslator::AnsiState ); + insertState( result , KeyboardTranslator::CursorKeysState ); + insertState( result , KeyboardTranslator::AnyModifierState ); + insertState( result , KeyboardTranslator::ApplicationKeypadState ); + + return result; +} + +KeyboardTranslator::KeyboardTranslator(const QString& name) +: _name(name) +{ +} + +void KeyboardTranslator::setDescription(const QString& description) +{ + _description = description; +} +QString KeyboardTranslator::description() const +{ + return _description; +} +void KeyboardTranslator::setName(const QString& name) +{ + _name = name; +} +QString KeyboardTranslator::name() const +{ + return _name; +} + +QList KeyboardTranslator::entries() const +{ + return _entries.values(); +} + +void KeyboardTranslator::addEntry(const Entry& entry) +{ + const int keyCode = entry.keyCode(); + _entries.insert(keyCode,entry); +} +void KeyboardTranslator::replaceEntry(const Entry& existing , const Entry& replacement) +{ + if ( !existing.isNull() ) + _entries.remove(existing.keyCode(),existing); + _entries.insert(replacement.keyCode(),replacement); +} +void KeyboardTranslator::removeEntry(const Entry& entry) +{ + _entries.remove(entry.keyCode(),entry); +} +KeyboardTranslator::Entry KeyboardTranslator::findEntry(int keyCode, Qt::KeyboardModifiers modifiers, States state) const +{ + for (auto it = _entries.cbegin(), end = _entries.cend(); it != end; ++it) + { + if (it.key() == keyCode) + if ( it.value().matches(keyCode,modifiers,state) ) + return *it; + } + return Entry(); // entry not found +} +void KeyboardTranslatorManager::addTranslator(KeyboardTranslator* translator) +{ + _translators.insert(translator->name(),translator); + + if ( !saveTranslator(translator) ) + qDebug() << "Unable to save translator" << translator->name() + << "to disk."; +} +bool KeyboardTranslatorManager::deleteTranslator(const QString& name) +{ + Q_ASSERT( _translators.contains(name) ); + + // locate and delete + QString path = findTranslatorPath(name); + if ( QFile::remove(path) ) + { + _translators.remove(name); + return true; + } + else + { + qDebug() << "Failed to remove translator - " << path; + return false; + } +} +Q_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager ) +KeyboardTranslatorManager* KeyboardTranslatorManager::instance() +{ + return theKeyboardTranslatorManager; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/KeyboardTranslator.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/KeyboardTranslator.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/KeyboardTranslator.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/KeyboardTranslator.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,599 @@ +/* + This source file is part of Konsole, a terminal emulator. + + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef KEYBOARDTRANSLATOR_H +#define KEYBOARDTRANSLATOR_H + +// Qt +#include +#include +#include +#include +#include + +// Konsole +//#include "konsole_export.h" +#define KONSOLEPRIVATE_EXPORT + +class QIODevice; +class QTextStream; + +namespace Konsole +{ + +/** + * A convertor which maps between key sequences pressed by the user and the + * character strings which should be sent to the terminal and commands + * which should be invoked when those character sequences are pressed. + * + * Konsole supports multiple keyboard translators, allowing the user to + * specify the character sequences which are sent to the terminal + * when particular key sequences are pressed. + * + * A key sequence is defined as a key code, associated keyboard modifiers + * (Shift,Ctrl,Alt,Meta etc.) and state flags which indicate the state + * which the terminal must be in for the key sequence to apply. + */ +class KeyboardTranslator +{ +public: + /** + * The meaning of a particular key sequence may depend upon the state which + * the terminal emulation is in. Therefore findEntry() may return a different + * Entry depending upon the state flags supplied. + * + * This enum describes the states which may be associated with with a particular + * entry in the keyboard translation entry. + */ + enum State + { + /** Indicates that no special state is active */ + NoState = 0, + /** + * TODO More documentation + */ + NewLineState = 1, + /** + * Indicates that the terminal is in 'Ansi' mode. + * TODO: More documentation + */ + AnsiState = 2, + /** + * TODO More documentation + */ + CursorKeysState = 4, + /** + * Indicates that the alternate screen ( typically used by interactive programs + * such as screen or vim ) is active + */ + AlternateScreenState = 8, + /** Indicates that any of the modifier keys is active. */ + AnyModifierState = 16, + /** Indicates that the numpad is in application mode. */ + ApplicationKeypadState = 32 + }; + Q_DECLARE_FLAGS(States,State) + + /** + * This enum describes commands which are associated with particular key sequences. + */ + enum Command + { + /** Indicates that no command is associated with this command sequence */ + NoCommand = 0, + /** TODO Document me */ + SendCommand = 1, + /** Scroll the terminal display up one page */ + ScrollPageUpCommand = 2, + /** Scroll the terminal display down one page */ + ScrollPageDownCommand = 4, + /** Scroll the terminal display up one line */ + ScrollLineUpCommand = 8, + /** Scroll the terminal display down one line */ + ScrollLineDownCommand = 16, + /** Toggles scroll lock mode */ + ScrollLockCommand = 32, + /** Scroll the terminal display up to the start of history */ + ScrollUpToTopCommand = 64, + /** Scroll the terminal display down to the end of history */ + ScrollDownToBottomCommand = 128, + /** Echos the operating system specific erase character. */ + EraseCommand = 256 + }; + Q_DECLARE_FLAGS(Commands,Command) + + /** + * Represents an association between a key sequence pressed by the user + * and the character sequence and commands associated with it for a particular + * KeyboardTranslator. + */ + class Entry + { + public: + /** + * Constructs a new entry for a keyboard translator. + */ + Entry(); + + /** + * Returns true if this entry is null. + * This is true for newly constructed entries which have no properties set. + */ + bool isNull() const; + + /** Returns the commands associated with this entry */ + Command command() const; + /** Sets the command associated with this entry. */ + void setCommand(Command command); + + /** + * Returns the character sequence associated with this entry, optionally replacing + * wildcard '*' characters with numbers to indicate the keyboard modifiers being pressed. + * + * TODO: The numbers used to replace '*' characters are taken from the Konsole/KDE 3 code. + * Document them. + * + * @param expandWildCards Specifies whether wild cards (occurrences of the '*' character) in + * the entry should be replaced with a number to indicate the modifier keys being pressed. + * + * @param modifiers The keyboard modifiers being pressed. + */ + QByteArray text(bool expandWildCards = false, + Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; + + /** Sets the character sequence associated with this entry */ + void setText(const QByteArray& text); + + /** + * Returns the character sequence associated with this entry, + * with any non-printable characters replaced with escape sequences. + * + * eg. \\E for Escape, \\t for tab, \\n for new line. + * + * @param expandWildCards See text() + * @param modifiers See text() + */ + QByteArray escapedText(bool expandWildCards = false, + Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; + + /** Returns the character code ( from the Qt::Key enum ) associated with this entry */ + int keyCode() const; + /** Sets the character code associated with this entry */ + void setKeyCode(int keyCode); + + /** + * Returns a bitwise-OR of the enabled keyboard modifiers associated with this entry. + * If a modifier is set in modifierMask() but not in modifiers(), this means that the entry + * only matches when that modifier is NOT pressed. + * + * If a modifier is not set in modifierMask() then the entry matches whether the modifier + * is pressed or not. + */ + Qt::KeyboardModifiers modifiers() const; + + /** Returns the keyboard modifiers which are valid in this entry. See modifiers() */ + Qt::KeyboardModifiers modifierMask() const; + + /** See modifiers() */ + void setModifiers( Qt::KeyboardModifiers modifiers ); + /** See modifierMask() and modifiers() */ + void setModifierMask( Qt::KeyboardModifiers modifiers ); + + /** + * Returns a bitwise-OR of the enabled state flags associated with this entry. + * If flag is set in stateMask() but not in state(), this means that the entry only + * matches when the terminal is NOT in that state. + * + * If a state is not set in stateMask() then the entry matches whether the terminal + * is in that state or not. + */ + States state() const; + + /** Returns the state flags which are valid in this entry. See state() */ + States stateMask() const; + + /** See state() */ + void setState( States state ); + /** See stateMask() */ + void setStateMask( States mask ); + + /** + * Returns the key code and modifiers associated with this entry + * as a QKeySequence + */ + //QKeySequence keySequence() const; + + /** + * Returns this entry's conditions ( ie. its key code, modifier and state criteria ) + * as a string. + */ + QString conditionToString() const; + + /** + * Returns this entry's result ( ie. its command or character sequence ) + * as a string. + * + * @param expandWildCards See text() + * @param modifiers See text() + */ + QString resultToString(bool expandWildCards = false, + Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; + + /** + * Returns true if this entry matches the given key sequence, specified + * as a combination of @p keyCode , @p modifiers and @p state. + */ + bool matches( int keyCode , + Qt::KeyboardModifiers modifiers , + States flags ) const; + + bool operator==(const Entry& rhs) const; + + private: + void insertModifier( QString& item , int modifier ) const; + void insertState( QString& item , int state ) const; + QByteArray unescape(const QByteArray& text) const; + + int _keyCode; + Qt::KeyboardModifiers _modifiers; + Qt::KeyboardModifiers _modifierMask; + States _state; + States _stateMask; + + Command _command; + QByteArray _text; + }; + + /** Constructs a new keyboard translator with the given @p name */ + explicit KeyboardTranslator(const QString& name); + + //KeyboardTranslator(const KeyboardTranslator& other); + + /** Returns the name of this keyboard translator */ + QString name() const; + + /** Sets the name of this keyboard translator */ + void setName(const QString& name); + + /** Returns the descriptive name of this keyboard translator */ + QString description() const; + + /** Sets the descriptive name of this keyboard translator */ + void setDescription(const QString& description); + + /** + * Looks for an entry in this keyboard translator which matches the given + * key code, keyboard modifiers and state flags. + * + * Returns the matching entry if found or a null Entry otherwise ( ie. + * entry.isNull() will return true ) + * + * @param keyCode A key code from the Qt::Key enum + * @param modifiers A combination of modifiers + * @param state Optional flags which specify the current state of the terminal + */ + Entry findEntry(int keyCode , + Qt::KeyboardModifiers modifiers , + States state = NoState) const; + + /** + * Adds an entry to this keyboard translator's table. Entries can be looked up according + * to their key sequence using findEntry() + */ + void addEntry(const Entry& entry); + + /** + * Replaces an entry in the translator. If the @p existing entry is null, + * then this is equivalent to calling addEntry(@p replacement) + */ + void replaceEntry(const Entry& existing , const Entry& replacement); + + /** + * Removes an entry from the table. + */ + void removeEntry(const Entry& entry); + + /** Returns a list of all entries in the translator. */ + QList entries() const; + + /** The modifier code for the actual Ctrl key on this OS. */ + static const Qt::KeyboardModifier CTRL_MOD; + +private: + + QMultiHash _entries; // entries in this keyboard translation, + // entries are indexed according to + // their keycode + QString _name; + QString _description; +}; +Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::States) +Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::Commands) + +/** + * Parses the contents of a Keyboard Translator (.keytab) file and + * returns the entries found in it. + * + * Usage example: + * + * @code + * QFile source( "/path/to/keytab" ); + * source.open( QIODevice::ReadOnly ); + * + * KeyboardTranslator* translator = new KeyboardTranslator( "name-of-translator" ); + * + * KeyboardTranslatorReader reader(source); + * while ( reader.hasNextEntry() ) + * translator->addEntry(reader.nextEntry()); + * + * source.close(); + * + * if ( !reader.parseError() ) + * { + * // parsing succeeded, do something with the translator + * } + * else + * { + * // parsing failed + * } + * @endcode + */ +class KeyboardTranslatorReader +{ +public: + /** Constructs a new reader which parses the given @p source */ + KeyboardTranslatorReader( QIODevice* source ); + + /** + * Returns the description text. + * TODO: More documentation + */ + QString description() const; + + /** Returns true if there is another entry in the source stream */ + bool hasNextEntry(); + /** Returns the next entry found in the source stream */ + KeyboardTranslator::Entry nextEntry(); + + /** + * Returns true if an error occurred whilst parsing the input or + * false if no error occurred. + */ + bool parseError(); + + /** + * Parses a condition and result string for a translator entry + * and produces a keyboard translator entry. + * + * The condition and result strings are in the same format as in + */ + static KeyboardTranslator::Entry createEntry( const QString& condition , + const QString& result ); +private: + struct Token + { + enum Type + { + TitleKeyword, + TitleText, + KeyKeyword, + KeySequence, + Command, + OutputText + }; + Type type; + QString text; + }; + QList tokenize(const QString&); + void readNext(); + bool decodeSequence(const QString& , + int& keyCode, + Qt::KeyboardModifiers& modifiers, + Qt::KeyboardModifiers& modifierMask, + KeyboardTranslator::States& state, + KeyboardTranslator::States& stateFlags); + + static bool parseAsModifier(const QString& item , Qt::KeyboardModifier& modifier); + static bool parseAsStateFlag(const QString& item , KeyboardTranslator::State& state); + static bool parseAsKeyCode(const QString& item , int& keyCode); + static bool parseAsCommand(const QString& text , KeyboardTranslator::Command& command); + + QIODevice* _source; + QString _description; + KeyboardTranslator::Entry _nextEntry; + bool _hasNext; +}; + +/** Writes a keyboard translation to disk. */ +class KeyboardTranslatorWriter +{ +public: + /** + * Constructs a new writer which saves data into @p destination. + * The caller is responsible for closing the device when writing is complete. + */ + explicit KeyboardTranslatorWriter(QIODevice* destination); + ~KeyboardTranslatorWriter(); + + /** + * Writes the header for the keyboard translator. + * @param description Description of the keyboard translator. + */ + void writeHeader( const QString& description ); + /** Writes a translator entry. */ + void writeEntry( const KeyboardTranslator::Entry& entry ); + +private: + QIODevice* _destination; + QTextStream* _writer; +}; + +/** + * Manages the keyboard translations available for use by terminal sessions, + * see KeyboardTranslator. + */ +class KONSOLEPRIVATE_EXPORT KeyboardTranslatorManager +{ +public: + /** + * Constructs a new KeyboardTranslatorManager and loads the list of + * available keyboard translations. + * + * The keyboard translations themselves are not loaded until they are + * first requested via a call to findTranslator() + */ + KeyboardTranslatorManager(); + ~KeyboardTranslatorManager(); + + KeyboardTranslatorManager(const KeyboardTranslatorManager&) = delete; + KeyboardTranslatorManager& operator=(const KeyboardTranslatorManager&) = delete; + + /** + * Adds a new translator. If a translator with the same name + * already exists, it will be replaced by the new translator. + * + * TODO: More documentation. + */ + void addTranslator(KeyboardTranslator* translator); + + /** + * Deletes a translator. Returns true on successful deletion or false otherwise. + * + * TODO: More documentation + */ + bool deleteTranslator(const QString& name); + + /** Returns the default translator for Konsole. */ + const KeyboardTranslator* defaultTranslator(); + + /** + * Returns the keyboard translator with the given name or 0 if no translator + * with that name exists. + * + * The first time that a translator with a particular name is requested, + * the on-disk .keyboard file is loaded and parsed. + */ + const KeyboardTranslator* findTranslator(const QString& name); + /** + * Returns a list of the names of available keyboard translators. + * + * The first time this is called, a search for available + * translators is started. + */ + QList allTranslators(); + + /******** Modify by ut000610 daizhengwen 2020-06-02: 用于修改数据****************/ + KeyboardTranslator *getTranslator(const QString &name); + /********************* Modify by ut000610 daizhengwen End ************************/ + + /** Returns the global KeyboardTranslatorManager instance. */ + static KeyboardTranslatorManager* instance(); + +private: + static const QByteArray defaultTranslatorText; + + void findTranslators(); // locate the available translators + KeyboardTranslator* loadTranslator(const QString& name); // loads the translator + // with the given name + KeyboardTranslator* loadTranslator(QIODevice* device,const QString& name); + + bool saveTranslator(const KeyboardTranslator* translator); + QString findTranslatorPath(const QString& name); + + QHash _translators; // maps translator-name -> KeyboardTranslator + // instance + bool _haveLoadedAll; +}; + +inline int KeyboardTranslator::Entry::keyCode() const { return _keyCode; } +inline void KeyboardTranslator::Entry::setKeyCode(int keyCode) { _keyCode = keyCode; } + +inline void KeyboardTranslator::Entry::setModifiers( Qt::KeyboardModifiers modifier ) +{ + _modifiers = modifier; +} +inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifiers() const { return _modifiers; } + +inline void KeyboardTranslator::Entry::setModifierMask( Qt::KeyboardModifiers mask ) +{ + _modifierMask = mask; +} +inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifierMask() const { return _modifierMask; } + +inline bool KeyboardTranslator::Entry::isNull() const +{ + return ( *this == Entry() ); +} + +inline void KeyboardTranslator::Entry::setCommand( Command command ) +{ + _command = command; +} +inline KeyboardTranslator::Command KeyboardTranslator::Entry::command() const { return _command; } + +inline void KeyboardTranslator::Entry::setText( const QByteArray& text ) +{ + _text = unescape(text); +} +inline int oneOrZero(int value) +{ + return value ? 1 : 0; +} +inline QByteArray KeyboardTranslator::Entry::text(bool expandWildCards,Qt::KeyboardModifiers modifiers) const +{ + QByteArray expandedText = _text; + + if (expandWildCards) + { + int modifierValue = 1; + modifierValue += oneOrZero(modifiers & Qt::ShiftModifier); + modifierValue += oneOrZero(modifiers & Qt::AltModifier) << 1; + modifierValue += oneOrZero(modifiers & KeyboardTranslator::CTRL_MOD) << 2; + + for (int i=0;i<_text.length();i++) + { + if (expandedText[i] == '*') + expandedText[i] = '0' + modifierValue; + } + } + + return expandedText; +} + +inline void KeyboardTranslator::Entry::setState( States state ) +{ + _state = state; +} +inline KeyboardTranslator::States KeyboardTranslator::Entry::state() const { return _state; } + +inline void KeyboardTranslator::Entry::setStateMask( States stateMask ) +{ + _stateMask = stateMask; +} +inline KeyboardTranslator::States KeyboardTranslator::Entry::stateMask() const { return _stateMask; } + +} + +Q_DECLARE_METATYPE(Konsole::KeyboardTranslator::Entry) +Q_DECLARE_METATYPE(const Konsole::KeyboardTranslator*) + +#endif // KEYBOARDTRANSLATOR_H + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,843 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + + +#include "konsole_wcwidth.h" +#include +#include + +struct Range { + uint first, last; +}; + +struct RangeLut { + int8_t width; + const Range * const lut; + int size; +}; + +enum { + InvalidWidth = INT8_MIN +}; + +static constexpr const int8_t DIRECT_LUT[] = { + 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +}; + + +static constexpr const Range LUT_NONPRINTABLE[] = { + {0x00d800,0x00dfff}, +}; + +static constexpr const Range LUT_2[] = { + {0x001100,0x00115f},{0x00231a,0x00231b},{0x002329,0x00232a},{0x0023e9,0x0023ec},{0x0023f0,0x0023f0},{0x0023f3,0x0023f3},{0x0025fd,0x0025fe},{0x002614,0x002615}, + {0x002648,0x002653},{0x00267f,0x00267f},{0x002693,0x002693},{0x0026a1,0x0026a1},{0x0026aa,0x0026ab},{0x0026bd,0x0026be},{0x0026c4,0x0026c5},{0x0026ce,0x0026ce}, + {0x0026d4,0x0026d4},{0x0026ea,0x0026ea},{0x0026f2,0x0026f3},{0x0026f5,0x0026f5},{0x0026fa,0x0026fa},{0x0026fd,0x0026fd},{0x002705,0x002705},{0x00270a,0x00270b}, + {0x002728,0x002728},{0x00274c,0x00274c},{0x00274e,0x00274e},{0x002753,0x002755},{0x002757,0x002757},{0x002795,0x002797},{0x0027b0,0x0027b0},{0x0027bf,0x0027bf}, + {0x002b1b,0x002b1c},{0x002b50,0x002b50},{0x002b55,0x002b55},{0x002e80,0x002e99},{0x002e9b,0x002ef3},{0x002f00,0x002fd5},{0x002ff0,0x002ffb},{0x003000,0x003029}, + {0x00302e,0x00303e},{0x003041,0x003096},{0x00309b,0x0030ff},{0x003105,0x00312f},{0x003131,0x00318e},{0x003190,0x0031ba},{0x0031c0,0x0031e3},{0x0031f0,0x00321e}, + {0x003220,0x003247},{0x003250,0x0032fe},{0x003300,0x004dbf},{0x004e00,0x00a48c},{0x00a490,0x00a4c6},{0x00a960,0x00a97c},{0x00ac00,0x00d7a3},{0x00f900,0x00faff}, + {0x00fe10,0x00fe19},{0x00fe30,0x00fe52},{0x00fe54,0x00fe66},{0x00fe68,0x00fe6b},{0x00ff01,0x00ff60},{0x00ffe0,0x00ffe6},{0x016fe0,0x016fe1},{0x017000,0x0187f1}, + {0x018800,0x018af2},{0x01b000,0x01b11e},{0x01b170,0x01b2fb},{0x01f004,0x01f004},{0x01f0cf,0x01f0cf},{0x01f18e,0x01f18e},{0x01f191,0x01f19a},{0x01f1e6,0x01f202}, + {0x01f210,0x01f23b},{0x01f240,0x01f248},{0x01f250,0x01f251},{0x01f260,0x01f265},{0x01f300,0x01f320},{0x01f32d,0x01f335},{0x01f337,0x01f37c},{0x01f37e,0x01f393}, + {0x01f3a0,0x01f3ca},{0x01f3cf,0x01f3d3},{0x01f3e0,0x01f3f0},{0x01f3f4,0x01f3f4},{0x01f3f8,0x01f43e},{0x01f440,0x01f440},{0x01f442,0x01f4fc},{0x01f4ff,0x01f53d}, + {0x01f54b,0x01f54e},{0x01f550,0x01f567},{0x01f57a,0x01f57a},{0x01f595,0x01f596},{0x01f5a4,0x01f5a4},{0x01f5fb,0x01f64f},{0x01f680,0x01f6c5},{0x01f6cc,0x01f6cc}, + {0x01f6d0,0x01f6d2},{0x01f6eb,0x01f6ec},{0x01f6f4,0x01f6f9},{0x01f910,0x01f93e},{0x01f940,0x01f970},{0x01f973,0x01f976},{0x01f97a,0x01f97a},{0x01f97c,0x01f9a2}, + {0x01f9b0,0x01f9b9},{0x01f9c0,0x01f9c2},{0x01f9d0,0x01f9ff},{0x020000,0x02fffd},{0x030000,0x03fffd}, +}; + +static constexpr const Range LUT_0[] = { + {0x000300,0x00036f},{0x000483,0x000489},{0x000591,0x0005bd},{0x0005bf,0x0005bf},{0x0005c1,0x0005c2},{0x0005c4,0x0005c5},{0x0005c7,0x0005c7},{0x000600,0x000605}, + {0x000610,0x00061a},{0x00061c,0x00061c},{0x00064b,0x00065f},{0x000670,0x000670},{0x0006d6,0x0006dd},{0x0006df,0x0006e4},{0x0006e7,0x0006e8},{0x0006ea,0x0006ed}, + {0x00070f,0x00070f},{0x000711,0x000711},{0x000730,0x00074a},{0x0007a6,0x0007b0},{0x0007eb,0x0007f3},{0x0007fd,0x0007fd},{0x000816,0x000819},{0x00081b,0x000823}, + {0x000825,0x000827},{0x000829,0x00082d},{0x000859,0x00085b},{0x0008d3,0x000902},{0x00093a,0x00093a},{0x00093c,0x00093c},{0x000941,0x000948},{0x00094d,0x00094d}, + {0x000951,0x000957},{0x000962,0x000963},{0x000981,0x000981},{0x0009bc,0x0009bc},{0x0009c1,0x0009c4},{0x0009cd,0x0009cd},{0x0009e2,0x0009e3},{0x0009fe,0x0009fe}, + {0x000a01,0x000a02},{0x000a3c,0x000a3c},{0x000a41,0x000a42},{0x000a47,0x000a48},{0x000a4b,0x000a4d},{0x000a51,0x000a51},{0x000a70,0x000a71},{0x000a75,0x000a75}, + {0x000a81,0x000a82},{0x000abc,0x000abc},{0x000ac1,0x000ac5},{0x000ac7,0x000ac8},{0x000acd,0x000acd},{0x000ae2,0x000ae3},{0x000afa,0x000aff},{0x000b01,0x000b01}, + {0x000b3c,0x000b3c},{0x000b3f,0x000b3f},{0x000b41,0x000b44},{0x000b4d,0x000b4d},{0x000b56,0x000b56},{0x000b62,0x000b63},{0x000b82,0x000b82},{0x000bc0,0x000bc0}, + {0x000bcd,0x000bcd},{0x000c00,0x000c00},{0x000c04,0x000c04},{0x000c3e,0x000c40},{0x000c46,0x000c48},{0x000c4a,0x000c4d},{0x000c55,0x000c56},{0x000c62,0x000c63}, + {0x000c81,0x000c81},{0x000cbc,0x000cbc},{0x000cbf,0x000cbf},{0x000cc6,0x000cc6},{0x000ccc,0x000ccd},{0x000ce2,0x000ce3},{0x000d00,0x000d01},{0x000d3b,0x000d3c}, + {0x000d41,0x000d44},{0x000d4d,0x000d4d},{0x000d62,0x000d63},{0x000dca,0x000dca},{0x000dd2,0x000dd4},{0x000dd6,0x000dd6},{0x000e31,0x000e31},{0x000e34,0x000e3a}, + {0x000e47,0x000e4e},{0x000eb1,0x000eb1},{0x000eb4,0x000eb9},{0x000ebb,0x000ebc},{0x000ec8,0x000ecd},{0x000f18,0x000f19},{0x000f35,0x000f35},{0x000f37,0x000f37}, + {0x000f39,0x000f39},{0x000f71,0x000f7e},{0x000f80,0x000f84},{0x000f86,0x000f87},{0x000f8d,0x000f97},{0x000f99,0x000fbc},{0x000fc6,0x000fc6},{0x00102d,0x001030}, + {0x001032,0x001037},{0x001039,0x00103a},{0x00103d,0x00103e},{0x001058,0x001059},{0x00105e,0x001060},{0x001071,0x001074},{0x001082,0x001082},{0x001085,0x001086}, + {0x00108d,0x00108d},{0x00109d,0x00109d},{0x001160,0x001160},{0x00135d,0x00135f},{0x001712,0x001714},{0x001732,0x001734},{0x001752,0x001753},{0x001772,0x001773}, + {0x0017b4,0x0017b5},{0x0017b7,0x0017bd},{0x0017c6,0x0017c6},{0x0017c9,0x0017d3},{0x0017dd,0x0017dd},{0x00180b,0x00180e},{0x001885,0x001886},{0x0018a9,0x0018a9}, + {0x001920,0x001922},{0x001927,0x001928},{0x001932,0x001932},{0x001939,0x00193b},{0x001a17,0x001a18},{0x001a1b,0x001a1b},{0x001a56,0x001a56},{0x001a58,0x001a5e}, + {0x001a60,0x001a60},{0x001a62,0x001a62},{0x001a65,0x001a6c},{0x001a73,0x001a7c},{0x001a7f,0x001a7f},{0x001ab0,0x001abe},{0x001b00,0x001b03},{0x001b34,0x001b34}, + {0x001b36,0x001b3a},{0x001b3c,0x001b3c},{0x001b42,0x001b42},{0x001b6b,0x001b73},{0x001b80,0x001b81},{0x001ba2,0x001ba5},{0x001ba8,0x001ba9},{0x001bab,0x001bad}, + {0x001be6,0x001be6},{0x001be8,0x001be9},{0x001bed,0x001bed},{0x001bef,0x001bf1},{0x001c2c,0x001c33},{0x001c36,0x001c37},{0x001cd0,0x001cd2},{0x001cd4,0x001ce0}, + {0x001ce2,0x001ce8},{0x001ced,0x001ced},{0x001cf4,0x001cf4},{0x001cf8,0x001cf9},{0x001dc0,0x001df9},{0x001dfb,0x001dff},{0x00200b,0x00200f},{0x00202a,0x00202e}, + {0x002060,0x002064},{0x002066,0x00206f},{0x0020d0,0x0020f0},{0x002cef,0x002cf1},{0x002d7f,0x002d7f},{0x002de0,0x002dff},{0x00302a,0x00302d},{0x003099,0x00309a}, + {0x00a66f,0x00a672},{0x00a674,0x00a67d},{0x00a69e,0x00a69f},{0x00a6f0,0x00a6f1},{0x00a802,0x00a802},{0x00a806,0x00a806},{0x00a80b,0x00a80b},{0x00a825,0x00a826}, + {0x00a8c4,0x00a8c5},{0x00a8e0,0x00a8f1},{0x00a8ff,0x00a8ff},{0x00a926,0x00a92d},{0x00a947,0x00a951},{0x00a980,0x00a982},{0x00a9b3,0x00a9b3},{0x00a9b6,0x00a9b9}, + {0x00a9bc,0x00a9bc},{0x00a9e5,0x00a9e5},{0x00aa29,0x00aa2e},{0x00aa31,0x00aa32},{0x00aa35,0x00aa36},{0x00aa43,0x00aa43},{0x00aa4c,0x00aa4c},{0x00aa7c,0x00aa7c}, + {0x00aab0,0x00aab0},{0x00aab2,0x00aab4},{0x00aab7,0x00aab8},{0x00aabe,0x00aabf},{0x00aac1,0x00aac1},{0x00aaec,0x00aaed},{0x00aaf6,0x00aaf6},{0x00abe5,0x00abe5}, + {0x00abe8,0x00abe8},{0x00abed,0x00abed},{0x00fb1e,0x00fb1e},{0x00fe00,0x00fe0f},{0x00fe20,0x00fe2f},{0x00feff,0x00feff},{0x00fff9,0x00fffb},{0x0101fd,0x0101fd}, + {0x0102e0,0x0102e0},{0x010376,0x01037a},{0x010a01,0x010a03},{0x010a05,0x010a06},{0x010a0c,0x010a0f},{0x010a38,0x010a3a},{0x010a3f,0x010a3f},{0x010ae5,0x010ae6}, + {0x010d24,0x010d27},{0x010f46,0x010f50},{0x011001,0x011001},{0x011038,0x011046},{0x01107f,0x011081},{0x0110b3,0x0110b6},{0x0110b9,0x0110ba},{0x0110bd,0x0110bd}, + {0x0110cd,0x0110cd},{0x011100,0x011102},{0x011127,0x01112b},{0x01112d,0x011134},{0x011173,0x011173},{0x011180,0x011181},{0x0111b6,0x0111be},{0x0111c9,0x0111cc}, + {0x01122f,0x011231},{0x011234,0x011234},{0x011236,0x011237},{0x01123e,0x01123e},{0x0112df,0x0112df},{0x0112e3,0x0112ea},{0x011300,0x011301},{0x01133b,0x01133c}, + {0x011340,0x011340},{0x011366,0x01136c},{0x011370,0x011374},{0x011438,0x01143f},{0x011442,0x011444},{0x011446,0x011446},{0x01145e,0x01145e},{0x0114b3,0x0114b8}, + {0x0114ba,0x0114ba},{0x0114bf,0x0114c0},{0x0114c2,0x0114c3},{0x0115b2,0x0115b5},{0x0115bc,0x0115bd},{0x0115bf,0x0115c0},{0x0115dc,0x0115dd},{0x011633,0x01163a}, + {0x01163d,0x01163d},{0x01163f,0x011640},{0x0116ab,0x0116ab},{0x0116ad,0x0116ad},{0x0116b0,0x0116b5},{0x0116b7,0x0116b7},{0x01171d,0x01171f},{0x011722,0x011725}, + {0x011727,0x01172b},{0x01182f,0x011837},{0x011839,0x01183a},{0x011a01,0x011a0a},{0x011a33,0x011a38},{0x011a3b,0x011a3e},{0x011a47,0x011a47},{0x011a51,0x011a56}, + {0x011a59,0x011a5b},{0x011a8a,0x011a96},{0x011a98,0x011a99},{0x011c30,0x011c36},{0x011c38,0x011c3d},{0x011c3f,0x011c3f},{0x011c92,0x011ca7},{0x011caa,0x011cb0}, + {0x011cb2,0x011cb3},{0x011cb5,0x011cb6},{0x011d31,0x011d36},{0x011d3a,0x011d3a},{0x011d3c,0x011d3d},{0x011d3f,0x011d45},{0x011d47,0x011d47},{0x011d90,0x011d91}, + {0x011d95,0x011d95},{0x011d97,0x011d97},{0x011ef3,0x011ef4},{0x016af0,0x016af4},{0x016b30,0x016b36},{0x016f8f,0x016f92},{0x01bc9d,0x01bc9e},{0x01bca0,0x01bca3}, + {0x01d167,0x01d169},{0x01d173,0x01d182},{0x01d185,0x01d18b},{0x01d1aa,0x01d1ad},{0x01d242,0x01d244},{0x01da00,0x01da36},{0x01da3b,0x01da6c},{0x01da75,0x01da75}, + {0x01da84,0x01da84},{0x01da9b,0x01da9f},{0x01daa1,0x01daaf},{0x01e000,0x01e006},{0x01e008,0x01e018},{0x01e01b,0x01e021},{0x01e023,0x01e024},{0x01e026,0x01e02a}, + {0x01e8d0,0x01e8d6},{0x01e944,0x01e94a},{0x0e0001,0x0e0001},{0x0e0020,0x0e007f},{0x0e0100,0x0e01ef}, +}; + + +static constexpr const RangeLut RANGE_LUT_LIST[] = { + {-1, LUT_NONPRINTABLE, 1}, + { 2, LUT_2 , 109}, + { 0, LUT_0 , 325}, + { 1, nullptr , 1}, +}; +static constexpr const int RANGE_LUT_LIST_SIZE = 4; + +int characterWidth(uint ucs4) { + if(Q_LIKELY(ucs4 < sizeof(DIRECT_LUT))) { + return DIRECT_LUT[ucs4]; + } + + for(auto rl = RANGE_LUT_LIST; rl->lut != nullptr; ++rl) { + int l = 0; + int r = rl->size - 1; + while(l <= r) { + const int m = (l + r) / 2; + if(rl->lut[m].last < ucs4) { + l = m + 1; + } else if(rl->lut[m].first > ucs4) { + r = m - 1; + } else { + return rl->width; + } + } + } + + return RANGE_LUT_LIST[RANGE_LUT_LIST_SIZE - 1].width; +} + +namespace Konsole { +namespace LineBlockCharacters { + +enum LineType { + LtNone = 0, + LtDouble = 1, + LtLight = 2, + LtHeavy = 3 +}; + +// PackedLineTypes is an 8-bit number representing types of 4 line character's lines. Each line is +// represented by 2 bits. Lines order, starting from MSB: top, right, bottom, left. +static inline constexpr quint8 makePackedLineTypes(LineType top, LineType right, LineType bottom, LineType left) +{ + return (int(top) & 3) << 6 | (int(right) & 3) << 4 | (int(bottom) & 3) << 2 | (int(left) & 3); +} + +static constexpr const quint8 PackedLineTypesLut[] = { + // top right bottom left + makePackedLineTypes(LtNone , LtLight , LtNone , LtLight ), /* U+2500 ─ */ + makePackedLineTypes(LtNone , LtHeavy , LtNone , LtHeavy ), /* U+2501 ━ */ + makePackedLineTypes(LtLight , LtNone , LtLight , LtNone ), /* U+2502 │ */ + makePackedLineTypes(LtHeavy , LtNone , LtHeavy , LtNone ), /* U+2503 ┃ */ + 0, 0, 0, 0, 0, 0, 0, 0, /* U+2504-0x250b */ + makePackedLineTypes(LtNone , LtLight , LtLight , LtNone ), /* U+250C ┌ */ + makePackedLineTypes(LtNone , LtHeavy , LtLight , LtNone ), /* U+250D ┍ */ + makePackedLineTypes(LtNone , LtLight , LtHeavy , LtNone ), /* U+250E ┎ */ + makePackedLineTypes(LtNone , LtHeavy , LtHeavy , LtNone ), /* U+250F ┏ */ + makePackedLineTypes(LtNone , LtNone , LtLight , LtLight ), /* U+2510 ┐ */ + makePackedLineTypes(LtNone , LtNone , LtLight , LtHeavy ), /* U+2511 ┑ */ + makePackedLineTypes(LtNone , LtNone , LtHeavy , LtLight ), /* U+2512 ┒ */ + makePackedLineTypes(LtNone , LtNone , LtHeavy , LtHeavy ), /* U+2513 ┓ */ + makePackedLineTypes(LtLight , LtLight , LtNone , LtNone ), /* U+2514 └ */ + makePackedLineTypes(LtLight , LtHeavy , LtNone , LtNone ), /* U+2515 ┕ */ + makePackedLineTypes(LtHeavy , LtLight , LtNone , LtNone ), /* U+2516 ┖ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtNone , LtNone ), /* U+2517 ┗ */ + makePackedLineTypes(LtLight , LtNone , LtNone , LtLight ), /* U+2518 ┘ */ + makePackedLineTypes(LtLight , LtNone , LtNone , LtHeavy ), /* U+2519 ┙ */ + makePackedLineTypes(LtHeavy , LtNone , LtNone , LtLight ), /* U+251A ┚ */ + makePackedLineTypes(LtHeavy , LtNone , LtNone , LtHeavy ), /* U+251B ┛ */ + makePackedLineTypes(LtLight , LtLight , LtLight , LtNone ), /* U+251C ├ */ + makePackedLineTypes(LtLight , LtHeavy , LtLight , LtNone ), /* U+251D ┝ */ + makePackedLineTypes(LtHeavy , LtLight , LtLight , LtNone ), /* U+251E ┞ */ + makePackedLineTypes(LtLight , LtLight , LtHeavy , LtNone ), /* U+251F ┟ */ + makePackedLineTypes(LtHeavy , LtLight , LtHeavy , LtNone ), /* U+2520 ┠ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtLight , LtNone ), /* U+2521 ┡ */ + makePackedLineTypes(LtLight , LtHeavy , LtHeavy , LtNone ), /* U+2522 ┢ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtHeavy , LtNone ), /* U+2523 ┣ */ + makePackedLineTypes(LtLight , LtNone , LtLight , LtLight ), /* U+2524 ┤ */ + makePackedLineTypes(LtLight , LtNone , LtLight , LtHeavy ), /* U+2525 ┥ */ + makePackedLineTypes(LtHeavy , LtNone , LtLight , LtLight ), /* U+2526 ┦ */ + makePackedLineTypes(LtLight , LtNone , LtHeavy , LtLight ), /* U+2527 ┧ */ + makePackedLineTypes(LtHeavy , LtNone , LtHeavy , LtLight ), /* U+2528 ┨ */ + makePackedLineTypes(LtHeavy , LtNone , LtLight , LtHeavy ), /* U+2529 ┩ */ + makePackedLineTypes(LtLight , LtNone , LtHeavy , LtHeavy ), /* U+252A ┪ */ + makePackedLineTypes(LtHeavy , LtNone , LtHeavy , LtHeavy ), /* U+252B ┫ */ + makePackedLineTypes(LtNone , LtLight , LtLight , LtLight ), /* U+252C ┬ */ + makePackedLineTypes(LtNone , LtLight , LtLight , LtHeavy ), /* U+252D ┭ */ + makePackedLineTypes(LtNone , LtHeavy , LtLight , LtLight ), /* U+252E ┮ */ + makePackedLineTypes(LtNone , LtHeavy , LtLight , LtHeavy ), /* U+252F ┯ */ + makePackedLineTypes(LtNone , LtLight , LtHeavy , LtLight ), /* U+2530 ┰ */ + makePackedLineTypes(LtNone , LtLight , LtHeavy , LtHeavy ), /* U+2531 ┱ */ + makePackedLineTypes(LtNone , LtHeavy , LtHeavy , LtLight ), /* U+2532 ┲ */ + makePackedLineTypes(LtNone , LtHeavy , LtHeavy , LtHeavy ), /* U+2533 ┳ */ + makePackedLineTypes(LtLight , LtLight , LtNone , LtLight ), /* U+2534 ┴ */ + makePackedLineTypes(LtLight , LtLight , LtNone , LtHeavy ), /* U+2535 ┵ */ + makePackedLineTypes(LtLight , LtHeavy , LtNone , LtLight ), /* U+2536 ┶ */ + makePackedLineTypes(LtLight , LtHeavy , LtNone , LtHeavy ), /* U+2537 ┷ */ + makePackedLineTypes(LtHeavy , LtLight , LtNone , LtLight ), /* U+2538 ┸ */ + makePackedLineTypes(LtHeavy , LtLight , LtNone , LtHeavy ), /* U+2539 ┹ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtNone , LtLight ), /* U+253A ┺ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtNone , LtHeavy ), /* U+253B ┻ */ + makePackedLineTypes(LtLight , LtLight , LtLight , LtLight ), /* U+253C ┼ */ + makePackedLineTypes(LtLight , LtLight , LtLight , LtHeavy ), /* U+253D ┽ */ + makePackedLineTypes(LtLight , LtHeavy , LtLight , LtLight ), /* U+253E ┾ */ + makePackedLineTypes(LtLight , LtHeavy , LtLight , LtHeavy ), /* U+253F ┿ */ + makePackedLineTypes(LtHeavy , LtLight , LtLight , LtLight ), /* U+2540 ╀ */ + makePackedLineTypes(LtLight , LtLight , LtHeavy , LtLight ), /* U+2541 ╁ */ + makePackedLineTypes(LtHeavy , LtLight , LtHeavy , LtLight ), /* U+2542 ╂ */ + makePackedLineTypes(LtHeavy , LtLight , LtLight , LtHeavy ), /* U+2543 ╃ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtLight , LtLight ), /* U+2544 ╄ */ + makePackedLineTypes(LtLight , LtLight , LtHeavy , LtHeavy ), /* U+2545 ╅ */ + makePackedLineTypes(LtLight , LtHeavy , LtHeavy , LtLight ), /* U+2546 ╆ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtLight , LtHeavy ), /* U+2547 ╇ */ + makePackedLineTypes(LtLight , LtHeavy , LtHeavy , LtHeavy ), /* U+2548 ╈ */ + makePackedLineTypes(LtHeavy , LtLight , LtHeavy , LtHeavy ), /* U+2549 ╉ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtHeavy , LtLight ), /* U+254A ╊ */ + makePackedLineTypes(LtHeavy , LtHeavy , LtHeavy , LtHeavy ), /* U+254B ╋ */ + 0, 0, 0, 0, /* U+254C - U+254F */ + makePackedLineTypes(LtNone , LtDouble, LtNone , LtDouble), /* U+2550 ═ */ + makePackedLineTypes(LtDouble, LtNone , LtDouble, LtNone ), /* U+2551 ║ */ + makePackedLineTypes(LtNone , LtDouble, LtLight , LtNone ), /* U+2552 ╒ */ + makePackedLineTypes(LtNone , LtLight , LtDouble, LtNone ), /* U+2553 ╓ */ + makePackedLineTypes(LtNone , LtDouble, LtDouble, LtNone ), /* U+2554 ╔ */ + makePackedLineTypes(LtNone , LtNone , LtLight , LtDouble), /* U+2555 ╕ */ + makePackedLineTypes(LtNone , LtNone , LtDouble, LtLight ), /* U+2556 ╖ */ + makePackedLineTypes(LtNone , LtNone , LtDouble, LtDouble), /* U+2557 ╗ */ + makePackedLineTypes(LtLight , LtDouble, LtNone , LtNone ), /* U+2558 ╘ */ + makePackedLineTypes(LtDouble, LtLight , LtNone , LtNone ), /* U+2559 ╙ */ + makePackedLineTypes(LtDouble, LtDouble, LtNone , LtNone ), /* U+255A ╚ */ + makePackedLineTypes(LtLight , LtNone , LtNone , LtDouble), /* U+255B ╛ */ + makePackedLineTypes(LtDouble, LtNone , LtNone , LtLight ), /* U+255C ╜ */ + makePackedLineTypes(LtDouble, LtNone , LtNone , LtDouble), /* U+255D ╝ */ + makePackedLineTypes(LtLight , LtDouble, LtLight , LtNone ), /* U+255E ╞ */ + makePackedLineTypes(LtDouble, LtLight , LtDouble, LtNone ), /* U+255F ╟ */ + makePackedLineTypes(LtDouble, LtDouble, LtDouble, LtNone ), /* U+2560 ╠ */ + makePackedLineTypes(LtLight , LtNone , LtLight , LtDouble), /* U+2561 ╡ */ + makePackedLineTypes(LtDouble, LtNone , LtDouble, LtLight ), /* U+2562 ╢ */ + makePackedLineTypes(LtDouble, LtNone , LtDouble, LtDouble), /* U+2563 ╣ */ + makePackedLineTypes(LtNone , LtDouble, LtLight , LtDouble), /* U+2564 ╤ */ + makePackedLineTypes(LtNone , LtLight , LtDouble, LtLight ), /* U+2565 ╥ */ + makePackedLineTypes(LtNone , LtDouble, LtDouble, LtDouble), /* U+2566 ╦ */ + makePackedLineTypes(LtLight , LtDouble, LtNone , LtDouble), /* U+2567 ╧ */ + makePackedLineTypes(LtDouble, LtLight , LtNone , LtLight ), /* U+2568 ╨ */ + makePackedLineTypes(LtDouble, LtDouble, LtNone , LtDouble), /* U+2569 ╩ */ + makePackedLineTypes(LtLight , LtDouble, LtLight , LtDouble), /* U+256A ╪ */ + makePackedLineTypes(LtDouble, LtLight , LtDouble, LtLight ), /* U+256B ╫ */ + makePackedLineTypes(LtDouble, LtDouble, LtDouble, LtDouble), /* U+256C ╬ */ + 0, 0, 0, 0, 0, 0, 0, /* U+256D - U+2573 */ + makePackedLineTypes(LtNone , LtNone , LtNone , LtLight ), /* U+2574 ╴ */ + makePackedLineTypes(LtLight , LtNone , LtNone , LtNone ), /* U+2575 ╵ */ + makePackedLineTypes(LtNone , LtLight , LtNone , LtNone ), /* U+2576 ╶ */ + makePackedLineTypes(LtNone , LtNone , LtLight , LtNone ), /* U+2577 ╷ */ + makePackedLineTypes(LtNone , LtNone , LtNone , LtHeavy ), /* U+2578 ╸ */ + makePackedLineTypes(LtHeavy , LtNone , LtNone , LtNone ), /* U+2579 ╹ */ + makePackedLineTypes(LtNone , LtHeavy , LtNone , LtNone ), /* U+257A ╺ */ + makePackedLineTypes(LtNone , LtNone , LtHeavy , LtNone ), /* U+257B ╻ */ + makePackedLineTypes(LtNone , LtHeavy , LtNone , LtLight ), /* U+257C ╼ */ + makePackedLineTypes(LtLight , LtNone , LtHeavy , LtNone ), /* U+257D ╽ */ + makePackedLineTypes(LtNone , LtLight , LtNone , LtHeavy ), /* U+257E ╾ */ + makePackedLineTypes(LtHeavy , LtNone , LtLight , LtNone ), /* U+257F ╿ */ +}; + + + +// Bitwise rotate left +template +inline static T rotateBitsLeft(T value, quint8 amount) +{ + static_assert (std::is_unsigned(), "T must be unsigned type"); + Q_ASSERT(amount < sizeof(value) * 8); + return value << amount | value >> (sizeof(value) * 8 - amount); +} + +inline static const QPen pen(const QPainter &paint, uint lineWidth) +{ + return QPen(paint.pen().brush(), lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); +} + + + +STATIC_METHOD INLINE_METHOD uint lineWidth(uint fontWidth, bool heavy, bool bold) +{ + static const qreal LightWidthToFontWidthRatio = 1.0 / 6.5; + static const qreal HeavyHalfExtraToLightRatio = 1.0 / 3.0; + static const qreal BoldCoefficient = 1.5; + + // ▄▄▄▄▄▄▄ } heavyHalfExtraWidth ⎫ + // ██████████████ } lightWidth ⎬ heavyWidth + // ▀▀▀▀▀▀▀ ⎭ + // light heavy + + const qreal baseWidth = fontWidth * LightWidthToFontWidthRatio; + const qreal boldCoeff = bold ? BoldCoefficient : 1.0; + // Unless font size is too small, make bold lines at least 1px wider than regular lines + const qreal minWidth = bold && fontWidth >= 7 ? baseWidth + 1.0 : 1.0; + const uint lightWidth = qRound(qMax(baseWidth * boldCoeff, minWidth)); + const uint heavyHalfExtraWidth = qRound(qMax(lightWidth * HeavyHalfExtraToLightRatio, 1.0)); + + return heavy ? lightWidth + 2 * heavyHalfExtraWidth : lightWidth; +} + +// Draws characters composed of straight solid lines +STATIC_METHOD INLINE_METHOD bool drawBasicLineCharacter(QPainter& paint, int x, int y, int w, int h, uchar code, + bool bold) +{ + quint8 packedLineTypes = code >= sizeof(PackedLineTypesLut) ? 0 : PackedLineTypesLut[code]; + if (packedLineTypes == 0) { + return false; + } + + const uint lightLineWidth = lineWidth(w, false, bold); + const uint heavyLineWidth = lineWidth(w, true, bold); + // Distance from double line's parallel axis to each line's parallel axis + const uint doubleLinesDistance = lightLineWidth; + + const QPen lightPen = pen(paint, lightLineWidth); + const QPen heavyPen = pen(paint, heavyLineWidth); + + static constexpr const unsigned LinesNum = 4; + + // Pixel aligned center point + const QPointF center = { + x + int(w/2) + 0.5 * (lightLineWidth % 2), + y + int(h/2) + 0.5 * (lightLineWidth % 2), + }; + + // Lines starting points, on the cell edges + const QPointF origin[] = { + QPointF(center.x(), y ), + QPointF(x+w , center.y() ), + QPointF(center.x(), y+h ), + QPointF(x , center.y() ), + }; + // Unit vectors with directions from center to the line's origin point + static const QPointF dir[] = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}}; + + const auto removeLineType = [&packedLineTypes](quint8 lineId)->void { + lineId = LinesNum - 1 - lineId % LinesNum; + packedLineTypes &= ~(3 << (2 * lineId)); + }; + const auto getLineType = [&packedLineTypes](quint8 lineId)->LineType { + lineId = LinesNum - 1 - lineId % LinesNum; + return LineType(packedLineTypes >> 2 * lineId & 3); + }; + + QPainterPath lightPath; // PainterPath for light lines (Painter Path Light) + QPainterPath heavyPath; // PainterPath for heavy lines (Painter Path Heavy) + // Returns ppl or pph depending on line type + const auto pathForLine = [&](quint8 lineId) -> QPainterPath& { + Q_ASSERT(getLineType(lineId) != LtNone); + return getLineType(lineId) == LtHeavy ? heavyPath : lightPath; + }; + + // Process all single up-down/left-right lines for every character that has them. Doing it here + // reduces amount of combinations below. + // Fully draws: ╋ ╂ ┃ ┿ ┼ │ ━ ─ + for (unsigned int topIndex = 0; topIndex < LinesNum/2; topIndex++) { + unsigned iB = (topIndex + 2) % LinesNum; + const bool isSingleLine = (getLineType(topIndex) == LtLight + || getLineType(topIndex) == LtHeavy); + if (isSingleLine && getLineType(topIndex) == getLineType(iB)) { + pathForLine(topIndex).moveTo(origin[topIndex]); + pathForLine(topIndex).lineTo(origin[iB]); + removeLineType(topIndex); + removeLineType(iB); + } + } + + // Find base rotation of a character and map rotated line indices to the original rotation's + // indices. The base rotation is defined as the one with largest packedLineTypes value. This way + // we can use the same code for drawing 4 possible character rotations (see switch() below) + + uint topIndex = 0; // index of an original top line in a base rotation + quint8 basePackedLineTypes = packedLineTypes; + for (uint i = 0; i < LinesNum; i++) { + const quint8 rotatedPackedLineTypes = rotateBitsLeft(packedLineTypes, i * 2); + if (rotatedPackedLineTypes > basePackedLineTypes) { + topIndex = i; + basePackedLineTypes = rotatedPackedLineTypes; + } + } + uint rightIndex = (topIndex + 1) % LinesNum; + uint bottomIndex = (topIndex + 2) % LinesNum; + uint leftIndex = (topIndex + 3) % LinesNum; + + // Common paths + const auto drawDoubleUpRightShorterLine = [&](quint8 top, quint8 right) { // ╚ + lightPath.moveTo(origin[top] + dir[right] * doubleLinesDistance); + lightPath.lineTo(center + (dir[right] + dir[top]) * doubleLinesDistance); + lightPath.lineTo(origin[right] + dir[top] * doubleLinesDistance); + }; + const auto drawUpRight = [&](quint8 top, quint8 right) { // └┗ + pathForLine(top).moveTo(origin[top]); + pathForLine(top).lineTo(center); + pathForLine(top).lineTo(origin[right]); + }; + + switch (basePackedLineTypes) { + case makePackedLineTypes(LtHeavy , LtNone , LtLight , LtNone ): // ╿ ; ╼ ╽ ╾ ╊ ╇ ╉ ╈ ╀ ┾ ╁ ┽ + lightPath.moveTo(origin[bottomIndex]); + lightPath.lineTo(center + dir[topIndex] * lightLineWidth / 2.0); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtHeavy , LtNone , LtNone , LtNone ): // ╹ ; ╺ ╻ ╸ ┻ ┣ ┳ ┫ ┸ ┝ ┰ ┥ + case makePackedLineTypes(LtLight , LtNone , LtNone , LtNone ): // ╵ ; ╶ ╷ ╴ ┷ ┠ ┯ ┨ ┴ ├ ┬ ┤ + pathForLine(topIndex).moveTo(origin[topIndex]); + pathForLine(topIndex).lineTo(center); + break; + + case makePackedLineTypes(LtHeavy , LtHeavy , LtLight , LtLight ): // ╄ ; ╃ ╆ ╅ + drawUpRight(bottomIndex, leftIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtHeavy , LtHeavy , LtNone , LtNone ): // ┗ ; ┛ ┏ ┓ + case makePackedLineTypes(LtLight , LtLight , LtNone , LtNone ): // └ ; ┘ ┌ ┐ + drawUpRight(topIndex, rightIndex); + break; + + case makePackedLineTypes(LtHeavy , LtLight , LtNone , LtNone ): // ┖ ; ┙ ┍ ┒ + qSwap(leftIndex, rightIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtHeavy , LtNone , LtNone , LtLight ): // ┚ ; ┕ ┎ ┑ + lightPath.moveTo(origin[leftIndex]); + lightPath.lineTo(center); + heavyPath.moveTo(origin[topIndex]); + heavyPath.lineTo(center + dir[bottomIndex] * lightLineWidth / 2.0); + break; + + case makePackedLineTypes(LtLight , LtDouble, LtNone , LtNone ): // ╘ ; ╜ ╓ ╕ + qSwap(leftIndex, rightIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtLight , LtNone , LtNone , LtDouble): // ╛ ; ╙ ╒ ╖ + lightPath.moveTo(origin[topIndex]); + lightPath.lineTo(center + dir[bottomIndex] * doubleLinesDistance); + lightPath.lineTo(origin[leftIndex] + dir[bottomIndex] * doubleLinesDistance); + lightPath.moveTo(origin[leftIndex] - dir[bottomIndex] * doubleLinesDistance); + lightPath.lineTo(center - dir[bottomIndex] * doubleLinesDistance); + break; + + case makePackedLineTypes(LtHeavy , LtHeavy , LtLight , LtNone ): // ┡ ; ┹ ┪ ┲ + qSwap(leftIndex, bottomIndex); + qSwap(rightIndex, topIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtHeavy , LtHeavy , LtNone , LtLight ): // ┺ ; ┩ ┢ ┱ + drawUpRight(topIndex, rightIndex); + lightPath.moveTo(origin[leftIndex]); + lightPath.lineTo(center); + break; + + case makePackedLineTypes(LtHeavy , LtLight , LtLight , LtNone ): // ┞ ; ┵ ┧ ┮ + qSwap(leftIndex, rightIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtHeavy , LtNone , LtLight , LtLight ): // ┦ ; ┶ ┟ ┭ + heavyPath.moveTo(origin[topIndex]); + heavyPath.lineTo(center + dir[bottomIndex] * lightLineWidth / 2.0); + drawUpRight(bottomIndex, leftIndex); + break; + + case makePackedLineTypes(LtLight , LtDouble, LtNone , LtDouble): // ╧ ; ╟ ╢ ╤ + lightPath.moveTo(origin[topIndex]); + lightPath.lineTo(center - dir[bottomIndex] * doubleLinesDistance); + qSwap(leftIndex, bottomIndex); + qSwap(rightIndex, topIndex); + Q_FALLTHROUGH(); + case makePackedLineTypes(LtDouble, LtNone , LtDouble, LtNone ): // ║ ; ╫ ═ ╪ + lightPath.moveTo(origin[topIndex] + dir[leftIndex] * doubleLinesDistance); + lightPath.lineTo(origin[bottomIndex] + dir[leftIndex] * doubleLinesDistance); + lightPath.moveTo(origin[topIndex] + dir[rightIndex] * doubleLinesDistance); + lightPath.lineTo(origin[bottomIndex] + dir[rightIndex] * doubleLinesDistance); + break; + + case makePackedLineTypes(LtDouble, LtNone , LtNone , LtNone ): // ╨ ; ╞ ╥ ╡ + lightPath.moveTo(origin[topIndex] + dir[leftIndex] * doubleLinesDistance); + lightPath.lineTo(center + dir[leftIndex] * doubleLinesDistance); + lightPath.moveTo(origin[topIndex] + dir[rightIndex] * doubleLinesDistance); + lightPath.lineTo(center + dir[rightIndex] * doubleLinesDistance); + break; + + case makePackedLineTypes(LtDouble, LtDouble, LtDouble, LtDouble): // ╬ + drawDoubleUpRightShorterLine(topIndex, rightIndex); + drawDoubleUpRightShorterLine(bottomIndex, rightIndex); + drawDoubleUpRightShorterLine(topIndex, leftIndex); + drawDoubleUpRightShorterLine(bottomIndex, leftIndex); + break; + + case makePackedLineTypes(LtDouble, LtDouble, LtDouble, LtNone ): // ╠ ; ╩ ╣ ╦ + lightPath.moveTo(origin[topIndex] + dir[leftIndex] * doubleLinesDistance); + lightPath.lineTo(origin[bottomIndex] + dir[leftIndex] * doubleLinesDistance); + drawDoubleUpRightShorterLine(topIndex, rightIndex); + drawDoubleUpRightShorterLine(bottomIndex, rightIndex); + break; + + case makePackedLineTypes(LtDouble, LtDouble, LtNone , LtNone ): // ╚ ; ╝ ╔ ╗ + lightPath.moveTo(origin[topIndex] + dir[leftIndex] * doubleLinesDistance); + lightPath.lineTo(center + (dir[leftIndex] + dir[bottomIndex]) * doubleLinesDistance); + lightPath.lineTo(origin[rightIndex] + dir[bottomIndex] * doubleLinesDistance); + drawDoubleUpRightShorterLine(topIndex, rightIndex); + break; + } + + // Draw paths + if (!lightPath.isEmpty()) { + paint.strokePath(lightPath, lightPen); + } + if (!heavyPath.isEmpty()) { + paint.strokePath(heavyPath, heavyPen); + } + + return true; +} + +STATIC_METHOD INLINE_METHOD bool drawDashedLineCharacter(QPainter &paint, int x, int y, int w, int h, uchar code, + bool bold) +{ + if (!((0x04 <= code && code <= 0x0B) || (0x4C <= code && code <= 0x4F))) { + return false; + } + + const uint lightLineWidth = lineWidth(w, false, bold); + const uint heavyLineWidth = lineWidth(w, true, bold); + + const auto lightPen = pen(paint, lightLineWidth); + const auto heavyPen = pen(paint, heavyLineWidth); + + // Pixel aligned center point + const QPointF center = { + int(x + w/2.0) + 0.5 * (lightLineWidth%2), + int(y + h/2.0) + 0.5 * (lightLineWidth%2), + }; + + const qreal halfGapH = qMax(w / 20.0, 0.5); + const qreal halfGapV = qMax(h / 26.0, 0.5); + // For some reason vertical double dash has bigger gap + const qreal halfGapDDV = qMax(h / 14.0, 0.5); + + static const int LinesNumMax = 4; + + enum Orientation {Horizontal, Vertical}; + struct { + int linesNum; + Orientation orientation; + QPen pen; + qreal halfGap; + } lineProps; + + switch (code) { + case 0x4C: lineProps = {2, Horizontal, lightPen, halfGapH }; break; // ╌ + case 0x4D: lineProps = {2, Horizontal, heavyPen, halfGapH }; break; // ╍ + case 0x4E: lineProps = {2, Vertical , lightPen, halfGapDDV}; break; // ╎ + case 0x4F: lineProps = {2, Vertical , heavyPen, halfGapDDV}; break; // ╏ + case 0x04: lineProps = {3, Horizontal, lightPen, halfGapH }; break; // ┄ + case 0x05: lineProps = {3, Horizontal, heavyPen, halfGapH }; break; // ┅ + case 0x06: lineProps = {3, Vertical , lightPen, halfGapV }; break; // ┆ + case 0x07: lineProps = {3, Vertical , heavyPen, halfGapV }; break; // ┇ + case 0x08: lineProps = {4, Horizontal, lightPen, halfGapH }; break; // ┈ + case 0x09: lineProps = {4, Horizontal, heavyPen, halfGapH }; break; // ┉ + case 0x0A: lineProps = {4, Vertical , lightPen, halfGapV }; break; // ┊ + case 0x0B: lineProps = {4, Vertical , heavyPen, halfGapV }; break; // ┋ + } + + Q_ASSERT(lineProps.linesNum <= LinesNumMax); + const int size = (lineProps.orientation == Horizontal ? w : h); + const int pos = (lineProps.orientation == Horizontal ? x : y); + QLineF lines[LinesNumMax]; + + for (int i = 0; i < lineProps.linesNum; i++) { + const qreal start = pos + qreal(size * (i )) / lineProps.linesNum; + const qreal end = pos + qreal(size * (i+1)) / lineProps.linesNum; + if (lineProps.orientation == Horizontal) { + lines[i] = QLineF{start + lineProps.halfGap, center.y(), + end - lineProps.halfGap, center.y()}; + } else { + lines[i] = QLineF{center.x(), start + lineProps.halfGap, + center.x(), end - lineProps.halfGap}; + } + } + + const auto origPen = paint.pen(); + + paint.setPen(lineProps.pen); + paint.drawLines(lines, lineProps.linesNum); + + paint.setPen(origPen); + return true; +} + +STATIC_METHOD INLINE_METHOD bool drawRoundedCornerLineCharacter(QPainter &paint, int x, int y, int w, int h, + uchar code, bool bold) +{ + if (!(0x6D <= code && code <= 0x70)) { + return false; + } + + const uint lightLineWidth = lineWidth(w, false, bold); + const auto lightPen = pen(paint, lightLineWidth); + + // Pixel aligned center point + const QPointF center = { + int(x + w/2.0) + 0.5 * (lightLineWidth%2), + int(y + h/2.0) + 0.5 * (lightLineWidth%2), + }; + + const int r = w * 3 / 8; + const int d = 2 * r; + + QPainterPath path; + + // lineTo() between moveTo and arcTo is redundant - arcTo() draws line + // to the arc's starting point + switch (code) { + case 0x6D: // BOX DRAWINGS LIGHT ARC DOWN AND RIGHT + path.moveTo(center.x(), y + h); + path.arcTo(center.x(), center.y(), d, d, 180, -90); + path.lineTo(x + w, center.y()); + break; + case 0x6E: // BOX DRAWINGS LIGHT ARC DOWN AND LEFT + path.moveTo(center.x(), y + h); + path.arcTo(center.x() - d, center.y(), d, d, 0, 90); + path.lineTo(x, center.y()); + break; + case 0x6F: // BOX DRAWINGS LIGHT ARC UP AND LEFT + path.moveTo(center.x(), y); + path.arcTo(center.x() - d, center.y() - d, d, d, 0, -90); + path.lineTo(x, center.y()); + break; + case 0x70: // BOX DRAWINGS LIGHT ARC UP AND RIGHT + path.moveTo(center.x(), y); + path.arcTo(center.x(), center.y() - d, d, d, 180, 90); + path.lineTo(x + w, center.y()); + break; + } + paint.strokePath(path, lightPen); + + return true; +} + +STATIC_METHOD INLINE_METHOD bool drawDiagonalLineCharacter(QPainter &paint, int x, int y, int w, int h, + uchar code, bool bold) +{ + if (!(0x71 <= code && code <= 0x73)) { + return false; + } + + const uint lightLineWidth = lineWidth(w, false, bold); + const auto lightPen = pen(paint, lightLineWidth); + + const QLineF lines[] = { + QLineF(x+w, y, x , y+h), // '/' + QLineF(x , y, x+w, y+h), // '\' + }; + + const auto origPen = paint.pen(); + + paint.setPen(lightPen); + switch (code) { + case 0x71: // BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT + paint.drawLine(lines[0]); + break; + case 0x72: // BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT + paint.drawLine(lines[1]); + break; + case 0x73: // BOX DRAWINGS LIGHT DIAGONAL CROSS + paint.drawLines(lines, 2); + break; + } + + paint.setPen(origPen); + return true; +} + +STATIC_METHOD INLINE_METHOD bool drawBlockCharacter(QPainter &paint, int x, int y, int w, int h, uchar code, + bool bold) +{ + Q_UNUSED(bold) + + const QColor color = paint.pen().color(); + + // Center point + const QPointF center = { + x + w/2.0, + y + h/2.0, + }; + + // Default rect fills entire cell + QRectF rect(x, y, w, h); + + // LOWER ONE EIGHTH BLOCK to LEFT ONE EIGHTH BLOCK + if (code >= 0x81 && code <= 0x8f) { + if (code < 0x88) { // Horizontal + const qreal height = h * (0x88 - code) / 8.0; + rect.setY(y + height); + rect.setHeight(h - height); + } else if (code > 0x88) { // Vertical + const qreal width = w * (0x90 - code) / 8.0; + rect.setWidth(width); + } + paint.fillRect(rect, color); + + return true; + } + + // Combinations of quarter squares + // LEFT ONE EIGHTH BLOCK to QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT + if (code >= 0x96 && code <= 0x9F) { + const QRectF upperLeft (x , y , w/2.0, h/2.0); + const QRectF upperRight(center.x(), y , w/2.0, h/2.0); + const QRectF lowerLeft (x , center.y(), w/2.0, h/2.0); + const QRectF lowerRight(center.x(), center.y(), w/2.0, h/2.0); + + QPainterPath path; + + switch (code) { + case 0x96: // ▖ + path.addRect(lowerLeft); + break; + case 0x97: // ▗ + path.addRect(lowerRight); + break; + case 0x98: // ▘ + path.addRect(upperLeft); + break; + case 0x99: // ▙ + path.addRect(upperLeft); + path.addRect(lowerLeft); + path.addRect(lowerRight); + break; + case 0x9a: // ▚ + path.addRect(upperLeft); + path.addRect(lowerRight); + break; + case 0x9b: // ▛ + path.addRect(upperLeft); + path.addRect(upperRight); + path.addRect(lowerLeft); + break; + case 0x9c: // ▜ + path.addRect(upperLeft); + path.addRect(upperRight); + path.addRect(lowerRight); + break; + case 0x9d: // ▝ + path.addRect(upperRight); + break; + case 0x9e: // ▞ + path.addRect(upperRight); + path.addRect(lowerLeft); + break; + case 0x9f: // ▟ + path.addRect(upperRight); + path.addRect(lowerLeft); + path.addRect(lowerRight); + break; + } + paint.fillPath(path, color); + + return true; + } + + QBrush lightShade; + QBrush mediumShade; + QBrush darkShade; + if (paint.testRenderHint(QPainter::Antialiasing)) { + lightShade = QColor(color.red(), color.green(), color.blue(), 64); + mediumShade = QColor(color.red(), color.green(), color.blue(), 128); + darkShade = QColor(color.red(), color.green(), color.blue(), 192); + } else { + lightShade = QBrush(color, Qt::Dense6Pattern); + mediumShade = QBrush(color, Qt::Dense4Pattern); + darkShade = QBrush(color, Qt::Dense2Pattern); + } + // And the random stuff + switch (code) { + case 0x80: // Top half block + rect.setHeight(h/2.0); + paint.fillRect(rect, color); + return true; + case 0x90: // Right half block + rect.moveLeft(center.x()); + paint.fillRect(rect, color); + return true; + case 0x94: // Top one eighth block + rect.setHeight(h/8.0); + paint.fillRect(rect, color); + return true; + case 0x95: { // Right one eighth block + const qreal width = 7 * w / 8.0; + rect.moveLeft(x + width); + paint.fillRect(rect, color); + return true; + } + case 0x91: // Light shade + paint.fillRect(rect, lightShade); + return true; + case 0x92: // Medium shade + paint.fillRect(rect, mediumShade); + return true; + case 0x93: // Dark shade + paint.fillRect(rect, darkShade); + return true; + + default: + return false; + } +} + +void draw(QPainter &paint, const QRect &cellRect, const QChar &chr, bool bold) +{ + static const ushort FirstBoxDrawingCharacterCodePoint = 0x2500; + const uchar code = chr.unicode() - FirstBoxDrawingCharacterCodePoint; + + int x = cellRect.x(); + int y = cellRect.y(); + int w = cellRect.width(); + int h = cellRect.height(); + + // Each function below returns true when it has drawn the character, false otherwise. + drawBasicLineCharacter(paint, x, y, w, h, code, bold) + || drawDashedLineCharacter(paint, x, y, w, h, code, bold) + || drawRoundedCornerLineCharacter(paint, x, y, w, h, code, bold) + || drawDiagonalLineCharacter(paint, x, y, w, h, code, bold) + || drawBlockCharacter(paint, x, y, w, h, code, bold); +} + +} // namespace LineBlockCharacters +} // namespace Konsole diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/konsole_wcwidth.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/konsole_wcwidth.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/konsole_wcwidth.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/konsole_wcwidth.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,91 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef _KONSOLE_WCWIDTH_H_ +#define _KONSOLE_WCWIDTH_H_ + +// Standard +#include + +// Qt +#include +#include + +#ifdef UNIT_TEST + #define STATIC_METHOD + #define INLINE_METHOD +#else + #define STATIC_METHOD static + #define INLINE_METHOD inline +#endif + +int konsole_wcwidth(wchar_t ucs); + +int string_width( const std::wstring & wstr ); + +namespace Konsole { + +/** + * Helper functions for drawing characters from "Box Drawing" and "Block Elements" Unicode blocks. + */ +namespace LineBlockCharacters { + +#ifdef UNIT_TEST + bool drawBasicLineCharacter(QPainter& paint, int x, int y, int w, int h, uchar code, + bool bold); + + uint lineWidth(uint fontWidth, bool heavy, bool bold); + + bool drawDashedLineCharacter(QPainter &paint, int x, int y, int w, int h, uchar code, + bool bold); + bool drawRoundedCornerLineCharacter(QPainter &paint, int x, int y, int w, int h, + uchar code, bool bold); + bool drawDiagonalLineCharacter(QPainter &paint, int x, int y, int w, int h, + uchar code, bool bold); + bool drawBlockCharacter(QPainter &paint, int x, int y, int w, int h, uchar code, + bool bold); +#endif + + /** + * Returns true if the character can be drawn by draw() function. + * + * @param ucs4cp Character to test's UCS4 code point + */ + inline static bool canDraw(uint ucs4cp) { + return (0x2500 <= ucs4cp && ucs4cp <= 0x259F); + } + + /** + * Draws character. + * + * @param paint QPainter to draw on + * @param cellRect Rectangle to draw in + * @param chr Character to be drawn + * @param bold Whether the character should be boldface + */ + void draw(QPainter &paint, const QRect &cellRect, const QChar &chr, bool bold); + +} // namespace LineBlockCharacters +} // namespace Konsole + +int characterWidth(uint ucs4); + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kprocess.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kprocess.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kprocess.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kprocess.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,402 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of the KDE libraries + + Copyright (C) 2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kprocess.h" + +#include + +#ifdef Q_OS_WIN +# include +#else +# include +# include +#endif + +#ifndef Q_OS_WIN +# define STD_OUTPUT_HANDLE 1 +# define STD_ERROR_HANDLE 2 +#endif + +#ifdef _WIN32_WCE +#include +#endif + +void KProcessPrivate::writeAll(const QByteArray &buf, int fd) +{ +#ifdef Q_OS_WIN +#ifndef _WIN32_WCE + HANDLE h = GetStdHandle(fd); + if (h) { + DWORD wr; + WriteFile(h, buf.data(), buf.size(), &wr, 0); + } +#else + fwrite(buf.data(), 1, buf.size(), (FILE*)fd); +#endif +#else + int off = 0; + do { + int ret = ::write(fd, buf.data() + off, buf.size() - off); + if (ret < 0) { + if (errno != EINTR) + return; + } else { + off += ret; + } + } while (off < buf.size()); +#endif +} + +void KProcessPrivate::forwardStd(KProcess::ProcessChannel good, int fd) +{ + Q_Q(KProcess); + + QProcess::ProcessChannel oc = q->readChannel(); + q->setReadChannel(good); + writeAll(q->readAll(), fd); + q->setReadChannel(oc); +} + +void KProcessPrivate::_k_forwardStdout() +{ +#ifndef _WIN32_WCE + forwardStd(KProcess::StandardOutput, STD_OUTPUT_HANDLE); +#else + forwardStd(KProcess::StandardOutput, (int)stdout); +#endif +} + +void KProcessPrivate::_k_forwardStderr() +{ +#ifndef _WIN32_WCE + forwardStd(KProcess::StandardError, STD_ERROR_HANDLE); +#else + forwardStd(KProcess::StandardError, (int)stderr); +#endif +} + +///////////////////////////// +// public member functions // +///////////////////////////// + +KProcess::KProcess(QObject *parent) : + QProcess(parent), + d_ptr(new KProcessPrivate) +{ + d_ptr->q_ptr = this; + setOutputChannelMode(ForwardedChannels); +} + +KProcess::KProcess(KProcessPrivate *d, QObject *parent) : + QProcess(parent), + d_ptr(d) +{ + d_ptr->q_ptr = this; + setOutputChannelMode(ForwardedChannels); +} + +KProcess::~KProcess() +{ + delete d_ptr; +} + +void KProcess::setOutputChannelMode(OutputChannelMode mode) +{ + Q_D(KProcess); + + d->outputChannelMode = mode; + disconnect(this, SIGNAL(readyReadStandardOutput())); + disconnect(this, SIGNAL(readyReadStandardError())); + switch (mode) { + case OnlyStdoutChannel: + connect(this, SIGNAL(readyReadStandardError()), SLOT(_k_forwardStderr())); + break; + case OnlyStderrChannel: + connect(this, SIGNAL(readyReadStandardOutput()), SLOT(_k_forwardStdout())); + break; + default: + QProcess::setProcessChannelMode((ProcessChannelMode)mode); + return; + } + QProcess::setProcessChannelMode(QProcess::SeparateChannels); +} + +KProcess::OutputChannelMode KProcess::outputChannelMode() const +{ + Q_D(const KProcess); + + return d->outputChannelMode; +} + +void KProcess::setNextOpenMode(QIODevice::OpenMode mode) +{ + Q_D(KProcess); + + d->openMode = mode; +} + +#define DUMMYENV "_KPROCESS_DUMMY_=" + +void KProcess::clearEnvironment() +{ + setEnvironment(QStringList() << QString::fromLatin1(DUMMYENV)); +} + +void KProcess::setEnv(const QString &name, const QString &value, bool overwrite) +{ + QStringList env = environment(); + if (env.isEmpty()) { + env = systemEnvironment(); + env.removeAll(QString::fromLatin1(DUMMYENV)); + } + QString fname(name); + fname.append(QLatin1Char('=')); + for (QStringList::Iterator it = env.begin(); it != env.end(); ++it) + if ((*it).startsWith(fname)) { + if (overwrite) { + *it = fname.append(value); + setEnvironment(env); + } + return; + } + env.append(fname.append(value)); + setEnvironment(env); +} + +void KProcess::unsetEnv(const QString &name) +{ + QStringList env = environment(); + if (env.isEmpty()) { + env = systemEnvironment(); + env.removeAll(QString::fromLatin1(DUMMYENV)); + } + QString fname(name); + fname.append(QLatin1Char('=')); + for (QStringList::Iterator it = env.begin(); it != env.end(); ++it) + if ((*it).startsWith(fname)) { + env.erase(it); + if (env.isEmpty()) + env.append(QString::fromLatin1(DUMMYENV)); + setEnvironment(env); + return; + } +} + +void KProcess::setProgram(const QString &exe, const QStringList &args) +{ + Q_D(KProcess); + + d->prog = exe; + d->args = args; +#ifdef Q_OS_WIN + setNativeArguments(QString()); +#endif +} + +void KProcess::setProgram(const QStringList &argv) +{ + Q_D(KProcess); + + Q_ASSERT( !argv.isEmpty() ); + d->args = argv; + d->prog = d->args.takeFirst(); +#ifdef Q_OS_WIN + setNativeArguments(QString()); +#endif +} + +KProcess &KProcess::operator<<(const QString &arg) +{ + Q_D(KProcess); + + if (d->prog.isEmpty()) + d->prog = arg; + else + d->args << arg; + return *this; +} + +KProcess &KProcess::operator<<(const QStringList &args) +{ + Q_D(KProcess); + + if (d->prog.isEmpty()) + setProgram(args); + else + d->args << args; + return *this; +} + +void KProcess::clearProgram() +{ + Q_D(KProcess); + + d->prog.clear(); + d->args.clear(); +#ifdef Q_OS_WIN + setNativeArguments(QString()); +#endif +} + +#if 0 +void KProcess::setShellCommand(const QString &cmd) +{ + Q_D(KProcess); + + KShell::Errors err; + d->args = KShell::splitArgs( + cmd, KShell::AbortOnMeta | KShell::TildeExpand, &err); + if (err == KShell::NoError && !d->args.isEmpty()) { + d->prog = KStandardDirs::findExe(d->args[0]); + if (!d->prog.isEmpty()) { + d->args.removeFirst(); +#ifdef Q_OS_WIN + setNativeArguments(QString()); +#endif + return; + } + } + + d->args.clear(); + +#ifdef Q_OS_UNIX +// #ifdef NON_FREE // ... as they ship non-POSIX /bin/sh +# if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__GNU__) + // If /bin/sh is a symlink, we can be pretty sure that it points to a + // POSIX shell - the original bourne shell is about the only non-POSIX + // shell still in use and it is always installed natively as /bin/sh. + d->prog = QFile::symLinkTarget(QString::fromLatin1("/bin/sh")); + if (d->prog.isEmpty()) { + // Try some known POSIX shells. + d->prog = KStandardDirs::findExe(QString::fromLatin1("ksh")); + if (d->prog.isEmpty()) { + d->prog = KStandardDirs::findExe(QString::fromLatin1("ash")); + if (d->prog.isEmpty()) { + d->prog = KStandardDirs::findExe(QString::fromLatin1("bash")); + if (d->prog.isEmpty()) { + d->prog = KStandardDirs::findExe(QString::fromLatin1("zsh")); + if (d->prog.isEmpty()) + // We're pretty much screwed, to be honest ... + d->prog = QString::fromLatin1("/bin/sh"); + } + } + } + } +# else + d->prog = QString::fromLatin1("/bin/sh"); +# endif + + d->args << QString::fromLatin1("-c") << cmd; +#else // Q_OS_UNIX + // KMacroExpander::expandMacrosShellQuote(), KShell::quoteArg() and + // KShell::joinArgs() may generate these for security reasons. + setEnv(PERCENT_VARIABLE, QLatin1String("%")); + +#ifndef _WIN32_WCE + WCHAR sysdir[MAX_PATH + 1]; + UINT size = GetSystemDirectoryW(sysdir, MAX_PATH + 1); + d->prog = QString::fromUtf16((const ushort *) sysdir, size); + d->prog += QLatin1String("\\cmd.exe"); + setNativeArguments(QLatin1String("/V:OFF /S /C \"") + cmd + QLatin1Char('"')); +#else + d->prog = QLatin1String("\\windows\\cmd.exe"); + setNativeArguments(QLatin1String("/S /C \"") + cmd + QLatin1Char('"')); +#endif +#endif +} +#endif +QStringList KProcess::program() const +{ + Q_D(const KProcess); + + QStringList argv = d->args; + argv.prepend(d->prog); + return argv; +} + +void KProcess::start() +{ + Q_D(KProcess); + + QProcess::start(d->prog, d->args, d->openMode); +} + +int KProcess::execute(int msecs) +{ + start(); + if (!waitForFinished(msecs)) { + kill(); + waitForFinished(-1); + return -2; + } + return (exitStatus() == QProcess::NormalExit) ? exitCode() : -1; +} + +// static +int KProcess::execute(const QString &exe, const QStringList &args, int msecs) +{ + KProcess p; + p.setProgram(exe, args); + return p.execute(msecs); +} + +// static +int KProcess::execute(const QStringList &argv, int msecs) +{ + KProcess p; + p.setProgram(argv); + return p.execute(msecs); +} + +int KProcess::startDetached() +{ + Q_D(KProcess); + + qint64 pid; + if (!QProcess::startDetached(d->prog, d->args, workingDirectory(), &pid)) + return 0; + return (int) pid; +} + +// static +int KProcess::startDetached(const QString &exe, const QStringList &args) +{ + qint64 pid; + if (!QProcess::startDetached(exe, args, QString(), &pid)) + return 0; + return (int) pid; +} + +// static +int KProcess::startDetached(const QStringList &argv) +{ + QStringList args = argv; + QString prog = args.takeFirst(); + return startDetached(prog, args); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kprocess.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kprocess.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kprocess.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kprocess.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,365 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of the KDE libraries + + Copyright (C) 2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KPROCESS_H +#define KPROCESS_H + +//#include + +#include + +class KProcessPrivate; + +/** + * \class KProcess kprocess.h + * + * Child process invocation, monitoring and control. + * + * This class extends QProcess by some useful functionality, overrides + * some defaults with saner values and wraps parts of the API into a more + * accessible one. + * This is the preferred way of spawning child processes in KDE; don't + * use QProcess directly. + * + * @author Oswald Buddenhagen + **/ +class KProcess : public QProcess +{ + Q_OBJECT + Q_DECLARE_PRIVATE(KProcess) + +public: + + /** + * Modes in which the output channels can be opened. + */ + enum OutputChannelMode { + SeparateChannels = QProcess::SeparateChannels, + /**< Standard output and standard error are handled by KProcess + as separate channels */ + MergedChannels = QProcess::MergedChannels, + /**< Standard output and standard error are handled by KProcess + as one channel */ + ForwardedChannels = QProcess::ForwardedChannels, + /**< Both standard output and standard error are forwarded + to the parent process' respective channel */ + OnlyStdoutChannel, + /**< Only standard output is handled; standard error is forwarded */ + OnlyStderrChannel /**< Only standard error is handled; standard output is forwarded */ + }; + + /** + * Constructor + */ + explicit KProcess(QObject *parent = nullptr); + + /** + * Destructor + */ + ~KProcess() override; + + /** + * Set how to handle the output channels of the child process. + * + * The default is ForwardedChannels, which is unlike in QProcess. + * Do not request more than you actually handle, as this output is + * simply lost otherwise. + * + * This function must be called before starting the process. + * + * @param mode the output channel handling mode + */ + void setOutputChannelMode(OutputChannelMode mode); + + /** + * Query how the output channels of the child process are handled. + * + * @return the output channel handling mode + */ + OutputChannelMode outputChannelMode() const; + + /** + * Set the QIODevice open mode the process will be opened in. + * + * This function must be called before starting the process, obviously. + * + * @param mode the open mode. Note that this mode is automatically + * "reduced" according to the channel modes and redirections. + * The default is QIODevice::ReadWrite. + */ + void setNextOpenMode(QIODevice::OpenMode mode); + + /** + * Adds the variable @p name to the process' environment. + * + * This function must be called before starting the process. + * + * @param name the name of the environment variable + * @param value the new value for the environment variable + * @param overwrite if @c false and the environment variable is already + * set, the old value will be preserved + */ + void setEnv(const QString &name, const QString &value, bool overwrite = true); + + /** + * Removes the variable @p name from the process' environment. + * + * This function must be called before starting the process. + * + * @param name the name of the environment variable + */ + void unsetEnv(const QString &name); + + /** + * Empties the process' environment. + * + * Note that LD_LIBRARY_PATH/DYLD_LIBRARY_PATH is automatically added + * on *NIX. + * + * This function must be called before starting the process. + */ + void clearEnvironment(); + + /** + * Set the program and the command line arguments. + * + * This function must be called before starting the process, obviously. + * + * @param exe the program to execute + * @param args the command line arguments for the program, + * one per list element + */ + void setProgram(const QString &exe, const QStringList &args = QStringList()); + + /** + * @overload + * + * @param argv the program to execute and the command line arguments + * for the program, one per list element + */ + void setProgram(const QStringList &argv); + + /** + * Append an element to the command line argument list for this process. + * + * If no executable is set yet, it will be set instead. + * + * For example, doing an "ls -l /usr/local/bin" can be achieved by: + * \code + * KProcess p; + * p << "ls" << "-l" << "/usr/local/bin"; + * ... + * \endcode + * + * This function must be called before starting the process, obviously. + * + * @param arg the argument to add + * @return a reference to this KProcess + */ + KProcess &operator<<(const QString& arg); + + /** + * @overload + * + * @param args the arguments to add + * @return a reference to this KProcess + */ + KProcess &operator<<(const QStringList& args); + + /** + * Clear the program and command line argument list. + */ + void clearProgram(); + + /** + * Set a command to execute through a shell (a POSIX sh on *NIX + * and cmd.exe on Windows). + * + * Using this for anything but user-supplied commands is usually a bad + * idea, as the command's syntax depends on the platform. + * Redirections including pipes, etc. are better handled by the + * respective functions provided by QProcess. + * + * If KProcess determines that the command does not really need a + * shell, it will trasparently execute it without one for performance + * reasons. + * + * This function must be called before starting the process, obviously. + * + * @param cmd the command to execute through a shell. + * The caller must make sure that all filenames etc. are properly + * quoted when passed as argument. Failure to do so often results in + * serious security holes. See KShell::quoteArg(). + */ + void setShellCommand(const QString &cmd); + + /** + * Obtain the currently set program and arguments. + * + * @return a list, the first element being the program, the remaining ones + * being command line arguments to the program. + */ + QStringList program() const; + + /** + * Start the process. + * + * @see QProcess::start(const QString &, const QStringList &, OpenMode) + */ + void start(); + + /** + * Start the process, wait for it to finish, and return the exit code. + * + * This method is roughly equivalent to the sequence: + * + * start(); + * waitForFinished(msecs); + * return exitCode(); + * + * + * Unlike the other execute() variants this method is not static, + * so the process can be parametrized properly and talked to. + * + * @param msecs time to wait for process to exit before killing it + * @return -2 if the process could not be started, -1 if it crashed, + * otherwise its exit code + */ + int execute(int msecs = -1); + + /** + * @overload + * + * @param exe the program to execute + * @param args the command line arguments for the program, + * one per list element + * @param msecs time to wait for process to exit before killing it + * @return -2 if the process could not be started, -1 if it crashed, + * otherwise its exit code + */ + static int execute(const QString &exe, const QStringList &args = QStringList(), int msecs = -1); + + /** + * @overload + * + * @param argv the program to execute and the command line arguments + * for the program, one per list element + * @param msecs time to wait for process to exit before killing it + * @return -2 if the process could not be started, -1 if it crashed, + * otherwise its exit code + */ + static int execute(const QStringList &argv, int msecs = -1); + + /** + * Start the process and detach from it. See QProcess::startDetached() + * for details. + * + * Unlike the other startDetached() variants this method is not static, + * so the process can be parametrized properly. + * @note Currently, only the setProgram()/setShellCommand() and + * setWorkingDirectory() parametrizations are supported. + * + * The KProcess object may be re-used immediately after calling this + * function. + * + * @return the PID of the started process or 0 on error + */ + int startDetached(); + + /** + * @overload + * + * @param exe the program to start + * @param args the command line arguments for the program, + * one per list element + * @return the PID of the started process or 0 on error + */ + static int startDetached(const QString &exe, const QStringList &args = QStringList()); + + /** + * @overload + * + * @param argv the program to start and the command line arguments + * for the program, one per list element + * @return the PID of the started process or 0 on error + */ + static int startDetached(const QStringList &argv); + +protected: + /** + * @internal + */ + KProcess(KProcessPrivate *d, QObject *parent); + + /** + * @internal + */ + KProcessPrivate * const d_ptr; + +private: + // hide those + using QProcess::setReadChannelMode; + using QProcess::readChannelMode; + using QProcess::setProcessChannelMode; + using QProcess::processChannelMode; + + Q_PRIVATE_SLOT(d_func(), void _k_forwardStdout()) + Q_PRIVATE_SLOT(d_func(), void _k_forwardStderr()) +}; + +/* ----------- kprocess_p.h ---------------- */ +class KProcessPrivate { + + Q_DECLARE_PUBLIC(KProcess) + +protected: + KProcessPrivate() : + outputChannelMode(KProcess::ForwardedChannels), + openMode(QIODevice::ReadWrite), + q_ptr(nullptr) + { + } + virtual ~KProcessPrivate() + { + } + void writeAll(const QByteArray &buf, int fd); + void forwardStd(KProcess::ProcessChannel good, int fd); + void _k_forwardStdout(); + void _k_forwardStderr(); + + QString prog; + QStringList args; + KProcess::OutputChannelMode outputChannelMode; + QIODevice::OpenMode openMode; + + KProcess *q_ptr; +}; +/* ------------------------------------------- */ +#endif + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,737 @@ +/* + + This file is part of the KDE libraries + Copyright (C) 2002 Waldo Bastian + Copyright (C) 2002-2003,2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#include "kpty_p.h" + +#include + + +#if defined(__FreeBSD__) || defined(__DragonFly__) +#define HAVE_LOGIN +#define HAVE_LIBUTIL_H +#endif + +#if defined(__OpenBSD__) +#define HAVE_LOGIN +#define HAVE_UTIL_H +#endif + +#if defined(__NetBSD__) +#define HAVE_LOGIN +#define HAVE_UTIL_H +#define HAVE_OPENPTY +#endif + +#if defined(__APPLE__) +#define HAVE_OPENPTY +#define HAVE_UTIL_H +#endif + +#ifdef __sgi +#define __svr4__ +#endif + +#ifdef __osf__ +#define _OSF_SOURCE +#include +#endif + +#ifdef _AIX +#define _ALL_SOURCE +#endif + +// __USE_XOPEN isn't defined by default in ICC +// (needed for ptsname(), grantpt() and unlockpt()) +#ifdef __INTEL_COMPILER +# ifndef __USE_XOPEN +# define __USE_XOPEN +# endif +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(HAVE_PTY_H) +# include +#endif + +#ifdef HAVE_LIBUTIL_H +# include +#elif defined(HAVE_UTIL_H) +# include +#endif + +#ifdef HAVE_UTEMPTER +extern "C" { +# include +} +#else +# include +# ifdef HAVE_UTMPX +# include +# endif +# if !defined(_PATH_UTMPX) && defined(_UTMPX_FILE) +# define _PATH_UTMPX _UTMPX_FILE +# endif +# ifdef HAVE_UPDWTMPX +# if !defined(_PATH_WTMPX) && defined(_WTMPX_FILE) +# define _PATH_WTMPX _WTMPX_FILE +# endif +# endif +#endif + +/* for HP-UX (some versions) the extern C is needed, and for other + platforms it doesn't hurt */ +extern "C" { +#include +#if defined(HAVE_TERMIO_H) +# include // struct winsize on some systems +#endif +} + +#if defined (_HPUX_SOURCE) +# define _TERMIOS_INCLUDED +# include +#endif + +#ifdef HAVE_SYS_STROPTS_H +# include // Defines I_PUSH +# define _NEW_TTY_CTRL +#endif + +#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__) +# define _tcgetattr(fd, ttmode) ioctl(fd, TIOCGETA, (char *)ttmode) +#else +# if defined(_HPUX_SOURCE) || defined(__Lynx__) || defined (__CYGWIN__) || defined(__GNU__) +# define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode) +# else +# define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode) +# endif +#endif + +#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__) +# define _tcsetattr(fd, ttmode) ioctl(fd, TIOCSETA, (char *)ttmode) +#else +# if defined(_HPUX_SOURCE) || defined(__CYGWIN__) || defined(__GNU__) +# define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode) +# else +# define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode) +# endif +#endif + +//#include +//#include // findExe + +// not defined on HP-UX for example +#ifndef CTRL +# define CTRL(x) ((x) & 037) +#endif + +#define TTY_GROUP "tty" + +/////////////////////// +// private functions // +/////////////////////// + +////////////////// +// private data // +////////////////// + +KPtyPrivate::KPtyPrivate(KPty* parent) : + masterFd(-1), slaveFd(-1), ownMaster(true), q_ptr(parent) +{ +} + +KPtyPrivate::~KPtyPrivate() +{ +} + +bool KPtyPrivate::chownpty(bool) +{ +// return !QProcess::execute(KStandardDirs::findExe("kgrantpty"), +// QStringList() << (grant?"--grant":"--revoke") << QString::number(masterFd)); + return true; +} + +///////////////////////////// +// public member functions // +///////////////////////////// + +KPty::KPty() : + d_ptr(new KPtyPrivate(this)) +{ +} + +KPty::KPty(KPtyPrivate *d) : + d_ptr(d) +{ + d_ptr->q_ptr = this; +} + +KPty::~KPty() +{ + close(); + delete d_ptr; +} + +bool KPty::open() +{ + Q_D(KPty); + + if (d->masterFd >= 0) + return true; + + d->ownMaster = true; + + QByteArray ptyName; + + // Find a master pty that we can open //////////////////////////////// + + // Because not all the pty animals are created equal, they want to + // be opened by several different methods. + + // We try, as we know them, one by one. + +#ifdef HAVE_OPENPTY + + char ptsn[PATH_MAX]; + if (::openpty( &d->masterFd, &d->slaveFd, ptsn, 0, 0)) { + d->masterFd = -1; + d->slaveFd = -1; + qWarning() << "Can't open a pseudo teletype"; + return false; + } + d->ttyName = ptsn; + +#else + +#ifdef HAVE__GETPTY // irix + + char *ptsn = _getpty(&d->masterFd, O_RDWR|O_NOCTTY, S_IRUSR|S_IWUSR, 0); + if (ptsn) { + d->ttyName = ptsn; + goto grantedpt; + } + +#elif defined(HAVE_PTSNAME) || defined(TIOCGPTN) + +#ifdef HAVE_POSIX_OPENPT + d->masterFd = ::posix_openpt(O_RDWR|O_NOCTTY); +#elif defined(HAVE_GETPT) + d->masterFd = ::getpt(); +#elif defined(PTM_DEVICE) + d->masterFd = ::open(PTM_DEVICE, O_RDWR|O_NOCTTY); +#else +# error No method to open a PTY master detected. +#endif + if (d->masterFd >= 0) { +#ifdef HAVE_PTSNAME + char *ptsn = ptsname(d->masterFd); + if (ptsn) { + d->ttyName = ptsn; +#else + int ptyno; + if (ioctl(d->masterFd, TIOCGPTN, &ptyno) != -1) { + d->ttyName = QByteArray("/dev/pts/") + QByteArray::number(ptyno); +#endif +#ifdef HAVE_GRANTPT + if (!grantpt(d->masterFd)) { + goto grantedpt; + } +#else + + goto gotpty; +#endif + } + ::close(d->masterFd); + d->masterFd = -1; + } +#endif // HAVE_PTSNAME || TIOCGPTN + + // Linux device names, FIXME: Trouble on other systems? + for (const char * s3 = "pqrstuvwxyzabcde"; *s3; s3++) { + for (const char * s4 = "0123456789abcdef"; *s4; s4++) { + ptyName = QByteArrayLiteral("/dev/pty") + *s3 + *s4; + d->ttyName = QByteArrayLiteral("/dev/tty") + *s3 + *s4; + + d->masterFd = ::open(ptyName.data(), O_RDWR); + if (d->masterFd >= 0) { +#ifdef Q_OS_SOLARIS + /* Need to check the process group of the pty. + * If it exists, then the slave pty is in use, + * and we need to get another one. + */ + int pgrp_rtn; + if (ioctl(d->masterFd, TIOCGPGRP, &pgrp_rtn) != -1 || errno != EIO) { + ::close(d->masterFd); + d->masterFd = -1; + continue; + } +#endif /* Q_OS_SOLARIS */ + if (!access(d->ttyName.data(),R_OK|W_OK)) { // checks availability based on permission bits + if (!geteuid()) { + struct group * p = getgrnam(TTY_GROUP); + if (!p) { + p = getgrnam("wheel"); + } + gid_t gid = p ? p->gr_gid : getgid (); + + if (!chown(d->ttyName.data(), getuid(), gid)) { + chmod(d->ttyName.data(), S_IRUSR|S_IWUSR|S_IWGRP); + } + } + goto gotpty; + } + ::close(d->masterFd); + d->masterFd = -1; + } + } + } + + qWarning() << "Can't open a pseudo teletype"; + return false; + +gotpty: + struct stat st; + if (stat(d->ttyName.data(), &st)) { + return false; // this just cannot happen ... *cough* Yeah right, I just + // had it happen when pty #349 was allocated. I guess + // there was some sort of leak? I only had a few open. + } + if (((st.st_uid != getuid()) || + (st.st_mode & (S_IRGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH))) && + !d->chownpty(true)) { + qWarning() + << "chownpty failed for device " << ptyName << "::" << d->ttyName + << "\nThis means the communication can be eavesdropped." +#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0)) + << Qt::endl; +#else + << endl; +#endif + } + +#if defined (HAVE__GETPTY) || defined (HAVE_GRANTPT) +grantedpt: +#endif + +#ifdef HAVE_REVOKE + revoke(d->ttyName.data()); +#endif + +#ifdef HAVE_UNLOCKPT + unlockpt(d->masterFd); +#elif defined(TIOCSPTLCK) + int flag = 0; + ioctl(d->masterFd, TIOCSPTLCK, &flag); +#endif + + d->slaveFd = ::open(d->ttyName.data(), O_RDWR | O_NOCTTY); + if (d->slaveFd < 0) { + qWarning() << "Can't open slave pseudo teletype"; + ::close(d->masterFd); + d->masterFd = -1; + return false; + } + +#if (defined(__svr4__) || defined(__sgi__)) + // Solaris + ioctl(d->slaveFd, I_PUSH, "ptem"); + ioctl(d->slaveFd, I_PUSH, "ldterm"); +#endif + +#endif /* HAVE_OPENPTY */ + + fcntl(d->masterFd, F_SETFD, FD_CLOEXEC); + fcntl(d->slaveFd, F_SETFD, FD_CLOEXEC); + + return true; +} + +bool KPty::open(int fd) +{ +#if !defined(HAVE_PTSNAME) && !defined(TIOCGPTN) + qWarning() << "Unsupported attempt to open pty with fd" << fd; + return false; +#else + Q_D(KPty); + + if (d->masterFd >= 0) { + qWarning() << "Attempting to open an already open pty"; + return false; + } + + d->ownMaster = false; + +# ifdef HAVE_PTSNAME + char *ptsn = ptsname(fd); + if (ptsn) { + d->ttyName = ptsn; +# else + int ptyno; + if (ioctl(fd, TIOCGPTN, &ptyno) != -1) { + const size_t sz = 32; + char buf[sz]; + const size_t r = snprintf(buf, sz, "/dev/pts/%d", ptyno); + if (sz <= r) { + qWarning("KPty::open: Buffer too small\n"); + } + d->ttyName = buf; +# endif + } else { + qWarning() << "Failed to determine pty slave device for fd" << fd; + return false; + } + + d->masterFd = fd; + if (!openSlave()) { + + d->masterFd = -1; + return false; + } + + return true; +#endif +} + +void KPty::closeSlave() +{ + Q_D(KPty); + + if (d->slaveFd < 0) { + return; + } + ::close(d->slaveFd); + d->slaveFd = -1; +} + +bool KPty::openSlave() +{ + Q_D(KPty); + + if (d->slaveFd >= 0) + return true; + if (d->masterFd < 0) { + qDebug() << "Attempting to open pty slave while master is closed"; + return false; + } + //d->slaveFd = KDE_open(d->ttyName.data(), O_RDWR | O_NOCTTY); + d->slaveFd = ::open(d->ttyName.data(), O_RDWR | O_NOCTTY); + if (d->slaveFd < 0) { + qDebug() << "Can't open slave pseudo teletype"; + return false; + } + fcntl(d->slaveFd, F_SETFD, FD_CLOEXEC); + return true; +} + +void KPty::close() +{ + Q_D(KPty); + + if (d->masterFd < 0) { + return; + } + closeSlave(); + // don't bother resetting unix98 pty, it will go away after closing master anyway. + if (memcmp(d->ttyName.data(), "/dev/pts/", 9)) { + if (!geteuid()) { + struct stat st; + if (!stat(d->ttyName.data(), &st)) { + int status = chown(d->ttyName.data(), 0, st.st_gid == getgid() ? 0 : -1); + if (status < 0) { + perror("chown"); + } + chmod(d->ttyName.data(), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); + } + } else { + fcntl(d->masterFd, F_SETFD, 0); + d->chownpty(false); + } + } + ::close(d->masterFd); + d->masterFd = -1; +} + +void KPty::setCTty() +{ + Q_D(KPty); + + // Setup job control ////////////////////////////////// + + // Become session leader, process group leader, + // and get rid of the old controlling terminal. + setsid(); + + // make our slave pty the new controlling terminal. +#ifdef TIOCSCTTY + ioctl(d->slaveFd, TIOCSCTTY, 0); +#else + // __svr4__ hack: the first tty opened after setsid() becomes controlling tty + ::close(::open(d->ttyName, O_WRONLY, 0)); +#endif + + // make our new process group the foreground group on the pty + int pgrp = getpid(); +#if defined(_POSIX_VERSION) || defined(__svr4__) + tcsetpgrp(d->slaveFd, pgrp); +#elif defined(TIOCSPGRP) + ioctl(d->slaveFd, TIOCSPGRP, (char *)&pgrp); +#endif +} + +void KPty::login(const char * user, const char * remotehost) +{ +#ifdef HAVE_UTEMPTER + Q_D(KPty); + + addToUtmp(d->ttyName.constData(), remotehost, d->masterFd); + Q_UNUSED(user); +#else +# ifdef HAVE_UTMPX + struct utmpx l_struct; +# else + struct utmp l_struct; +# endif + memset(&l_struct, 0, sizeof(l_struct)); + // note: strncpy without terminators _is_ correct here. man 4 utmp + + if (user) { +# ifdef HAVE_UTMPX + strncpy(l_struct.ut_user, user, sizeof(l_struct.ut_user)); +# else + strncpy(l_struct.ut_name, user, sizeof(l_struct.ut_name)); +# endif + } + + if (remotehost) { + strncpy(l_struct.ut_host, remotehost, sizeof(l_struct.ut_host)); +# ifdef HAVE_STRUCT_UTMP_UT_SYSLEN + l_struct.ut_syslen = qMin(strlen(remotehost), sizeof(l_struct.ut_host)); +# endif + } + +# ifndef __GLIBC__ + Q_D(KPty); + const char * str_ptr = d->ttyName.data(); + if (!memcmp(str_ptr, "/dev/", 5)) { + str_ptr += 5; + } + strncpy(l_struct.ut_line, str_ptr, sizeof(l_struct.ut_line)); +# ifdef HAVE_STRUCT_UTMP_UT_ID + strncpy(l_struct.ut_id, + str_ptr + strlen(str_ptr) - sizeof(l_struct.ut_id), + sizeof(l_struct.ut_id)); +# endif +# endif + +# ifdef HAVE_UTMPX + gettimeofday(&l_struct.ut_tv, 0); +# else + l_struct.ut_time = time(nullptr); +# endif + +# ifdef HAVE_LOGIN +# ifdef HAVE_LOGINX + ::loginx(&l_struct); +# else + ::login(&l_struct); +# endif +# else +# ifdef HAVE_STRUCT_UTMP_UT_TYPE + l_struct.ut_type = USER_PROCESS; +# endif +# ifdef HAVE_STRUCT_UTMP_UT_PID + l_struct.ut_pid = getpid(); +# ifdef HAVE_STRUCT_UTMP_UT_SESSION + l_struct.ut_session = getsid(0); +# endif +# endif +# ifdef HAVE_UTMPX + utmpxname(_PATH_UTMPX); + setutxent(); + pututxline(&l_struct); + endutxent(); +# ifdef HAVE_UPDWTMPX + updwtmpx(_PATH_WTMPX, &l_struct); +# endif +# else + utmpname(_PATH_UTMP); + setutent(); + pututline(&l_struct); + endutent(); + updwtmp(_PATH_WTMP, &l_struct); +# endif +# endif +#endif +} + +void KPty::logout() +{ +#ifdef HAVE_UTEMPTER + Q_D(KPty); + + removeLineFromUtmp(d->ttyName.constData(), d->masterFd); +#else + Q_D(KPty); + + const char *str_ptr = d->ttyName.data(); + if (!memcmp(str_ptr, "/dev/", 5)) { + str_ptr += 5; + } +# ifdef __GLIBC__ + else { + const char * sl_ptr = strrchr(str_ptr, '/'); + if (sl_ptr) { + str_ptr = sl_ptr + 1; + } + } +# endif +# ifdef HAVE_LOGIN +# ifdef HAVE_LOGINX + ::logoutx(str_ptr, 0, DEAD_PROCESS); +# else + ::logout(str_ptr); +# endif +# else +# ifdef HAVE_UTMPX + struct utmpx l_struct, *ut; +# else + struct utmp l_struct, *ut; +# endif + memset(&l_struct, 0, sizeof(l_struct)); + + strncpy(l_struct.ut_line, str_ptr, sizeof(l_struct.ut_line)); + +# ifdef HAVE_UTMPX + utmpxname(_PATH_UTMPX); + setutxent(); + if ((ut = getutxline(&l_struct))) { +# else + utmpname(_PATH_UTMP); + setutent(); + if ((ut = getutline(&l_struct))) { +# endif +# ifdef HAVE_UTMPX + memset(ut->ut_user, 0, sizeof(*ut->ut_user)); +# else + memset(ut->ut_name, 0, sizeof(*ut->ut_name)); +# endif + memset(ut->ut_host, 0, sizeof(*ut->ut_host)); +# ifdef HAVE_STRUCT_UTMP_UT_SYSLEN + ut->ut_syslen = 0; +# endif +# ifdef HAVE_STRUCT_UTMP_UT_TYPE + ut->ut_type = DEAD_PROCESS; +# endif +# ifdef HAVE_UTMPX + gettimeofday(&ut->ut_tv, 0); + pututxline(ut); + } + endutxent(); +# else + ut->ut_time = time(nullptr); + pututline(ut); +} +endutent(); +# endif +# endif +#endif +} + +// XXX Supposedly, tc[gs]etattr do not work with the master on Solaris. +// Please verify. + +bool KPty::tcGetAttr(struct ::termios * ttmode) const +{ + Q_D(const KPty); + + return _tcgetattr(d->masterFd, ttmode) == 0; +} + +bool KPty::tcSetAttr(struct ::termios * ttmode) +{ + Q_D(KPty); + + return _tcsetattr(d->masterFd, ttmode) == 0; +} + +bool KPty::setWinSize(int lines, int columns) +{ + Q_D(KPty); + + struct winsize winSize; + memset(&winSize, 0, sizeof(winSize)); + winSize.ws_row = (unsigned short)lines; + winSize.ws_col = (unsigned short)columns; + return ioctl(d->masterFd, TIOCSWINSZ, (char *)&winSize) != -1; +} + +bool KPty::setEcho(bool echo) +{ + struct ::termios ttmode; + if (!tcGetAttr(&ttmode)) { + return false; + } + if (!echo) { + ttmode.c_lflag &= ~ECHO; + } else { + ttmode.c_lflag |= ECHO; + } + return tcSetAttr(&ttmode); +} + +const char * KPty::ttyName() const +{ + Q_D(const KPty); + + return d->ttyName.data(); +} + +int KPty::masterFd() const +{ + Q_D(const KPty); + + return d->masterFd; +} + +int KPty::slaveFd() const +{ + Q_D(const KPty); + + return d->slaveFd; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptydevice.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptydevice.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptydevice.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptydevice.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,422 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + + This file is part of the KDE libraries + Copyright (C) 2007 Oswald Buddenhagen + Copyright (C) 2010 KDE e.V. + Author Adriaan de Groot + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kptydevice.h" +#include "kpty_p.h" + +#include + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_SYS_FILIO_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#if defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) + // "the other end's output queue size" - kinda braindead, huh? +# define PTY_BYTES_AVAILABLE TIOCOUTQ +#elif defined(TIOCINQ) + // "our end's input queue size" +# define PTY_BYTES_AVAILABLE TIOCINQ +#else + // likewise. more generic ioctl (theoretically) +# define PTY_BYTES_AVAILABLE FIONREAD +#endif + + + + +////////////////// +// private data // +////////////////// + +// Lifted from Qt. I don't think they would mind. ;) +// Re-lift again from Qt whenever a proper replacement for pthread_once appears +static void qt_ignore_sigpipe() +{ + static QBasicAtomicInt atom = Q_BASIC_ATOMIC_INITIALIZER(0); + if (atom.testAndSetRelaxed(0, 1)) { + struct sigaction noaction; + memset(&noaction, 0, sizeof(noaction)); + noaction.sa_handler = SIG_IGN; + sigaction(SIGPIPE, &noaction, nullptr); + } +} + +#define NO_INTR(ret,func) do { ret = func; } while (ret < 0 && errno == EINTR) + +bool KPtyDevicePrivate::_k_canRead() +{ + Q_Q(KPtyDevice); + qint64 readBytes = 0; + +#ifdef Q_OS_IRIX // this should use a config define, but how to check it? + size_t available; +#else + int available; +#endif + if (::ioctl(q->masterFd(), PTY_BYTES_AVAILABLE, (char *) &available) != -1) { +#ifdef Q_OS_SOLARIS + // A Pty is a STREAMS module, and those can be activated + // with 0 bytes available. This happens either when ^C is + // pressed, or when an application does an explicit write(a,b,0) + // which happens in experiments fairly often. When 0 bytes are + // available, you must read those 0 bytes to clear the STREAMS + // module, but we don't want to hit the !readBytes case further down. + if (!available) { + char c; + // Read the 0-byte STREAMS message + NO_INTR(readBytes, read(q->masterFd(), &c, 0)); + // Should return 0 bytes read; -1 is error + if (readBytes < 0) { + readNotifier->setEnabled(false); + emit q->readEof(); + return false; + } + return true; + } +#endif + + char *ptr = readBuffer.reserve(available); +#ifdef Q_OS_SOLARIS + // Even if available > 0, it is possible for read() + // to return 0 on Solaris, due to 0-byte writes in the stream. + // Ignore them and keep reading until we hit *some* data. + // In Solaris it is possible to have 15 bytes available + // and to (say) get 0, 0, 6, 0 and 9 bytes in subsequent reads. + // Because the stream is set to O_NONBLOCK in finishOpen(), + // an EOF read will return -1. + readBytes = 0; + while (!readBytes) +#endif + // Useless block braces except in Solaris + { + NO_INTR(readBytes, read(q->masterFd(), ptr, available)); + } + if (readBytes < 0) { + readBuffer.unreserve(available); + q->setErrorString(QLatin1String("Error reading from PTY")); + return false; + } + readBuffer.unreserve(available - readBytes); // *should* be a no-op + } + + if (!readBytes) { + readNotifier->setEnabled(false); + emit q->readEof(); + return false; + } else { + if (!emittedReadyRead) { + emittedReadyRead = true; + emit q->readyRead(); + emittedReadyRead = false; + } + return true; + } +} + +bool KPtyDevicePrivate::_k_canWrite() +{ + Q_Q(KPtyDevice); + + writeNotifier->setEnabled(false); + if (writeBuffer.isEmpty()) + return false; + + qt_ignore_sigpipe(); + int wroteBytes; + NO_INTR(wroteBytes, + write(q->masterFd(), + writeBuffer.readPointer(), writeBuffer.readSize())); + if (wroteBytes < 0) { + q->setErrorString(QLatin1String("Error writing to PTY")); + return false; + } + writeBuffer.free(wroteBytes); + + if (!emittedBytesWritten) { + emittedBytesWritten = true; + emit q->bytesWritten(wroteBytes); + emittedBytesWritten = false; + } + + if (!writeBuffer.isEmpty()) + writeNotifier->setEnabled(true); + return true; +} + +#ifndef timeradd +// Lifted from GLIBC +# define timeradd(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ + if ((result)->tv_usec >= 1000000) { \ + ++(result)->tv_sec; \ + (result)->tv_usec -= 1000000; \ + } \ + } while (0) +# define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000; \ + } \ + } while (0) +#endif + +bool KPtyDevicePrivate::doWait(int msecs, bool reading) +{ + Q_Q(KPtyDevice); +#ifndef __linux__ + struct timeval etv; +#endif + struct timeval tv, *tvp; + + if (msecs < 0) + tvp = nullptr; + else { + tv.tv_sec = msecs / 1000; + tv.tv_usec = (msecs % 1000) * 1000; +#ifndef __linux__ + gettimeofday(&etv, 0); + timeradd(&tv, &etv, &etv); +#endif + tvp = &tv; + } + + while (reading ? readNotifier->isEnabled() : !writeBuffer.isEmpty()) { + fd_set rfds; + fd_set wfds; + + FD_ZERO(&rfds); + FD_ZERO(&wfds); + + if (readNotifier->isEnabled()) + FD_SET(q->masterFd(), &rfds); + if (!writeBuffer.isEmpty()) + FD_SET(q->masterFd(), &wfds); + +#ifndef __linux__ + if (tvp) { + gettimeofday(&tv, 0); + timersub(&etv, &tv, &tv); + if (tv.tv_sec < 0) + tv.tv_sec = tv.tv_usec = 0; + } +#endif + + switch (select(q->masterFd() + 1, &rfds, &wfds, nullptr, tvp)) { + case -1: + if (errno == EINTR) + break; + return false; + case 0: + q->setErrorString(QLatin1String("PTY operation timed out")); + return false; + default: + if (FD_ISSET(q->masterFd(), &rfds)) { + bool canRead = _k_canRead(); + if (reading && canRead) + return true; + } + if (FD_ISSET(q->masterFd(), &wfds)) { + bool canWrite = _k_canWrite(); + if (!reading) + return canWrite; + } + break; + } + } + return false; +} + +void KPtyDevicePrivate::finishOpen(QIODevice::OpenMode mode) +{ + Q_Q(KPtyDevice); + + q->QIODevice::open(mode); + fcntl(q->masterFd(), F_SETFL, O_NONBLOCK); + readBuffer.clear(); + readNotifier = new QSocketNotifier(q->masterFd(), QSocketNotifier::Read, q); + writeNotifier = new QSocketNotifier(q->masterFd(), QSocketNotifier::Write, q); + QObject::connect(readNotifier, SIGNAL(activated(int)), q, SLOT(_k_canRead())); + QObject::connect(writeNotifier, SIGNAL(activated(int)), q, SLOT(_k_canWrite())); + readNotifier->setEnabled(true); +} + +///////////////////////////// +// public member functions // +///////////////////////////// + +KPtyDevice::KPtyDevice(QObject *parent) : + QIODevice(parent), + KPty(new KPtyDevicePrivate(this)) +{ +} + +KPtyDevice::~KPtyDevice() +{ + close(); +} + +bool KPtyDevice::open(OpenMode mode) +{ + Q_D(KPtyDevice); + + if (masterFd() >= 0) + return true; + + if (!KPty::open()) { + setErrorString(QLatin1String("Error opening PTY")); + return false; + } + + d->finishOpen(mode); + + return true; +} + +bool KPtyDevice::open(int fd, OpenMode mode) +{ + Q_D(KPtyDevice); + + if (!KPty::open(fd)) { + setErrorString(QLatin1String("Error opening PTY")); + return false; + } + + d->finishOpen(mode); + + return true; +} + +void KPtyDevice::close() +{ + Q_D(KPtyDevice); + + if (masterFd() < 0) + return; + + delete d->readNotifier; + delete d->writeNotifier; + + QIODevice::close(); + + KPty::close(); +} + +bool KPtyDevice::isSequential() const +{ + return true; +} + +bool KPtyDevice::canReadLine() const +{ + Q_D(const KPtyDevice); + return QIODevice::canReadLine() || d->readBuffer.canReadLine(); +} + +bool KPtyDevice::atEnd() const +{ + Q_D(const KPtyDevice); + return QIODevice::atEnd() && d->readBuffer.isEmpty(); +} + +qint64 KPtyDevice::bytesAvailable() const +{ + Q_D(const KPtyDevice); + return QIODevice::bytesAvailable() + d->readBuffer.size(); +} + +qint64 KPtyDevice::bytesToWrite() const +{ + Q_D(const KPtyDevice); + return d->writeBuffer.size(); +} + +bool KPtyDevice::waitForReadyRead(int msecs) +{ + Q_D(KPtyDevice); + return d->doWait(msecs, true); +} + +bool KPtyDevice::waitForBytesWritten(int msecs) +{ + Q_D(KPtyDevice); + return d->doWait(msecs, false); +} + +void KPtyDevice::setSuspended(bool suspended) +{ + Q_D(KPtyDevice); + d->readNotifier->setEnabled(!suspended); +} + +bool KPtyDevice::isSuspended() const +{ + Q_D(const KPtyDevice); + return !d->readNotifier->isEnabled(); +} + +// protected +qint64 KPtyDevice::readData(char *data, qint64 maxlen) +{ + Q_D(KPtyDevice); + return d->readBuffer.read(data, (int)qMin(maxlen, KMAXINT)); +} + +// protected +qint64 KPtyDevice::readLineData(char *data, qint64 maxlen) +{ + Q_D(KPtyDevice); + return d->readBuffer.readLine(data, (int)qMin(maxlen, KMAXINT)); +} + +// protected +qint64 KPtyDevice::writeData(const char *data, qint64 len) +{ + Q_D(KPtyDevice); + Q_ASSERT(len <= KMAXINT); + + d->writeBuffer.write(data, len); + d->writeNotifier->setEnabled(true); + return len; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptydevice.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptydevice.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptydevice.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptydevice.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,361 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* This file is part of the KDE libraries + + Copyright (C) 2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef kptydev_h +#define kptydev_h + +#include "kpty_p.h" + +#include + +#define KMAXINT ((int)(~0U >> 1)) + +struct KPtyDevicePrivate; +class QSocketNotifier; + +#define Q_DECLARE_PRIVATE_MI(Class, SuperClass) \ + inline Class##Private* d_func() { return reinterpret_cast(SuperClass::d_ptr); } \ + inline const Class##Private* d_func() const { return reinterpret_cast(SuperClass::d_ptr); } \ + friend struct Class##Private; + +/** + * Encapsulates KPty into a QIODevice, so it can be used with Q*Stream, etc. + */ +class KPtyDevice : public QIODevice, public KPty { + Q_OBJECT + Q_DECLARE_PRIVATE_MI(KPtyDevice, KPty) + +public: + + /** + * Constructor + */ + KPtyDevice(QObject *parent = nullptr); + + /** + * Destructor: + * + * If the pty is still open, it will be closed. Note, however, that + * an utmp registration is @em not undone. + */ + ~KPtyDevice() override; + + /** + * Create a pty master/slave pair. + * + * @return true if a pty pair was successfully opened + */ + bool open(OpenMode mode = ReadWrite | Unbuffered) override; + + /** + * Open using an existing pty master. The ownership of the fd + * remains with the caller, i.e., close() will not close the fd. + * + * This is useful if you wish to attach a secondary "controller" to an + * existing pty device such as a terminal widget. + * Note that you will need to use setSuspended() on both devices to + * control which one gets the incoming data from the pty. + * + * @param fd an open pty master file descriptor. + * @param mode the device mode to open the pty with. + * @return true if a pty pair was successfully opened + */ + bool open(int fd, OpenMode mode = ReadWrite | Unbuffered); + + /** + * Close the pty master/slave pair. + */ + void close() override; + + /** + * Sets whether the KPtyDevice monitors the pty for incoming data. + * + * When the KPtyDevice is suspended, it will no longer attempt to buffer + * data that becomes available from the pty and it will not emit any + * signals. + * + * Do not use on closed ptys. + * After a call to open(), the pty is not suspended. If you need to + * ensure that no data is read, call this function before the main loop + * is entered again (i.e., immediately after opening the pty). + */ + void setSuspended(bool suspended); + + /** + * Returns true if the KPtyDevice is not monitoring the pty for incoming + * data. + * + * Do not use on closed ptys. + * + * See setSuspended() + */ + bool isSuspended() const; + + /** + * @return always true + */ + bool isSequential() const override; + + /** + * @reimp + */ + bool canReadLine() const override; + + /** + * @reimp + */ + bool atEnd() const override; + + /** + * @reimp + */ + qint64 bytesAvailable() const override; + + /** + * @reimp + */ + qint64 bytesToWrite() const override; + + bool waitForBytesWritten(int msecs = -1) override; + bool waitForReadyRead(int msecs = -1) override; + + +Q_SIGNALS: + /** + * Emitted when EOF is read from the PTY. + * + * Data may still remain in the buffers. + */ + void readEof(); + +protected: + qint64 readData(char *data, qint64 maxSize) override; + qint64 readLineData(char *data, qint64 maxSize) override; + qint64 writeData(const char *data, qint64 maxSize) override; + +private: + Q_PRIVATE_SLOT(d_func(), bool _k_canRead()) + Q_PRIVATE_SLOT(d_func(), bool _k_canWrite()) +}; + +///////////////////////////////////////////////////// +// Helper. Remove when QRingBuffer becomes public. // +///////////////////////////////////////////////////// + +#include +#include + +#define CHUNKSIZE 4096 + +class KRingBuffer +{ +public: + KRingBuffer() + { + clear(); + } + + void clear() + { + buffers.clear(); + QByteArray tmp; + tmp.resize(CHUNKSIZE); + buffers.push_back(tmp); + head = tail = 0; + totalSize = 0; + } + + inline bool isEmpty() const + { + return buffers.size() == 1 && !tail; + } + + inline int size() const + { + return totalSize; + } + + inline int readSize() const + { + return (buffers.size() == 1 ? tail : buffers.front().size()) - head; + } + + inline const char *readPointer() const + { + Q_ASSERT(totalSize > 0); + return buffers.front().constData() + head; + } + + void free(int bytes) + { + totalSize -= bytes; + Q_ASSERT(totalSize >= 0); + + forever { + int nbs = readSize(); + + if (bytes < nbs) { + head += bytes; + if (head == tail && buffers.size() == 1) { + buffers.front().resize(CHUNKSIZE); + head = tail = 0; + } + break; + } + + bytes -= nbs; + if (buffers.size() == 1) { + buffers.front().resize(CHUNKSIZE); + head = tail = 0; + break; + } + + buffers.pop_front(); + head = 0; + } + } + + char *reserve(int bytes) + { + totalSize += bytes; + + char *ptr; + if (tail + bytes <= buffers.back().size()) { + ptr = buffers.back().data() + tail; + tail += bytes; + } else { + buffers.back().resize(tail); + QByteArray tmp; + tmp.resize(qMax(CHUNKSIZE, bytes)); + ptr = tmp.data(); + buffers.push_back(tmp); + tail = bytes; + } + return ptr; + } + + // release a trailing part of the last reservation + inline void unreserve(int bytes) + { + totalSize -= bytes; + tail -= bytes; + } + + inline void write(const char *data, int len) + { + memcpy(reserve(len), data, len); + } + + // Find the first occurrence of c and return the index after it. + // If c is not found until maxLength, maxLength is returned, provided + // it is smaller than the buffer size. Otherwise -1 is returned. + int indexAfter(char c, int maxLength = KMAXINT) const + { + int index = 0; + int start = head; + std::list::const_iterator it = buffers.cbegin(); + forever { + if (!maxLength) + return index; + if (index == size()) + return -1; + const QByteArray &buf = *it; + ++it; + int len = qMin((it == buffers.cend() ? tail : buf.size()) - start, + maxLength); + const char *ptr = buf.data() + start; + if (const char *rptr = (const char *)memchr(ptr, c, len)) + return index + (rptr - ptr) + 1; + index += len; + maxLength -= len; + start = 0; + } + } + + inline int lineSize(int maxLength = KMAXINT) const + { + return indexAfter('\n', maxLength); + } + + inline bool canReadLine() const + { + return lineSize() != -1; + } + + int read(char *data, int maxLength) + { + int bytesToRead = qMin(size(), maxLength); + int readSoFar = 0; + while (readSoFar < bytesToRead) { + const char *ptr = readPointer(); + int bs = qMin(bytesToRead - readSoFar, readSize()); + memcpy(data + readSoFar, ptr, bs); + readSoFar += bs; + free(bs); + } + return readSoFar; + } + + int readLine(char *data, int maxLength) + { + return read(data, lineSize(qMin(maxLength, size()))); + } + +private: + std::list buffers; + int head, tail; + int totalSize; +}; + +struct KPtyDevicePrivate : public KPtyPrivate { + + Q_DECLARE_PUBLIC(KPtyDevice) + + KPtyDevicePrivate(KPty* parent) : + KPtyPrivate(parent), + emittedReadyRead(false), emittedBytesWritten(false), + readNotifier(nullptr), writeNotifier(nullptr) + { + } + + bool _k_canRead(); + bool _k_canWrite(); + + bool doWait(int msecs, bool reading); + void finishOpen(QIODevice::OpenMode mode); + + bool emittedReadyRead; + bool emittedBytesWritten; + QSocketNotifier *readNotifier; + QSocketNotifier *writeNotifier; + KRingBuffer readBuffer; + KRingBuffer writeBuffer; +}; + +#endif + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,194 @@ +/* This file is part of the KDE libraries + + Copyright (C) 2003,2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#ifndef kpty_h +#define kpty_h + +#include + +class KPtyPrivate; +struct termios; + +/** + * Provides primitives for opening & closing a pseudo TTY pair, assigning the + * controlling TTY, utmp registration and setting various terminal attributes. + */ +class KPty { + Q_DECLARE_PRIVATE(KPty) + +public: + + /** + * Constructor + */ + KPty(); + + /** + * Destructor: + * + * If the pty is still open, it will be closed. Note, however, that + * an utmp registration is @em not undone. + */ + ~KPty(); + + KPty(const KPty &) = delete; + KPty &operator=(const KPty &) = delete; + + /** + * Create a pty master/slave pair. + * + * @return true if a pty pair was successfully opened + */ + bool open(); + + bool open(int fd); + + /** + * Close the pty master/slave pair. + */ + void close(); + + /** + * Close the pty slave descriptor. + * + * When creating the pty, KPty also opens the slave and keeps it open. + * Consequently the master will never receive an EOF notification. + * Usually this is the desired behavior, as a closed pty slave can be + * reopened any time - unlike a pipe or socket. However, in some cases + * pipe-alike behavior might be desired. + * + * After this function was called, slaveFd() and setCTty() cannot be + * used. + */ + void closeSlave(); + bool openSlave(); + + /** + * Creates a new session and process group and makes this pty the + * controlling tty. + */ + void setCTty(); + + /** + * Creates an utmp entry for the tty. + * This function must be called after calling setCTty and + * making this pty the stdin. + * @param user the user to be logged on + * @param remotehost the host from which the login is coming. This is + * @em not the local host. For remote logins it should be the hostname + * of the client. For local logins from inside an X session it should + * be the name of the X display. Otherwise it should be empty. + */ + void login(const char * user = nullptr, const char * remotehost = nullptr); + + /** + * Removes the utmp entry for this tty. + */ + void logout(); + + /** + * Wrapper around tcgetattr(3). + * + * This function can be used only while the PTY is open. + * You will need an #include <termios.h> to do anything useful + * with it. + * + * @param ttmode a pointer to a termios structure. + * Note: when declaring ttmode, @c struct @c ::termios must be used - + * without the '::' some version of HP-UX thinks, this declares + * the struct in your class, in your method. + * @return @c true on success, false otherwise + */ + bool tcGetAttr(struct ::termios * ttmode) const; + + /** + * Wrapper around tcsetattr(3) with mode TCSANOW. + * + * This function can be used only while the PTY is open. + * + * @param ttmode a pointer to a termios structure. + * @return @c true on success, false otherwise. Note that success means + * that @em at @em least @em one attribute could be set. + */ + bool tcSetAttr(struct ::termios * ttmode); + + /** + * Change the logical (screen) size of the pty. + * The default is 24 lines by 80 columns. + * + * This function can be used only while the PTY is open. + * + * @param lines the number of rows + * @param columns the number of columns + * @return @c true on success, false otherwise + */ + bool setWinSize(int lines, int columns); + + /** + * Set whether the pty should echo input. + * + * Echo is on by default. + * If the output of automatically fed (non-interactive) PTY clients + * needs to be parsed, disabling echo often makes it much simpler. + * + * This function can be used only while the PTY is open. + * + * @param echo true if input should be echoed. + * @return @c true on success, false otherwise + */ + bool setEcho(bool echo); + + /** + * @return the name of the slave pty device. + * + * This function should be called only while the pty is open. + */ + const char * ttyName() const; + + /** + * @return the file descriptor of the master pty + * + * This function should be called only while the pty is open. + */ + int masterFd() const; + + /** + * @return the file descriptor of the slave pty + * + * This function should be called only while the pty slave is open. + */ + int slaveFd() const; + +protected: + /** + * @internal + */ + KPty(KPtyPrivate * d); + + /** + * @internal + */ + KPtyPrivate * const d_ptr; +}; + +#endif + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty_p.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty_p.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kpty_p.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kpty_p.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +/* This file is part of the KDE libraries + + Copyright (C) 2003,2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#ifndef kpty_p_h +#define kpty_p_h + +#include "kpty.h" + +#include + +class KPtyPrivate { +public: + + Q_DECLARE_PUBLIC(KPty) + + KPtyPrivate(KPty* parent); + virtual ~KPtyPrivate(); + + bool chownpty(bool grant); + + int masterFd; + int slaveFd; + bool ownMaster:1; + + QByteArray ttyName; + + KPty *q_ptr; +}; + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptyprocess.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptyprocess.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptyprocess.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptyprocess.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,144 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of the KDE libraries + + Copyright (C) 2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#include "kptyprocess.h" +#include "kprocess.h" +#include "kptydevice.h" + +#include +#include +#include +#include + +KPtyProcess::KPtyProcess(QObject *parent) : + KProcess(new KPtyProcessPrivate, parent) +{ + Q_D(KPtyProcess); + + d->pty = new KPtyDevice(this); + d->pty->open(); + connect(this, SIGNAL(stateChanged(QProcess::ProcessState)), + SLOT(_k_onStateChanged(QProcess::ProcessState))); +} + +KPtyProcess::KPtyProcess(int ptyMasterFd, QObject *parent) : + KProcess(new KPtyProcessPrivate, parent) +{ + Q_D(KPtyProcess); + + d->pty = new KPtyDevice(this); + d->pty->open(ptyMasterFd); + connect(this, SIGNAL(stateChanged(QProcess::ProcessState)), + SLOT(_k_onStateChanged(QProcess::ProcessState))); +} + +KPtyProcess::~KPtyProcess() +{ + Q_D(KPtyProcess); + + if (state() != QProcess::NotRunning) + { + if (d->addUtmp) + { + d->pty->logout(); + disconnect(SIGNAL(stateChanged(QProcess::ProcessState)), + this, SLOT(_k_onStateChanged(QProcess::ProcessState))); + } + } + delete d->pty; + waitForFinished(300); // give it some time to finish + if (state() != QProcess::NotRunning) + { + qWarning() << Q_FUNC_INFO << "the terminal process is still running, trying to stop it by SIGHUP"; + ::kill(static_cast(processId()), SIGHUP); + waitForFinished(300); + if (state() != QProcess::NotRunning) + qCritical() << Q_FUNC_INFO << "process didn't stop upon SIGHUP and will be SIGKILL-ed"; + } +} + +void KPtyProcess::setPtyChannels(PtyChannels channels) +{ + Q_D(KPtyProcess); + + d->ptyChannels = channels; +} + +KPtyProcess::PtyChannels KPtyProcess::ptyChannels() const +{ + Q_D(const KPtyProcess); + + return d->ptyChannels; +} + +void KPtyProcess::setUseUtmp(bool value) +{ + Q_D(KPtyProcess); + + d->addUtmp = value; +} + +bool KPtyProcess::isUseUtmp() const +{ + Q_D(const KPtyProcess); + + return d->addUtmp; +} + +KPtyDevice *KPtyProcess::pty() const +{ + Q_D(const KPtyProcess); + + return d->pty; +} + +void KPtyProcess::setupChildProcess() +{ + Q_D(KPtyProcess); + + d->pty->setCTty(); + +#if 0 + if (d->addUtmp) + d->pty->login(KUser(KUser::UseRealUserID).loginName().toLocal8Bit().data(), qgetenv("DISPLAY")); +#endif + if (d->ptyChannels & StdinChannel) + dup2(d->pty->slaveFd(), 0); + + if (d->ptyChannels & StdoutChannel) + dup2(d->pty->slaveFd(), 1); + + if (d->ptyChannels & StderrChannel) + dup2(d->pty->slaveFd(), 2); + + KProcess::setupChildProcess(); +} + +//#include "kptyprocess.moc" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptyprocess.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptyprocess.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/kptyprocess.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/kptyprocess.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of the KDE libraries + + Copyright (C) 2007 Oswald Buddenhagen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KPTYPROCESS_H +#define KPTYPROCESS_H + +#include "kprocess.h" +#include "kptydevice.h" + +#include + +class KPtyDevice; + +class KPtyProcessPrivate; + +/** + * This class extends KProcess by support for PTYs (pseudo TTYs). + * + * The PTY is opened as soon as the class is instantiated. Verify that + * it was opened successfully by checking that pty()->masterFd() is not -1. + * + * The PTY is always made the process' controlling TTY. + * Utmp registration and connecting the stdio handles to the PTY are optional. + * + * No attempt to integrate with QProcess' waitFor*() functions was made, + * for it is impossible. Note that execute() does not work with the PTY, too. + * Use the PTY device's waitFor*() functions or use it asynchronously. + * + * @author Oswald Buddenhagen + */ +class KPtyProcess : public KProcess +{ + Q_OBJECT + Q_DECLARE_PRIVATE(KPtyProcess) + +public: + enum PtyChannelFlag { + NoChannels = 0, /**< The PTY is not connected to any channel. */ + StdinChannel = 1, /**< Connect PTY to stdin. */ + StdoutChannel = 2, /**< Connect PTY to stdout. */ + StderrChannel = 4, /**< Connect PTY to stderr. */ + AllOutputChannels = 6, /**< Connect PTY to all output channels. */ + AllChannels = 7 /**< Connect PTY to all channels. */ + }; + + Q_DECLARE_FLAGS(PtyChannels, PtyChannelFlag) + + /** + * Constructor + */ + explicit KPtyProcess(QObject *parent = nullptr); + + /** + * Construct a process using an open pty master. + * + * @param ptyMasterFd an open pty master file descriptor. + * The process does not take ownership of the descriptor; + * it will not be automatically closed at any point. + */ + KPtyProcess(int ptyMasterFd, QObject *parent = nullptr); + + /** + * Destructor + */ + ~KPtyProcess() override; + + /** + * Set to which channels the PTY should be assigned. + * + * This function must be called before starting the process. + * + * @param channels the output channel handling mode + */ + void setPtyChannels(PtyChannels channels); + + bool isRunning() const + { + bool rval; + (processId() > 0) ? rval= true : rval= false; + return rval; + + } + /** + * Query to which channels the PTY is assigned. + * + * @return the output channel handling mode + */ + PtyChannels ptyChannels() const; + + /** + * Set whether to register the process as a TTY login in utmp. + * + * Utmp is disabled by default. + * It should enabled for interactively fed processes, like terminal + * emulations. + * + * This function must be called before starting the process. + * + * @param value whether to register in utmp. + */ + void setUseUtmp(bool value); + + /** + * Get whether to register the process as a TTY login in utmp. + * + * @return whether to register in utmp + */ + bool isUseUtmp() const; + + /** + * Get the PTY device of this process. + * + * @return the PTY device + */ + KPtyDevice *pty() const; + +protected: + /** + * @reimp + */ + void setupChildProcess() override; + +private: + Q_PRIVATE_SLOT(d_func(), void _k_onStateChanged(QProcess::ProcessState)) +}; + + +////////////////// +// private data // +////////////////// + +class KPtyProcessPrivate : public KProcessPrivate { +public: + KPtyProcessPrivate() : + ptyChannels(KPtyProcess::NoChannels), + addUtmp(false) + { + } + + void _k_onStateChanged(QProcess::ProcessState newState) + { + if (newState == QProcess::NotRunning && addUtmp) + pty->logout(); + } + + KPtyDevice *pty; + KPtyProcess::PtyChannels ptyChannels; + bool addUtmp : 1; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(KPtyProcess::PtyChannels) + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/LineFont.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/LineFont.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/LineFont.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/LineFont.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,41 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ +// WARNING: Autogenerated by "fontembedder ./linefont.src". +// You probably do not want to hand-edit this! + +static const quint32 LineChars[] = { + 0x00007c00, 0x000fffe0, 0x00421084, 0x00e739ce, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00427000, 0x004e7380, 0x00e77800, 0x00ef7bc0, + 0x00421c00, 0x00439ce0, 0x00e73c00, 0x00e7bde0, 0x00007084, 0x000e7384, 0x000079ce, 0x000f7bce, + 0x00001c84, 0x00039ce4, 0x00003dce, 0x0007bdee, 0x00427084, 0x004e7384, 0x004279ce, 0x00e77884, + 0x00e779ce, 0x004f7bce, 0x00ef7bc4, 0x00ef7bce, 0x00421c84, 0x00439ce4, 0x00423dce, 0x00e73c84, + 0x00e73dce, 0x0047bdee, 0x00e7bde4, 0x00e7bdee, 0x00427c00, 0x0043fce0, 0x004e7f80, 0x004fffe0, + 0x004fffe0, 0x00e7fde0, 0x006f7fc0, 0x00efffe0, 0x00007c84, 0x0003fce4, 0x000e7f84, 0x000fffe4, + 0x00007dce, 0x0007fdee, 0x000f7fce, 0x000fffee, 0x00427c84, 0x0043fce4, 0x004e7f84, 0x004fffe4, + 0x00427dce, 0x00e77c84, 0x00e77dce, 0x0047fdee, 0x004e7fce, 0x00e7fde4, 0x00ef7f84, 0x004fffee, + 0x00efffe4, 0x00e7fdee, 0x00ef7fce, 0x00efffee, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x000f83e0, 0x00a5294a, 0x004e1380, 0x00a57800, 0x00ad0bc0, 0x004390e0, 0x00a53c00, 0x00a5a1e0, + 0x000e1384, 0x0000794a, 0x000f0b4a, 0x000390e4, 0x00003d4a, 0x0007a16a, 0x004e1384, 0x00a5694a, + 0x00ad2b4a, 0x004390e4, 0x00a52d4a, 0x00a5a16a, 0x004f83e0, 0x00a57c00, 0x00ad83e0, 0x000f83e4, + 0x00007d4a, 0x000f836a, 0x004f93e4, 0x00a57d4a, 0x00ad836a, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001c00, 0x00001084, 0x00007000, 0x00421000, + 0x00039ce0, 0x000039ce, 0x000e7380, 0x00e73800, 0x000e7f80, 0x00e73884, 0x0003fce0, 0x004239ce +}; diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/LineFont.src deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/LineFont.src --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/LineFont.src 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/LineFont.src 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,786 @@ +#2500: single horizontal line +2500 + + +----- + + + +#2501: triple horizontal line +2501 + +----- +----- +----- + + +#2502: single vertical line +2502 + | + | + | + | + | + +#2503: triple vertical line +2503 + ||| + ||| + ||| + ||| + ||| + +#2504-250B are dashed - not handled + +#250C: top-left corner (lines on bottom + right) +250C + + + .-- + | + | + +#250D: as above, but top line triple-width +250D + + .-- + .-- + |-- + | + +#250E: now the vert line triple-width +250E + + + ..-- + ||| + ||| + +#250F: and now both lines triple-width +250F + + .___ + |.-- + ||._ + ||| + +#2510: top-right corner +2510 + + +--. + | + | + +2511 + +==. +==. +==| + | + +2512 + + +==.. + ||| + ||| + +2513 + +===. +==.| +=.|| + ||| + +#2514: bottom-left corner +2514 + | + | + .== + + + +2515 + | + |== + |== + === + + + +2516 + ||| + ||| + |.== + + + +2517 + ||| + ||.= + |.== + .=== + + +#2518: bottm-right corner +2518 + | + | +==. + + + +2519 + | +==| +==| +=== + + + +251A + ||| + ||| +==== + + + +251B + ||| +=.|| +==.| +===. + + +#251C: Join of vertical line and one from the right +251C + | + | + |== + | + | + +251D + | + |== + |== + |== + | + +251E + ||| + ||| + ||== + | + | + +251F + | + | + ||== + ||| + ||| + + +2520 + ||| + ||| + ||== + ||| + ||| + +2521 + ||| + |||= + ||== + .|== + | + +2522 + | + .|== + ||== + |||= + ||| + +2523 + ||| + ||.= + ||== + ||.= + ||| + +#2524: Join of vertical line and one from the left +2524 + | + | +==| + | + | + +2525 + | +==| +==| +==| + | + +2526 + ||| + ||| +==+| + | + | + +2527 + | + | +==+| + ||| + ||| + +2528 + ||| + ||| +==+| + ||| + ||| + +2529 + ||| +=+|| +==+| +===+ + | + +252A + | +=+|| +==+| +===+ + ||| + +252B + ||| +=+|| +==+| +=+|| + ||| + +#252C: horizontal line joined to from below +252C + + +===== + | + | + +252D + +=== +==|== +==| + | + +252E + + === +==|== + |== + | + +252F + +==+== +==|== +==|== + | + +2530 + +===== +===== +==|== + | + +2531 + +===| +==||= +=||| + ||| + +2532 + + |=== +=||== + ||== + || + +2533 + +===== +==|== +=+|+= + ||| + +#2534: bottom line, connected to from top +2534 + | + | +===== + + + +2535 + | +==| +===== +=== + + +2536 + | + |== +===== + === + + +2537 + | +==|== +===== +===== + + +2538 + ||| + ||| +===== + + + +2539 + ||| +==|| +===== +===| + + + +253A + ||| + ||== +=|=== + |=== + + +253B + ||| +==|== +===== +===== + + +#253C: vertical + horizontal lines intersecting +253C + | + | +===== + | + | + +253D + | +==| +===== +==| + | + +253E + | + |== +===== + |== + | + +253F + | +==|== +===== +==|== + | + +2540 + ||| + ||| +===== + | + | + +2541 + | + | +===== + ||| + ||| + +2542 + ||| + ||| +===== + ||| + ||| + +2543 + ||| +=||| +===== +==|+ + | + +2544 + ||| + ||== +===== + |== + | + +2545 + | +==|+ +===== +=||| + ||| + +2546 + | + |== +===== + ||== + ||| + +2547 + ||| +=|||= +===== +=|||= + | + +2548 + | +=|||= +===== +=|||= + ||| + +2549 + ||| +=||| +===== +=||| + ||| + +254A + ||| + |||= +===== + |||= + ||| + +254B + ||| +=|||= +===== +=|||= + ||| + +#254C-254F are dashed +2550 + +_____ + +_____ + + +2551 + | | + | | + | | + | | + | | + +2552 + + |-- + | + |-- + | + +2553 + + + ---- + | | + | | + +2554 + + +--- + | + + +- + | | + +2555 + +--+ + | +--+ + | + +2556 + + +-+-+ + | | + | | + +2557 + +---+ + | +-+ | + | | + +2558 + | + +-- + | + +-- + +2559 + | | + | | + +-+- + + + +255A + | | + | +- + | + +--- + + +255B + | +--+ + | +--+ + + +255C + | | + | | +-+-+ + + +255D + | | +-+ | + | +---+ + + +255E + | + +-- + | + +-- + | + +255F + | | + | | + | +- + | | + | | + +2560 + | | + | +- + | | + | +- + | | + +2561 + | +--+ + | +--+ + | + +2562 + | | + | | +-+ + + | | + | | + +2563 + | | +-+ | + | +-+ | + | | + +2564 + +----- + +--+-- + | + +2565 + + +-+-+- + | | + | | + +2566 + +----- + +-+ +- + | | + +2567 + | +--+-- + +----- + + +2568 + | | + | | +-+-+- + + + +2569 + | | +-+ +- + +----- + + +256A + | +--+-- + | +--+-- + | + +256B + | | + | | +-+-+- + | | + | | + +256C + | | +-+ +- + +-+ +- + | | + +#256F-2570 are curly, +#2571-2573 are slashes and X + +2574 + + +___ + + + +2575 + | + | + | + + + +2576 + + + ___ + + + +2577 + + + | + | + | + +2578 + +___ +___ +___ + + +2579 + ||| + ||| + ||| + + + +257A + + ___ + ___ + ___ + + +257B + + + ||| + ||| + ||| + +257C + + ___ +_____ + ___ + + +257D + | + | + ||| + ||| + ||| + +257E + +___ +_____ +___ + + +257F + ||| + ||| + ||| + | + | diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ProcessInfo.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ProcessInfo.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ProcessInfo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ProcessInfo.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,496 @@ +/* + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "ProcessInfo.h" + +// Unix +#include +#include +#include +#include +#include +#include +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include + +using namespace Konsole; + +ProcessInfo::ProcessInfo(int pid) : + _fields(ARGUMENTS), + // arguments + // are currently always valid, + // they just return an empty + // vector / map respectively + // if no arguments + // have been explicitly set + _pid(pid), + _parentPid(0), + _foregroundPid(0), + _userId(0), + _lastError(NoError), + _name(QString()), + _userName(QString()), + _userHomeDir(QString()), + _currentDir(QString()), + _userNameRequired(true), + _arguments(QVector()) +{ +} + +ProcessInfo::~ProcessInfo() +{ +} + +ProcessInfo::Error ProcessInfo::error() const +{ + return _lastError; +} + +void ProcessInfo::setError(Error error) +{ + _lastError = error; +} + +void ProcessInfo::update() +{ + readCurrentDir(_pid); +} + +QString ProcessInfo::validCurrentDir() const +{ + bool ok = false; + + // read current dir, if an error occurs try the parent as the next + // best option + int currentPid = parentPid(&ok); + QString dir = currentDir(&ok); + while (!ok && currentPid != 0) { + ProcessInfo *current = ProcessInfo::newInstance(currentPid, QString()); + current->update(); + currentPid = current->parentPid(&ok); + dir = current->currentDir(&ok); + delete current; + } + + return dir; +} + +QVector ProcessInfo::arguments(bool *ok) const +{ + *ok = _fields.testFlag(ARGUMENTS); + + return _arguments; +} + +bool ProcessInfo::isValid() const +{ + return _fields.testFlag(PROCESS_ID); +} + +int ProcessInfo::pid(bool *ok) const +{ + *ok = _fields.testFlag(PROCESS_ID); + + return _pid; +} + +int ProcessInfo::parentPid(bool *ok) const +{ + *ok = _fields.testFlag(PARENT_PID); + + return _parentPid; +} + +int ProcessInfo::foregroundPid(bool *ok) const +{ + *ok = _fields.testFlag(FOREGROUND_PID); + + return _foregroundPid; +} + +QString ProcessInfo::name(bool *ok) const +{ + *ok = _fields.testFlag(NAME); + + return _name; +} + +int ProcessInfo::userId(bool *ok) const +{ + *ok = _fields.testFlag(UID); + + return _userId; +} + +QString ProcessInfo::userName() const +{ + return _userName; +} + +QString ProcessInfo::userHomeDir() const +{ + return _userHomeDir; +} + +void ProcessInfo::setPid(int pid) +{ + _pid = pid; + _fields |= PROCESS_ID; +} + +void ProcessInfo::setUserId(int uid) +{ + _userId = uid; + _fields |= UID; +} + +void ProcessInfo::setUserName(const QString &name) +{ + _userName = name; + setUserHomeDir(); +} + +void ProcessInfo::setUserHomeDir() +{ + _userHomeDir = QDir::homePath(); +} + +void ProcessInfo::setParentPid(int pid) +{ + _parentPid = pid; + _fields |= PARENT_PID; +} + +void ProcessInfo::setForegroundPid(int pid) +{ + _foregroundPid = pid; + _fields |= FOREGROUND_PID; +} + +void ProcessInfo::setUserNameRequired(bool need) +{ + _userNameRequired = need; +} + +bool ProcessInfo::userNameRequired() const +{ + return _userNameRequired; +} + +QString ProcessInfo::currentDir(bool *ok) const +{ + if (ok != nullptr) { + *ok = (_fields & CURRENT_DIR) != 0; + } + + return _currentDir; +} + +void ProcessInfo::setCurrentDir(const QString &dir) +{ + _fields |= CURRENT_DIR; + _currentDir = dir; +} + +void ProcessInfo::setName(const QString &name) +{ + _name = name; + _fields |= NAME; +} + +void ProcessInfo::addArgument(const QString &argument) +{ + _arguments << argument; +} + +void ProcessInfo::clearArguments() +{ + _arguments.clear(); +} + +void ProcessInfo::setFileError(QFile::FileError error) +{ + switch (error) { + case QFile::PermissionsError: + setError(ProcessInfo::PermissionsError); + break; + case QFile::NoError: + setError(ProcessInfo::NoError); + break; + default: + setError(ProcessInfo::UnknownError); + } +} + +UnixProcessInfo::UnixProcessInfo(int pid, const QString &titleFormat) : + ProcessInfo(pid) +{ + // 目前的机制是需要用户名的,但是没有用到库里的titleFormat用的我们自己的机制 + Q_UNUSED(titleFormat); + // setUserNameRequired(titleFormat.contains(QLatin1String("%u"))); +} + +void UnixProcessInfo::readProcessInfo(int pid) +{ + // prevent _arguments from growing longer and longer each time this + // method is called. + clearArguments(); + + if (readProcInfo(pid)) { + readArguments(pid); + readCurrentDir(pid); + } +} + +void UnixProcessInfo::readUserName() +{ + bool ok = false; + const int uid = userId(&ok); + if (!ok) { + return; + } + + struct passwd passwdStruct; + struct passwd *getpwResult; + char *getpwBuffer; + long getpwBufferSize; + int getpwStatus; + + getpwBufferSize = sysconf(_SC_GETPW_R_SIZE_MAX); + if (getpwBufferSize == -1) { + getpwBufferSize = 16384; + } + + getpwBuffer = new char[static_cast(getpwBufferSize)]; + if (getpwBuffer == nullptr) { + return; + } + getpwStatus = getpwuid_r(static_cast<__uid_t>(uid), &passwdStruct, getpwBuffer, static_cast(getpwBufferSize), &getpwResult); + if ((getpwStatus == 0) && (getpwResult != nullptr)) { + setUserName(QLatin1String(passwdStruct.pw_name)); + } else { + setUserName(QString()); + qWarning() << "getpwuid_r returned error : " << getpwStatus; + } + delete [] getpwBuffer; +} + +LinuxProcessInfo::LinuxProcessInfo(int pid, const QString &titleFormat) : + UnixProcessInfo(pid, titleFormat) +{ +} + +bool LinuxProcessInfo::readCurrentDir(int pid) +{ + char path_buffer[MAXPATHLEN + 1]; + path_buffer[MAXPATHLEN] = 0; + QByteArray procCwd = QFile::encodeName(QStringLiteral("/proc/%1/cwd").arg(pid)); + const int length = static_cast(readlink(procCwd.constData(), path_buffer, MAXPATHLEN)); + if (length == -1) + { + setError(UnknownError); + return false; + } + + path_buffer[length] = '\0'; + QString path = QFile::decodeName(path_buffer); + + setCurrentDir(path); + return true; +} + +bool LinuxProcessInfo::readProcInfo(int pid) +{ + // indicies of various fields within the process status file which + // contain various information about the process + const int PARENT_PID_FIELD = 3; + const int PROCESS_NAME_FIELD = 1; + const int GROUP_PROCESS_FIELD = 7; + + QString parentPidString; + QString processNameString; + QString foregroundPidString; + QString uidLine; + QString uidString; + QStringList uidStrings; + + // For user id read process status file ( /proc//status ) + // Can not use getuid() due to it does not work for 'su' + QFile statusInfo(QStringLiteral("/proc/%1/status").arg(pid)); + if (statusInfo.open(QIODevice::ReadOnly)) + { + QTextStream stream(&statusInfo); + QString statusLine; + do { + statusLine = stream.readLine(); + if (statusLine.startsWith(QLatin1String("Uid:"))) { + uidLine = statusLine; + } + } while (!statusLine.isNull() && uidLine.isNull()); + + uidStrings << uidLine.split(QLatin1Char('\t'), QString::SkipEmptyParts); + // Must be 5 entries: 'Uid: %d %d %d %d' and + // uid string must be less than 5 chars (uint) + if (uidStrings.size() == 5) { + uidString = uidStrings[1]; + } + if (uidString.size() > 5) { + uidString.clear(); + } + + bool ok = false; + const int uid = uidString.toInt(&ok); + if (ok) { + setUserId(uid); + } + // This will cause constant opening of /etc/passwd + if (userNameRequired()) { + readUserName(); + } + } + else + { + setFileError(statusInfo.error()); + return false; + } + + // read process status file ( /proc//cmdline + // the expected format is a list of strings delimited by null characters, + // and ending in a double null character pair. + + QFile argumentsFile(QStringLiteral("/proc/%1/cmdline").arg(pid)); + if (argumentsFile.open(QIODevice::ReadOnly)) + { + QTextStream stream(&argumentsFile); + const QString &data = stream.readAll(); + + const QStringList &argList = data.split(QLatin1Char('\0')); + + for (int i = 0; i < argList.size(); i++) { + const QString &entry = argList.at(i); + if (!entry.isEmpty()) { + addArgument(entry); + } + } + } + else + { + setFileError(argumentsFile.error()); + } + + return true; +} + +// +// ProcessInfo::newInstance() is way at the bottom so it can see all of the +// implementations of the UnixProcessInfo abstract class. +// +ProcessInfo *ProcessInfo::newInstance(int pid, const QString &titleFormat) +{ + ProcessInfo *info; + info = new LinuxProcessInfo(pid, titleFormat); + info->readProcessInfo(pid); + return info; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ProcessInfo.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ProcessInfo.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ProcessInfo.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ProcessInfo.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,341 @@ +/* + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef PROCESSINFO_H +#define PROCESSINFO_H + +// Qt +#include +#include +#include +#include + +namespace Konsole { +/** + * Takes a snapshot of the state of a process and provides access to + * information such as the process name, parent process, + * the foreground process in the controlling terminal, + * the arguments with which the process was started. + * + * To create a new snapshot, construct a new ProcessInfo instance, + * using ProcessInfo::newInstance(), + * passing the process identifier of the process you are interested in. + * + * After creating a new instance, call the update() method to take a + * snapshot of the current state of the process. + * + * Before calling any additional methods, check that the process state + * was read successfully using the isValid() method. + * + * Each accessor method which provides information about the process state ( such as pid(), + * currentDir(), name() ) takes a pointer to a boolean as an argument. If the information + * requested was read successfully then the boolean is set to true, otherwise it is set + * to false, in which case the return value from the function should be ignored. + * If this boolean is set to false, it may indicate an error reading the process information, + * or it may indicate that the information is not available on the current platform. + * + * eg. + * + * @code + * ProcessInfo* info = ProcessInfo::newInstance(pid); + * info->update(); + * + * if ( info->isValid() ) + * { + * bool ok; + * + * QString name = info->name(&ok); + * if ( ok ) qDebug() << "process name - " << name; + * int parentPid = info->parentPid(&ok); + * if ( ok ) qDebug() << "parent process - " << parentPid; + * int foregroundPid = info->foregroundPid(&ok); + * if ( ok ) qDebug() << "foreground process - " << foregroundPid; + * } + * @endcode + */ +class ProcessInfo : QObject +{ + Q_OBJECT +public: + /** + * Constructs a new instance of a suitable ProcessInfo sub-class for + * the current platform which provides information about a given process. + * + * @param pid The pid of the process to examine + * @param titleFormat The local title format - used to determine if it + * contains %u which requires expensive prodecures to be used. + */ + static ProcessInfo *newInstance(int pid, const QString &titleFormat); + + virtual ~ProcessInfo(); + + /** + * Updates the information about the process. This must + * be called before attempting to use any of the accessor methods. + */ + void update(); + + /** Returns true if the process state was read successfully. */ + bool isValid() const; + /** + * Returns the process id. + * + * @param ok Set to true if the process id was read successfully or false otherwise + */ + int pid(bool *ok) const; + /** + * Returns the id of the parent process id was read successfully or false otherwise + * + * @param ok Set to true if the parent process id + */ + int parentPid(bool *ok) const; + + /** + * Returns the id of the current foreground process + * + * NOTE: Using the foregroundProcessGroup() method of the Pty + * instance associated with the terminal of interest is preferred + * over using this method. + * + * @param ok Set to true if the foreground process id was read successfully or false otherwise + */ + int foregroundPid(bool *ok) const; + + /* Returns the user id of the process */ + int userId(bool *ok) const; + + /** Returns the user's name of the process */ + QString userName() const; + + /** Returns the user's home directory of the process */ + QString userHomeDir() const; + + /** Returns the name of the current process */ + QString name(bool *ok) const; + + /** + * Returns the command-line arguments which the process + * was started with. + * + * The first argument is the name used to launch the process. + * + * @param ok Set to true if the arguments were read successfully or false otherwise. + */ + QVector arguments(bool *ok) const; + + /** + * Returns the current working directory of the process + * + * @param ok Set to true if the current working directory was read successfully or false otherwise + */ + QString currentDir(bool *ok) const; + + /** + * Returns the current working directory of the process (or its parent) + */ + QString validCurrentDir() const; + + /** Forces the user home directory to be calculated */ + void setUserHomeDir(); + + /** + * This enum describes the errors which can occur when trying to read + * a process's information. + */ + enum Error { + /** No error occurred. */ + NoError, + /** The nature of the error is unknown. */ + UnknownError, + /** Konsole does not have permission to obtain the process information. */ + PermissionsError + }; + + /** + * Returns the last error which occurred. + */ + Error error() const; + + enum Field { + PROCESS_ID = 1, + PARENT_PID = 2, + FOREGROUND_PID = 4, + ARGUMENTS = 8, + NAME = 16, + CURRENT_DIR = 32, + UID = 64 + }; + typedef QFlags Fields; + + // takes a full directory path and returns a + // shortened version suitable for display in + // space-constrained UI elements (eg. tabs) + QString formatShortDir(const QString &dirPath) const; + + void setUserNameRequired(bool need); + +protected: + /** + * Constructs a new process instance. You should not call the constructor + * of ProcessInfo or its subclasses directly. Instead use the + * static ProcessInfo::newInstance() method which will return + * a suitable ProcessInfo instance for the current platform. + */ + explicit ProcessInfo(int pid); + + /** + * This is called on construction to read the process state + * Subclasses should reimplement this function to provide + * platform-specific process state reading functionality. + * + * When called, readProcessInfo() should attempt to read all + * of the necessary state information. If the attempt is successful, + * it should set the process id using setPid(), and update + * the other relevant information using setParentPid(), setName(), + * setArguments() etc. + * + * Calls to isValid() will return true only if the process id + * has been set using setPid() + * + * @param pid The process id of the process to read + */ + virtual void readProcessInfo(int pid) = 0; + + /** + * Determine the current directory of the process. + * @param pid process ID to use + * @return true on success + */ + virtual bool readCurrentDir(int pid) = 0; + + /* Read the user name */ + virtual void readUserName(void) = 0; + + /** Sets the process id associated with this ProcessInfo instance */ + void setPid(int pid); + /** Sets the parent process id as returned by parentPid() */ + void setParentPid(int pid); + /** Sets the foreground process id as returned by foregroundPid() */ + void setForegroundPid(int pid); + /** Sets the user id associated with this ProcessInfo instance */ + void setUserId(int uid); + /** Sets the user name of the process as set by readUserName() */ + void setUserName(const QString &name); + /** Sets the name of the process as returned by name() */ + void setName(const QString &name); + /** Sets the current working directory for the process */ + void setCurrentDir(const QString &dir); + + /** Sets the error */ + void setError(Error error); + + /** Convenience method. Sets the error based on a QFile error code. */ + void setFileError(QFile::FileError error); + + /** + * Adds a commandline argument for the process, as returned + * by arguments() + */ + void addArgument(const QString &argument); + + /** + * clear the commandline arguments for the process, as returned + * by arguments() + */ + void clearArguments(); + + bool userNameRequired() const; + +private: + + Fields _fields; + + int _pid; + int _parentPid; + int _foregroundPid; + int _userId; + + Error _lastError; + + QString _name; + QString _userName; + QString _userHomeDir; + QString _currentDir; + + bool _userNameRequired; + + QVector _arguments; +}; +Q_DECLARE_OPERATORS_FOR_FLAGS(ProcessInfo::Fields) + +/** + * Implementation of ProcessInfo for Unix platforms which uses + * the /proc filesystem + */ +class UnixProcessInfo : public ProcessInfo +{ +public: + /** + * Constructs a new instance of UnixProcessInfo. + * See ProcessInfo::newInstance() + */ + explicit UnixProcessInfo(int pid, const QString &titleFormat); + +protected: + /** + * Implementation of ProcessInfo::readProcessInfo(); calls the + * four private methods below in turn. + */ + void readProcessInfo(int pid) Q_DECL_OVERRIDE; + + void readUserName(void) Q_DECL_OVERRIDE; + +private: + /** + * Read the standard process information -- PID, parent PID, foreground PID. + * @param pid process ID to use + * @return true on success + */ + virtual bool readProcInfo(int pid) = 0; + + /** + * Determine what arguments were passed to the process. Sets _arguments. + * @param pid process ID to use + * @return true on success + */ + virtual bool readArguments(int pid) = 0; +}; + +class LinuxProcessInfo : public UnixProcessInfo +{ +public: + LinuxProcessInfo(int pid, const QString &titleFormat); + +protected: + bool readCurrentDir(int pid) Q_DECL_OVERRIDE; + +private: + bool readProcInfo(int pid) Q_DECL_OVERRIDE; + + bool readArguments(int pid) Q_DECL_OVERRIDE; +}; + + +} +#endif //PROCESSINFO_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Pty.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Pty.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Pty.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Pty.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,647 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of Konsole, an X terminal. + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "Pty.h" +#include "SessionManager.h" + +// System +#include +#include +#include +#include +#include +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include + +#include "kpty.h" +#include "kptydevice.h" + +using namespace Konsole; + +void Pty::setWindowSize(int lines, int cols) +{ + _windowColumns = cols; + _windowLines = lines; + + if (pty()->masterFd() >= 0) + pty()->setWinSize(lines, cols); +} +QSize Pty::windowSize() const +{ + return {_windowColumns, _windowLines}; +} + +void Pty::setFlowControlEnabled(bool enable) +{ + _xonXoff = enable; + + if (pty()->masterFd() >= 0) { + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + if (!enable) + ttmode.c_iflag &= ~(IXOFF | IXON); + else + ttmode.c_iflag |= (IXOFF | IXON); + if (!pty()->tcSetAttr(&ttmode)) + qWarning() << "Unable to set terminal attributes."; + } +} +bool Pty::flowControlEnabled() const +{ + if (pty()->masterFd() >= 0) { + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + return ttmode.c_iflag & IXOFF && + ttmode.c_iflag & IXON; + } + qWarning() << "Unable to get flow control status, terminal not connected."; + return false; +} + +void Pty::setUtf8Mode(bool enable) +{ +#ifdef IUTF8 // XXX not a reasonable place to check it. + _utf8 = enable; + + if (pty()->masterFd() >= 0) { + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + if (!enable) + ttmode.c_iflag &= ~IUTF8; + else + ttmode.c_iflag |= IUTF8; + if (!pty()->tcSetAttr(&ttmode)) + qWarning() << "Unable to set terminal attributes."; + } +#endif +} + +void Pty::setErase(char erase) +{ + _eraseChar = erase; + + if (pty()->masterFd() >= 0) { + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + ttmode.c_cc[VERASE] = erase; + if (!pty()->tcSetAttr(&ttmode)) + qWarning() << "Unable to set terminal attributes."; + } +} + +char Pty::erase() const +{ + if (pty()->masterFd() >= 0) { + struct ::termios ttyAttributes; + pty()->tcGetAttr(&ttyAttributes); + return ttyAttributes.c_cc[VERASE]; + } + + return _eraseChar; +} + +void Pty::addEnvironmentVariables(const QStringList &environment) +{ + QListIterator iter(environment); + while (iter.hasNext()) { + QString pair = iter.next(); + + // split on the first '=' character + int pos = pair.indexOf(QLatin1Char('=')); + + if (pos >= 0) { + QString variable = pair.left(pos); + QString value = pair.mid(pos + 1); + + setEnv(variable, value); + } + } +} + +int Pty::start(const QString &program, + const QStringList &programArguments, + const QStringList &environment, + ulong winid, + bool addToUtmp + //const QString& dbusService, + //const QString& dbusSession + ) +{ + clearProgram(); + + // For historical reasons, the first argument in programArguments is the + // name of the program to execute, so create a list consisting of all + // but the first argument to pass to setProgram() + Q_ASSERT(programArguments.count() >= 1); + setProgram(program, programArguments.mid(1)); + _program = program; + + addEnvironmentVariables(environment); + + setEnv(QLatin1String("WINDOWID"), QString::number(winid)); + setEnv(QLatin1String("COLORTERM"), QLatin1String("truecolor")); + + // unless the LANGUAGE environment variable has been set explicitly + // set it to a null string + // this fixes the problem where KCatalog sets the LANGUAGE environment + // variable during the application's startup to something which + // differs from LANG,LC_* etc. and causes programs run from + // the terminal to display messages in the wrong language + // + // this can happen if LANG contains a language which KDE + // does not have a translation for + // + // BR:149300 + setEnv(QLatin1String("LANGUAGE"), QString(), false /* do not overwrite existing value if any */); + + setUseUtmp(addToUtmp); + + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + if (!_xonXoff) + ttmode.c_iflag &= ~(IXOFF | IXON); + else + ttmode.c_iflag |= (IXOFF | IXON); +#ifdef IUTF8 // XXX not a reasonable place to check it. + if (!_utf8) + ttmode.c_iflag &= ~IUTF8; + else + ttmode.c_iflag |= IUTF8; +#endif + + if (_eraseChar != 0) + ttmode.c_cc[VERASE] = _eraseChar; + + if (!pty()->tcSetAttr(&ttmode)) + qWarning() << "Unable to set terminal attributes."; + + pty()->setWinSize(_windowLines, _windowColumns); + + KProcess::start(); + + if (!waitForStarted()) + return -1; + + return 0; +} + +void Pty::setEmptyPTYProperties() +{ + struct ::termios ttmode; + pty()->tcGetAttr(&ttmode); + if (!_xonXoff) + ttmode.c_iflag &= ~(IXOFF | IXON); + else + ttmode.c_iflag |= (IXOFF | IXON); +#ifdef IUTF8 // XXX not a reasonable place to check it. + if (!_utf8) + ttmode.c_iflag &= ~IUTF8; + else + ttmode.c_iflag |= IUTF8; +#endif + + if (_eraseChar != 0) + ttmode.c_cc[VERASE] = _eraseChar; + + if (!pty()->tcSetAttr(&ttmode)) + qWarning() << "Unable to set terminal attributes."; +} + +void Pty::setWriteable(bool writeable) +{ + struct stat sbuf; + stat(pty()->ttyName(), &sbuf); + if (writeable) + chmod(pty()->ttyName(), sbuf.st_mode | S_IWGRP); + else + chmod(pty()->ttyName(), sbuf.st_mode & ~(S_IWGRP | S_IWOTH)); +} + +Pty::Pty(int masterFd, QObject *parent) + : KPtyProcess(masterFd, parent) +{ + init(); +} + +Pty::Pty(QObject *parent) + : KPtyProcess(parent) +{ + init(); +} + +void Pty::init() +{ + _windowColumns = 0; + _windowLines = 0; + _eraseChar = 0; + _xonXoff = true; + _utf8 = true; + _bUninstall = false; + + connect(pty(), SIGNAL(readyRead()), this, SLOT(dataReceived())); + setPtyChannels(KPtyProcess::AllChannels); +} + +Pty::~Pty() +{ +} + +bool Pty::isTerminalRemoved() +{ + QFile terminalExecFile("/usr/bin/deepin-terminal"); + if (terminalExecFile.exists()) { + return false; + } + + return true; +} + +bool isPatternAcceptable(QString strCommand, QString strPattern) +{ + QString strTrimmedCmd = strCommand.trimmed(); + + QRegExp cmdRegExp; + cmdRegExp.setPattern(strPattern); + QRegExpValidator cmdREValidator(cmdRegExp, nullptr); + + int pos = 0; + QValidator::State validateState = cmdREValidator.validate(strTrimmedCmd, pos); + + return (validateState == QValidator::Acceptable); +} + +//判断当前命令是否是要删除终端 +bool Pty::bWillRemoveTerminal(QString strCommand) +{ + QString packageName = "deepin-terminal"; + + QStringList strCommandList; + strCommandList.append(strCommand); + + if (strCommand.contains("&&")) { + QStringList cmdList = strCommand.split("&&"); + for (int i = 0; i < cmdList.size(); i++) { + QString currCmd = cmdList.at(i).trimmed(); + if (currCmd.length() > 0 && currCmd.contains(packageName)) { + strCommandList.append(currCmd); + } + } + } + + if (strCommand.contains(";")) { + QStringList cmdList = strCommand.split(";"); + for (int i = 0; i < cmdList.size(); i++) { + QString currCmd = cmdList.at(i).trimmed(); + if (currCmd.length() > 0 && currCmd.contains(packageName)) { + strCommandList.append(currCmd); + } + } + } + + QList acceptableList; + + QStringList packageNameList; + packageNameList << packageName; + + for (int i = 0; i < strCommandList.size(); i++) { + QString strCurrCommand = strCommandList.at(i); + for (int j = 0; j < packageNameList.size(); j++) { + QString packageName = packageNameList.at(j); + QString removePattern = QString("sudo\\s+apt-get\\s+remove\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt\\s+remove\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 放到bWillPurgeTerminal函数中 Begin***************/ +// removePattern = QString("sudo\\s+dpkg\\s+-P\\s+%1").arg(packageName); +// acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 放到bWillPurgeTerminal函数中 End***************/ + + removePattern = QString("sudo\\s+dpkg\\s+-r\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+rm\\s+.+\\s+/usr/bin/deepin-terminal"); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+rm\\s+/usr/bin/deepin-terminal"); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + } + } + + return acceptableList.contains(true); +} + +/******** Add by nt001000 renfeixiang 2020-05-27:增加 Purge卸载命令的判断,显示不同的卸载提示框 Begin***************/ +bool Pty::bWillPurgeTerminal(QString strCommand) +{ + QString packageName = "deepin-terminal"; + + QStringList strCommandList; + strCommandList.append(strCommand); + + if (strCommand.contains("&&")) { + QStringList cmdList = strCommand.split("&&"); + for (int i = 0; i < cmdList.size(); i++) { + QString currCmd = cmdList.at(i).trimmed(); + if (currCmd.length() > 0 && currCmd.contains(packageName)) { + strCommandList.append(currCmd); + } + } + } + + if (strCommand.contains(";")) { + QStringList cmdList = strCommand.split(";"); + for (int i = 0; i < cmdList.size(); i++) { + QString currCmd = cmdList.at(i).trimmed(); + if (currCmd.length() > 0 && currCmd.contains(packageName)) { + strCommandList.append(currCmd); + } + } + } + + QList acceptableList; + + QStringList packageNameList; + packageNameList << packageName; + + for (int i = 0; i < strCommandList.size(); i++) { + QString strCurrCommand = strCommandList.at(i); + for (int j = 0; j < packageNameList.size(); j++) { + QString packageName = packageNameList.at(j); + QString removePattern = QString("sudo\\s+apt-get\\s+purge\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt-get\\s+purge\\s+-y\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt-get\\s+remove\\s+--purge\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt-get\\s+--purge\\s+remove\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt\\s+purge\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt\\s+purge\\s+-y\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt\\s+remove\\s+--purge\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+apt\\s+--purge\\s+remove\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + + removePattern = QString("sudo\\s+dpkg\\s+-P\\s+%1").arg(packageName); + acceptableList << isPatternAcceptable(strCurrCommand, removePattern); + } + } + + return acceptableList.contains(true); +} +/******** Add by nt001000 renfeixiang 2020-05-27:增加 Purge卸载命令的判断,显示不同的卸载提示框 End***************/ + +void Pty::sendData(const char *data, int length, const QTextCodec *codec) +{ + _textCodec = codec; + + if (!length) { + return; + } + + //判断是否是点了自定义命令面板列表项触发的命令 + bool isCustomCommand = false; + QString currCommand = QString::fromLatin1(data); + if (currCommand.length() > 0 && currCommand.endsWith('\n')) { + isCustomCommand = true; + } + + _isCommandExec = false; + _bNeedBlockCommand = false; + //检测到按了回车键 + if (((*data) == '\r' || isCustomCommand) && _bUninstall == false) { + _isCommandExec = true; + QString strCurrCommand = SessionManager::instance()->getCurrShellCommand(_sessionId); + if (isCustomCommand) { + strCurrCommand = currCommand; + } + + //检测到当前命令是代码中通过sendText发给终端的(而不是用户手动输入的命令) + bool isSendByRemoteManage = this->property("isSendByRemoteManage").toBool(); + if (isSendByRemoteManage && strCurrCommand.startsWith("expect -f")) { + _bNeedBlockCommand = true; + //立即修改回false,防止误认其他命令 + this->setProperty("isSendByRemoteManage", QVariant(false)); + } + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 根据remove和purge卸载命令,发送信号不同参数值 Begin***************/ + bool bPurgeTerminal = bWillPurgeTerminal(strCurrCommand); + bool bRemoveTerminal = bWillRemoveTerminal(strCurrCommand); + + if (!isTerminalRemoved() && (bPurgeTerminal || bRemoveTerminal)) { + QString strname = "remove"; + if (bPurgeTerminal) { + strname = "purge"; + } + QMetaObject::invokeMethod(this, "ptyUninstallTerminal", Qt::AutoConnection, Q_RETURN_ARG(bool, _bUninstall), Q_ARG(QString, strname)); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 根据remove和purge卸载命令,发送信号不同参数值 End***************/ + if (_bUninstall) { + qDebug() << "确认卸载终端!" << _bUninstall << endl; + connect(SessionManager::instance(), &SessionManager::sessionIdle, this, [ = ](bool isIdle) { + //卸载完成,关闭所有终端窗口 + if (isIdle) { + if (isTerminalRemoved()) { + pclose(popen("killall deepin-terminal", "r")); + } + } + + if (!isTerminalRemoved()) { + _bUninstall = false; + } + }); + } else { + qDebug() << "不卸载终端!" << _bUninstall << endl; + return; + } + } + } + + //为GBK/GB2312/GB18030编码,且不是输入命令执行的情况(没有按回车) + if (QString(codec->name()).toUpper().startsWith("GB") && !_isCommandExec) { + QTextCodec *utf8Codec = QTextCodec::codecForName("UTF-8"); + QString unicodeData = codec->toUnicode(data); + QByteArray unicode = utf8Codec->fromUnicode(unicodeData); + + if (!pty()->write(unicode.constData(), unicode.length())) { + qWarning() << "Pty::doSendJobs - Could not send input data to terminal process."; + return; + } + } + else { + if (!pty()->write(data, length)) { + qWarning() << "Pty::doSendJobs - Could not send input data to terminal process."; + return; + } + } + +} + +void Pty::dataReceived() +{ + QByteArray data = pty()->readAll(); + + QString recvData = QString(data); + + if (_bNeedBlockCommand) { + QString judgeData = recvData; + if (recvData.length() > 1) { + judgeData = recvData.replace("\r", ""); + judgeData = judgeData.replace("\n", ""); + } + + //使用zsh的时候,发送过来的字符会残留一个字母"e",需要特殊处理下 + if (_program.endsWith("/zsh") + && 1 == judgeData.length() + && judgeData.startsWith("e") + && -1 == _receiveDataIndex) { + _receiveDataIndex = 0; + return; + } + + //不显示远程登录时候的敏感信息(主要是expect -f命令跟随的明文密码) + //同时考虑了zsh的情况 + if (judgeData.startsWith("expect -f") + || judgeData.startsWith("\bexpect") + || judgeData.startsWith("\be") + || judgeData.startsWith("e\bexpect") + || judgeData.startsWith("e\be")) { + _receiveDataIndex = 1; + return; + } + + if (_receiveDataIndex >= 1) { + if (judgeData.contains("Press")) { + //这里需要置回false,否则后面其他命令也会被拦截 + _bNeedBlockCommand = false; + + _receiveDataIndex = -1; + int pressStringIndex = recvData.indexOf("Press"); + if (pressStringIndex > 0) { + recvData = recvData.mid(pressStringIndex); + } + QString helpData = recvData.replace("\n", ""); + recvData = "\r\n" + helpData + "\r\n"; + data = recvData.toUtf8(); + emit receivedData(data.constData(), data.count(), _textCodec); + } + else { + ++_receiveDataIndex; + } + return; + } + } + + /******** Modify by m000714 daizhengwen 2020-04-30: 处理上传下载时乱码显示命令不执行****************/ + // 乱码提示信息不显示 + if (recvData.contains("bash: $'\\212") + || recvData.contains("bash: **0800000000022d:") + || recvData.contains("**^XB0800000000022d") + || recvData.startsWith("**\u0018B0800000000022d\r\u008A")) { + return; + } + + // "\u008A"这个乱码不替换调会导致显示时有\b的效果导致命令错乱bug#23741 + if (recvData.contains("\u008A")) { + recvData.replace("\u008A", "\b \b #"); + data = recvData.toUtf8(); + } + + if (recvData == "rz waiting to receive.") { + recvData += "\r\n"; + data = recvData.toUtf8(); + } + /********************* Modify by m000714 daizhengwen End ************************/ + emit receivedData(data.constData(), data.count(), _isCommandExec); +} + +void Pty::lockPty(bool lock) +{ + Q_UNUSED(lock); + +// TODO: Support for locking the Pty + //if (lock) + //suspend(); + //else + //resume(); +} + +int Pty::foregroundProcessGroup() const +{ + int pid = tcgetpgrp(pty()->masterFd()); + + if (pid != -1) { + return pid; + } + + return 0; +} + +void Pty::setSessionId(int sessionId) +{ + _sessionId = sessionId; +} + +void Pty::setupChildProcess() +{ + KPtyProcess::setupChildProcess(); + + // reset all signal handlers + // this ensures that terminal applications respond to + // signals generated via key sequences such as Ctrl+C + // (which sends SIGINT) + struct sigaction action; + sigset_t sigset; + sigemptyset(&action.sa_mask); + sigemptyset(&sigset); + action.sa_handler = SIG_DFL; + action.sa_flags = 0; + for (int signal = 1; signal < NSIG; signal++) { + sigaction(signal, &action, nullptr); + sigaddset(&sigset, signal); + } + sigprocmask(SIG_UNBLOCK, &sigset, nullptr); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Pty.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Pty.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Pty.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Pty.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,234 @@ +/* + * This file is a part of QTerminal - http://gitorious.org/qterminal + * + * This file was un-linked from KDE and modified + * by Maxim Bourmistrov + * + */ + +/* + This file is part of Konsole, KDE's terminal emulator. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef PTY_H +#define PTY_H + +// Qt +#include +#include +#include +#include + +// KDE +#include "kptyprocess.h" + +namespace Konsole { + +/** + * The Pty class is used to start the terminal process, + * send data to it, receive data from it and manipulate + * various properties of the pseudo-teletype interface + * used to communicate with the process. + * + * To use this class, construct an instance and connect + * to the sendData slot and receivedData signal to + * send data to or receive data from the process. + * + * To start the terminal process, call the start() method + * with the program name and appropriate arguments. + */ +class Pty: public KPtyProcess +{ +Q_OBJECT + + public: + + /** + * Constructs a new Pty. + * + * Connect to the sendData() slot and receivedData() signal to prepare + * for sending and receiving data from the terminal process. + * + * To start the terminal process, call the run() method with the + * name of the program to start and appropriate arguments. + */ + explicit Pty(QObject* parent = nullptr); + + /** + * Construct a process using an open pty master. + * See KPtyProcess::KPtyProcess() + */ + explicit Pty(int ptyMasterFd, QObject* parent = nullptr); + + ~Pty() override; + + /** + * Starts the terminal process. + * + * Returns 0 if the process was started successfully or non-zero + * otherwise. + * + * @param program Path to the program to start + * @param arguments Arguments to pass to the program being started + * @param environment A list of key=value pairs which will be added + * to the environment for the new process. At the very least this + * should include an assignment for the TERM environment variable. + * @param winid Specifies the value of the WINDOWID environment variable + * in the process's environment. + * @param addToUtmp Specifies whether a utmp entry should be created for + * the pty used. See K3Process::setUsePty() + * @param dbusService Specifies the value of the KONSOLE_DBUS_SERVICE + * environment variable in the process's environment. + * @param dbusSession Specifies the value of the KONSOLE_DBUS_SESSION + * environment variable in the process's environment. + */ + int start( const QString& program, + const QStringList& arguments, + const QStringList& environment, + ulong winid, + bool addToUtmp + ); + + /** + * set properties for "EmptyPTY" + */ + void setEmptyPTYProperties(); + + /** TODO: Document me */ + void setWriteable(bool writeable); + + /** + * Enables or disables Xon/Xoff flow control. The flow control setting + * may be changed later by a terminal application, so flowControlEnabled() + * may not equal the value of @p on in the previous call to setFlowControlEnabled() + */ + void setFlowControlEnabled(bool on); + + /** Queries the terminal state and returns true if Xon/Xoff flow control is enabled. */ + bool flowControlEnabled() const; + + /** + * Sets the size of the window (in lines and columns of characters) + * used by this teletype. + */ + void setWindowSize(int lines, int cols); + + /** Returns the size of the window used by this teletype. See setWindowSize() */ + QSize windowSize() const; + + /** TODO Document me */ + void setErase(char erase); + + /** */ + char erase() const; + + /** + * Returns the process id of the teletype's current foreground + * process. This is the process which is currently reading + * input sent to the terminal via. sendData() + * + * If there is a problem reading the foreground process group, + * 0 will be returned. + */ + int foregroundProcessGroup() const; + + void setSessionId(int sessionId); + + public slots: + + /** + * Put the pty into UTF-8 mode on systems which support it. + */ + void setUtf8Mode(bool on); + + /** + * Suspend or resume processing of data from the standard + * output of the terminal process. + * + * See K3Process::suspend() and K3Process::resume() + * + * @param lock If true, processing of output is suspended, + * otherwise processing is resumed. + */ + void lockPty(bool lock); + + /** + * Sends data to the process currently controlling the + * teletype ( whose id is returned by foregroundProcessGroup() ) + * + * @param buffer Pointer to the data to send. + * @param length Length of @p buffer. + */ + void sendData(const char* buffer, int length, const QTextCodec *codec); + + signals: + + /** + * Emitted when a new block of data is received from + * the teletype. + * + * @param buffer Pointer to the data received. + * @param length Length of @p buffer + */ + void receivedData(const char* buffer, int length, bool isCommandExec); + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + bool ptyUninstallTerminal(QString commandname); + /******** Modify by nt001000 renfeixiang 2020-05-14:修改 增加参数区别remove和purge卸载命令 End***************/ + + protected: + void setupChildProcess() override; + + private slots: + // called when data is received from the terminal process + void dataReceived(); + + private: + void init(); + bool isTerminalRemoved(); + bool bWillRemoveTerminal(QString strCommand); + /******** Add by nt001000 renfeixiang 2020-05-14:增加 Purge卸载命令的判断,显示不同的卸载提示框 Begin***************/ + bool bWillPurgeTerminal(QString strCommand); + /******** Add by nt001000 renfeixiang 2020-05-14:增加 Purge卸载命令的判断,显示不同的卸载提示框 End***************/ + + // takes a list of key=value pairs and adds them + // to the environment for the process + void addEnvironmentVariables(const QStringList& environment); + + int _windowColumns; + int _windowLines; + char _eraseChar; + bool _xonXoff; + bool _utf8; + + int _sessionId; + bool _bUninstall; + bool _bNeedBlockCommand = false;//是否为终端内部发送的命令(不是用户手动输入的命令),默认用户手动输入 + int _receiveDataIndex = -1; + const QTextCodec *_textCodec = nullptr; + bool _isCommandExec = false; + + QString _program; +}; + +} + +#endif // PTY_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/qtermwidget.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/qtermwidget.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/qtermwidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/qtermwidget.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1029 @@ +/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include + +#include "ColorTables.h" +#include "Session.h" +#include "SessionManager.h" +#include "Screen.h" +#include "ScreenWindow.h" +#include "Emulation.h" +#include "TerminalDisplay.h" +#include "KeyboardTranslator.h" +#include "ColorScheme.h" +#include "SearchBar.h" +#include "qtermwidget.h" +#include "history/compact/CompactHistoryType.h" +#include "history/HistoryTypeFile.h" + +#ifdef Q_OS_MACOS +// Qt does not support fontconfig on macOS, so we need to use a "real" font name. +#define DEFAULT_FONT_FAMILY "Menlo" +#else +#define DEFAULT_FONT_FAMILY "Monospace" +#endif + +#define STEP_ZOOM 1 + +using namespace Konsole; + +// 翻译文件加载 +QTranslator *QTermWidget::m_translator = nullptr; + +void *createTermWidget(int startnow, void *parent) +{ + return (void *) new QTermWidget(startnow, (QWidget *)parent); +} + +struct TermWidgetImpl { + explicit TermWidgetImpl(QWidget *parent = 0); + + TerminalDisplay *m_terminalDisplay; + Session *m_session; + + Session *createSession(QWidget *parent); + TerminalDisplay *createTerminalDisplay(Session *session, QWidget *parent); +}; + +TermWidgetImpl::TermWidgetImpl(QWidget *parent) +{ + this->m_session = createSession(parent); + SessionManager::instance()->saveSession(this->m_session); + + this->m_terminalDisplay = createTerminalDisplay(this->m_session, parent); + this->m_terminalDisplay->setSessionId(this->m_session->sessionId()); +} + +Session *TermWidgetImpl::createSession(QWidget *parent) +{ + Session *session = new Session(parent); + + session->setTitle(Session::NameRole, QLatin1String("Terminal")); + + /* Thats a freaking bad idea!!!! + * /bin/bash is not there on every system + * better set it to the current $SHELL + * Maybe you can also make a list available and then let the widget-owner decide what to use. + * By setting it to $SHELL right away we actually make the first filecheck obsolete. + * But as iam not sure if you want to do anything else ill just let both checks in and set this to $SHELL anyway. + */ + //session->setProgram("/bin/bash"); + + session->setProgram(QString::fromLocal8Bit(qgetenv("SHELL"))); + + QStringList args = QStringList(QString()); + session->setArguments(args); + session->setAutoClose(true); + + session->setCodec(QTextCodec::codecForName("UTF-8")); + + session->setFlowControlEnabled(true); + session->setHistoryType(CompactHistoryType(10000)); + + session->setDarkBackground(true); + + session->setKeyBindings(QString()); + return session; +} + +TerminalDisplay *TermWidgetImpl::createTerminalDisplay(Session *session, QWidget *parent) +{ + //TerminalDisplay* display = new TerminalDisplay(this); + TerminalDisplay *display = new TerminalScreen(parent); + + display->setBellMode(TerminalDisplay::NotifyBell); + display->setTerminalSizeHint(true); + display->setTripleClickMode(TerminalDisplay::SelectWholeLine); + display->setTerminalSizeStartup(true); + display->setHideCursor(true); + + display->setRandomSeed(session->sessionId() * 31); + + return display; +} + +QTermWidget::QTermWidget(int startnow, QWidget *parent) : QWidget(parent) +{ + init(startnow); +} + +QTermWidget::QTermWidget(QWidget *parent) : QWidget(parent) +{ + init(1); +} + +void QTermWidget::selectionChanged(bool textSelected) +{ + emit copyAvailable(textSelected); +} + +void QTermWidget::search(QString txt, bool forwards, bool next) +{ + /***mod begin by ut001121 zhangmeng 20200515 修复BUG22626***/ + int startColumn, startLine; + + if (m_bHasSelect) { + /***mod begin by ut001121 zhangmeng 20200814 修复BUG40895***/ + if (next) { + startColumn = m_endColumn + 1; + startLine = m_endLine; + } else { + if (m_startColumn == 0) { + startColumn = -1; + startLine = m_startLine > 0 ? m_startLine - 1 : m_impl->m_session->emulation()->lineCount(); + } else { + startColumn = m_startColumn; + startLine = m_startLine; + } + } + /***mod end by ut001121 zhangmeng 20200814***/ + } else if (next) { // search from just after current selection + m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionEnd(startColumn, startLine); + startColumn++; + } else { // search from start of current selection + m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionStart(startColumn, startLine); + } + + qDebug() << "current selection starts at: " << startColumn << startLine; + qDebug() << "current cursor position: " << m_impl->m_terminalDisplay->screenWindow()->cursorPosition(); + qDebug() << "current backwardsPosition" << m_lastBackwardsPosition << endl; + + QString searchText(txt); + // qDebug() << "regExp??????" << regExp.isEmpty(); + //regExp.setPatternSyntax(QRegExp::FixedString); + //regExp.setCaseSensitivity(Qt::CaseSensitive); + + HistorySearch *historySearch = + new HistorySearch(m_impl->m_session->emulation(), searchText, forwards, m_isLastForwards, startColumn, startLine, this); + connect(historySearch, SIGNAL(matchFound(int, int, int, int, int, int, int)), this, SLOT(matchFound(int, int, int, int, int, int, int))); + connect(this, SIGNAL(sig_noMatchFound()), this, SLOT(clearSelection())); + + connect(historySearch, &HistorySearch::noMatchFound, this, [this]() { emit sig_noMatchFound(); }); + // connect(historySearch, SIGNAL(noMatchFound()), m_searchBar, SLOT(noMatchFound())); + historySearch->search(m_lastBackwardsPosition, m_startColumn, m_startLine); + /***mod end by ut001121***/ + + m_isLastForwards = forwards; +} + +void QTermWidget::matchFound(int startColumn, int startLine, int endColumn, int endLine, int lastBackwardsPosition, int loseChinese, int matchChinese) +{ + /***mod begin by ut001121 zhangmeng 20200515 修复BUG22626***/ + m_bHasSelect = true; + m_startColumn = startColumn; + m_startLine = startLine; + m_endColumn = endColumn; + m_endLine = endLine; + if (lastBackwardsPosition != -1) { + m_lastBackwardsPosition = lastBackwardsPosition; + } + + ScreenWindow *sw = m_impl->m_terminalDisplay->screenWindow(); + qDebug() << "Scroll to" << startLine; + sw->scrollTo(startLine); + sw->setTrackOutput(false); + sw->setSelectionStart(startColumn + loseChinese, startLine - sw->currentLine(), false); + sw->setSelectionEnd(endColumn + matchChinese, endLine - sw->currentLine()); + sw->notifyOutputChanged(); + /***mod end by ut001121***/ + // 结束查找 + emit sig_matchFound(); +} + +void QTermWidget::clearSelection() +{ + /***add by ut001121 zhangmeng 20200515 修复BUG22626***/ + m_bHasSelect = false; + m_impl->m_terminalDisplay->screenWindow()->clearSelection(); +} + +void QTermWidget::noMatchFound() +{ + /***add by ut001121 zhangmeng 20200515 修复BUG22626***/ + m_bHasSelect = false; + m_impl->m_terminalDisplay->screenWindow()->clearSelection(); +} + +int QTermWidget::getShellPID() +{ + return m_impl->m_session->processId(); +} + +int QTermWidget::getSessionId() +{ + int currSessionId = m_impl->m_session->sessionId(); + return currSessionId; +} + +void QTermWidget::snapshot() +{ + Q_ASSERT(m_impl->m_session != nullptr); + + Session *currSession = m_impl->m_session; + // use process name as tab title, which not for display + QString title = currSession->getDynamicProcessName(); + title = title.simplified(); + + // use the fallback title if needed + if (title.isEmpty()) { + title = currSession->title(Session::NameRole); + } + + // apply new title + currSession->setTitle(Session::DisplayedTitleRole, title); + + if (currSession->isForegroundProcessActive()) { + emit isTermIdle(false); + } else { + emit isTermIdle(true); + } +} + +void QTermWidget::changeDir(const QString &dir) +{ + /* + this is a very hackish way of trying to determine if the shell is in + the foreground before attempting to change the directory. It may not + be portable to anything other than Linux. + */ + QString strCmd; + strCmd.setNum(getShellPID()); + strCmd.prepend(QLatin1String("ps -j ")); + strCmd.append(QLatin1String(" | tail -1 | awk '{ print $5 }' | grep -q \\+")); + int retval = system(strCmd.toStdString().c_str()); + + if (!retval) { + QString cmd = QLatin1String("cd ") + dir + QLatin1Char('\n'); + sendText(cmd); + } +} + +QSize QTermWidget::sizeHint() const +{ + QSize size = m_impl->m_terminalDisplay->sizeHint(); + size.rheight() = 150; + return size; +} + +void QTermWidget::setTerminalSizeHint(bool on) +{ + m_impl->m_terminalDisplay->setTerminalSizeHint(on); +} + +bool QTermWidget::terminalSizeHint() +{ + return m_impl->m_terminalDisplay->terminalSizeHint(); +} + +void QTermWidget::startShellProgram() +{ + if (m_impl->m_session->isRunning()) { + return; + } + + m_impl->m_session->run(); + + // add snapshot timer when session start running + addSnapShotTimer(); +} + +// take a snapshot of the session state every so often when +// user activity occurs +void QTermWidget::addSnapShotTimer() +{ + // the timer is owned by the session so that it will be destroyed along + // with the session + Session *currSession = m_impl->m_session; + m_interactionTimer = new QTimer(currSession); + m_interactionTimer->setSingleShot(true); + m_interactionTimer->setInterval(500); + m_termDisplay = m_impl->m_terminalDisplay; + connect(m_interactionTimer, &QTimer::timeout, this, &QTermWidget::snapshot); + connect(m_termDisplay.data(), &Konsole::TerminalDisplay::keyPressedSignal, this, &QTermWidget::interactionHandler); + + // take a snapshot of the session state periodically in the background + auto backgroundTimer = new QTimer(currSession); + backgroundTimer->setSingleShot(false); + backgroundTimer->setInterval(2000); + connect(backgroundTimer, &QTimer::timeout, this, &QTermWidget::snapshot); + backgroundTimer->start(); +} + +void QTermWidget::interactionHandler() +{ + m_interactionTimer->start(); +} + +/******************************************************************************* + 1. @函数: setisAllowScroll + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-14 + 4. @说明: 设置是否允许滚动到最新的位置 + 当有输出且并不是在setZoom之后,此标志为true 允许滚动 + 当有输出且在setZoom之后,比标志位false 不允许滚动 +*******************************************************************************/ +void QTermWidget::setIsAllowScroll(bool isAllowScroll) +{ + m_impl->m_terminalDisplay->setIsAllowScroll(isAllowScroll); +} + +/******************************************************************************* + 1. @函数: setNoHasSelect + 2. @作者: ut001000 任飞翔 + 3. @日期: 2020-12-02 + 4. @说明: 当搜索框出现时,设置m_bHasSelect为false,避免搜索框隐藏再显示之后,继续走m_bHasSelect为true流程,导致崩溃 +*******************************************************************************/ +void QTermWidget::setNoHasSelect() +{ + if(m_bHasSelect) { + //清除搜索状态 + m_lastBackwardsPosition = -1; + m_isLastForwards = false; + m_startColumn = 0; + m_startLine = 0; + m_endColumn = 0; + m_endLine = 0; + } + + m_bHasSelect = false; +} + +/******************************************************************************* + 1. @函数: getisAllowScroll + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-14 + 4. @说明: 获取是否允许输出时滚动 +*******************************************************************************/ +bool QTermWidget::getIsAllowScroll() const +{ + return m_impl->m_terminalDisplay->getIsAllowScroll(); +} + +void QTermWidget::startTerminalTeletype() +{ + if (m_impl->m_session->isRunning()) { + return; + } + + m_impl->m_session->runEmptyPTY(); + // redirect data from TTY to external recipient + connect( + m_impl->m_session->emulation(), SIGNAL(sendData(const char *, int, const QTextCodec *)), this, SIGNAL(sendData(const char *, int, const QTextCodec *))); +} + +void QTermWidget::init(int startnow) +{ + m_layout = new QVBoxLayout(); + m_layout->setMargin(0); + setLayout(m_layout); + + // translations + // First check $XDG_DATA_DIRS. This follows the implementation in libqtxdg + QString d = QFile::decodeName(qgetenv("XDG_DATA_DIRS")); +#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0)) + QStringList dirs = d.split(QLatin1Char(':'), Qt::SkipEmptyParts); +#else + QStringList dirs = d.split(QLatin1Char(':'), QString::SkipEmptyParts); +#endif + if (dirs.isEmpty()) { + dirs.append(QString::fromLatin1("/usr/local/share")); + dirs.append(QString::fromLatin1("/usr/share")); + } + dirs.append(QFile::decodeName(TRANSLATIONS_DIR)); + + // 语言,整个应用程序只需要设置一次 + if (nullptr == m_translator) { + // 绑定的父类需要是全局的,不能是this防止窗口被关闭后翻译也随之消失 + m_translator = new QTranslator(qApp); + for (const QString &dir : qAsConst(dirs)) { + qDebug() << "Trying to load translation file from dir" << dir; + if (m_translator->load( + QLocale::system(), QLatin1String("terminalwidget"), QLatin1String(QLatin1String("_")), dir)) { + qApp->installTranslator(m_translator); + qDebug() << "Translations found in" << dir; + break; + } + } + } + + m_impl = new TermWidgetImpl(this); + m_layout->addWidget(m_impl->m_terminalDisplay); + + connect(m_impl->m_session, SIGNAL(bellRequest(QString)), m_impl->m_terminalDisplay, SLOT(bell(QString))); + connect(m_impl->m_terminalDisplay, SIGNAL(notifyBell(QString)), this, SIGNAL(bell(QString))); + + connect(m_impl->m_session, SIGNAL(activity()), this, SIGNAL(activity())); + connect(m_impl->m_session, SIGNAL(silence()), this, SIGNAL(silence())); + connect(m_impl->m_session, &Session::profileChangeCommandReceived, this, &QTermWidget::profileChanged); + connect(m_impl->m_session, &Session::receivedData, this, &QTermWidget::receivedData); + connect(m_impl->m_session, &Session::started, this, &QTermWidget::processStarted); + // 标签标题参数变化 + connect(m_impl->m_session, &Session::titleArgsChange, this, &QTermWidget::titleArgsChange); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + // 用于卸载终端弹出框提示 + connect(m_impl->m_session, SIGNAL(sessionUninstallTerminal(QString)), this, SIGNAL(uninstallTerminal(QString))); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + + connect(m_impl->m_session, &Session::titleChanged, this, [ = ] { + m_impl->m_terminalDisplay->setHideCursor(false); + }); + + // That's OK, FilterChain's dtor takes care of UrlFilter. + UrlFilter *urlFilter = new UrlFilter(); + connect(urlFilter, &UrlFilter::activated, this, &QTermWidget::urlActivated); + m_impl->m_terminalDisplay->filterChain()->addFilter(urlFilter); + m_impl->m_terminalDisplay->filterChain()->setSessionId(m_impl->m_session->sessionId()); + +// m_searchBar = new SearchBar(this); +// m_searchBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum); +// connect(m_searchBar, SIGNAL(searchCriteriaChanged()), this, SLOT(find())); +// connect(m_searchBar, SIGNAL(findNext()), this, SLOT(findNext())); +// connect(m_searchBar, SIGNAL(findPrevious()), this, SLOT(findPrevious())); +// m_layout->addWidget(m_searchBar); +// m_searchBar->hide(); + + if (startnow && m_impl->m_session) { + m_impl->m_session->run(); + } + + this->setFocus(Qt::OtherFocusReason); + this->setFocusPolicy(Qt::WheelFocus); + m_impl->m_terminalDisplay->resize(this->size()); + + this->setFocusProxy(m_impl->m_terminalDisplay); + connect(m_impl->m_terminalDisplay, SIGNAL(copyAvailable(bool)), this, SLOT(selectionChanged(bool))); + connect(m_impl->m_terminalDisplay, SIGNAL(termGetFocus()), this, SIGNAL(termGetFocus())); + connect(m_impl->m_terminalDisplay, SIGNAL(leftMouseClick()), this, SIGNAL(leftMouseClick())); + connect(m_impl->m_terminalDisplay, SIGNAL(termLostFocus()), this, SIGNAL(termLostFocus())); + // 将拖拽进入的urls名返回给终端 将要转发给Emu的数据 + connect(m_impl->m_terminalDisplay, SIGNAL(sendStringToEmu(const char *)), this, SIGNAL(sendUrlsToTerm(const char *))); + connect( + m_impl->m_terminalDisplay, SIGNAL(keyPressedSignal(QKeyEvent *)), this, SIGNAL(termKeyPressed(QKeyEvent *))); + // m_impl->m_terminalDisplay->setSize(80, 40); + + QFont font = QApplication::font(); + font.setFamily(QLatin1String(DEFAULT_FONT_FAMILY)); + font.setPointSize(10); + font.setStyleHint(QFont::TypeWriter); + setTerminalFont(font); +// m_searchBar->setFont(font); + + setScrollBarPosition(NoScrollBar); + setKeyboardCursorShape(Emulation::KeyboardCursorShape::BlockCursor); + + m_impl->m_session->addView(m_impl->m_terminalDisplay); + + connect(m_impl->m_session, SIGNAL(resizeRequest(QSize)), this, SLOT(setSize(QSize))); + connect(m_impl->m_session, SIGNAL(finished()), this, SLOT(sessionFinished())); + connect(m_impl->m_session, &Session::titleChanged, this, &QTermWidget::titleChanged); + connect(m_impl->m_session, &Session::cursorChanged, this, &QTermWidget::cursorChanged); + connect(m_impl->m_session, &Session::shellWarningMessage, this, &QTermWidget::shellWarningMessage); + + //将终端活动状态传给SessionManager单例 + connect(this, SIGNAL(isTermIdle(bool)), SessionManager::instance(), SIGNAL(sessionIdle(bool))); +} + +QTermWidget::~QTermWidget() +{ + SessionManager::instance()->removeSession(m_impl->m_session->sessionId()); + + delete m_impl; + emit destroyed(); +} + +QList QTermWidget::getRunningSessionIdList() +{ + SessionManager *sessionMgr = SessionManager::instance(); + QList sessionList = sessionMgr->sessions(); + + QList sessionIdList; + for (int i = 0; i < sessionList.size(); i++) { + Session *session = sessionList.at(i); + if ((session == nullptr) || !session->isForegroundProcessActive()) { + continue; + } + sessionIdList.append(session->sessionId()); + } + + return sessionIdList; +} + +bool QTermWidget::hasRunningProcess() +{ + QList sessionIdList = getRunningSessionIdList(); + for (int i = 0; i < sessionIdList.size(); i++) { + int sessionId = sessionIdList.at(i); + int currSessionId = m_impl->m_session->sessionId(); + if (sessionId == currSessionId) { + return true; + } + } + + return false; +} + +void QTermWidget::setTerminalFont(const QFont &font) +{ + m_impl->m_terminalDisplay->setVTFont(font); +} + +QFont QTermWidget::getTerminalFont() +{ + return m_impl->m_terminalDisplay->getVTFont(); +} + +void QTermWidget::setTerminalOpacity(qreal level) +{ + m_impl->m_terminalDisplay->setOpacity(level); +} + +void QTermWidget::setTerminalBackgroundImage(QString backgroundImage) +{ + m_impl->m_terminalDisplay->setBackgroundImage(backgroundImage); +} + +void QTermWidget::setShellProgram(const QString &progname) +{ + if (!m_impl->m_session) + return; + m_impl->m_session->setProgram(progname); + qDebug() << "set Program" << progname; +} + +void QTermWidget::setWorkingDirectory(const QString &dir) +{ + if (!m_impl->m_session) + return; + m_impl->m_session->setInitialWorkingDirectory(dir); +} + +QString QTermWidget::workingDirectory() +{ + if (!m_impl->m_session) + return QString(); + +#ifdef Q_OS_LINUX + // Christian Surlykke: On linux we could look at /proc//cwd which should be a link to current + // working directory (: process id of the shell). I don't know about BSD. + // Maybe we could just offer it when running linux, for a start. + QDir d(QString::fromLatin1("/proc/%1/cwd").arg(getShellPID())); + if (!d.exists()) { + qDebug() << "Cannot find" << d.dirName(); + goto fallback; + } + return d.canonicalPath(); + +fallback: +#endif + // fallback, initial WD + return m_impl->m_session->initialWorkingDirectory(); +} + +void QTermWidget::setArgs(const QStringList &args) +{ + if (!m_impl->m_session) + return; + m_impl->m_session->setArguments(args); + qDebug() << "set Arguments" << args; +} + +void QTermWidget::setTextCodec(QTextCodec *codec) +{ + if (!m_impl->m_session) + return; + m_impl->m_session->setCodec(codec); +} + +/******************************************************************************* + 1. @函数: setColorScheme + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 设置主题的配色方案,根据参数 needReloadTheme 判断是否需要重新加载 +*******************************************************************************/ +void QTermWidget::setColorScheme(const QString &origName, bool needReloadTheme) +{ + const ColorScheme *cs = nullptr; + + const bool isFile = QFile::exists(origName); + const QString &name = isFile ? QFileInfo(origName).baseName() : origName; + + // avoid legacy (int) solution + if (!availableColorSchemes().contains(name)) { + if (isFile) { + if (ColorSchemeManager::instance()->loadCustomColorScheme(origName)) { + cs = ColorSchemeManager::instance()->findColorScheme(name); + } else { + qWarning() << Q_FUNC_INFO << "cannot load color scheme from" << origName; + } + } + if (!cs) { + cs = ColorSchemeManager::instance()->defaultColorScheme(); + } + } else { + if (name == "customTheme" && needReloadTheme) { + ColorSchemeManager::instance()->realodColorScheme(origName); + } + cs = ColorSchemeManager::instance()->findColorScheme(name); + } + + if (!cs) { + QMessageBox::information(this, tr("Color Scheme Error"), tr("Cannot load color scheme: %1").arg(name)); + return; + } + ColorEntry table[TABLE_COLORS]; + cs->getColorTable(table); + m_impl->m_terminalDisplay->setColorTable(table); +} + +QStringList QTermWidget::availableColorSchemes() +{ + QStringList ret; + const auto allColorSchemes = ColorSchemeManager::instance()->allColorSchemes(); + for (const ColorScheme *cs : allColorSchemes) + ret.append(cs->name()); + return ret; +} + +void QTermWidget::addCustomColorSchemeDir(const QString &custom_dir) +{ + ColorSchemeManager::instance()->addCustomColorSchemeDir(custom_dir); +} + +void QTermWidget::setSize(const QSize &size) +{ + m_impl->m_terminalDisplay->setSize(size.width(), size.height()); +} + +void QTermWidget::setHistorySize(int lines) +{ + if (lines < 0) + m_impl->m_session->setHistoryType(HistoryTypeFile()); + else + m_impl->m_session->setHistoryType(CompactHistoryType(lines)); +} + +void QTermWidget::setScrollBarPosition(ScrollBarPosition pos) +{ + m_impl->m_terminalDisplay->setScrollBarPosition(pos); +} + +void QTermWidget::scrollToEnd() +{ + m_impl->m_terminalDisplay->scrollToEnd(); +} +/******************************************************************************* + 1. @函数: setTrackOutput + 2. @作者: n014361 王培利 + 3. @日期: 2020-02-17 + 4. @说明: 设置当前屏幕是否滚动 +*******************************************************************************/ +void QTermWidget::setTrackOutput(bool enable) +{ + m_impl->m_terminalDisplay->screenWindow()->setTrackOutput(enable); +} + +void QTermWidget::sendText(const QString &text) +{ + //标记当前命令是代码中通过sendText发给终端的(而不是用户手动输入的命令) + bool isSendByRemoteManage = this->property("isSendByRemoteManage").toBool(); + if (isSendByRemoteManage) { + //将isSendByRemoteManage标记同步给Session + m_impl->m_session->setProperty("isSendByRemoteManage", QVariant(true)); + + //立即修改回false,防止误认其他命令 + this->setProperty("isSendByRemoteManage", QVariant(false)); + } + + m_impl->m_session->sendText(text); + + //标记后立即修改回false,防止误认其他命令 + m_impl->m_session->setProperty("isSendByRemoteManage", QVariant(false)); +} + +void QTermWidget::sendKeyEvent(QKeyEvent *e) +{ + m_impl->m_session->sendKeyEvent(e); +} + +void QTermWidget::resizeEvent(QResizeEvent *) +{ + // qDebug("global window resizing...with %d %d", this->size().width(), this->size().height()); + m_impl->m_terminalDisplay->resize(this->size()); +} + +void QTermWidget::sessionFinished() +{ + emit finished(); +} + +void QTermWidget::bracketText(QString &text) +{ + m_impl->m_terminalDisplay->bracketText(text); +} + +void QTermWidget::copyClipboard() +{ + m_impl->m_terminalDisplay->copyClipboard(); +} + +void QTermWidget::pasteClipboard() +{ + if (m_impl->m_terminalDisplay->hasFocus()) { + m_impl->m_terminalDisplay->pasteClipboard(); + } +} + +void QTermWidget::pasteSelection() +{ + m_impl->m_terminalDisplay->pasteSelection(); +} + +void QTermWidget::setZoom(int step) +{ + // 获取字体 + QFont font = m_impl->m_terminalDisplay->getVTFont(); + + // 设置字体 + font.setPointSize(font.pointSize() + step); + setTerminalFont(font); +} + +void QTermWidget::zoomIn() +{ + setZoom(STEP_ZOOM); +} + +void QTermWidget::zoomOut() +{ + setZoom(-STEP_ZOOM); +} + +void QTermWidget::setKeyBindings(const QString &kb) +{ + m_impl->m_session->setKeyBindings(kb); +} + +void QTermWidget::clear() +{ + m_impl->m_session->emulation()->reset(); + m_impl->m_session->refresh(); + m_impl->m_session->clearHistory(); +} + +void QTermWidget::setFlowControlEnabled(bool enabled) +{ + m_impl->m_session->setFlowControlEnabled(enabled); +} + +QStringList QTermWidget::availableKeyBindings() +{ + return KeyboardTranslatorManager::instance()->allTranslators(); +} + +QString QTermWidget::keyBindings() +{ + return m_impl->m_session->keyBindings(); +} + +void QTermWidget::toggleShowSearchBar() +{ + m_searchBar->isHidden() ? m_searchBar->show() : m_searchBar->hide(); +} + +bool QTermWidget::flowControlEnabled(void) +{ + return m_impl->m_session->flowControlEnabled(); +} + +void QTermWidget::setFlowControlWarningEnabled(bool enabled) +{ + if (flowControlEnabled()) { + // Do not show warning label if flow control is disabled + m_impl->m_terminalDisplay->setFlowControlWarningEnabled(enabled); + } +} + +void QTermWidget::setEnvironment(const QStringList &environment) +{ + m_impl->m_session->setEnvironment(environment); +} + +void QTermWidget::setMotionAfterPasting(int action) +{ + m_impl->m_terminalDisplay->setMotionAfterPasting((Konsole::MotionAfterPasting)action); +} + +int QTermWidget::historyLinesCount() +{ + return m_impl->m_terminalDisplay->screenWindow()->screen()->getHistLines(); +} + +int QTermWidget::screenColumnsCount() +{ + return m_impl->m_terminalDisplay->screenWindow()->screen()->getColumns(); +} + +int QTermWidget::screenLinesCount() +{ + return m_impl->m_terminalDisplay->screenWindow()->screen()->getLines(); +} + +void QTermWidget::setSelectionStart(int row, int column) +{ + m_impl->m_terminalDisplay->screenWindow()->screen()->setSelectionStart(column, row, true); +} + +void QTermWidget::setSelectionEnd(int row, int column) +{ + m_impl->m_terminalDisplay->screenWindow()->screen()->setSelectionEnd(column, row); +} +/******************************************************************** + 1. @函数: setSelectionAll + 2. @作者: 王培利 + 3. @日期: 2020-02-13 + 4. @说明: 屏幕全选功能 +********************************************************************/ +void QTermWidget::setSelectionAll() +{ + m_impl->m_terminalDisplay->setSelectionAll(); +} + +void QTermWidget::getSelectionStart(int &row, int &column) +{ + m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionStart(column, row); +} + +void QTermWidget::getSelectionEnd(int &row, int &column) +{ + m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionEnd(column, row); +} + +char QTermWidget::getErase() +{ + return m_impl->m_session->getEraseChar(); +} + +void QTermWidget::setDeleteMode(char *key, int length) +{ + m_impl->m_session->setDeleteMode(key, length); +} + +void QTermWidget::setBackspaceMode(char *key, int length) +{ + m_impl->m_session->setBackspaceMode(key, length); +} + +QString QTermWidget::selectedText(const Screen::DecodingOptions options) +{ + return m_impl->m_terminalDisplay->screenWindow()->screen()->selectedText(options); +} + +void QTermWidget::setMonitorActivity(bool monitor) +{ + m_impl->m_session->setMonitorActivity(monitor); +} + +void QTermWidget::setMonitorSilence(bool monitor) +{ + m_impl->m_session->setMonitorSilence(monitor); +} + +void QTermWidget::setSilenceTimeout(int seconds) +{ + m_impl->m_session->setMonitorSilenceSeconds(seconds); +} + +Filter::HotSpot *QTermWidget::getHotSpotAt(const QPoint &pos) const +{ + int row = 0, column = 0; + m_impl->m_terminalDisplay->getCharacterPosition(pos, row, column); + return getHotSpotAt(row, column); +} + +Filter::HotSpot *QTermWidget::getHotSpotAt(int row, int column) const +{ + return m_impl->m_terminalDisplay->filterChain()->hotSpotAt(row, column); +} + +QList QTermWidget::filterActions(const QPoint &position) +{ + return m_impl->m_terminalDisplay->filterActions(position); +} + +int QTermWidget::getPtySlaveFd() const +{ + return m_impl->m_session->getPtySlaveFd(); +} + +void QTermWidget::setKeyboardCursorShape(KeyboardCursorShape shape) +{ + m_impl->m_terminalDisplay->setKeyboardCursorShape(shape); +} + +void QTermWidget::setBlinkingCursor(bool blink) +{ + m_impl->m_terminalDisplay->setBlinkingCursor(blink); +} + +void QTermWidget::setBidiEnabled(bool enabled) +{ + m_impl->m_terminalDisplay->setBidiEnabled(enabled); +} + +bool QTermWidget::isBidiEnabled() +{ + return m_impl->m_terminalDisplay->isBidiEnabled(); +} + +QString QTermWidget::title() const +{ + QString title = m_impl->m_session->userTitle(); + if (title.isEmpty()) + title = m_impl->m_session->title(Konsole::Session::NameRole); + return title; +} + +QString QTermWidget::icon() const +{ + QString icon = m_impl->m_session->iconText(); + if (icon.isEmpty()) + icon = m_impl->m_session->iconName(); + return icon; +} + +bool QTermWidget::isTitleChanged() const +{ + return m_impl->m_session->isTitleChanged(); +} + +void QTermWidget::setAutoClose(bool autoClose) +{ + m_impl->m_session->setAutoClose(autoClose); +} + +void QTermWidget::cursorChanged(Konsole::Emulation::KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) +{ + // TODO: A switch to enable/disable DECSCUSR? + setKeyboardCursorShape(cursorShape); + setBlinkingCursor(blinkingCursorEnabled); +} + +void QTermWidget::setMargin(int margin) +{ + m_impl->m_terminalDisplay->setMargin(margin); +} + +int QTermWidget::getMargin() const +{ + return m_impl->m_terminalDisplay->margin(); +} + +void QTermWidget::saveHistory(QIODevice *device) +{ + QTextStream stream(device); + PlainTextDecoder decoder; + decoder.begin(&stream); + m_impl->m_session->emulation()->writeToStream(&decoder, 0, m_impl->m_session->emulation()->lineCount()); +} + +void QTermWidget::setDrawLineChars(bool drawLineChars) +{ + m_impl->m_terminalDisplay->setDrawLineChars(drawLineChars); +} + +void QTermWidget::setBoldIntense(bool boldIntense) +{ + m_impl->m_terminalDisplay->setBoldIntense(boldIntense); +} + +int QTermWidget::getForegroundProcessId() const +{ + return m_impl->m_session->foregroundProcessId(); +} + +QString QTermWidget::getForegroundProcessName() const +{ + return m_impl->m_session->foregroundProcessName(); +} + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/qtermwidget.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/qtermwidget.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/qtermwidget.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/qtermwidget.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,429 @@ +/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#ifndef _Q_TERM_WIDGET +#define _Q_TERM_WIDGET + +#include +#include +#include +#include "Emulation.h" +#include "Filter.h" +#include "HistorySearch.h" + +#include "qtermwidget_export.h" + +class QVBoxLayout; +class TermWidgetImpl; +class SearchBar; +class QUrl; +namespace Konsole { +class TerminalDisplay; +} + +class TERMINALWIDGET_EXPORT QTermWidget : public QWidget +{ + Q_OBJECT +public: + /** + * This enum describes the location where the scroll bar is positioned in the display widget. + */ + enum ScrollBarPosition { + /** Do not show the scroll bar. */ + NoScrollBar = 0, + /** Show the scroll bar on the left side of the display. */ + ScrollBarLeft = 1, + /** Show the scroll bar on the right side of the display. */ + ScrollBarRight = 2 + }; + + using KeyboardCursorShape = Konsole::Emulation::KeyboardCursorShape; + + //Creation of widget + QTermWidget(int startnow, // 1 = start shell programm immediatelly + QWidget *parent = nullptr); + // A dummy constructor for Qt Designer. startnow is 1 by default + explicit QTermWidget(QWidget *parent = nullptr); + + ~QTermWidget() override; + + //Initial size + QSize sizeHint() const override; + + // expose TerminalDisplay::TerminalSizeHint, setTerminalSizeHint + void setTerminalSizeHint(bool on); + bool terminalSizeHint(); + + //start shell program if it was not started in constructor + void startShellProgram(); + + // Returns session id list of processes running in the terminal window + QList getRunningSessionIdList(); + + // Determine whether the terminal control has running process + bool hasRunningProcess(); + + /** + * Start terminal teletype as is + * and redirect data for external recipient. + * It can be used for display and control a remote terminal. + */ + void startTerminalTeletype(); + + int getShellPID(); + + // Get current terminal's session id + int getSessionId(); + + void changeDir(const QString &dir); + + // look-n-feel, if you don`t like defaults + + // Terminal font + // Default is application font with family Monospace, size 10 + // Beware of a performance penalty and display/alignment issues when using a proportional font. + void setTerminalFont(const QFont &font); + QFont getTerminalFont(); + void setTerminalOpacity(qreal level); + void setTerminalBackgroundImage(QString backgroundImage); + + // environment + void setEnvironment(const QStringList &environment); + + // Shell program, default is /bin/bash + void setShellProgram(const QString &progname); + + // working directory + void setWorkingDirectory(const QString &dir); + QString workingDirectory(); + + // Shell program args, default is none + void setArgs(const QStringList &args); + + // Text codec, default is UTF-8 + void setTextCodec(QTextCodec *codec); + + /** @brief Sets the color scheme, default is white on black + * + * @param[in] name The name of the color scheme, either returned from + * availableColorSchemes() or a full path to a color scheme. + */ + //设置主题的配色方案 + void setColorScheme(const QString &name, bool needReloadTheme = false); + static QStringList availableColorSchemes(); + static void addCustomColorSchemeDir(const QString &custom_dir); + + // History size for scrolling + void setHistorySize(int lines); // infinite if lines < 0 + + // Presence of scrollbar + void setScrollBarPosition(ScrollBarPosition); + + // Wrapped, scroll to end. + void scrollToEnd(); + + /******** Modify by n014361 wangpeili 2020-02-17:设置当前屏幕是否滚动****************/ + void setTrackOutput(bool enable); + /********************* Modify by n014361 wangpeili End ************************/ + + // Send some text to terminal + void sendText(const QString &text); + + // Send key event to terminal + void sendKeyEvent(QKeyEvent *e); + + // Sets whether flow control is enabled + void setFlowControlEnabled(bool enabled); + + // Returns whether flow control is enabled + bool flowControlEnabled(void); + + /** + * Sets whether the flow control warning box should be shown + * when the flow control stop key (Ctrl+S) is pressed. + */ + void setFlowControlWarningEnabled(bool enabled); + + /*! Get all available keyboard bindings + */ + static QStringList availableKeyBindings(); + + //! Return current key bindings + QString keyBindings(); + + void setMotionAfterPasting(int); + + /** Return the number of lines in the history buffer. */ + int historyLinesCount(); + + int screenColumnsCount(); + int screenLinesCount(); + + void setSelectionStart(int row, int column); + void setSelectionEnd(int row, int column); + /******** Modify by n014361 wangpeili 2020-02-13: 新增屏幕全选功能***********×****/ + void setSelectionAll(); + /***************** Modify by n014361 End *************************/ + void getSelectionStart(int &row, int &column); + void getSelectionEnd(int &row, int &column); + /******** Modify by ut000610 daizhengwen 2020-06-02: 获得pty erase模式****************/ + char getErase(); + /********************* Modify by ut000610 daizhengwen End ************************/ + + // 设置删除键模式(修改内存接口) + void setDeleteMode(char *key, int length); + // 设置退格按键模式(用户选择接口) + void setBackspaceMode(char *key, int length); + + /** + * Returns the currently selected text. + * @param preserveLineBreaks Specifies whether new line characters should + * be inserted into the returned text at the end of each terminal line. + */ + QString selectedText(const Screen::DecodingOptions options=Screen::PreserveLineBreaks); + + void setMonitorActivity(bool); + void setMonitorSilence(bool); + void setSilenceTimeout(int seconds); + + /** Returns the available hotspot for the given point \em pos. + * + * This method may return a nullptr if no hotspot is available. + * + * @param[in] pos The point of interest in the QTermWidget coordinates. + * @return Hotspot for the given position, or nullptr if no hotspot. + */ + Filter::HotSpot *getHotSpotAt(const QPoint &pos) const; + + /** Returns the available hotspots for the given row and column. + * + * @return Hotspot for the given position, or nullptr if no hotspot. + */ + Filter::HotSpot *getHotSpotAt(int row, int column) const; + + /* + * Proxy for TerminalDisplay::filterActions + * */ + QList filterActions(const QPoint &position); + + /** + * Returns a pty slave file descriptor. + * This can be used for display and control + * a remote terminal. + */ + int getPtySlaveFd() const; + + /** + * Sets the shape of the keyboard cursor. This is the cursor drawn + * at the position in the terminal where keyboard input will appear. + */ + void setKeyboardCursorShape(KeyboardCursorShape shape); + + void setBlinkingCursor(bool blink); + + /** Enables or disables bidi text in the terminal. */ + void setBidiEnabled(bool enabled); + bool isBidiEnabled(); + + /** + * Automatically close the terminal session after the shell process exits or + * keep it running. + */ + void setAutoClose(bool); + + QString title() const; + QString icon() const; + + /** True if the title() or icon() was (ever) changed by the session. */ + bool isTitleChanged() const; + + /** change and wrap text corresponding to paste mode **/ + void bracketText(QString &text); + + /** Set the empty space outside the terminal */ + void setMargin(int); + + /** Get the empty space outside the terminal */ + int getMargin() const; + + /** Get the foreground pid in terminal */ + int getForegroundProcessId() const; + + // 获取foreground名称 + QString getForegroundProcessName() const; + + void setDrawLineChars(bool drawLineChars); + + void setBoldIntense(bool boldIntense); + + // 获取是否允许输出时滚动 + bool getIsAllowScroll() const; + + // 设置是否允许输出时滚动 + void setIsAllowScroll(bool isAllowScroll); + + //Add by ut001000 renfeixiang 2020-12-02 当搜索框出现时,设置m_bHasSelect为false, + //避免搜索框隐藏再显示之后,继续走m_bHasSelect为true流程,导致崩溃 + void setNoHasSelect(); + +signals: + void finished(); + void copyAvailable(bool); + + void termGetFocus(); + void termLostFocus(); + void leftMouseClick(); + + void termKeyPressed(QKeyEvent *); + + void urlActivated(const QUrl &, bool fromContextMenu); + + void bell(const QString &message); + + void activity(); + void silence(); + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + bool uninstallTerminal(QString commandname); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + + /******** Modify by ut000610 daizhengwen 2020-06-11: QProcess start finished signal****************/ + void processStarted(); + /********************* Modify by ut000610 daizhengwen End ************************/ + + /******** Modify by ut000610 daizhengwen 2020-09-03:将拖拽过来的数据传送给终端 Begin***************/ + void sendUrlsToTerm(const char *); + /********************* Modify by ut000610 daizhengwen End ************************/ + /** + * Emitted when emulator send data to the terminal process + * (redirected for external recipient). It can be used for + * control and display the remote terminal. + */ + void sendData(const char *, int, const QTextCodec *); + + void profileChanged(const QString &profile); + + void titleChanged(); + + // warning提示信息 currentShell当前使用的shell, 启用shell是否成功 true 替换了shell false 替换shell但启动失败 + void shellWarningMessage(QString currentShell, bool isSuccess); + + /** + * Signals that we received new data from the process running in the + * terminal emulator + */ + void receivedData(const QString &text); + + /** + * Signals for dynamically determine whether current terminal is busy or idle + */ + void isTermIdle(bool bIdle); + // 将库里返回信号透传出来。原来的noMatchFound方法改名为clearSelection + void sig_noMatchFound(); + // 找到的信号 + void sig_matchFound(); + + // 标签标题参数改变 dzw 2020-12-2 + void titleArgsChange(QString key, QString value); + +public slots: + // Copy selection to clipboard + void copyClipboard(); + + // Paste clipboard to terminal + void pasteClipboard(); + + // Paste selection to terminal + void pasteSelection(); + + // Set zoom + void zoomIn(); + void zoomOut(); + + // Set size + void setSize(const QSize &); + + /*! Set named key binding for given widget + */ + void setKeyBindings(const QString &kb); + + /*! Clear the terminal content and move to home position + */ + void clear(); + + void toggleShowSearchBar(); + /******** Modify by n014361 wangpeili 2020-02-24: ****************/ + // 新增外部搜索接口,不用qterminal内置的搜索接口 + void search(QString txt, bool forwards, bool next); + // 清除选中框 + void clearSelection(); + + void noMatchFound(); + /********************* Modify by n014361 wangpeili End ************************/ + + void saveHistory(QIODevice *device); +protected: + void resizeEvent(QResizeEvent *) override; + +protected slots: + void sessionFinished(); + void selectionChanged(bool textSelected); + +private slots: + void matchFound(int startColumn, int startLine, int endColumn, int endLine, int lastBackwardsPosition, int loseChinese, int matchChinese); + + /** + * Emulation::cursorChanged() signal propogates to here and QTermWidget + * sends the specified cursor states to the terminal display + */ + void cursorChanged(Konsole::Emulation::KeyboardCursorShape cursorShape, bool blinkingCursorEnabled); + void snapshot(); + +private: + void setZoom(int step); + void init(int startnow); + void addSnapShotTimer(); + void interactionHandler(); + + TermWidgetImpl *m_impl; + SearchBar *m_searchBar; + QVBoxLayout *m_layout; + static QTranslator *m_translator; + QPointer m_termDisplay; + QTimer *m_interactionTimer = nullptr; + + bool m_bHasSelect = false; + int m_startColumn = 0; + int m_startLine = 0; + int m_endColumn = 0; + int m_endLine = 0; + int m_lastBackwardsPosition = -1; + //上一次是正向搜索还是反向搜索 + bool m_isLastForwards = false; +}; + +// Maybe useful, maybe not + +#ifdef __cplusplus +extern "C" +#endif +void *createTermWidget(int startnow, void *parent); + +#endif + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Screen.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Screen.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Screen.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Screen.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1615 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + */ + +// Own +#include "Screen.h" + +// Standard +#include +#include +#include +#include +#include + +// Qt +#include +#include +#include + +// KDE +//#include + +// Konsole +#include "konsole_wcwidth.h" +#include "Session.h" +#include "SessionManager.h" +#include "TerminalCharacterDecoder.h" +#include "TerminalDisplay.h" +#include "history/HistoryType.h" +#include "history/HistoryScrollNone.h" + +using namespace Konsole; + +//FIXME: this is emulation specific. Use false for xterm, true for ANSI. +//FIXME: see if we can get this from terminfo. +#define BS_CLEARS false + +//Macro to convert x,y position on screen to position within an image. +// +//Originally the image was stored as one large contiguous block of +//memory, so a position within the image could be represented as an +//offset from the beginning of the block. For efficiency reasons this +//is no longer the case. +//Many internal parts of this class still use this representation for parameters and so on, +//notably moveImage() and clearImage(). +//This macro converts from an X,Y position into an image offset. +#ifndef loc +#define loc(X,Y) ((Y)*columns+(X)) +#endif + + +Character Screen::defaultChar = Character(' ', + CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR), + CharacterColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR), + DEFAULT_RENDITION); + +//#define REVERSE_WRAPPED_LINES // for wrapped line debug + +Screen::Screen(int l, int c) + : lines(l) + , columns(c) + , screenLines(lines+1) + , _screenLinesSize(lines) + , _scrolledLines(0) + , _droppedLines(0) + , history(new HistoryScrollNone()) + , cuX(0) + , cuY(0) + , currentRendition(0) + , _topMargin(0) + , _bottomMargin(0) + , selBegin(0) + , selTopLeft(0) + , selBottomRight(0) + , blockSelectionMode(false) + , effectiveForeground(CharacterColor()) + , effectiveBackground(CharacterColor()) + , effectiveRendition(0) + , lastPos(-1) +{ + lineProperties.resize(lines+1); + for (int i=0;i _bottomMargin ? lines-1 : _bottomMargin; + cuX = qMin(columns-1,cuX); // nowrap! + cuY = qMin(stop,cuY+n); +} + +void Screen::cursorLeft(int n) + //=CUB +{ + if (n == 0) n = 1; // Default + cuX = qMin(columns-1,cuX); // nowrap! + cuX = qMax(0,cuX-n); +} + +void Screen::cursorRight(int n) + //=CUF +{ + if (n == 0) n = 1; // Default + cuX = qMin(columns-1,cuX+n); +} + +void Screen::setMargins(int top, int bot) + //=STBM +{ + if (top == 0) top = 1; // Default + if (bot == 0) bot = lines; // Default + top = top - 1; // Adjust to internal lineno + bot = bot - 1; // Adjust to internal lineno + if ( !( 0 <= top && top < bot && bot < lines ) ) + { //Debug()<<" setRegion("< 0) + cuY -= 1; +} + +void Screen::nextLine() + //=NEL +{ + toStartOfLine(); index(); +} + +void Screen::eraseChars(int n) +{ + if (n == 0) n = 1; // Default + int p = qMax(0,qMin(cuX+n-1,columns-1)); + clearImage(loc(cuX,cuY),loc(p,cuY),' '); +} + +void Screen::deleteChars(int n) +{ + Q_ASSERT( n >= 0 ); + + // always delete at least one char + if (n == 0) + n = 1; + + // if cursor is beyond the end of the line there is nothing to do + if ( cuX >= screenLines[cuY].count() ) + return; + + if ( cuX+n > screenLines[cuY].count() ) + n = screenLines[cuY].count() - cuX; + + Q_ASSERT( n >= 0 ); + Q_ASSERT( cuX+n <= screenLines[cuY].count() ); + + screenLines[cuY].remove(cuX,n); +} + +void Screen::insertChars(int n) +{ + if (n == 0) n = 1; // Default + + if ( screenLines[cuY].size() < cuX ) + screenLines[cuY].resize(cuX); + + screenLines[cuY].insert(cuX,n,' '); + + if ( screenLines[cuY].count() > columns ) + screenLines[cuY].resize(columns); +} + +void Screen::repeatChars(int count) + //=REP +{ + if (count == 0) + { + count = 1; + } + /** + * From ECMA-48 version 5, section 8.3.103 + * If the character preceding REP is a control function or part of a + * control function, the effect of REP is not defined by this Standard. + * + * So, a "normal" program should always use REP immediately after a visible + * character (those other than escape sequences). So, lastDrawnChar can be + * safely used. + */ + for (int i = 0; i < count; i++) + { + displayCharacter(lastDrawnChar); + } +} + +void Screen::deleteLines(int n) +{ + if (n == 0) n = 1; // Default + scrollUp(cuY,n); +} + +void Screen::insertLines(int n) +{ + if (n == 0) n = 1; // Default + scrollDown(cuY,n); +} + +void Screen::setMode(int m) +{ + currentModes[m] = true; + switch(m) + { + case MODE_Origin : cuX = 0; cuY = _topMargin; break; //FIXME: home + } +} + +void Screen::resetMode(int m) +{ + currentModes[m] = false; + switch(m) + { + case MODE_Origin : cuX = 0; cuY = 0; break; //FIXME: home + } +} + +void Screen::saveMode(int m) +{ + savedModes[m] = currentModes[m]; +} + +void Screen::restoreMode(int m) +{ + currentModes[m] = savedModes[m]; +} + +bool Screen::getMode(int m) const +{ + return currentModes[m]; +} + +void Screen::saveCursor() +{ + savedState.cursorColumn = cuX; + savedState.cursorLine = cuY; + savedState.rendition = currentRendition; + savedState.foreground = currentForeground; + savedState.background = currentBackground; +} + +void Screen::restoreCursor() +{ + cuX = qMin(savedState.cursorColumn,columns-1); + cuY = qMin(savedState.cursorLine,lines-1); + currentRendition = savedState.rendition; + currentForeground = savedState.foreground; + currentBackground = savedState.background; + updateEffectiveRendition(); +} + +void Screen::resizeImage(int new_lines, int new_columns) +{ + if ((new_lines == lines) && (new_columns == columns)) { + return; + } + + // Adjust scroll position, and fix glitches + _oldTotalLines = getLines() + getHistLines(); + _isResize = true; + + int cursorLine = getCursorLine(); + const int oldCursorLine = (cursorLine == lines - 1 || cursorLine > new_lines - 1) ? new_lines - 1 : cursorLine; + + // Check if history need to change + if (_enableReflowLines && new_columns != columns && history->getLines() && history->getMaxLines()) { + // Join next line from _screenLine to history + while (history->isWrappedLine(history->getLines() - 1)) { + fastAddHistLine(); + cursorLine--; + } + auto removedLines = history->reflowLines(new_columns); + + // If history size > max history size it will drop a line from history. + // We need to verify if we need to remove a URL. + if (removedLines) { +// _escapeSequenceUrlExtractor->historyLinesRemoved(removedLines); + } + } + + if (_enableReflowLines && new_columns != columns) { + int cursorLineCorrection = 0; + if (_currentTerminalDisplay) { + // The 'zsh' works different from other shells when writting the command line. + // It needs to identify the 'zsh' and calculate the new command line. + auto currSession = SessionManager::instance()->idToSession(_sessionId); + if (currSession + && (QLatin1String("zsh") == currSession->foregroundProcessName()) + && (cursorLine > 0) + && ((lineProperties[cursorLine - 1] & LINE_WRAPPED) != 0)) { + while (cursorLine + cursorLineCorrection > 0 && (lineProperties[cursorLine + cursorLineCorrection - 1] & LINE_WRAPPED) != 0) { + cursorLineCorrection--; + } + } + } + + // Analize the lines and move the data to lines below. + int currentPos = 0; + while (currentPos < (cursorLine + cursorLineCorrection) && currentPos < screenLines.count() - 1) { + // Join wrapped line in current position + if ((lineProperties[currentPos] & LINE_WRAPPED) != 0) { + screenLines[currentPos].append(std::move(screenLines[currentPos + 1])); + screenLines.remove(currentPos + 1); + lineProperties.remove(currentPos); + cursorLine--; + continue; + } + + // Ignore whitespaces at the end of the line + int lineSize = screenLines[currentPos].size(); + while (lineSize > 0 && QChar(screenLines[currentPos][lineSize - 1].character).isSpace()) { + lineSize--; + } + + // If need to move to line below, copy from the current line, to the next one. + if (lineSize > new_columns) { + auto values = screenLines[currentPos].mid(new_columns); + screenLines[currentPos].resize(new_columns); + lineProperties.insert(currentPos + 1, lineProperties[currentPos]); + screenLines.insert(currentPos + 1, std::move(values)); + lineProperties[currentPos] |= LINE_WRAPPED; + cursorLine++; + } + currentPos += 1; + } + } + + // Check if it need to move from _screenLine to history + while (cursorLine > new_lines - 1) { + fastAddHistLine(); + cursorLine--; + } + + if (_enableReflowLines) { + // Check cursor position and send from history to screenLines + ImageLine histLine; + histLine.reserve(1024); + while (cursorLine < oldCursorLine && history->getLines()) { + int histPos = history->getLines() - 1; + int histLineLen = history->getLineLen(histPos); + int isWrapped = history->isWrappedLine(histPos) ? LINE_WRAPPED : LINE_DEFAULT; + histLine.resize(histLineLen); + history->getCells(histPos, 0, histLineLen, histLine.data()); + screenLines.insert(0, histLine); + lineProperties.insert(0, isWrapped); + history->removeCells(histPos); + cursorLine++; + } + } + + lineProperties.resize(new_lines + 1); + if (lineProperties.size() > screenLines.size()) { + std::fill(lineProperties.begin() + screenLines.size(), lineProperties.end(), LINE_DEFAULT); + } + screenLines.resize(new_lines + 1); + + _screenLinesSize = new_lines; + lines = new_lines; + columns = new_columns; + cuX = qMin(cuX, columns - 1); + cursorLine = qBound(0, cursorLine, lines - 1); + setCursorLine(cursorLine); + + // FIXME: try to keep values, evtl. + setDefaultMargins(); + initTabStops(); + clearSelection(); +} + +void Screen::setDefaultMargins() +{ + _topMargin = 0; + _bottomMargin = lines-1; +} + + +/* + Clarifying rendition here and in the display. + + currently, the display's color table is + 0 1 2 .. 9 10 .. 17 + dft_fg, dft_bg, dim 0..7, intensive 0..7 + + currentForeground, currentBackground contain values 0..8; + - 0 = default color + - 1..8 = ansi specified color + + re_fg, re_bg contain values 0..17 + due to the TerminalDisplay's color table + + rendition attributes are + + attr widget screen + -------------- ------ ------ + RE_UNDERLINE XX XX affects foreground only + RE_BLINK XX XX affects foreground only + RE_BOLD XX XX affects foreground only + RE_REVERSE -- XX + RE_TRANSPARENT XX -- affects background only + RE_INTENSIVE XX -- affects foreground only + + Note that RE_BOLD is used in both widget + and screen rendition. Since xterm/vt102 + is to poor to distinguish between bold + (which is a font attribute) and intensive + (which is a color attribute), we translate + this and RE_BOLD in falls eventually appart + into RE_BOLD and RE_INTENSIVE. + */ + +void Screen::reverseRendition(Character& p) const +{ + CharacterColor f = p.foregroundColor; + CharacterColor b = p.backgroundColor; + + p.foregroundColor = b; + p.backgroundColor = f; //p->r &= ~RE_TRANSPARENT; +} + +void Screen::updateEffectiveRendition() +{ + effectiveRendition = currentRendition; + if (currentRendition & RE_REVERSE) + { + effectiveForeground = currentBackground; + effectiveBackground = currentForeground; + } + else + { + effectiveForeground = currentForeground; + effectiveBackground = currentBackground; + } + + if (currentRendition & RE_BOLD) + effectiveForeground.setIntensive(); +} + +void Screen::copyFromHistory(Character* dest, int startLine, int count) const +{ + Q_ASSERT( startLine >= 0 && count > 0 && startLine + count <= history->getLines() ); + + for (int line = startLine; line < startLine + count; line++) + { + const int length = qMin(columns,history->getLineLen(line)); + const int destLineOffset = (line-startLine)*columns; + + history->getCells(line,0,length,dest + destLineOffset); + + for (int column = length; column < columns; column++) + dest[destLineOffset+column] = defaultChar; + + // invert selected text + if (selBegin !=-1) + { + for (int column = 0; column < columns; column++) + { + if (isSelected(column,line)) + { + reverseRendition(dest[destLineOffset + column]); + } + } + } + } +} + +void Screen::copyFromScreen(Character* dest , int startLine , int count) const +{ + Q_ASSERT( startLine >= 0 && count > 0 && startLine + count <= lines ); + + for (int line = startLine; line < (startLine+count) ; line++) + { + int srcLineStartIndex = line*columns; + int destLineStartIndex = (line-startLine)*columns; + + for (int column = 0; column < columns; column++) + { + int srcIndex = srcLineStartIndex + column; + int destIndex = destLineStartIndex + column; + + dest[destIndex] = screenLines[srcIndex/columns].value(srcIndex%columns,defaultChar); + + // invert selected text + if (selBegin != -1 && isSelected(column,line + history->getLines())) + reverseRendition(dest[destIndex]); + } + + } +} + +void Screen::getImage( Character* dest, int size, int startLine, int endLine ) const +{ + Q_ASSERT( startLine >= 0 ); + Q_ASSERT( endLine >= startLine && endLine < history->getLines() + lines ); + + const int mergedLines = endLine - startLine + 1; + + Q_ASSERT( size >= mergedLines * columns ); + Q_UNUSED( size ); + + const int linesInHistoryBuffer = qBound(0,history->getLines()-startLine,mergedLines); + const int linesInScreenBuffer = mergedLines - linesInHistoryBuffer; + + // copy lines from history buffer + if (linesInHistoryBuffer > 0) + copyFromHistory(dest,startLine,linesInHistoryBuffer); + + // copy lines from screen buffer + if (linesInScreenBuffer > 0) + copyFromScreen(dest + linesInHistoryBuffer*columns, + startLine + linesInHistoryBuffer - history->getLines(), + linesInScreenBuffer); + + // invert display when in screen mode + if (getMode(MODE_Screen)) + { + for (int i = 0; i < mergedLines*columns; i++) + reverseRendition(dest[i]); // for reverse display + } + + // mark the character at the current cursor position + int cursorIndex = loc(cuX, cuY + linesInHistoryBuffer); + if(getMode(MODE_Cursor) && cursorIndex < columns*mergedLines) + dest[cursorIndex].rendition |= RE_CURSOR; +} + +QVector Screen::getLineProperties( int startLine , int endLine ) const +{ + Q_ASSERT( startLine >= 0 ); + Q_ASSERT( endLine >= startLine && endLine < history->getLines() + lines ); + + const int mergedLines = endLine-startLine+1; + const int linesInHistory = qBound(0,history->getLines()-startLine,mergedLines); + const int linesInScreen = mergedLines - linesInHistory; + + QVector result(mergedLines); + int index = 0; + + // copy properties for lines in history + for (int line = startLine; line < startLine + linesInHistory; line++) + { + //TODO Support for line properties other than wrapped lines + if (history->isWrappedLine(line)) + { + result[index] = (LineProperty)(result[index] | LINE_WRAPPED); + } + index++; + } + + // copy properties for lines in screen buffer + const int firstScreenLine = startLine + linesInHistory - history->getLines(); + for (int line = firstScreenLine; line < firstScreenLine+linesInScreen; line++) + { + result[index]=lineProperties[line]; + index++; + } + + return result; +} + +void Screen::reset(bool clearScreen) +{ + setMode(MODE_Wrap ); saveMode(MODE_Wrap ); // wrap at end of margin + resetMode(MODE_Origin); saveMode(MODE_Origin); // position refere to [1,1] + resetMode(MODE_Insert); saveMode(MODE_Insert); // overstroke + setMode(MODE_Cursor); // cursor visible + resetMode(MODE_Screen); // screen not inverse + resetMode(MODE_NewLine); + + _topMargin=0; + _bottomMargin=lines-1; + + setDefaultRendition(); + saveCursor(); + + if ( clearScreen ) + clear(); +} + +void Screen::clear() +{ + clearEntireScreen(); + home(); +} + +void Screen::backspace() +{ + cuX = qMin(columns-1,cuX); // nowrap! + cuX = qMax(0,cuX-1); + + if (screenLines[cuY].size() < cuX+1) + screenLines[cuY].resize(cuX+1); + + if (BS_CLEARS) + screenLines[cuY][cuX].character = ' '; +} + +void Screen::tab(int n) +{ + // note that TAB is a format effector (does not write ' '); + if (n == 0) n = 1; + while((n > 0) && (cuX < columns-1)) + { + cursorRight(1); + while((cuX < columns-1) && !tabStops[cuX]) + cursorRight(1); + n--; + } +} + +void Screen::backtab(int n) +{ + // note that TAB is a format effector (does not write ' '); + if (n == 0) n = 1; + while((n > 0) && (cuX > 0)) + { + cursorLeft(1); while((cuX > 0) && !tabStops[cuX]) cursorLeft(1); + n--; + } +} + +void Screen::clearTabStops() +{ + for (int i = 0; i < columns; i++) tabStops[i] = false; +} + +void Screen::changeTabStop(bool set) +{ + if (cuX >= columns) return; + tabStops[cuX] = set; +} + +void Screen::initTabStops() +{ + tabStops.resize(columns); + + // Arrg! The 1st tabstop has to be one longer than the other. + // i.e. the kids start counting from 0 instead of 1. + // Other programs might behave correctly. Be aware. + for (int i = 0; i < columns; i++) + tabStops[i] = (i%8 == 0 && i != 0); +} + +void Screen::newLine() +{ + if (getMode(MODE_NewLine)) + toStartOfLine(); + index(); +} + +void Screen::checkSelection(int from, int to) +{ + if (selBegin == -1) + return; + int scr_TL = loc(0, history->getLines()); + //Clear entire selection if it overlaps region [from, to] + if ( (selBottomRight >= (from+scr_TL)) && (selTopLeft <= (to+scr_TL)) ) + clearSelection(); +} + +void Screen::displayCharacter(uint c) +{ + // Note that VT100 does wrapping BEFORE putting the character. + // This has impact on the assumption of valid cursor positions. + // We indicate the fact that a newline has to be triggered by + // putting the cursor one right to the last column of the screen. + + int w = Character::width(c); + if (w <= 0) + return; + + if (cuX+w > columns) { + if (getMode(MODE_Wrap)) { + lineProperties[cuY] = (LineProperty)(lineProperties[cuY] | LINE_WRAPPED); + nextLine(); + } + else + cuX = columns-w; + } + + // ensure current line vector has enough elements + int size = screenLines[cuY].size(); + if (size < cuX+w) + { + screenLines[cuY].resize(cuX+w); + } + + if (getMode(MODE_Insert)) insertChars(w); + + lastPos = loc(cuX,cuY); + + // check if selection is still valid. + checkSelection(lastPos, lastPos); + + Character& currentChar = screenLines[cuY][cuX]; + + currentChar.character = c; + currentChar.foregroundColor = effectiveForeground; + currentChar.backgroundColor = effectiveBackground; + currentChar.rendition = effectiveRendition; + + lastDrawnChar = c; + + int i = 0; + int newCursorX = cuX + w--; + while(w) + { + i++; + + if ( screenLines[cuY].size() < cuX + i + 1 ) + screenLines[cuY].resize(cuX+i+1); + + Character& ch = screenLines[cuY][cuX + i]; + ch.character = 0; + ch.foregroundColor = effectiveForeground; + ch.backgroundColor = effectiveBackground; + ch.rendition = effectiveRendition; + + w--; + } + cuX = newCursorX; +} + +void Screen::compose(const QString& /*compose*/) +{ + Q_ASSERT( 0 /*Not implemented yet*/ ); + + /* if (lastPos == -1) + return; + + QChar c(image[lastPos].character); + compose.prepend(c); + //compose.compose(); ### FIXME! + image[lastPos].character = compose[0].unicode();*/ +} + +int Screen::scrolledLines() const +{ + return _scrolledLines; +} +int Screen::droppedLines() const +{ + return _droppedLines; +} +void Screen::resetDroppedLines() +{ + _droppedLines = 0; +} +void Screen::resetScrolledLines() +{ + _scrolledLines = 0; +} + +void Screen::scrollUp(int n) +{ + if (n == 0) n = 1; // Default + if (_topMargin == 0) addHistLine(); // history.history + scrollUp(_topMargin, n); +} + +QRect Screen::lastScrolledRegion() const +{ + return _lastScrolledRegion; +} + +void Screen::scrollUp(int from, int n) +{ + if (n <= 0) + return; + if (from > _bottomMargin) + return; + if (from + n > _bottomMargin) + n = _bottomMargin + 1 - from; + + _scrolledLines -= n; + _lastScrolledRegion = QRect(0,_topMargin,columns-1,(_bottomMargin-_topMargin)); + + //FIXME: make sure `topMargin', `bottomMargin', `from', `n' is in bounds. + moveImage(loc(0,from),loc(0,from+n),loc(columns,_bottomMargin)); + clearImage(loc(0,_bottomMargin-n+1),loc(columns-1,_bottomMargin),' '); +} + +void Screen::scrollDown(int n) +{ + if (n == 0) n = 1; // Default + scrollDown(_topMargin, n); +} + +void Screen::scrollDown(int from, int n) +{ + _scrolledLines += n; + + //FIXME: make sure `topMargin', `bottomMargin', `from', `n' is in bounds. + if (n <= 0) + return; + if (from > _bottomMargin) + return; + if (from + n > _bottomMargin) + n = _bottomMargin - from; + moveImage(loc(0,from+n),loc(0,from),loc(columns-1,_bottomMargin-n)); + clearImage(loc(0,from),loc(columns-1,from+n-1),' '); +} + +void Screen::setCursorYX(int y, int x) +{ + setCursorY(y); setCursorX(x); +} + +void Screen::setCursorX(int x) +{ + if (x == 0) x = 1; // Default + x -= 1; // Adjust + cuX = qMax(0,qMin(columns-1, x)); +} + +void Screen::setCursorY(int y) +{ + if (y == 0) y = 1; // Default + y -= 1; // Adjust + cuY = qMax(0,qMin(lines -1, y + (getMode(MODE_Origin) ? _topMargin : 0) )); +} + +void Screen::home() +{ + cuX = 0; + cuY = 0; +} + +void Screen::toStartOfLine() +{ + cuX = 0; +} + +int Screen::getCursorX() const +{ + return cuX; +} + +int Screen::getCursorY() const +{ + return cuY; +} + +void Screen::clearImage(int loca, int loce, char c) +{ + int scr_TL=loc(0,history->getLines()); + //FIXME: check positions + + //Clear entire selection if it overlaps region to be moved... + if ( (selBottomRight > (loca+scr_TL) )&&(selTopLeft < (loce+scr_TL)) ) + { + clearSelection(); + } + + int topLine = loca/columns; + int bottomLine = loce/columns; + + Character clearCh(c,currentForeground,currentBackground,DEFAULT_RENDITION); + + //if the character being used to clear the area is the same as the + //default character, the affected lines can simply be shrunk. + bool isDefaultCh = (clearCh == Character()); + + for (int y=topLine;y<=bottomLine;y++) + { + lineProperties[y] = 0; + + int endCol = ( y == bottomLine) ? loce%columns : columns-1; + int startCol = ( y == topLine ) ? loca%columns : 0; + + QVector& line = screenLines[y]; + + if ( isDefaultCh && endCol == columns-1 ) + { + line.resize(startCol); + } + else + { + if (line.size() < endCol + 1) + line.resize(endCol+1); + + Character* data = line.data(); + for (int i=startCol;i<=endCol;i++) + data[i]=clearCh; + } + } +} + +void Screen::moveImage(int dest, int sourceBegin, int sourceEnd) +{ + Q_ASSERT( sourceBegin <= sourceEnd ); + + int lines=(sourceEnd-sourceBegin)/columns; + + //move screen image and line properties: + //the source and destination areas of the image may overlap, + //so it matters that we do the copy in the right order - + //forwards if dest < sourceBegin or backwards otherwise. + //(search the web for 'memmove implementation' for details) + if (dest < sourceBegin) + { + for (int i=0;i<=lines;i++) + { + screenLines[ (dest/columns)+i ] = screenLines[ (sourceBegin/columns)+i ]; + lineProperties[(dest/columns)+i]=lineProperties[(sourceBegin/columns)+i]; + } + } + else + { + for (int i=lines;i>=0;i--) + { + screenLines[ (dest/columns)+i ] = screenLines[ (sourceBegin/columns)+i ]; + lineProperties[(dest/columns)+i]=lineProperties[(sourceBegin/columns)+i]; + } + } + + if (lastPos != -1) + { + int diff = dest - sourceBegin; // Scroll by this amount + lastPos += diff; + if ((lastPos < 0) || (lastPos >= (lines*columns))) + lastPos = -1; + } + + // Adjust selection to follow scroll. + if (selBegin != -1) + { + bool beginIsTL = (selBegin == selTopLeft); + int diff = dest - sourceBegin; // Scroll by this amount + int scr_TL=loc(0,history->getLines()); + int srca = sourceBegin+scr_TL; // Translate index from screen to global + int srce = sourceEnd+scr_TL; // Translate index from screen to global + int desta = srca+diff; + int deste = srce+diff; + + if ((selTopLeft >= srca) && (selTopLeft <= srce)) + selTopLeft += diff; + else if ((selTopLeft >= desta) && (selTopLeft <= deste)) + selBottomRight = -1; // Clear selection (see below) + + if ((selBottomRight >= srca) && (selBottomRight <= srce)) + selBottomRight += diff; + else if ((selBottomRight >= desta) && (selBottomRight <= deste)) + selBottomRight = -1; // Clear selection (see below) + + if (selBottomRight < 0) + { + clearSelection(); + } + else + { + if (selTopLeft < 0) + selTopLeft = 0; + } + + if (beginIsTL) + selBegin = selTopLeft; + else + selBegin = selBottomRight; + } +} + +void Screen::clearToEndOfScreen() +{ + clearImage(loc(cuX,cuY),loc(columns-1,lines-1),' '); +} + +void Screen::clearToBeginOfScreen() +{ + clearImage(loc(0,0),loc(cuX,cuY),' '); +} + +/******** Add by ut001000 renfeixiang 2020-07-16:新增 一个清理全屏数据,并设置到起点的函数,不影响其它功能 Begin***************/ +//void Screen::clearAllScreen() +//{ +// clearImage(loc(0, 0), loc(columns-1, lines-1), ' '); +// cuX = 0; +// cuY = 0; +//} +/******** Add by ut001000 renfeixiang 2020-07-16:新增 End***************/ + +void Screen::clearEntireScreen() +{ + // Add entire screen to history + for (int i = 0; i < (lines-1); i++) + { + addHistLine(); scrollUp(0,1); + } + + clearImage(loc(0,0),loc(columns-1,lines-1),' '); +} + +/*! fill screen with 'E' + This is to aid screen alignment + */ + +void Screen::helpAlign() +{ + clearImage(loc(0,0),loc(columns-1,lines-1),'E'); +} + +void Screen::clearToEndOfLine() +{ + clearImage(loc(cuX,cuY),loc(columns-1,cuY),' '); +} + +void Screen::clearToBeginOfLine() +{ + clearImage(loc(0,cuY),loc(cuX,cuY),' '); +} + +void Screen::clearEntireLine() +{ + clearImage(loc(0,cuY),loc(columns-1,cuY),' '); +} + +void Screen::setRendition(int re) +{ + currentRendition |= re; + updateEffectiveRendition(); +} + +void Screen::resetRendition(int re) +{ + currentRendition &= ~re; + updateEffectiveRendition(); +} + +void Screen::setDefaultRendition() +{ + setForeColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR); + setBackColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR); + currentRendition = DEFAULT_RENDITION; + updateEffectiveRendition(); +} + +void Screen::setForeColor(int space, int color) +{ + currentForeground = CharacterColor(space, color); + + if ( currentForeground.isValid() ) + updateEffectiveRendition(); + else + setForeColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR); +} + +void Screen::setBackColor(int space, int color) +{ + currentBackground = CharacterColor(space, color); + + if ( currentBackground.isValid() ) + updateEffectiveRendition(); + else + setBackColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR); +} + +void Screen::clearSelection() +{ + selBottomRight = -1; + selTopLeft = -1; + selBegin = -1; +} + +void Screen::getSelectionStart(int& column , int& line) const +{ + if ( selTopLeft != -1 ) + { + column = selTopLeft % columns; + line = selTopLeft / columns; + } + else + { + column = cuX + getHistLines(); + line = cuY + getHistLines(); + } +} +void Screen::getSelectionEnd(int& column , int& line) const +{ + if ( selBottomRight != -1 ) + { + column = selBottomRight % columns; + line = selBottomRight / columns; + } + else + { + column = cuX + getHistLines(); + line = cuY + getHistLines(); + } +} +void Screen::setSelectionStart(const int x, const int y, const bool mode) +{ + selBegin = loc(x,y); + /* FIXME, HACK to correct for x too far to the right... */ + if (x == columns) selBegin--; + + selBottomRight = selBegin; + selTopLeft = selBegin; + blockSelectionMode = mode; +} + +void Screen::setSelectionEnd( const int x, const int y) +{ + if (selBegin == -1) + return; + + int endPos = loc(x,y); + + if (endPos < selBegin) + { + selTopLeft = endPos; + selBottomRight = selBegin; + } + else + { + /* FIXME, HACK to correct for x too far to the right... */ + if (x == columns) + endPos--; + + selTopLeft = selBegin; + selBottomRight = endPos; + } + + // Normalize the selection in column mode + if (blockSelectionMode) + { + int topRow = selTopLeft / columns; + int topColumn = selTopLeft % columns; + int bottomRow = selBottomRight / columns; + int bottomColumn = selBottomRight % columns; + + selTopLeft = loc(qMin(topColumn,bottomColumn),topRow); + selBottomRight = loc(qMax(topColumn,bottomColumn),bottomRow); + } +} +/******************************************************************** + 1. @函数: setSelectionAll + 2. @作者: 王培利 + 3. @日期: 2020-02-13 + 4. @说明: 屏幕全选功能 +********************************************************************/ +void Screen::setSelectionAll() +{ + selBegin = 0; + selTopLeft = 0; + int endPos = (getHistLines() + getCursorY() + 1) * columns - 1; + selBottomRight = endPos; +} + +bool Screen::isSelected(const int x, const int y) const +{ + bool columnInSelection = true; + if (blockSelectionMode) + { + columnInSelection = x >= (selTopLeft % columns) && + x <= (selBottomRight % columns); + } + + int pos = loc(x,y); + return pos >= selTopLeft && pos <= selBottomRight && columnInSelection; +} + +QString Screen::selectedText(const DecodingOptions options) const +{ + if (!isSelectionValid()) { + return QString(); + } + + return text(selTopLeft, selBottomRight, options); +} + +QString Screen::text(int startIndex, int endIndex, const DecodingOptions options) const +{ + QString result; + QTextStream stream(&result, QIODevice::ReadWrite); + + HTMLDecoder htmlDecoder; + PlainTextDecoder plainTextDecoder; + + TerminalCharacterDecoder *decoder; + if((options & ConvertToHtml) != 0U) { + decoder = &htmlDecoder; + } else { + decoder = &plainTextDecoder; + } + + decoder->begin(&stream); + writeToStream(decoder, startIndex, endIndex, options); + decoder->end(); + + return result; +} + +bool Screen::isSelectionValid() const +{ + return selTopLeft >= 0 && selBottomRight >= 0; +} + +void Screen::writeSelectionToStream(TerminalCharacterDecoder* decoder, const DecodingOptions options) const +{ + if (!isSelectionValid()) + return; + writeToStream(decoder,selTopLeft,selBottomRight,options); +} + +void Screen::writeToStream(TerminalCharacterDecoder* decoder, + int startIndex, + int endIndex, + const DecodingOptions options) const +{ + int top = startIndex / columns; + int left = startIndex % columns; + + int bottom = endIndex / columns; + int right = endIndex % columns; + + Q_ASSERT( top >= 0 && left >= 0 && bottom >= 0 && right >= 0 ); + + for (int y=top;y<=bottom;y++) + { + int start = 0; + if ( y == top || blockSelectionMode ) start = left; + + int count = -1; + if ( y == bottom || blockSelectionMode ) count = right - start + 1; + + const bool appendNewLine = ( y != bottom ); + int copied = copyLineToStream( y, + start, + count, + decoder, + appendNewLine, + options ); + + // if the selection goes beyond the end of the last line then + // append a new line character. + // + // this makes it possible to 'select' a trailing new line character after + // the text on a line. + if ( y == bottom && + copied < count ) + { + Character newLineChar('\n'); + decoder->decodeLine(&newLineChar,1,0); + } + } +} + +int Screen::getLineLength(const int line) const +{ + // determine if the line is in the history buffer or the screen image + const bool isInHistoryBuffer = line < history->getLines(); + + if (isInHistoryBuffer) { + return history->getLineLen(line); + } + + return columns; +} + +Character *Screen::getCharacterBuffer(const int size) +{ + // buffer to hold characters for decoding + // the buffer is static to avoid initializing every + // element on each call to copyLineToStream + // (which is unnecessary since all elements will be overwritten anyway) + static const int MAX_CHARS = 1024; + static QVector characterBuffer(MAX_CHARS); + + if (characterBuffer.count() < size) { + characterBuffer.resize(size); + } + + return characterBuffer.data(); +} + +int Screen::copyLineToStream(int line , + int start, + int count, + TerminalCharacterDecoder* decoder, + bool appendNewLine, + const DecodingOptions options) const +{ + const int lineLength = getLineLength(line); + // ensure that this method, can append space or 'eol' character to + // the selection + Character *characterBuffer = getCharacterBuffer((count > -1 ? count : lineLength - start) + 1); + LineProperty currentLineProperties = 0; + + // determine if the line is in the history buffer or the screen image + if (line < history->getLines()) { + // ensure that start position is before end of line + start = qBound(0, start, lineLength - 1); + + // retrieve line from history buffer. It is assumed + // that the history buffer does not store trailing white space + // at the end of the line, so it does not need to be trimmed here + if (count == -1) { + count = lineLength - start; + } else { + count = qMin(start + count, lineLength) - start; + } + + // safety checks + Q_ASSERT(start >= 0); + Q_ASSERT(count >= 0); + Q_ASSERT((start + count) <= history->getLineLen(line)); + + history->getCells(line, start, count, characterBuffer); + + if (history->isWrappedLine(line)) { + currentLineProperties |= LINE_WRAPPED; + } + } else { + if (count == -1) { + count = lineLength - start; + } + + Q_ASSERT(count >= 0); + + int screenLine = line - history->getLines(); + + Q_ASSERT(screenLine <= _screenLinesSize); + + screenLine = qMin(screenLine, _screenLinesSize); + + auto* data = screenLines[screenLine].data(); + int length = screenLines[screenLine].count(); + + // Don't remove end spaces in lines that wrap + if (options.testFlag(TrimTrailingWhitespace) && ((lineProperties[screenLine] & LINE_WRAPPED) == 0)) + { + // ignore trailing white space at the end of the line + while (length > 0 && QChar(data[length - 1].character).isSpace()) { + length--; + } + } + + //retrieve line from screen image + auto end = qMin(start + count, length); + if (start < end) { + std::copy(data + start, data + end, characterBuffer); + } + + // count cannot be any greater than length + count = qBound(0, count, length - start); + + Q_ASSERT(screenLine < lineProperties.count()); + currentLineProperties |= lineProperties[screenLine]; + } + + if (appendNewLine) { + if ((currentLineProperties & LINE_WRAPPED) != 0) { + // do nothing extra when this line is wrapped. + } else { + // When users ask not to preserve the linebreaks, they usually mean: + // `treat LINEBREAK as SPACE, thus joining multiple _lines into + // single line in the same way as 'J' does in VIM.` + characterBuffer[count] = options.testFlag(PreserveLineBreaks) ? Character('\n') : Character(' '); + count++; + } + } + + if ((options & TrimLeadingWhitespace) != 0U) { + int spacesCount = 0; + for (spacesCount = 0; spacesCount < count; spacesCount++) { + if (QChar::category(characterBuffer[spacesCount].character) != QChar::Category::Separator_Space) { + break; + } + } + + if (spacesCount >= count) { + return 0; + } + + std::copy(characterBuffer + spacesCount, characterBuffer + count, characterBuffer); + + count -= spacesCount; + } + + //decode line and write to text stream + decoder->decodeLine(characterBuffer, + count, currentLineProperties); + + return count; +} + +void Screen::writeLinesToStream(TerminalCharacterDecoder* decoder, int fromLine, int toLine) const +{ + writeToStream(decoder, loc(0,fromLine), loc(columns-1,toLine), PreserveLineBreaks); +} + +void Screen::fastAddHistLine() +{ + history->addCellsVector(screenLines[0]); + history->addLine((lineProperties[0] & LINE_WRAPPED) != 0); + + screenLines.pop_front(); + lineProperties.remove(0); +} + +void Screen::addHistLine() +{ + // add line to history buffer + // we have to take care about scrolling, too... + + if (hasScroll()) + { + int oldHistLines = history->getLines(); + + history->addCellsVector(screenLines[0]); + history->addLine( lineProperties[0] & LINE_WRAPPED ); + + int newHistLines = history->getLines(); + + bool beginIsTL = (selBegin == selTopLeft); + + // If the history is full, increment the count + // of dropped lines + if ( newHistLines == oldHistLines ) + _droppedLines++; + + // Adjust selection for the new point of reference + if (newHistLines > oldHistLines) + { + if (selBegin != -1) + { + selTopLeft += columns; + selBottomRight += columns; + } + } + + if (selBegin != -1) + { + // Scroll selection in history up + int top_BR = loc(0, 1+newHistLines); + + if (selTopLeft < top_BR) + selTopLeft -= columns; + + if (selBottomRight < top_BR) + selBottomRight -= columns; + + if (selBottomRight < 0) + clearSelection(); + else + { + if (selTopLeft < 0) + selTopLeft = 0; + } + + if (beginIsTL) + selBegin = selTopLeft; + else + selBegin = selBottomRight; + } + } + +} + +int Screen::getHistLines() const +{ + return history->getLines(); +} + +void Screen::setScroll(const HistoryType& t , bool copyPreviousScroll) +{ + clearSelection(); + + if ( copyPreviousScroll ) + history = t.scroll(history); + else + { + HistoryScroll* oldScroll = history; + history = t.scroll(nullptr); + delete oldScroll; + } +} + +bool Screen::hasScroll() const +{ + return history->hasScroll(); +} + +const HistoryType& Screen::getScroll() const +{ + return history->getType(); +} + +void Screen::setLineProperty(LineProperty property , bool enable) +{ + if ( enable ) + lineProperties[cuY] = (LineProperty)(lineProperties[cuY] | property); + else + lineProperties[cuY] = (LineProperty)(lineProperties[cuY] & ~property); +} +void Screen::fillWithDefaultChar(Character* dest, int count) +{ + for (int i=0;i + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef SCREEN_H +#define SCREEN_H + +// Qt +#include +#include +#include +#include +#include + +// Konsole +#include "Character.h" + +#define MODE_Origin 0 +#define MODE_Wrap 1 +#define MODE_Insert 2 +#define MODE_Screen 3 +#define MODE_Cursor 4 +#define MODE_NewLine 5 +#define MODE_AppScreen 6 +#define MODES_SCREEN 7 + +namespace Konsole +{ + +class TerminalCharacterDecoder; +class TerminalDisplay; +class HistoryType; +class HistoryScroll; + +/** + \brief An image of characters with associated attributes. + + The terminal emulation ( Emulation ) receives a serial stream of + characters from the program currently running in the terminal. + From this stream it creates an image of characters which is ultimately + rendered by the display widget ( TerminalDisplay ). Some types of emulation + may have more than one screen image. + + getImage() is used to retrieve the currently visible image + which is then used by the display widget to draw the output from the + terminal. + + The number of lines of output history which are kept in addition to the current + screen image depends on the history scroll being used to store the output. + The scroll is specified using setScroll() + The output history can be retrieved using writeToStream() + + The screen image has a selection associated with it, specified using + setSelectionStart() and setSelectionEnd(). The selected text can be retrieved + using selectedText(). When getImage() is used to retrieve the visible image, + characters which are part of the selection have their colours inverted. +*/ +class Screen +{ +public: + /* PlainText: Return plain text (default) + * ConvertToHtml: Specifies if returned text should have HTML tags. + * PreserveLineBreaks: Specifies whether new line characters should be + * inserted into the returned text at the end of each terminal line. + * TrimLeadingWhitespace: Specifies whether leading spaces should be + * trimmed in the returned text. + * TrimTrailingWhitespace: Specifies whether trailing spaces should be + * trimmed in the returned text. + */ + enum DecodingOption { + PlainText = 0x0, + ConvertToHtml = 0x1, + PreserveLineBreaks = 0x2, + TrimLeadingWhitespace = 0x4, + TrimTrailingWhitespace = 0x8 + }; + Q_DECLARE_FLAGS(DecodingOptions, DecodingOption) + + /** Construct a new screen image of size @p lines by @p columns. */ + Screen(int lines, int columns); + ~Screen(); + + // VT100/2 Operations + // Cursor Movement + + /** + * Move the cursor up by @p n lines. The cursor will stop at the + * top margin. + */ + void cursorUp(int n); + /** + * Move the cursor down by @p n lines. The cursor will stop at the + * bottom margin. + */ + void cursorDown(int n); + /** + * Move the cursor to the left by @p n columns. + * The cursor will stop at the first column. + */ + void cursorLeft(int n); + /** + * Move the cursor to the right by @p n columns. + * The cursor will stop at the right-most column. + */ + void cursorRight(int n); + /** Position the cursor on line @p y. */ + void setCursorY(int y); + /** Position the cursor at column @p x. */ + void setCursorX(int x); + /** Position the cursor at line @p y, column @p x. */ + void setCursorYX(int y, int x); + /** + * Sets the margins for scrolling the screen. + * + * @param topLine The top line of the new scrolling margin. + * @param bottomLine The bottom line of the new scrolling margin. + */ + void setMargins(int topLine , int bottomLine); + /** Returns the top line of the scrolling region. */ + int topMargin() const; + /** Returns the bottom line of the scrolling region. */ + int bottomMargin() const; + + /** + * Resets the scrolling margins back to the top and bottom lines + * of the screen. + */ + void setDefaultMargins(); + + /** + * Moves the cursor down one line, if the MODE_NewLine mode + * flag is enabled then the cursor is returned to the leftmost + * column first. + * + * Equivalent to NextLine() if the MODE_NewLine flag is set + * or index() otherwise. + */ + void newLine(); + /** + * Moves the cursor down one line and positions it at the beginning + * of the line. Equivalent to calling Return() followed by index() + */ + void nextLine(); + + /** + * Move the cursor down one line. If the cursor is on the bottom + * line of the scrolling region (as returned by bottomMargin()) the + * scrolling region is scrolled up by one line instead. + */ + void index(); + /** + * Move the cursor up one line. If the cursor is on the top line + * of the scrolling region (as returned by topMargin()) the scrolling + * region is scrolled down by one line instead. + */ + void reverseIndex(); + + /** + * Scroll the scrolling region of the screen up by @p n lines. + * The scrolling region is initially the whole screen, but can be changed + * using setMargins() + */ + void scrollUp(int n); + /** + * Scroll the scrolling region of the screen down by @p n lines. + * The scrolling region is initially the whole screen, but can be changed + * using setMargins() + */ + void scrollDown(int n); + /** + * Moves the cursor to the beginning of the current line. + * Equivalent to setCursorX(0) + */ + void toStartOfLine(); + /** + * Moves the cursor one column to the left and erases the character + * at the new cursor position. + */ + void backspace(); + /** Moves the cursor @p n tab-stops to the right. */ + void tab(int n = 1); + /** Moves the cursor @p n tab-stops to the left. */ + void backtab(int n); + + // Editing + + /** + * Erase @p n characters beginning from the current cursor position. + * This is equivalent to over-writing @p n characters starting with the current + * cursor position with spaces. + * If @p n is 0 then one character is erased. + */ + void eraseChars(int n); + /** + * Delete @p n characters beginning from the current cursor position. + * If @p n is 0 then one character is deleted. + */ + void deleteChars(int n); + /** + * Insert @p n blank characters beginning from the current cursor position. + * The position of the cursor is not altered. + * If @p n is 0 then one character is inserted. + */ + void insertChars(int n); + /** + * Repeat the preceeding graphic character @count times, including SPACE. + * If @count is 0 then the character is repeated once. + */ + void repeatChars(int count); + /** + * Removes @p n lines beginning from the current cursor position. + * The position of the cursor is not altered. + * If @p n is 0 then one line is removed. + */ + void deleteLines(int n); + /** + * Inserts @p lines beginning from the current cursor position. + * The position of the cursor is not altered. + * If @p n is 0 then one line is inserted. + */ + void insertLines(int n); + /** Clears all the tab stops. */ + void clearTabStops(); + /** Sets or removes a tab stop at the cursor's current column. */ + void changeTabStop(bool set); + + /** Resets (clears) the specified screen @p mode. */ + void resetMode(int mode); + /** Sets (enables) the specified screen @p mode. */ + void setMode(int mode); + /** + * Saves the state of the specified screen @p mode. It can be restored + * using restoreMode() + */ + void saveMode(int mode); + /** Restores the state of a screen @p mode saved by calling saveMode() */ + void restoreMode(int mode); + /** Returns whether the specified screen @p mode is enabled or not .*/ + bool getMode(int mode) const; + + /** + * Saves the current position and appearance (text color and style) of the cursor. + * It can be restored by calling restoreCursor() + */ + void saveCursor(); + /** Restores the position and appearance of the cursor. See saveCursor() */ + void restoreCursor(); + + /** Clear the whole screen, moving the current screen contents into the history first. */ + void clearEntireScreen(); + /** + * Clear the area of the screen from the current cursor position to the end of + * the screen. + */ + void clearToEndOfScreen(); + /** + * Clear the area of the screen from the current cursor position to the start + * of the screen. + */ + void clearToBeginOfScreen(); + /** Clears the whole of the line on which the cursor is currently positioned. */ + void clearEntireLine(); + /** Clears from the current cursor position to the end of the line. */ + void clearToEndOfLine(); + /** Clears from the current cursor position to the beginning of the line. */ + void clearToBeginOfLine(); + + /** Fills the entire screen with the letter 'E' */ + void helpAlign(); + + /** + * Enables the given @p rendition flag. Rendition flags control the appearance + * of characters on the screen. + * + * @see Character::rendition + */ + void setRendition(int rendition); + /** + * Disables the given @p rendition flag. Rendition flags control the appearance + * of characters on the screen. + * + * @see Character::rendition + */ + void resetRendition(int rendition); + + /** + * Sets the cursor's foreground color. + * @param space The color space used by the @p color argument + * @param color The new foreground color. The meaning of this depends on + * the color @p space used. + * + * @see CharacterColor + */ + void setForeColor(int space, int color); + /** + * Sets the cursor's background color. + * @param space The color space used by the @p color argumnet. + * @param color The new background color. The meaning of this depends on + * the color @p space used. + * + * @see CharacterColor + */ + void setBackColor(int space, int color); + /** + * Resets the cursor's color back to the default and sets the + * character's rendition flags back to the default settings. + */ + void setDefaultRendition(); + + /** Returns the column which the cursor is positioned at. */ + int getCursorX() const; + /** Returns the line which the cursor is positioned on. */ + int getCursorY() const; + + /** Clear the entire screen and move the cursor to the home position. + * Equivalent to calling clearEntireScreen() followed by home(). + */ + void clear(); + /** + * Sets the position of the cursor to the 'home' position at the top-left + * corner of the screen (0,0) + */ + void home(); + /** + * Resets the state of the screen. This resets the various screen modes + * back to their default states. The cursor style and colors are reset + * (as if setDefaultRendition() had been called) + * + *
    + *
  • Line wrapping is enabled.
  • + *
  • Origin mode is disabled.
  • + *
  • Insert mode is disabled.
  • + *
  • Cursor mode is enabled. TODO Document me
  • + *
  • Screen mode is disabled. TODO Document me
  • + *
  • New line mode is disabled. TODO Document me
  • + *
+ * + * If @p clearScreen is true then the screen contents are erased entirely, + * otherwise they are unaltered. + */ + void reset(bool clearScreen = true); + + /** + * Displays a new character at the current cursor position. + * + * If the cursor is currently positioned at the right-edge of the screen and + * line wrapping is enabled then the character is added at the start of a new + * line below the current one. + * + * If the MODE_Insert screen mode is currently enabled then the character + * is inserted at the current cursor position, otherwise it will replace the + * character already at the current cursor position. + */ + void displayCharacter(uint c); + + // Do composition with last shown character FIXME: Not implemented yet for KDE 4 + void compose(const QString& compose); + + /** + * Resizes the image to a new fixed size of @p new_lines by @p new_columns. + * In the case that @p new_columns is smaller than the current number of columns, + * existing lines are not truncated. This prevents characters from being lost + * if the terminal display is resized smaller and then larger again. + * + * The top and bottom margins are reset to the top and bottom of the new + * screen size. Tab stops are also reset and the current selection is + * cleared. + */ + void resizeImage(int new_lines, int new_columns); + + /** + * Returns the current screen image. + * The result is an array of Characters of size [getLines()][getColumns()] which + * must be freed by the caller after use. + * + * @param dest Buffer to copy the characters into + * @param size Size of @p dest in Characters + * @param startLine Index of first line to copy + * @param endLine Index of last line to copy + */ + void getImage( Character* dest , int size , int startLine , int endLine ) const; + + /** + * Returns the additional attributes associated with lines in the image. + * The most important attribute is LINE_WRAPPED which specifies that the + * line is wrapped, + * other attributes control the size of characters in the line. + */ + QVector getLineProperties( int startLine , int endLine ) const; + + + /** Return the number of lines. */ + int getLines() const + { return lines; } + /** Return the number of columns. */ + int getColumns() const + { return columns; } + /** Return the number of lines in the history buffer. */ + int getHistLines() const; + /** + * Sets the type of storage used to keep lines in the history. + * If @p copyPreviousScroll is true then the contents of the previous + * history buffer are copied into the new scroll. + */ + void setScroll(const HistoryType& , bool copyPreviousScroll = true); + /** Returns the type of storage used to keep lines in the history. */ + const HistoryType& getScroll() const; + /** + * Returns true if this screen keeps lines that are scrolled off the screen + * in a history buffer. + */ + bool hasScroll() const; + + /** + * Sets the start of the selection. + * + * @param column The column index of the first character in the selection. + * @param line The line index of the first character in the selection. + * @param blockSelectionMode True if the selection is in column mode. + */ + void setSelectionStart(const int column, const int line, const bool blockSelectionMode); + + /** + * Sets the end of the current selection. + * + * @param column The column index of the last character in the selection. + * @param line The line index of the last character in the selection. + */ + void setSelectionEnd(const int column, const int line); + + /******** Modify by n014361 wangpeili 2020-02-13: 新增屏幕全选功能***********×****/ + void setSelectionAll(); + /***************** Modify by n014361 End *************************/ + + /******** Add by ut001000 renfeixiang 2020-07-16:新增 一个清理全屏数据,并设置到起点的函数,不影响其它功能 Begin***************/ +// void clearAllScreen(); + /******** Add by ut001000 renfeixiang 2020-07-16:新增 End***************/ + + /** + * Retrieves the start of the selection or the cursor position if there + * is no selection. + */ + void getSelectionStart(int& column , int& line) const; + + /** + * Retrieves the end of the selection or the cursor position if there + * is no selection. + */ + void getSelectionEnd(int& column , int& line) const; + + /** Clears the current selection */ + void clearSelection(); + + /** + * Returns true if the character at (@p column, @p line) is part of the + * current selection. + */ + bool isSelected(const int column,const int line) const; + + /** + * Convenience method. Returns the currently selected text. + * @param preserveLineBreaks Specifies whether new line characters should + * be inserted into the returned text at the end of each terminal line. + */ + QString selectedText(const DecodingOptions options) const; + + /** + * Convenience method. Returns the text between two indices. + * @param startIndex Specifies the starting text index + * @param endIndex Specifies the ending text index + * @param options See Screen::DecodingOptions + */ + QString text(int startIndex, int endIndex, const DecodingOptions options) const; + + /** + * Copies part of the output to a stream. + * + * @param decoder A decoder which converts terminal characters into text + * @param fromLine The first line in the history to retrieve + * @param toLine The last line in the history to retrieve + */ + void writeLinesToStream(TerminalCharacterDecoder* decoder, int fromLine, int toLine) const; + + /** + * Copies the selected characters, set using @see setSelBeginXY and @see setSelExtentXY + * into a stream. + * + * @param decoder A decoder which converts terminal characters into text. + * PlainTextDecoder is the most commonly used decoder which converts characters + * into plain text with no formatting. + * @param preserveLineBreaks Specifies whether new line characters should + * be inserted into the returned text at the end of each terminal line. + */ + void writeSelectionToStream(TerminalCharacterDecoder* decoder, const DecodingOptions options) const; + + /** + * Checks if the text between from and to is inside the current + * selection. If this is the case, the selection is cleared. The + * from and to are coordinates in the current viewable window. + * The loc(x,y) macro can be used to generate these values from a + * column,line pair. + * + * @param from The start of the area to check. + * @param to The end of the area to check + */ + void checkSelection(int from, int to); + + /** + * Sets or clears an attribute of the current line. + * + * @param property The attribute to set or clear + * Possible properties are: + * LINE_WRAPPED: Specifies that the line is wrapped. + * LINE_DOUBLEWIDTH: Specifies that the characters in the current line + * should be double the normal width. + * LINE_DOUBLEHEIGHT:Specifies that the characters in the current line + * should be double the normal height. + * Double-height lines are formed of two lines containing the same characters, + * with both having the LINE_DOUBLEHEIGHT attribute. + * This allows other parts of the code to work on the + * assumption that all lines are the same height. + * + * @param enable true to apply the attribute to the current line or false to remove it + */ + void setLineProperty(LineProperty property , bool enable); + + /** + * Returns the number of lines that the image has been scrolled up or down by, + * since the last call to resetScrolledLines(). + * + * a positive return value indicates that the image has been scrolled up, + * a negative return value indicates that the image has been scrolled down. + */ + int scrolledLines() const; + + /** + * Returns the region of the image which was last scrolled. + * + * This is the area of the image from the top margin to the + * bottom margin when the last scroll occurred. + */ + QRect lastScrolledRegion() const; + + /** + * Resets the count of the number of lines that the image has been scrolled up or down by, + * see scrolledLines() + */ + void resetScrolledLines(); + + /** + * Returns the number of lines of output which have been + * dropped from the history since the last call + * to resetDroppedLines() + * + * If the history is not unlimited then it will drop + * the oldest lines of output if new lines are added when + * it is full. + */ + int droppedLines() const; + + /** + * Resets the count of the number of lines dropped from + * the history. + */ + void resetDroppedLines(); + + /** + * Fills the buffer @p dest with @p count instances of the default (ie. blank) + * Character style. + */ + static void fillWithDefaultChar(Character* dest, int count); + + void setCurrentTerminalDisplay(TerminalDisplay *display) + { + _currentTerminalDisplay = display; + } + + TerminalDisplay *currentTerminalDisplay() + { + return _currentTerminalDisplay; + } + + QSet usedExtendedChars() const + { + QSet result; + for (int i = 0; i < lines; ++i) { + const ImageLine &il = screenLines[i]; + for (int j = 0; j < il.length(); ++j) { + if (il[j].rendition & RE_EXTENDED_CHAR) { + result << il[j].character; + } + } + } + return result; + } + + // Return the total number of lines before resize (fix scroll glitch) + int getOldTotalLines(); + + // Return if it was a resize signal (fix scroll glitch) + bool isResize(); + + // Set reflow condition + void setReflowLines(bool enable); + + // 设置sessionId + void setSessionId(int sessionId); + +private: + Screen(const Screen &) = delete; + Screen &operator=(const Screen &) = delete; + + //copies a line of text from the screen or history into a stream using a + //specified character decoder. Returns the number of lines actually copied, + //which may be less than 'count' if (start+count) is more than the number of characters on + //the line + // + //line - the line number to copy, from 0 (the earliest line in the history) up to + // history->getLines() + lines - 1 + //start - the first column on the line to copy + //count - the number of characters on the line to copy + //decoder - a decoder which converts terminal characters (an Character array) into text + //appendNewLine - if true a new line character (\n) is appended to the end of the line + int copyLineToStream(int line, + int start, + int count, + TerminalCharacterDecoder* decoder, + bool appendNewLine, + const DecodingOptions options) const; + + //fills a section of the screen image with the character 'c' + //the parameters are specified as offsets from the start of the screen image. + //the loc(x,y) macro can be used to generate these values from a column,line pair. + void clearImage(int loca, int loce, char c); + + //move screen image between 'sourceBegin' and 'sourceEnd' to 'dest'. + //the parameters are specified as offsets from the start of the screen image. + //the loc(x,y) macro can be used to generate these values from a column,line pair. + // + //NOTE: moveImage() can only move whole lines + void moveImage(int dest, int sourceBegin, int sourceEnd); + // scroll up 'i' lines in current region, clearing the bottom 'i' lines + void scrollUp(int from, int i); + // scroll down 'i' lines in current region, clearing the top 'i' lines + void scrollDown(int from, int i); + + void addHistLine(); + // add lines from screen to history and remove from screen the added lines (used to resize lines and columns) + void fastAddHistLine(); + + void initTabStops(); + + void updateEffectiveRendition(); + void reverseRendition(Character& p) const; + + bool isSelectionValid() const; + // copies text from 'startIndex' to 'endIndex' to a stream + // startIndex and endIndex are positions generated using the loc(x,y) macro + void writeToStream(TerminalCharacterDecoder* decoder, int startIndex, + int endIndex, const DecodingOptions options) const; + // copies 'count' lines from the screen buffer into 'dest', + // starting from 'startLine', where 0 is the first line in the screen buffer + void copyFromScreen(Character* dest, int startLine, int count) const; + // copies 'count' lines from the history buffer into 'dest', + // starting from 'startLine', where 0 is the first line in the history + void copyFromHistory(Character* dest, int startLine, int count) const; + + // returns a buffer that can hold at most 'count' characters, + // where the number of reallocations and object reinitializations + // should be as minimal as possible + static Character *getCharacterBuffer(const int size); + + // Get the cursor line after checking if its app mode or not + int getCursorLine(); + // Set the cursor line after checking if its app mode or not + void setCursorLine (int newLine); + + int getLineLength(const int line) const; + + // screen image ---------------- + int lines; + int columns; + + typedef QVector ImageLine; // [0..columns] + QVector screenLines; // [lines] + int _screenLinesSize; // _screenLines.size() + + int _scrolledLines; + QRect _lastScrolledRegion; + + int _droppedLines; + + int _oldTotalLines; + bool _isResize; + bool _enableReflowLines = true;//自动换行功能,默认为true + + QVarLengthArray lineProperties; + + // history buffer --------------- + HistoryScroll* history; + + // cursor location + int cuX; + int cuY; + + // cursor color and rendition info + CharacterColor currentForeground; + CharacterColor currentBackground; + quint8 currentRendition; + + // margins ---------------- + int _topMargin; + int _bottomMargin; + + // states ---------------- + bool currentModes[MODES_SCREEN]; + bool savedModes[MODES_SCREEN]; + + // ---------------------------- + + QBitArray tabStops; + + // selection ------------------- + int selBegin; // The first location selected. + int selTopLeft; // TopLeft Location. + int selBottomRight; // Bottom Right Location. + bool blockSelectionMode; // Column selection mode + + // effective colors and rendition ------------ + CharacterColor effectiveForeground; // These are derived from + CharacterColor effectiveBackground; // the cu_* variables above + quint8 effectiveRendition; // to speed up operation + + class SavedState + { + public: + SavedState() + : cursorColumn(0),cursorLine(0),rendition(0) {} + + int cursorColumn; + int cursorLine; + quint8 rendition; + CharacterColor foreground; + CharacterColor background; + }; + SavedState savedState; + + // last position where we added a character + int lastPos; + + // used in REP (repeating char) + quint32 lastDrawnChar; + + static Character defaultChar; + + //when we handle scroll commands, we need to know which screenwindow will scroll + TerminalDisplay *_currentTerminalDisplay; + + //用于标识Session + int _sessionId; +}; + +} + +#endif // SCREEN_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ScreenWindow.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ScreenWindow.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ScreenWindow.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ScreenWindow.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,306 @@ +/* + Copyright (C) 2007 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "ScreenWindow.h" + +// Qt +#include + +using namespace Konsole; + +ScreenWindow::ScreenWindow(QObject* parent) + : QObject(parent) + , _screen(nullptr) + , _windowBuffer(nullptr) + , _windowBufferSize(0) + , _bufferNeedsUpdate(true) + , _windowLines(1) + , _currentLine(0) + , _trackOutput(true) + , _scrollCount(0) +{ +} +ScreenWindow::~ScreenWindow() +{ + delete[] _windowBuffer; +} +void ScreenWindow::setScreen(Screen* screen) +{ + Q_ASSERT( screen ); + + _screen = screen; +} + +Screen* ScreenWindow::screen() const +{ + return _screen; +} + +Character* ScreenWindow::getImage() +{ + // reallocate internal buffer if the window size has changed + int size = windowLines() * windowColumns(); + if (_windowBuffer == nullptr || _windowBufferSize != size) + { + delete[] _windowBuffer; + _windowBufferSize = size; + _windowBuffer = new Character[size]; + _bufferNeedsUpdate = true; + } + + if (!_bufferNeedsUpdate) + return _windowBuffer; + + _screen->getImage(_windowBuffer,size, + currentLine(),endWindowLine()); + + // this window may look beyond the end of the screen, in which + // case there will be an unused area which needs to be filled + // with blank characters + fillUnusedArea(); + + _bufferNeedsUpdate = false; + return _windowBuffer; +} + +void ScreenWindow::fillUnusedArea() +{ + int screenEndLine = _screen->getHistLines() + _screen->getLines() - 1; + int windowEndLine = currentLine() + windowLines() - 1; + + int unusedLines = windowEndLine - screenEndLine; + int charsToFill = unusedLines * windowColumns(); + + Screen::fillWithDefaultChar(_windowBuffer + _windowBufferSize - charsToFill,charsToFill); +} + +// return the index of the line at the end of this window, or if this window +// goes beyond the end of the screen, the index of the line at the end +// of the screen. +// +// when passing a line number to a Screen method, the line number should +// never be more than endWindowLine() +// +int ScreenWindow::endWindowLine() const +{ + return qMin(currentLine() + windowLines() - 1, + lineCount() - 1); +} +QVector ScreenWindow::getLineProperties() +{ + QVector result = _screen->getLineProperties(currentLine(),endWindowLine()); + + if (result.count() != windowLines()) + result.resize(windowLines()); + + return result; +} + +QString ScreenWindow::selectedText( const Screen::DecodingOptions options ) const +{ + return _screen->selectedText( options ); +} + +void ScreenWindow::getSelectionStart( int& column , int& line ) +{ + _screen->getSelectionStart(column,line); + line -= currentLine(); +} +void ScreenWindow::getSelectionEnd( int& column , int& line ) +{ + _screen->getSelectionEnd(column,line); + line -= currentLine(); +} +void ScreenWindow::setSelectionStart( int column , int line , bool columnMode ) +{ + _screen->setSelectionStart( column , qMin(line + currentLine(),endWindowLine()) , columnMode); + + _bufferNeedsUpdate = true; + emit selectionChanged(); +} + +void ScreenWindow::setSelectionEnd( int column , int line ) +{ + _screen->setSelectionEnd( column , qMin(line + currentLine(),endWindowLine()) ); + + _bufferNeedsUpdate = true; + emit selectionChanged(); +} +/******************************************************************** + 1. @函数: setSelectionAll + 2. @作者: 王培利 + 3. @日期: 2020-02-13 + 4. @说明: 屏幕全选功能 +********************************************************************/ +void ScreenWindow::setSelectionAll() +{ + _screen->setSelectionAll(); + + _bufferNeedsUpdate = true; + emit selectionChanged(); +} + +bool ScreenWindow::isSelected(int column, int line) +{ + return _screen->isSelected(column, qMin(line + currentLine(), endWindowLine())); +} + +void ScreenWindow::clearSelection() +{ + _screen->clearSelection(); + + emit selectionChanged(); + emit selectionCleared(); +} + +void ScreenWindow::setWindowLines(int lines) +{ + Q_ASSERT(lines > 0); + _windowLines = lines; +} +int ScreenWindow::windowLines() const +{ + return _windowLines; +} + +int ScreenWindow::windowColumns() const +{ + return _screen->getColumns(); +} + +int ScreenWindow::lineCount() const +{ + return _screen->getHistLines() + _screen->getLines(); +} + +int ScreenWindow::columnCount() const +{ + return _screen->getColumns(); +} + +QPoint ScreenWindow::cursorPosition() const +{ + QPoint position; + + position.setX( _screen->getCursorX() ); + position.setY( _screen->getCursorY() ); + + return position; +} + +int ScreenWindow::currentLine() const +{ + return qBound(0,_currentLine,lineCount()-windowLines()); +} + +void ScreenWindow::scrollBy( RelativeScrollMode mode , int amount ) +{ + if ( mode == ScrollLines ) + { + scrollTo( currentLine() + amount ); + } + else if ( mode == ScrollPages ) + { + scrollTo( currentLine() + amount * ( windowLines() / 2 ) ); + } +} + +bool ScreenWindow::atEndOfOutput() const +{ + return currentLine() == (lineCount()-windowLines()); +} + +void ScreenWindow::scrollTo( int line ) +{ + int maxCurrentLineNumber = lineCount() - windowLines(); + line = qBound(0,line,maxCurrentLineNumber); + + const int delta = line - _currentLine; + _currentLine = line; + + // keep track of number of lines scrolled by, + // this can be reset by calling resetScrollCount() + _scrollCount += delta; + + _bufferNeedsUpdate = true; + + emit scrolled(_currentLine); +} + +void ScreenWindow::setTrackOutput(bool trackOutput) +{ + _trackOutput = trackOutput; +} + +bool ScreenWindow::trackOutput() const +{ + return _trackOutput; +} + +int ScreenWindow::scrollCount() const +{ + return _scrollCount; +} + +void ScreenWindow::resetScrollCount() +{ + _scrollCount = 0; +} + +QRect ScreenWindow::scrollRegion() const +{ + bool equalToScreenSize = windowLines() == _screen->getLines(); + + if ( atEndOfOutput() && equalToScreenSize ) + return _screen->lastScrolledRegion(); + else + return {0,0,windowColumns(),windowLines()}; +} + +void ScreenWindow::notifyOutputChanged() +{ + // move window to the bottom of the screen and update scroll count + // if this window is currently tracking the bottom of the screen + if ( _trackOutput ) + { + _scrollCount -= _screen->scrolledLines(); + _currentLine = qMax(0,_screen->getHistLines() - (windowLines()-_screen->getLines())); + } + else + { + // if the history is not unlimited then it may + // have run out of space and dropped the oldest + // lines of output - in this case the screen + // window's current line number will need to + // be adjusted - otherwise the output will scroll + _currentLine = qMax(0,_currentLine - + _screen->droppedLines()); + + // ensure that the screen window's current position does + // not go beyond the bottom of the screen + _currentLine = qMin( _currentLine , _screen->getHistLines() ); + } + + _bufferNeedsUpdate = true; + + emit outputChanged(); +} + +//#include "ScreenWindow.moc" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ScreenWindow.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ScreenWindow.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ScreenWindow.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ScreenWindow.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,268 @@ +/* + Copyright 2007-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef SCREENWINDOW_H +#define SCREENWINDOW_H + +// Qt +#include +#include +#include + +// Konsole +#include "Character.h" +#include "Screen.h" + +namespace Konsole +{ + +class Screen; + +/** + * Provides a window onto a section of a terminal screen. A terminal widget can then render + * the contents of the window and use the window to change the terminal screen's selection + * in response to mouse or keyboard input. + * + * A new ScreenWindow for a terminal session can be created by calling Emulation::createWindow() + * + * Use the scrollTo() method to scroll the window up and down on the screen. + * Use the getImage() method to retrieve the character image which is currently visible in the window. + * + * setTrackOutput() controls whether the window moves to the bottom of the associated screen when new + * lines are added to it. + * + * Whenever the output from the underlying screen is changed, the notifyOutputChanged() slot should + * be called. This in turn will update the window's position and emit the outputChanged() signal + * if necessary. + */ +class ScreenWindow : public QObject +{ +Q_OBJECT + +public: + /** + * Constructs a new screen window with the given parent. + * A screen must be specified by calling setScreen() before calling getImage() or getLineProperties(). + * + * You should not call this constructor directly, instead use the Emulation::createWindow() method + * to create a window on the emulation which you wish to view. This allows the emulation + * to notify the window when the associated screen has changed and synchronize selection updates + * between all views on a session. + */ + explicit ScreenWindow(QObject* parent = nullptr); + ~ScreenWindow() override; + + /** Sets the screen which this window looks onto */ + void setScreen(Screen* screen); + /** Returns the screen which this window looks onto */ + Screen* screen() const; + + /** + * Returns the image of characters which are currently visible through this window + * onto the screen. + * + * The returned buffer is managed by the ScreenWindow instance and does not need to be + * deleted by the caller. + */ + Character* getImage(); + + /** + * Returns the line attributes associated with the lines of characters which + * are currently visible through this window + */ + QVector getLineProperties(); + + /** + * Returns the number of lines which the region of the window + * specified by scrollRegion() has been scrolled by since the last call + * to resetScrollCount(). scrollRegion() is in most cases the + * whole window, but will be a smaller area in, for example, applications + * which provide split-screen facilities. + * + * This is not guaranteed to be accurate, but allows views to optimize + * rendering by reducing the amount of costly text rendering that + * needs to be done when the output is scrolled. + */ + int scrollCount() const; + + /** + * Resets the count of scrolled lines returned by scrollCount() + */ + void resetScrollCount(); + + /** + * Returns the area of the window which was last scrolled, this is + * usually the whole window area. + * + * Like scrollCount(), this is not guaranteed to be accurate, + * but allows views to optimize rendering. + */ + QRect scrollRegion() const; + + /** + * Sets the start of the selection to the given @p line and @p column within + * the window. + */ + void setSelectionStart( int column , int line , bool columnMode ); + /** + * Sets the end of the selection to the given @p line and @p column within + * the window. + */ + void setSelectionEnd( int column , int line ); + + /******** Modify by n014361 wangpeili 2020-02-13: 新增屏幕全选功能***********×****/ + void setSelectionAll(); + /***************** Modify by n014361 End *************************/ + + /** + * Retrieves the start of the selection within the window. + */ + void getSelectionStart( int& column , int& line ); + /** + * Retrieves the end of the selection within the window. + */ + void getSelectionEnd( int& column , int& line ); + /** + * Returns true if the character at @p line , @p column is part of the selection. + */ + bool isSelected( int column , int line ); + /** + * Clears the current selection + */ + void clearSelection(); + + /** Sets the number of lines in the window */ + void setWindowLines(int lines); + /** Returns the number of lines in the window */ + int windowLines() const; + /** Returns the number of columns in the window */ + int windowColumns() const; + + /** Returns the total number of lines in the screen */ + int lineCount() const; + /** Returns the total number of columns in the screen */ + int columnCount() const; + + /** Returns the index of the line which is currently at the top of this window */ + int currentLine() const; + + /** + * Returns the position of the cursor + * within the window. + */ + QPoint cursorPosition() const; + + /** + * Convenience method. Returns true if the window is currently at the bottom + * of the screen. + */ + bool atEndOfOutput() const; + + /** Scrolls the window so that @p line is at the top of the window */ + void scrollTo( int line ); + + /** Describes the units which scrollBy() moves the window by. */ + enum RelativeScrollMode + { + /** Scroll the window down by a given number of lines. */ + ScrollLines, + /** + * Scroll the window down by a given number of pages, where + * one page is windowLines() lines + */ + ScrollPages + }; + + /** + * Scrolls the window relative to its current position on the screen. + * + * @param mode Specifies whether @p amount refers to the number of lines or the number + * of pages to scroll. + * @param amount The number of lines or pages ( depending on @p mode ) to scroll by. If + * this number is positive, the view is scrolled down. If this number is negative, the view + * is scrolled up. + */ + void scrollBy( RelativeScrollMode mode , int amount ); + + /** + * Specifies whether the window should automatically move to the bottom + * of the screen when new output is added. + * + * If this is set to true, the window will be moved to the bottom of the associated screen ( see + * screen() ) when the notifyOutputChanged() method is called. + */ + void setTrackOutput(bool trackOutput); + /** + * Returns whether the window automatically moves to the bottom of the screen as + * new output is added. See setTrackOutput() + */ + bool trackOutput() const; + + /** + * Returns the text which is currently selected. + * + * @param preserveLineBreaks See Screen::selectedText() + */ + QString selectedText( const Screen::DecodingOptions options ) const; + +public slots: + /** + * Notifies the window that the contents of the associated terminal screen have changed. + * This moves the window to the bottom of the screen if trackOutput() is true and causes + * the outputChanged() signal to be emitted. + */ + void notifyOutputChanged(); + +signals: + /** + * Emitted when the contents of the associated terminal screen (see screen()) changes. + */ + void outputChanged(); + + /** + * Emitted when the screen window is scrolled to a different position. + * + * @param line The line which is now at the top of the window. + */ + void scrolled(int line); + + /** Emitted when the selection is changed. */ + void selectionChanged(); + + /** Emitted when the selection is cleared. */ + void selectionCleared(); + +private: + int endWindowLine() const; + void fillUnusedArea(); + + Screen* _screen; // see setScreen() , screen() + Character* _windowBuffer; + int _windowBufferSize; + bool _bufferNeedsUpdate; + + int _windowLines; + int _currentLine; // see scrollTo() , currentLine() + bool _trackOutput; // see setTrackOutput() , trackOutput() + int _scrollCount; // count of lines which the window has been scrolled by since + // the last call to resetScrollCount() +}; + +} +#endif // SCREENWINDOW_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,119 @@ +/* + Copyright 2013 Christian Surlykke + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ +#include +#include +#include +#include + +#include "SearchBar.h" + +SearchBar::SearchBar(QWidget *parent) : QWidget(parent) +{ + widget.setupUi(this); + setAutoFillBackground(true); // make it always opaque, especially inside translucent windows + connect(widget.closeButton, SIGNAL(clicked()), this, SLOT(hide())); + connect(widget.searchTextEdit, SIGNAL(textChanged(QString)), this, SIGNAL(searchCriteriaChanged())); + connect(widget.findPreviousButton, SIGNAL(clicked()), this, SIGNAL(findPrevious())); + connect(widget.findNextButton, SIGNAL(clicked()), this, SIGNAL(findNext())); + + connect(this, SIGNAL(searchCriteriaChanged()), this, SLOT(clearBackgroundColor())); + + QMenu *optionsMenu = new QMenu(widget.optionsButton); + widget.optionsButton->setMenu(optionsMenu); + + m_matchCaseMenuEntry = optionsMenu->addAction(tr("Match case")); + m_matchCaseMenuEntry->setCheckable(true); + m_matchCaseMenuEntry->setChecked(true); + connect(m_matchCaseMenuEntry, SIGNAL(toggled(bool)), this, SIGNAL(searchCriteriaChanged())); + + + m_useRegularExpressionMenuEntry = optionsMenu->addAction(tr("Regular expression")); + m_useRegularExpressionMenuEntry->setCheckable(true); + connect(m_useRegularExpressionMenuEntry, SIGNAL(toggled(bool)), this, SIGNAL(searchCriteriaChanged())); + + m_highlightMatchesMenuEntry = optionsMenu->addAction(tr("Highlight all matches")); + m_highlightMatchesMenuEntry->setCheckable(true); + m_highlightMatchesMenuEntry->setChecked(true); + connect(m_highlightMatchesMenuEntry, SIGNAL(toggled(bool)), this, SIGNAL(highlightMatchesChanged(bool))); +} + +SearchBar::~SearchBar() { +} + +QString SearchBar::searchText() +{ + return widget.searchTextEdit->text(); +} + + +bool SearchBar::useRegularExpression() +{ + return m_useRegularExpressionMenuEntry->isChecked(); +} + +bool SearchBar::matchCase() +{ + return m_matchCaseMenuEntry->isChecked(); +} + +bool SearchBar::highlightAllMatches() +{ + return m_highlightMatchesMenuEntry->isChecked(); +} + +void SearchBar::show() +{ + QWidget::show(); + widget.searchTextEdit->setFocus(); +} + +void SearchBar::noMatchFound() +{ + QPalette palette; + palette.setColor(widget.searchTextEdit->backgroundRole(), QColor(255, 128, 128)); + widget.searchTextEdit->setPalette(palette); +} + + +void SearchBar::keyReleaseEvent(QKeyEvent* keyEvent) +{ + if (keyEvent->key() == Qt::Key_Return || keyEvent->key() == Qt::Key_Enter) + { + if (keyEvent->modifiers() == Qt::ShiftModifier) + { + Q_EMIT findPrevious(); + } + else + { + Q_EMIT findNext(); + } + } + else if (keyEvent->key() == Qt::Key_Escape) + { + hide(); + } +} + +void SearchBar::clearBackgroundColor() +{ + QPalette p; + p.setColor(QPalette::Base, Qt::white); + widget.searchTextEdit->setPalette(p); + +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,60 @@ +/* + Copyright 2013 Christian Surlykke + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ +#ifndef _SEARCHBAR_H +#define _SEARCHBAR_H + +#include + +#include "ui_SearchBar.h" +#include "HistorySearch.h" + +class SearchBar : public QWidget { + Q_OBJECT +public: + SearchBar(QWidget* parent = nullptr); + virtual ~SearchBar(); + virtual void show(); + QString searchText(); + bool useRegularExpression(); + bool matchCase(); + bool highlightAllMatches(); + +public slots: + void noMatchFound(); + +signals: + void searchCriteriaChanged(); + void highlightMatchesChanged(bool highlightMatches); + void findNext(); + void findPrevious(); + +protected: + virtual void keyReleaseEvent(QKeyEvent* keyEvent); + +private slots: + void clearBackgroundColor(); + +private: + Ui::SearchBar widget; + QAction *m_matchCaseMenuEntry; + QAction *m_useRegularExpressionMenuEntry; + QAction *m_highlightMatchesMenuEntry; +}; + +#endif /* _SEARCHBAR_H */ diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.ui deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.ui --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SearchBar.ui 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SearchBar.ui 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,80 @@ + + + SearchBar + + + + 0 + 0 + 399 + 40 + + + + SearchBar + + + + + + X + + + + + + + + + + + + Find: + + + + + + + + + + < + + + + + + + + + + + + > + + + + + + + + + + + + ... + + + + + + QToolButton::InstantPopup + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Session.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Session.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Session.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Session.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1345 @@ +/* + This file is part of Konsole + + Copyright (C) 2006-2007 by Robert Knight + Copyright (C) 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +// Own +#include "Session.h" + +// Standard +#include + +// Qt +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Pty.h" +#include "ProcessInfo.h" +//#include "kptyprocess.h" +#include "TerminalDisplay.h" +#include "ShellCommand.h" +#include "Vt102Emulation.h" + +using namespace Konsole; + +int Session::lastSessionId = 0; + +Session::Session(QObject* parent) : + QObject(parent), + _shellProcess(nullptr) + , _emulation(nullptr) + , _monitorActivity(false) + , _monitorSilence(false) + , _notifiedActivity(false) + , _autoClose(true) + , _wantedClose(false) + , _silenceSeconds(10) + , _isTitleChanged(false) + , _addToUtmp(false) // disabled by default because of a bug encountered on certain systems + // which caused Konsole to hang when closing a tab and then opening a new + // one. A 'QProcess destroyed while still running' warning was being + // printed to the terminal. Likely a problem in KPty::logout() + // or KPty::login() which uses a QProcess to start /usr/bin/utempter + , _flowControl(true) + , _fullScripting(false) + , _sessionId(0) + , _sessionProcessInfo(nullptr) + , _foregroundProcessInfo(nullptr) +// , _zmodemBusy(false) +// , _zmodemProc(0) +// , _zmodemProgress(0) + , _hasDarkBackground(false) +{ + //prepare DBus communication +// new SessionAdaptor(this); + _sessionId = ++lastSessionId; +// QDBusConnection::sessionBus().registerObject(QLatin1String("/Sessions/")+QString::number(_sessionId), this); + + //create teletype for I/O with shell process + _shellProcess = new Pty(); + _shellProcess->setSessionId(_sessionId); + ptySlaveFd = _shellProcess->pty()->slaveFd(); + + //create emulation backend + _emulation = new Vt102Emulation(); + _emulation->setSessionId(_sessionId); + + connect( _emulation, SIGNAL( titleChanged( int, const QString & ) ), + this, SLOT( setUserTitle( int, const QString & ) ) ); + connect( _emulation, SIGNAL( stateSet(int) ), + this, SLOT( activityStateSet(int) ) ); +// connect( _emulation, SIGNAL( zmodemDetected() ), this , +// SLOT( fireZModemDetected() ) ); + connect( _emulation, SIGNAL( changeTabTextColorRequest( int ) ), + this, SIGNAL( changeTabTextColorRequest( int ) ) ); + connect( _emulation, SIGNAL(profileChangeCommandReceived(const QString &)), + this, SIGNAL( profileChangeCommandReceived(const QString &)) ); + + connect(_emulation, SIGNAL(imageResizeRequest(QSize)), + this, SLOT(onEmulationSizeChange(QSize))); + connect(_emulation, SIGNAL(imageSizeChanged(int, int)), + this, SLOT(onViewSizeChange(int, int))); + connect(_emulation, &Vt102Emulation::cursorChanged, + this, &Session::cursorChanged); + + //connect teletype to emulation backend + _shellProcess->setUtf8Mode(_emulation->utf8()); + + connect( _shellProcess,SIGNAL(receivedData(const char *,int,bool)),this, + SLOT(onReceiveBlock(const char *,int,bool)) ); + connect( _emulation,SIGNAL(sendData(const char *,int,const QTextCodec *)),_shellProcess, + SLOT(sendData(const char *,int,const QTextCodec *)) ); + connect( _emulation,SIGNAL(lockPtyRequest(bool)),_shellProcess,SLOT(lockPty(bool)) ); + connect( _emulation,SIGNAL(useUtf8Request(bool)),_shellProcess,SLOT(setUtf8Mode(bool)) ); + + connect( _shellProcess,SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(done(int)) ); + // not in kprocess anymore connect( _shellProcess,SIGNAL(done(int)), this, SLOT(done(int)) ); + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + // 用于卸载终端弹出框提示 + connect( _shellProcess,SIGNAL(ptyUninstallTerminal(QString)), this, SIGNAL(sessionUninstallTerminal(QString)) ); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + + //setup timer for monitoring session activity + _monitorTimer = new QTimer(this); + _monitorTimer->setSingleShot(true); + connect(_monitorTimer, SIGNAL(timeout()), this, SLOT(monitorTimerDone())); + + // 定时更新term信息 => 目前为了更新标签标题信息 + _updateTimer = new QTimer(this); + connect(_updateTimer, &QTimer::timeout, this, &Session::onUpdateTitleArgs); + _updateTimer->start(500); +} + +WId Session::windowId() const +{ + // On Qt5, requesting window IDs breaks QQuickWidget and the likes, + // for example, see the following bug reports: + // https://bugreports.qt.io/browse/QTBUG-40765 + // https://codereview.qt-project.org/#/c/94880/ + return 0; +} + +void Session::setDarkBackground(bool darkBackground) +{ + _hasDarkBackground = darkBackground; +} +bool Session::hasDarkBackground() const +{ + return _hasDarkBackground; +} +bool Session::isRunning() const +{ + return _shellProcess->state() == QProcess::Running; +} + +void Session::setCodec(QTextCodec * codec) +{ + emulation()->setCodec(codec); +} + +void Session::setProgram(const QString & program) +{ + _program = ShellCommand::expand(program); + if (_program.endsWith(QStringLiteral("/dash")) + || _program.endsWith(QStringLiteral("/sh"))) { + _updateTimer->setInterval(10); + + //用于更改updateTimer的时间间隔,防止CPU占用太高 + QTimer *monitorUpdateTimer = new QTimer(this); + monitorUpdateTimer->setSingleShot(true); + monitorUpdateTimer->start(500); + connect(monitorUpdateTimer, &QTimer::timeout, this, [this] { + if (_updateTimer->interval() < 500) { + _updateTimer->setInterval(500); + } + }); + } +} +void Session::setInitialWorkingDirectory(const QString & dir) +{ + _initialWorkingDir = ShellCommand::expand(dir); +} +void Session::setArguments(const QStringList & arguments) +{ + _arguments = ShellCommand::expand(arguments); +} + +QList Session::views() const +{ + return _views; +} + +void Session::addView(TerminalDisplay * widget) +{ + Q_ASSERT( !_views.contains(widget) ); + + _views.append(widget); + + if ( _emulation != nullptr ) { + // connect emulation - view signals and slots + connect( widget , SIGNAL(keyPressedSignal(QKeyEvent *)) , _emulation , + SLOT(sendKeyEvent(QKeyEvent *)) ); + connect( widget , SIGNAL(mouseSignal(int,int,int,int)) , _emulation , + SLOT(sendMouseEvent(int,int,int,int)) ); + // 先判断是否有远程连接,若有,则连接远程 + // connect(widget, SIGNAL(sendStringToEmu(const char *)), _emulation, SLOT(sendString(const char *))); + + // allow emulation to notify view when the foreground process + // indicates whether or not it is interested in mouse signals + connect( _emulation , SIGNAL(programUsesMouseChanged(bool)) , widget , + SLOT(setUsesMouse(bool)) ); + + widget->setUsesMouse( _emulation->programUsesMouse() ); + + connect( _emulation , SIGNAL(programBracketedPasteModeChanged(bool)) , + widget , SLOT(setBracketedPasteMode(bool)) ); + + widget->setBracketedPasteMode(_emulation->programBracketedPasteMode()); + + widget->setScreenWindow(_emulation->createWindow()); + } + + //connect view signals and slots + QObject::connect( widget ,SIGNAL(changedContentSizeSignal(int,int)),this, + SLOT(onViewSizeChange(int,int))); + + QObject::connect( widget ,SIGNAL(destroyed(QObject *)) , this , + SLOT(viewDestroyed(QObject *)) ); +//slot for close + QObject::connect(this, SIGNAL(finished()), widget, SLOT(close())); + +} + +void Session::viewDestroyed(QObject * view) +{ + TerminalDisplay * display = (TerminalDisplay *)view; + + Q_ASSERT( _views.contains(display) ); + + removeView(display); +} + +/******************************************************************************* + 1. @函数: onUpdateTitleArgs + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-02 + 4. @说明: 更新标签标题参数 +*******************************************************************************/ +void Session::onUpdateTitleArgs() +{ + ProcessInfo *process = getProcessInfo(); + + // format tab titles using process info + bool ok = false; + + // 用户名 %u + QString userName = process->userName(); + if (_userName != userName) { + _userName = userName; + emit titleArgsChange(QLatin1String("%u"), _userName); + } + + //title.replace(QLatin1String("%h"), Konsole::ProcessInfo::localHost()); + // 程序名 %n + QString programName = process->name(&ok); + if (_programName != programName) { + _programName = programName; + emit titleArgsChange(QLatin1String("%n"), _programName); + } + + + // 获取当前目录 %D + QString dir = _reportedWorkingUrl.toLocalFile(); + ok = true; + if (dir.isEmpty()) { + // update current directory from process + updateWorkingDirectory(); + // Previous process may have been freed in updateSessionProcessInfo() + process = getProcessInfo(); + dir = process->currentDir(&ok); + } + if (_currentDir != dir) { + _currentDir = dir; + emit titleArgsChange(QLatin1String("%D"), _currentDir); + } + +} + +void Session::removeView(TerminalDisplay *widget) +{ + _views.removeAll(widget); + + disconnect(widget,nullptr,this,nullptr); + + if ( _emulation != nullptr ) { + // disconnect + // - key presses signals from widget + // - mouse activity signals from widget + // - string sending signals from widget + // + // ... and any other signals connected in addView() + disconnect( widget, nullptr, _emulation, nullptr); + + // disconnect state change signals emitted by emulation + disconnect( _emulation , nullptr , widget , nullptr); + } + + // close the session automatically when the last view is removed + if ( _views.count() == 0 ) { + close(); + } +} + +void Session::run() +{ + // Upon a KPty error, there is no description on what that error was... + // Check to see if the given program is executable. + + /* ok iam not exactly sure where _program comes from - however it was set to /bin/bash on my system + * Thats bad for BSD as its /usr/local/bin/bash there - its also bad for arch as its /usr/bin/bash there too! + * So i added a check to see if /bin/bash exists - if no then we use $SHELL - if that does not exist either, we fall back to /bin/sh + * As far as i know /bin/sh exists on every unix system.. You could also just put some ifdef __FREEBSD__ here but i think these 2 filechecks are worth + * their computing time on any system - especially with the problem on arch linux beeing there too. + */ + QString exec = QString::fromLocal8Bit(QFile::encodeName(_program)); + // if 'exec' is not specified, fall back to default shell. if that + // is not set then fall back to /bin/sh + + // here we expect full path. If there is no fullpath let's expect it's + // a custom shell (eg. python, etc.) available in the PATH. + QString programPath = exec; + if (exec.startsWith(QLatin1Char('/')) || exec.isEmpty()) { + const QString defaultShell{QLatin1String("/bin/bash")}; + + QFile excheck(exec); +#if 0 // 下一期优化 + // exec是空的,或者文件不存在,则替换exec为$SHELL + if (exec.isEmpty() || !excheck.exists()) { + exec = QString::fromLocal8Bit(qgetenv("SHELL")); + } + excheck.setFileName(exec); +#endif + // SHELL是空的,或者文件不存在,则替换exec为/bin/sh + if (exec.isEmpty() || !excheck.exists()) { + qWarning() << "Neither default shell nor $SHELL is set to a correct path. Fallback to" << defaultShell; + exec = defaultShell; + } + + } + + if (programPath != exec) { + // 说明有文件不存在,取最后找到的文件进行替换 + emit shellWarningMessage(exec, true); + } + + // _arguments sometimes contain ("") so isEmpty() + // or count() does not work as expected... + QString argsTmp(_arguments.join(QLatin1Char(' ')).trimmed()); + QStringList arguments; + arguments << exec; + if (argsTmp.length()) + arguments << _arguments; + + QString cwd = QDir::currentPath(); + if (!_initialWorkingDir.isEmpty()) { + _shellProcess->setWorkingDirectory(_initialWorkingDir); + } else { + _shellProcess->setWorkingDirectory(cwd); + } + + _shellProcess->setFlowControlEnabled(_flowControl); + _shellProcess->setErase(_emulation->eraseChar()); + + // this is not strictly accurate use of the COLORFGBG variable. This does not + // tell the terminal exactly which colors are being used, but instead approximates + // the color scheme as "black on white" or "white on black" depending on whether + // the background color is deemed dark or not + // fix bug#39147 终端使用vim编辑脚本,命令行终端的主题为跟随系统时无法清楚查看脚本内容 + // 移除该环境变量,因为终端的主题颜色会实时变化,不能通过设置环境变量的方式 + //QString backgroundColorHint = _hasDarkBackground ? QLatin1String("COLORFGBG=15;0") : QLatin1String("COLORFGBG=0;15"); + + /* if we do all the checking if this shell exists then we use it ;) + * Dont know about the arguments though.. maybe youll need some more checking im not sure + * However this works on Arch and FreeBSD now. + */ + int result = _shellProcess->start(exec, + arguments, + _environment,// << backgroundColorHint, + windowId(), + _addToUtmp); + + if (result < 0) { + //qDebug() << "CRASHED! result: " << result<errorString(); + processError = processError.mid(processError.indexOf(":") + 1).trimmed(); + if(!processError.isEmpty()) + processError = "(" +processError + ")"; + + QString infoText = QString("There was an error creating the child process for this terminal. \n" + "Failed to execute child process \"%1\"%2!") + .arg(exec) + .arg(processError); + sendText(infoText); + _userTitle = QString::fromLatin1("Session crashed"); + emit titleChanged(); + emit shellWarningMessage(exec, false); + qWarning() << _shellProcess->errorString(); + return; + } + + _shellProcess->setWriteable(false); // We are reachable via kwrited. + emit started(); +} + +void Session::runEmptyPTY() +{ + _shellProcess->setFlowControlEnabled(_flowControl); + _shellProcess->setErase(_emulation->eraseChar()); + _shellProcess->setWriteable(false); + + // disconnet send data from emulator to internal terminal process + disconnect( _emulation,SIGNAL(sendData(const char *,int)), + _shellProcess, SLOT(sendData(const char *,int)) ); + + _shellProcess->setEmptyPTYProperties(); + emit started(); +} + +void Session::setUserTitle( int what, const QString & caption ) +{ + //set to true if anything is actually changed (eg. old _nameTitle != new _nameTitle ) + bool modified = false; + + // (btw: what=0 changes _userTitle and icon, what=1 only icon, what=2 only _nameTitle + if ((what == 0) || (what == 2)) { + _isTitleChanged = true; + if ( _userTitle != caption ) { + _userTitle = caption; + modified = true; + } + } + + if ((what == 0) || (what == 1)) { + _isTitleChanged = true; + if ( _iconText != caption ) { + _iconText = caption; + modified = true; + } + } + + if (what == 11) { + QString colorString = caption.section(QLatin1Char(';'),0,0); + //qDebug() << __FILE__ << __LINE__ << ": setting background colour to " << colorString; + QColor backColor = QColor(colorString); + if (backColor.isValid()) { // change color via \033]11;Color\007 + if (backColor != _modifiedBackground) { + _modifiedBackground = backColor; + + // bail out here until the code to connect the terminal display + // to the changeBackgroundColor() signal has been written + // and tested - just so we don't forget to do this. + Q_ASSERT( 0 ); + + emit changeBackgroundColorRequest(backColor); + } + } + } + + if (what == 30) { + _isTitleChanged = true; + if ( _nameTitle != caption ) { + setTitle(Session::NameRole,caption); + return; + } + } + + if (what == 31) { + QString cwd=caption; + cwd=cwd.replace( QRegExp(QLatin1String("^~")), QDir::homePath() ); + emit openUrlRequest(cwd); + } + + // change icon via \033]32;Icon\007 + if (what == 32) { + _isTitleChanged = true; + if ( _iconName != caption ) { + _iconName = caption; + + modified = true; + } + } + + if (what == 50) { + emit profileChangeCommandReceived(caption); + return; + } + + if (modified) { + // 标签标题变化前更新标签标题参数 + onUpdateTitleArgs(); + // 标签标题有变化,发送信号通知terminal + emit titleChanged(); + } +} + +QString Session::userTitle() const +{ + return _userTitle; +} +void Session::setTabTitleFormat(TabTitleContext context , const QString & format) +{ + if ( context == LocalTabTitle ) { + _localTabTitleFormat = format; + ProcessInfo *process = getProcessInfo(); + process->setUserNameRequired(format.contains(QLatin1String("%u"))); + } else if ( context == RemoteTabTitle ) { + _remoteTabTitleFormat = format; + } +} +QString Session::tabTitleFormat(TabTitleContext context) const +{ + if ( context == LocalTabTitle ) { + return _localTabTitleFormat; + } else if ( context == RemoteTabTitle ) { + return _remoteTabTitleFormat; + } + + return QString(); +} + +void Session::monitorTimerDone() +{ + //FIXME: The idea here is that the notification popup will appear to tell the user than output from + //the terminal has stopped and the popup will disappear when the user activates the session. + // + //This breaks with the addition of multiple views of a session. The popup should disappear + //when any of the views of the session becomes active + + + //FIXME: Make message text for this notification and the activity notification more descriptive. + if (_monitorSilence) { + emit silence(); + emit stateChanged(NOTIFYSILENCE); + } else { + emit stateChanged(NOTIFYNORMAL); + } + + _notifiedActivity=false; +} + +void Session::activityStateSet(int state) +{ + if (state==NOTIFYBELL) { + emit bellRequest(QString("Bell in session '%1'").arg(_nameTitle)); + } else if (state==NOTIFYACTIVITY) { + if (_monitorSilence) { + _monitorTimer->start(_silenceSeconds*1000); + } + + if ( _monitorActivity ) { + //FIXME: See comments in Session::monitorTimerDone() + if (!_notifiedActivity) { + _notifiedActivity=true; + emit activity(); + } + } + } + + if ( state==NOTIFYACTIVITY && !_monitorActivity ) { + state = NOTIFYNORMAL; + } + if ( state==NOTIFYSILENCE && !_monitorSilence ) { + state = NOTIFYNORMAL; + } + + emit stateChanged(state); +} + +void Session::onViewSizeChange(int height, int width) +{ + updateTerminalSize(height, width); +} +void Session::onEmulationSizeChange(QSize size) +{ + setSize(size); +} + +void Session::updateTerminalSize(int height, int width) +{ + QListIterator viewIter(_views); + + int minLines = -1; + int minColumns = -1; + + // minimum number of lines and columns that views require for + // their size to be taken into consideration ( to avoid problems + // with new view widgets which haven't yet been set to their correct size ) + /***mod by ut001121 zhangmeng 20200615 窗口初始化完成之后修改终端显示内容为最小一行 修复BUG32779, BUG32778***/ + const int VIEW_LINES_THRESHOLD = (height==1 || width==1) ? 2 : 1; + const int VIEW_COLUMNS_THRESHOLD = 2; + + //select largest number of lines and columns that will fit in all visible views + while ( viewIter.hasNext() ) { + TerminalDisplay * view = viewIter.next(); + if ( view->isHidden() == false && + view->lines() >= VIEW_LINES_THRESHOLD && + view->columns() >= VIEW_COLUMNS_THRESHOLD ) { + minLines = (minLines == -1) ? view->lines() : qMin( minLines , view->lines() ); + minColumns = (minColumns == -1) ? view->columns() : qMin( minColumns , view->columns() ); + } + } + + // backend emulation must have a _terminal of at least 1 column x 1 line in size + if ( minLines > 0 && minColumns > 0 ) { + _emulation->setImageSize( minLines , minColumns ); + _shellProcess->setWindowSize( minLines , minColumns ); + } + + +} + +void Session::refresh() +{ + // attempt to get the shell process to redraw the display + // + // this requires the program running in the shell + // to cooperate by sending an update in response to + // a window size change + // + // the window size is changed twice, first made slightly larger and then + // resized back to its normal size so that there is actually a change + // in the window size (some shells do nothing if the + // new and old sizes are the same) + // + // if there is a more 'correct' way to do this, please + // send an email with method or patches to konsole-devel@kde.org + + const QSize existingSize = _shellProcess->windowSize(); + _shellProcess->setWindowSize(existingSize.height(),existingSize.width()+1); + _shellProcess->setWindowSize(existingSize.height(),existingSize.width()); +} + +bool Session::sendSignal(int signal) +{ + int result = ::kill(static_cast(_shellProcess->processId()),signal); + + if ( result == 0 ) + { + _shellProcess->waitForFinished(); + return true; + } + else + return false; +} + +void Session::close() +{ + _autoClose = true; + _wantedClose = true; + if (!_shellProcess->isRunning() || !sendSignal(SIGHUP)) { + // Forced close. + QTimer::singleShot(1, this, SIGNAL(finished())); + } +} + +void Session::sendText(const QString & text) const +{ + //检测到当前命令是代码中通过sendText发给终端的(而不是用户手动输入的命令) + bool isSendByRemoteManage = this->property("isSendByRemoteManage").toBool(); + if (isSendByRemoteManage) { + //将isSendByRemoteManage标记同步给Pty + _shellProcess->setProperty("isSendByRemoteManage", QVariant(true)); + } + _emulation->sendText(text); +} + +void Session::sendKeyEvent(QKeyEvent* e) const +{ + _emulation->sendKeyEvent(e); +} + +Session::~Session() +{ + _wantedClose = true; + if(nullptr != _foregroundProcessInfo){ + delete _foregroundProcessInfo; + } + if(nullptr != _sessionProcessInfo){ + delete _sessionProcessInfo; + } + if(nullptr != _emulation){ + delete _emulation; + } + if(nullptr != _shellProcess){ + delete _shellProcess; + } +// delete _zmodemProc; +} + +void Session::setProfileKey(const QString & key) +{ + _profileKey = key; + emit profileChanged(key); +} +QString Session::profileKey() const +{ + return _profileKey; +} + +void Session::done(int exitStatus) +{ + qDebug()<<"done exitStatus:"<exitStatus(); + /********2021-06-22 keep-open 参数不生效问题 Bug#80199********/ + if (_autoClose && _wantedClose) { + emit finished(); + return; + } + + /************************ Add by sunchengxi 2020-09-15:Bug#42864 无法同时打开多个终端 Begin************************/ + /********2021-06-22 keep-open 参数不生效问题 Bug#80199********/ + if (true == _autoClose && false == _wantedClose && _shellProcess->exitStatus() == QProcess::NormalExit) { + qDebug() << "autoClose is true."; + emit titleChanged(); + emit finished(); + return; + } + /************************ Add by sunchengxi 2020-09-15:Bug#42864 无法同时打开多个终端 End ************************/ + + if(exitStatus != 0) + { + QString message; + QString infoText; + if (exitStatus == -1){ + infoText.sprintf("There was an error creating the child process for this terminal. \n" + "Failed to execute child process \"%s\"(No such file or directory)!", _program.toUtf8().data()); + message = "Session crashed."; + } + else { + infoText.sprintf("The child process exited normally with status %d.", exitStatus); + message.sprintf("Session '%s' exited with status %d.", + _nameTitle.toUtf8().data(), exitStatus); + } + _userTitle = message; + //sendText(infoText); + emit titleChanged(); + } +} + +Emulation * Session::emulation() const +{ + return _emulation; +} + +QString Session::keyBindings() const +{ + return _emulation->keyBindings(); +} + +void Session::setBackspaceMode(char *key, int length) +{ + _emulation->setBackspaceMode(key, length); +} + +void Session::setDeleteMode(char *key, int length) +{ + _emulation->setDeleteMode(key, length); +} + +QStringList Session::environment() const +{ + return _environment; +} + +void Session::setEnvironment(const QStringList & environment) +{ + _environment = environment; +} + +int Session::sessionId() const +{ + return _sessionId; +} + +void Session::setKeyBindings(const QString & id) +{ + _emulation->setKeyBindings(id); +} + +void Session::setTitle(TitleRole role , const QString & newTitle) +{ + if ( title(role) != newTitle ) { + if ( role == NameRole ) { + _nameTitle = newTitle; + } else if ( role == DisplayedTitleRole ) { + _displayTitle = newTitle; + // without these, that title will be overridden by the expansion of + // title format shortly after, which will confuses users. + _localTabTitleFormat = newTitle; + _remoteTabTitleFormat = newTitle; + +// qDebug() << "curr running process:" << newTitle << endl; + } + + emit titleChanged(); + } +} + +QString Session::title(TitleRole role) const +{ + if ( role == NameRole ) { + return _nameTitle; + } else if ( role == DisplayedTitleRole ) { + return _displayTitle; + } else { + return QString(); + } +} + +void Session::setIconName(const QString & iconName) +{ + if ( iconName != _iconName ) { + _iconName = iconName; + emit titleChanged(); + } +} + +void Session::setIconText(const QString & iconText) +{ + _iconText = iconText; + //kDebug(1211)<<"Session setIconText " << _iconText; +} + +QString Session::iconName() const +{ + return _iconName; +} + +QString Session::iconText() const +{ + return _iconText; +} + +bool Session::isTitleChanged() const +{ + return _isTitleChanged; +} + +void Session::setHistoryType(const HistoryType & hType) +{ + _emulation->setHistory(hType); +} + +const HistoryType & Session::historyType() const +{ + return _emulation->history(); +} + +void Session::clearHistory() +{ + _emulation->clearHistory(); +} + +QStringList Session::arguments() const +{ + return _arguments; +} + +QString Session::program() const +{ + return _program; +} + +// unused currently +bool Session::isMonitorActivity() const +{ + return _monitorActivity; +} +// unused currently +bool Session::isMonitorSilence() const +{ + return _monitorSilence; +} + +void Session::setMonitorActivity(bool _monitor) +{ + _monitorActivity=_monitor; + _notifiedActivity=false; + + activityStateSet(NOTIFYNORMAL); +} + +void Session::setMonitorSilence(bool _monitor) +{ + if (_monitorSilence==_monitor) { + return; + } + + _monitorSilence=_monitor; + if (_monitorSilence) { + _monitorTimer->start(_silenceSeconds*1000); + } else { + _monitorTimer->stop(); + } + + activityStateSet(NOTIFYNORMAL); +} + +void Session::setMonitorSilenceSeconds(int seconds) +{ + _silenceSeconds=seconds; + if (_monitorSilence) { + _monitorTimer->start(_silenceSeconds*1000); + } +} + +void Session::setAddToUtmp(bool set) +{ + _addToUtmp = set; +} + +void Session::setFlowControlEnabled(bool enabled) +{ + if (_flowControl == enabled) { + return; + } + + _flowControl = enabled; + + if (_shellProcess) { + _shellProcess->setFlowControlEnabled(_flowControl); + } + + emit flowControlEnabledChanged(enabled); +} +bool Session::flowControlEnabled() const +{ + return _flowControl; +} +//void Session::fireZModemDetected() +//{ +// if (!_zmodemBusy) +// { +// QTimer::singleShot(10, this, SIGNAL(zmodemDetected())); +// _zmodemBusy = true; +// } +//} + +//void Session::cancelZModem() +//{ +// _shellProcess->sendData("\030\030\030\030", 4); // Abort +// _zmodemBusy = false; +//} + +//void Session::startZModem(const QString &zmodem, const QString &dir, const QStringList &list) +//{ +// _zmodemBusy = true; +// _zmodemProc = new KProcess(); +// _zmodemProc->setOutputChannelMode( KProcess::SeparateChannels ); +// +// *_zmodemProc << zmodem << "-v" << list; +// +// if (!dir.isEmpty()) +// _zmodemProc->setWorkingDirectory(dir); +// +// _zmodemProc->start(); +// +// connect(_zmodemProc,SIGNAL (readyReadStandardOutput()), +// this, SLOT(zmodemReadAndSendBlock())); +// connect(_zmodemProc,SIGNAL (readyReadStandardError()), +// this, SLOT(zmodemReadStatus())); +// connect(_zmodemProc,SIGNAL (finished(int,QProcess::ExitStatus)), +// this, SLOT(zmodemFinished())); +// +// disconnect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(onReceiveBlock(const char*,int)) ); +// connect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(zmodemRcvBlock(const char*,int)) ); +// +// _zmodemProgress = new ZModemDialog(QApplication::activeWindow(), false, +// i18n("ZModem Progress")); +// +// connect(_zmodemProgress, SIGNAL(user1Clicked()), +// this, SLOT(zmodemDone())); +// +// _zmodemProgress->show(); +//} + +/*void Session::zmodemReadAndSendBlock() +{ + _zmodemProc->setReadChannel( QProcess::StandardOutput ); + QByteArray data = _zmodemProc->readAll(); + + if ( data.count() == 0 ) + return; + + _shellProcess->sendData(data.constData(),data.count()); +} +*/ +/* +void Session::zmodemReadStatus() +{ + _zmodemProc->setReadChannel( QProcess::StandardError ); + QByteArray msg = _zmodemProc->readAll(); + while(!msg.isEmpty()) + { + int i = msg.indexOf('\015'); + int j = msg.indexOf('\012'); + QByteArray txt; + if ((i != -1) && ((j == -1) || (i < j))) + { + msg = msg.mid(i+1); + } + else if (j != -1) + { + txt = msg.left(j); + msg = msg.mid(j+1); + } + else + { + txt = msg; + msg.truncate(0); + } + if (!txt.isEmpty()) + _zmodemProgress->addProgressText(QString::fromLocal8Bit(txt)); + } +} +*/ +/* +void Session::zmodemRcvBlock(const char *data, int len) +{ + QByteArray ba( data, len ); + + _zmodemProc->write( ba ); +} +*/ +/* +void Session::zmodemFinished() +{ + if (_zmodemProc) + { + delete _zmodemProc; + _zmodemProc = 0; + _zmodemBusy = false; + + disconnect( _shellProcess,SIGNAL(block_in(const char*,int)), this ,SLOT(zmodemRcvBlock(const char*,int)) ); + connect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(onReceiveBlock(const char*,int)) ); + + _shellProcess->sendData("\030\030\030\030", 4); // Abort + _shellProcess->sendData("\001\013\n", 3); // Try to get prompt back + _zmodemProgress->transferDone(); + } +} +*/ +void Session::onReceiveBlock(const char * buf, int len, bool isCommandExec) +{ + _emulation->receiveData(buf, len, isCommandExec); + emit receivedData( QString::fromLatin1( buf, len ) ); +} + +QSize Session::size() +{ + return _emulation->imageSize(); +} + +void Session::setSize(const QSize & size) +{ + if ((size.width() <= 1) || (size.height() <= 1)) { + return; + } + + emit resizeRequest(size); +} + +QString Session::getDynamicProcessName() +{ + bool ok = false; + QString processName = getProcessInfo()->name(&ok); + if (ok) { + return processName; + } + + return QString::fromLocal8Bit(qgetenv("SHELL")); +} + +int Session::getDynamicProcessId() +{ + bool ok = false; + int pid = getProcessInfo()->pid(&ok); + if (ok) { + if (this->isForegroundProcessActive()) { + return pid; + } + } + + return 0; +} + +void Session::updateWorkingDirectory() +{ + updateSessionProcessInfo(); + + const QString currentDir = _sessionProcessInfo->validCurrentDir(); + if (currentDir != _currentWorkingDir) { + _currentWorkingDir = currentDir; + emit currentDirectoryChanged(_currentWorkingDir); + } +} + +int Session::foregroundProcessId() +{ + int pid; + + bool ok = false; + pid = getProcessInfo()->pid(&ok); + if (!ok) { + pid = -1; + } + + return pid; +} + +bool Session::isForegroundProcessActive() +{ + // foreground process info is always updated after this + return (_shellProcess->processId() != _shellProcess->foregroundProcessGroup()); +} + +QString Session::foregroundProcessName() +{ + QString name; + + if (updateForegroundProcessInfo()) { + bool ok = false; + name = _foregroundProcessInfo->name(&ok); + if (!ok) { + name.clear(); + } + } + + return name; +} + +int Session::processId() const +{ + return static_cast(_shellProcess->processId()); +} + +ProcessInfo *Session::getProcessInfo() +{ + ProcessInfo *process = nullptr; + + if (isForegroundProcessActive() && updateForegroundProcessInfo()) { + process = _foregroundProcessInfo; + } else { + updateSessionProcessInfo(); + process = _sessionProcessInfo; + } + + return process; +} + +void Session::updateSessionProcessInfo() +{ + Q_ASSERT(_shellProcess); + + bool ok; + // The checking for pid changing looks stupid, but it is needed + // at the moment to workaround the problem that processId() might + // return 0 + if ((_sessionProcessInfo == nullptr) || + (processId() != 0 && processId() != _sessionProcessInfo->pid(&ok))) { + delete _sessionProcessInfo; + _sessionProcessInfo = ProcessInfo::newInstance(processId(), + tabTitleFormat(Session::LocalTabTitle)); + _sessionProcessInfo->setUserHomeDir(); + } + _sessionProcessInfo->update(); +} + +bool Session::updateForegroundProcessInfo() +{ + Q_ASSERT(_shellProcess); + + const int foregroundPid = _shellProcess->foregroundProcessGroup(); + if (foregroundPid != _foregroundPid) { + if(nullptr != _foregroundProcessInfo){ + delete _foregroundProcessInfo; + } + + _foregroundProcessInfo = ProcessInfo::newInstance(foregroundPid, + tabTitleFormat(Session::LocalTabTitle)); + _foregroundPid = foregroundPid; + } + + if (_foregroundProcessInfo != nullptr) { + _foregroundProcessInfo->update(); + return _foregroundProcessInfo->isValid(); + } else { + return false; + } +} + +int Session::getPtySlaveFd() const +{ + return ptySlaveFd; +} + +/******************************************************************************* + 1. @函数: getEraseChar + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-06-02 + 4. @说明: 获取tty的erase的字符 +*******************************************************************************/ +char Session::getEraseChar() +{ + return _shellProcess->erase(); +} + +SessionGroup::SessionGroup() + : _masterMode(0) +{ +} +SessionGroup::~SessionGroup() +{ + // disconnect all + connectAll(false); +} +int SessionGroup::masterMode() const +{ + return _masterMode; +} +QList SessionGroup::sessions() const +{ + return _sessions.keys(); +} +bool SessionGroup::masterStatus(Session * session) const +{ + return _sessions[session]; +} + +void SessionGroup::addSession(Session * session) +{ + _sessions.insert(session,false); + + QListIterator masterIter(masters()); + + while ( masterIter.hasNext() ) { + connectPair(masterIter.next(),session); + } +} +void SessionGroup::removeSession(Session * session) +{ + setMasterStatus(session,false); + + QListIterator masterIter(masters()); + + while ( masterIter.hasNext() ) { + disconnectPair(masterIter.next(),session); + } + + _sessions.remove(session); +} +void SessionGroup::setMasterMode(int mode) +{ + _masterMode = mode; + + connectAll(false); + connectAll(true); +} +QList SessionGroup::masters() const +{ + return _sessions.keys(true); +} +void SessionGroup::connectAll(bool connect) +{ + QListIterator masterIter(masters()); + + while ( masterIter.hasNext() ) { + Session * master = masterIter.next(); + + QListIterator otherIter(_sessions.keys()); + while ( otherIter.hasNext() ) { + Session * other = otherIter.next(); + + if ( other != master ) { + if ( connect ) { + connectPair(master,other); + } else { + disconnectPair(master,other); + } + } + } + } +} +void SessionGroup::setMasterStatus(Session * session, bool master) +{ + bool wasMaster = _sessions[session]; + _sessions[session] = master; + + if ((!wasMaster && !master) + || (wasMaster && master)) { + return; + } + + QListIterator iter(_sessions.keys()); + while (iter.hasNext()) { + Session * other = iter.next(); + + if (other != session) { + if (master) { + connectPair(session, other); + } else { + disconnectPair(session, other); + } + } + } +} + +void SessionGroup::connectPair(Session * master , Session * other) +{ +// qDebug() << k_funcinfo; + + if ( _masterMode & CopyInputToAll ) { + qDebug() << "Connection session " << master->nameTitle() << "to" << other->nameTitle(); + + connect( master->emulation() , SIGNAL(sendData(const char *, int, const QTextCodec *)) , other->emulation() , + SLOT(sendString(const char *, int, const QTextCodec *)) ); + } +} +void SessionGroup::disconnectPair(Session * master , Session * other) +{ +// qDebug() << k_funcinfo; + + if ( _masterMode & CopyInputToAll ) { + qDebug() << "Disconnecting session " << master->nameTitle() << "from" << other->nameTitle(); + + disconnect( master->emulation() , SIGNAL(sendData(const char *, int, const QTextCodec *)) , other->emulation() , + SLOT(sendString(const char *, int, const QTextCodec *)) ); + } +} + +//#include "moc_Session.cpp" diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Session.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Session.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Session.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Session.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,714 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright (C) 2007 by Robert Knight + Copyright (C) 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#ifndef SESSION_H +#define SESSION_H + +#include +#include + +#include "Emulation.h" +#include "history/HistoryType.h" +#include "history/HistoryScrollNone.h" + +class KProcess; + +namespace Konsole { + +class Emulation; +class Pty; +class TerminalDisplay; +class ProcessInfo; +//class ZModemDialog; + +/** + * Represents a terminal session consisting of a pseudo-teletype and a terminal emulation. + * The pseudo-teletype (or PTY) handles I/O between the terminal process and Konsole. + * The terminal emulation ( Emulation and subclasses ) processes the output stream from the + * PTY and produces a character image which is then shown on views connected to the session. + * + * Each Session can be connected to one or more views by using the addView() method. + * The attached views can then display output from the program running in the terminal + * or send input to the program in the terminal in the form of keypresses and mouse + * activity. + */ +class Session : public QObject { + Q_OBJECT + +public: + Q_PROPERTY(QString name READ nameTitle) + Q_PROPERTY(int processId READ processId) + Q_PROPERTY(QString keyBindings READ keyBindings WRITE setKeyBindings) + Q_PROPERTY(QSize size READ size WRITE setSize) + + /** + * Constructs a new session. + * + * To start the terminal process, call the run() method, + * after specifying the program and arguments + * using setProgram() and setArguments() + * + * If no program or arguments are specified explicitly, the Session + * falls back to using the program specified in the SHELL environment + * variable. + */ + Session(QObject* parent = nullptr); + ~Session() override; + + /** + * Returns true if the session is currently running. This will be true + * after run() has been called successfully. + */ + bool isRunning() const; + + /** + * Sets the profile associated with this session. + * + * @param profileKey A key which can be used to obtain the current + * profile settings from the SessionManager + */ + void setProfileKey(const QString & profileKey); + /** + * Returns the profile key associated with this session. + * This can be passed to the SessionManager to obtain the current + * profile settings. + */ + QString profileKey() const; + + /** + * Adds a new view for this session. + * + * The viewing widget will display the output from the terminal and + * input from the viewing widget (key presses, mouse activity etc.) + * will be sent to the terminal. + * + * Views can be removed using removeView(). The session is automatically + * closed when the last view is removed. + */ + void addView(TerminalDisplay * widget); + /** + * Removes a view from this session. When the last view is removed, + * the session will be closed automatically. + * + * @p widget will no longer display output from or send input + * to the terminal + */ + void removeView(TerminalDisplay * widget); + + /** + * Returns the views connected to this session + */ + QList views() const; + + /** + * Returns the terminal emulation instance being used to encode / decode + * characters to / from the process. + */ + Emulation * emulation() const; + + /** + * Returns the environment of this session as a list of strings like + * VARIABLE=VALUE + */ + QStringList environment() const; + /** + * Sets the environment for this session. + * @p environment should be a list of strings like + * VARIABLE=VALUE + */ + void setEnvironment(const QStringList & environment); + + /** Returns the unique ID for this session. */ + int sessionId() const; + + /** + * Return the session title set by the user (ie. the program running + * in the terminal), or an empty string if the user has not set a custom title + */ + QString userTitle() const; + + /** + * This enum describes the contexts for which separate + * tab title formats may be specified. + */ + enum TabTitleContext { + /** Default tab title format */ + LocalTabTitle, + /** + * Tab title format used session currently contains + * a connection to a remote computer (via SSH) + */ + RemoteTabTitle + }; + /** + * Sets the format used by this session for tab titles. + * + * @param context The context whoose format should be set. + * @param format The tab title format. This may be a mixture + * of plain text and dynamic elements denoted by a '%' character + * followed by a letter. (eg. %d for directory). The dynamic + * elements available depend on the @p context + */ + void setTabTitleFormat(TabTitleContext context , const QString & format); + /** Returns the format used by this session for tab titles. */ + QString tabTitleFormat(TabTitleContext context) const; + + + /** Returns the arguments passed to the shell process when run() is called. */ + QStringList arguments() const; + /** Returns the program name of the shell process started when run() is called. */ + QString program() const; + + /** + * Sets the command line arguments which the session's program will be passed when + * run() is called. + */ + void setArguments(const QStringList & arguments); + /** Sets the program to be executed when run() is called. */ + void setProgram(const QString & program); + + /** Returns the session's current working directory. */ + QString initialWorkingDirectory() { + return _initialWorkingDir; + } + + /** + * Sets the initial working directory for the session when it is run + * This has no effect once the session has been started. + */ + void setInitialWorkingDirectory( const QString & dir ); + + /** + * Sets the type of history store used by this session. + * Lines of output produced by the terminal are added + * to the history store. The type of history store + * used affects the number of lines which can be + * remembered before they are lost and the storage + * (in memory, on-disk etc.) used. + */ + void setHistoryType(const HistoryType & type); + /** + * Returns the type of history store used by this session. + */ + const HistoryType & historyType() const; + /** + * Clears the history store used by this session. + */ + void clearHistory(); + + /** + * Enables monitoring for activity in the session. + * This will cause notifySessionState() to be emitted + * with the NOTIFYACTIVITY state flag when output is + * received from the terminal. + */ + void setMonitorActivity(bool); + /** Returns true if monitoring for activity is enabled. */ + bool isMonitorActivity() const; + + /** + * Enables monitoring for silence in the session. + * This will cause notifySessionState() to be emitted + * with the NOTIFYSILENCE state flag when output is not + * received from the terminal for a certain period of + * time, specified with setMonitorSilenceSeconds() + */ + void setMonitorSilence(bool); + /** + * Returns true if monitoring for inactivity (silence) + * in the session is enabled. + */ + bool isMonitorSilence() const; + /** See setMonitorSilence() */ + void setMonitorSilenceSeconds(int seconds); + + /** + * Sets the key bindings used by this session. The bindings + * specify how input key sequences are translated into + * the character stream which is sent to the terminal. + * + * @param id The name of the key bindings to use. The + * names of available key bindings can be determined using the + * KeyboardTranslatorManager class. + */ + void setKeyBindings(const QString & id); + /** Returns the name of the key bindings used by this session. */ + QString keyBindings() const; + + /******** Modify by ut000610 daizhengwen 2020-06-02: 设置删除和退格按钮****************/ + void setBackspaceMode(char *key, int length); + void setDeleteMode(char *key, int length); + /********************* Modify by ut000610 daizhengwen End ************************/ + + /** + * This enum describes the available title roles. + */ + enum TitleRole { + /** The name of the session. */ + NameRole, + /** The title of the session which is displayed in tabs etc. */ + DisplayedTitleRole + }; + + /** Sets the session's title for the specified @p role to @p title. */ + void setTitle(TitleRole role , const QString & title); + /** Returns the session's title for the specified @p role. */ + QString title(TitleRole role) const; + /** Convenience method used to read the name property. Returns title(Session::NameRole). */ + QString nameTitle() const { + return title(Session::NameRole); + } + + /** Sets the name of the icon associated with this session. */ + void setIconName(const QString & iconName); + /** Returns the name of the icon associated with this session. */ + QString iconName() const; + + /** Sets the text of the icon associated with this session. */ + void setIconText(const QString & iconText); + /** Returns the text of the icon associated with this session. */ + QString iconText() const; + + /** Flag if the title/icon was changed by user/shell. */ + bool isTitleChanged() const; + + /** Specifies whether a utmp entry should be created for the pty used by this session. */ + void setAddToUtmp(bool); + + /** Sends the specified @p signal to the terminal process. */ + bool sendSignal(int signal); + + /** + * Specifies whether to close the session automatically when the terminal + * process terminates. + */ + void setAutoClose(bool b) { + _autoClose = b; + } + + /** + * Sets whether flow control is enabled for this terminal + * session. + */ + void setFlowControlEnabled(bool enabled); + + /** Returns whether flow control is enabled for this terminal session. */ + bool flowControlEnabled() const; + + /** + * Sends @p text to the current foreground terminal program. + */ + void sendText(const QString & text) const; + + void sendKeyEvent(QKeyEvent* e) const; + + /** Returns dynamic process name. */ + QString getDynamicProcessName(); + + /** Returns dynamic process id */ + int getDynamicProcessId(); + + /** + * Returns the process id of the terminal process. + * This is the id used by the system API to refer to the process. + */ + int processId() const; + + /** + * Returns foreground process's name + */ + QString foregroundProcessName(); + + /** + * Get process info of current Session + */ + ProcessInfo *getProcessInfo(); + + void updateSessionProcessInfo(); + bool updateForegroundProcessInfo(); + void updateWorkingDirectory(); + + /** + * Returns the process id of the terminal's foreground process. + * This is initially the same as processId() but can change + * as the user starts other programs inside the terminal. + */ + int foregroundProcessId(); + + /** Returns true if the user has started a program in the session. */ + bool isForegroundProcessActive(); + + /** Returns the terminal session's window size in lines and columns. */ + QSize size(); + /** + * Emits a request to resize the session to accommodate + * the specified window size. + * + * @param size The size in lines and columns to request. + */ + void setSize(const QSize & size); + + /** Sets the text codec used by this session's terminal emulation. */ + void setCodec(QTextCodec * codec); + + /** + * Sets whether the session has a dark background or not. The session + * uses this information to set the COLORFGBG variable in the process's + * environment, which allows the programs running in the terminal to determine + * whether the background is light or dark and use appropriate colors by default. + * + * This has no effect once the session is running. + */ + void setDarkBackground(bool darkBackground); + /** + * Returns true if the session has a dark background. + * See setDarkBackground() + */ + bool hasDarkBackground() const; + + /** + * Attempts to get the shell program to redraw the current display area. + * This can be used after clearing the screen, for example, to get the + * shell to redraw the prompt line. + */ + void refresh(); + +// void startZModem(const QString &rz, const QString &dir, const QStringList &list); +// void cancelZModem(); +// bool isZModemBusy() { return _zmodemBusy; } + + /** + * Returns a pty slave file descriptor. + * This can be used for display and control + * a remote terminal. + */ + int getPtySlaveFd() const; + + // 获取此时tty的eraseChar + char getEraseChar(); + +public slots: + + /** + * Starts the terminal session. + * + * This creates the terminal process and connects the teletype to it. + */ + void run(); + + /** + * Starts the terminal session for "as is" PTY + * (without the direction a data to internal terminal process). + * It can be used for control or display a remote/external terminal. + */ + void runEmptyPTY(); + + /** + * Closes the terminal session. This sends a hangup signal + * (SIGHUP) to the terminal process and causes the done(Session*) + * signal to be emitted. + */ + void close(); + + /** + * Changes the session title or other customizable aspects of the terminal + * emulation display. For a list of what may be changed see the + * Emulation::titleChanged() signal. + */ + void setUserTitle( int, const QString & caption ); + +signals: + + /** Emitted when the terminal process starts. */ + void started(); + + /** + * Emitted when the terminal process exits. + */ + void finished(); + + /** + * Emitted when output is received from the terminal process. + */ + void receivedData( const QString & text ); + + /** Emitted when the session's title has changed. */ + void titleChanged(); + + /** Emitted when the session's profile has changed. */ + void profileChanged(const QString & profile); + + /** + * Emitted when the activity state of this session changes. + * + * @param state The new state of the session. This may be one + * of NOTIFYNORMAL, NOTIFYSILENCE or NOTIFYACTIVITY + */ + void stateChanged(int state); + + /** + * Emitted when the current working directory of this session changes. + * + * @param dir The new current working directory of the session. + */ + void currentDirectoryChanged(const QString &dir); + + /** Emitted when a bell event occurs in the session. */ + void bellRequest( const QString & message ); + + /** + * Requests that the color the text for any tabs associated with + * this session should be changed; + * + * TODO: Document what the parameter does + */ + void changeTabTextColorRequest(int); + + /** + * Requests that the background color of views on this session + * should be changed. + */ + void changeBackgroundColorRequest(const QColor &); + + /** TODO: Document me. */ + void openUrlRequest(const QString & url); + + /** TODO: Document me. */ +// void zmodemDetected(); + + /** + * Emitted when the terminal process requests a change + * in the size of the terminal window. + * + * @param size The requested window size in terms of lines and columns. + */ + void resizeRequest(const QSize & size); + + /** + * Emitted when a profile change command is received from the terminal. + * + * @param text The text of the command. This is a string of the form + * "PropertyName=Value;PropertyName=Value ..." + */ + void profileChangeCommandReceived(const QString & text); + + /** + * Emitted when the flow control state changes. + * + * @param enabled True if flow control is enabled or false otherwise. + */ + void flowControlEnabledChanged(bool enabled); + + /** + * Broker for Emulation::cursorChanged() signal + */ + void cursorChanged(Emulation::KeyboardCursorShape cursorShape, bool blinkingCursorEnabled); + + void silence(); + void activity(); + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + bool sessionUninstallTerminal(QString commandname); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 end***************/ + + // 标签标题参数改变 dzw 2020-12-2 + void titleArgsChange(QString key, QString value); + + // warning提示信息 currentShell当前使用的shell, 启用shell是否成功 true 替换了shell false 替换shell但启动失败 + void shellWarningMessage(QString currentShell, bool isSuccess); + +private slots: + void done(int); + +// void fireZModemDetected(); + + void onReceiveBlock(const char * buffer, int len, bool isCommandExec); + void monitorTimerDone(); + + void onViewSizeChange(int height, int width); + void onEmulationSizeChange(QSize); + + void activityStateSet(int); + + //automatically detach views from sessions when view is destroyed + void viewDestroyed(QObject * view); + +// void zmodemReadStatus(); +// void zmodemReadAndSendBlock(); +// void zmodemRcvBlock(const char *data, int len); +// void zmodemFinished(); + + // 目前为了更新标签标题信息 + void onUpdateTitleArgs(); + +private: + + void updateTerminalSize(int height, int width); + WId windowId() const; + + int _uniqueIdentifier; + + Pty *_shellProcess; + Emulation * _emulation; + + QList _views; + + bool _monitorActivity; + bool _monitorSilence; + bool _notifiedActivity; + bool _masterMode; + bool _autoClose; + bool _wantedClose; + QTimer * _monitorTimer; + + int _silenceSeconds; + + QString _nameTitle; + QString _displayTitle; + QString _userTitle; + + QString _localTabTitleFormat; + QString _remoteTabTitleFormat; + + QString _iconName; + QString _iconText; // as set by: echo -en '\033]1;IconText\007 + bool _isTitleChanged; ///< flag if the title/icon was changed by user + bool _addToUtmp; + bool _flowControl; + bool _fullScripting; + + QString _program; + QStringList _arguments; + + QStringList _environment; + int _sessionId; + + QString _initialWorkingDir; + QString _currentWorkingDir; + QUrl _reportedWorkingUrl; + + ProcessInfo *_sessionProcessInfo = nullptr; + ProcessInfo *_foregroundProcessInfo = nullptr; + int _foregroundPid; + + // ZModem +// bool _zmodemBusy; +// KProcess* _zmodemProc; +// ZModemDialog* _zmodemProgress; + + // Color/Font Changes by ESC Sequences + + QColor _modifiedBackground; // as set by: echo -en '\033]11;Color\007 + + QString _profileKey; + + bool _hasDarkBackground; + + static int lastSessionId; + + int ptySlaveFd; + + // title format args + QString _userName; + QString _currentDir; + QString _programName; + + QTimer *_updateTimer = nullptr; +}; + +/** + * Provides a group of sessions which is divided into master and slave sessions. + * Activity in master sessions can be propagated to all sessions within the group. + * The type of activity which is propagated and method of propagation is controlled + * by the masterMode() flags. + */ +class SessionGroup : public QObject { + Q_OBJECT + +public: + /** Constructs an empty session group. */ + SessionGroup(); + /** Destroys the session group and removes all connections between master and slave sessions. */ + ~SessionGroup() override; + + /** Adds a session to the group. */ + void addSession( Session * session ); + /** Removes a session from the group. */ + void removeSession( Session * session ); + + /** Returns the list of sessions currently in the group. */ + QList sessions() const; + + /** + * Sets whether a particular session is a master within the group. + * Changes or activity in the group's master sessions may be propagated + * to all the sessions in the group, depending on the current masterMode() + * + * @param session The session whoose master status should be changed. + * @param master True to make this session a master or false otherwise + */ + void setMasterStatus( Session * session , bool master ); + /** Returns the master status of a session. See setMasterStatus() */ + bool masterStatus( Session * session ) const; + + /** + * This enum describes the options for propagating certain activity or + * changes in the group's master sessions to all sessions in the group. + */ + enum MasterMode { + /** + * Any input key presses in the master sessions are sent to all + * sessions in the group. + */ + CopyInputToAll = 1 + }; + + /** + * Specifies which activity in the group's master sessions is propagated + * to all sessions in the group. + * + * @param mode A bitwise OR of MasterMode flags. + */ + void setMasterMode( int mode ); + /** + * Returns a bitwise OR of the active MasterMode flags for this group. + * See setMasterMode() + */ + int masterMode() const; + +private: + void connectPair(Session * master , Session * other); + void disconnectPair(Session * master , Session * other); + void connectAll(bool connect); + QList masters() const; + + // maps sessions to their master status + QHash _sessions; + + int _masterMode; +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SessionManager.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SessionManager.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SessionManager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SessionManager.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,150 @@ +/* + This file is part of Konsole, KDE's terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "SessionManager.h" + +// Qt +#include +#include +#include + +// Konsole +#include "Session.h" + +using namespace Konsole; + +Q_GLOBAL_STATIC(SessionManager, theSessionManager) +SessionManager *SessionManager::instance() +{ + return theSessionManager; +} + +SessionManager::SessionManager() +{ +} + +SessionManager::~SessionManager() +{ +} + +//void SessionManager::closeAllSessions() +//{ +// // close remaining sessions +// for (int i = 0; i < _sessions.size(); i++) { +// Session *session = _sessions.at(i); +// session->close(); +// } +// _sessions.clear(); +//} + +QList SessionManager::sessions() const +{ + return _sessions; +} + +void SessionManager::sessionTerminated(Session *session) +{ + Q_ASSERT(session); + + _sessions.removeAll(session); + + session->deleteLater(); +} + +void SessionManager::saveSession(Session *session) +{ + _sessions << session; +} + +bool SessionManager::removeSession(int id) +{ + if (_sessions.count() == 0) { + return false; + } + + int removeIndex = -1; + for (int i = 0; i < _sessions.size(); i++) { + Session *session = _sessions.at(i); + if (session->sessionId() == id) { + removeIndex = i; + break; + } + } + + if (removeIndex >= 0) { + _sessions.removeAt(removeIndex); + return true; + } + + return false; +} + +int SessionManager::getSessionId(Session *session) +{ + return session->sessionId(); +} + +Session *SessionManager::idToSession(int id) +{ + for (int i = 0; i < _sessions.size(); i++) { + Session *session = _sessions.at(i); + if (session->sessionId() == id) { + return session; + } + } + // this should not happen + qDebug() << "Failed to find session for ID" << id; + return nullptr; +} + +void SessionManager::saveCurrShellPrompt(int sessionId, QString strPrompt) +{ + strPrompt = strPrompt.trimmed(); + _shellPromptSessionMap.insert(sessionId, strPrompt); +} + +QString SessionManager::getCurrShellPrompt(int sessionId) +{ + return _shellPromptSessionMap.value(sessionId); +} + +void SessionManager::saveCurrShellCommand(int sessionId, QString strCommand) +{ + strCommand = strCommand.trimmed(); + _shellCommandSessionMap.insert(sessionId, strCommand); +} + +QString SessionManager::getCurrShellCommand(int sessionId) +{ + return _shellCommandSessionMap.value(sessionId); +} + +void SessionManager::setTerminalResizing(int sessionId, bool bTerminalResizing) +{ + _terminalResizeStateMap.insert(sessionId, bTerminalResizing); +} + +bool SessionManager::isTerminalResizing(int sessionId) +{ + return _terminalResizeStateMap.value(sessionId); +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SessionManager.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SessionManager.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/SessionManager.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/SessionManager.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,112 @@ +/* + This file is part of Konsole, KDE's terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef SESSIONMANAGER_H +#define SESSIONMANAGER_H + +// Qt +#include +#include +#include +#include + +namespace Konsole { +class Session; + +/** + * Manages running terminal sessions. + */ +class SessionManager : public QObject +{ + Q_OBJECT + +public: + /** + * Constructs a new session manager and loads information about the available + * profiles. + */ + SessionManager(); + + /** + * Destroys the SessionManager. All running sessions should be closed + * (via closeAllSessions()) before the SessionManager is destroyed. + */ + ~SessionManager() Q_DECL_OVERRIDE; + + /** + * Returns the session manager instance. + */ + static SessionManager *instance(); + + /** Kill all running sessions. */ +// void closeAllSessions(); + + /** + * Returns a list of active sessions. + */ + QList sessions() const; + + // System session management + void saveSession(Session *session); + bool removeSession(int id); + int getSessionId(Session *session); + Session *idToSession(int id); + + //用于存储当前的命令提示符 + void saveCurrShellPrompt(int sessionId, QString strPrompt); + QString getCurrShellPrompt(int sessionId); + + //用于存储当前的执行的命令字符串 + void saveCurrShellCommand(int sessionId, QString strCommand); + QString getCurrShellCommand(int sessionId); + + //用于存储终端控件是否正在resize的状态值 true表示正在resize + void setTerminalResizing(int sessionId, bool bTerminalResizing); + bool isTerminalResizing(int sessionId); + +signals: + void sessionIdle(bool isIdle); + +protected Q_SLOTS: + /** + * Called to inform the manager that a session has finished executing. + * + * @param session The Session which has finished executing. + */ + void sessionTerminated(Session *session); + +private: + QList _sessions; // list of running sessions + QHash _restoreMapping; + + //存储当前的命令提示符Map + QMap _shellPromptSessionMap; + //存储当前的执行的命令字符串Map + QMap _shellCommandSessionMap; + //存储终端控件是否正在resize的状态值Map + QMap _terminalResizeStateMap; + //存储当前shell提示符的路径深度Map + QMap _terminalPathDepthMap; +}; + +} +#endif //SESSIONMANAGER_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ShellCommand.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ShellCommand.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ShellCommand.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ShellCommand.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,168 @@ +/* + Copyright (C) 2007 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +// Own +#include "ShellCommand.h" + +//some versions of gcc(4.3) require explicit include +#include + + +using namespace Konsole; + +// expands environment variables in 'text' +// function copied from kdelibs/kio/kio/kurlcompletion.cpp +static bool expandEnv(QString & text); + +ShellCommand::ShellCommand(const QString & fullCommand) +{ + bool inQuotes = false; + + QString builder; + + for ( int i = 0 ; i < fullCommand.count() ; i++ ) { + QChar ch = fullCommand[i]; + + const bool isLastChar = ( i == fullCommand.count() - 1 ); + const bool isQuote = ( ch == QLatin1Char('\'') || ch == QLatin1Char('\"') ); + + if ( !isLastChar && isQuote ) { + inQuotes = !inQuotes; + } else { + if ( (!ch.isSpace() || inQuotes) && !isQuote ) { + builder.append(ch); + } + + if ( (ch.isSpace() && !inQuotes) || ( i == fullCommand.count()-1 ) ) { + _arguments << builder; + builder.clear(); + } + } + } +} +ShellCommand::ShellCommand(const QString & command , const QStringList & arguments) : _arguments(arguments) +{ + if ( !_arguments.isEmpty() ) { + _arguments[0] = command; + } +} +QString ShellCommand::fullCommand() const +{ + return _arguments.join(QLatin1Char(' ')); +} +QString ShellCommand::command() const +{ + if ( !_arguments.isEmpty() ) { + return _arguments[0]; + } else { + return QString(); + } +} +QStringList ShellCommand::arguments() const +{ + return _arguments; +} +bool ShellCommand::isRootCommand() const +{ + Q_ASSERT(0); // not implemented yet + return false; +} +bool ShellCommand::isAvailable() const +{ + Q_ASSERT(0); // not implemented yet + return false; +} +QStringList ShellCommand::expand(const QStringList & items) +{ + QStringList result; + + for(const QString &item : items) { + result << expand(item); + } + + return result; +} +QString ShellCommand::expand(const QString & text) +{ + QString result = text; + expandEnv(result); + return result; +} + +/* + * expandEnv + * + * Expand environment variables in text. Escaped '$' characters are ignored. + * Return true if any variables were expanded + */ +static bool expandEnv( QString & text ) +{ + // Find all environment variables beginning with '$' + // + int pos = 0; + + bool expanded = false; + + while ( (pos = text.indexOf(QLatin1Char('$'), pos)) != -1 ) { + + // Skip escaped '$' + // + if ( pos > 0 && text.at(pos-1) == QLatin1Char('\\') ) { + pos++; + } + // Variable found => expand + // + else { + // Find the end of the variable = next '/' or ' ' + // + int pos2 = text.indexOf( QLatin1Char(' '), pos+1 ); + int pos_tmp = text.indexOf( QLatin1Char('/'), pos+1 ); + + if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) ) { + pos2 = pos_tmp; + } + + if ( pos2 == -1 ) { + pos2 = text.length(); + } + + // Replace if the variable is terminated by '/' or ' ' + // and defined + // + if ( pos2 >= 0 ) { + int len = pos2 - pos; + QString key = text.mid( pos+1, len-1); + QString value = + QString::fromLocal8Bit( qgetenv(key.toLocal8Bit().constData()) ); + + if ( !value.isEmpty() ) { + expanded = true; + text.replace( pos, len, value ); + pos = pos + value.length(); + } else { + pos = pos2; + } + } + } + } + + return expanded; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ShellCommand.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ShellCommand.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/ShellCommand.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/ShellCommand.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,92 @@ +/* + Copyright (C) 2007 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + Rewritten for QT4 by e_k , Copyright (C)2008 +*/ + +#ifndef SHELLCOMMAND_H +#define SHELLCOMMAND_H + +// Qt +#include + +namespace Konsole { + +/** + * A class to parse and extract information about shell commands. + * + * ShellCommand can be used to: + * + *
    + *
  • Take a command-line (eg "/bin/sh -c /path/to/my/script") and split it + * into its component parts (eg. the command "/bin/sh" and the arguments + * "-c","/path/to/my/script") + *
  • + *
  • Take a command and a list of arguments and combine them to + * form a complete command line. + *
  • + *
  • Determine whether the binary specified by a command exists in the + * user's PATH. + *
  • + *
  • Determine whether a command-line specifies the execution of + * another command as the root user using su/sudo etc. + *
  • + *
+ */ +class ShellCommand { +public: + /** + * Constructs a ShellCommand from a command line. + * + * @param fullCommand The command line to parse. + */ + ShellCommand(const QString & fullCommand); + /** + * Constructs a ShellCommand with the specified @p command and @p arguments. + */ + ShellCommand(const QString & command , const QStringList & arguments); + + /** Returns the command. */ + QString command() const; + /** Returns the arguments. */ + QStringList arguments() const; + + /** + * Returns the full command line. + */ + QString fullCommand() const; + + /** Returns true if this is a root command. */ + bool isRootCommand() const; + /** Returns true if the program specified by @p command() exists. */ + bool isAvailable() const; + + /** Expands environment variables in @p text .*/ + static QString expand(const QString & text); + + /** Expands environment variables in each string in @p list. */ + static QStringList expand(const QStringList & items); + +private: + QStringList _arguments; +}; + +} + +#endif // SHELLCOMMAND_H + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,256 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "TerminalCharacterDecoder.h" + +// std +#include + +// Qt +#include + +// KDE +//#include + +// Konsole +#include "konsole_wcwidth.h" + +#include + +using namespace Konsole; +PlainTextDecoder::PlainTextDecoder() + : _output(nullptr) + , _includeTrailingWhitespace(true) + , _recordLinePositions(false) +{ + +} +void PlainTextDecoder::setTrailingWhitespace(bool enable) +{ + _includeTrailingWhitespace = enable; +} +bool PlainTextDecoder::trailingWhitespace() const +{ + return _includeTrailingWhitespace; +} +void PlainTextDecoder::begin(QTextStream* output) +{ + _output = output; + if (!_linePositions.isEmpty()) + _linePositions.clear(); +} +void PlainTextDecoder::end() +{ + _output = nullptr; +} + +void PlainTextDecoder::setRecordLinePositions(bool record) +{ + _recordLinePositions = record; +} +QList PlainTextDecoder::linePositions() const +{ + return _linePositions; +} +void PlainTextDecoder::decodeLine(const Character* const characters, int count, LineProperty /*properties*/ + ) +{ + Q_ASSERT( _output ); + + if (_recordLinePositions && _output->string()) + { + int pos = _output->string()->count(); + _linePositions << pos; + } + + //TODO should we ignore or respect the LINE_WRAPPED line property? + + //note: we build up a QString and send it to the text stream rather writing into the text + //stream a character at a time because it is more efficient. + //(since QTextStream always deals with QStrings internally anyway) + std::wstring plainText; + plainText.reserve(count); + + int outputCount = count; + + // if inclusion of trailing whitespace is disabled then find the end of the + // line + if ( !_includeTrailingWhitespace ) + { + for (int i = count-1 ; i >= 0 ; i--) + { + if ( characters[i].character != L' ' ) + break; + else + outputCount--; + } + } + + for (int i=0;i') + text.append(L">"); + else + text.push_back(ch); + } + else + { + text.append(L" "); //HTML truncates multiple spaces, so use a space marker instead + } + + } + + //close any remaining open inner spans + if ( _innerSpanOpen ) + closeSpan(text); + + //start new line + text.append(L"
"); + + *_output << QString::fromStdWString(text); +} +void HTMLDecoder::openSpan(std::wstring& text , const QString& style) +{ + text.append( QString(QLatin1String("")).arg(style).toStdWString() ); +} + +void HTMLDecoder::closeSpan(std::wstring& text) +{ + text.append(L""); +} + +void HTMLDecoder::setColorTable(const ColorEntry* table) +{ + _colorTable = table; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalCharacterDecoder.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,150 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2006-2008 by Robert Knight + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef TERMINAL_CHARACTER_DECODER_H +#define TERMINAL_CHARACTER_DECODER_H + +#include "Character.h" + +#include + +class QTextStream; + +namespace Konsole +{ + +/** + * Base class for terminal character decoders + * + * The decoder converts lines of terminal characters which consist of a unicode character, foreground + * and background colours and other appearance-related properties into text strings. + * + * Derived classes may produce either plain text with no other colour or appearance information, or + * they may produce text which incorporates these additional properties. + */ +class TerminalCharacterDecoder +{ +public: + virtual ~TerminalCharacterDecoder() {} + + /** Begin decoding characters. The resulting text is appended to @p output. */ + virtual void begin(QTextStream* output) = 0; + /** End decoding. */ + virtual void end() = 0; + + /** + * Converts a line of terminal characters with associated properties into a text string + * and writes the string into an output QTextStream. + * + * @param characters An array of characters of length @p count. + * @param count The number of characters + * @param properties Additional properties which affect all characters in the line + */ + virtual void decodeLine(const Character* const characters, + int count, + LineProperty properties) = 0; +}; + +/** + * A terminal character decoder which produces plain text, ignoring colours and other appearance-related + * properties of the original characters. + */ +class PlainTextDecoder : public TerminalCharacterDecoder +{ +public: + PlainTextDecoder(); + + /** + * Set whether trailing whitespace at the end of lines should be included + * in the output. + * Defaults to true. + */ + void setTrailingWhitespace(bool enable); + /** + * Returns whether trailing whitespace at the end of lines is included + * in the output. + */ + bool trailingWhitespace() const; + /** + * Returns of character positions in the output stream + * at which new lines where added. Returns an empty if setTrackLinePositions() is false or if + * the output device is not a string. + */ + QList linePositions() const; + /** Enables recording of character positions at which new lines are added. See linePositions() */ + void setRecordLinePositions(bool record); + + void begin(QTextStream* output) override; + void end() override; + + void decodeLine(const Character* const characters, + int count, + LineProperty properties) override; + + +private: + QTextStream* _output; + bool _includeTrailingWhitespace; + + bool _recordLinePositions; + QList _linePositions; +}; + +/** + * A terminal character decoder which produces pretty HTML markup + */ +class HTMLDecoder : public TerminalCharacterDecoder +{ +public: + /** + * Constructs an HTML decoder using a default black-on-white color scheme. + */ + HTMLDecoder(); + + /** + * Sets the colour table which the decoder uses to produce the HTML colour codes in its + * output + */ + void setColorTable( const ColorEntry* table ); + + void decodeLine(const Character* const characters, + int count, + LineProperty properties) override; + + void begin(QTextStream* output) override; + void end() override; + +private: + void openSpan(std::wstring& text , const QString& style); + void closeSpan(std::wstring& text); + + QTextStream* _output; + const ColorEntry* _colorTable; + bool _innerSpanOpen; + quint8 _lastRendition; + CharacterColor _lastForeColor; + CharacterColor _lastBackColor; + +}; + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalDisplay.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalDisplay.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalDisplay.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalDisplay.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,4065 @@ +/* + This file is part of Konsole, a terminal emulator for KDE. + + Copyright 2006-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "TerminalDisplay.h" +#include "SessionManager.h" + +// Qt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// KDE +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include + +// Konsole +//#include +#include "Filter.h" +#include "konsole_wcwidth.h" +#include "ScreenWindow.h" +#include "Screen.h" +#include "TerminalCharacterDecoder.h" + +using namespace Konsole; + +typedef quint16 RenditionFlags; + +#ifndef loc +#define loc(X,Y) ((Y)*_columns+(X)) +#endif + +#define yMouseScroll 1 + +#define REPCHAR "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + "abcdefgjijklmnopqrstuvwxyz" \ + "0123456789./+@" + +const ColorEntry Konsole::base_color_table[TABLE_COLORS] = +// The following are almost IBM standard color codes, with some slight +// gamma correction for the dim colors to compensate for bright X screens. +// It contains the 8 ansiterm/xterm colors in 2 intensities. +{ + // Fixme: could add faint colors here, also. + // normal + ColorEntry(QColor(0x00,0x00,0x00), false), ColorEntry( QColor(0xB2,0xB2,0xB2), true), // Dfore, Dback + ColorEntry(QColor(0x00,0x00,0x00), false), ColorEntry( QColor(0xB2,0x18,0x18), false), // Black, Red + ColorEntry(QColor(0x18,0xB2,0x18), false), ColorEntry( QColor(0xB2,0x68,0x18), false), // Green, Yellow + ColorEntry(QColor(0x18,0x18,0xB2), false), ColorEntry( QColor(0xB2,0x18,0xB2), false), // Blue, Magenta + ColorEntry(QColor(0x18,0xB2,0xB2), false), ColorEntry( QColor(0xB2,0xB2,0xB2), false), // Cyan, White + // intensiv + ColorEntry(QColor(0x00,0x00,0x00), false), ColorEntry( QColor(0xFF,0xFF,0xFF), true), + ColorEntry(QColor(0x68,0x68,0x68), false), ColorEntry( QColor(0xFF,0x54,0x54), false), + ColorEntry(QColor(0x54,0xFF,0x54), false), ColorEntry( QColor(0xFF,0xFF,0x54), false), + ColorEntry(QColor(0x54,0x54,0xFF), false), ColorEntry( QColor(0xFF,0x54,0xFF), false), + ColorEntry(QColor(0x54,0xFF,0xFF), false), ColorEntry( QColor(0xFF,0xFF,0xFF), false) +}; + +// scroll increment used when dragging selection at top/bottom of window. + +// static +bool TerminalDisplay::_antialiasText = true; +bool TerminalDisplay::HAVE_TRANSPARENCY = true; + +/***add begin by ut001121 zhangmeng 20200912 初始化字号限制 修复42250***/ +int Konsole::__minFontSize = 0; +int Konsole::__maxFontSize = 0x7fffffff; +/***add end by ut001121***/ + +// we use this to force QPainter to display text in LTR mode +// more information can be found in: http://unicode.org/reports/tr9/ +const QChar LTR_OVERRIDE_CHAR( 0x202D ); + +/* ------------------------------------------------------------------------- */ +/* */ +/* Colors */ +/* */ +/* ------------------------------------------------------------------------- */ + +/* Note that we use ANSI color order (bgr), while IBMPC color order is (rgb) + + Code 0 1 2 3 4 5 6 7 + ----------- ------- ------- ------- ------- ------- ------- ------- ------- + ANSI (bgr) Black Red Green Yellow Blue Magenta Cyan White + IBMPC (rgb) Black Blue Green Cyan Red Magenta Yellow White +*/ + +ScreenWindow* TerminalDisplay::screenWindow() const +{ + return _screenWindow; +} +void TerminalDisplay::setScreenWindow(ScreenWindow* window) +{ + // disconnect existing screen window if any + if ( _screenWindow ) + { + disconnect( _screenWindow , nullptr , this , nullptr ); + } + + _screenWindow = window; + + if ( window ) + { + +// TODO: Determine if this is an issue. +//#warning "The order here is not specified - does it matter whether updateImage or updateLineProperties comes first?" + connect( _screenWindow , SIGNAL(outputChanged()) , this , SLOT(updateLineProperties()) ); + connect( _screenWindow , SIGNAL(outputChanged()) , this , SLOT(updateImage()) ); + connect( _screenWindow , SIGNAL(outputChanged()) , this , SLOT(updateFilters()) ); + connect( _screenWindow , SIGNAL(scrolled(int)) , this , SLOT(updateFilters()) ); + connect( _screenWindow, SIGNAL(selectionCleared()), this, SLOT(selectionCleared()) ); + window->setWindowLines(_lines); + window->screen()->setSessionId(_sessionId); + window->screen()->setReflowLines(true); + } +} + +const ColorEntry* TerminalDisplay::colorTable() const +{ + return _colorTable; +} +void TerminalDisplay::setBackgroundColor(const QColor& color) +{ + _colorTable[DEFAULT_BACK_COLOR].color = color; + QPalette p = palette(); + p.setColor( backgroundRole(), color ); + setPalette( p ); + + // Avoid propagating the palette change to the scroll bar + _scrollBar->setPalette( QApplication::palette() ); + + update(); +} +void TerminalDisplay::setForegroundColor(const QColor& color) +{ + _colorTable[DEFAULT_FORE_COLOR].color = color; + + update(); +} +void TerminalDisplay::setColorTable(const ColorEntry table[]) +{ + for (int i = 0; i < TABLE_COLORS; i++) + _colorTable[i] = table[i]; + + setBackgroundColor(_colorTable[DEFAULT_BACK_COLOR].color); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Font */ +/* */ +/* ------------------------------------------------------------------------- */ + +/* + The VT100 has 32 special graphical characters. The usual vt100 extended + xterm fonts have these at 0x00..0x1f. + + QT's iso mapping leaves 0x00..0x7f without any changes. But the graphicals + come in here as proper unicode characters. + + We treat non-iso10646 fonts as VT100 extended and do the requiered mapping + from unicode to 0x00..0x1f. The remaining translation is then left to the + QCodec. +*/ + +bool TerminalDisplay::canDraw(uint ucs4cp) const { + return (0x2500 <= ucs4cp && ucs4cp <= 0x259F); +} + +bool TerminalDisplay::isLineCharString(const QString& string) const { + if (string.length() == 0) { + return false; + } + + return canDraw(string.at(0).unicode()); +} + +/******************************************************************************* + 1. @函数: setIsAllowScroll + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-16 + 4. @说明: 设置是否允许滚动到最新的位置 + 当有输出且并不是在setZoom之后,此标志为true 允许滚动 + 当有输出且在setZoom之后,比标志位false 不允许滚动 +*******************************************************************************/ +void TerminalDisplay::setIsAllowScroll(bool isAllowScroll) +{ + m_isAllowScroll = isAllowScroll; +} + +/******************************************************************************* + 1. @函数: getIsAllowScroll + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-16 + 4. @说明: 获取是否允许输出时滚动 +*******************************************************************************/ +bool TerminalDisplay::getIsAllowScroll() const +{ + return m_isAllowScroll; +} + + +// assert for i in [0..31] : vt100extended(vt100_graphics[i]) == i. + +unsigned short Konsole::vt100_graphics[32] = +{ // 0/8 1/9 2/10 3/11 4/12 5/13 6/14 7/15 + 0x0020, 0x25C6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0, + 0x00b1, 0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, + 0xF800, 0xF801, 0x2500, 0xF803, 0xF804, 0x251c, 0x2524, 0x2534, + 0x252c, 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00b7 +}; + +void TerminalDisplay::fontChange(const QFont&) +{ + QFontMetrics fm(font()); + /******** Modify by ut001000 renfeixiang 2020-06-24:修改字体高度的获取方法,由QFontMetrics的height获取,改成_fontWidth + font().pointSize() bug#34902 Begin***************/ + //_fontHeight = fm.height() + _lineSpacing; //条幅黑体字体使用QFontMetrics的height获取字体高度是统一的1值,显示字体失败,现在忽略字体原有高度 + + // waba TerminalDisplay 1.123: + // "Base character width on widest ASCII character. This prevents too wide + // characters in the presence of double wide (e.g. Japanese) characters." + // Get the width from representative normal width characters + _fontWidth = qRound((static_cast(fm.horizontalAdvance(QStringLiteral(REPCHAR))) / static_cast(qstrlen(REPCHAR)))); + + //修改方法:修改字体高度的获取方法,修改成字体宽度+字体的大小:_fontWidth + font().pointSize() + _fontHeight = _fontWidth + font().pointSize() + _lineSpacing; + /******** Modify by ut001000 renfeixiang 2020-06-24: bug#34902 End***************/ + _fixedFont = true; + + const int fw = fm.horizontalAdvance(QLatin1Char(REPCHAR[0])); + for (unsigned int i = 1; i < qstrlen(REPCHAR); i++) { + if (fw != fm.horizontalAdvance(QLatin1Char(REPCHAR[i]))) { + _fixedFont = false; + break; + } + } + + if (_fontWidth < 1) + _fontWidth=1; + + _fontAscent = fm.ascent(); + + emit changedFontMetricSignal( _fontHeight, _fontWidth ); + propagateSize(); + + // We will run paint event testing procedure. + // Although this operation will destory the orignal content, + // the content will be drawn again after the test. + //_drawTextTestFlag = true;// + //----------add by nyq to slove the twinkle of the window-- + _drawTextTestFlag = false; + //--------------------------------------------------------- + update(); +} + +void TerminalDisplay::calDrawTextAdditionHeight(QPainter& painter) +{ + QRect test_rect, feedback_rect; + test_rect.setRect(1, 1, _fontWidth * 4, _fontHeight); + painter.drawText(test_rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + QLatin1String("Mq"), &feedback_rect); + + //qDebug() << "test_rect:" << test_rect << "feeback_rect:" << feedback_rect; + + _drawTextAdditionHeight = (feedback_rect.height() - _fontHeight) / 2; + if(_drawTextAdditionHeight < 0) { + _drawTextAdditionHeight = 0; + } + + // update the original content + _drawTextTestFlag = false; + update(); +} + +void TerminalDisplay::setVTFont(const QFont& f) +{ + /***add begin by ut001121 zhangmeng 20200908 限制字体大小 修复BUG42250***/ + /***add begin by ut001121 zhangmeng 20200908 限制字体大小 修复BUG42412***/ + if(f.pointSize() < __minFontSize || f.pointSize() > __maxFontSize){ + return; + } + /***add end by ut001121***/ + + // 放大缩小时需要一个标志位 + // 该标志位负责取消输出时滚动 + // 发送信号修改标志位 => 调整大小时,不允许接收输出时滚动的设置 + m_isAllowScroll = false; + + QFont newFont(f); + int strategy = 0; + + // hint that text should be drawn with- or without anti-aliasing. + // depending on the user's font configuration, this may not be respected + strategy |= _antialiasText ? QFont::PreferAntialias : QFont::NoAntialias; + + // Konsole cannot handle non-integer font metrics + strategy |= QFont::ForceIntegerMetrics; + + // In case the provided font doesn't have some specific characters it should + // fall back to a Monospace fonts. + newFont.setStyleHint(QFont::TypeWriter, QFont::StyleStrategy(strategy)); + + // Try to check that a good font has been loaded. + // For some fonts, ForceIntegerMetrics causes height() == 0 which + // will cause Konsole to crash later. + QFontMetrics fontMetrics2(newFont); + if (fontMetrics2.height() < 1) { + qDebug()<<"The font "<(fontInfo.styleHint()), + fontInfo.weight(), + static_cast(fontInfo.style()), + static_cast(fontInfo.underline()), + static_cast(fontInfo.strikeOut()), + // Intentional newFont use - fixedPitch is bugged, see comment above + static_cast(newFont.fixedPitch()), + static_cast(fontInfo.rawMode())); + qDebug() << "The font to use in the terminal can not be matched exactly on your system."; + qDebug() << " Selected: " << newFont.toString(); + qDebug() << " System : " << nonMatching; + } + + QWidget::setFont(newFont); + fontChange(newFont); +} + +void TerminalDisplay::setFont(const QFont &) +{ + // ignore font change request if not coming from konsole itself +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Constructor / Destructor */ +/* */ +/* ------------------------------------------------------------------------- */ + +TerminalDisplay::TerminalDisplay(QWidget *parent) +:QWidget(parent) +,_screenWindow(nullptr) +,_allowBell(true) +,_gridLayout(nullptr) +,_fontHeight(1) +,_fontWidth(1) +,_fontAscent(1) +,_boldIntense(true) +,_lines(1) +,_columns(1) +,_usedLines(1) +,_usedColumns(1) +,_contentRect(QRect()) +,_contentHeight(1) +,_contentWidth(1) +,_image(nullptr) +,_randomSeed(0) +,_resizing(false) +,_terminalSizeHint(false) +,_terminalSizeStartup(true) +,_bidiEnabled(false) +,_mouseMarks(false) +,_actSel(0) +,_wordSelectionMode(false) +,_lineSelectionMode(false) +,_preserveLineBreaks(false) +,_columnSelectionMode(false) +,_scrollbarLocation(QTermWidget::NoScrollBar) +,_wordCharacters(QLatin1String(":@-./_~")) +,_bellMode(SystemBeepBell) +,_blinking(false) +,_hasBlinker(false) +,_cursorBlinking(false) +,_hasBlinkingCursor(false) +,_allowBlinkingText(true) +,_ctrlDrag(false) +,_tripleClickMode(SelectWholeLine) +,_isFixedSize(false) +,_possibleTripleClick(false) +,_resizeWidget(nullptr) +,_resizeTimer(nullptr) +,_flowControlWarningEnabled(false) +,_hideCursor(false) +,_outputSuspendedLabel(nullptr) +,_lineSpacing(0) +,_colorsInverted(false) +,_blendColor(qRgba(0,0,0,0xff)) +,_filterChain(new TerminalImageFilterChain()) +,_cursorShape(Emulation::KeyboardCursorShape::BlockCursor) +,mMotionAfterPasting(NoMoveScreenWindow) +,_leftBaseMargin(1) +,_topBaseMargin(1) +,_drawLineChars(true) +//,_headerBar(new TerminalHeaderBar(this)) +{ + // variables for draw text + _drawTextAdditionHeight = 0; + _drawTextTestFlag = false; + + // terminal applications are not designed with Right-To-Left in mind, + // so the layout is forced to Left-To-Right + setLayoutDirection(Qt::LeftToRight); + + // The offsets are not yet calculated. + // Do not calculate these too often to be more smoothly when resizing + // konsole in opaque mode. + _topMargin = _topBaseMargin; + _leftMargin = _leftBaseMargin; + + // create scroll bar for scrolling output up and down + // set the scroll bar's slider to occupy the whole area of the scroll bar initially + _scrollBar = new QScrollBar(this); + /******** Modify by ut000439 wangpeili 2020-06-24: 适应窗口特效圆角 ****************/ + //qDebug()<<"_scrollBar->width()"<<_scrollBar->width(); + // 设置15px宽度=6? + _scrollBar->setStyleSheet("margin: 0px 0 15px 0;width: 15"); + //qDebug()<<"_scrollBar->width()"<<_scrollBar->width(); + /********************* Modify by n014361 wangpeili End ************************/ + + // since the contrast with the terminal background may not be enough, + // the scrollbar should be auto-filled if not transient + if (!_scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar)) + _scrollBar->setAutoFillBackground(true); + setScroll(0,0); + _scrollBar->setCursor( Qt::ArrowCursor ); + connect(_scrollBar, SIGNAL(valueChanged(int)), this, + SLOT(scrollBarPositionChanged(int))); + // qtermwidget: we have to hide it here due the _scrollbarLocation==NoScrollBar + // check in TerminalDisplay::setScrollBarPosition(ScrollBarPosition position) + _scrollBar->hide(); + + // setup timers for blinking cursor and text + _blinkTimer = new QTimer(this); + connect(_blinkTimer, SIGNAL(timeout()), this, SLOT(blinkEvent())); + _blinkCursorTimer = new QTimer(this); + connect(_blinkCursorTimer, SIGNAL(timeout()), this, SLOT(blinkCursorEvent())); + +// KCursor::setAutoHideCursor( this, true ); + + setUsesMouse(true); + setBracketedPasteMode(false); + setColorTable(base_color_table); + setMouseTracking(true); + + // Enable drag and drop + setAcceptDrops(true); // attempt + dragInfo.state = diNone; + + setFocusPolicy( Qt::WheelFocus ); + + // enable input method support + setAttribute(Qt::WA_InputMethodEnabled, true); + + // this is an important optimization, it tells Qt + // that TerminalDisplay will handle repainting its entire area. + setAttribute(Qt::WA_OpaquePaintEvent); + + _gridLayout = new QGridLayout(this); + _gridLayout->setContentsMargins(0, 0, 0, 0); + //_gridLayout->addWidget(_headerBar); + + setLayout( _gridLayout ); + + new AutoScrollHandler(this); + + m_bUserIsResizing = false; + + // 隐藏QScrollBar默认的右键菜单 + hideQScrollBarRightMenu(); +} + +TerminalDisplay::~TerminalDisplay() +{ + disconnect(_blinkTimer); + disconnect(_blinkCursorTimer); + qApp->removeEventFilter( this ); + + delete[] _image; + + delete _gridLayout; + delete _outputSuspendedLabel; + delete _filterChain; +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Display Operations */ +/* */ +/* ------------------------------------------------------------------------- */ + +/** + A table for emulating the simple (single width) unicode drawing chars. + It represents the 250x - 257x glyphs. If it's zero, we can't use it. + if it's not, it's encoded as follows: imagine a 5x5 grid where the points are numbered + 0 to 24 left to top, top to bottom. Each point is represented by the corresponding bit. + + Then, the pixels basically have the following interpretation: + _|||_ + -...- + -...- + -...- + _|||_ + +where _ = none + | = vertical line. + - = horizontal line. + */ + + +enum LineEncode +{ + TopL = (1<<1), + TopC = (1<<2), + TopR = (1<<3), + + LeftT = (1<<5), + Int11 = (1<<6), + Int12 = (1<<7), + Int13 = (1<<8), + RightT = (1<<9), + + LeftC = (1<<10), + Int21 = (1<<11), + Int22 = (1<<12), + Int23 = (1<<13), + RightC = (1<<14), + + LeftB = (1<<15), + Int31 = (1<<16), + Int32 = (1<<17), + Int33 = (1<<18), + RightB = (1<<19), + + BotL = (1<<21), + BotC = (1<<22), + BotR = (1<<23) +}; + +void TerminalDisplay::drawLineCharString(QPainter& painter, int x, int y, const QString& str, + const Character* attributes) +{ + // only turn on anti-aliasing during this short time for the "text" + // for the normal text we have TextAntialiasing on demand on + // otherwise we have rendering artifacts + // set https://bugreports.qt.io/browse/QTBUG-66036 + painter.setRenderHint(QPainter::Antialiasing, _antialiasText); + + const bool useBoldPen = (attributes->rendition & RE_BOLD) != 0 && _boldIntense; + + QRect cellRect = {x, y, _fontWidth, _fontHeight}; + for (int i = 0 ; i < str.length(); i++) { + LineBlockCharacters::draw(painter, cellRect.translated(i * _fontWidth, 0), str[i], + useBoldPen); + } + + painter.setRenderHint(QPainter::Antialiasing, false); + +} + +void TerminalDisplay::setKeyboardCursorShape(QTermWidget::KeyboardCursorShape shape) +{ + _cursorShape = shape; + + updateCursor(); +} +QTermWidget::KeyboardCursorShape TerminalDisplay::keyboardCursorShape() const +{ + return _cursorShape; +} +void TerminalDisplay::setKeyboardCursorColor(bool useForegroundColor, const QColor& color) +{ + if (useForegroundColor) + _cursorColor = QColor(); // an invalid color means that + // the foreground color of the + // current character should + // be used + + else + _cursorColor = color; +} +QColor TerminalDisplay::keyboardCursorColor() const +{ + return _cursorColor; +} + +void TerminalDisplay::setOpacity(qreal opacity) +{ + QColor color(_blendColor); + color.setAlphaF(opacity); + + // enable automatic background filling to prevent the display + // flickering if there is no transparency + /*if ( color.alpha() == 255 ) + { + setAutoFillBackground(true); + } + else + { + setAutoFillBackground(false); + }*/ + + _blendColor = color.rgba(); +} + +void TerminalDisplay::setBackgroundImage(QString backgroundImage) +{ + if (!backgroundImage.isEmpty()) + { + _backgroundImage.load(backgroundImage); + setAttribute(Qt::WA_OpaquePaintEvent, false); + } + else + { + _backgroundImage = QPixmap(); + setAttribute(Qt::WA_OpaquePaintEvent, true); + } +} + +void TerminalDisplay::drawBackground(QPainter& painter, const QRect& rect, const QColor& backgroundColor, bool useOpacitySetting ) +{ + // The whole widget rectangle is filled by the background color from + // the color scheme set in setColorTable(), while the scrollbar is + // left to the widget style for a consistent look. + if ( HAVE_TRANSPARENCY && qAlpha(_blendColor) < 0xff && useOpacitySetting ) + { + if (_backgroundImage.isNull()) { + QColor color(backgroundColor); + color.setAlpha(qAlpha(_blendColor)); + + painter.save(); + painter.setCompositionMode(QPainter::CompositionMode_Source); + painter.fillRect(rect, color); + painter.restore(); + } + } + else + painter.fillRect(rect, backgroundColor); +} + +void TerminalDisplay::drawCursor(QPainter& painter, + const QRect& rect, + const QColor& foregroundColor, + const QColor& /*backgroundColor*/, + bool& invertCharacterColor) +{ + QRectF cursorRect = rect; + cursorRect.setHeight(_fontHeight - _lineSpacing - 1); + + if (!_cursorBlinking) + { + if ( _cursorColor.isValid() ) + painter.setPen(_cursorColor); + else + painter.setPen(foregroundColor); + + if ( _cursorShape == Emulation::KeyboardCursorShape::BlockCursor ) + { + if ( hasFocus() ) + { + painter.fillRect(cursorRect, _cursorColor.isValid() ? _cursorColor : foregroundColor); + + if ( !_cursorColor.isValid() ) + { + // invert the colour used to draw the text to ensure that the character at + // the cursor position is readable + invertCharacterColor = true; + } + } + else + { + // draw the cursor outline, adjusting the area so that + // it is draw entirely inside 'rect' + float penWidth = qMax(1,painter.pen().width()); + + painter.drawRect(cursorRect.adjusted(penWidth/2, + penWidth/2, + - penWidth/2, + - penWidth/2)); + } + } + else if ( _cursorShape == Emulation::KeyboardCursorShape::UnderlineCursor ) + painter.drawLine(QLineF( + QPointF(cursorRect.left(), + cursorRect.bottom()), + QPointF(cursorRect.right(), + cursorRect.bottom()))); + else if ( _cursorShape == Emulation::KeyboardCursorShape::IBeamCursor ) + painter.drawLine(QLineF( + QPointF(cursorRect.left(), + cursorRect.top()), + QPointF(cursorRect.left(), + cursorRect.bottom()))); + } +} + +void TerminalDisplay::drawCharacters(QPainter& painter, + const QRect& rect, + const QString& text, + const Character* style, + bool invertCharacterColor) +{ + // don't draw text which is currently blinking + if ( _blinking && (style->rendition & RE_BLINK) ) + return; + + // don't draw concealed characters + if (style->rendition & RE_CONCEAL) + return; + + // setup bold and underline + bool useBold = ((style->rendition & RE_BOLD) && _boldIntense) || font().bold(); + const bool useUnderline = style->rendition & RE_UNDERLINE || font().underline(); + const bool useItalic = style->rendition & RE_ITALIC || font().italic(); + const bool useStrikeOut = style->rendition & RE_STRIKEOUT || font().strikeOut(); + const bool useOverline = style->rendition & RE_OVERLINE || font().overline(); + + QFont font = painter.font(); + if ( font.bold() != useBold + || font.underline() != useUnderline + || font.italic() != useItalic + || font.strikeOut() != useStrikeOut + || font.overline() != useOverline) { + font.setBold(useBold); + font.setUnderline(useUnderline); + font.setItalic(useItalic); + font.setStrikeOut(useStrikeOut); + font.setOverline(useOverline); + painter.setFont(font); + } + + // setup pen + const CharacterColor& textColor = ( invertCharacterColor ? style->backgroundColor : style->foregroundColor ); + const QColor color = textColor.color(_colorTable); + QPen pen = painter.pen(); + if ( pen.color() != color ) + { + pen.setColor(color); + painter.setPen(color); + } + + // draw text + if ( isLineCharString(text) ) + drawLineCharString(painter,rect.x(),rect.y(),text,style); + else + { + // Force using LTR as the document layout for the terminal area, because + // there is no use cases for RTL emulator and RTL terminal application. + // + // This still allows RTL characters to be rendered in the RTL way. + painter.setLayoutDirection(Qt::LeftToRight); + + if (_bidiEnabled) { + painter.drawText(QPointF(rect.x(), rect.y() + _fontAscent + _lineSpacing), text); + } else { + { + QRectF drawRect(rect.topLeft(), rect.size()); + drawRect.setHeight(rect.height() + _drawTextAdditionHeight); + painter.drawText(drawRect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text); + } + } + } +} + +void TerminalDisplay::drawTextFragment(QPainter& painter , + const QRect& rect, + const QString& text, + const Character* style) +{ + painter.save(); + + // setup painter + //const QColor foregroundColor = style->foregroundColor.color(_colorTable); + const QColor backgroundColor = style->backgroundColor.color(_colorTable); + + // draw background if different from the display's background color + if ( backgroundColor != palette().background().color() ) + drawBackground(painter,rect,backgroundColor, + false /* do not use transparency */); + + // draw cursor shape if the current character is the cursor + // this may alter the foreground and background colors + bool invertCharacterColor = false; + + if (!_hideCursor) + { + if ( style->rendition & RE_CURSOR ) + { + const QColor cursorBackground = _colorTable[DEFAULT_BACK_COLOR].color; + const QColor cursorForeground = _colorTable[DEFAULT_FORE_COLOR].color; + drawCursor(painter,rect,cursorForeground,cursorBackground,invertCharacterColor); + } + } + + // draw text + drawCharacters(painter,rect,text,style,invertCharacterColor); + + painter.restore(); +} + +void TerminalDisplay::setRandomSeed(uint randomSeed) { _randomSeed = randomSeed; } +uint TerminalDisplay::randomSeed() const { return _randomSeed; } + +#if 0 +/*! + Set XIM Position +*/ +void TerminalDisplay::setCursorPos(const int curx, const int cury) +{ + QPoint tL = contentsRect().topLeft(); + int tLx = tL.x(); + int tLy = tL.y(); + + int xpos, ypos; + ypos = _topMargin + tLy + _fontHeight*(cury-1) + _fontAscent; + xpos = _leftMargin + tLx + _fontWidth*curx; + //setMicroFocusHint(xpos, ypos, 0, _fontHeight); //### ??? + // fprintf(stderr, "x/y = %d/%d\txpos/ypos = %d/%d\n", curx, cury, xpos, ypos); + _cursorLine = cury; + _cursorCol = curx; +} +#endif + +// scrolls the image by 'lines', down if lines > 0 or up otherwise. +// +// the terminal emulation keeps track of the scrolling of the character +// image as it receives input, and when the view is updated, it calls scrollImage() +// with the final scroll amount. this improves performance because scrolling the +// display is much cheaper than re-rendering all the text for the +// part of the image which has moved up or down. +// Instead only new lines have to be drawn +void TerminalDisplay::scrollImage(int lines , const QRect& screenWindowRegion) +{ + // if the flow control warning is enabled this will interfere with the + // scrolling optimizations and cause artifacts. the simple solution here + // is to just disable the optimization whilst it is visible + if ( _outputSuspendedLabel && _outputSuspendedLabel->isVisible() ) + return; + + // constrain the region to the display + // the bottom of the region is capped to the number of lines in the display's + // internal image - 2, so that the height of 'region' is strictly less + // than the height of the internal image. + QRect region = screenWindowRegion; + region.setBottom( qMin(region.bottom(),this->_lines-2) ); + + // return if there is nothing to do + if ( lines == 0 + || _image == nullptr + || !region.isValid() + || (region.top() + abs(lines)) >= region.bottom() + || this->_lines <= region.height() ) return; + + // hide terminal size label to prevent it being scrolled + if (_resizeWidget && _resizeWidget->isVisible()) + _resizeWidget->hide(); + + // Note: With Qt 4.4 the left edge of the scrolled area must be at 0 + // to get the correct (newly exposed) part of the widget repainted. + // + // The right edge must be before the left edge of the scroll bar to + // avoid triggering a repaint of the entire widget, the distance is + // given by SCROLLBAR_CONTENT_GAP + // + // Set the QT_FLUSH_PAINT environment variable to '1' before starting the + // application to monitor repainting. + // + int scrollBarWidth = _scrollBar->isHidden() ? 0 : + _scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar) ? + 0 : _scrollBar->width(); + const int SCROLLBAR_CONTENT_GAP = scrollBarWidth == 0 ? 0 : 1; + QRect scrollRect; + if ( _scrollbarLocation == QTermWidget::ScrollBarLeft ) + { + scrollRect.setLeft(scrollBarWidth+SCROLLBAR_CONTENT_GAP); + scrollRect.setRight(width()); + } + else + { + scrollRect.setLeft(0); + scrollRect.setRight(width() - scrollBarWidth - SCROLLBAR_CONTENT_GAP); + } + void* firstCharPos = &_image[ region.top() * this->_columns ]; + void* lastCharPos = &_image[ (region.top() + abs(lines)) * this->_columns ]; + + int top = _topMargin + (region.top() * _fontHeight); + int linesToMove = region.height() - abs(lines); + int bytesToMove = linesToMove * + this->_columns * + sizeof(Character); + + Q_ASSERT( linesToMove > 0 ); + Q_ASSERT( bytesToMove > 0 ); + + //scroll internal image + if ( lines > 0 ) + { + // check that the memory areas that we are going to move are valid + Q_ASSERT( (char*)lastCharPos + bytesToMove < + (char*)(_image + (this->_lines * this->_columns)) ); + + Q_ASSERT( (lines*this->_columns) < _imageSize ); + + //scroll internal image down + memmove( firstCharPos , lastCharPos , bytesToMove ); + + //set region of display to scroll + scrollRect.setTop(top); + } + else + { + // check that the memory areas that we are going to move are valid + Q_ASSERT( (char*)firstCharPos + bytesToMove < + (char*)(_image + (this->_lines * this->_columns)) ); + + //scroll internal image up + memmove( lastCharPos , firstCharPos , bytesToMove ); + + //set region of the display to scroll + scrollRect.setTop(top + abs(lines) * _fontHeight); + } + scrollRect.setHeight(linesToMove * _fontHeight ); + + Q_ASSERT(scrollRect.isValid() && !scrollRect.isEmpty()); + + //scroll the display vertically to match internal _image + scroll( 0 , _fontHeight * (-lines) , scrollRect ); +} + +QRegion TerminalDisplay::hotSpotRegion() const +{ + QRegion region; + const auto hotSpots = _filterChain->hotSpots(); + for( Filter::HotSpot* const hotSpot : hotSpots ) + { + QRect r; + if (hotSpot->startLine()==hotSpot->endLine()) { + r.setLeft(hotSpot->startColumn()); + r.setTop(hotSpot->startLine()); + r.setRight(hotSpot->endColumn()); + r.setBottom(hotSpot->endLine()); + region |= imageToWidget(r);; + } else { + r.setLeft(hotSpot->startColumn()); + r.setTop(hotSpot->startLine()); + r.setRight(_columns); + r.setBottom(hotSpot->startLine()); + region |= imageToWidget(r);; + for ( int line = hotSpot->startLine()+1 ; line < hotSpot->endLine() ; line++ ) { + r.setLeft(0); + r.setTop(line); + r.setRight(_columns); + r.setBottom(line); + region |= imageToWidget(r);; + } + r.setLeft(0); + r.setTop(hotSpot->endLine()); + r.setRight(hotSpot->endColumn()); + r.setBottom(hotSpot->endLine()); + region |= imageToWidget(r);; + } + } + return region; +} + +void TerminalDisplay::processFilters() +{ + if (!_screenWindow) + return; + + QRegion preUpdateHotSpots = hotSpotRegion(); + + // use _screenWindow->getImage() here rather than _image because + // other classes may call processFilters() when this display's + // ScreenWindow emits a scrolled() signal - which will happen before + // updateImage() is called on the display and therefore _image is + // out of date at this point + _filterChain->setImage( _screenWindow->getImage(), + _screenWindow->windowLines(), + _screenWindow->windowColumns(), + _screenWindow->getLineProperties() ); + _filterChain->process(); + + QRegion postUpdateHotSpots = hotSpotRegion(); + + update( preUpdateHotSpots | postUpdateHotSpots ); +} + +void TerminalDisplay::updateImage() +{ + if ( !_screenWindow ) + return; + + // optimization - scroll the existing image where possible and + // avoid expensive text drawing for parts of the image that + // can simply be moved up or down + scrollImage( _screenWindow->scrollCount() , + _screenWindow->scrollRegion() ); + + if (!_image) { + // Create _image. + // The emitted changedContentSizeSignal also leads to getImage being recreated, so do this first. + updateImageSize(); + } + + Character* const newimg = _screenWindow->getImage(); + int lines = _screenWindow->windowLines(); + int columns = _screenWindow->windowColumns(); + + setScroll( _screenWindow->currentLine() , _screenWindow->lineCount() ); + //--added by qinyaning(nyq) to slove the problem of scroll init show--/ + setScrollBarPosition(_lines > 1 && _screenWindow->lineCount() > _lines? + QTermWidget::ScrollBarRight : QTermWidget::NoScrollBar); + //--------------------------------------------------------------------/ + + Q_ASSERT( this->_usedLines <= this->_lines ); + Q_ASSERT( this->_usedColumns <= this->_columns ); + + int y,x,len; + + QPoint tL = contentsRect().topLeft(); + int tLx = tL.x(); + int tLy = tL.y(); + _hasBlinker = false; + + CharacterColor cf; // undefined + + const int linesToUpdate = qMin(this->_lines, qMax(0,lines )); + const int columnsToUpdate = qMin(this->_columns,qMax(0,columns)); + + auto dirtyMask = new char[columnsToUpdate + 2]; + QRegion dirtyRegion; + + // debugging variable, this records the number of lines that are found to + // be 'dirty' ( ie. have changed from the old _image to the new _image ) and + // which therefore need to be repainted + int dirtyLineCount = 0; + + for (y = 0; y < linesToUpdate; ++y) + { + const Character* currentLine = &_image[y*this->_columns]; + const Character* const newLine = &newimg[y*columns]; + + bool updateLine = false; + + // The dirty mask indicates which characters need repainting. We also + // mark surrounding neighbours dirty, in case the character exceeds + // its cell boundaries + memset(dirtyMask, 0, columnsToUpdate+2); + + for( x = 0 ; x < columnsToUpdate ; ++x) + { + if ( newLine[x] != currentLine[x] ) + { + dirtyMask[x] = 1; + } + } + + if (!_resizing) // not while _resizing, we're expecting a paintEvent + for (x = 0; x < columnsToUpdate; ++x) + { + _hasBlinker |= (newLine[x].rendition & RE_BLINK); + + // Start drawing if this character or the next one differs. + // We also take the next one into account to handle the situation + // where characters exceed their cell width. + if (dirtyMask[x]) + { + if (newLine[x + 0].character == 0u) + { + continue; + } + bool lineDraw = canDraw(newLine[x + 0].character); + bool doubleWidth = (x + 1 == columnsToUpdate) ? false : (newLine[x + 1].character == 0); + RenditionFlags cr = newLine[x].rendition; + CharacterColor clipboard = newLine[x].backgroundColor; + if (newLine[x].foregroundColor != cf) + { + cf = newLine[x].foregroundColor; + } + const int lln = columnsToUpdate - x; + for (len = 1; len < lln; ++len) + { + const Character& ch = newLine[x+len]; + + if (!ch.character) + continue; // Skip trailing part of multi-col chars. + + bool nextIsDoubleWidth = (x + len + 1 == columnsToUpdate) ? false : (newLine[x + len + 1].character == 0); + + if (ch.foregroundColor != cf || + ch.backgroundColor != clipboard || + (ch.rendition & ~RE_EXTENDED_CHAR) != (cr & ~RE_EXTENDED_CHAR) || + (dirtyMask[x + len] == 0) || + canDraw(ch.character) != lineDraw || + nextIsDoubleWidth != doubleWidth) { + break; + } + } + + bool saveFixedFont = _fixedFont; + if (lineDraw) + _fixedFont = false; + if (doubleWidth) + _fixedFont = false; + + updateLine = true; + + _fixedFont = saveFixedFont; + x += len - 1; + } + + } + + //both the top and bottom halves of double height _lines must always be redrawn + //although both top and bottom halves contain the same characters, only + //the top one is actually + //drawn. + if (_lineProperties.count() > y) + updateLine |= (_lineProperties[y] & LINE_DOUBLEHEIGHT); + + // if the characters on the line are different in the old and the new _image + // then this line must be repainted. + if (updateLine) + { + dirtyLineCount++; + + // add the area occupied by this line to the region which needs to be + // repainted + QRect dirtyRect = QRect( _leftMargin+tLx , + _topMargin+tLy+_fontHeight*y , + _fontWidth * columnsToUpdate , + _fontHeight ); + + dirtyRegion |= dirtyRect; + } + + // replace the line of characters in the old _image with the + // current line of the new _image + memcpy((void*)currentLine,(const void*)newLine,columnsToUpdate*sizeof(Character)); + } + + // if the new _image is smaller than the previous _image, then ensure that the area + // outside the new _image is cleared + if ( linesToUpdate < _usedLines ) + { + dirtyRegion |= QRect( _leftMargin+tLx , + _topMargin+tLy+_fontHeight*linesToUpdate , + _fontWidth * this->_columns , + _fontHeight * (_usedLines-linesToUpdate) ); + } + _usedLines = linesToUpdate; + + if ( columnsToUpdate < _usedColumns ) + { + dirtyRegion |= QRect( _leftMargin+tLx+columnsToUpdate*_fontWidth , + _topMargin+tLy , + _fontWidth * (_usedColumns-columnsToUpdate) , + _fontHeight * this->_lines ); + } + _usedColumns = columnsToUpdate; + + dirtyRegion |= _inputMethodData.previousPreeditRect; + + _screenWindow->resetScrollCount(); + // update the parts of the display which have changed + //--modified and added by qinyaning(nyq) to solve When the screen zooms to 1.25 and 2.75, + /*the terminal interface will display colored lines. time: 2020.4.10 14:18 + * */ + //update(dirtyRegion); + update(); + //------------------------------------------------- + + if ( _hasBlinker && !_blinkTimer->isActive()) _blinkTimer->start( TEXT_BLINK_DELAY ); + if (!_hasBlinker && _blinkTimer->isActive()) { _blinkTimer->stop(); _blinking = false; } + delete[] dirtyMask; +} + +void TerminalDisplay::showResizeNotification() +{ + if (_terminalSizeHint && isVisible()) + { + if (_terminalSizeStartup) { + _terminalSizeStartup=false; + return; + } + if (!_resizeWidget) + { + const QString label = tr("Size: XXX x XXX"); + _resizeWidget = new QLabel(label, this); + _resizeWidget->setMinimumWidth(_resizeWidget->fontMetrics().width(label)); + _resizeWidget->setMinimumHeight(_resizeWidget->sizeHint().height()); + _resizeWidget->setAlignment(Qt::AlignCenter); + + _resizeWidget->setStyleSheet(QLatin1String("background-color:palette(window);border-style:solid;border-width:1px;border-color:palette(dark)")); + + _resizeTimer = new QTimer(this); + _resizeTimer->setSingleShot(true); + connect(_resizeTimer, &QTimer::timeout, this, [this](){ + //计时器timeout,终端控件结束调整大小 + this->m_bUserIsResizing = false; + SessionManager::instance()->setTerminalResizing(_sessionId, m_bUserIsResizing); + }); + } + //显示resizeWidget的时候,标记当前session对应终端控件正在调整大小 + SessionManager::instance()->setTerminalResizing(_sessionId, true); + _resizeWidget->setText(tr("Size: %1 x %2").arg(_columns).arg(_lines)); + _resizeWidget->move((width()-_resizeWidget->width())/2, + (height()-_resizeWidget->height())/2+20); + + //fix bug 17684 在放大,正常窗口,最大化之间切换,终端窗口会显示size + _resizeWidget->hide(); + _resizeTimer->start(1000); + } +} + +void TerminalDisplay::setBlinkingCursor(bool blink) +{ + _hasBlinkingCursor=blink; + + if (blink && !_blinkCursorTimer->isActive()) + _blinkCursorTimer->start(QApplication::cursorFlashTime() / 2); + + if (!blink && _blinkCursorTimer->isActive()) + { + _blinkCursorTimer->stop(); + if (_cursorBlinking) + blinkCursorEvent(); + else + _cursorBlinking = false; + } + /******** Modify by n014361 wangpeili 2020-02-13: 修复“设置光标闪烁后,非焦点光标也在闪烁”***********×****/ + if (hasFocus()) + { + focusInEvent(nullptr); + } + else + { + focusOutEvent(nullptr); + } + /***************** Modify by n014361 End *************************/ +} + +void TerminalDisplay::setBlinkingTextEnabled(bool blink) +{ + _allowBlinkingText = blink; + + if (blink && !_blinkTimer->isActive()) + _blinkTimer->start(TEXT_BLINK_DELAY); + + if (!blink && _blinkTimer->isActive()) + { + _blinkTimer->stop(); + _blinking = false; + } +} + +void TerminalDisplay::focusOutEvent(QFocusEvent*) +{ + emit termLostFocus(); + // trigger a repaint of the cursor so that it is both visible (in case + // it was hidden during blinking) + // and drawn in a focused out state + _cursorBlinking = false; + updateCursor(); + + _blinkCursorTimer->stop(); + if (_blinking) + blinkEvent(); + + _blinkTimer->stop(); +} +void TerminalDisplay::focusInEvent(QFocusEvent*) +{ + //qDebug()<<"focusInEvent"; + emit termGetFocus(); + if (_hasBlinkingCursor) + { + _blinkCursorTimer->start(); + } + updateCursor(); + + if (_hasBlinker) + _blinkTimer->start(); +} + +void TerminalDisplay::paintEvent( QPaintEvent* pe ) +{ + QPainter paint(this); + + if ( !_backgroundImage.isNull() && qAlpha(_blendColor) < 0xff ) + { + paint.drawPixmap(0, 0, _backgroundImage); + QColor background = _colorTable[DEFAULT_BACK_COLOR].color; + background.setAlpha(qAlpha(_blendColor)); + paint.fillRect(contentsRect(), background); + } + + if(_drawTextTestFlag) + { + calDrawTextAdditionHeight(paint); + } + + // Determine which characters should be repainted (1 region unit = 1 character) + QRegion dirtyImageRegion; + const QRegion region = pe->region() & contentsRect(); + + for (const QRect &rect : region) { + dirtyImageRegion += widgetToImage(rect); + drawBackground(paint, rect, palette().background().color(), true /* use opacity setting */); + } + + // only turn on text anti-aliasing, never turn on normal antialiasing + // set https://bugreports.qt.io/browse/QTBUG-66036 + paint.setRenderHint(QPainter::TextAntialiasing, _antialiasText); + + for (const QRect &rect : qAsConst(dirtyImageRegion)) { + drawContents(paint, rect); + } + drawInputMethodPreeditString(paint, preeditRect()); + paintFilters(paint); +} + +QPoint TerminalDisplay::cursorPosition() const +{ + if (_screenWindow) + return _screenWindow->cursorPosition(); + else + return {0,0}; +} + +QRect TerminalDisplay::preeditRect() const +{ + const int preeditLength = Character::stringWidth(_inputMethodData.preeditString); + + if ( preeditLength == 0 ) + return {}; + + return QRect(_leftMargin + _fontWidth*cursorPosition().x(), + _topMargin + _fontHeight*cursorPosition().y(), + _fontWidth*preeditLength, + _fontHeight); +} + +void TerminalDisplay::drawInputMethodPreeditString(QPainter& painter , const QRect& rect) +{ + if ( _inputMethodData.preeditString.isEmpty() ) + return; + + const QPoint cursorPos = cursorPosition(); + + bool invertColors = false; + const QColor background = _colorTable[DEFAULT_BACK_COLOR].color; + const QColor foreground = _colorTable[DEFAULT_FORE_COLOR].color; + const Character* style = &_image[loc(cursorPos.x(),cursorPos.y())]; + + drawBackground(painter,rect,background,true); + drawCursor(painter,rect,foreground,background,invertColors); + drawCharacters(painter,rect,_inputMethodData.preeditString,style,invertColors); + + _inputMethodData.previousPreeditRect = rect; +} + +FilterChain* TerminalDisplay::filterChain() const +{ + return _filterChain; +} + +void TerminalDisplay::paintFilters(QPainter& painter) +{ + // get color of character under mouse and use it to draw + // lines for filters + QPoint cursorPos = mapFromGlobal(QCursor::pos()); + int cursorLine; + int cursorColumn; + int leftMargin = _leftBaseMargin + + ((_scrollbarLocation == QTermWidget::ScrollBarLeft + && !_scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar)) + ? _scrollBar->width() : 0); + + getCharacterPosition( cursorPos , cursorLine , cursorColumn ); + Character cursorCharacter = _image[loc(cursorColumn,cursorLine)]; + + painter.setPen( QPen(cursorCharacter.foregroundColor.color(colorTable())) ); + + /***add begin by ut001121 zhangmeng 20200624 光标悬浮在链接上面时变成手形光标 修复BUG34676***/ + bool bDrawLineForHotSpotLink = false; + + // iterate over hotspots identified by the display's currently active filters + // and draw appropriate visuals to indicate the presence of the hotspot + + QList spots = _filterChain->hotSpots(); + QListIterator iter(spots); + while (iter.hasNext()) + { + Filter::HotSpot* spot = iter.next(); + + QRegion region; + if ( spot->type() == Filter::HotSpot::Link ) { + QRect r; + if (spot->startLine()==spot->endLine()) { + r.setCoords( spot->startColumn()*_fontWidth + 1 + leftMargin, + spot->startLine()*_fontHeight + 1 + _topBaseMargin, + spot->endColumn()*_fontWidth - 1 + leftMargin, + (spot->endLine()+1)*_fontHeight - 1 + _topBaseMargin ); + region |= r; + } else { + r.setCoords( spot->startColumn()*_fontWidth + 1 + leftMargin, + spot->startLine()*_fontHeight + 1 + _topBaseMargin, + _columns*_fontWidth - 1 + leftMargin, + (spot->startLine()+1)*_fontHeight - 1 + _topBaseMargin ); + region |= r; + for ( int line = spot->startLine()+1 ; line < spot->endLine() ; line++ ) { + r.setCoords( 0*_fontWidth + 1 + leftMargin, + line*_fontHeight + 1 + _topBaseMargin, + _columns*_fontWidth - 1 + leftMargin, + (line+1)*_fontHeight - 1 + _topBaseMargin ); + region |= r; + } + r.setCoords( 0*_fontWidth + 1 + leftMargin, + spot->endLine()*_fontHeight + 1 + _topBaseMargin, + spot->endColumn()*_fontWidth - 1 + leftMargin, + (spot->endLine()+1)*_fontHeight - 1 + _topBaseMargin ); + region |= r; + } + } + + for ( int line = spot->startLine() ; line <= spot->endLine() ; line++ ) + { + int startColumn = 0; + int endColumn = _columns-1; // TODO use number of _columns which are actually + // occupied on this line rather than the width of the + // display in _columns + + // ignore whitespace at the end of the lines + while ( QChar(_image[loc(endColumn,line)].character).isSpace() && endColumn > 0 ) + endColumn--; + + // increment here because the column which we want to set 'endColumn' to + // is the first whitespace character at the end of the line + endColumn++; + + if ( line == spot->startLine() ) + startColumn = spot->startColumn(); + if ( line == spot->endLine() ) + endColumn = spot->endColumn(); + + // subtract one pixel from + // the right and bottom so that + // we do not overdraw adjacent + // hotspots + // + // subtracting one pixel from all sides also prevents an edge case where + // moving the mouse outside a link could still leave it underlined + // because the check below for the position of the cursor + // finds it on the border of the target area + QRect r; + r.setCoords( startColumn*_fontWidth + 1 + leftMargin, + line*_fontHeight + 1 + _topBaseMargin, + endColumn*_fontWidth - 1 + leftMargin, + (line+1)*_fontHeight - 1 + _topBaseMargin ); + // Underline link hotspots + if ( spot->type() == Filter::HotSpot::Link ) + { + QFontMetrics metrics(font()); + + // find the baseline (which is the invisible line that the characters in the font sit on, + // with some having tails dangling below) + int baseline = r.bottom() - metrics.descent(); + // find the position of the underline below that + int underlinePos = baseline + metrics.underlinePos(); + if ( region.contains( mapFromGlobal(QCursor::pos()) ) ){ + painter.drawLine( r.left() , underlinePos , + r.right() , underlinePos ); + /***add begin by ut001121 zhangmeng 20200624 光标悬浮在链接上面时变成手形光标 修复BUG34676***/ + bDrawLineForHotSpotLink = true; + } + } + // Marker hotspots simply have a transparent rectanglular shape + // drawn on top of them + else if ( spot->type() == Filter::HotSpot::Marker ) + { + //TODO - Do not use a hardcoded colour for this + painter.fillRect(r,QBrush(QColor(255,0,0,120))); + } + } + } + + /***add begin by ut001121 zhangmeng 20200624 光标悬浮在链接上面时变成手形光标 修复BUG34676***/ + /** modify by ut001121 zhangmeng 20201215 for 1040-4 Ctrl键+鼠标点击超链接打开网页 */ + if(bDrawLineForHotSpotLink && (QApplication::queryKeyboardModifiers() & Qt::ControlModifier)){ + if(cursor().shape() != Qt::PointingHandCursor) { + setCursor(Qt::PointingHandCursor); + } + } + else if(cursor().shape() != Qt::IBeamCursor){ + setCursor(Qt::IBeamCursor); + } + /***add end by ut001121***/ +} + +int TerminalDisplay::textWidth(const int startColumn, const int length, const int line) const +{ + QFontMetrics fm(font()); + int result = 0; + for (int column = 0; column < length; column++) { + result += fm.width(_image[loc(startColumn + column, line)].character); + } + return result; +} + +QRect TerminalDisplay::calculateTextArea(int topLeftX, int topLeftY, int startColumn, int line, int length) { + int left = _fixedFont ? _fontWidth * startColumn : textWidth(0, startColumn, line); + int top = _fontHeight * line; + int width = _fixedFont ? _fontWidth * length : textWidth(startColumn, length, line); + return {_leftMargin + topLeftX + left, + _topMargin + topLeftY + top, + width, + _fontHeight}; +} + +static uint baseCodePoint(const Character &ch) { + if (ch.rendition & RE_EXTENDED_CHAR) { + // sequence of characters + ushort extendedCharLength = 0; + const uint* chars = ExtendedCharTable::instance.lookupExtendedChar(ch.character, extendedCharLength); + return chars[0]; + } else { + return ch.character; + } +} + +void TerminalDisplay::drawContents(QPainter &paint, const QRect &rect) +{ + const int numberOfColumns = _usedColumns; + QVector univec; + univec.reserve(numberOfColumns); + for (int y = rect.y(); y <= rect.bottom(); y++) { + int x = rect.x(); + if ((_image[loc(rect.x(), y)].character == 0u) && (x != 0)) { + x--; // Search for start of multi-column character + } + for (; x <= rect.right(); x++) { + int len = 1; + int p = 0; + + // reset our buffer to the number of columns + int bufferSize = numberOfColumns; + univec.resize(bufferSize); + uint *disstrU = univec.data(); + + // is this a single character or a sequence of characters ? + if ((_image[loc(x, y)].rendition & RE_EXTENDED_CHAR) != 0) { + // sequence of characters + ushort extendedCharLength = 0; + const uint* chars = ExtendedCharTable::instance.lookupExtendedChar(_image[loc(x, y)].character, extendedCharLength); + if (chars != nullptr) { + Q_ASSERT(extendedCharLength > 1); + bufferSize += extendedCharLength - 1; + univec.resize(bufferSize); + disstrU = univec.data(); + for (int index = 0 ; index < extendedCharLength ; index++) { + Q_ASSERT(p < bufferSize); + disstrU[p++] = chars[index]; + } + } + } else { + // single character + const uint c = _image[loc(x, y)].character; + if (c != 0u) { + Q_ASSERT(p < bufferSize); + disstrU[p++] = c; + } + } + + const bool lineDraw = canDraw(_image[loc(x, y)].character); + const bool doubleWidth = (_image[qMin(loc(x, y) + 1, _imageSize - 1)].character == 0); + const CharacterColor currentForeground = _image[loc(x, y)].foregroundColor; + const CharacterColor currentBackground = _image[loc(x, y)].backgroundColor; + const RenditionFlags currentRendition = _image[loc(x, y)].rendition; + const QChar::Script currentScript = QChar::script(baseCodePoint(_image[loc(x, y)])); + + const auto isInsideDrawArea = [&](int column) { return column <= rect.right(); }; + const auto hasSameColors = [&](int column) { + return _image[loc(column, y)].foregroundColor == currentForeground + && _image[loc(column, y)].backgroundColor == currentBackground; + }; + const auto hasSameRendition = [&](int column) { + return (_image[loc(column, y)].rendition & ~RE_EXTENDED_CHAR) + == (currentRendition & ~RE_EXTENDED_CHAR); + }; + const auto hasSameWidth = [&](int column) { + const int characterLoc = qMin(loc(column, y) + 1, _imageSize - 1); + return (_image[characterLoc].character == 0) == doubleWidth; + }; + const auto hasSameLineDrawStatus = [&](int column) { + return canDraw(_image[loc(column, y)].character) + == lineDraw; + }; + const auto isSameScript = [&](int column) { + const QChar::Script script = QChar::script(baseCodePoint(_image[loc(column, y)])); + if (currentScript == QChar::Script_Common || script == QChar::Script_Common + || currentScript == QChar::Script_Inherited || script == QChar::Script_Inherited) { + return true; + } + return currentScript == script; + }; + const auto canBeGrouped = [&](int column) { + return _image[loc(column, y)].character <= 0x7e + || (_image[loc(column, y)].rendition & RE_EXTENDED_CHAR) + || (_bidiEnabled && !doubleWidth); + }; + + if (canBeGrouped(x)) { + while (isInsideDrawArea(x + len) && hasSameColors(x + len) + && hasSameRendition(x + len) && hasSameWidth(x + len) + && hasSameLineDrawStatus(x + len) && isSameScript(x + len) + && canBeGrouped(x + len)) { + const uint c = _image[loc(x + len, y)].character; + if ((_image[loc(x + len, y)].rendition & RE_EXTENDED_CHAR) != 0) { + // sequence of characters + ushort extendedCharLength = 0; + const uint* chars = ExtendedCharTable::instance.lookupExtendedChar(c, extendedCharLength); + if (chars != nullptr) { + Q_ASSERT(extendedCharLength > 1); + bufferSize += extendedCharLength - 1; + univec.resize(bufferSize); + disstrU = univec.data(); + for (int index = 0 ; index < extendedCharLength ; index++) { + Q_ASSERT(p < bufferSize); + disstrU[p++] = chars[index]; + } + } + } else { + // single character + if (c != 0u) { + Q_ASSERT(p < bufferSize); + disstrU[p++] = c; + } + } + + if (doubleWidth) { // assert((_image[loc(x+len,y)+1].character == 0)), see above if condition + len++; // Skip trailing part of multi-column character + } + len++; + } + } else { + // Group spaces following any non-wide character with the character. This allows for + // rendering ambiguous characters with wide glyphs without clipping them. + while (!doubleWidth && isInsideDrawArea(x + len) + && _image[loc(x + len, y)].character == ' ' && hasSameColors(x + len) + && hasSameRendition(x + len)) { + // disstrU intentionally not modified - trailing spaces are meaningless + len++; + } + } + if ((x + len < _usedColumns) && (_image[loc(x + len, y)].character == 0u)) { + len++; // Adjust for trailing part of multi-column character + } + + const bool save__fixedFont = _fixedFont; + if (lineDraw) { + _fixedFont = false; + } + if (doubleWidth) { + _fixedFont = false; + } + univec.resize(p); + + // Create a text scaling matrix for double width and double height lines. + QMatrix textScale; + + if (y < _lineProperties.size()) { + if ((_lineProperties[y] & LINE_DOUBLEWIDTH) != 0) { + textScale.scale(2, 1); + } + + if ((_lineProperties[y] & LINE_DOUBLEHEIGHT) != 0) { + textScale.scale(1, 2); + } + } + + //Apply text scaling matrix. + paint.setWorldTransform(QTransform(textScale), true); + + //calculate the area in which the text will be drawn + QRect textArea = QRect(contentsRect().left() + contentsRect().left() + _fontWidth * x, + contentsRect().top() + contentsRect().top() + _fontHeight * y, + _fontWidth * len, + _fontHeight); + + //move the calculated area to take account of scaling applied to the painter. + //the position of the area from the origin (0,0) is scaled + //by the opposite of whatever + //transformation has been applied to the painter. this ensures that + //painting does actually start from textArea.topLeft() + //(instead of textArea.topLeft() * painter-scale) + textArea.moveTopLeft(textScale.inverted().map(textArea.topLeft())); + + QString unistr = QString::fromUcs4(univec.data(), univec.length()); + + //paint text fragment + drawTextFragment(paint, + textArea, + unistr, + &_image[loc(x, y)]); + + _fixedFont = save__fixedFont; + + //reset back to single-width, single-height _lines + paint.setWorldTransform(QTransform(textScale.inverted()), true); + + if (y < _lineProperties.size() - 1) { + //double-height _lines are represented by two adjacent _lines + //containing the same characters + //both _lines will have the LINE_DOUBLEHEIGHT attribute. + //If the current line has the LINE_DOUBLEHEIGHT attribute, + //we can therefore skip the next line + if ((_lineProperties[y] & LINE_DOUBLEHEIGHT) != 0) { + y++; + } + } + + x += len - 1; + } + } +} + +void TerminalDisplay::blinkEvent() +{ + if (!_allowBlinkingText) return; + + _blinking = !_blinking; + + //TODO: Optimize to only repaint the areas of the widget + // where there is blinking text + // rather than repainting the whole widget. + update(); +} + +QRect TerminalDisplay::imageToWidget(const QRect& imageArea) const +{ + QRect result; + result.setLeft( _leftMargin + _fontWidth * imageArea.left() ); + result.setTop( _topMargin + _fontHeight * imageArea.top() ); + result.setWidth( _fontWidth * imageArea.width() ); + result.setHeight( _fontHeight * imageArea.height() ); + + return result; +} + +QRect TerminalDisplay::widgetToImage(const QRect &widgetArea) const +{ + QRect result; + result.setLeft(qMin(_usedColumns - 1, qMax(0, (widgetArea.left()) / _fontWidth ))); + result.setTop(qMin(_usedLines - 1, qMax(0, (widgetArea.top()) / _fontHeight))); + result.setRight(qMin(_usedColumns - 1, qMax(0, (widgetArea.right()) / _fontWidth ))); + result.setBottom(qMin(_usedLines - 1, qMax(0, (widgetArea.bottom()) / _fontHeight))); + return result; +} + +void TerminalDisplay::updateCursor() +{ +// QRect cursorRect = imageToWidget( QRect(cursorPosition(),QSize(1,1)) ); + update(); +} + +void TerminalDisplay::blinkCursorEvent() +{ + _cursorBlinking = !_cursorBlinking; + updateCursor(); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Resizing */ +/* */ +/* ------------------------------------------------------------------------- */ + +void TerminalDisplay::resizeEvent(QResizeEvent*) +{ + initKeyBoardSelection(); + updateImageSize(); + processFilters(); +} + +void TerminalDisplay::propagateSize() +{ + if (_isFixedSize) + { + setSize(_columns, _lines); + QWidget::setFixedSize(sizeHint()); + parentWidget()->adjustSize(); + parentWidget()->setFixedSize(parentWidget()->sizeHint()); + return; + } + if (_image) + updateImageSize(); +} + +void TerminalDisplay::updateImageSize() +{ + Character* oldimg = _image; + int oldlin = _lines; + int oldcol = _columns; + + makeImage(); + + // copy the old image to reduce flicker + int lines = qMin(oldlin,_lines); + int columns = qMin(oldcol,_columns); + + if (oldimg) + { + for (int line = 0; line < lines; line++) + { + memcpy((void*)&_image[_columns*line], + (void*)&oldimg[oldcol*line],columns*sizeof(Character)); + } + delete[] oldimg; + } + + if (_screenWindow) + _screenWindow->setWindowLines(_lines); + + _resizing = (oldlin!=_lines) || (oldcol!=_columns); + + if ( _resizing ) + { + showResizeNotification(); + emit changedContentSizeSignal(oldlin, oldcol); // expose resizeEvent + } + + _resizing = false; +} + +//showEvent and hideEvent are reimplemented here so that it appears to other classes that the +//display has been resized when the display is hidden or shown. +// +//TODO: Perhaps it would be better to have separate signals for show and hide instead of using +//the same signal as the one for a content size change +void TerminalDisplay::showEvent(QShowEvent*) +{ + emit changedContentSizeSignal(_contentHeight,_contentWidth); +} +void TerminalDisplay::hideEvent(QHideEvent*) +{ + emit changedContentSizeSignal(_contentHeight,_contentWidth); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Scrollbar */ +/* */ +/* ------------------------------------------------------------------------- */ + +void TerminalDisplay::scrollBarPositionChanged(int) +{ + if ( !_screenWindow ) + return; + + _screenWindow->scrollTo( _scrollBar->value() ); + + // if the thumb has been moved to the bottom of the _scrollBar then set + // the display to automatically track new output, + // that is, scroll down automatically + // to how new _lines as they are added + const bool atEndOfOutput = (_scrollBar->value() == _scrollBar->maximum()); + _screenWindow->setTrackOutput( atEndOfOutput ); + + updateImage(); +} + +void TerminalDisplay::setScroll(int cursor, int slines) +{ + // update _scrollBar if the range or value has changed, + // otherwise return + // + // setting the range or value of a _scrollBar will always trigger + // a repaint, so it should be avoided if it is not necessary + if ( _scrollBar->minimum() == 0 && + _scrollBar->maximum() == (slines - _lines) && + _scrollBar->value() == cursor ) + { + return; + } + + disconnect(_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(scrollBarPositionChanged(int))); + _scrollBar->setRange(0,slines - _lines); + _scrollBar->setSingleStep(1); + _scrollBar->setPageStep(_lines); + _scrollBar->setValue(cursor); + connect(_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(scrollBarPositionChanged(int))); +} + +void TerminalDisplay::scrollToEnd() +{ + disconnect(_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(scrollBarPositionChanged(int))); + _scrollBar->setValue( _scrollBar->maximum() ); + connect(_scrollBar, SIGNAL(valueChanged(int)), this, SLOT(scrollBarPositionChanged(int))); + + _screenWindow->scrollTo( _scrollBar->value() + 1 ); + _screenWindow->setTrackOutput( _screenWindow->atEndOfOutput() ); +} + +void TerminalDisplay::setScrollBarPosition(QTermWidget::ScrollBarPosition position) +{ + if (_scrollbarLocation == position) + return; + + if ( position == QTermWidget::NoScrollBar ) + _scrollBar->hide(); + else + _scrollBar->show(); + + _topMargin = _leftMargin = 1; + _scrollbarLocation = position; + + propagateSize(); + update(); +} + +void TerminalDisplay::initSelectionStates() +{ + if (!_screenWindow) + { + return; + } + + _selStartColumn = _screenWindow->cursorPosition().x(); + _selStartLine = _screenWindow->cursorPosition().y(); + + _selEndColumn = _selStartColumn; + _selEndLine = _selStartLine; +} + +void TerminalDisplay::initKeyBoardSelection() +{ + _selBegin = false; + + initSelectionStates(); +} + +void TerminalDisplay::mousePressEvent(QMouseEvent* ev) +{ + //判断有鼠标点击的时候,初始化键盘选择状态 + initKeyBoardSelection(); + + if ( _possibleTripleClick && (ev->button()==Qt::LeftButton) ) { + mouseTripleClickEvent(ev); + return; + } + + if ( !contentsRect().contains(ev->pos()) ) return; + + if ( !_screenWindow ) return; + + int charLine; + int charColumn; + getCharacterPosition(ev->pos(),charLine,charColumn); + QPoint pos = QPoint(charColumn,charLine); + + if ( ev->button() == Qt::LeftButton) + { + _lineSelectionMode = false; + _wordSelectionMode = false; + if(!hasFocus()) + { + setFocus(); + } + emit leftMouseClick(); + emit isBusySelecting(true); // Keep it steady... + // Drag only when the Control key is hold + bool selected = false; + + // The receiver of the testIsSelected() signal will adjust + // 'selected' accordingly. + //emit testIsSelected(pos.x(), pos.y(), selected); + + selected = _screenWindow->isSelected(pos.x(),pos.y()); + + if ((!_ctrlDrag || ev->modifiers() & Qt::ControlModifier) && selected ) { + // The user clicked inside selected text + dragInfo.state = diPending; + dragInfo.start = ev->pos(); + } + else { + // No reason to ever start a drag event + dragInfo.state = diNone; + + _preserveLineBreaks = !( ( ev->modifiers() & Qt::ControlModifier ) && !(ev->modifiers() & Qt::AltModifier) ); + _columnSelectionMode = (ev->modifiers() & Qt::AltModifier) && (ev->modifiers() & Qt::ControlModifier); + + if (_mouseMarks || (ev->modifiers() & Qt::ShiftModifier)) + { + _screenWindow->clearSelection(); + + //emit clearSelectionSignal(); + pos.ry() += _scrollBar->value(); + _iPntSel = _pntSel = pos; + _actSel = 1; // left mouse button pressed but nothing selected yet. + + } + else + { + emit mouseSignal( 0, charColumn + 1, charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 0); + } + + Filter::HotSpot *spot = _filterChain->hotSpotAt(charLine, charColumn); + if (spot && spot->type() == Filter::HotSpot::Link) + spot->activate(QLatin1String("click-action")); + } + } + else if ( ev->button() == Qt::MidButton ) + { + if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) ) + emitSelection(true,ev->modifiers() & Qt::ControlModifier); + else + emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0); + } + else if ( ev->button() == Qt::RightButton ) + { + if (_mouseMarks || (ev->modifiers() & Qt::ShiftModifier)) + emit configureRequest(ev->pos()); + else + emit mouseSignal( 2, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0); + } + /******** Modify by m000714 daizhengwen 2020-04-28: 调用父类的QMousePressEvent****************/ + QWidget::mousePressEvent(ev); + /********************* Modify by m000714 daizhengwen End ************************/ +} + +QList TerminalDisplay::filterActions(const QPoint& position) +{ + int charLine, charColumn; + getCharacterPosition(position,charLine,charColumn); + + Filter::HotSpot* spot = _filterChain->hotSpotAt(charLine,charColumn); + + return spot ? spot->actions() : QList(); +} + +void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev) +{ + int charLine = 0; + int charColumn = 0; + int leftMargin = _leftBaseMargin + + ((_scrollbarLocation == QTermWidget::ScrollBarLeft + && !_scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar)) + ? _scrollBar->width() : 0); + + getCharacterPosition(ev->pos(),charLine,charColumn); + + // handle filters + // change link hot-spot appearance on mouse-over + Filter::HotSpot* spot = _filterChain->hotSpotAt(charLine,charColumn); + if ( spot && spot->type() == Filter::HotSpot::Link) + { + QRegion previousHotspotArea = _mouseOverHotspotArea; + _mouseOverHotspotArea = QRegion(); + QRect r; + if (spot->startLine()==spot->endLine()) { + r.setCoords( spot->startColumn()*_fontWidth + leftMargin, + spot->startLine()*_fontHeight + _topBaseMargin, + spot->endColumn()*_fontWidth + leftMargin, + (spot->endLine()+1)*_fontHeight - 1 + _topBaseMargin ); + _mouseOverHotspotArea |= r; + } else { + r.setCoords( spot->startColumn()*_fontWidth + leftMargin, + spot->startLine()*_fontHeight + _topBaseMargin, + _columns*_fontWidth - 1 + leftMargin, + (spot->startLine()+1)*_fontHeight + _topBaseMargin ); + _mouseOverHotspotArea |= r; + for ( int line = spot->startLine()+1 ; line < spot->endLine() ; line++ ) { + r.setCoords( 0*_fontWidth + leftMargin, + line*_fontHeight + _topBaseMargin, + _columns*_fontWidth + leftMargin, + (line+1)*_fontHeight + _topBaseMargin ); + _mouseOverHotspotArea |= r; + } + r.setCoords( 0*_fontWidth + leftMargin, + spot->endLine()*_fontHeight + _topBaseMargin, + spot->endColumn()*_fontWidth + leftMargin, + (spot->endLine()+1)*_fontHeight + _topBaseMargin ); + _mouseOverHotspotArea |= r; + } + + update( _mouseOverHotspotArea | previousHotspotArea ); + } + else if ( !_mouseOverHotspotArea.isEmpty() ) + { + update( _mouseOverHotspotArea ); + // set hotspot area to an invalid rectangle + _mouseOverHotspotArea = QRegion(); + } + + // for auto-hiding the cursor, we need mouseTracking + if (ev->buttons() == Qt::NoButton ) return; + + // if the terminal is interested in mouse movements + // then emit a mouse movement signal, unless the shift + // key is being held down, which overrides this. + if (!_mouseMarks && !(ev->modifiers() & Qt::ShiftModifier)) + { + int button = 3; + if (ev->buttons() & Qt::LeftButton) + button = 0; + if (ev->buttons() & Qt::MidButton) + button = 1; + if (ev->buttons() & Qt::RightButton) + button = 2; + + + emit mouseSignal( button, + charColumn + 1, + charLine + 1 +_scrollBar->value() -_scrollBar->maximum(), + 1 ); + + return; + } + + if (dragInfo.state == diPending) + { + // we had a mouse down, but haven't confirmed a drag yet + // if the mouse has moved sufficiently, we will confirm + +// int distance = KGlobalSettings::dndEventDelay(); + int distance = QApplication::startDragDistance(); + if ( ev->x() > dragInfo.start.x() + distance || ev->x() < dragInfo.start.x() - distance || + ev->y() > dragInfo.start.y() + distance || ev->y() < dragInfo.start.y() - distance) + { + // we've left the drag square, we can start a real drag operation now + emit isBusySelecting(false); // Ok.. we can breath again. + + _screenWindow->clearSelection(); + doDrag(); + } + return; + } + else if (dragInfo.state == diDragging) + { + // this isn't technically needed because mouseMoveEvent is suppressed during + // Qt drag operations, replaced by dragMoveEvent + return; + } + + if (_actSel == 0) return; + + // don't extend selection while pasting + if (ev->buttons() & Qt::MidButton) return; + + extendSelection( ev->pos() ); +} + +void TerminalDisplay::extendSelection( const QPoint& position ) +{ + QPoint pos = position; + + if ( !_screenWindow ) + return; + + //if ( !contentsRect().contains(ev->pos()) ) return; + QPoint tL = contentsRect().topLeft(); + int tLx = tL.x(); + int tLy = tL.y(); + int scroll = _scrollBar->value(); + + // we're in the process of moving the mouse with the left button pressed + // the mouse cursor will kept caught within the bounds of the text in + // this widget. + + int linesBeyondWidget = 0; + + QRect textBounds(tLx + _leftMargin, + tLy + _topMargin, + _usedColumns*_fontWidth-1, + _usedLines*_fontHeight-1); + + // Adjust position within text area bounds. + QPoint oldpos = pos; + + pos.setX( qBound(textBounds.left(),pos.x(),textBounds.right()) ); + pos.setY( qBound(textBounds.top(),pos.y(),textBounds.bottom()) ); + + if ( oldpos.y() > textBounds.bottom() ) + { + linesBeyondWidget = (oldpos.y()-textBounds.bottom()) / _fontHeight; + _scrollBar->setValue(_scrollBar->value()+linesBeyondWidget+1); // scrollforward + } + if ( oldpos.y() < textBounds.top() ) + { + linesBeyondWidget = (textBounds.top()-oldpos.y()) / _fontHeight; + _scrollBar->setValue(_scrollBar->value()-linesBeyondWidget-1); // history + } + + int charColumn = 0; + int charLine = 0; + getCharacterPosition(pos,charLine,charColumn); + + QPoint here = QPoint(charColumn,charLine); //QPoint((pos.x()-tLx-_leftMargin+(_fontWidth/2))/_fontWidth,(pos.y()-tLy-_topMargin)/_fontHeight); + QPoint ohere; + QPoint _iPntSelCorr = _iPntSel; + _iPntSelCorr.ry() -= _scrollBar->value(); + QPoint _pntSelCorr = _pntSel; + _pntSelCorr.ry() -= _scrollBar->value(); + bool swapping = false; + + if ( _wordSelectionMode ) + { + // Extend to word boundaries + int i; + QChar selClass; + + bool left_not_right = ( here.y() < _iPntSelCorr.y() || + ( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() ) ); + bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() || + ( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() ) ); + swapping = left_not_right != old_left_not_right; + + // Find left (left_not_right ? from here : from start) + QPoint left = left_not_right ? here : _iPntSelCorr; + i = loc(left.x(),left.y()); + if (i>=0 && i<=_imageSize) { + selClass = charClass(_image[i].character); + while ( ((left.x()>0) || (left.y()>0 && (_lineProperties[left.y()-1] & LINE_WRAPPED) )) + && charClass(_image[i-1].character) == selClass ) + { i--; if (left.x()>0) left.rx()--; else {left.rx()=_usedColumns-1; left.ry()--;} } + } + + // Find left (left_not_right ? from start : from here) + QPoint right = left_not_right ? _iPntSelCorr : here; + i = loc(right.x(),right.y()); + if (i>=0 && i<=_imageSize) { + selClass = charClass(_image[i].character); + while( ((right.x()<_usedColumns-1) || (right.y()<_usedLines-1 && (_lineProperties[right.y()] & LINE_WRAPPED) )) + && charClass(_image[i+1].character) == selClass ) + { i++; if (right.x()<_usedColumns-1) right.rx()++; else {right.rx()=0; right.ry()++; } } + } + + // Pick which is start (ohere) and which is extension (here) + if ( left_not_right ) + { + here = left; ohere = right; + } + else + { + here = right; ohere = left; + } + ohere.rx()++; + } + + if ( _lineSelectionMode ) + { + // Extend to complete line + bool above_not_below = ( here.y() < _iPntSelCorr.y() ); + + QPoint above = above_not_below ? here : _iPntSelCorr; + QPoint below = above_not_below ? _iPntSelCorr : here; + + while (above.y()>0 && (_lineProperties[above.y()-1] & LINE_WRAPPED) ) + above.ry()--; + while (below.y()<_usedLines-1 && (_lineProperties[below.y()] & LINE_WRAPPED) ) + below.ry()++; + + above.setX(0); + below.setX(_usedColumns-1); + + // Pick which is start (ohere) and which is extension (here) + if ( above_not_below ) + { + here = above; ohere = below; + } + else + { + here = below; ohere = above; + } + + QPoint newSelBegin = QPoint( ohere.x(), ohere.y() ); + swapping = !(_tripleSelBegin==newSelBegin); + _tripleSelBegin = newSelBegin; + + ohere.rx()++; + } + + int offset = 0; + if ( !_wordSelectionMode && !_lineSelectionMode ) + { + int i; + QChar selClass; + + bool left_not_right = ( here.y() < _iPntSelCorr.y() || + ( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() ) ); + bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() || + ( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() ) ); + swapping = left_not_right != old_left_not_right; + + // Find left (left_not_right ? from here : from start) + QPoint left = left_not_right ? here : _iPntSelCorr; + + // Find left (left_not_right ? from start : from here) + QPoint right = left_not_right ? _iPntSelCorr : here; + if ( right.x() > 0 && !_columnSelectionMode ) + { + i = loc(right.x(),right.y()); + if (i>=0 && i<=_imageSize) { + selClass = charClass(_image[i-1].character); + /* if (selClass == ' ') + { + while ( right.x() < _usedColumns-1 && charClass(_image[i+1].character) == selClass && (right.y()<_usedLines-1) && + !(_lineProperties[right.y()] & LINE_WRAPPED)) + { i++; right.rx()++; } + if (right.x() < _usedColumns-1) + right = left_not_right ? _iPntSelCorr : here; + else + right.rx()++; // will be balanced later because of offset=-1; + }*/ + } + } + + // Pick which is start (ohere) and which is extension (here) + if ( left_not_right ) + { + here = left; ohere = right; offset = 0; + } + else + { + here = right; ohere = left; offset = -1; + } + } + + if ((here == _pntSelCorr) && (scroll == _scrollBar->value())) return; // not moved + + if (here == ohere) return; // It's not left, it's not right. + + if ( _actSel < 2 || swapping ) + { + if ( _columnSelectionMode && !_lineSelectionMode && !_wordSelectionMode ) + { + _screenWindow->setSelectionStart( ohere.x() , ohere.y() , true ); + } + else + { + _screenWindow->setSelectionStart( ohere.x()-1-offset , ohere.y() , false ); + } + + } + + _actSel = 2; // within selection + _pntSel = here; + _pntSel.ry() += _scrollBar->value(); + + if ( _columnSelectionMode && !_lineSelectionMode && !_wordSelectionMode ) + { + _screenWindow->setSelectionEnd( here.x() , here.y() ); + } + else + { + _screenWindow->setSelectionEnd( here.x()+offset , here.y() ); + } + +} + +void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev) +{ + if ( !_screenWindow ) + return; + + int charLine; + int charColumn; + getCharacterPosition(ev->pos(),charLine,charColumn); + + if ( ev->button() == Qt::LeftButton) + { + emit isBusySelecting(false); + if(dragInfo.state == diPending) + { + // We had a drag event pending but never confirmed. Kill selection + _screenWindow->clearSelection(); + //emit clearSelectionSignal(); + } + else + { + if ( _actSel > 1 ) + { + setSelection( _screenWindow->selectedText(currentDecodingOptions()) ); + } + + _actSel = 0; + + //FIXME: emits a release event even if the mouse is + // outside the range. The procedure used in `mouseMoveEvent' + // applies here, too. + + if (!_mouseMarks && !(ev->modifiers() & Qt::ShiftModifier)) + emit mouseSignal( 0, + charColumn + 1, + charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 2); + } + dragInfo.state = diNone; + } + + + if ( !_mouseMarks && + ((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier)) + || ev->button() == Qt::MidButton) ) + { + emit mouseSignal( ev->button() == Qt::MidButton ? 1 : 2, + charColumn + 1, + charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , + 2); + } +} + +void TerminalDisplay::getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const +{ + line = (widgetPoint.y()-contentsRect().top()-_topMargin) / _fontHeight; + if (line < 0) + line = 0; + if (line >= _usedLines) + line = _usedLines - 1; + + int x = widgetPoint.x() + _fontWidth / 2 - contentsRect().left() - _leftMargin; + if ( _fixedFont ) + column = x / _fontWidth; + else + { + column = 0; + while(column + 1 < _usedColumns && x > textWidth(0, column + 1, line)) + column++; + } + + if ( column < 0 ) + column = 0; + + // the column value returned can be equal to _usedColumns, which + // is the position just after the last character displayed in a line. + // + // this is required so that the user can select characters in the right-most + // column (or left-most for right-to-left input) + if ( column > _usedColumns ) + column = _usedColumns; +} + +void TerminalDisplay::setHideCursor(bool hideCursor) +{ + _hideCursor = hideCursor; + update(); +} + +void TerminalDisplay::setSessionId(int sessionId) +{ + _sessionId = sessionId; + _filterChain->setSessionId(sessionId); +} + +void TerminalDisplay::updateFilters() +{ + if ( !_screenWindow ) + return; + + processFilters(); +} + +void TerminalDisplay::updateLineProperties() +{ + if ( !_screenWindow ) + return; + + _lineProperties = _screenWindow->getLineProperties(); +} + +void TerminalDisplay::mouseDoubleClickEvent(QMouseEvent* ev) +{ + if ( ev->button() != Qt::LeftButton) return; + if ( !_screenWindow ) return; + + int charLine = 0; + int charColumn = 0; + + getCharacterPosition(ev->pos(),charLine,charColumn); + + QPoint pos(charColumn,charLine); + + // pass on double click as two clicks. + if (!_mouseMarks && !(ev->modifiers() & Qt::ShiftModifier)) + { + // Send just _ONE_ click event, since the first click of the double click + // was already sent by the click handler + emit mouseSignal( 0, + pos.x()+1, + pos.y()+1 +_scrollBar->value() -_scrollBar->maximum(), + 0 ); // left button + return; + } + + _screenWindow->clearSelection(); + QPoint bgnSel = pos; + QPoint endSel = pos; + int i = loc(bgnSel.x(),bgnSel.y()); + _iPntSel = bgnSel; + _iPntSel.ry() += _scrollBar->value(); + + _wordSelectionMode = true; + + // find word boundaries... + QChar selClass = charClass(_image[i].character); + { + // find the start of the word + int x = bgnSel.x(); + while ( ((x>0) || (bgnSel.y()>0 && (_lineProperties[bgnSel.y()-1] & LINE_WRAPPED) )) + && charClass(_image[i-1].character) == selClass ) + { + i--; + if (x>0) + x--; + else + { + x=_usedColumns-1; + bgnSel.ry()--; + } + } + + bgnSel.setX(x); + _screenWindow->setSelectionStart( bgnSel.x() , bgnSel.y() , false ); + + // find the end of the word + i = loc( endSel.x(), endSel.y() ); + x = endSel.x(); + while( ((x<_usedColumns-1) || (endSel.y()<_usedLines-1 && (_lineProperties[endSel.y()] & LINE_WRAPPED) )) + && charClass(_image[i+1].character) == selClass ) + { + i++; + if (x<_usedColumns-1) + x++; + else + { + x=0; + endSel.ry()++; + } + } + + endSel.setX(x); + + // In word selection mode don't select @ (64) if at end of word. + if ( ( QChar( _image[i].character ) == QLatin1Char('@') ) && ( ( endSel.x() - bgnSel.x() ) > 0 ) ) + endSel.setX( x - 1 ); + + + _actSel = 2; // within selection + + _screenWindow->setSelectionEnd( endSel.x() , endSel.y() ); + + setSelection( _screenWindow->selectedText(currentDecodingOptions()) ); + } + + _possibleTripleClick=true; + + QTimer::singleShot(QApplication::doubleClickInterval(),this, + SLOT(tripleClickTimeout())); +} + +void TerminalDisplay::wheelEvent( QWheelEvent* ev ) +{ + // 当前窗口被激活,且有焦点,不处理Ctrl+滚轮事件 + if (isActiveWindow() && hasFocus()) { + if (ev->modifiers() == Qt::ControlModifier) { + QWidget::wheelEvent(ev); + return; + } + } + //判断有鼠标滚轮滚动的时候,初始化键盘选择状态 + initKeyBoardSelection(); + + if (ev->orientation() != Qt::Vertical) + return; + + // if the terminal program is not interested mouse events + // then send the event to the scrollbar if the slider has room to move + // or otherwise send simulated up / down key presses to the terminal program + // for the benefit of programs such as 'less' + if ( _mouseMarks ) + { + bool canScroll = _scrollBar->maximum() > 0; + if (canScroll) + _scrollBar->event(ev); + else + { + // assume that each Up / Down key event will cause the terminal application + // to scroll by one line. + // + // to get a reasonable scrolling speed, scroll by one line for every 5 degrees + // of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees, + // giving a scroll of 3 lines + + // commit this to fix bug 17772, Because this code will turn the scrolling operation + // into the up and down keys of the keyboard and send the keyboard signal + /* + int key = ev->delta() > 0 ? Qt::Key_Up : Qt::Key_Down; + + // QWheelEvent::delta() gives rotation in eighths of a degree + int wheelDegrees = ev->delta() / 8; + int linesToScroll = abs(wheelDegrees) / 5; + + QKeyEvent keyScrollEvent(QEvent::KeyPress,key,Qt::NoModifier); + + for (int i=0;ipos() , charLine , charColumn ); + + emit mouseSignal( ev->delta() > 0 ? 4 : 5, + charColumn + 1, + charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , + 0); + } +} + +void TerminalDisplay::tripleClickTimeout() +{ + _possibleTripleClick=false; +} + +Screen::DecodingOptions TerminalDisplay::currentDecodingOptions() +{ + Screen::DecodingOptions decodingOptions; + if (_preserveLineBreaks) { + decodingOptions |= Screen::PreserveLineBreaks; + } + + return decodingOptions; +} + +void TerminalDisplay::mouseTripleClickEvent(QMouseEvent* ev) +{ + if ( !_screenWindow ) return; + + int charLine; + int charColumn; + getCharacterPosition(ev->pos(),charLine,charColumn); + _iPntSel = QPoint(charColumn,charLine); + + _screenWindow->clearSelection(); + + _lineSelectionMode = true; + _wordSelectionMode = false; + + _actSel = 2; // within selection + emit isBusySelecting(true); // Keep it steady... + + while (_iPntSel.y()>0 && (_lineProperties[_iPntSel.y()-1] & LINE_WRAPPED) ) + _iPntSel.ry()--; + + if (_tripleClickMode == SelectForwardsFromCursor) { + // find word boundary start + int i = loc(_iPntSel.x(),_iPntSel.y()); + QChar selClass = charClass(_image[i].character); + int x = _iPntSel.x(); + + while ( ((x>0) || + (_iPntSel.y()>0 && (_lineProperties[_iPntSel.y()-1] & LINE_WRAPPED) ) + ) + && charClass(_image[i-1].character) == selClass ) + { + i--; + if (x>0) + x--; + else + { + x=_columns-1; + _iPntSel.ry()--; + } + } + + _screenWindow->setSelectionStart( x , _iPntSel.y() , false ); + _tripleSelBegin = QPoint( x, _iPntSel.y() ); + } + else if (_tripleClickMode == SelectWholeLine) { + _screenWindow->setSelectionStart( 0 , _iPntSel.y() , false ); + _tripleSelBegin = QPoint( 0, _iPntSel.y() ); + } + + while (_iPntSel.y()<_lines-1 && (_lineProperties[_iPntSel.y()] & LINE_WRAPPED) ) + _iPntSel.ry()++; + + _screenWindow->setSelectionEnd( _columns - 1 , _iPntSel.y() ); + + setSelection(_screenWindow->selectedText(currentDecodingOptions())); + + _iPntSel.ry() += _scrollBar->value(); +} + + +bool TerminalDisplay::focusNextPrevChild( bool next ) +{ + if (next) + return false; // This disables changing the active part in konqueror + // when pressing Tab + return QWidget::focusNextPrevChild( next ); +} + + +QChar TerminalDisplay::charClass(QChar qch) const +{ + if ( qch.isSpace() ) return QLatin1Char(' '); + + if ( qch.isLetterOrNumber() || _wordCharacters.contains(qch, Qt::CaseInsensitive ) ) + return QLatin1Char('a'); + + return qch; +} + +void TerminalDisplay::setWordCharacters(const QString& wc) +{ + _wordCharacters = wc; +} + +void TerminalDisplay::setUsesMouse(bool on) +{ + if (_mouseMarks != on) { + _mouseMarks = on; + setCursor( _mouseMarks ? Qt::IBeamCursor : Qt::ArrowCursor ); + emit usesMouseChanged(); + } +} +bool TerminalDisplay::usesMouse() const +{ + return _mouseMarks; +} + +void TerminalDisplay::setBracketedPasteMode(bool on) +{ + _bracketedPasteMode = on; +} +bool TerminalDisplay::bracketedPasteMode() const +{ + return _bracketedPasteMode; +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Clipboard */ +/* */ +/* ------------------------------------------------------------------------- */ + +#undef KeyPress + +void TerminalDisplay::emitSelection(bool useXselection,bool appendReturn) +{ + if ( !_screenWindow ) + return; + + // Paste Clipboard by simulating keypress events + QString text = QApplication::clipboard()->text(useXselection ? QClipboard::Selection : + QClipboard::Clipboard); + if(appendReturn) + text.append(QLatin1Char('\r')); + if ( ! text.isEmpty() ) + { + text.replace(QLatin1Char('\n'), QLatin1Char('\r')); + bracketText(text); + QKeyEvent e(QEvent::KeyPress, 0, Qt::NoModifier, text); + emit keyPressedSignal(&e); // expose as a big fat keypress event + + _screenWindow->clearSelection(); + } +} + +void TerminalDisplay::bracketText(QString& text) +{ + if (bracketedPasteMode()) + { + text.prepend(QLatin1String("\033[200~")); + text.append(QLatin1String("\033[201~")); + } +} + +void TerminalDisplay::setSelection(const QString& t) +{ + /******** Modify by n014361 wangpeili 2020-02-12: 自动拷贝功能,需发出可拷贝信号***********×****/ + if(t != QApplication::clipboard()->text(QClipboard::Selection)) + { + selectionChanged(); + } + QApplication::clipboard()->setText(t, QClipboard::Selection); + /***************** Modify by n014361 End *************************/ +} +/******************************************************************** + 1. @函数: setSelectionAll + 2. @作者: 王培利 + 3. @日期: 2020-02-13 + 4. @说明: 屏幕全选功能 +********************************************************************/ +void TerminalDisplay::setSelectionAll() +{ + _screenWindow->setSelectionAll(); + setSelection(_screenWindow->selectedText(currentDecodingOptions())); +} + +void TerminalDisplay::copyClipboard() +{ + if ( !_screenWindow ) + return; + + QString text = _screenWindow->selectedText(currentDecodingOptions()); + if (!text.isEmpty()) + QApplication::clipboard()->setText(text); +} + +void TerminalDisplay::pasteClipboard() +{ + emitSelection(false,false); +} + +void TerminalDisplay::pasteSelection() +{ + emitSelection(true,false); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Keyboard */ +/* */ +/* ------------------------------------------------------------------------- */ + +void TerminalDisplay::setFlowControlWarningEnabled( bool enable ) +{ + _flowControlWarningEnabled = enable; + + // if the dialog is currently visible and the flow control warning has + // been disabled then hide the dialog + if (!enable) + outputSuspended(false); +} + +void TerminalDisplay::setMotionAfterPasting(MotionAfterPasting action) +{ + mMotionAfterPasting = action; +} + +int TerminalDisplay::motionAfterPasting() +{ + return mMotionAfterPasting; +} + +//在使用键盘选择文字之前,判断如果光标位置不是当前已选择区域的起点,则重新初始化选择状态 +void TerminalDisplay::checkAndInitSelectionState() +{ + if (_selStartColumn != _screenWindow->cursorPosition().x() + || _selStartLine != _screenWindow->cursorPosition().y() ) + { + qDebug() << "checkAndInitSelectionState!" << endl; + initKeyBoardSelection(); + } +} + +void TerminalDisplay::keyPressEvent( QKeyEvent* event ) +{ + bool emitKeyPressSignal = true; + + // Keyboard-based navigation + if ( event->modifiers() == Qt::ShiftModifier ) + { + bool update = true; + + //列的index从0开始,所以最大index需要减1 + int maxColumnIndex = _screenWindow->windowColumns() - 1; + + if ( event->key() == Qt::Key_PageUp ) + { + if (_scrollBar->value() != _scrollBar->maximum()) + { + initKeyBoardSelection(); + } + _screenWindow->scrollBy( ScreenWindow::ScrollPages , -1 ); + } + else if ( event->key() == Qt::Key_PageDown ) + { + if (_scrollBar->value() != _scrollBar->maximum()) + { + initKeyBoardSelection(); + } + _screenWindow->scrollBy( ScreenWindow::ScrollPages , 1 ); + } + else if ( event->key() == Qt::Key_Left ) + { + if (!_selBegin) + { + checkAndInitSelectionState(); + + _selBegin = true; + + //键盘按下时设置--开始选择 + //判断只有开始结束选择位置相等时,才允许开始选择 + if (_selStartLine == _selEndLine && _selStartColumn == _selEndColumn) + { + _screenWindow->scrollTo(_scrollBar->maximum()); + qDebug() << "left selection start"; + _screenWindow->setSelectionStart(_selStartColumn, _selStartLine, false); + } + } + else + { + //每一格设置一次选择结束状态,这样才能看到选择的区域;键盘一直按住则一直选 + _screenWindow->setSelectionEnd(_selEndColumn, _selEndLine); + } + + //向左选择 + if (_selEndColumn >= 1) + { + _selEndColumn--; + } + //左键选择到最左边的时候,向上选中上一行末尾(如果当前没到第一行的话) + else if (_selEndLine > 0) + { + _selEndColumn = maxColumnIndex; + _selEndLine--; + } + qDebug() << "left: _selStartColumn" << _selStartColumn + << "_selStartLine" << _selStartLine + << "_selEndColumn" << _selEndColumn + << "_selEndLine" << _selEndLine; + } + else if ( event->key() == Qt::Key_Right ) + { + if (!_selBegin) + { + checkAndInitSelectionState(); + + _selBegin = true; + //键盘按下时设置--开始选择 + if (_selStartLine == _selEndLine && _selStartColumn == _selEndColumn) + { + //滚动到光标所在位置开始选择 + _screenWindow->scrollTo(_scrollBar->maximum()); + + //开始选择 + qDebug() << "right selection start"; + _screenWindow->setSelectionStart(_selStartColumn, _selStartLine, false); + } + } + else + { + _screenWindow->setSelectionEnd(_selEndColumn, _selEndLine); + } + + //向右选择,最大行数为屏幕当前显示的最大行数(即屏幕当前显示了多少行就算多少行,并不包含历史行的行数) + int maxLineIndex = _screenWindow->windowLines() - 1; + //向右选择 + if (_selEndColumn < maxColumnIndex) + { + _selEndColumn++; + } + //右边到了最右边时,向下选中下一行的开头(如果当前没到最后一行的话) + else if (_selEndLine < maxLineIndex) + { + _selEndColumn = 0; + _selEndLine++; + } + qDebug() << "maxLineIndex: " << maxLineIndex << endl; + qDebug() << "right: _selStartColumn" << _selStartColumn + << "_selStartLine" << _selStartLine + << "_selEndColumn" << _selEndColumn + << "_selEndLine" << _selEndLine; + } + else if ( event->key() == Qt::Key_Up ) + { + //使用了Shift+上下键,由于屏幕发生滚动,会导致计算的行列位置不对,需要重新初始化选择状态 + initKeyBoardSelection(); + _screenWindow->scrollBy( ScreenWindow::ScrollLines , -1 ); + } + else if ( event->key() == Qt::Key_Down ) + { + //使用了Shift+上下键,由于屏幕发生滚动,会导致计算的行列位置不对,需要重新初始化选择状态 + initKeyBoardSelection(); + _screenWindow->scrollBy( ScreenWindow::ScrollLines , 1 ); + } + else if ( event->key() == Qt::Key_End) + { + scrollToEnd(); + } + else if ( event->key() == Qt::Key_Home) + { + //使用了Shift+Home键,由于屏幕发生滚动,会导致计算的行列位置不对,需要重新初始化选择状态 + initKeyBoardSelection(); + _screenWindow->scrollTo(0); + } + else + { + update = false; + } + + if ( update ) + { + _screenWindow->setTrackOutput( _screenWindow->atEndOfOutput() ); + + updateLineProperties(); + updateImage(); + + // do not send key press to terminal + emitKeyPressSignal = false; + } + } + else + { + initKeyBoardSelection(); + } + + _actSel=0; // Key stroke implies a screen update, so TerminalDisplay won't + // know where the current selection is. + + if (_hasBlinkingCursor) + { + _blinkCursorTimer->start(QApplication::cursorFlashTime() / 2); + if (_cursorBlinking) + blinkCursorEvent(); + else + _cursorBlinking = false; + } + + if ( emitKeyPressSignal ) + { + emit keyPressedSignal(event); + + /******** Modify by wangpeili n014361 2020-02-14: 按键滚动功能***********/ + // 按键滚动原为默认。现在修改为可以设置是否滚动 + // 暂时取消了原系统shift/alt/ctrl键的单独跳转功能。 + switch (mMotionAfterPasting) { + case MoveStartScreenWindow: + _screenWindow->scrollTo(0); + break; + case MoveEndScreenWindow: + if (!(event->key() == Qt::Key_Control + || event->key() == Qt::Key_Shift + || event->key() == Qt::Key_Alt)) { + scrollToEnd(); + } + break; + case NoMoveScreenWindow: + break; + } + + /***************** Modify by wangpeili n014361 End *****************/ + } + + event->accept(); +} + +void TerminalDisplay::keyReleaseEvent(QKeyEvent *event) +{ + //处理使用Shift+左右键选择文字,处理键盘释放的情况 + if ( event->modifiers() == Qt::ShiftModifier ) + { + if ( event->key() == Qt::Key_Left ) + { + //由于会有一定概率出现,长按后再同时短按一次Shift+左或者右方向键,出现一次选择两个字符的情况 + //这里做了一个数据纠正 + if (2 == abs(_lastLeftEndColumn - _selEndColumn)) + { + _selEndColumn = _lastEndColumn; + } + + _screenWindow->setSelectionEnd(_selEndColumn, _selEndLine); + _lastLeftEndColumn = _selEndColumn; + + setSelection( _screenWindow->selectedText(currentDecodingOptions()) ); + } + else if ( event->key() == Qt::Key_Right) + { + //由于会有一定概率出现,长按后再短按Shift+左或者右方向键,出现一次选择两个字符的情况 + //这里做了一个数据纠正 + if (2 == abs(_lastRightEndColumn - _selEndColumn)) + { + _selEndColumn = _lastEndColumn; + } + + _screenWindow->setSelectionEnd(_selEndColumn, _selEndLine); + _lastRightEndColumn = _selEndColumn; + + setSelection( _screenWindow->selectedText(currentDecodingOptions()) ); + } + else + { + _selBegin = false; + _lastEndColumn = _selEndColumn; + } + } + + event->accept(); +} + +void TerminalDisplay::inputMethodEvent( QInputMethodEvent* event ) +{ + QKeyEvent keyEvent(QEvent::KeyPress,0,Qt::NoModifier,event->commitString()); + emit keyPressedSignal(&keyEvent); + + _inputMethodData.preeditString = event->preeditString(); + update(preeditRect() | _inputMethodData.previousPreeditRect); + + event->accept(); +} +QVariant TerminalDisplay::inputMethodQuery( Qt::InputMethodQuery query ) const +{ + const QPoint cursorPos = _screenWindow ? _screenWindow->cursorPosition() : QPoint(0,0); + switch ( query ) + { + case Qt::ImMicroFocus: + return imageToWidget(QRect(cursorPos.x(),cursorPos.y(),1,1)); + break; + case Qt::ImFont: + return font(); + break; + case Qt::ImCursorPosition: + // return the cursor position within the current line + return cursorPos.x(); + break; + case Qt::ImSurroundingText: + { + // return the text from the current line + QString lineText; + QTextStream stream(&lineText); + PlainTextDecoder decoder; + decoder.begin(&stream); + decoder.decodeLine(&_image[loc(0,cursorPos.y())],_usedColumns,_lineProperties[cursorPos.y()]); + decoder.end(); + return lineText; + } + break; + case Qt::ImCurrentSelection: + return QString(); + break; + default: + break; + } + + return QVariant(); +} + +bool TerminalDisplay::handleShortcutOverrideEvent(QKeyEvent* keyEvent) +{ + int modifiers = keyEvent->modifiers(); + + // When a possible shortcut combination is pressed, + // emit the overrideShortcutCheck() signal to allow the host + // to decide whether the terminal should override it or not. + if (modifiers != Qt::NoModifier) + { + int modifierCount = 0; + unsigned int currentModifier = Qt::ShiftModifier; + + while (currentModifier <= Qt::KeypadModifier) + { + if (modifiers & currentModifier) + modifierCount++; + currentModifier <<= 1; + } + if (modifierCount < 2) + { + bool override = false; + emit overrideShortcutCheck(keyEvent,override); + if (override) + { + keyEvent->accept(); + return true; + } + } + } + + // Override any of the following shortcuts because + // they are needed by the terminal + int keyCode = keyEvent->key() | modifiers; + switch ( keyCode ) + { + // list is taken from the QLineEdit::event() code + case Qt::Key_Tab: + case Qt::Key_Delete: + case Qt::Key_Home: + case Qt::Key_End: + case Qt::Key_Backspace: + case Qt::Key_Left: + case Qt::Key_Right: + case Qt::Key_Escape: + keyEvent->accept(); + return true; + } + return false; +} + +bool TerminalDisplay::event(QEvent* event) +{ + bool eventHandled = false; + switch (event->type()) + { + case QEvent::ShortcutOverride: + eventHandled = handleShortcutOverrideEvent((QKeyEvent*)event); + break; + case QEvent::PaletteChange: + case QEvent::ApplicationPaletteChange: + _scrollBar->setPalette( QApplication::palette() ); + break; + default: + break; + } + return eventHandled ? true : QWidget::event(event); +} + +void TerminalDisplay::setBellMode(int mode) +{ + _bellMode=mode; +} + +void TerminalDisplay::enableBell() +{ + _allowBell = true; +} + +void TerminalDisplay::bell(const QString& message) +{ + if (_bellMode==NoBell) return; + + //limit the rate at which bells can occur + //...mainly for sound effects where rapid bells in sequence + //produce a horrible noise + if ( _allowBell ) + { + _allowBell = false; + QTimer::singleShot(500,this,SLOT(enableBell())); + + if (_bellMode==SystemBeepBell) + { + QApplication::beep(); + } + else if (_bellMode==NotifyBell) + { + emit notifyBell(message); + } + else if (_bellMode==VisualBell) + { + swapColorTable(); + QTimer::singleShot(200,this,SLOT(swapColorTable())); + } + } +} + +void TerminalDisplay::selectionChanged() +{ + emit copyAvailable(_screenWindow->selectedText(Screen::PlainText).isEmpty() == false); +} + +void TerminalDisplay::selectionCleared() +{ + initKeyBoardSelection(); +} + +/******************************************************************************* + 1. @函数: hideQScrollBarRightMenu + 2. @作者: ut000438 王亮 + 3. @日期: 2021-02-07 + 4. @说明: 隐藏QScrollBar默认的右键菜单 +*******************************************************************************/ +void TerminalDisplay::hideQScrollBarRightMenu() +{ + // fix bug 63308: 鼠标放置在右侧滚动条上点击鼠标右键,界面出现黑色长条 + QWidgetList widgetList = qApp->allWidgets(); + for(int i=0; i(widget); + if(scrollBar) + { + scrollBar->setContextMenuPolicy(Qt::NoContextMenu); + } + } +} + +void TerminalDisplay::swapColorTable() +{ + ColorEntry color = _colorTable[1]; + _colorTable[1]=_colorTable[0]; + _colorTable[0]= color; + _colorsInverted = !_colorsInverted; + update(); +} + +void TerminalDisplay::clearImage() +{ + // We initialize _image[_imageSize] too. See makeImage() + for (int i = 0; i <= _imageSize; i++) + { + _image[i].character = ' '; + _image[i].foregroundColor = CharacterColor(COLOR_SPACE_DEFAULT, + DEFAULT_FORE_COLOR); + _image[i].backgroundColor = CharacterColor(COLOR_SPACE_DEFAULT, + DEFAULT_BACK_COLOR); + _image[i].rendition = DEFAULT_RENDITION; + } +} + +void TerminalDisplay::calcGeometry() +{ + _scrollBar->resize(_scrollBar->sizeHint().width(), contentsRect().height()); + int scrollBarWidth = _scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar) + ? 0 : _scrollBar->width(); + switch(_scrollbarLocation) + { + case QTermWidget::NoScrollBar : + _leftMargin = _leftBaseMargin; + _contentWidth = contentsRect().width() - 2 * _leftBaseMargin; + break; + case QTermWidget::ScrollBarLeft : + _leftMargin = _leftBaseMargin + scrollBarWidth; + _contentWidth = contentsRect().width() - 2 * _leftBaseMargin - scrollBarWidth; + _scrollBar->move(contentsRect().topLeft()); + break; + case QTermWidget::ScrollBarRight: + _leftMargin = _leftBaseMargin; + _contentWidth = contentsRect().width() - 2 * _leftBaseMargin - scrollBarWidth; + _scrollBar->move(contentsRect().topRight() - QPoint(_scrollBar->width()-1, 0)); + break; + } + + _topMargin = _topBaseMargin; + _contentHeight = contentsRect().height() - 2 * _topBaseMargin + /* mysterious */ 1; + + if (!_isFixedSize) + { + // ensure that display is always at least one column wide + _columns = qMax(1,_contentWidth / _fontWidth); + _usedColumns = qMin(_usedColumns,_columns); + + // ensure that display is always at least one line high + _lines = qMax(1,_contentHeight / _fontHeight); + _usedLines = qMin(_usedLines,_lines); + } +} + +void TerminalDisplay::makeImage() +{ + calcGeometry(); + + // confirm that array will be of non-zero size, since the painting code + // assumes a non-zero array length + Q_ASSERT( _lines > 0 && _columns > 0 ); + Q_ASSERT( _usedLines <= _lines && _usedColumns <= _columns ); + + _imageSize=_lines*_columns; + + // We over-commit one character so that we can be more relaxed in dealing with + // certain boundary conditions: _image[_imageSize] is a valid but unused position + _image = new Character[_imageSize+1]; + + clearImage(); +} + +// calculate the needed size, this must be synced with calcGeometry() +void TerminalDisplay::setSize(int columns, int lines) +{ + int scrollBarWidth = (_scrollBar->isHidden() + || _scrollBar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, _scrollBar)) + ? 0 : _scrollBar->sizeHint().width(); + int horizontalMargin = 2 * _leftBaseMargin; + int verticalMargin = 2 * _topBaseMargin; + + QSize newSize = QSize( horizontalMargin + scrollBarWidth + (columns * _fontWidth) , + verticalMargin + (lines * _fontHeight) ); + + if ( newSize != size() ) + { + _size = newSize; + updateGeometry(); + } +} + +void TerminalDisplay::setFixedSize(int cols, int lins) +{ + _isFixedSize = true; + + //ensure that display is at least one line by one column in size + _columns = qMax(1,cols); + _lines = qMax(1,lins); + _usedColumns = qMin(_usedColumns,_columns); + _usedLines = qMin(_usedLines,_lines); + + if (_image) + { + delete[] _image; + makeImage(); + } + setSize(cols, lins); + QWidget::setFixedSize(_size); +} + +QSize TerminalDisplay::sizeHint() const +{ + return _size; +} + + +/* --------------------------------------------------------------------- */ +/* */ +/* Drag & Drop */ +/* */ +/* --------------------------------------------------------------------- */ + +void TerminalDisplay::dragEnterEvent(QDragEnterEvent* event) +{ + if (event->mimeData()->hasFormat(QLatin1String("text/plain"))) + event->acceptProposedAction(); + if (event->mimeData()->urls().count()) + event->acceptProposedAction(); +} + +void TerminalDisplay::dropEvent(QDropEvent* event) +{ + //KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); + QList urls = event->mimeData()->urls(); + + QString dropText; + if (!urls.isEmpty()) + { + // TODO/FIXME: escape or quote pasted things if neccessary... + qDebug() << "TerminalDisplay: handling urls. It can be broken. Report any errors, please"; + for ( int i = 0 ; i < urls.count() ; i++ ) + { + //KUrl url = KIO::NetAccess::mostLocalUrl( urls[i] , 0 ); + QUrl url = urls[i]; + + QString urlText; + + if (url.isLocalFile()) + urlText = url.path(); + else + urlText = url.toString(); + + // in future it may be useful to be able to insert file names with drag-and-drop + // without quoting them (this only affects paths with spaces in) + //urlText = KShell::quoteArg(urlText); + + dropText += urlText; + + if ( i != urls.count()-1 ) + dropText += QLatin1Char(' '); + } + } + else + { + dropText = event->mimeData()->text(); + } + + /***add begin by ut001121 zhangmeng 20201030 for SP4.1 拖拽文件到工作区文件路径加引号***/ + dropText.insert(0, '\''); + dropText.append('\''); + /***add end ut001121***/ + + emit sendStringToEmu(dropText.toLocal8Bit().constData()); +} + +void TerminalDisplay::doDrag() +{ + dragInfo.state = diDragging; + dragInfo.dragObject = new QDrag(this); + QMimeData *mimeData = new QMimeData; + mimeData->setText(QApplication::clipboard()->text(QClipboard::Selection)); + dragInfo.dragObject->setMimeData(mimeData); + dragInfo.dragObject->start(Qt::CopyAction); + // Don't delete the QTextDrag object. Qt will delete it when it's done with it. +} + +void TerminalDisplay::outputSuspended(bool suspended) +{ + //create the label when this function is first called + if (!_outputSuspendedLabel) + { + //This label includes a link to an English language website + //describing the 'flow control' (Xon/Xoff) feature found in almost + //all terminal emulators. + //If there isn't a suitable article available in the target language the link + //can simply be removed. + _outputSuspendedLabel = new QLabel( tr("Output has been " + "suspended" + " by pressing Ctrl+S." + " Press Ctrl+Q to resume."), + this ); + + QPalette palette(_outputSuspendedLabel->palette()); + //KColorScheme::adjustBackground(palette,KColorScheme::NeutralBackground); + _outputSuspendedLabel->setPalette(palette); + _outputSuspendedLabel->setAutoFillBackground(true); + _outputSuspendedLabel->setBackgroundRole(QPalette::Base); + _outputSuspendedLabel->setFont(QApplication::font()); + _outputSuspendedLabel->setContentsMargins(5, 5, 5, 5); + + //enable activation of "Xon/Xoff" link in label + _outputSuspendedLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse | + Qt::LinksAccessibleByKeyboard); + _outputSuspendedLabel->setOpenExternalLinks(true); + _outputSuspendedLabel->setVisible(false); + + _gridLayout->addWidget(_outputSuspendedLabel); + _gridLayout->addItem( new QSpacerItem(0,0,QSizePolicy::Expanding, + QSizePolicy::Expanding), + 1,0); + + } + + _outputSuspendedLabel->setVisible(suspended); +} + +uint TerminalDisplay::lineSpacing() const +{ + return _lineSpacing; +} + +void TerminalDisplay::setLineSpacing(uint i) +{ + _lineSpacing = i; + setVTFont(font()); // Trigger an update. +} + +int TerminalDisplay::margin() const +{ + return _topBaseMargin; +} + +void TerminalDisplay::setMargin(int i) +{ + _topBaseMargin = i; + _leftBaseMargin = i; +} + +AutoScrollHandler::AutoScrollHandler(QWidget* parent) +: QObject(parent) +, _timerId(0) +{ + parent->installEventFilter(this); +} +void AutoScrollHandler::timerEvent(QTimerEvent* event) +{ + if (event->timerId() != _timerId) + return; + + QMouseEvent mouseEvent( QEvent::MouseMove, + widget()->mapFromGlobal(QCursor::pos()), + Qt::NoButton, + Qt::LeftButton, + Qt::NoModifier); + + QApplication::sendEvent(widget(),&mouseEvent); +} +bool AutoScrollHandler::eventFilter(QObject* watched,QEvent* event) +{ + Q_ASSERT( watched == parent() ); + Q_UNUSED( watched ); + + switch (event->type()) + { + case QEvent::MouseMove: + { + QMouseEvent* mouseEvent = static_cast(event); + bool mouseInWidget = widget()->rect().contains(mouseEvent->pos()); + + if (mouseInWidget) + { + if (_timerId) + killTimer(_timerId); + _timerId = 0; + } + else + { + if (!_timerId && (mouseEvent->buttons() & Qt::LeftButton)) + _timerId = startTimer(100); + } + break; + } + case QEvent::MouseButtonRelease: + if (_timerId && (static_cast(event)->buttons() & ~Qt::LeftButton)) + { + killTimer(_timerId); + _timerId = 0; + } + break; + default: + break; + }; + + return false; +} + +//#include "TerminalDisplay.moc" + +TerminalScreen::TerminalScreen(QWidget *parent):TerminalDisplay (parent) +{ + setAttribute(Qt::WA_AcceptTouchEvents); + grabGesture(Qt::TapGesture); + grabGesture(Qt::TapAndHoldGesture); + grabGesture(Qt::PanGesture); + grabGesture(Qt::PinchGesture); + grabGesture(Qt::SwipeGesture); +} + +TerminalScreen::~TerminalScreen() +{ + +} + +/******************************************************************************* + 1. @函数: gestureEvent + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 手势事件 +*******************************************************************************/ +bool TerminalScreen::gestureEvent(QGestureEvent *event) +{ + if (QGesture *tap = event->gesture(Qt::TapGesture)) + tapGestureTriggered(static_cast(tap)); + if (QGesture *tapAndHold = event->gesture(Qt::TapAndHoldGesture)) + tapAndHoldGestureTriggered(static_cast(tapAndHold)); + if (QGesture *pan = event->gesture(Qt::PanGesture)) + panTriggered(static_cast(pan)); + if (QGesture *pinch = event->gesture(Qt::PinchGesture)) + pinchTriggered(static_cast(pinch)); + if (QGesture *swipe = event->gesture(Qt::SwipeGesture)) + swipeTriggered(static_cast(swipe)); + + return true; +} + +/******************************************************************************* + 1. @函数: tapGestureTriggered + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 单指点击手势 +*******************************************************************************/ +void TerminalScreen::tapGestureTriggered(QTapGesture* tap) +{ + //qDebug()<<"------"<<"tapGestureTriggered" << tap ; + switch (tap->state()) { + case Qt::GestureStarted: + { + m_gestureAction = GA_tap; + m_tapBeginTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + break; + } + case Qt::GestureUpdated: + { + break; + } + case Qt::GestureCanceled: + { + //根据时间长短区分轻触滑动 + qint64 timeSpace = QDateTime::currentDateTime().toMSecsSinceEpoch() - m_tapBeginTime; + if(timeSpace < TAP_MOVE_DELAY || m_slideContinue){ + m_slideContinue = false; + m_gestureAction = GA_slide; + qDebug() << "slide start" << timeSpace; + } else { + qDebug() << "null start" << timeSpace; + /***add by ut001121 zhangmeng 20200917 修复BUG48402***/ + m_gestureAction = GA_null; + } + break; + } + case Qt::GestureFinished: + { + /***add by ut001121 zhangmeng 20200917 修复BUG48402***/ + m_gestureAction = GA_null; + break; + } + default: + { + Q_ASSERT(false); + break; + } + } +} + +/******************************************************************************* + 1. @函数: tapAndHoldGestureTriggered + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 单指长按手势 +*******************************************************************************/ +void TerminalScreen::tapAndHoldGestureTriggered(QTapAndHoldGesture* tapAndHold) +{ + //qDebug()<<"------"<<"tapAndHoldGestureTriggered"<state()) { + case Qt::GestureStarted: + m_gestureAction = GA_hold; + break; + case Qt::GestureUpdated: + Q_ASSERT(false); + break; + case Qt::GestureCanceled: + Q_ASSERT(false); + break; + case Qt::GestureFinished: + /***del by ut001121 zhangmeng 20200915 修复BUG46979 + m_gestureAction = GA_null;***/ + break; + default: + Q_ASSERT(false); + break; + } +} + +/******************************************************************************* + 1. @函数: panTriggered + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 两指平移手势 +*******************************************************************************/ +void TerminalScreen::panTriggered(QPanGesture *pan) +{ + //qDebug()<<"------"<<"panTriggered"<state()) { + case Qt::GestureStarted: + m_gestureAction = GA_pan; + break; + case Qt::GestureUpdated: + break; + case Qt::GestureCanceled: + break; + case Qt::GestureFinished: + /***del by ut001121 zhangmeng 20200915 修复BUG46979 + m_gestureAction = GA_null;***/ + break; + default: + Q_ASSERT(false); + break; + } +} + +/******************************************************************************* + 1. @函数: pinchTriggered + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 两指捏合手势 +*******************************************************************************/ +void TerminalScreen::pinchTriggered(QPinchGesture *pinch) +{ + //qDebug()<<"------"<<"pinchTriggered"<state()) { + case Qt::GestureStarted: + { + qDebug()<<"------"<<"pinchTriggered start"; + m_gestureAction = GA_pinch; + /**add begin by ut001121 zhangmeng 20200812 捏合手势触发时判断是否重新获取字体大小 修复BUG42424 */ + QFont font = getVTFont(); + if(static_cast(m_scaleFactor) != font.pointSize()){ + m_scaleFactor = font.pointSize(); + } + /**add end by ut001121 */ + break; + } + case Qt::GestureUpdated: + { + QPinchGesture::ChangeFlags changeFlags = pinch->changeFlags(); + if (changeFlags & QPinchGesture::ScaleFactorChanged) { + m_currentStepScaleFactor = pinch->totalScaleFactor(); + } + break; + } + case Qt::GestureCanceled: + { + Q_ASSERT(false); + break; + } + case Qt::GestureFinished: + { + /***del by ut001121 zhangmeng 20200915 修复BUG46979 + m_gestureAction = GA_null;***/ + m_scaleFactor *= m_currentStepScaleFactor; + m_currentStepScaleFactor = 1; + qDebug()<<"------"<<"pinchTriggered over"; + break; + } + default: + { + Q_ASSERT(false); + break; + } + }//switch + + QFont font = getVTFont(); + font.setPointSize(static_cast(m_scaleFactor*m_currentStepScaleFactor)); + setVTFont(font); +} + +/******************************************************************************* + 1. @函数: swipeTriggered + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 三指滑动手势 +*******************************************************************************/ +void TerminalScreen::swipeTriggered(QSwipeGesture* swipe) +{ + //qDebug()<<"------"<<"swipeTriggered"<state()) { + case Qt::GestureStarted: + m_gestureAction = GA_swipe; + break; + case Qt::GestureUpdated: + break; + case Qt::GestureCanceled: + /***del by ut001121 zhangmeng 20200915 修复BUG46979 + m_gestureAction = GA_null;***/ + break; + case Qt::GestureFinished: + /***del by ut001121 zhangmeng 20200915 修复BUG46979 + m_gestureAction = GA_null;***/ + break; + default: + Q_ASSERT(false); + break; + } +} + +/******************************************************************************* + 1. @函数: slideGesture + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 单指滑动手势(通过原生触摸屏事件进行抽象模拟) +*******************************************************************************/ +void TerminalScreen::slideGesture(qreal diff) +{ + static qreal delta = 0.0; + int step = static_cast(diff+delta); + delta = diff+delta - step; + + getScrollBar()->setValue(getScrollBar()->value()+step); +} + +/******************************************************************************* + 1. @函数: event + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 事件处理 +*******************************************************************************/ +bool TerminalScreen::event(QEvent* event) +{ + static FlashTween tween; + static qreal change = 0.0; + static qreal duration = 0.0; + + if (event->type() == QEvent::Gesture) + return gestureEvent(static_cast(event)); + + if (event->type() == QEvent::MouseButtonRelease && static_cast(event)->source() == Qt::MouseEventSynthesizedByQt) + { + qDebug()<< "action is over" << m_gestureAction; + + if(m_gestureAction == GA_slide){ + tween.start(0, 0, change, duration, std::bind(&TerminalScreen::slideGesture, this, std::placeholders::_1)); + } + + m_gestureAction = GA_null; + } + if (event->type() == QEvent::MouseButtonPress && static_cast(event)->source() == Qt::MouseEventSynthesizedByQt) + { + QMouseEvent* mouseEvent = static_cast(event); + m_lastMouseTime = mouseEvent->timestamp(); + m_lastMouseYpos = mouseEvent->pos().y(); + + if(tween.active()) + { + m_slideContinue = true; + tween.stop(); + } + } + if (event->type() == QEvent::MouseMove && static_cast(event)->source() == Qt::MouseEventSynthesizedByQt) + { + QMouseEvent *mouseEvent = static_cast(event); + const ulong diffTime = mouseEvent->timestamp() - m_lastMouseTime; + const int diffYpos = mouseEvent->pos().y() - m_lastMouseYpos; + m_lastMouseTime = mouseEvent->timestamp(); + m_lastMouseYpos = mouseEvent->pos().y(); + + if(m_gestureAction == GA_slide) + { + QFont font = getVTFont(); + + /*开根号时数值越大衰减比例越大*/ + qreal direction = diffYpos>0?1.0:-1.0; + slideGesture(-direction*sqrt(abs(diffYpos))/font.pointSize()); + + /*预算惯性滑动时间*/ + m_stepSpeed = static_cast(diffYpos)/static_cast(diffTime+0.000001); + duration = sqrt(abs(m_stepSpeed))*1000; + + /*预算惯性滑动距离,4.0为调优数值*/ + m_stepSpeed /= sqrt(font.pointSize()*4.0); + change = m_stepSpeed*sqrt(abs(m_stepSpeed))*100; + + return true; + } + + if(m_gestureAction != GA_null) + { + return true; + } + } + + /***add by ut001121 zhangmeng 20200915 修复BUG46979***/ + if (event->type() == QEvent::MouseMove + && static_cast(event)->source() != Qt::MouseEventSynthesizedByQt + && m_gestureAction == GA_slide){ + return true; + } + /***add end ut001121***/ + + /** 待删除 + QTouchEvent *touchEvent = static_cast(event); + switch (event->type()) { + case QEvent::TouchBegin: + { + QList touchPoints = touchEvent->touchPoints(); + qDebug()<<"========================================================"<type()<timestamp(); + break;//不能return true; + } + default: break; + }*/ + return TerminalDisplay::event(event); +} + +FlashTween::FlashTween() +{ + m_timer = new QTimer(this); + connect(m_timer, &QTimer::timeout, this ,&FlashTween::__run); +} + +/******************************************************************************* + 1. @函数: start + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 开始惯性 +*******************************************************************************/ +void FlashTween::start(qreal t,qreal b,qreal c,qreal d, FunSlideInertial f) +{ + if(c==0.0 || d==0.0) return; + m_currentTime = t; + m_beginValue = b; + m_changeValue = c; + m_durationTime = d; + + m_lastValue = 0; + m_fSlideGesture = f; + m_direction = m_changeValue<0?1:-1; + + m_timer->stop(); + m_timer->start(CELL_TIME); +} + +/******************************************************************************* + 1. @函数: __run + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-18 + 4. @说明: 运行惯性 +*******************************************************************************/ +void FlashTween::__run() +{ + qreal tempValue = m_lastValue; + m_lastValue = FlashTween::sinusoidalEaseOut(m_currentTime, m_beginValue, abs(m_changeValue), m_durationTime); + m_fSlideGesture(m_direction*(m_lastValue-tempValue)); + //qDebug()<<"###############################"<stop(); + } +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalDisplay.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalDisplay.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/TerminalDisplay.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/TerminalDisplay.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1073 @@ +/* + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef TERMINALDISPLAY_H +#define TERMINALDISPLAY_H + +// Qt +#include +#include +#include + +// Konsole +#include "Filter.h" +#include "Character.h" +#include "qtermwidget.h" +//#include "konsole_export.h" +#include "tools.h" + +#include +#include +#include +#include +#include +#include + +#include +#define CELL_TIME 15 +#define TAP_MOVE_DELAY 300 + +#define KONSOLEPRIVATE_EXPORT + +class QDrag; +class QDragEnterEvent; +class QDropEvent; +class QLabel; +class QTimer; +class QEvent; +class QGridLayout; +class QKeyEvent; +class QScrollBar; +class QShowEvent; +class QHideEvent; +class QTimerEvent; +class QWidget; + +//class KMenu; + +namespace Konsole +{ + + enum MotionAfterPasting + { + // No move screenwindow after pasting + NoMoveScreenWindow = 0, + // Move start of screenwindow after pasting + MoveStartScreenWindow = 1, + // Move end of screenwindow after pasting + MoveEndScreenWindow = 2 + }; + +/***add begin by ut001121 zhangmeng 20200912 声明字号限制 修复42250***/ +extern __attribute__((visibility("default"))) int __minFontSize; +extern __attribute__((visibility("default"))) int __maxFontSize; +/***add end by ut001121***/ + +extern unsigned short vt100_graphics[32]; + +class ScreenWindow; + +/** + * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity + * to the terminal. + * + * When the terminal emulation receives new output from the program running in the terminal, + * it will update the display by calling updateImage(). + * + * TODO More documentation + */ +class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget +{ + Q_OBJECT + +public: + /** Constructs a new terminal display widget with the specified parent. */ + explicit TerminalDisplay(QWidget *parent=nullptr); + ~TerminalDisplay() override; + + /** Returns the terminal color palette used by the display. */ + const ColorEntry* colorTable() const; + /** Sets the terminal color palette used by the display. */ + void setColorTable(const ColorEntry table[]); + /** + * Sets the seed used to generate random colors for the display + * (in color schemes that support them). + */ + void setRandomSeed(uint seed); + /** + * Returns the seed used to generate random colors for the display + * (in color schemes that support them). + */ + uint randomSeed() const; + + /** Sets the opacity of the terminal display. */ + void setOpacity(qreal opacity); + + /** Sets the background image of the terminal display. */ + void setBackgroundImage(QString backgroundImage); + + /** + * Specifies whether the terminal display has a vertical scroll bar, and if so whether it + * is shown on the left or right side of the display. + */ + void setScrollBarPosition(QTermWidget::ScrollBarPosition position); + + /** + * Sets the current position and range of the display's scroll bar. + * + * @param cursor The position of the scroll bar's thumb. + * @param lines The maximum value of the scroll bar. + */ + void setScroll(int cursor, int lines); + + /** + * Scroll to the bottom of the terminal (reset scrolling). + */ + void scrollToEnd(); + + /** + * Returns the display's filter chain. When the image for the display is updated, + * the text is passed through each filter in the chain. Each filter can define + * hotspots which correspond to certain strings (such as URLs or particular words). + * Depending on the type of the hotspots created by the filter ( returned by Filter::Hotspot::type() ) + * the view will draw visual cues such as underlines on mouse-over for links or translucent + * rectangles for markers. + * + * To add a new filter to the view, call: + * viewWidget->filterChain()->addFilter( filterObject ); + */ + FilterChain* filterChain() const; + + /** + * Updates the filters in the display's filter chain. This will cause + * the hotspots to be updated to match the current image. + * + * WARNING: This function can be expensive depending on the + * image size and number of filters in the filterChain() + * + * TODO - This API does not really allow efficient usage. Revise it so + * that the processing can be done in a better way. + * + * eg: + * - Area of interest may be known ( eg. mouse cursor hovering + * over an area ) + */ + void processFilters(); + + /** + * Returns a list of menu actions created by the filters for the content + * at the given @p position. + */ + QList filterActions(const QPoint& position); + + /** Returns true if the cursor is set to blink or false otherwise. */ + bool blinkingCursor() { return _hasBlinkingCursor; } + /** Specifies whether or not the cursor blinks. */ + void setBlinkingCursor(bool blink); + + /** Specifies whether or not text can blink. */ + void setBlinkingTextEnabled(bool blink); + + void setCtrlDrag(bool enable) { _ctrlDrag=enable; } + bool ctrlDrag() { return _ctrlDrag; } + + /** + * This enum describes the methods for selecting text when + * the user triple-clicks within the display. + */ + enum TripleClickMode + { + /** Select the whole line underneath the cursor. */ + SelectWholeLine, + /** Select from the current cursor position to the end of the line. */ + SelectForwardsFromCursor + }; + /** Sets how the text is selected when the user triple clicks within the display. */ + void setTripleClickMode(TripleClickMode mode) { _tripleClickMode = mode; } + /** See setTripleClickSelectionMode() */ + TripleClickMode tripleClickMode() { return _tripleClickMode; } + + void setLineSpacing(uint); + void setMargin(int); + + int margin() const; + uint lineSpacing() const; + + void emitSelection(bool useXselection,bool appendReturn); + + /** change and wrap text corresponding to paste mode **/ + void bracketText(QString& text); + + /** + * Sets the shape of the keyboard cursor. This is the cursor drawn + * at the position in the terminal where keyboard input will appear. + * + * In addition the terminal display widget also has a cursor for + * the mouse pointer, which can be set using the QWidget::setCursor() + * method. + * + * Defaults to BlockCursor + */ + void setKeyboardCursorShape(QTermWidget::KeyboardCursorShape shape); + /** + * Returns the shape of the keyboard cursor. See setKeyboardCursorShape() + */ + QTermWidget::KeyboardCursorShape keyboardCursorShape() const; + + /** + * Sets the color used to draw the keyboard cursor. + * + * The keyboard cursor defaults to using the foreground color of the character + * underneath it. + * + * @param useForegroundColor If true, the cursor color will change to match + * the foreground color of the character underneath it as it is moved, in this + * case, the @p color parameter is ignored and the color of the character + * under the cursor is inverted to ensure that it is still readable. + * @param color The color to use to draw the cursor. This is only taken into + * account if @p useForegroundColor is false. + */ + void setKeyboardCursorColor(bool useForegroundColor , const QColor& color); + + /** + * Returns the color of the keyboard cursor, or an invalid color if the keyboard + * cursor color is set to change according to the foreground color of the character + * underneath it. + */ + QColor keyboardCursorColor() const; + + /** + * Returns the number of lines of text which can be displayed in the widget. + * + * This will depend upon the height of the widget and the current font. + * See fontHeight() + */ + int lines() { return _lines; } + /** + * Returns the number of characters of text which can be displayed on + * each line in the widget. + * + * This will depend upon the width of the widget and the current font. + * See fontWidth() + */ + int columns() { return _columns; } + + /** + * Returns the height of the characters in the font used to draw the text in the display. + */ + int fontHeight() { return _fontHeight; } + /** + * Returns the width of the characters in the display. + * This assumes the use of a fixed-width font. + */ + int fontWidth() { return _fontWidth; } + + void setSize(int cols, int lins); + void setFixedSize(int cols, int lins); + + // reimplemented + QSize sizeHint() const override; + + /** + * Sets which characters, in addition to letters and numbers, + * are regarded as being part of a word for the purposes + * of selecting words in the display by double clicking on them. + * + * The word boundaries occur at the first and last characters which + * are either a letter, number, or a character in @p wc + * + * @param wc An array of characters which are to be considered parts + * of a word ( in addition to letters and numbers ). + */ + void setWordCharacters(const QString& wc); + /** + * Returns the characters which are considered part of a word for the + * purpose of selecting words in the display with the mouse. + * + * @see setWordCharacters() + */ + QString wordCharacters() { return _wordCharacters; } + + /** + * Sets the type of effect used to alert the user when a 'bell' occurs in the + * terminal session. + * + * The terminal session can trigger the bell effect by calling bell() with + * the alert message. + */ + void setBellMode(int mode); + /** + * Returns the type of effect used to alert the user when a 'bell' occurs in + * the terminal session. + * + * See setBellMode() + */ + int bellMode() { return _bellMode; } + + /** + * This enum describes the different types of sounds and visual effects which + * can be used to alert the user when a 'bell' occurs in the terminal + * session. + */ + enum BellMode + { + /** A system beep. */ + SystemBeepBell=0, + /** + * KDE notification. This may play a sound, show a passive popup + * or perform some other action depending on the user's settings. + */ + NotifyBell=1, + /** A silent, visual bell (eg. inverting the display's colors briefly) */ + VisualBell=2, + /** No bell effects */ + NoBell=3 + }; + + void setSelection(const QString &t); + + void setSelectionAll(); + + /** + * Reimplemented. Has no effect. Use setVTFont() to change the font + * used to draw characters in the display. + */ + virtual void setFont(const QFont &); + + /** Returns the font used to draw characters in the display */ + QFont getVTFont() { return font(); } + + /** + * Sets the font used to draw the display. Has no effect if @p font + * is larger than the size of the display itself. + */ + void setVTFont(const QFont& font); + + /** + * Specified whether anti-aliasing of text in the terminal display + * is enabled or not. Defaults to enabled. + */ + static void setAntialias( bool antialias ) { _antialiasText = antialias; } + /** + * Returns true if anti-aliasing of text in the terminal is enabled. + */ + static bool antialias() { return _antialiasText; } + + /** + * Specify whether line chars should be drawn by ourselves or left to + * underlying font rendering libraries. + */ + void setDrawLineChars(bool drawLineChars) { _drawLineChars = drawLineChars; } + + /** + * Specifies whether characters with intense colors should be rendered + * as bold. Defaults to true. + */ + void setBoldIntense(bool value) { _boldIntense = value; } + /** + * Returns true if characters with intense colors are rendered in bold. + */ + bool getBoldIntense() { return _boldIntense; } + + /** + * Sets whether or not the current height and width of the + * terminal in lines and columns is displayed whilst the widget + * is being resized. + */ + void setTerminalSizeHint(bool on) { _terminalSizeHint=on; } + /** + * Returns whether or not the current height and width of + * the terminal in lines and columns is displayed whilst the widget + * is being resized. + */ + bool terminalSizeHint() { return _terminalSizeHint; } + /** + * Sets whether the terminal size display is shown briefly + * after the widget is first shown. + * + * See setTerminalSizeHint() , isTerminalSizeHint() + */ + void setTerminalSizeStartup(bool on) { _terminalSizeStartup=on; } + + /** + * Sets the status of the BiDi rendering inside the terminal display. + * Defaults to disabled. + */ + void setBidiEnabled(bool set) { _bidiEnabled=set; } + /** + * Returns the status of the BiDi rendering in this widget. + */ + bool isBidiEnabled() { return _bidiEnabled; } + + /** + * Sets the terminal screen section which is displayed in this widget. + * When updateImage() is called, the display fetches the latest character image from the + * the associated terminal screen window. + * + * In terms of the model-view paradigm, the ScreenWindow is the model which is rendered + * by the TerminalDisplay. + */ + void setScreenWindow( ScreenWindow* window ); + /** Returns the terminal screen section which is displayed in this widget. See setScreenWindow() */ + ScreenWindow* screenWindow() const; + + static bool HAVE_TRANSPARENCY; + + void setMotionAfterPasting(MotionAfterPasting action); + int motionAfterPasting(); + + // maps a point on the widget to the position ( ie. line and column ) + // of the character at that point. + void getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const; + + void setHideCursor(bool hideCursor); + + void setSessionId(int sessionId); + + // 获取是否允许输出时滚动 + bool getIsAllowScroll() const; + // 设置是否允许输出时滚动 + void setIsAllowScroll(bool isAllowScroll); + +public slots: + + /** + * Causes the terminal display to fetch the latest character image from the associated + * terminal screen ( see setScreenWindow() ) and redraw the display. + */ + void updateImage(); + + /** Essentially calles processFilters(). + */ + void updateFilters(); + + /** + * Causes the terminal display to fetch the latest line status flags from the + * associated terminal screen ( see setScreenWindow() ). + */ + void updateLineProperties(); + + /** Copies the selected text to the clipboard. */ + void copyClipboard(); + /** + * Pastes the content of the clipboard into the + * display. + */ + void pasteClipboard(); + /** + * Pastes the content of the selection into the + * display. + */ + void pasteSelection(); + + /** + * Changes whether the flow control warning box should be shown when the flow control + * stop key (Ctrl+S) are pressed. + */ + void setFlowControlWarningEnabled(bool enabled); + /** + * Returns true if the flow control warning box is enabled. + * See outputSuspended() and setFlowControlWarningEnabled() + */ + bool flowControlWarningEnabled() const + { return _flowControlWarningEnabled; } + + /** + * Causes the widget to display or hide a message informing the user that terminal + * output has been suspended (by using the flow control key combination Ctrl+S) + * + * @param suspended True if terminal output has been suspended and the warning message should + * be shown or false to indicate that terminal output has been resumed and that + * the warning message should disappear. + */ + void outputSuspended(bool suspended); + + /** + * Sets whether the program whoose output is being displayed in the view + * is interested in mouse events. + * + * If this is set to true, mouse signals will be emitted by the view when the user clicks, drags + * or otherwise moves the mouse inside the view. + * The user interaction needed to create selections will also change, and the user will be required + * to hold down the shift key to create a selection or perform other mouse activities inside the + * view area - since the program running in the terminal is being allowed to handle normal mouse + * events itself. + * + * @param usesMouse Set to true if the program running in the terminal is interested in mouse events + * or false otherwise. + */ + void setUsesMouse(bool usesMouse); + + /** See setUsesMouse() */ + bool usesMouse() const; + + void setBracketedPasteMode(bool bracketedPasteMode); + bool bracketedPasteMode() const; + + /** + * Shows a notification that a bell event has occurred in the terminal. + * TODO: More documentation here + */ + void bell(const QString& message); + + /** + * Sets the background of the display to the specified color. + * @see setColorTable(), setForegroundColor() + */ + void setBackgroundColor(const QColor& color); + + /** + * Sets the text of the display to the specified color. + * @see setColorTable(), setBackgroundColor() + */ + void setForegroundColor(const QColor& color); + + void selectionChanged(); + + void selectionCleared(); + + // 隐藏QScrollBar默认的右键菜单 + void hideQScrollBarRightMenu(); + +signals: + + /** + * Emitted when the user presses a key whilst the terminal widget has focus. + */ + void keyPressedSignal(QKeyEvent *e); + + /** + * A mouse event occurred. + * @param button The mouse button (0 for left button, 1 for middle button, 2 for right button, 3 for release) + * @param column The character column where the event occurred + * @param line The character row where the event occurred + * @param eventType The type of event. 0 for a mouse press / release or 1 for mouse motion + */ + void mouseSignal(int button, int column, int line, int eventType); + void changedFontMetricSignal(int height, int width); + void changedContentSizeSignal(int height, int width); + + /** + * Emitted when the user right clicks on the display, or right-clicks with the Shift + * key held down if usesMouse() is true. + * + * This can be used to display a context menu. + */ + void configureRequest(const QPoint& position); + + /** + * When a shortcut which is also a valid terminal key sequence is pressed while + * the terminal widget has focus, this signal is emitted to allow the host to decide + * whether the shortcut should be overridden. + * When the shortcut is overridden, the key sequence will be sent to the terminal emulation instead + * and the action associated with the shortcut will not be triggered. + * + * @p override is set to false by default and the shortcut will be triggered as normal. + */ + void overrideShortcutCheck(QKeyEvent* keyEvent,bool& override); + + void isBusySelecting(bool); + void sendStringToEmu(const char*); + + // qtermwidget signals + void copyAvailable(bool); + void termGetFocus(); + void termLostFocus(); + void leftMouseClick(); + + void notifyBell(const QString&); + void usesMouseChanged(); + +protected: + bool event( QEvent * ) override; + + void paintEvent( QPaintEvent * ) override; + + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; + void resizeEvent(QResizeEvent*) override; + + virtual void fontChange(const QFont &font); + void focusInEvent(QFocusEvent* event) override; + void focusOutEvent(QFocusEvent* event) override; + void keyPressEvent(QKeyEvent* event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent* ev) override; + void mousePressEvent( QMouseEvent* ) override; + void mouseReleaseEvent( QMouseEvent* ) override; + void mouseMoveEvent( QMouseEvent* ) override; + virtual void extendSelection( const QPoint& pos ); + void wheelEvent( QWheelEvent* ) override; + + bool focusNextPrevChild( bool next ) override; + + // drag and drop + void dragEnterEvent(QDragEnterEvent* event) override; + void dropEvent(QDropEvent* event) override; + void doDrag(); + void initSelectionStates(); + void initKeyBoardSelection(); + void checkAndInitSelectionState(); + + enum DragState { diNone, diPending, diDragging }; + + struct _dragInfo { + DragState state; + QPoint start; + QDrag *dragObject; + } dragInfo; + + // classifies the 'ch' into one of three categories + // and returns a character to indicate which category it is in + // + // - A space (returns ' ') + // - Part of a word (returns 'a') + // - Other characters (returns the input character) + QChar charClass(QChar ch) const; + + void clearImage(); + + Screen::DecodingOptions currentDecodingOptions(); + void mouseTripleClickEvent(QMouseEvent* ev); + + // reimplemented + void inputMethodEvent ( QInputMethodEvent* event ) override; + QVariant inputMethodQuery( Qt::InputMethodQuery query ) const override; + +protected slots: + + void scrollBarPositionChanged(int value); + void blinkEvent(); + void blinkCursorEvent(); + + //Renables bell noises and visuals. Used to disable further bells for a short period of time + //after emitting the first in a sequence of bell events. + void enableBell(); + +private slots: + + void swapColorTable(); + void tripleClickTimeout(); // resets possibleTripleClick + +private: + + // -- Drawing helpers -- + + // determine the width of this text + int textWidth(int startColumn, int length, int line) const; + // determine the area that encloses this series of characters + QRect calculateTextArea(int topLeftX, int topLeftY, int startColumn, int line, int length); + + // divides the part of the display specified by 'rect' into + // fragments according to their colors and styles and calls + // drawTextFragment() to draw the fragments + void drawContents(QPainter &paint, const QRect &rect); + // draws a section of text, all the text in this section + // has a common color and style + void drawTextFragment(QPainter& painter, const QRect& rect, + const QString& text, const Character* style); + // draws the background for a text fragment + // if useOpacitySetting is true then the color's alpha value will be set to + // the display's transparency (set with setOpacity()), otherwise the background + // will be drawn fully opaque + void drawBackground(QPainter& painter, const QRect& rect, const QColor& color, + bool useOpacitySetting); + // draws the cursor character + void drawCursor(QPainter& painter, const QRect& rect , const QColor& foregroundColor, + const QColor& backgroundColor , bool& invertColors); + // draws the characters or line graphics in a text fragment + void drawCharacters(QPainter& painter, const QRect& rect, const QString& text, + const Character* style, bool invertCharacterColor); + // draws a string of line graphics + void drawLineCharString(QPainter& painter, int x, int y, + const QString& str, const Character* attributes); + + // draws the preedit string for input methods + void drawInputMethodPreeditString(QPainter& painter , const QRect& rect); + + // -- + + // maps an area in the character image to an area on the widget + QRect imageToWidget(const QRect& imageArea) const; + QRect widgetToImage(const QRect& widgetArea) const; + + // the area where the preedit string for input methods will be draw + QRect preeditRect() const; + + // shows a notification window in the middle of the widget indicating the terminal's + // current size in columns and lines + void showResizeNotification(); + + // scrolls the image by a number of lines. + // 'lines' may be positive ( to scroll the image down ) + // or negative ( to scroll the image up ) + // 'region' is the part of the image to scroll - currently only + // the top, bottom and height of 'region' are taken into account, + // the left and right are ignored. + void scrollImage(int lines , const QRect& region); + + void calcGeometry(); + void propagateSize(); + void updateImageSize(); + void makeImage(); + + void paintFilters(QPainter& painter); + + void calDrawTextAdditionHeight(QPainter& painter); + + // returns a region covering all of the areas of the widget which contain + // a hotspot + QRegion hotSpotRegion() const; + + // returns the position of the cursor in columns and lines + QPoint cursorPosition() const; + + // redraws the cursor + void updateCursor(); + + bool handleShortcutOverrideEvent(QKeyEvent* event); + + bool canDraw(uint c) const; + bool isLineCharString(const QString& string) const; + + // the window onto the terminal screen which this display + // is currently showing. + QPointer _screenWindow; + + bool _allowBell; + + QGridLayout* _gridLayout; + + bool _fixedFont; // has fixed pitch + int _fontHeight; // height + int _fontWidth; // width + int _fontAscent; // ascend + bool _boldIntense; // Whether intense colors should be rendered with bold font + int _drawTextAdditionHeight; // additional height to prevent font trancation + bool _drawTextTestFlag; // indicate it is a testing or not + + int _leftMargin; // offset + int _topMargin; // offset + + int _lines; // the number of lines that can be displayed in the widget + int _columns; // the number of columns that can be displayed in the widget + + int _usedLines; // the number of lines that are actually being used, this will be less + // than 'lines' if the character image provided with setImage() is smaller + // than the maximum image size which can be displayed + + int _usedColumns; // the number of columns that are actually being used, this will be less + // than 'columns' if the character image provided with setImage() is smaller + // than the maximum image size which can be displayed + + QRect _contentRect; + + int _contentHeight; + int _contentWidth; + + Character* _image; // [lines][columns] + // only the area [usedLines][usedColumns] in the image contains valid data + + int _imageSize; + QVector _lineProperties; + + ColorEntry _colorTable[TABLE_COLORS]; + uint _randomSeed; + + bool _resizing; + bool _terminalSizeHint; + bool _terminalSizeStartup; + bool _bidiEnabled; + bool _mouseMarks; + bool _bracketedPasteMode; + + QPoint _iPntSel; // initial selection point + QPoint _pntSel; // current selection point + QPoint _tripleSelBegin; // help avoid flicker + int _actSel; // selection state + bool _wordSelectionMode; + bool _lineSelectionMode; + bool _preserveLineBreaks; + bool _columnSelectionMode; + + QClipboard* _clipboard; + QScrollBar* _scrollBar; + QTermWidget::ScrollBarPosition _scrollbarLocation; + QString _wordCharacters; + int _bellMode; + + bool _blinking; // hide text in paintEvent + bool _hasBlinker; // has characters to blink + bool _cursorBlinking; // hide cursor in paintEvent + bool _hasBlinkingCursor; // has blinking cursor enabled + bool _allowBlinkingText; // allow text to blink + bool _ctrlDrag; // require Ctrl key for drag + TripleClickMode _tripleClickMode; + bool _isFixedSize; //Columns / lines are locked. + QTimer* _blinkTimer; // active when hasBlinker + QTimer* _blinkCursorTimer; // active when hasBlinkingCursor + + //QMenu* _drop; + QString _dropText; + int _dndFileCount; + + bool _possibleTripleClick; // is set in mouseDoubleClickEvent and deleted + // after QApplication::doubleClickInterval() delay + + + bool m_bUserIsResizing; //用于判断当前控件是否正在resize + QLabel* _resizeWidget; + QTimer* _resizeTimer; + + bool _flowControlWarningEnabled; + bool _hideCursor; + + //widgets related to the warning message that appears when the user presses Ctrl+S to suspend + //terminal output - informing them what has happened and how to resume output + QLabel* _outputSuspendedLabel; + + uint _lineSpacing; + + bool _colorsInverted; // true during visual bell + + QSize _size; + + QRgb _blendColor; + + QPixmap _backgroundImage; + + // list of filters currently applied to the display. used for links and + // search highlight + TerminalImageFilterChain* _filterChain; + QRegion _mouseOverHotspotArea; + + QTermWidget::KeyboardCursorShape _cursorShape; + + // custom cursor color. if this is invalid then the foreground + // color of the character under the cursor is used + QColor _cursorColor; + + + MotionAfterPasting mMotionAfterPasting; + + struct InputMethodData + { + QString preeditString; + QRect previousPreeditRect; + }; + InputMethodData _inputMethodData; + + static bool _antialiasText; // do we antialias or not + + //the delay in milliseconds between redrawing blinking text + static const int TEXT_BLINK_DELAY = 500; + + int _margin; // the contents margin + bool _centerContents; // center the contents between margins + + int _leftBaseMargin; + int _topBaseMargin; + + int _sessionId; + bool _drawLineChars; + + //TerminalHeaderBar *_headerBar; + + int _selStartLine = 0; + int _selStartColumn = 0; + int _selEndLine = 0; + int _selEndColumn = 0; + + int _lastLeftEndColumn = 0; + int _lastLeftEndLine = 0; + int _lastRightEndColumn = 0; + int _lastRightEndLine = 0; + int _lastEndColumn = 0; + + bool _selBegin = false; + + // 当前窗口是否允许输出时回滚的标志位 + bool m_isAllowScroll = true; + +public: + static void setTransparencyEnabled(bool enable) + { + HAVE_TRANSPARENCY = enable; + } + + QScrollBar* getScrollBar() {return _scrollBar;} +}; + +class AutoScrollHandler : public QObject +{ +Q_OBJECT + +public: + explicit AutoScrollHandler(QWidget* parent); +protected: + void timerEvent(QTimerEvent* event) override; + bool eventFilter(QObject* watched,QEvent* event) override; +private: + QWidget* widget() const { return static_cast(parent()); } + int _timerId; +}; + +class KONSOLEPRIVATE_EXPORT TerminalScreen : public TerminalDisplay{ + Q_OBJECT + + public: + explicit TerminalScreen(QWidget *parent=nullptr); + ~TerminalScreen() override; + +protected: + bool event(QEvent* evt) override; + +private: + bool gestureEvent(QGestureEvent *event); + void tapGestureTriggered(QTapGesture*); + void tapAndHoldGestureTriggered(QTapAndHoldGesture*); + void panTriggered(QPanGesture*); + void pinchTriggered(QPinchGesture*); + void swipeTriggered(QSwipeGesture*); + + void slideGesture(qreal diff); + + enum GestureAction{ + GA_null, + GA_tap, + GA_slide, + GA_pinch, + GA_hold, + GA_pan, + GA_swipe + }; + + qreal m_scaleFactor = 1; + qreal m_currentStepScaleFactor = 1; + + qint64 m_tapBeginTime = 0; + bool m_slideContinue = false; + + int m_lastMouseYpos = 0; + ulong m_lastMouseTime = 0; + qreal m_stepSpeed = 0; + + Qt::GestureState m_tapStatus = Qt::NoGesture; + GestureAction m_gestureAction = GA_null; +}; + +// Tween算法(模拟惯性) +typedef std::function FunSlideInertial; +class FlashTween : public QObject +{ + Q_OBJECT +public: + FlashTween(); + ~FlashTween(){} + +public: + void start(qreal t,qreal b,qreal c,qreal d, FunSlideInertial fSlideGesture); + void stop(){m_timer->stop();} + bool active(){return m_timer->isActive();} + +private slots: + void __run(); + +private: + QTimer* m_timer = nullptr; + FunSlideInertial m_fSlideGesture = nullptr; + + qreal m_currentTime = 0; + qreal m_beginValue = 0; + qreal m_changeValue = 0; + qreal m_durationTime = 0; + + qreal m_direction = 1; + qreal m_lastValue = 0; + +private: + /** + 链接:https://www.cnblogs.com/cloudgamer/archive/2009/01/06/Tween.html + 效果说明 + Linear:无缓动效果; + Quadratic:二次方的缓动(t^2); + Cubic:三次方的缓动(t^3); + Quartic:四次方的缓动(t^4); + Quintic:五次方的缓动(t^5); + Sinusoidal:正弦曲线的缓动(sin(t)); + Exponential:指数曲线的缓动(2^t); + Circular:圆形曲线的缓动(sqrt(1-t^2)); + Elastic:指数衰减的正弦曲线缓动; + Back:超过范围的三次方缓动((s+1)*t^3 - s*t^2); + Bounce:指数衰减的反弹缓动。 + 每个效果都分三个缓动方式(方法),分别是: + easeIn:从0开始加速的缓动; + easeOut:减速到0的缓动; + easeInOut:前半段从0开始加速,后半段减速到0的缓动。 + 其中Linear是无缓动效果,没有以上效果。 + 四个参数分别是: + t: current time(当前时间); + b: beginning value(初始值); + c: change in value(变化量); + d: duration(持续时间)。 + */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wsequence-point" + static qreal quadraticEaseOut(qreal t,qreal b,qreal c,qreal d){ + return -c *(t/=d)*(t-2) + b; + } + + static qreal cubicEaseOut(qreal t,qreal b,qreal c,qreal d){ + return c*((t=t/d-1)*t*t + 1) + b; + } + + static qreal quarticEaseOut(qreal t,qreal b,qreal c,qreal d){ + return -c * ((t=t/d-1)*t*t*t - 1) + b; + } + + static qreal quinticEaseOut(qreal t,qreal b,qreal c,qreal d){ + return c*((t=t/d-1)*t*t*t*t + 1) + b; + } + + static qreal sinusoidalEaseOut(qreal t,qreal b,qreal c,qreal d){ + return c * sin(t/d * (3.14/2)) + b; + } + + static qreal circularEaseOut(qreal t,qreal b,qreal c,qreal d){ + return c * sqrt(1 - (t=t/d-1)*t) + b; + } + + static qreal bounceEaseOut(qreal t,qreal b,qreal c,qreal d){ + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + } + #pragma GCC diagnostic pop +}; + +} + +#endif // TERMINALDISPLAY_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/tools.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/tools.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/tools.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/tools.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ +/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "tools.h" + +#include +#include +#include +#include + + +/*! Helper function to get possible location of layout files. +By default the KB_LAYOUT_DIR is used (linux/BSD/macports). +But in some cases (apple bundle) there can be more locations). +*/ +QString get_kb_layout_dir() +{ +// qDebug() << __FILE__ << __FUNCTION__; + + QString rval = QString(); + QString k(QLatin1String(KB_LAYOUT_DIR)); + QDir d(k); + + //qDebug() << "default KB_LAYOUT_DIR: " << k; + + if (d.exists()) + { + rval = k.append(QLatin1Char('/')); + return rval; + } + +#ifdef Q_OS_MAC + // subdir in the app location + d.setPath(QCoreApplication::applicationDirPath() + QLatin1String("/kb-layouts/")); + //qDebug() << d.path(); + if (d.exists()) + return QCoreApplication::applicationDirPath() + QLatin1String("/kb-layouts/"); + + d.setPath(QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/kb-layouts/")); + if (d.exists()) + return QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/kb-layouts/"); +#endif + //qDebug() << "Cannot find KB_LAYOUT_DIR. Default:" << k; + return QString(); +} + +/*! Helper function to add custom location of color schemes. +*/ +namespace { + QStringList custom_color_schemes_dirs; +} +void add_custom_color_scheme_dir(const QString& custom_dir) +{ + if (!custom_color_schemes_dirs.contains(custom_dir)) + custom_color_schemes_dirs << custom_dir; +} + +/*! Helper function to get possible locations of color schemes. +By default the COLORSCHEMES_DIR is used (linux/BSD/macports). +But in some cases (apple bundle) there can be more locations). +*/ +const QStringList get_color_schemes_dirs() +{ +// qDebug() << __FILE__ << __FUNCTION__; + + QStringList rval; + QString k(QLatin1String(COLORSCHEMES_DIR)); + QDir d(k); + +// qDebug() << "default COLORSCHEMES_DIR: " << k; + + if (d.exists()) + rval << k.append(QLatin1Char('/')); + +#ifdef Q_OS_MAC + // subdir in the app location + d.setPath(QCoreApplication::applicationDirPath() + QLatin1String("/color-schemes/")); + //qDebug() << d.path(); + if (d.exists()) + { + if (!rval.isEmpty()) + rval.clear(); + rval << (QCoreApplication::applicationDirPath() + QLatin1String("/color-schemes/")); + } + d.setPath(QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/color-schemes/")); + if (d.exists()) + { + if (!rval.isEmpty()) + rval.clear(); + rval << (QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/color-schemes/")); + } +#endif + + for (const QString& custom_dir : qAsConst(custom_color_schemes_dirs)) + { + d.setPath(custom_dir); + if (d.exists()) + rval << custom_dir; + } +#ifdef QT_DEBUG + if(!rval.isEmpty()) { + qDebug() << "Using color-schemes: " << rval; + } else { + qDebug() << "Cannot find color-schemes in any location!"; + } +#endif + return rval; +} diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/tools.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/tools.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/tools.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/tools.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,31 @@ +/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TOOLS_H +#define TOOLS_H + +#include +#include +#include +#include + +QString get_kb_layout_dir(); +void add_custom_color_scheme_dir(const QString& custom_dir); +const QStringList get_color_schemes_dirs(); + +#endif diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/CMakeLists.txt deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/CMakeLists.txt --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/CMakeLists.txt 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,3 @@ +project(qtermwidget) + +build_component("." "${CMAKE_INSTALL_FULL_DATADIR}/qtermwidget/translations") diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_arn.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_arn.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_arn.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_arn.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + + + + + Size: %1 x %2 + + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + + QObject + + + + Un-named Color Scheme + + + + + Accessible Color Scheme + + + + + Open Link + + + + + Copy Link Address + + + + + Send Email To... + + + + + Copy Email Address + + + + + QTermWidget + + + Color Scheme Error + + + + + Cannot load color scheme: %1 + + + + + SearchBar + + + Match case + + + + + Regular expression + + + + + Highlight all matches + + + + + SearchBar + + + + + X + + + + + Find: + + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ast.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ast.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ast.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ast.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + + + + + Size: %1 x %2 + + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + + QObject + + + + Un-named Color Scheme + + + + + Accessible Color Scheme + + + + + Open Link + + + + + Copy Link Address + + + + + Send Email To... + + + + + Copy Email Address + + + + + QTermWidget + + + Color Scheme Error + + + + + Cannot load color scheme: %1 + + + + + SearchBar + + + Match case + + + + + Regular expression + + + + + Highlight all matches + + + + + SearchBar + + + + + X + + + + + Find: + + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_az.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_az.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_az.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_az.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Ölçü: XXX x XXX + + + + Size: %1 x %2 + Ölçü: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Çıxış Ctrl+S vurmaqla <a href="http://en.wikipedia.org/wiki/Flow_control">dayandırldı</a>. Davam etmək üçün <b>Ctrl+Q</b> vurun.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Klaviatura tərcüməçisi yoxdur. Terminala göndərmək məqsədi ilə düymələrə basılmanın simvollara çevrilməsi üçün lazım olan məlumatlar çatışmır. + + + + QObject + + + + Un-named Color Scheme + Adlandırılmamış Rəng Sxemi + + + + Accessible Color Scheme + Əlçatan Rəng Sxemi + + + + Open link + Keçidi açmaq + + + + Copy link + Keçidi kopyalamaq + + + + Send email to... + E-poçtu buraya göndərmək... + + + + Copy email address + E-poçt ünvanını kopyalamaq + + + + QTermWidget + + + Color Scheme Error + Rəng Sxemi Xətası + + + + Cannot load color scheme: %1 + Rəng sxemi yüklənə bilmədi: %1 + + + + SearchBar + + + Match case + Böyük/kiçik hərf nəzərə almaqla + + + + Regular expression + Müntəzəm ifadə + + + + Highlight all matches + Bütün oxşarları vurğulamaq + + + + SearchBar + Axtarış çubuğu + + + + X + X + + + + Find: + Tapmaq: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_bo.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_bo.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_bo.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_bo.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + ཆེ་ཆུང་། XXX x XXX + + + + Size: %1 x %2 + ཆེ་ཆུང་། %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>ཕྱིར་འདོན་འདི་ Ctrl+S <a href="http://en.wikipedia.org/wiki/Flow_control">ཡིས་སྐབས་སྡོད་བྱས། </a> འདི་ <b>Ctrl+Q</b> ལྟར་བསྐྱར་གསོ་བྱ་རྒྱུ་</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + སྤྱོད་ཆོག་པའི་མཐེབ་རྟགས་སྒྱུར་བའི་རེའུ་མིག་མིན་འདུག མཐེབ་བཀྱག་དེ་ཡིག་རྟགས་སུ་བསྒྱུར་ནས་མཐའ་སྣེར་སྐུར་དགོས་པའི་ཆ་འཕྲིན་རྙེད་ཀྱི་མིན་འདུག + + + + QObject + + + + Un-named Color Scheme + མིང་མེད་པའི་ཚོས་སྡེབ། + + + + Accessible Color Scheme + སྤྱོད་ཆོག་པའི་ཚོས་སྡེབ། + + + + Open link + སྦྲེལ་མཐུད་ཁ་ཕྱེ། + + + + Copy link + སྦྲེལ་མཐུད་པར་སློག + + + + Send email to... + སྦྲག་ཡིག་...ལ་སྐུར་བ། + + + + Copy email address + སྦྲག་ཡིག་གནས་ཡུལ་པར་སློག + + + + QTermWidget + + + Color Scheme Error + ཚོས་སྡེབ་ནོར་བ། + + + + Cannot load color scheme: %1 + ཚོས་སྡེབ་ %1སྣོན་འཇུག་བྱེད་ཐབས་མེད། + + + + SearchBar + + + Match case + ཆེ་བྲིས་ཆུང་བྲིས་སྙོམ་འགྲིག་བྱ་དགོས། + + + + Regular expression + ཚད་ལྡན་མཚོན་ཚུལ། + + + + Highlight all matches + སྙོམ་འགྲིག་ཐུབ་པའི་ཚན་པ་ཚང་མ་གསལ་ཚད་མཐོ། + + + + SearchBar + འཚོལ་ཞིབ་ཚན་བྱང་། + + + + X + X + + + + Find: + འཚོལ་བ། + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_br.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_br.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_br.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_br.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Ment: XXX x XXX + + + + Size: %1 x %2 + Ment: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>An ezvont a zo bet <a href="http://en.wikipedia.org/wiki/Flow_control">paouezet</a> en ur bouezañ Ktrl+S. Pouezit war <b>Ktrl+Q</b> evit kregiñ e-barzh en-dro, eta.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + N'eus troer hegerz ebet. An titour ret evit koñvertisañ ar boutonioù pouezet en arouezennoù da gas d'an terminal a vank. + + + + QObject + + + + Un-named Color Scheme + Chema livioù hep anv + + + + Accessible Color Scheme + Chema livioù hegerz + + + + Open link + Digeriñ al liamm + + + + Copy link + Eilañ al liamm + + + + Send email to... + Kas ur postel da... + + + + Copy email address + Eilañ ar chomlec'h postel + + + + QTermWidget + + + Color Scheme Error + Fazi gant ar chema livioù + + + + Cannot load color scheme: %1 + N'heller ket kargañ chema al livioù: %1 + + + + SearchBar + + + Match case + Kizidik ouzh al log + + + + Regular expression + Troienn-reoliata + + + + Highlight all matches + Sklaerijennañ an holl genglotadennoù + + + + SearchBar + Barrenn an enklaskoù + + + + X + X + + + + Find: + Kavout: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ca.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ca.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ca.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ca.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Mida: XXX x XXX + + + + Size: %1 x %2 + Mida: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>La sortida ha estat <a href="http://en.wikipedia.org/wiki/Flow_control">suspesa</a> en prémer Ctrl+S. Premeu <b>Ctrl+Q</b> per reprendre-la.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + No hi ha disponible cap traductor de teclat. No es disposa de la informació necessària per convertir la pressió de les tecles a caràcters al terminal. + + + + QObject + + + + Un-named Color Scheme + Esquema de color sense nom + + + + Accessible Color Scheme + Esquema de color accessible + + + + Open link + Obre l'enllaç + + + + Copy link + Copia l'enllaç + + + + Send email to... + Envia un correu a... + + + + Copy email address + Copia l'adreça de correu + + + + QTermWidget + + + Color Scheme Error + Error de l'esquema de color + + + + Cannot load color scheme: %1 + No es pot carregar l'esquema de color: %1 + + + + SearchBar + + + Match case + Coincidència + + + + Regular expression + Expressió regular + + + + Highlight all matches + Ressalta totes les coincidències + + + + SearchBar + Barra de cerca + + + + X + X + + + + Find: + Troba: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_cs.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_cs.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_cs.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_cs.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Velikost: XXX x XXX + + + + Size: %1 x %2 + Velikost: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Výstup byl <a href="http://en.wikipedia.org/wiki/Flow_control">pozastaven</a> stisknutím Ctrl+S. Pokud chcete pokračovat, stiskněte <b>Ctrl+Q</b>.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Není k dispozici žádný překlad klávesnice. Informace, potřebné pro převádění stisků kláves na znaky, odesílané do terminálu chybí. + + + + QObject + + + + Un-named Color Scheme + Nenazvané schéma barev + + + + Accessible Color Scheme + Schéma barev pro zpřístupnění hendikepovaným + + + + Open link + Otevřít odkaz + + + + Copy link + Zkopírovat odkaz + + + + Send email to... + Odeslat e-mail na… + + + + Copy email address + Zkopírovat e-mailovou adresu + + + + QTermWidget + + + Color Scheme Error + Chyba schématu barev + + + + Cannot load color scheme: %1 + Nedaří se načíst schéma barev: %1 + + + + SearchBar + + + Match case + Rozlišovat VELKÁ/malá písmena + + + + Regular expression + Regulární výraz + + + + Highlight all matches + Zvýraznit všechny shody + + + + SearchBar + Lišta hledání + + + + X + X + + + + Find: + Najít: + + + + < + < + + + + > + > + + + + ... + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_cy.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_cy.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_cy.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_cy.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + + + + + Size: %1 x %2 + + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + + QObject + + + + Un-named Color Scheme + + + + + Accessible Color Scheme + + + + + Open Link + + + + + Copy Link Address + + + + + Send Email To... + + + + + Copy Email Address + + + + + QTermWidget + + + Color Scheme Error + + + + + Cannot load color scheme: %1 + + + + + SearchBar + + + Match case + + + + + Regular expression + + + + + Highlight all matches + + + + + SearchBar + + + + + X + + + + + Find: + + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_da.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_da.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_da.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_da.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Størrelse: XXX x XXX + + + + Size: %1 x %2 + Størrelse: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Output er blevet <a href="http://en.wikipedia.org/wiki/Flow_control">suspenderet</a> ved tryk på Ctrl+S. Tryk på <b>Ctrl+Q</b> for at genoptage.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Ingen tastaturoversætter tilgængelig. Informationen, som er nødvendig for at konvertere tastetryk til tegn, som sendes til terminalen, mangler. + + + + QObject + + + + Un-named Color Scheme + Unavngivet farveskema + + + + Accessible Color Scheme + Tilgængeligt farveskema + + + + Open link + Åbn link + + + + Copy link + Kopiér link + + + + Send email to... + + + + + Copy email address + + + + + QTermWidget + + + Color Scheme Error + Fejl ved farveskema + + + + Cannot load color scheme: %1 + Kan ikke indlæse farveskema: %1 + + + + SearchBar + + + Match case + Der skelnes mellem store og små bogstaver + + + + Regular expression + Regulært udtryk + + + + Highlight all matches + Fremhæv alle match + + + + SearchBar + SøgeLinje + + + + X + X + + + + Find: + Find: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_de.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_de.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_de.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_de.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Größe: XXX x XXX + + + + Size: %1 x %2 + Größe: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Ausgabe wurde <a href="http://en.wikipedia.org/wiki/Flow_control">ausgesetzt</a> beim Drücken von Strg+S. Drücke <b>Strg+Q</b> um fortzufahren.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Kein Tastaturinterpretierer verfügbar. Die benötigte Information, um Tastenbefehle in Zeichen umzuwandeln und anschließenfd zum Terminal zu schicken, fehlt. + + + + QObject + + + + Un-named Color Scheme + Unbenanntes Farbschema + + + + Accessible Color Scheme + Zugängliches Farbschema + + + + Open link + Link öffnen + + + + Copy link + Link kopieren + + + + Send email to... + E-Mail senden an ... + + + + Copy email address + E-Mail-Adresse kopieren + + + + QTermWidget + + + Color Scheme Error + Farbschemafehler + + + + Cannot load color scheme: %1 + Kann Farbschema nicht laden: %1 + + + + SearchBar + + + Match case + Groß-/Kleinschreibung beachten + + + + Regular expression + Regulärer Ausdruck + + + + Highlight all matches + Alle Treffer hervorheben + + + + SearchBar + Suchleiste + + + + X + X + + + + Find: + Finde: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_el.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_el.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_el.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_el.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Μέγεθος: XXX x XXX + + + + Size: %1 x %2 + Μέγεθος: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Η έξοδος έχει <a href="http://en.wikipedia.org/wiki/Flow_control">ανασταλεί</a> με τον συνδυασμό πλήκτρων Ctrl+S. Πιέστε <b>Ctrl+Q</b> για επαναφορά.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Δεν υπάρχει κάποιος μεταφραστής πληκτρολογίου διαθέσιμος. Η απαιτούμενη πληροφορία για την μετατροπή των πατημάτων πλήκτρων σε χαρακτήρες στο τερματικό λείπει. + + + + QObject + + + + Un-named Color Scheme + Ανώνυμος χρωματικός συνδυασμός + + + + Accessible Color Scheme + Προσπελάσιμος χρωματικός σχηματισμός + + + + Open link + Άνοιγμα συνδέσμου + + + + Copy link + Αντιγραφή συνδέσμου + + + + Send email to... + Αποστολή email ... + + + + Copy email address + Αντιγραφή διεύθυνσης email + + + + QTermWidget + + + Color Scheme Error + Σφάλμα του χρωματικού συνδυασμού + + + + Cannot load color scheme: %1 + Αδύνατη η φόρτωση του χρωματικού συνδυασμού: %1 + + + + SearchBar + + + Match case + Ταίριασμα πεζών/κεφαλαίων + + + + Regular expression + Κανονική έκφραση + + + + Highlight all matches + Τονισμός όλων των ταιριαστών + + + + SearchBar + Γραμμή αναζήτησης + + + + X + X + + + + Find: + Εύρεση: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_en.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_en.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_en.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_en.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Size: XXX x XXX + + + + Size: %1 x %2 + Size: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + QObject + + + + Un-named Color Scheme + Un-named Color Scheme + + + + Accessible Color Scheme + Accessible Color Scheme + + + + Open link + Open link + + + + Copy link + Copy link + + + + Send email to... + Send email to... + + + + Copy email address + Copy email address + + + + QTermWidget + + + Color Scheme Error + Color Scheme Error + + + + Cannot load color scheme: %1 + Cannot load color scheme: %1 + + + + SearchBar + + + Match case + Match case + + + + Regular expression + Regular expression + + + + Highlight all matches + Highlight all matches + + + + SearchBar + SearchBar + + + + X + X + + + + Find: + Find: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_es.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_es.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_es.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_es.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Tamaño: XXX x XXX + + + + Size: %1 x %2 + Tamaño: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>La salida se ha <a href="http://en.wikipedia.org/wiki/Flow_control">suspendido</a> por presionar Ctrl+S. Presione <b>Ctrl+Q</b> para reanudar.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + El traductor de teclado no está disponible. Falta la información necesaria para convertir las pulsaciones de las teclas en caracteres para introducirlos en la terminal. + + + + QObject + + + + Un-named Color Scheme + Esquema de color sin nombre + + + + Accessible Color Scheme + Esquema de color accesible + + + + Open link + Abrir enlace + + + + Copy link + Copiar enlace + + + + Send email to... + Enviar correo a... + + + + Copy email address + Copiar dirección de correo + + + + QTermWidget + + + Color Scheme Error + Error de esquema de color + + + + Cannot load color scheme: %1 + No se puede cargar el esquema de color: %1 + + + + SearchBar + + + Match case + Coincidir mayúsculas + + + + Regular expression + Expresión regular + + + + Highlight all matches + Resaltar todas las coincidencias + + + + SearchBar + Barra de búsqueda + + + + X + X + + + + Find: + Buscar: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_fi.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_fi.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_fi.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_fi.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Koko: XXX x XXX + + + + Size: %1 x %2 + Koko: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Tulostus <a href="http://en.wikipedia.org/wiki/Flow_control">keskeytyy</a> painamalla Ctrl+S. Paina <b>Ctrl+Q</b> jatkaaksesi.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Kääntäjää ei ole saatavana. Tietoja joita tarvitaan näppäinpainalluksien muuntamiseksi ja terminaaliin lähetettäviksi merkeiksi, puuttuu. + + + + QObject + + + + Un-named Color Scheme + Nimeämätön värimalli + + + + Accessible Color Scheme + Saatavilla oleva värimalli + + + + Open link + Avaa linkki + + + + Copy link + Kopioi linkki + + + + Send email to... + Lähetä sähköpostia... + + + + Copy email address + Kopioi sähköpostiosoite + + + + QTermWidget + + + Color Scheme Error + Värimallissa virhe + + + + Cannot load color scheme: %1 + Värimallia ei voi ladata: %1 + + + + SearchBar + + + Match case + Sama kirjainkoko + + + + Regular expression + Säännöllinen lauseke + + + + Highlight all matches + Korosta kaikki samat + + + + SearchBar + Etsi-palkki + + + + X + X + + + + Find: + Etsi: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_fr.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_fr.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_fr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_fr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Taille : XXX x XXX + + + + Size: %1 x %2 + Taille : %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>La sortie a été <a href="http://en.wikipedia.org/wiki/Flow_control">suspendue</a> en pressant Ctrl+S. Pressez <b>Ctrl+Q</b> pour reprendre.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Aucun traducteur disponible. L'information nécessaire à la conversion des touches pressées en caractères à envoyer au terminal est absente. + + + + QObject + + + + Un-named Color Scheme + Schéma de couleurs non nommé + + + + Accessible Color Scheme + Schéma des couleurs accessible + + + + Open link + Ouvrir le lien + + + + Copy link + Copier le lien + + + + Send email to... + Envoyer un mail à... + + + + Copy email address + Copier l'adresse mail + + + + QTermWidget + + + Color Scheme Error + Erreur du schéma des couleurs + + + + Cannot load color scheme: %1 + Impossible de charger le schéma de couleurs : %1 + + + + SearchBar + + + Match case + Sensible à la casse + + + + Regular expression + Expression régulière + + + + Highlight all matches + Surbrillance de toutes les concordances + + + + SearchBar + Barre de recherche + + + + X + X + + + + Find: + Trouver : + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_gl_ES.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_gl_ES.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_gl_ES.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_gl_ES.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Tamaño: XXX x XXX + + + + Size: %1 x %2 + Tamaño: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control">suspendida</a> ao premer Ctrl+S. Prema <b>Ctrl+Q</b> para continuar.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Non hai dispoñíbel ningún tradutor de teclado. Non está dispoñíbel a información necesaria para converter pulsacións de tecla en caracteres para envialos o terminal. + + + + QObject + + + + Un-named Color Scheme + Esquema de cor sen nome + + + + Accessible Color Scheme + Esquema de cor accesíbel + + + + Open link + Abrir ligazón + + + + Copy link + Copiar ligazón + + + + Send email to... + Enviar un correo electrónico a... + + + + Copy email address + Copiar enderezo electrónico + + + + QTermWidget + + + Color Scheme Error + Produciuse un erro no esquema de cor + + + + Cannot load color scheme: %1 + Non é posíbel cargar o esquema de cor: %1 + + + + SearchBar + + + Match case + Distinguir maiúsculas de minúsculas + + + + Regular expression + Expresión regular + + + + Highlight all matches + Resaltar todas as coincidencias + + + + SearchBar + Barra de buscas + + + + X + X + + + + Find: + Atopar: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_gl.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_gl.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_gl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_gl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Tamaño: XXX x XXX + + + + Size: %1 x %2 + Tamaño: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control">suspendida</a> ao premer Ctrl+S. Prema <b>Ctrl+Q</b> para continuar.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Non hai dispoñíbel ningún tradutor de teclado. Non está dispoñíbel a información necesaria para converter pulsacións de tecla en caracteres para envialos o terminal. + + + + QObject + + + + Un-named Color Scheme + Esquema de cor sen nome + + + + Accessible Color Scheme + Esquema de cor accesíbel + + + + Open Link + Abrir a ligazón + + + + Copy Link Address + Copiar o enderezo da ligazón + + + + Send Email To... + Enviar correo a... + + + + Copy Email Address + Copiar o enderezo de correo + + + + QTermWidget + + + Color Scheme Error + Produciuse un erro no esquema de cor + + + + Cannot load color scheme: %1 + Non é posíbel cargar o esquema de cor: %1 + + + + SearchBar + + + Match case + Distinguir maiúsculas de minúsculas + + + + Regular expression + Expresión regular + + + + Highlight all matches + Resaltar todas as coincidencias + + + + SearchBar + Barra de buscas + + + + X + + + + + Find: + Atopar: + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_he.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_he.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_he.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_he.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + גודל: XXX × XXX + + + + Size: %1 x %2 + גודל: %1 × %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>הפלט <a href="http://en.wikipedia.org/wiki/Flow_control">הושהה</a> בלחיצה על Ctrl+S. יש ללחוץ על <b>Ctrl+Q</b> כדי להמשיך.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + אין מתרגם מקלדת זמין. המידע שנדרש לצורך המרת לחיצות מקשים לתווים לשליחה למסוף חסר. + + + + QObject + + + + Un-named Color Scheme + ערכת צבעים ללא שם + + + + Accessible Color Scheme + ערכת צבעים נגישה + + + + Open Link + פתיחת קישור + + + + Copy Link Address + העתקת כתובת קישור + + + + Send Email To... + שליחת דוא״ל אל… + + + + Copy Email Address + העתקת כתובת דוא״ל + + + + QTermWidget + + + Color Scheme Error + שגיאת ערכת צבעים + + + + Cannot load color scheme: %1 + לא ניתן לטעון ערכת צבעים: %1 + + + + SearchBar + + + Match case + התאמת רישיות + + + + Regular expression + ביטוי רגולרי + + + + Highlight all matches + הדגשת כל המופעים + + + + SearchBar + סרגל חיפוש + + + + X + + + + + Find: + חיפוש: + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_hu.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_hu.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_hu.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_hu.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Méret: XXX x XXX + + + + Size: %1 x %2 + Méret: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>A kimenet <a href="http://en.wikipedia.org/wiki/Flow_control">el van nyomva</a> a Ctrl+S megnyomásával. Nyomj <b>Ctrl+Q -t</b> a visszatéréshez.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Nincs billentyűzet átalakító. Hiányzik az információ, ami a billentyű lenyomásnak a terminálhoz küldendő karakterekké alakításához szükséges. + + + + QObject + + + + Un-named Color Scheme + Névtelen Színséma + + + + Accessible Color Scheme + Elérhető Színséma + + + + Open link + Hivatkozás megnyitása + + + + Copy link + Hivatkozás másolása + + + + Send email to... + E-mail küldése ide... + + + + Copy email address + E-mail cím másolása + + + + QTermWidget + + + Color Scheme Error + Színséma hiba + + + + Cannot load color scheme: %1 + A %1 színséma betöltése nem lehetséges + + + + SearchBar + + + Match case + Nagybetű érzékeny + + + + Regular expression + Szabályos kifejezés + + + + Highlight all matches + Összes találat kiemelése + + + + SearchBar + Keresősáv + + + + X + X + + + + Find: + Találat: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_it.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_it.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_it.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_it.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Dimensione: XXX x XXX + + + + Size: %1 x %2 + Dimensione: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>L'Output è stato <a href="http://en.wikipedia.org/wiki/Flow_control">sospeso</a> premendo Ctrl+S. Premi <b>Ctrl+Q</b> per ripristinarlo.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Nessun traduttore di tastiera disponibile. Mancano le informazioni necessarie per convertire i tasti premuti in caratteri da inviare al terminale. + + + + QObject + + + + Un-named Color Scheme + Combinazione di colori senza nome + + + + Accessible Color Scheme + Schema colori accessibile + + + + Open link + Apri link + + + + Copy link + Copia link + + + + Send email to... + Invia email a... + + + + Copy email address + Copia indirizzo email + + + + QTermWidget + + + Color Scheme Error + Errore schema colori + + + + Cannot load color scheme: %1 + Impossibile caricare lo schema colori: %1 + + + + SearchBar + + + Match case + Casi di corrispondenza + + + + Regular expression + Espressione regolare + + + + Highlight all matches + Evidenzia tutte le corrispondenze + + + + SearchBar + Barra di ricerca + + + + X + X + + + + Find: + Trova: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ja.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ja.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ja.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ja.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + + + + + Size: %1 x %2 + + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + + QObject + + + + Un-named Color Scheme + 名前のないカラースキーム + + + + Accessible Color Scheme + アクセス可能なカラースキーム + + + + Open Link + リンクを開く + + + + Copy Link Address + リンクのアドレスをコピー + + + + Send Email To... + メールを送信... + + + + Copy Email Address + メールアドレスをコピー + + + + QTermWidget + + + Color Scheme Error + カラースキームのエラー + + + + Cannot load color scheme: %1 + カラースキームをロードすることができません: %1 + + + + SearchBar + + + Match case + + + + + Regular expression + 正規表現 + + + + Highlight all matches + 一致するものをハイライト + + + + SearchBar + サーチバー + + + + X + + + + + Find: + 探す: + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ko.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ko.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ko.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ko.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + 크기: XXX x XXX + + + + Size: %1 x %2 + 크기: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Ctrl+S를 눌러 출력이 <a href="http://en.wikipedia.org/wiki/Flow_control">일시 중단</a>되었습니다. <b>Ctrl+Q</b>를 눌러 다시 시작합니다.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + 키보드 번역기를 사용할 수 없습니다. 터미널에 보낼 키 누름을 문자로 변환하는 데 필요한 정보가 없습니다. + + + + QObject + + + + Un-named Color Scheme + 이름 지정되지 않은 색상 구성표 + + + + Accessible Color Scheme + 액세스 가능한 색상 구성표 + + + + Open link + 링크 열기 + + + + Copy link + 링크 복사 + + + + Send email to... + 이메일 보내기... + + + + Copy email address + 이메일 주소 복사 + + + + QTermWidget + + + Color Scheme Error + 색 구성표 오류 + + + + Cannot load color scheme: %1 + 색상 구성표를 불러올 수 없음: %1 + + + + SearchBar + + + Match case + 일치하는 경우 + + + + Regular expression + 정규식 + + + + Highlight all matches + 모든 일치 강조 표시 + + + + SearchBar + 검색 창 + + + + X + X + + + + Find: + 찾기: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_lt.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_lt.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_lt.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_lt.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Dydis: XXX x XXX + + + + Size: %1 x %2 + Dydis: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Išvestis buvo <a href="http://en.wikipedia.org/wiki/Flow_control">pristabdyta,</a> paspaudžiant Ctrl(Vald)+S. Paspauskite <b>Ctrl(Vald)+Q</b>, norėdami pratęsti.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Nėra prieinamas joks klaviatūros vertėjas. Informacijos, kurios reikia, norint konvertuoti klavišų paspaudimus į simbolius ir siųsti į terminalą, nėra. + + + + QObject + + + + Un-named Color Scheme + Nepavadintas spalvų rinkinys + + + + Accessible Color Scheme + Pasiekiamas spalvų rinkinys + + + + Open link + Atverti nuorodą + + + + Copy link + Kopijuoti nuorodą + + + + Send email to... + + + + + Copy email address + + + + + QTermWidget + + + Color Scheme Error + Spalvų rinkinio klaida + + + + Cannot load color scheme: %1 + Nepavyksta įkelti spalvų rinkinio: %1 + + + + SearchBar + + + Match case + Skirti raidžių dydį + + + + Regular expression + Reguliarusis reiškinys + + + + Highlight all matches + Paryškinti visus atitikmenis + + + + SearchBar + Paieškos juosta + + + + X + X + + + + Find: + Rasti: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_nb_NO.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_nb_NO.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_nb_NO.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_nb_NO.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Størrelse: XXX x XXX + + + + Size: %1 x %2 + Størrelse: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Utgangssignalet ble <a href="http://en.wikipedia.org/wiki/Flow_control">stoppet</a> da Ctrl+S ble trykket. Trykk <b>Ctrl+Q</b> for å fortsette.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Ingen tastaturoversetter er tilgjengelig. Informasjonen som trengs for å gjøre tastetrykk om til tegn å sende til terminalen mangler. + + + + QObject + + + + Un-named Color Scheme + Fargemønster uten navn + + + + Accessible Color Scheme + Fargemønster for funksjonshemmede + + + + Open Link + Åpne lenke + + + + Copy Link Address + Kopier lenkeadresse + + + + Send Email To... + Send epost til... + + + + Copy Email Address + Kopier epostadressen + + + + QTermWidget + + + Color Scheme Error + Feil med fargemønster + + + + Cannot load color scheme: %1 + Kan ikke åpne fargemønster: %1 + + + + SearchBar + + + Match case + Bruk STORE og små bokstaver + + + + Regular expression + Bokstavmønstre (regex) + + + + Highlight all matches + Lys opp alle søkeresultat + + + + SearchBar + Søkefelt + + + + X + + + + + Find: + Finn: + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_nl.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_nl.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_nl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_nl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Afmetingen: XXX x XXX + + + + Size: %1 x %2 + Afmetingen: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Door op Ctrl+S te drukken is de uitvoer <a href="http://en.wikipedia.org/wiki/Flow_control">onderbroken</a>. Druk op <b>Ctrl+Q</b> om te hervatten.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Geen toetsenbordvertaling beschikbaar. De informatie die nodig is voor het omzetten van toetsaanslagen naar tekens in de terminal ontbreekt. + + + + QObject + + + + Un-named Color Scheme + Naamloos kleurenschema + + + + Accessible Color Scheme + Toegankelijk kleurenschema + + + + Open link + Link openen + + + + Copy link + Link kopiëren + + + + Send email to... + E-mail versturen naar… + + + + Copy email address + E-mailadres kopiëren + + + + QTermWidget + + + Color Scheme Error + Kleurenschemafout + + + + Cannot load color scheme: %1 + Het kleurenschema kan niet worden geladen: %1 + + + + SearchBar + + + Match case + Hoofdlettergevoelig + + + + Regular expression + Reguliere uitdrukking + + + + Highlight all matches + Alle overeenkomsten markeren + + + + SearchBar + Zoekbalk + + + + X + X + + + + Find: + Zoeken: + + + + < + < + + + + > + > + + + + ... + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pl.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pl.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Rozmiar: XXX x XXX + + + + Size: %1 x %2 + Rozmiar: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Wyjście zostało <a href="http://en.wikipedia.org/wiki/Flow_control">wstrzymane</a> skrótem Ctrl+S. Wciśnij <b>Ctrl+Q</b> aby wznowić.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Brak sterownika klawiatury. Nie wiadomo jak przełożyć wciśniecia przycisków na znaki wysyłane do terminalu. + + + + QObject + + + + Un-named Color Scheme + Nienazwana paleta + + + + Accessible Color Scheme + Paleta o zwiększonej przystępności + + + + Open link + Otwórz link + + + + Copy link + Kopiuj odnośnik + + + + Send email to... + Wyślij email do... + + + + Copy email address + Skopiuj adres e-mail + + + + QTermWidget + + + Color Scheme Error + Błąd w palecie + + + + Cannot load color scheme: %1 + Nie można wczytać palety: %1 + + + + SearchBar + + + Match case + Rozróżniaj wielkość liter + + + + Regular expression + Wyrażenie regularne + + + + Highlight all matches + Podświetl wszystkie dopasowania + + + + SearchBar + Pasek wyszukiwania + + + + X + X + + + + Find: + Znajdź: + + + + < + < + + + + > + > + + + + ... + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pt_BR.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pt_BR.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pt_BR.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pt_BR.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Tamanho: XXX x XXX + + + + Size: %1 x %2 + Tamanho: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control">suspensa </a> ao pressionar Ctrl+S. Pressione <b>Ctrl+Q</b> para continuar.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Nenhum tradutor de teclado está disponível. As informações necessárias para converter as teclas pressionadas, em caracteres a serem enviadas ao terminal, está ausente. + + + + QObject + + + + Un-named Color Scheme + Esquema de Cor sem nome + + + + Accessible Color Scheme + Esquema de Cores Acessível + + + + Open link + Abrir link + + + + Copy link + Copiar link + + + + Send email to... + Enviar e-mail para... + + + + Copy email address + Copiar endereço de e-mail + + + + QTermWidget + + + Color Scheme Error + Erro de Esquema de Cor + + + + Cannot load color scheme: %1 + Não é possível carregar o esquema de cores: %1 + + + + SearchBar + + + Match case + Caso de correspondência + + + + Regular expression + Expressão regular + + + + Highlight all matches + Destacar todas as correspondências + + + + SearchBar + Barra de Pesquisa + + + + X + X + + + + Find: + Localizar: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pt.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pt.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_pt.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_pt.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Tamanho: XXX x XXX + + + + Size: %1 x %2 + Tamanho: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>A saída foi <a href="http://en.wikipedia.org/wiki/Flow_control"> suspensa</a> ao premir Ctrl+S. Prima <b>Ctrl+Q</b> para continuar.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Nenhum tradutor de teclado disponível. A informação necessária para converter a pressão da tecla nos caracteres a enviar ao terminal não existe. + + + + QObject + + + + Un-named Color Scheme + Esquema de cores sem nome + + + + Accessible Color Scheme + Esquema de cores acessível + + + + Open link + Abrir ligação + + + + Copy link + Copiar ligação + + + + Send email to... + Enviar um email a... + + + + Copy email address + Copiar endereço de email + + + + QTermWidget + + + Color Scheme Error + Erro no esquema de cores + + + + Cannot load color scheme: %1 + Não foi possível carregar o esquema de cores: %1 + + + + SearchBar + + + Match case + Diferenciar maiúsculas/minúsculas + + + + Regular expression + Expressão regular + + + + Highlight all matches + Realçar todas as ocorrências + + + + SearchBar + Barra de pesquisa + + + + X + X + + + + Find: + Localizar: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ru.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ru.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ru.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Размер: XXX x XXX + + + + Size: %1 x %2 + Размер: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Вывод был <a href="http://en.wikipedia.org/wiki/Flow_control">приостановлен</a> нажатием Ctrl+S. Нажмите <b>Ctrl+Q</b>, чтобы продолжить.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Переводчика клавиатуры нет. Информация, необходимая для преобразования нажатий клавиш в символы для отправки на терминал, отсутствует. + + + + QObject + + + + Un-named Color Scheme + Безымянная цветовая схема + + + + Accessible Color Scheme + Доступная цветовая схема + + + + Open link + Открыть ссылку + + + + Copy link + Копировать ссылку + + + + Send email to... + Отправить письмо по адресу... + + + + Copy email address + Копировать адрес электронной почты + + + + QTermWidget + + + Color Scheme Error + Ошибка цветовой схемы + + + + Cannot load color scheme: %1 + Невозможно загрузить цветовую схему: %1 + + + + SearchBar + + + Match case + Учитывать регистр + + + + Regular expression + Регулярное выражение + + + + Highlight all matches + Выделить все совпадения + + + + SearchBar + Панель поиска + + + + X + X + + + + Find: + Найти: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_sq.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_sq.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_sq.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_sq.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Madhësi: XXX x XXX + + + + Size: %1 x %2 + Madhësi: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Shfaqja e përfundimit është <a href="http://en.wikipedia.org/wiki/Flow_control">pezulluar</a> duke shtypur Ctrl+S. Që të vazhdohet sërish, shtypni <b>Ctrl+Q</b>.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + S’ka përkthyes aktesh tastiere. Mungojnë të dhënat e nevojshme për shndërrim shtypjesh tastesh në shenja për t’u dërguar në terminal. + + + + QObject + + + + Un-named Color Scheme + Skemë Ngjyrash e Paemër + + + + Accessible Color Scheme + Skemë Ngjyrash e Përdorshme + + + + Open link + Hap lidhje + + + + Copy link + Kopjoji lidhjen + + + + Send email to... + Dërgoni email te… + + + + Copy email address + Kopjo adresën email + + + + QTermWidget + + + Color Scheme Error + Gabim Skeme Ngjyrash + + + + Cannot load color scheme: %1 + S’ngarkohet dot skemë ngjyrash: %1 + + + + SearchBar + + + Match case + Siç është shkruar + + + + Regular expression + Shprehje e rregullt + + + + Highlight all matches + Theksoji krejt përputhjet + + + + SearchBar + Shtyllë Kërkimi + + + + X + X + + + + Find: + Gjej: + + + + < + < + + + + > + > + + + + ... + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_sr.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_sr.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_sr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_sr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Величина: XXX x XXX + + + + Size: %1 x %2 + Величина: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Испис је <a href="http://en.wikipedia.org/wiki/Flow_control">обустављен</a> притиском на Ctrl+S. Притисни <b>Ctrl+Q</b> за наставак.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Нема достуоног преводиоца тастатуре. Недостају подаци потребни за претварање притиска на тастере у карактере за слање у терминал. + + + + QObject + + + + Un-named Color Scheme + Неименована шема боја + + + + Accessible Color Scheme + Доступна шема боја + + + + Open link + Отвори везу + + + + Copy link + Копирај везу + + + + Send email to... + Пошаљи е-пошту за + + + + Copy email address + Копирај адресу е-поште + + + + QTermWidget + + + Color Scheme Error + Грешка шеме боја + + + + Cannot load color scheme: %1 + Не може се учитати шема боја: %1 + + + + SearchBar + + + Match case + Подударање + + + + Regular expression + Регуларни израз + + + + Highlight all matches + Истакни сва подударања + + + + SearchBar + Поље за претрагу + + + + X + X + + + + Find: + Пронађи: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_tr.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_tr.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_tr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_tr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Boyut: XXX x XXX + + + + Size: %1 x %2 + Boyut: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Çıktı <a href="http://en.wikipedia.org/wiki/Flow_control">askıya alındı</a> Ctrl+S tuşlarına basarak. Bas <b>Ctrl+Q</b> devam et.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Klavye tercümanı yok. Tuşa basmaları uçbirime göndermek ve karakterlere dönüştürmek için gereken bilgiler eksik. + + + + QObject + + + + Un-named Color Scheme + İsimsiz Renk Düzeni + + + + Accessible Color Scheme + Erişilebilir Renk Düzeni + + + + Open link + Bağlantıyı aç + + + + Copy link + Bağlantıyı kopyala + + + + Send email to... + E-posta gönder... + + + + Copy email address + E-posta adresini kopyala + + + + QTermWidget + + + Color Scheme Error + Renk Düzeni Hatası + + + + Cannot load color scheme: %1 + Renk şeması yüklenemiyor: %1 + + + + SearchBar + + + Match case + Durum eşleşmesi + + + + Regular expression + Düzenli ifade + + + + Highlight all matches + Tüm eşleşmeleri vurgula + + + + SearchBar + AramaÇubuğu + + + + X + X + + + + Find: + Bul: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + + + + + Size: %1 x %2 + + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + + QObject + + + + Un-named Color Scheme + + + + + Accessible Color Scheme + + + + + Open link + + + + + Copy link + + + + + Send email to... + + + + + Copy email address + + + + + QTermWidget + + + Color Scheme Error + + + + + Cannot load color scheme: %1 + + + + + SearchBar + + + Match case + + + + + Regular expression + + + + + Highlight all matches + + + + + SearchBar + + + + + X + + + + + Find: + + + + + < + + + + + > + + + + + ... + + + + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ug.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ug.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_ug.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_ug.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + سىغىمى: XXX x XXX + + + + Size: %1 x %2 + سىغىمى: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>كىرگۈزۈشنى Ctrl+S <a href="http://en.wikipedia.org/wiki/Flow_control">ۋاقىتلىق توختاتتى</a>。 <b>Ctrl+Qنى بېسىپ</b> ئەسلىگە كەلتۈرۈڭ。</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + بۇ يەردە ئاچقۇچلۇق كود ئۆزگەرتىش جەدۋىلى يوق. تېرمىنالغا يەتكۈزۈش ئۈچۈن بەلگىلىگە ئايلاندۇرۇشقا تېگىشلىك ئۇچۇرلارنى تاپالمايدۇ. + + + + QObject + + + + Un-named Color Scheme + نامسىز رەڭ لايىھەسى + + + + Accessible Color Scheme + ئىشلەتكىلى بولىدىغان رەڭ لايىھەسى + + + + Open link + ئۇلىنىشنى ئېچىش + + + + Copy link + ئۇلىنىشنى كۆچۈرۈش + + + + Send email to... + ئېلخەت يوللاش... + + + + Copy email address + ئېلخەت ئادرېسىنى كۆچۈرۈش + + + + QTermWidget + + + Color Scheme Error + خاتا رەڭ لايىھەسى + + + + Cannot load color scheme: %1 + رەڭ لايىھەسنى يۈكلىيەلمىدى:%1 + + + + SearchBar + + + Match case + چوڭ-كىچىك يېزىلىشىنى ماسلاشتۇرۇش + + + + Regular expression + دائىملىق ئىپادىلەش + + + + Highlight all matches + تاللانغان مەزمۇننى گەۋدىلەندۈرۈش + + + + SearchBar + ئىزدەش ئىستونى + + + + X + X + + + + Find: + ئىزدەش: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_uk.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_uk.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_uk.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_uk.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Розмір: XXX x XXX + + + + Size: %1 x %2 + Розмір: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Виведення даних було <a href="http://en.wikipedia.org/wiki/Flow_control">призупинено</a> натисканням Ctrl+S. Натисніть <b>Ctrl+Q</b>, щоб відновити його.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Немає транслятора клавіатури. Не вистачає даних, які потрібні для перетворення натискань клавіш у символи на екрані. + + + + QObject + + + + Un-named Color Scheme + Схема кольорів без назви + + + + Accessible Color Scheme + Схема кольорів доступності + + + + Open link + Відкрити посилання + + + + Copy link + Копіювати посилання + + + + Send email to... + Надіслати поштове повідомлення… + + + + Copy email address + Копіювати адресу ел. пошти + + + + QTermWidget + + + Color Scheme Error + Помилка схеми кольорів + + + + Cannot load color scheme: %1 + Не вдалося завантажити схему кольорів: %1 + + + + SearchBar + + + Match case + З врахуванням регістру + + + + Regular expression + Формальний вираз + + + + Highlight all matches + Підсвітити усі відповідники + + + + SearchBar + Панель пошуку + + + + X + X + + + + Find: + Знайти: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_vi.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_vi.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_vi.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_vi.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Kích thước: XXX x XXX + + + + Size: %1 x %2 + Kích thước: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>đầu ra đã <a href="http://en.wikipedia.org/wiki/Flow_control">dừng</a> bằng cách bấm Ctrl+S. Bấm <b>Ctrl+Q</b> đẻ tiếp tục.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + Không có trình dịch bàn phím nào có sẵn. Thông tin cần thiết để chuyển đổi các lần nhấn phím thành ký tự để gửi đến thiết bị đầu cuối bị thiếu. + + + + QObject + + + + Un-named Color Scheme + Phối màu chưa đặt tên + + + + Accessible Color Scheme + Lược đồ màu có thể truy cập + + + + Open link + Mở đường dẫn + + + + Copy link + Sao chép đường dẫn + + + + Send email to... + Gửi email đến + + + + Copy email address + Sao chép địa chỉ email + + + + QTermWidget + + + Color Scheme Error + Chủ đề màu sắc lỗi + + + + Cannot load color scheme: %1 + Không thể tải chủ đề màu sắc + + + + SearchBar + + + Match case + Trường hợp phù hợp + + + + Regular expression + Biểu thức chính quy + + + + Highlight all matches + Làm nổi bật các kết quả + + + + SearchBar + Thanh tìm kiếm + + + + X + X + + + + Find: + Tìm: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_CN.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_CN.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_CN.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_CN.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + 大小: XXX x XXX + + + + Size: %1 x %2 + 大小: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>输出已被 Ctrl+S <a href="http://en.wikipedia.org/wiki/Flow_control">暂停</a>。按 <b>Ctrl+Q</b> 复原。</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + 没有可用的键码转换表。找不到需要把按键转换至符号以传送至终端的信息。 + + + + QObject + + + + Un-named Color Scheme + 未命名配色 + + + + Accessible Color Scheme + 可用配色 + + + + Open link + 打开链接 + + + + Copy link + 复制链接 + + + + Send email to... + 发送邮件至... + + + + Copy email address + 复制邮件地址 + + + + QTermWidget + + + Color Scheme Error + 配色错误 + + + + Cannot load color scheme: %1 + 无法加载配色: %1 + + + + SearchBar + + + Match case + 匹配大小写 + + + + Regular expression + 正则表达式 + + + + Highlight all matches + 高亮所有匹配项 + + + + SearchBar + 搜索栏 + + + + X + X + + + + Find: + 寻找: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_HK.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_HK.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_HK.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_HK.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + Size: XXX x XXX + + + + Size: %1 x %2 + Size: %1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + + + + QObject + + + + Un-named Color Scheme + Un-named Color Scheme + + + + Accessible Color Scheme + Accessible Color Scheme + + + + Open link + 打開鏈接 + + + + Copy link + 複製鏈接 + + + + Send email to... + 發送郵件至... + + + + Copy email address + 複製郵件地址 + + + + QTermWidget + + + Color Scheme Error + Color Scheme Error + + + + Cannot load color scheme: %1 + Cannot load color scheme: %1 + + + + SearchBar + + + Match case + Match case + + + + Regular expression + Regular expression + + + + Highlight all matches + Highlight all matches + + + + SearchBar + SearchBar + + + + X + X + + + + Find: + Find: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_TW.ts deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_TW.ts --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_TW.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/translations/terminalwidget_zh_TW.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,123 @@ + + + Konsole::TerminalDisplay + + + Size: XXX x XXX + 大小:XXX x XXX + + + + Size: %1 x %2 + 大小:%1 x %2 + + + + <qt>Output has been <a href="http://en.wikipedia.org/wiki/Flow_control">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt> + <qt>輸出已被Ctrl+S<a href="http://en.wikipedia.org/wiki/Flow_control">暫停</a>。按<b>Ctrl+Q</b>復原。</qt> + + + + Konsole::Vt102Emulation + + + No keyboard translator available. The information needed to convert key presses into characters to send to the terminal is missing. + 沒有可用的鍵碼轉換表。用來將按鍵轉換成終端機字元的資訊遺失。 + + + + QObject + + + + Un-named Color Scheme + 未命名的配色 + + + + Accessible Color Scheme + 可用的配色 + + + + Open link + 開啟連結 + + + + Copy link + 複製連結 + + + + Send email to... + 發送郵件至... + + + + Copy email address + 複製郵件地址 + + + + QTermWidget + + + Color Scheme Error + 配色錯誤 + + + + Cannot load color scheme: %1 + 無法載入配色:%1 + + + + SearchBar + + + Match case + 符合大小寫 + + + + Regular expression + 正規表示式 + + + + Highlight all matches + 標亮所有相符的項目 + + + + SearchBar + 搜尋列 + + + + X + X + + + + Find: + 搜尋: + + + + < + < + + + + > + > + + + + ... + ... + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Vt102Emulation.cpp deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Vt102Emulation.cpp --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Vt102Emulation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Vt102Emulation.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1371 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +// Own +#include "Vt102Emulation.h" + +// XKB +//#include + +// this allows konsole to be compiled without XKB and XTEST extensions +// even though it might be available on a particular system. +#if defined(AVOID_XKB) + #undef HAVE_XKB +#endif + +#if defined(HAVE_XKB) + void scrolllock_set_off(); + void scrolllock_set_on(); +#endif + +// Standard +#include +#include + +// Qt +#include +#include +#include +#include + +// KDE +//#include +//#include + +// Konsole +#include "KeyboardTranslator.h" +#include "Screen.h" + + +using namespace Konsole; + +Vt102Emulation::Vt102Emulation() + : Emulation(), + prevCC(0), + _titleUpdateTimer(new QTimer(this)), + _reportFocusEvents(false) +{ + _titleUpdateTimer->setSingleShot(true); + QObject::connect(_titleUpdateTimer , SIGNAL(timeout()) , this , SLOT(updateTitle())); + + initTokenizer(); + reset(); +} + +Vt102Emulation::~Vt102Emulation() +{} + +void Vt102Emulation::clearEntireScreen() +{ + _currentScreen->clearEntireScreen(); + bufferedUpdate(); +} + +void Vt102Emulation::reset() +{ + resetTokenizer(); + resetModes(); + resetCharset(0); + _screen[0]->reset(); + resetCharset(1); + _screen[1]->reset(); + setCodec(LocaleCodec); + + bufferedUpdate(); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Processing the incoming byte stream */ +/* */ +/* ------------------------------------------------------------------------- */ + +/* Incoming Bytes Event pipeline + + This section deals with decoding the incoming character stream. + Decoding means here, that the stream is first separated into `tokens' + which are then mapped to a `meaning' provided as operations by the + `Screen' class or by the emulation class itself. + + The pipeline proceeds as follows: + + - Tokenizing the ESC codes (onReceiveChar) + - VT100 code page translation of plain characters (applyCharset) + - Interpretation of ESC codes (processToken) + + The escape codes and their meaning are described in the + technical reference of this program. +*/ + +// Tokens ------------------------------------------------------------------ -- + +/* + Since the tokens are the central notion if this section, we've put them + in front. They provide the syntactical elements used to represent the + terminals operations as byte sequences. + + They are encodes here into a single machine word, so that we can later + switch over them easily. Depending on the token itself, additional + argument variables are filled with parameter values. + + The tokens are defined below: + + - CHR - Printable characters (32..255 but DEL (=127)) + - CTL - Control characters (0..31 but ESC (= 27), DEL) + - ESC - Escape codes of the form + - ESC_DE - Escape codes of the form C + - CSI_PN - Escape codes of the form '[' {Pn} ';' {Pn} C + - CSI_PS - Escape codes of the form '[' {Pn} ';' ... C + - CSI_PS_SP - Escape codes of the form '[' {Pn} ';' ... {Space} C + - CSI_PR - Escape codes of the form '[' '?' {Pn} ';' ... C + - CSI_PE - Escape codes of the form '[' '!' {Pn} ';' ... C + - VT52 - VT52 escape codes + - + - 'Y'{Pc}{Pc} + - XTE_HA - Xterm window/terminal attribute commands + of the form `]' {Pn} `;' {Text} + (Note that these are handled differently to the other formats) + + The last two forms allow list of arguments. Since the elements of + the lists are treated individually the same way, they are passed + as individual tokens to the interpretation. Further, because the + meaning of the parameters are names (althought represented as numbers), + they are includes within the token ('N'). + +*/ + +#define TY_CONSTRUCT(T,A,N) ( (((static_cast(N)) & 0xffff) << 16) | (((static_cast(A)) & 0xff) << 8) | ((static_cast(T)) & 0xff) ) + +#define TY_CHR( ) TY_CONSTRUCT(0,0,0) +#define TY_CTL(A ) TY_CONSTRUCT(1,A,0) +#define TY_ESC(A ) TY_CONSTRUCT(2,A,0) +#define TY_ESC_CS(A,B) TY_CONSTRUCT(3,A,B) +#define TY_ESC_DE(A ) TY_CONSTRUCT(4,A,0) +#define TY_CSI_PS(A,N) TY_CONSTRUCT(5,A,N) +#define TY_CSI_PN(A ) TY_CONSTRUCT(6,A,0) +#define TY_CSI_PR(A,N) TY_CONSTRUCT(7,A,N) +#define TY_CSI_PS_SP(A,N) TY_CONSTRUCT(11,A,N) + +#define TY_VT52(A) TY_CONSTRUCT(8,A,0) +#define TY_CSI_PG(A) TY_CONSTRUCT(9,A,0) +#define TY_CSI_PE(A) TY_CONSTRUCT(10,A,0) + +#define MAX_ARGUMENT 4096 + +// Tokenizer --------------------------------------------------------------- -- + +/* The tokenizer's state + + The state is represented by the buffer (tokenBuffer, tokenBufferPos), + and accompanied by decoded arguments kept in (argv,argc). + Note that they are kept internal in the tokenizer. +*/ + +void Vt102Emulation::resetTokenizer() +{ + tokenBufferPos = 0; + argc = 0; + argv[0] = 0; + argv[1] = 0; + prevCC = 0; +} + +void Vt102Emulation::addDigit(int digit) +{ + if (argv[argc] < MAX_ARGUMENT) + argv[argc] = 10*argv[argc] + digit; +} + +void Vt102Emulation::addArgument() +{ + argc = qMin(argc+1,MAXARGS-1); + argv[argc] = 0; +} + +void Vt102Emulation::addToCurrentToken(wchar_t cc) +{ + tokenBuffer[tokenBufferPos] = cc; + tokenBufferPos = qMin(tokenBufferPos+1,MAX_TOKEN_LENGTH-1); +} + +// Character Class flags used while decoding +#define CTL 1 // Control character +#define CHR 2 // Printable character +#define CPN 4 // TODO: Document me +#define DIG 8 // Digit +#define SCS 16 // TODO: Document me +#define GRP 32 // TODO: Document me +#define CPS 64 // Character which indicates end of window resize + // escape sequence '\e[8;;t' + +void Vt102Emulation::initTokenizer() +{ + int i; + const char* s; + for(i = 0;i < 256; ++i) + charClass[i] = 0; + for(i = 0;i < 32; ++i) + charClass[i] |= CTL; + for(i = 32;i < 256; ++i) + charClass[i] |= CHR; + for(s = "@ABCDGHILMPSTXZbcdfry"; *s; ++s) + charClass[static_cast(*s)] |= CPN; + // resize = \e[8;;t + for(s = "t"; *s; ++s) + charClass[static_cast(*s)] |= CPS; + for(s = "0123456789"; *s; ++s) + charClass[static_cast(*s)] |= DIG; + for(s = "()+*%"; *s; ++s) + charClass[static_cast(*s)] |= SCS; + for(s = "()+*#[]%"; *s; ++s) + charClass[static_cast(*s)] |= GRP; + + resetTokenizer(); +} + +/* Ok, here comes the nasty part of the decoder. + + Instead of keeping an explicit state, we deduce it from the + token scanned so far. It is then immediately combined with + the current character to form a scanning decision. + + This is done by the following defines. + + - P is the length of the token scanned so far. + - L (often P-1) is the position on which contents we base a decision. + - C is a character or a group of characters (taken from 'charClass'). + + - 'cc' is the current character + - 's' is a pointer to the start of the token buffer + - 'p' is the current position within the token buffer + + Note that they need to applied in proper order. +*/ + +#define lec(P,L,C) (p == (P) && s[(L)] == (C)) +#define lun( ) (p == 1 && cc >= 32 ) +#define les(P,L,C) (p == (P) && s[L] < 256 && (charClass[s[(L)]] & (C)) == (C)) +#define eec(C) (p >= 3 && cc == (C)) +#define ees(C) (p >= 3 && cc < 256 && (charClass[cc] & (C)) == (C)) +#define eps(C) (p >= 3 && s[2] != '?' && s[2] != '!' && s[2] != '>' && cc < 256 && (charClass[cc] & (C)) == (C)) +#define epp( ) (p >= 3 && s[2] == '?') +#define epe( ) (p >= 3 && s[2] == '!') +#define egt( ) (p >= 3 && s[2] == '>') +#define esp( ) (p == 4 && s[3] == ' ') +#define Xpe (tokenBufferPos >= 2 && tokenBuffer[1] == ']') +#define Xte (Xpe && (cc == 7 || (prevCC == 27 && cc == 92) )) // 27, 92 => "\e\\" (ST, String Terminator) +#define ces(C) (cc < 256 && (charClass[cc] & (C)) == (C) && !Xte) + +#define CNTL(c) ((c)-'@') +#define ESC 27 +#define DEL 127 + +// process an incoming unicode character +void Vt102Emulation::receiveChar(wchar_t cc) +{ + if (cc == DEL) + return; //VT100: ignore. + + if (ces(CTL)) + { + // ignore control characters in the text part of Xpe (aka OSC) "ESC]" + // escape sequences; this matches what XTERM docs say + if (Xpe) { + prevCC = cc; + return; + } + + // DEC HACK ALERT! Control Characters are allowed *within* esc sequences in VT100 + // This means, they do neither a resetTokenizer() nor a pushToToken(). Some of them, do + // of course. Guess this originates from a weakly layered handling of the X-on + // X-off protocol, which comes really below this level. + if (cc == CNTL('X') || cc == CNTL('Z') || cc == ESC) + resetTokenizer(); //VT100: CAN or SUB + if (cc != ESC) + { + processToken(TY_CTL(cc+'@' ),0,0); + return; + } + } + // advance the state + addToCurrentToken(cc); + + wchar_t* s = tokenBuffer; + int p = tokenBufferPos; + + if (getMode(MODE_Ansi)) + { + if (lec(1,0,ESC)) { return; } + if (lec(1,0,ESC+128)) { s[0] = ESC; receiveChar('['); return; } + if (les(2,1,GRP)) { return; } + if (Xte ) { processWindowAttributeChange(); resetTokenizer(); return; } + if (Xpe ) { prevCC = cc; return; } + if (lec(3,2,'?')) { return; } + if (lec(3,2,'>')) { return; } + if (lec(3,2,'!')) { return; } + if (lun( )) { processToken( TY_CHR(), applyCharset(cc), 0); resetTokenizer(); return; } + if (lec(2,0,ESC)) { processToken( TY_ESC(s[1]), 0, 0); resetTokenizer(); return; } + if (les(3,1,SCS)) { processToken( TY_ESC_CS(s[1],s[2]), 0, 0); resetTokenizer(); return; } + if (lec(3,1,'#')) { processToken( TY_ESC_DE(s[2]), 0, 0); resetTokenizer(); return; } + if (eps( CPN)) { processToken( TY_CSI_PN(cc), argv[0],argv[1]); resetTokenizer(); return; } + if (esp( )) { return; } + if (lec(5, 4, 'q') && s[3] == ' ') { + processToken( TY_CSI_PS_SP(cc, argv[0]), argv[0], 0); + resetTokenizer(); + return; + } + + // resize = \e[8;;t + if (eps(CPS)) + { + processToken( TY_CSI_PS(cc, argv[0]), argv[1], argv[2]); + resetTokenizer(); + return; + } + + if (epe( )) { processToken( TY_CSI_PE(cc), 0, 0); resetTokenizer(); return; } + if (ees(DIG)) { addDigit(cc-'0'); return; } + if (eec(';') || eec(':')) { addArgument(); return; } + for (int i=0;i<=argc;i++) + { + if (epp()) + processToken( TY_CSI_PR(cc,argv[i]), 0, 0); + else if (egt()) + processToken( TY_CSI_PG(cc), 0, 0); // spec. case for ESC]>0c or ESC]>c + else if (cc == 'm' && argc - i >= 4 && (argv[i] == 38 || argv[i] == 48) && argv[i+1] == 2) + { + // ESC[ ... 48;2;;; ... m -or- ESC[ ... 38;2;;; ... m + i += 2; + processToken( TY_CSI_PS(cc, argv[i-2]), COLOR_SPACE_RGB, (argv[i] << 16) | (argv[i+1] << 8) | argv[i+2]); + i += 2; + } + else if (cc == 'm' && argc - i >= 2 && (argv[i] == 38 || argv[i] == 48) && argv[i+1] == 5) + { + // ESC[ ... 48;5; ... m -or- ESC[ ... 38;5; ... m + i += 2; + processToken( TY_CSI_PS(cc, argv[i-2]), COLOR_SPACE_256, argv[i]); + } + else + processToken( TY_CSI_PS(cc,argv[i]), 0, 0); + } + resetTokenizer(); + } + else + { + // VT52 Mode + if (lec(1,0,ESC)) + return; + if (les(1,0,CHR)) + { + processToken( TY_CHR(), s[0], 0); + resetTokenizer(); + return; + } + if (lec(2,1,'Y')) + return; + if (lec(3,1,'Y')) + return; + if (p < 4) + { + processToken( TY_VT52(s[1] ), 0, 0); + resetTokenizer(); + return; + } + processToken( TY_VT52(s[1]), s[2], s[3]); + resetTokenizer(); + return; + } +} +void Vt102Emulation::processWindowAttributeChange() +{ + // Describes the window or terminal session attribute to change + // See Session::UserTitleChange for possible values + int attributeToChange = 0; + int i; + for (i = 2; i < tokenBufferPos && + tokenBuffer[i] >= '0' && + tokenBuffer[i] <= '9'; i++) + { + attributeToChange = 10 * attributeToChange + (tokenBuffer[i]-'0'); + } + + if (tokenBuffer[i] != ';') + { + reportDecodingError(); + return; + } + + // copy from the first char after ';', and skipping the ending delimiter + // 0x07 or 0x92. Note that as control characters in OSC text parts are + // ignored, only the second char in ST ("\e\\") is appended to tokenBuffer. + QString newValue = QString::fromWCharArray(tokenBuffer + i + 1, tokenBufferPos-i-2); + + _pendingTitleUpdates[attributeToChange] = newValue; + _titleUpdateTimer->start(20); +} + +void Vt102Emulation::updateTitle() +{ + QListIterator iter( _pendingTitleUpdates.keys() ); + while (iter.hasNext()) { + int arg = iter.next(); + emit titleChanged( arg , _pendingTitleUpdates[arg] ); + } + _pendingTitleUpdates.clear(); +} + +// Interpreting Codes --------------------------------------------------------- + +/* + Now that the incoming character stream is properly tokenized, + meaning is assigned to them. These are either operations of + the current _screen, or of the emulation class itself. + + The token to be interpreteted comes in as a machine word + possibly accompanied by two parameters. + + Likewise, the operations assigned to, come with up to two + arguments. One could consider to make up a proper table + from the function below. + + The technical reference manual provides more information + about this mapping. +*/ + +void Vt102Emulation::processToken(int token, wchar_t p, int q) +{ + switch (token) + { + + case TY_CHR( ) : _currentScreen->displayCharacter (p ); break; //UTF16 + + // 127 DEL : ignored on input + + case TY_CTL('@' ) : /* NUL: ignored */ break; + case TY_CTL('A' ) : /* SOH: ignored */ break; + case TY_CTL('B' ) : /* STX: ignored */ break; + case TY_CTL('C' ) : /* ETX: ignored */ break; + case TY_CTL('D' ) : /* EOT: ignored */ break; + case TY_CTL('E' ) : reportAnswerBack ( ); break; //VT100 + case TY_CTL('F' ) : /* ACK: ignored */ break; + case TY_CTL('G' ) : emit stateSet(NOTIFYBELL); + break; //VT100 + case TY_CTL('H' ) : _currentScreen->backspace ( ); break; //VT100 + case TY_CTL('I' ) : _currentScreen->tab ( ); break; //VT100 + case TY_CTL('J' ) : _currentScreen->newLine ( ); break; //VT100 + case TY_CTL('K' ) : _currentScreen->newLine ( ); break; //VT100 + case TY_CTL('L' ) : _currentScreen->newLine ( ); break; //VT100 + case TY_CTL('M' ) : _currentScreen->toStartOfLine ( ); break; //VT100 + + case TY_CTL('N' ) : useCharset ( 1); break; //VT100 + case TY_CTL('O' ) : useCharset ( 0); break; //VT100 + + case TY_CTL('P' ) : /* DLE: ignored */ break; + case TY_CTL('Q' ) : /* DC1: XON continue */ break; //VT100 + case TY_CTL('R' ) : /* DC2: ignored */ break; + case TY_CTL('S' ) : /* DC3: XOFF halt */ break; //VT100 + case TY_CTL('T' ) : /* DC4: ignored */ break; + case TY_CTL('U' ) : /* NAK: ignored */ break; + case TY_CTL('V' ) : /* SYN: ignored */ break; + case TY_CTL('W' ) : /* ETB: ignored */ break; + case TY_CTL('X' ) : _currentScreen->displayCharacter ( 0x2592); break; //VT100 + case TY_CTL('Y' ) : /* EM : ignored */ break; + case TY_CTL('Z' ) : _currentScreen->displayCharacter ( 0x2592); break; //VT100 + case TY_CTL('[' ) : /* ESC: cannot be seen here. */ break; + case TY_CTL('\\' ) : /* FS : ignored */ break; + case TY_CTL(']' ) : /* GS : ignored */ break; + case TY_CTL('^' ) : /* RS : ignored */ break; + case TY_CTL('_' ) : /* US : ignored */ break; + + case TY_ESC('D' ) : _currentScreen->index ( ); break; //VT100 + case TY_ESC('E' ) : _currentScreen->nextLine ( ); break; //VT100 + case TY_ESC('H' ) : _currentScreen->changeTabStop (true ); break; //VT100 + case TY_ESC('M' ) : _currentScreen->reverseIndex ( ); break; //VT100 + case TY_ESC('Z' ) : reportTerminalType ( ); break; + case TY_ESC('c' ) : reset ( ); break; + + case TY_ESC('n' ) : useCharset ( 2); break; + case TY_ESC('o' ) : useCharset ( 3); break; + case TY_ESC('7' ) : saveCursor ( ); break; + case TY_ESC('8' ) : restoreCursor ( ); break; + + case TY_ESC('=' ) : setMode (MODE_AppKeyPad); break; + case TY_ESC('>' ) : resetMode (MODE_AppKeyPad); break; + case TY_ESC('<' ) : setMode (MODE_Ansi ); break; //VT100 + + case TY_ESC_CS('(', '0') : setCharset (0, '0'); break; //VT100 + case TY_ESC_CS('(', 'A') : setCharset (0, 'A'); break; //VT100 + case TY_ESC_CS('(', 'B') : setCharset (0, 'B'); break; //VT100 + + case TY_ESC_CS(')', '0') : setCharset (1, '0'); break; //VT100 + case TY_ESC_CS(')', 'A') : setCharset (1, 'A'); break; //VT100 + case TY_ESC_CS(')', 'B') : setCharset (1, 'B'); break; //VT100 + + case TY_ESC_CS('*', '0') : setCharset (2, '0'); break; //VT100 + case TY_ESC_CS('*', 'A') : setCharset (2, 'A'); break; //VT100 + case TY_ESC_CS('*', 'B') : setCharset (2, 'B'); break; //VT100 + + case TY_ESC_CS('+', '0') : setCharset (3, '0'); break; //VT100 + case TY_ESC_CS('+', 'A') : setCharset (3, 'A'); break; //VT100 + case TY_ESC_CS('+', 'B') : setCharset (3, 'B'); break; //VT100 + + case TY_ESC_CS('%', 'G') : setCodec (Utf8Codec ); break; //LINUX + case TY_ESC_CS('%', '@') : setCodec (LocaleCodec ); break; //LINUX + + case TY_ESC_DE('3' ) : /* Double height line, top half */ + _currentScreen->setLineProperty( LINE_DOUBLEWIDTH , true ); + _currentScreen->setLineProperty( LINE_DOUBLEHEIGHT , true ); + break; + case TY_ESC_DE('4' ) : /* Double height line, bottom half */ + _currentScreen->setLineProperty( LINE_DOUBLEWIDTH , true ); + _currentScreen->setLineProperty( LINE_DOUBLEHEIGHT , true ); + break; + case TY_ESC_DE('5' ) : /* Single width, single height line*/ + _currentScreen->setLineProperty( LINE_DOUBLEWIDTH , false); + _currentScreen->setLineProperty( LINE_DOUBLEHEIGHT , false); + break; + case TY_ESC_DE('6' ) : /* Double width, single height line*/ + _currentScreen->setLineProperty( LINE_DOUBLEWIDTH , true); + _currentScreen->setLineProperty( LINE_DOUBLEHEIGHT , false); + break; + case TY_ESC_DE('8' ) : _currentScreen->helpAlign ( ); break; + +// resize = \e[8;;t + case TY_CSI_PS('t', 8) : setImageSize( p /*lines */, q /* columns */ ); + emit imageResizeRequest(QSize(q, p)); + break; + +// change tab text color : \e[28;t color: 0-16,777,215 + case TY_CSI_PS('t', 28) : emit changeTabTextColorRequest ( p ); break; + + case TY_CSI_PS('K', 0) : _currentScreen->clearToEndOfLine ( ); break; + case TY_CSI_PS('K', 1) : _currentScreen->clearToBeginOfLine ( ); break; + case TY_CSI_PS('K', 2) : _currentScreen->clearEntireLine ( ); break; + case TY_CSI_PS('J', 0) : _currentScreen->clearToEndOfScreen ( ); break; + case TY_CSI_PS('J', 1) : _currentScreen->clearToBeginOfScreen ( ); break; + case TY_CSI_PS('J', 2) : _currentScreen->clearEntireScreen ( ); break; + case TY_CSI_PS('J', 3) : clearHistory(); break; + case TY_CSI_PS('g', 0) : _currentScreen->changeTabStop (false ); break; //VT100 + case TY_CSI_PS('g', 3) : _currentScreen->clearTabStops ( ); break; //VT100 + case TY_CSI_PS('h', 4) : _currentScreen-> setMode (MODE_Insert ); break; + case TY_CSI_PS('h', 20) : setMode (MODE_NewLine ); break; + case TY_CSI_PS('i', 0) : /* IGNORE: attached printer */ break; //VT100 + case TY_CSI_PS('l', 4) : _currentScreen-> resetMode (MODE_Insert ); break; + case TY_CSI_PS('l', 20) : resetMode (MODE_NewLine ); break; + case TY_CSI_PS('s', 0) : saveCursor ( ); break; + case TY_CSI_PS('u', 0) : restoreCursor ( ); break; + + case TY_CSI_PS('m', 0) : _currentScreen->setDefaultRendition ( ); break; + case TY_CSI_PS('m', 1) : _currentScreen-> setRendition (RE_BOLD ); break; //VT100 + case TY_CSI_PS('m', 2) : _currentScreen-> setRendition (RE_FAINT ); break; + case TY_CSI_PS('m', 3) : _currentScreen-> setRendition (RE_ITALIC ); break; //VT100 + case TY_CSI_PS('m', 4) : _currentScreen-> setRendition (RE_UNDERLINE); break; //VT100 + case TY_CSI_PS('m', 5) : _currentScreen-> setRendition (RE_BLINK ); break; //VT100 + case TY_CSI_PS('m', 7) : _currentScreen-> setRendition (RE_REVERSE ); break; + case TY_CSI_PS('m', 8) : _currentScreen-> setRendition (RE_CONCEAL ); break; + case TY_CSI_PS('m', 9) : _currentScreen-> setRendition (RE_STRIKEOUT); break; + case TY_CSI_PS('m', 53) : _currentScreen-> setRendition (RE_OVERLINE ); break; + case TY_CSI_PS('m', 10) : /* IGNORED: mapping related */ break; //LINUX + case TY_CSI_PS('m', 11) : /* IGNORED: mapping related */ break; //LINUX + case TY_CSI_PS('m', 12) : /* IGNORED: mapping related */ break; //LINUX + case TY_CSI_PS('m', 21) : _currentScreen->resetRendition (RE_BOLD ); break; + case TY_CSI_PS('m', 22) : _currentScreen->resetRendition (RE_BOLD ); + _currentScreen->resetRendition (RE_FAINT ); break; + case TY_CSI_PS('m', 23) : _currentScreen->resetRendition (RE_ITALIC ); break; //VT100 + case TY_CSI_PS('m', 24) : _currentScreen->resetRendition (RE_UNDERLINE); break; + case TY_CSI_PS('m', 25) : _currentScreen->resetRendition (RE_BLINK ); break; + case TY_CSI_PS('m', 27) : _currentScreen->resetRendition (RE_REVERSE ); break; + case TY_CSI_PS('m', 28) : _currentScreen->resetRendition (RE_CONCEAL ); break; + case TY_CSI_PS('m', 29) : _currentScreen->resetRendition (RE_STRIKEOUT); break; + case TY_CSI_PS('m', 55) : _currentScreen->resetRendition (RE_OVERLINE ); break; + + case TY_CSI_PS('m', 30) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 0); break; + case TY_CSI_PS('m', 31) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 1); break; + case TY_CSI_PS('m', 32) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 2); break; + case TY_CSI_PS('m', 33) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 3); break; + case TY_CSI_PS('m', 34) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 4); break; + case TY_CSI_PS('m', 35) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 5); break; + case TY_CSI_PS('m', 36) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 6); break; + case TY_CSI_PS('m', 37) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 7); break; + + case TY_CSI_PS('m', 38) : _currentScreen->setForeColor (p, q); break; + + case TY_CSI_PS('m', 39) : _currentScreen->setForeColor (COLOR_SPACE_DEFAULT, 0); break; + + case TY_CSI_PS('m', 40) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 0); break; + case TY_CSI_PS('m', 41) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 1); break; + case TY_CSI_PS('m', 42) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 2); break; + case TY_CSI_PS('m', 43) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 3); break; + case TY_CSI_PS('m', 44) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 4); break; + case TY_CSI_PS('m', 45) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 5); break; + case TY_CSI_PS('m', 46) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 6); break; + case TY_CSI_PS('m', 47) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 7); break; + + case TY_CSI_PS('m', 48) : _currentScreen->setBackColor (p, q); break; + + case TY_CSI_PS('m', 49) : _currentScreen->setBackColor (COLOR_SPACE_DEFAULT, 1); break; + + case TY_CSI_PS('m', 90) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 8); break; + case TY_CSI_PS('m', 91) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 9); break; + case TY_CSI_PS('m', 92) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 10); break; + case TY_CSI_PS('m', 93) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 11); break; + case TY_CSI_PS('m', 94) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 12); break; + case TY_CSI_PS('m', 95) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 13); break; + case TY_CSI_PS('m', 96) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 14); break; + case TY_CSI_PS('m', 97) : _currentScreen->setForeColor (COLOR_SPACE_SYSTEM, 15); break; + + case TY_CSI_PS('m', 100) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 8); break; + case TY_CSI_PS('m', 101) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 9); break; + case TY_CSI_PS('m', 102) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 10); break; + case TY_CSI_PS('m', 103) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 11); break; + case TY_CSI_PS('m', 104) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 12); break; + case TY_CSI_PS('m', 105) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 13); break; + case TY_CSI_PS('m', 106) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 14); break; + case TY_CSI_PS('m', 107) : _currentScreen->setBackColor (COLOR_SPACE_SYSTEM, 15); break; + + case TY_CSI_PS('n', 5) : reportStatus ( ); break; + case TY_CSI_PS('n', 6) : reportCursorPosition ( ); break; + case TY_CSI_PS('q', 0) : /* IGNORED: LEDs off */ break; //VT100 + case TY_CSI_PS('q', 1) : /* IGNORED: LED1 on */ break; //VT100 + case TY_CSI_PS('q', 2) : /* IGNORED: LED2 on */ break; //VT100 + case TY_CSI_PS('q', 3) : /* IGNORED: LED3 on */ break; //VT100 + case TY_CSI_PS('q', 4) : /* IGNORED: LED4 on */ break; //VT100 + case TY_CSI_PS('x', 0) : reportTerminalParms ( 2); break; //VT100 + case TY_CSI_PS('x', 1) : reportTerminalParms ( 3); break; //VT100 + + case TY_CSI_PS_SP('q', 0) : /* fall through */ + case TY_CSI_PS_SP('q', 1) : emit cursorChanged(KeyboardCursorShape::BlockCursor, true ); break; + case TY_CSI_PS_SP('q', 2) : emit cursorChanged(KeyboardCursorShape::BlockCursor, false); break; + case TY_CSI_PS_SP('q', 3) : emit cursorChanged(KeyboardCursorShape::UnderlineCursor, true ); break; + case TY_CSI_PS_SP('q', 4) : emit cursorChanged(KeyboardCursorShape::UnderlineCursor, false); break; + case TY_CSI_PS_SP('q', 5) : emit cursorChanged(KeyboardCursorShape::IBeamCursor, true ); break; + case TY_CSI_PS_SP('q', 6) : emit cursorChanged(KeyboardCursorShape::IBeamCursor, false); break; + + case TY_CSI_PN('@' ) : _currentScreen->insertChars (p ); break; + case TY_CSI_PN('A' ) : _currentScreen->cursorUp (p ); break; //VT100 + case TY_CSI_PN('B' ) : _currentScreen->cursorDown (p ); break; //VT100 + case TY_CSI_PN('C' ) : _currentScreen->cursorRight (p ); break; //VT100 + case TY_CSI_PN('D' ) : _currentScreen->cursorLeft (p ); break; //VT100 + case TY_CSI_PN('E' ) : /* Not implemented: cursor next p lines */ break; //VT100 + case TY_CSI_PN('F' ) : /* Not implemented: cursor preceding p lines */ break; //VT100 + case TY_CSI_PN('G' ) : _currentScreen->setCursorX (p ); break; //LINUX + case TY_CSI_PN('H' ) : _currentScreen->setCursorYX (p, q); break; //VT100 + case TY_CSI_PN('I' ) : _currentScreen->tab (p ); break; + case TY_CSI_PN('L' ) : _currentScreen->insertLines (p ); break; + case TY_CSI_PN('M' ) : _currentScreen->deleteLines (p ); break; + case TY_CSI_PN('P' ) : _currentScreen->deleteChars (p ); break; + case TY_CSI_PN('S' ) : _currentScreen->scrollUp (p ); break; + case TY_CSI_PN('T' ) : _currentScreen->scrollDown (p ); break; + case TY_CSI_PN('X' ) : _currentScreen->eraseChars (p ); break; + case TY_CSI_PN('Z' ) : _currentScreen->backtab (p ); break; + case TY_CSI_PN('b' ) : _currentScreen->repeatChars (p ); break; + case TY_CSI_PN('c' ) : reportTerminalType ( ); break; //VT100 + case TY_CSI_PN('d' ) : _currentScreen->setCursorY (p ); break; //LINUX + case TY_CSI_PN('f' ) : _currentScreen->setCursorYX (p, q); break; //VT100 + case TY_CSI_PN('r' ) : setMargins (p, q); break; //VT100 + case TY_CSI_PN('y' ) : /* IGNORED: Confidence test */ break; //VT100 + + case TY_CSI_PR('h', 1) : setMode (MODE_AppCuKeys); break; //VT100 + case TY_CSI_PR('l', 1) : resetMode (MODE_AppCuKeys); break; //VT100 + case TY_CSI_PR('s', 1) : saveMode (MODE_AppCuKeys); break; //FIXME + case TY_CSI_PR('r', 1) : restoreMode (MODE_AppCuKeys); break; //FIXME + + case TY_CSI_PR('l', 2) : resetMode (MODE_Ansi ); break; //VT100 + + case TY_CSI_PR('h', 3) : setMode (MODE_132Columns);break; //VT100 + case TY_CSI_PR('l', 3) : resetMode (MODE_132Columns);break; //VT100 + + case TY_CSI_PR('h', 4) : /* IGNORED: soft scrolling */ break; //VT100 + case TY_CSI_PR('l', 4) : /* IGNORED: soft scrolling */ break; //VT100 + + case TY_CSI_PR('h', 5) : _currentScreen-> setMode (MODE_Screen ); break; //VT100 + case TY_CSI_PR('l', 5) : _currentScreen-> resetMode (MODE_Screen ); break; //VT100 + + case TY_CSI_PR('h', 6) : _currentScreen-> setMode (MODE_Origin ); break; //VT100 + case TY_CSI_PR('l', 6) : _currentScreen-> resetMode (MODE_Origin ); break; //VT100 + case TY_CSI_PR('s', 6) : _currentScreen-> saveMode (MODE_Origin ); break; //FIXME + case TY_CSI_PR('r', 6) : _currentScreen->restoreMode (MODE_Origin ); break; //FIXME + + case TY_CSI_PR('h', 7) : _currentScreen-> setMode (MODE_Wrap ); break; //VT100 + case TY_CSI_PR('l', 7) : _currentScreen-> resetMode (MODE_Wrap ); break; //VT100 + case TY_CSI_PR('s', 7) : _currentScreen-> saveMode (MODE_Wrap ); break; //FIXME + case TY_CSI_PR('r', 7) : _currentScreen->restoreMode (MODE_Wrap ); break; //FIXME + + case TY_CSI_PR('h', 8) : /* IGNORED: autorepeat on */ break; //VT100 + case TY_CSI_PR('l', 8) : /* IGNORED: autorepeat off */ break; //VT100 + case TY_CSI_PR('s', 8) : /* IGNORED: autorepeat on */ break; //VT100 + case TY_CSI_PR('r', 8) : /* IGNORED: autorepeat off */ break; //VT100 + + case TY_CSI_PR('h', 9) : /* IGNORED: interlace */ break; //VT100 + case TY_CSI_PR('l', 9) : /* IGNORED: interlace */ break; //VT100 + case TY_CSI_PR('s', 9) : /* IGNORED: interlace */ break; //VT100 + case TY_CSI_PR('r', 9) : /* IGNORED: interlace */ break; //VT100 + + case TY_CSI_PR('h', 12) : /* IGNORED: Cursor blink */ break; //att610 + case TY_CSI_PR('l', 12) : /* IGNORED: Cursor blink */ break; //att610 + case TY_CSI_PR('s', 12) : /* IGNORED: Cursor blink */ break; //att610 + case TY_CSI_PR('r', 12) : /* IGNORED: Cursor blink */ break; //att610 + + case TY_CSI_PR('h', 25) : setMode (MODE_Cursor ); break; //VT100 + case TY_CSI_PR('l', 25) : resetMode (MODE_Cursor ); break; //VT100 + case TY_CSI_PR('s', 25) : saveMode (MODE_Cursor ); break; //VT100 + case TY_CSI_PR('r', 25) : restoreMode (MODE_Cursor ); break; //VT100 + + case TY_CSI_PR('h', 40) : setMode(MODE_Allow132Columns ); break; // XTERM + case TY_CSI_PR('l', 40) : resetMode(MODE_Allow132Columns ); break; // XTERM + + case TY_CSI_PR('h', 41) : /* IGNORED: obsolete more(1) fix */ break; //XTERM + case TY_CSI_PR('l', 41) : /* IGNORED: obsolete more(1) fix */ break; //XTERM + case TY_CSI_PR('s', 41) : /* IGNORED: obsolete more(1) fix */ break; //XTERM + case TY_CSI_PR('r', 41) : /* IGNORED: obsolete more(1) fix */ break; //XTERM + + case TY_CSI_PR('h', 47) : setMode (MODE_AppScreen); break; //VT100 + case TY_CSI_PR('l', 47) : resetMode (MODE_AppScreen); break; //VT100 + case TY_CSI_PR('s', 47) : saveMode (MODE_AppScreen); break; //XTERM + case TY_CSI_PR('r', 47) : restoreMode (MODE_AppScreen); break; //XTERM + + case TY_CSI_PR('h', 67) : /* IGNORED: DECBKM */ break; //XTERM + case TY_CSI_PR('l', 67) : /* IGNORED: DECBKM */ break; //XTERM + case TY_CSI_PR('s', 67) : /* IGNORED: DECBKM */ break; //XTERM + case TY_CSI_PR('r', 67) : /* IGNORED: DECBKM */ break; //XTERM + + // XTerm defines the following modes: + // SET_VT200_MOUSE 1000 + // SET_VT200_HIGHLIGHT_MOUSE 1001 + // SET_BTN_EVENT_MOUSE 1002 + // SET_ANY_EVENT_MOUSE 1003 + // + + //Note about mouse modes: + //There are four mouse modes which xterm-compatible terminals can support - 1000,1001,1002,1003 + //Konsole currently supports mode 1000 (basic mouse press and release) and mode 1002 (dragging the mouse). + //TODO: Implementation of mouse modes 1001 (something called hilight tracking) and + //1003 (a slight variation on dragging the mouse) + // + + case TY_CSI_PR('h', 1000) : setMode (MODE_Mouse1000); break; //XTERM + case TY_CSI_PR('l', 1000) : resetMode (MODE_Mouse1000); break; //XTERM + case TY_CSI_PR('s', 1000) : saveMode (MODE_Mouse1000); break; //XTERM + case TY_CSI_PR('r', 1000) : restoreMode (MODE_Mouse1000); break; //XTERM + + case TY_CSI_PR('h', 1001) : /* IGNORED: hilite mouse tracking */ break; //XTERM + case TY_CSI_PR('l', 1001) : resetMode (MODE_Mouse1001); break; //XTERM + case TY_CSI_PR('s', 1001) : /* IGNORED: hilite mouse tracking */ break; //XTERM + case TY_CSI_PR('r', 1001) : /* IGNORED: hilite mouse tracking */ break; //XTERM + + case TY_CSI_PR('h', 1002) : setMode (MODE_Mouse1002); break; //XTERM + case TY_CSI_PR('l', 1002) : resetMode (MODE_Mouse1002); break; //XTERM + case TY_CSI_PR('s', 1002) : saveMode (MODE_Mouse1002); break; //XTERM + case TY_CSI_PR('r', 1002) : restoreMode (MODE_Mouse1002); break; //XTERM + + case TY_CSI_PR('h', 1003) : setMode (MODE_Mouse1003); break; //XTERM + case TY_CSI_PR('l', 1003) : resetMode (MODE_Mouse1003); break; //XTERM + case TY_CSI_PR('s', 1003) : saveMode (MODE_Mouse1003); break; //XTERM + case TY_CSI_PR('r', 1003) : restoreMode (MODE_Mouse1003); break; //XTERM + + case TY_CSI_PR('h', 1004) : _reportFocusEvents = true; break; + case TY_CSI_PR('l', 1004) : _reportFocusEvents = false; break; + + case TY_CSI_PR('h', 1005) : setMode (MODE_Mouse1005); break; //XTERM + case TY_CSI_PR('l', 1005) : resetMode (MODE_Mouse1005); break; //XTERM + case TY_CSI_PR('s', 1005) : saveMode (MODE_Mouse1005); break; //XTERM + case TY_CSI_PR('r', 1005) : restoreMode (MODE_Mouse1005); break; //XTERM + + case TY_CSI_PR('h', 1006) : setMode (MODE_Mouse1006); break; //XTERM + case TY_CSI_PR('l', 1006) : resetMode (MODE_Mouse1006); break; //XTERM + case TY_CSI_PR('s', 1006) : saveMode (MODE_Mouse1006); break; //XTERM + case TY_CSI_PR('r', 1006) : restoreMode (MODE_Mouse1006); break; //XTERM + + case TY_CSI_PR('h', 1015) : setMode (MODE_Mouse1015); break; //URXVT + case TY_CSI_PR('l', 1015) : resetMode (MODE_Mouse1015); break; //URXVT + case TY_CSI_PR('s', 1015) : saveMode (MODE_Mouse1015); break; //URXVT + case TY_CSI_PR('r', 1015) : restoreMode (MODE_Mouse1015); break; //URXVT + + case TY_CSI_PR('h', 1034) : /* IGNORED: 8bitinput activation */ break; //XTERM + + case TY_CSI_PR('h', 1047) : setMode (MODE_AppScreen); break; //XTERM + case TY_CSI_PR('l', 1047) : _screen[1]->clearEntireScreen(); resetMode(MODE_AppScreen); break; //XTERM + case TY_CSI_PR('s', 1047) : saveMode (MODE_AppScreen); break; //XTERM + case TY_CSI_PR('r', 1047) : restoreMode (MODE_AppScreen); break; //XTERM + + //FIXME: Unitoken: save translations + case TY_CSI_PR('h', 1048) : saveCursor ( ); break; //XTERM + case TY_CSI_PR('l', 1048) : restoreCursor ( ); break; //XTERM + case TY_CSI_PR('s', 1048) : saveCursor ( ); break; //XTERM + case TY_CSI_PR('r', 1048) : restoreCursor ( ); break; //XTERM + + //FIXME: every once new sequences like this pop up in xterm. + // Here's a guess of what they could mean. + case TY_CSI_PR('h', 1049) : saveCursor(); _screen[1]->clearEntireScreen(); setMode(MODE_AppScreen); break; //XTERM + case TY_CSI_PR('l', 1049) : resetMode(MODE_AppScreen); restoreCursor(); break; //XTERM + + case TY_CSI_PR('h', 2004) : setMode (MODE_BracketedPaste); break; //XTERM + case TY_CSI_PR('l', 2004) : resetMode (MODE_BracketedPaste); break; //XTERM + case TY_CSI_PR('s', 2004) : saveMode (MODE_BracketedPaste); break; //XTERM + case TY_CSI_PR('r', 2004) : restoreMode (MODE_BracketedPaste); break; //XTERM + + //FIXME: weird DEC reset sequence + case TY_CSI_PE('p' ) : /* IGNORED: reset ( ) */ break; + + //FIXME: when changing between vt52 and ansi mode evtl do some resetting. + case TY_VT52('A' ) : _currentScreen->cursorUp ( 1); break; //VT52 + case TY_VT52('B' ) : _currentScreen->cursorDown ( 1); break; //VT52 + case TY_VT52('C' ) : _currentScreen->cursorRight ( 1); break; //VT52 + case TY_VT52('D' ) : _currentScreen->cursorLeft ( 1); break; //VT52 + + case TY_VT52('F' ) : setAndUseCharset (0, '0'); break; //VT52 + case TY_VT52('G' ) : setAndUseCharset (0, 'B'); break; //VT52 + + case TY_VT52('H' ) : _currentScreen->setCursorYX (1,1 ); break; //VT52 + case TY_VT52('I' ) : _currentScreen->reverseIndex ( ); break; //VT52 + case TY_VT52('J' ) : _currentScreen->clearToEndOfScreen ( ); break; //VT52 + case TY_VT52('K' ) : _currentScreen->clearToEndOfLine ( ); break; //VT52 + case TY_VT52('Y' ) : _currentScreen->setCursorYX (p-31,q-31 ); break; //VT52 + case TY_VT52('Z' ) : reportTerminalType ( ); break; //VT52 + case TY_VT52('<' ) : setMode (MODE_Ansi ); break; //VT52 + case TY_VT52('=' ) : setMode (MODE_AppKeyPad); break; //VT52 + case TY_VT52('>' ) : resetMode (MODE_AppKeyPad); break; //VT52 + + case TY_CSI_PG('c' ) : reportSecondaryAttributes( ); break; //VT100 + + default: + reportDecodingError(); + break; + }; +} + +void Vt102Emulation::clearScreenAndSetColumns(int columnCount) +{ + setImageSize(_currentScreen->getLines(),columnCount); + clearEntireScreen(); + setDefaultMargins(); + _currentScreen->setCursorYX(0,0); +} + +void Vt102Emulation::sendString(const char* s , int length) +{ + if ( length >= 0 ) + emit sendData(s, length, _codec); + else + emit sendData(s, static_cast(strlen(s)), _codec); +} + +void Vt102Emulation::reportCursorPosition() +{ + const int sz = 20; + char tmp[sz]; + const int r = snprintf(tmp, sz, "\033[%d;%dR",_currentScreen->getCursorY()+1,_currentScreen->getCursorX()+1); + if (sz <= r) { + qWarning("Vt102Emulation::reportCursorPosition: Buffer too small\n"); + } + sendString(tmp); +} + +void Vt102Emulation::reportTerminalType() +{ + // Primary device attribute response (Request was: ^[[0c or ^[[c (from TT321 Users Guide)) + // VT220: ^[[?63;1;2;3;6;7;8c (list deps on emul. capabilities) + // VT100: ^[[?1;2c + // VT101: ^[[?1;0c + // VT102: ^[[?6v + if (getMode(MODE_Ansi)) + sendString("\033[?1;2c"); // I'm a VT100 + else + sendString("\033/Z"); // I'm a VT52 +} + +void Vt102Emulation::reportSecondaryAttributes() +{ + // Seconday device attribute response (Request was: ^[[>0c or ^[[>c) + if (getMode(MODE_Ansi)) + sendString("\033[>0;115;0c"); // Why 115? ;) + else + sendString("\033/Z"); // FIXME I don't think VT52 knows about it but kept for + // konsoles backward compatibility. +} + +void Vt102Emulation::reportTerminalParms(int p) +// DECREPTPARM +{ + const int sz = 100; + char tmp[sz]; + const int r = snprintf(tmp, sz, "\033[%d;1;1;112;112;1;0x",p); // not really true. + if (sz <= r) { + qWarning("Vt102Emulation::reportTerminalParms: Buffer too small\n"); + } + sendString(tmp); +} + +void Vt102Emulation::reportStatus() +{ + sendString("\033[0n"); //VT100. Device status report. 0 = Ready. +} + +void Vt102Emulation::reportAnswerBack() +{ + // FIXME - Test this with VTTEST + // This is really obsolete VT100 stuff. + const char* ANSWER_BACK = ""; + sendString(ANSWER_BACK); +} + +/*! + `cx',`cy' are 1-based. + `cb' indicates the button pressed or released (0-2) or scroll event (4-5). + + eventType represents the kind of mouse action that occurred: + 0 = Mouse button press + 1 = Mouse drag + 2 = Mouse button release +*/ + +void Vt102Emulation::sendMouseEvent( int cb, int cx, int cy , int eventType ) +{ + if (cx < 1 || cy < 1) + return; + + // With the exception of the 1006 mode, button release is encoded in cb. + // Note that if multiple extensions are enabled, the 1006 is used, so it's okay to check for only that. + if (eventType == 2 && !getMode(MODE_Mouse1006)) + cb = 3; + + // normal buttons are passed as 0x20 + button, + // mouse wheel (buttons 4,5) as 0x5c + button + if (cb >= 4) + cb += 0x3c; + + //Mouse motion handling + if ((getMode(MODE_Mouse1002) || getMode(MODE_Mouse1003)) && eventType == 1) + cb += 0x20; //add 32 to signify motion event + + char command[32]; + command[0] = '\0'; + // Check the extensions in decreasing order of preference. Encoding the release event above assumes that 1006 comes first. + if (getMode(MODE_Mouse1006)) { + snprintf(command, sizeof(command), "\033[<%d;%d;%d%c", cb, cx, cy, eventType == 2 ? 'm' : 'M'); + } else if (getMode(MODE_Mouse1015)) { + snprintf(command, sizeof(command), "\033[%d;%d;%dM", static_cast(cb) + 0x20, cx, cy); + } else if (getMode(MODE_Mouse1005)) { + if (cx <= 2015 && cy <= 2015) { + // The xterm extension uses UTF-8 (up to 2 bytes) to encode + // coordinate+32, no matter what the locale is. We could easily + // convert manually, but QString can also do it for us. + QChar coords[2]; + coords[0] = cx + 0x20; + coords[1] = cy + 0x20; + QString coordsStr = QString(coords, 2); + QByteArray utf8 = coordsStr.toUtf8(); + snprintf(command, sizeof(command), "\033[M%c%s", cb + 0x20, utf8.constData()); + } + } else if (cx <= 223 && cy <= 223) { + snprintf(command, sizeof(command), "\033[M%c%c%c", cb + 0x20, cx + 0x20, cy + 0x20); + } + + sendString(command); +} + +/** + * The focus lost event can be used by Vim (or other terminal applications) + * to recognize that the konsole window has lost focus. + * The escape sequence is also used by iTerm2. + * Vim needs the following plugin to be installed to convert the escape + * sequence into the FocusLost autocmd: https://github.com/sjl/vitality.vim + */ +void Vt102Emulation::focusLost(void) +{ + if (_reportFocusEvents) + sendString("\033[O"); +} + +/** + * The focus gained event can be used by Vim (or other terminal applications) + * to recognize that the konsole window has gained focus again. + * The escape sequence is also used by iTerm2. + * Vim needs the following plugin to be installed to convert the escape + * sequence into the FocusGained autocmd: https://github.com/sjl/vitality.vim + */ +void Vt102Emulation::focusGained(void) +{ + if (_reportFocusEvents) + sendString("\033[I"); +} + +void Vt102Emulation::sendText( const QString& text ) +{ + if (!text.isEmpty()) + { + QKeyEvent event(QEvent::KeyPress, + 0, + Qt::NoModifier, + text); + sendKeyEvent(&event); // expose as a big fat keypress event + } +} +void Vt102Emulation::sendKeyEvent( QKeyEvent* event ) +{ + Qt::KeyboardModifiers modifiers = event->modifiers(); + KeyboardTranslator::States states = KeyboardTranslator::NoState; + + // get current states + if (getMode(MODE_NewLine) ) states |= KeyboardTranslator::NewLineState; + if (getMode(MODE_Ansi) ) states |= KeyboardTranslator::AnsiState; + if (getMode(MODE_AppCuKeys)) states |= KeyboardTranslator::CursorKeysState; + if (getMode(MODE_AppScreen)) states |= KeyboardTranslator::AlternateScreenState; + if (getMode(MODE_AppKeyPad) && (modifiers & Qt::KeypadModifier)) + states |= KeyboardTranslator::ApplicationKeypadState; + + // check flow control state + if (modifiers & KeyboardTranslator::CTRL_MOD) + { + switch (event->key()) { + case Qt::Key_S: + emit flowControlKeyPressed(true); + break; + case Qt::Key_Q: + case Qt::Key_C: // cancel flow control + emit flowControlKeyPressed(false); + break; + } + } + + // lookup key binding + if ( _keyTranslator ) + { + KeyboardTranslator::Entry entry = _keyTranslator->findEntry( + event->key() , + modifiers, + states ); + + // send result to terminal + QByteArray textToSend; + + // special handling for the Alt (aka. Meta) modifier. pressing + // Alt+[Character] results in Esc+[Character] being sent + // (unless there is an entry defined for this particular combination + // in the keyboard modifier) + bool wantsAltModifier = entry.modifiers() & entry.modifierMask() & Qt::AltModifier; + bool wantsMetaModifier = entry.modifiers() & entry.modifierMask() & Qt::MetaModifier; + bool wantsAnyModifier = entry.state() & + entry.stateMask() & KeyboardTranslator::AnyModifierState; + + if ( modifiers & Qt::AltModifier && !(wantsAltModifier || wantsAnyModifier) + && !event->text().isEmpty() ) + { + textToSend.prepend("\033"); + } + if ( modifiers & Qt::MetaModifier && !(wantsMetaModifier || wantsAnyModifier) + && !event->text().isEmpty() ) + { + textToSend.prepend("\030@s"); + } + + if ( entry.command() != KeyboardTranslator::NoCommand ) + { + if (entry.command() & KeyboardTranslator::EraseCommand) + textToSend += eraseChar(); + + // TODO command handling + } + else if ( !entry.text().isEmpty() ) + { + textToSend += _codec->fromUnicode(QString::fromUtf8(entry.text(true,modifiers))); + } + else if((modifiers & KeyboardTranslator::CTRL_MOD) && event->key() >= 0x40 && event->key() < 0x5f) { + textToSend += (event->key() & 0x1f); + } + else if(event->key() == Qt::Key_Tab) { + textToSend += 0x09; + } + else if (event->key() == Qt::Key_PageUp) { + textToSend += "\033[5~"; + } + else if (event->key() == Qt::Key_PageDown) { + textToSend += "\033[6~"; + } + else { + textToSend += _codec->fromUnicode(event->text()); + } + + Q_EMIT sendData( textToSend.constData(), textToSend.length(), _codec ); + } + else + { + // print an error message to the terminal if no key translator has been + // set + QString translatorError = tr("No keyboard translator available. " + "The information needed to convert key presses " + "into characters to send to the terminal " + "is missing."); + reset(); + receiveData(translatorError.toUtf8().constData() , translatorError.count(), false); + } +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* VT100 Charsets */ +/* */ +/* ------------------------------------------------------------------------- */ + +// Character Set Conversion ------------------------------------------------ -- + +/* + The processing contains a VT100 specific code translation layer. + It's still in use and mainly responsible for the line drawing graphics. + + These and some other glyphs are assigned to codes (0x5f-0xfe) + normally occupied by the latin letters. Since this codes also + appear within control sequences, the extra code conversion + does not permute with the tokenizer and is placed behind it + in the pipeline. It only applies to tokens, which represent + plain characters. + + This conversion it eventually continued in TerminalDisplay.C, since + it might involve VT100 enhanced fonts, which have these + particular glyphs allocated in (0x00-0x1f) in their code page. +*/ + +#define CHARSET _charset[_currentScreen==_screen[1]] + +// Apply current character map. + +wchar_t Vt102Emulation::applyCharset(wchar_t c) +{ + if (CHARSET.graphic && 0x5f <= c && c <= 0x7e) return vt100_graphics[c-0x5f]; + if (CHARSET.pound && c == '#' ) return 0xa3; //This mode is obsolete + return c; +} + +/* + "Charset" related part of the emulation state. + This configures the VT100 charset filter. + + While most operation work on the current _screen, + the following two are different. +*/ + +void Vt102Emulation::resetCharset(int scrno) +{ + _charset[scrno].cu_cs = 0; + qstrncpy(_charset[scrno].charset,"BBBB",4); + _charset[scrno].sa_graphic = false; + _charset[scrno].sa_pound = false; + _charset[scrno].graphic = false; + _charset[scrno].pound = false; +} + +void Vt102Emulation::setCharset(int n, int cs) // on both screens. +{ + _charset[0].charset[n&3] = static_cast(cs); + useCharset(_charset[0].cu_cs); + _charset[1].charset[n&3] = static_cast(cs); + useCharset(_charset[1].cu_cs); +} + +void Vt102Emulation::setAndUseCharset(int n, int cs) +{ + CHARSET.charset[n&3] = static_cast(cs); + useCharset(n&3); +} + +void Vt102Emulation::useCharset(int n) +{ + CHARSET.cu_cs = n&3; + CHARSET.graphic = (CHARSET.charset[n&3] == '0'); + CHARSET.pound = (CHARSET.charset[n&3] == 'A'); //This mode is obsolete +} + +void Vt102Emulation::setDefaultMargins() +{ + _screen[0]->setDefaultMargins(); + _screen[1]->setDefaultMargins(); +} + +void Vt102Emulation::setMargins(int t, int b) +{ + _screen[0]->setMargins(t, b); + _screen[1]->setMargins(t, b); +} + +void Vt102Emulation::saveCursor() +{ + CHARSET.sa_graphic = CHARSET.graphic; + CHARSET.sa_pound = CHARSET.pound; //This mode is obsolete + // we are not clear about these + //sa_charset = charsets[cScreen->_charset]; + //sa_charset_num = cScreen->_charset; + _currentScreen->saveCursor(); +} + +void Vt102Emulation::restoreCursor() +{ + CHARSET.graphic = CHARSET.sa_graphic; + CHARSET.pound = CHARSET.sa_pound; //This mode is obsolete + _currentScreen->restoreCursor(); +} + +/* ------------------------------------------------------------------------- */ +/* */ +/* Mode Operations */ +/* */ +/* ------------------------------------------------------------------------- */ + +/* + Some of the emulations state is either added to the state of the screens. + + This causes some scoping problems, since different emulations choose to + located the mode either to the current _screen or to both. + + For strange reasons, the extend of the rendition attributes ranges over + all screens and not over the actual _screen. + + We decided on the precise precise extend, somehow. +*/ + +// "Mode" related part of the state. These are all booleans. + +void Vt102Emulation::resetModes() +{ + // MODE_Allow132Columns is not reset here + // to match Xterm's behaviour (see Xterm's VTReset() function) + + resetMode(MODE_132Columns); saveMode(MODE_132Columns); + resetMode(MODE_Mouse1000); saveMode(MODE_Mouse1000); + resetMode(MODE_Mouse1001); saveMode(MODE_Mouse1001); + resetMode(MODE_Mouse1002); saveMode(MODE_Mouse1002); + resetMode(MODE_Mouse1003); saveMode(MODE_Mouse1003); + resetMode(MODE_Mouse1005); saveMode(MODE_Mouse1005); + resetMode(MODE_Mouse1006); saveMode(MODE_Mouse1006); + resetMode(MODE_Mouse1015); saveMode(MODE_Mouse1015); + resetMode(MODE_BracketedPaste); saveMode(MODE_BracketedPaste); + + resetMode(MODE_AppScreen); saveMode(MODE_AppScreen); + resetMode(MODE_AppCuKeys); saveMode(MODE_AppCuKeys); + resetMode(MODE_AppKeyPad); saveMode(MODE_AppKeyPad); + resetMode(MODE_NewLine); + setMode(MODE_Ansi); +} + +void Vt102Emulation::setMode(int m) +{ + _currentModes.mode[m] = true; + switch (m) + { + case MODE_132Columns: + if (getMode(MODE_Allow132Columns)) + clearScreenAndSetColumns(132); + else + _currentModes.mode[m] = false; + break; + case MODE_Mouse1000: + case MODE_Mouse1001: + case MODE_Mouse1002: + case MODE_Mouse1003: + emit programUsesMouseChanged(false); + break; + + case MODE_BracketedPaste: + emit programBracketedPasteModeChanged(true); + break; + + case MODE_AppScreen : _screen[1]->clearSelection(); + setScreen(1); + break; + } + if (m < MODES_SCREEN || m == MODE_NewLine) + { + _screen[0]->setMode(m); + _screen[1]->setMode(m); + } +} + +void Vt102Emulation::resetMode(int m) +{ + _currentModes.mode[m] = false; + switch (m) + { + case MODE_132Columns: + if (getMode(MODE_Allow132Columns)) + clearScreenAndSetColumns(80); + break; + case MODE_Mouse1000 : + case MODE_Mouse1001 : + case MODE_Mouse1002 : + case MODE_Mouse1003 : + emit programUsesMouseChanged(true); + break; + + case MODE_BracketedPaste: + emit programBracketedPasteModeChanged(false); + break; + + case MODE_AppScreen : + _screen[0]->clearSelection(); + setScreen(0); + break; + } + if (m < MODES_SCREEN || m == MODE_NewLine) + { + _screen[0]->resetMode(m); + _screen[1]->resetMode(m); + } +} + +void Vt102Emulation::saveMode(int m) +{ + _savedModes.mode[m] = _currentModes.mode[m]; +} + +void Vt102Emulation::restoreMode(int m) +{ + if (_savedModes.mode[m]) + setMode(m); + else + resetMode(m); +} + +bool Vt102Emulation::getMode(int m) +{ + return _currentModes.mode[m]; +} + +char Vt102Emulation::eraseChar() const +{ + KeyboardTranslator::Entry entry = _keyTranslator->findEntry( + Qt::Key_Backspace, + Qt::NoModifier, + KeyboardTranslator::NoState); + if ( entry.text().count() > 0 ) + return entry.text().at(0); + else + return '\b'; +} + +void Vt102Emulation::reportDecodingError() +{ + if (tokenBufferPos == 0 || ( tokenBufferPos == 1 && (tokenBuffer[0] & 0xff) >= 32) ) + return; + qDebug() << "Undecodable sequence:" << QString::fromWCharArray(tokenBuffer, tokenBufferPos); +} + +//#include "Vt102Emulation.moc" + diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Vt102Emulation.h deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Vt102Emulation.h --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/lib/Vt102Emulation.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/lib/Vt102Emulation.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,201 @@ +/* + This file is part of Konsole, an X terminal. + + Copyright 2007-2008 by Robert Knight + Copyright 1997,1998 by Lars Doelle + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. +*/ + +#ifndef VT102EMULATION_H +#define VT102EMULATION_H + +// Standard Library +#include + +// Qt +#include +#include +#include + +// Konsole +#include "Emulation.h" +#include "Screen.h" + +#define MODE_AppCuKeys (MODES_SCREEN+0) // Application cursor keys (DECCKM) +#define MODE_AppKeyPad (MODES_SCREEN+1) // +#define MODE_Mouse1000 (MODES_SCREEN+2) // Send mouse X,Y position on press and release +#define MODE_Mouse1001 (MODES_SCREEN+3) // Use Hilight mouse tracking +#define MODE_Mouse1002 (MODES_SCREEN+4) // Use cell motion mouse tracking +#define MODE_Mouse1003 (MODES_SCREEN+5) // Use all motion mouse tracking +#define MODE_Mouse1005 (MODES_SCREEN+6) // Xterm-style extended coordinates +#define MODE_Mouse1006 (MODES_SCREEN+7) // 2nd Xterm-style extended coordinates +#define MODE_Mouse1007 (MODES_SCREEN+8) // XTerm Alternate Scroll mode; also check AlternateScrolling profile property +#define MODE_Mouse1015 (MODES_SCREEN+9) // Urxvt-style extended coordinates +#define MODE_Ansi (MODES_SCREEN+10) // Use US Ascii for character sets G0-G3 (DECANM) +#define MODE_132Columns (MODES_SCREEN+11) // 80 <-> 132 column mode switch (DECCOLM) +#define MODE_Allow132Columns (MODES_SCREEN+12) // Allow DECCOLM mode +#define MODE_BracketedPaste (MODES_SCREEN+13) // Xterm-style bracketed paste mode +#define MODE_total (MODES_SCREEN+14) + +namespace Konsole +{ + +struct CharCodes +{ + // coding info + char charset[4]; // + int cu_cs; // actual charset. + bool graphic; // Some VT100 tricks + bool pound ; // Some VT100 tricks + bool sa_graphic; // saved graphic + bool sa_pound; // saved pound +}; + +/** + * Provides an xterm compatible terminal emulation based on the DEC VT102 terminal. + * A full description of this terminal can be found at http://vt100.net/docs/vt102-ug/ + * + * In addition, various additional xterm escape sequences are supported to provide + * features such as mouse input handling. + * See http://rtfm.etla.org/xterm/ctlseq.html for a description of xterm's escape + * sequences. + * + */ +class Vt102Emulation : public Emulation +{ +Q_OBJECT + +public: + /** Constructs a new emulation */ + Vt102Emulation(); + ~Vt102Emulation() override; + + // reimplemented from Emulation + void clearEntireScreen() override; + void reset() override; + char eraseChar() const override; + +public slots: + // reimplemented from Emulation + void sendString(const char*,int length = -1) override; + void sendText(const QString& text) override; + void sendKeyEvent(QKeyEvent*) override; + void sendMouseEvent(int buttons, int column, int line, int eventType) override; + virtual void focusLost(); + virtual void focusGained(); + +protected: + // reimplemented from Emulation + void setMode(int mode) override; + void resetMode(int mode) override; + void receiveChar(wchar_t cc) override; + +private slots: + //causes changeTitle() to be emitted for each (int,QString) pair in pendingTitleUpdates + //used to buffer multiple title updates + void updateTitle(); + +private: + wchar_t applyCharset(wchar_t c); + void setCharset(int n, int cs); + void useCharset(int n); + void setAndUseCharset(int n, int cs); + void saveCursor(); + void restoreCursor(); + void resetCharset(int scrno); + + void setMargins(int top, int bottom); + //set margins for all screens back to their defaults + void setDefaultMargins(); + + // returns true if 'mode' is set or false otherwise + bool getMode (int mode); + // saves the current boolean value of 'mode' + void saveMode (int mode); + // restores the boolean value of 'mode' + void restoreMode(int mode); + // resets all modes + // (except MODE_Allow132Columns) + void resetModes(); + + void resetTokenizer(); + #define MAX_TOKEN_LENGTH 256 // Max length of tokens (e.g. window title) + void addToCurrentToken(wchar_t cc); + wchar_t tokenBuffer[MAX_TOKEN_LENGTH]; //FIXME: overflow? + int tokenBufferPos; +#define MAXARGS 15 + void addDigit(int dig); + void addArgument(); + int argv[MAXARGS]; + int argc; + void initTokenizer(); + int prevCC; + + // Set of flags for each of the ASCII characters which indicates + // what category they fall into (printable character, control, digit etc.) + // for the purposes of decoding terminal output + int charClass[256]; + + void reportDecodingError(); + + void processToken(int code, wchar_t p, int q); + void processWindowAttributeChange(); + void requestWindowAttribute(int); + + void reportTerminalType(); + void reportSecondaryAttributes(); + void reportStatus(); + void reportAnswerBack(); + void reportCursorPosition(); + void reportTerminalParms(int p); + + void onScrollLock(); + void scrollLock(const bool lock); + + // clears the screen and resizes it to the specified + // number of columns + void clearScreenAndSetColumns(int columnCount); + + CharCodes _charset[2]; + + class TerminalState + { + public: + // Initializes all modes to false + TerminalState() + { memset(&mode,false,MODE_total * sizeof(bool)); } + + bool mode[MODE_total]; + }; + + TerminalState _currentModes; + TerminalState _savedModes; + + //hash table and timer for buffering calls to the session instance + //to update the name of the session + //or window title. + //these calls occur when certain escape sequences are seen in the + //output from the terminal + QHash _pendingTitleUpdates; + QTimer* _titleUpdateTimer; + + bool _reportFocusEvents; +}; + +} + +#endif // VT102EMULATION_H diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE.BSD-3-clause deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE.BSD-3-clause --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE.BSD-3-clause 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE.BSD-3-clause 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,26 @@ +Copyright (c) The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE.LGPL2+ deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE.LGPL2+ --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/LICENSE.LGPL2+ 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/LICENSE.LGPL2+ 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff -Nru deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/qtermwidget.spec deepin-terminal-5.4.13/3rdparty/terminalwidget/qtermwidget.spec --- deepin-terminal-5.0.0+ds1/3rdparty/terminalwidget/qtermwidget.spec 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/3rdparty/terminalwidget/qtermwidget.spec 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,100 @@ +# norootforbuild + +%define libname libqtermwidget0 + +Name: qtermwidget +Summary: Qt4 terminal widget +Version: 0.2.0 +Release: 1 +License: GPL +Source: %{name}-%{version}.tar.bz2 +Group: Utility +URL: https://github.com/qterminal +Vendor: petr@yarpen.cz + + +%if 0%{?fedora_version} + %define breq qt4-devel + %define pref %{buildroot}/usr +%endif +%if 0%{?mandriva_version} + %define breq libqt4-devel + %define pref %{buildroot}/usr +%endif +%if 0%{?suse_version} + %define breq libqt4-devel + %define pref %{_prefix} +%endif + + +BuildRequires: gcc-c++, %{breq}, cmake +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Prefix: %{_prefix} + +%description +QTermWidget is an opensource project based on KDE4 Konsole application. The main goal of this project is to provide unicode-enabled, embeddable QT4 widget for using as a built-in console (or terminal emulation widget). +Of course I`m aware about embedding abilities of original Konsole, but once I had Qt without KDE, and it was a serious problem. I decided not to rely on a chance. I could not find any interesting related project, so I had to write it. +The original Konsole`s code was rewritten entirely with QT4 only; also I have to include in the project some parts of code from kde core library. All code dealing with user interface parts and session management was removed (maybe later I bring it back somehow), and the result is quite useful, I suppose. +This library was compiled and tested on three linux systems, based on 2.4.32, 2.6.20, 2.6.23 kernels, x86 and amd64. Ther is also a sample application provided for quick start. + +%package -n %{libname} +Summary: Qt4 terminal widget - base package +Group: "Development/Libraries/C and C++" +%description -n %{libname} +QTermWidget is an opensource project based on KDE4 Konsole application. +The main goal of this project is to provide unicode-enabled, embeddable +QT4 widget for using as a built-in console (or terminal emulation widget). + +%package devel +Summary: Qt4 terminal widget - development package +Group: "Development/Libraries/C and C++" +Requires: %{libname} +%description devel +Development package for QTermWidget. Contains headers and dev-libs. + +%prep +%setup + +%build +cmake \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=%{pref} \ + %{_builddir}/%{name}-%{version} + +%{__make} %{?jobs:-j%jobs} + + +%install +%makeinstall + + +%clean +%{__rm} -rf %{buildroot} + +%post -n %{libname} +ldconfig + +%postun -n %{libname} +ldconfig + +%files -n %{libname} +%defattr(-,root,root,-) +%doc AUTHORS LICENSE Changelog INSTALL README +%{_libdir}/lib%{name}.so.%{version} +%{_datadir}/%{name} +%{_datadir}/%{name}/* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/*.so.0 + +%changelog +* Mon Oct 29 2010 Petr Vanek 0.2 +- version bump, cmake builds + +* Sat Jul 26 2008 TI_Eugene 0.100 +- Initial build diff -Nru deepin-terminal-5.0.0+ds1/CHANGELOG.md deepin-terminal-5.4.13/CHANGELOG.md --- deepin-terminal-5.0.0+ds1/CHANGELOG.md 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/CHANGELOG.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,330 +0,0 @@ - -## 3.2.7 (2019-06-25) - - -#### Features - -* allow always hide resize grip line ([209f2338](https://github.com/linuxdeepin/deepin-terminal/commit/209f2338b3b5f40da5b260965a60124396db341e)) -* add a resize grip line for not composited user ([d34a8a5a](https://github.com/linuxdeepin/deepin-terminal/commit/d34a8a5aa00e5737e6435ff546fd15459e1713a4)) -* allow config audible bell behavior ([22874bed](https://github.com/linuxdeepin/deepin-terminal/commit/22874bed1e026be148accb6caca631c477e433c5)) - - - - -## 3.2.6 (2019-06-11) - - -#### Bug Fixes - -* make special password for ssh login works. ([bb5b2736](https://github.com/linuxdeepin/deepin-terminal/commit/bb5b273658db43178d806cf7d967198fac69c9b2)) - - - - -## 3.2.5.1 (2019-06-03) - -* Revert a commit which cause window size grows. (#116) - - - -## 3.2.5 (2019-06-01) - - -#### Bug Fixes - -* terminal window drifts after toggling compositor. ([b757ef93](https://github.com/linuxdeepin/deepin-terminal/commit/b757ef93f96d0a40060a9db9bde33188c0f7186f)) -* download file opened dialog should modal parent ([fdea3be8](https://github.com/linuxdeepin/deepin-terminal/commit/fdea3be8e7f9a96d85e057a69ae480b6063bf62b)) - - - - -## 3.2.4 (2019-05-23) - - -#### Bug Fixes - -* May crash when split terminal window ([882b4d8c](https://github.com/linuxdeepin/deepin-terminal/commit/882b4d8c89be6419cef18124eaf2d54f79c3dfbe)) - - - - -## 3.2.3.1 (2019-05-10) - - -#### Bug Fixes - -* Quake window get focus on KWin ([a3e46ed0](https://github.com/linuxdeepin/deepin-terminal/commit/a3e46ed0cc034d3db56f61667f2dcd4c4ad75be3)) - - - - -## 3.2.3 (2019-05-09) - - -#### Bug Fixes - -* blur under KWin wm support ([28a4438c](https://github.com/linuxdeepin/deepin-terminal/commit/28a4438cf15726eb2ae7eb8c1ab28298e27f17b2)) - -#### Others - -* auto pull translation files from transifex (#153) ([4de4065c](https://github.com/linuxdeepin/deepin-terminal/commit/4de4065ce0dd1525f7f95f84d53afe6d93925357)) -* correct a typo ([ba8fd083](https://github.com/linuxdeepin/deepin-terminal/commit/ba8fd0832406f69e9f829303fc3d21d076cdabc7)) - -#### Features - -* make "Open" menu item supporting absolution paths ([a0897d95](https://github.com/linuxdeepin/deepin-terminal/commit/a0897d95c9bbdf773651478ae33d040ea09dab12)) -* dde-menu support isScaled property ([bd4df48b](https://github.com/linuxdeepin/deepin-terminal/commit/bd4df48b4eb002f183710d002bebe623dd95271b)) - - - - -## 3.2.2.1 (2019-04-12) - - -#### Bug Fixes - -* touchscreen support breaks line selection ([8e14fa05](https://github.com/linuxdeepin/deepin-terminal/commit/8e14fa054583edf3cfcdd4479b331c02da8ed35e)) - - - - -## 3.2.2 (2019-04-10) - - -#### Others - -* auto pull translation files from transifex ([1b73d534](https://github.com/linuxdeepin/deepin-terminal/commit/1b73d534866937a469e4c99b70eccc6830b644f4)) -* correct a typo ([0f3e0d13](https://github.com/linuxdeepin/deepin-terminal/commit/0f3e0d13987fd08bb75846fa62d63d9cc80eda48)) -* translation update. (#138) ([3f8556a4](https://github.com/linuxdeepin/deepin-terminal/commit/3f8556a4180d8fb32ed1b361db119b4b8f4bdbeb)) - -#### Features - -* config option for bold_is_bright (#135) ([16cf3780](https://github.com/linuxdeepin/deepin-terminal/commit/16cf3780b225baf701b6725725aaf5a836e042d1)) - - - - -## 3.2.1.2 (2019-03-28) - - -#### Bug Fixes - -* fix: Take `QT_FONT_DPI` into consideration. ([700286c](https://github.com/linuxdeepin/deepin-terminal/commit/700286cd3d0b090effe744c0788b50d9c87f457c)) - -#### Others - -* auto pull translation files from transifex ([634e4a0d](https://github.com/linuxdeepin/deepin-terminal/commit/634e4a0d40bb21ff85176de98f5a03eb51fe726a)) - - - - -## 3.2.1.1 (2019-02-25) - - - - - -## 3.2.1 (2019-01-25) - - -#### Bug Fixes - -* avoid using dpkg-parsechangelog ([e249b909](https://github.com/linuxdeepin/deepin-terminal/commit/e249b909ec1d6cc3a5e1d77753b9df42f6254194)) - - - - -## 3.2 (2019-01-03) - - -#### Others - -* merge po ([2706d53b](https://github.com/linuxdeepin/deepin-terminal/commit/2706d53b237f496b92d2aadb98dd38feafa41a5d)) -* update pot ([42229a93](https://github.com/linuxdeepin/deepin-terminal/commit/42229a93b9f72013862e176b408ee05f9ee97fc0)) -* add travis-ci build ([6a71d5a9](https://github.com/linuxdeepin/deepin-terminal/commit/6a71d5a9037802c22df37374e2e96d15d58baf75)) - - - - -## 3.1 (2018-12-24) - - -#### Bug Fixes - -* touch on selection causing deselection ([0a96f03a](https://github.com/linuxdeepin/deepin-terminal/commit/0a96f03a00f16b5c89f1df80257140ecd1c7e26f)) - - - - -## 3.0.12 (2018-12-06) - - -#### Bug Fixes - -* zssh "out of pty's" issue on debian stretch w/ vendor lib ([e2efb5dc](https://github.com/linuxdeepin/deepin-terminal/commit/e2efb5dc3e0e148ebb2639d352df34df53a89f22)) - - - - -## 3.0.11.1 (2018-11-26) - - -#### Bug Fixes - -* Update ts file and deepin vendor support ([30b80b66](https://github.com/linuxdeepin/deepin-terminal/commit/30b80b66c71e64a6178b41bbcc59388b4b55de13)) - - - - -## 3.0.11 (2018-11-22) - -* backport support for debian stretch ([d3ec0a0](https://github.com/linuxdeepin/deepin-terminal/commit/d3ec0a077cb621cddd7945c647d655422dcdad03)) - - - -## 3.0.10.2 (2018-11-13) - - -#### Bug Fixes - -* use markup text to create layout ([002dad33](https://github.com/linuxdeepin/deepin-terminal/commit/002dad330bcfb803f200481b6560b762b351d874)) - - - - -## 3.0.10.1 (2018-11-12) - - -#### Features - -* better theme preview 'eye-candy' ([edbe56a4](https://github.com/linuxdeepin/deepin-terminal/commit/edbe56a4a723a5fad60e7f10f35070afc8ecc546)) - - - - -## 3.0.10 (2018-11-09) - - -#### Bug Fixes - -* theme preview use the correct color'n'text ([fb1fec94](https://github.com/linuxdeepin/deepin-terminal/commit/fb1fec94f1ba618b6524288ddb0993e97c5cb3ef)) -* remove line above at titlebar. ([8afd630e](https://github.com/linuxdeepin/deepin-terminal/commit/8afd630e3b8bf6794247f5fc05087fbb932afa55)) -* window button hover state set to hand type. ([565e97ea](https://github.com/linuxdeepin/deepin-terminal/commit/565e97ea93ab4f6287aeeb1ec0edb9fa914db260)) - - - -## [3.0.9] - 2018-11-1 -* feat: update window titlebar button style - -## [3.0.8] - 2018-10-16 -* fix: open_in_filemanager -* fix: handle `GLib.Error' - -## [3.0.7] - 2018-10-07 -* fix: github issue #74 -* fix: gtk_box_pack assertion error -* refactor: remove 3rdparty/ and vapi/ - -## [3.0.6] - 2018-10-04 -* fix: github issue #73 - -## [3.0.5] - 2018-09-17 -* fix: missing verison info when building the deb - -## [3.0.4] - 2018-09-07 -* fix: unregister menu before recreate menu -* refactor: match more mono fonts - -## [3.0.3] - 2018-08-19 -* feat: support customized version string - -## [3.0.2] - 2018-08-19 -* generate version information from git -* fix: support set tab title use OSC escape sequence - - -### 3.0.1 (2018-07-20) - - -#### Bug Fixes - -* Adapt lintian ([748a876a](https://github.com/linuxdeepin/deepin-terminal/commit/748a876a40725005ce8e415793b343d04de2fc03)) -* add TEST_BUILD configure condition ([7d757089](https://github.com/linuxdeepin/deepin-terminal/commit/7d75708997ea45f6424d80566edd67812c7fed05)) - - - -# Change Log -This is default terminal emulation application for Deepin - -## [Unreleased] - -## [3.0.0] - 2018-05-14 -* Add customize search engine to right menu. -* Like XShell, if user set config option 'copy_on_select' to true, terminal will copy select text to system clipboard when text is selected. -* Add github, stackoverflow, duckduckgo in default search engine. -* Add git ssh link support: mouse hover git link to copy it. -* Open current directory in file manager. -* Slow down the opacity adjust speed. -* Use DBus instead dman to start Deepin Manual, Deepin Manual just will run in flatpak runtime in the future. -* Search improvements, allow to search with enter key and previous/next buttons even after initial search panel opening, improved by avently, thanks. -* Search improvements, disabled live search, improved by avently, thanks. -* Refactory CMakeLists.txt, improved by avently, thanks. -* Add WenQuanYi in mono font whitelist, WenQuanYi's attribute is incomplete, not include spacing attribue. -* Just reset terminal when exit code match samba error code, other non-zero code (such as Ctrl + C etc) don't trigger reset terminal. -* Refactory code: move prevent event code to Widgets.SpinButton. -* Prevent scrolling event of Gtk.ComboBoxText and Gtk.SpinButton. -* Add empathy theme. -* Fixed spell of README.md, thanks wtz. -* Add miss dependences in README.md. -* Add advanced options in README.md. -* Update copyright year. -* Update translations. - -## [2.9.2] - 2017-12-01 -- Fixed blur background not work for 4k screen. - -## [2.9.1] - 2017-11-27 -- Add option 'show_highlight_frame', default set to false, it's nosie to display highlight frame everytime i select terminal window. -- Adjust about dialog font size. -- Adjust progressbar draw coordinate. - -## [2.9] - 2017-11-27 -- Upload file to remote server when drag file to remote terminal. -- Split terminal to login server if current terminal has login. -- Set 'NO_AT_BRIDGE' environment variable with 1 to dislable accessibility dbus warning. -- Display highlight frame when select different terminal window. -- Fixed preference dialog widget width problem when use German. -- Adjust slider button text width to make it can display ip address completely. -- Add "blur background" option in preference dialog. -- Update translations. - -## [2.8] - 2017-11-23 -- Drag file to remote server if terminal is login. - -## [2.7.7] - 2017-11-22 -- Downgrade zssh version -- Change get_ssh_script_path path to follow debian policy. -- Adjust preference dialog font attribute. - -## [2.7.6] - 2017-11-09 -- Buildin zssh in deepin-terminal, don't need depend zssh in linux distribution -- Fixed search text color is not correctly when terminal use light theme -- Add baidu and bing search engine in right menu - -## [2.7.5] - 2017-11-06 -- Synchronous translations - -## [2.7] - 2017-09-11 -- Add 'load_theme' option to make new terminal load theme that provide by user -- Add "New theme terminal" feature: press Ctrl + Alt + num to create new theme terminal -- Update pot file with new feature: load_theme option and new theme terminal window - -## [2.6] - 2017-09-05 -- Update manual content to deepin-terminal 26 -- Update transifex translations -- Find a safe way to make server title will change along with server login status -- Add deepin-menu in debian dependence -- Add advanced option 'print_notify_after_script_finish', terminal will quit immediately once command execute finish when this option set as true, default is false -- Add option 'cursor auto hide', terminal cursor will autohide when type text in terminal when this option set as true, default is false -- Add rename dialog in right-click menu, to make user customize terminal title, this feature can tricked by press F2 -- Set tab title with server name instead server path when login in server diff -Nru deepin-terminal-5.0.0+ds1/.clog.toml deepin-terminal-5.4.13/.clog.toml --- deepin-terminal-5.0.0+ds1/.clog.toml 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/.clog.toml 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -[clog] -repository = "https://github.com/linuxdeepin/deepin-terminal" -from-latest-tag = true - -changelog = "CHANGELOG.md" - -[sections] -Others = ["chore"] diff -Nru deepin-terminal-5.0.0+ds1/cmake/CMakeParseArguments.cmake deepin-terminal-5.4.13/cmake/CMakeParseArguments.cmake --- deepin-terminal-5.0.0+ds1/cmake/CMakeParseArguments.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/CMakeParseArguments.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#.rst: -# CMakeParseArguments -# ------------------- -# -# This module once implemented the :command:`cmake_parse_arguments` command -# that is now implemented natively by CMake. It is now an empty placeholder -# for compatibility with projects that include it to get the command from -# CMake 3.4 and lower. - -#============================================================================= -# Copyright 2010 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindFontConfig.cmake deepin-terminal-5.4.13/cmake/FindFontConfig.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindFontConfig.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindFontConfig.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# - Try to find Fontconfig -# Once done this will define -# -# FONTCONFIG_FOUND - system has Fontconfig -# FONTCONFIG_INCLUDE_DIR - the Fontconfig include directory -# FONTCONFIG_LIBRARY - Link these to use Fontconfig -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - - -if ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARY ) - # in cache already - SET(Fontconfig_FIND_QUIETLY TRUE) -endif ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARY ) - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -if( NOT WIN32 ) - find_package(PkgConfig) - - pkg_check_modules(FONTCONFIG_PKG QUIET fontconfig) -endif( NOT WIN32 ) - -FIND_PATH(FONTCONFIG_INCLUDE_DIR NAMES fontconfig/fontconfig.h - PATHS - /usr/local/include - /usr/X11/include - /usr/include - HINTS - ${FONTCONFIG_PKG_INCLUDE_DIRS} # Generated by pkg-config -) - -FIND_LIBRARY(FONTCONFIG_LIBRARY NAMES fontconfig ${FONTCONFIG_PKG_LIBRARY} - PATHS - /usr/local - /usr/X11 - /usr - HINTS - ${FONTCONFIG_PKG_LIBRARY_DIRS} # Generated by pkg-config - PATH_SUFFIXES - lib64 - lib -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARY FONTCONFIG_INCLUDE_DIR ) - -# show the FONTCONFIG_INCLUDE_DIR and FONTCONFIG_LIBRARY variables only in the advanced view -MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARY ) diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindGettext.cmake deepin-terminal-5.4.13/cmake/FindGettext.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindGettext.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindGettext.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ -#.rst: -# FindGettext -# ----------- -# -# Find GNU gettext tools -# -# This module looks for the GNU gettext tools. This module defines the -# following values: -# -# :: -# -# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool. -# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool. -# GETTEXT_FOUND: True if gettext has been found. -# GETTEXT_VERSION_STRING: the version of gettext found (since CMake 2.8.8) -# -# -# -# Additionally it provides the following macros: -# -# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN ) -# -# :: -# -# This will create a target "translations" which will convert the -# given input po files into the binary output mo file. If the -# ALL option is used, the translations will also be created when -# building the default target. -# -# GETTEXT_PROCESS_POT_FILE( [ALL] [INSTALL_DESTINATION ] -# LANGUAGES ... ) -# -# :: -# -# Process the given pot file to mo files. -# If INSTALL_DESTINATION is given then automatically install rules will -# be created, the language subdirectory will be taken into account -# (by default use share/locale/). -# If ALL is specified, the pot file is processed when building the all traget. -# It creates a custom target "potfile". -# -# GETTEXT_PROCESS_PO_FILES( [ALL] [INSTALL_DESTINATION ] -# PO_FILES ... ) -# -# :: -# -# Process the given po files to mo files for the given language. -# If INSTALL_DESTINATION is given then automatically install rules will -# be created, the language subdirectory will be taken into account -# (by default use share/locale/). -# If ALL is specified, the po files are processed when building the all traget. -# It creates a custom target "pofiles". -# -# .. note:: -# If you wish to use the Gettext library (libintl), use :module:`FindIntl`. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# Copyright 2007 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge) - -find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt) - -if(GETTEXT_MSGMERGE_EXECUTABLE) - execute_process(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version - OUTPUT_VARIABLE gettext_version - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (gettext_version MATCHES "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)") - set(GETTEXT_VERSION_STRING "${CMAKE_MATCH_1}") - endif() - unset(gettext_version) -endif() - -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext - REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE - VERSION_VAR GETTEXT_VERSION_STRING) - -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - -function(_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name) - set(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}") - get_property(currentCounter GLOBAL PROPERTY "${propertyName}") - if(NOT currentCounter) - set(currentCounter 1) - endif() - set(${_unique_name} "${_name}_${currentCounter}" PARENT_SCOPE) - math(EXPR currentCounter "${currentCounter} + 1") - set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} ) -endfunction() - -macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg) - # make it a real variable, so we can modify it here - set(_firstPoFile "${_firstPoFileArg}") - - set(_gmoFiles) - get_filename_component(_potName ${_potFile} NAME) - string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName}) - get_filename_component(_absPotFile ${_potFile} ABSOLUTE) - - set(_addToAll) - if(${_firstPoFile} STREQUAL "ALL") - set(_addToAll "ALL") - set(_firstPoFile) - endif() - - foreach (_currentPoFile ${_firstPoFile} ${ARGN}) - get_filename_component(_absFile ${_currentPoFile} ABSOLUTE) - get_filename_component(_abs_PATH ${_absFile} PATH) - get_filename_component(_lang ${_absFile} NAME_WE) - set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) - - add_custom_command( - OUTPUT ${_gmoFile} - COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} - DEPENDS ${_absPotFile} ${_absFile} - ) - - install(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo) - set(_gmoFiles ${_gmoFiles} ${_gmoFile}) - - endforeach () - - if(NOT TARGET translations) - add_custom_target(translations) - endif() - - _GETTEXT_GET_UNIQUE_TARGET_NAME(translations uniqueTargetName) - - add_custom_target(${uniqueTargetName} ${_addToAll} DEPENDS ${_gmoFiles}) - - add_dependencies(translations ${uniqueTargetName}) - -endmacro() - - -function(GETTEXT_PROCESS_POT_FILE _potFile) - set(_gmoFiles) - set(_options ALL) - set(_oneValueArgs INSTALL_DESTINATION) - set(_multiValueArgs LANGUAGES) - - CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - - get_filename_component(_potName ${_potFile} NAME) - string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName}) - get_filename_component(_absPotFile ${_potFile} ABSOLUTE) - - foreach (_lang ${_parsedArguments_LANGUAGES}) - set(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po") - set(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo") - - add_custom_command( - OUTPUT "${_poFile}" - COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile} - DEPENDS ${_absPotFile} - ) - - add_custom_command( - OUTPUT "${_gmoFile}" - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile} - DEPENDS ${_absPotFile} ${_poFile} - ) - - if(_parsedArguments_INSTALL_DESTINATION) - install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo) - endif() - list(APPEND _gmoFiles ${_gmoFile}) - endforeach () - - if(NOT TARGET potfiles) - add_custom_target(potfiles) - endif() - - _GETTEXT_GET_UNIQUE_TARGET_NAME( potfiles uniqueTargetName) - - if(_parsedArguments_ALL) - add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles}) - else() - add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles}) - endif() - - add_dependencies(potfiles ${uniqueTargetName}) - -endfunction() - - -function(GETTEXT_PROCESS_PO_FILES _lang) - set(_options ALL) - set(_oneValueArgs INSTALL_DESTINATION) - set(_multiValueArgs PO_FILES) - set(_gmoFiles) - - CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - - foreach(_current_PO_FILE ${_parsedArguments_PO_FILES}) - get_filename_component(_name ${_current_PO_FILE} NAME) - string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name}) - set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}-${_basename}.gmo) - add_custom_command(OUTPUT ${_gmoFile} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - DEPENDS ${_current_PO_FILE} - ) - - if(_parsedArguments_INSTALL_DESTINATION) - install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo) - endif() - list(APPEND _gmoFiles ${_gmoFile}) - endforeach() - - - if(NOT TARGET pofiles) - add_custom_target(pofiles) - endif() - - _GETTEXT_GET_UNIQUE_TARGET_NAME( pofiles uniqueTargetName) - - if(_parsedArguments_ALL) - add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles}) - else() - add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles}) - endif() - - add_dependencies(pofiles ${uniqueTargetName}) - -endfunction() diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindGLib.cmake deepin-terminal-5.4.13/cmake/FindGLib.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindGLib.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindGLib.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -# FindGLib.cmake -# -# -# CMake support for GLib/GObject/GIO. -# -# License: -# -# Copyright (c) 2016 Evan Nemerson -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, copy, -# modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -find_package(PkgConfig) - -if(PKG_CONFIG_FOUND) - pkg_search_module(GLib_PKG glib-2.0) -endif() - -find_library(GLib_LIBRARY glib-2.0 HINTS ${GLib_PKG_LIBRARY_DIRS}) -set(GLib glib-2.0) - -if(GLib_LIBRARY AND NOT GLib_FOUND) - add_library(${GLib} SHARED IMPORTED) - set_property(TARGET ${GLib} PROPERTY IMPORTED_LOCATION "${GLib_LIBRARY}") - set_property(TARGET ${GLib} PROPERTY INTERFACE_COMPILE_OPTIONS "${GLib_PKG_CFLAGS_OTHER}") - - find_path(GLib_INCLUDE_DIRS "glib.h" - HINTS ${GLib_PKG_INCLUDE_DIRS} - PATH_SUFFIXES "glib-2.0") - - get_filename_component(GLib_LIBDIR "${GLib}" DIRECTORY) - find_path(GLib_CONFIG_INCLUDE_DIR "glibconfig.h" - HINTS - ${GLib_LIBDIR} - ${GLib_PKG_INCLUDE_DIRS} - PATHS - "${CMAKE_LIBRARY_PATH}" - PATH_SUFFIXES - "glib-2.0/include" - "glib-2.0") - unset(GLib_LIBDIR) - - if(GLib_CONFIG_INCLUDE_DIR) - file(STRINGS "${GLib_CONFIG_INCLUDE_DIR}/glibconfig.h" GLib_MAJOR_VERSION REGEX "^#define GLIB_MAJOR_VERSION +([0-9]+)") - string(REGEX REPLACE "^#define GLIB_MAJOR_VERSION ([0-9]+)$" "\\1" GLib_MAJOR_VERSION "${GLib_MAJOR_VERSION}") - file(STRINGS "${GLib_CONFIG_INCLUDE_DIR}/glibconfig.h" GLib_MINOR_VERSION REGEX "^#define GLIB_MINOR_VERSION +([0-9]+)") - string(REGEX REPLACE "^#define GLIB_MINOR_VERSION ([0-9]+)$" "\\1" GLib_MINOR_VERSION "${GLib_MINOR_VERSION}") - file(STRINGS "${GLib_CONFIG_INCLUDE_DIR}/glibconfig.h" GLib_MICRO_VERSION REGEX "^#define GLIB_MICRO_VERSION +([0-9]+)") - string(REGEX REPLACE "^#define GLIB_MICRO_VERSION ([0-9]+)$" "\\1" GLib_MICRO_VERSION "${GLib_MICRO_VERSION}") - set(GLib_VERSION "${GLib_MAJOR_VERSION}.${GLib_MINOR_VERSION}.${GLib_MICRO_VERSION}") - unset(GLib_MAJOR_VERSION) - unset(GLib_MINOR_VERSION) - unset(GLib_MICRO_VERSION) - - list(APPEND GLib_INCLUDE_DIRS ${GLib_CONFIG_INCLUDE_DIR}) - set_property(TARGET ${GLib} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GLib_INCLUDE_DIRS}") - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GLib - REQUIRED_VARS - GLib_LIBRARY - GLib_INCLUDE_DIRS - VERSION_VAR - GLib_VERSION) diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindJsonGlib.cmake deepin-terminal-5.4.13/cmake/FindJsonGlib.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindJsonGlib.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindJsonGlib.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -# - Try to find JsonGlib-1.0 -# Once done, this will define -# -# JsonGlib_FOUND - system has Glib -# JsonGlib_INCLUDE_DIRS - the Glib include directories -# JsonGlib_LIBRARIES - link these to use Glib - -include(LibFindMacros) - -# Use pkg-config to get hints about paths -libfind_pkg_check_modules(JsonGlib_PKGCONF json-glib-1.0) - -# Main include dir -find_path(JsonGlib_INCLUDE_DIR - NAMES json-glib/json-glib.h - PATHS ${JsonGlib_PKGCONF_INCLUDE_DIRS} - PATH_SUFFIXES json-glib-1.0 -) - -# Finally the library itself -find_library(JsonGlib_LIBRARY - NAMES json-glib-1.0 - PATHS ${JsonGlib_PKGCONF_LIBRARY_DIRS} -) - -# Set the include dir variables and the libraries and let libfind_process do the rest. -# NOTE: Singular variables for this library, plural for libraries this this lib depends on. -set(JsonGlib_PROCESS_INCLUDES ${JsonGlib_INCLUDE_DIR}) -set(JsonGlib_PROCESS_LIBS ${JsonGlib_LIBRARY}) -libfind_process(JsonGlib) - -if(JsonGlib_FOUND) - set(JsonGlib_INCLUDE_DIRS ${JsonGlib_INCLUDE_DIR}) - set(JsonGlib_LIBRARIES ${JsonGlib_LIBRARY}) -endif(JsonGlib_FOUND) - - diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindLibsecret.cmake deepin-terminal-5.4.13/cmake/FindLibsecret.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindLibsecret.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindLibsecret.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -# - Try to find libsecret -# Once done, this will define -# -# LIBSECRET_FOUND - system has libsecret -# LIBSECRET_INCLUDE_DIRS - the libsecret include directories -# LIBSECRET_LIBRARIES - link these to use libsecret -# -# Copyright (C) 2012 Raphael Kubo da Costa -# Copyright (C) 2014 Igalia S.L. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -find_package(PkgConfig) -pkg_check_modules(LIBSECRET libsecret-1) - -set(VERSION_OK TRUE) -if (LIBSECRET_VERSION) - if (LIBSECRET_FIND_VERSION_EXACT) - if (NOT("${LIBSECRET_FIND_VERSION}" VERSION_EQUAL "${LIBSECRET_VERSION}")) - set(VERSION_OK FALSE) - endif () - else () - if ("${LIBSECRET_VERSION}" VERSION_LESS "${LIBSECRET_FIND_VERSION}") - set(VERSION_OK FALSE) - endif () - endif () -endif () - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSECRET DEFAULT_MSG LIBSECRET_INCLUDE_DIRS LIBSECRET_LIBRARIES VERSION_OK) diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindPackageHandleStandardArgs.cmake deepin-terminal-5.4.13/cmake/FindPackageHandleStandardArgs.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindPackageHandleStandardArgs.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindPackageHandleStandardArgs.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,396 +0,0 @@ -#[=======================================================================[.rst: -FindPackageHandleStandardArgs ------------------------------ - -This module provides a function intended to be used in :ref:`Find Modules` -implementing :command:`find_package()` calls. It handles the -``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``. -It also sets the ``_FOUND`` variable. The package is -considered found if all variables listed contain valid results, e.g. -valid filepaths. - -.. command:: find_package_handle_standard_args - - There are two signatures:: - - find_package_handle_standard_args( - (DEFAULT_MSG|) - ... - ) - - find_package_handle_standard_args( - [FOUND_VAR ] - [REQUIRED_VARS ...] - [VERSION_VAR ] - [HANDLE_COMPONENTS] - [CONFIG_MODE] - [FAIL_MESSAGE ] - ) - - The ``_FOUND`` variable will be set to ``TRUE`` if all - the variables ``...`` are valid and any optional - constraints are satisfied, and ``FALSE`` otherwise. A success or - failure message may be displayed based on the results and on - whether the ``REQUIRED`` and/or ``QUIET`` option was given to - the :command:`find_package` call. - - The options are: - - ``(DEFAULT_MSG|)`` - In the simple signature this specifies the failure message. - Use ``DEFAULT_MSG`` to ask for a default message to be computed - (recommended). Not valid in the full signature. - - ``FOUND_VAR `` - Obsolete. Specifies either ``_FOUND`` or - ``_FOUND`` as the result variable. This exists only - for compatibility with older versions of CMake and is now ignored. - Result variables of both names are always set for compatibility. - - ``REQUIRED_VARS ...`` - Specify the variables which are required for this package. - These may be named in the generated failure message asking the - user to set the missing variable values. Therefore these should - typically be cache entries such as ``FOO_LIBRARY`` and not output - variables like ``FOO_LIBRARIES``. - - ``VERSION_VAR `` - Specify the name of a variable that holds the version of the package - that has been found. This version will be checked against the - (potentially) specified required version given to the - :command:`find_package` call, including its ``EXACT`` option. - The default messages include information about the required - version and the version which has been actually found, both - if the version is ok or not. - - ``HANDLE_COMPONENTS`` - Enable handling of package components. In this case, the command - will report which components have been found and which are missing, - and the ``_FOUND`` variable will be set to ``FALSE`` - if any of the required components (i.e. not the ones listed after - the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are - missing. - - ``CONFIG_MODE`` - Specify that the calling find module is a wrapper around a - call to ``find_package( NO_MODULE)``. This implies - a ``VERSION_VAR`` value of ``_VERSION``. The command - will automatically check whether the package configuration file - was found. - - ``FAIL_MESSAGE `` - Specify a custom failure message instead of using the default - generated message. Not recommended. - -Example for the simple signature: - -.. code-block:: cmake - - find_package_handle_standard_args(LibXml2 DEFAULT_MSG - LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) - -The ``LibXml2`` package is considered to be found if both -``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid. -Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found -and ``REQUIRED`` was used, it fails with a -:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was -used or not. If it is found, success will be reported, including -the content of the first ````. On repeated CMake runs, -the same message will not be printed again. - -Example for the full signature: - -.. code-block:: cmake - - find_package_handle_standard_args(LibArchive - REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR - VERSION_VAR LibArchive_VERSION) - -In this case, the ``LibArchive`` package is considered to be found if -both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid. -Also the version of ``LibArchive`` will be checked by using the version -contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given, -the default messages will be printed. - -Another example for the full signature: - -.. code-block:: cmake - - find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) - find_package_handle_standard_args(Automoc4 CONFIG_MODE) - -In this case, a ``FindAutmoc4.cmake`` module wraps a call to -``find_package(Automoc4 NO_MODULE)`` and adds an additional search -directory for ``automoc4``. Then the call to -``find_package_handle_standard_args`` produces a proper success/failure -message. -#]=======================================================================] - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - -# internal helper macro -macro(_FPHSA_FAILURE_MESSAGE _msg) - if (${_NAME}_FIND_REQUIRED) - message(FATAL_ERROR "${_msg}") - else () - if (NOT ${_NAME}_FIND_QUIETLY) - message(STATUS "${_msg}") - endif () - endif () -endmacro() - - -# internal helper macro to generate the failure message when used in CONFIG_MODE: -macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) - # _CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: - if(${_NAME}_CONFIG) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") - else() - # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. - # List them all in the error message: - if(${_NAME}_CONSIDERED_CONFIGS) - set(configsText "") - list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) - math(EXPR configsCount "${configsCount} - 1") - foreach(currentConfigIndex RANGE ${configsCount}) - list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) - list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) - set(configsText "${configsText} ${filename} (version ${version})\n") - endforeach() - if (${_NAME}_NOT_FOUND_MESSAGE) - set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n") - endif() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") - - else() - # Simple case: No Config-file was found at all: - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") - endif() - endif() -endmacro() - - -function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) - -# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in -# new extended or in the "old" mode: - set(options CONFIG_MODE HANDLE_COMPONENTS) - set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR) - set(multiValueArgs REQUIRED_VARS) - set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) - list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) - - if(${INDEX} EQUAL -1) - set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) - set(FPHSA_REQUIRED_VARS ${ARGN}) - set(FPHSA_VERSION_VAR) - else() - - CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) - - if(FPHSA_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") - endif() - - if(NOT FPHSA_FAIL_MESSAGE) - set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") - endif() - endif() - -# now that we collected all arguments, process them - - if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") - set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") - endif() - - # In config-mode, we rely on the variable _CONFIG, which is set by find_package() - # when it successfully found the config-file, including version checking: - if(FPHSA_CONFIG_MODE) - list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) - list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) - set(FPHSA_VERSION_VAR ${_NAME}_VERSION) - endif() - - if(NOT FPHSA_REQUIRED_VARS) - message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") - endif() - - list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) - - string(TOUPPER ${_NAME} _NAME_UPPER) - string(TOLOWER ${_NAME} _NAME_LOWER) - - if(FPHSA_FOUND_VAR) - if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$") - set(_FOUND_VAR ${FPHSA_FOUND_VAR}) - else() - message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.") - endif() - else() - set(_FOUND_VAR ${_NAME_UPPER}_FOUND) - endif() - - # collect all variables which were not found, so they can be printed, so the - # user knows better what went wrong (#6375) - set(MISSING_VARS "") - set(DETAILS "") - # check if all passed variables are valid - set(FPHSA_FOUND_${_NAME} TRUE) - foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) - if(NOT ${_CURRENT_VAR}) - set(FPHSA_FOUND_${_NAME} FALSE) - set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") - else() - set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") - endif() - endforeach() - if(FPHSA_FOUND_${_NAME}) - set(${_NAME}_FOUND TRUE) - set(${_NAME_UPPER}_FOUND TRUE) - else() - set(${_NAME}_FOUND FALSE) - set(${_NAME_UPPER}_FOUND FALSE) - endif() - - # component handling - unset(FOUND_COMPONENTS_MSG) - unset(MISSING_COMPONENTS_MSG) - - if(FPHSA_HANDLE_COMPONENTS) - foreach(comp ${${_NAME}_FIND_COMPONENTS}) - if(${_NAME}_${comp}_FOUND) - - if(NOT DEFINED FOUND_COMPONENTS_MSG) - set(FOUND_COMPONENTS_MSG "found components: ") - endif() - set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}") - - else() - - if(NOT DEFINED MISSING_COMPONENTS_MSG) - set(MISSING_COMPONENTS_MSG "missing components: ") - endif() - set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}") - - if(${_NAME}_FIND_REQUIRED_${comp}) - set(${_NAME}_FOUND FALSE) - set(MISSING_VARS "${MISSING_VARS} ${comp}") - endif() - - endif() - endforeach() - set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") - set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]") - endif() - - # version handling: - set(VERSION_MSG "") - set(VERSION_OK TRUE) - set(VERSION ${${FPHSA_VERSION_VAR}}) - - # check with DEFINED here as the requested or found version may be "0" - if (DEFINED ${_NAME}_FIND_VERSION) - if(DEFINED ${FPHSA_VERSION_VAR}) - - if(${_NAME}_FIND_VERSION_EXACT) # exact version required - # count the dots in the version string - string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}") - # add one dot because there is one dot more than there are components - string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS) - if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT) - # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT - # is at most 4 here. Therefore a simple lookup table is used. - if (${_NAME}_FIND_VERSION_COUNT EQUAL 1) - set(_VERSION_REGEX "[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2) - set(_VERSION_REGEX "[^.]*\\.[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3) - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*") - else () - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") - endif () - string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}") - unset(_VERSION_REGEX) - if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - unset(_VERSION_HEAD) - else () - if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL VERSION) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - endif () - unset(_VERSION_DOTS) - - else() # minimum version specified: - if (${_NAME}_FIND_VERSION VERSION_GREATER VERSION) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")") - endif () - endif() - - else() - - # if the package was not found, but a version was given, add that to the output: - if(${_NAME}_FIND_VERSION_EXACT) - set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") - else() - set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") - endif() - - endif() - else () - if(VERSION) - set(VERSION_MSG "(found version \"${VERSION}\")") - endif() - endif () - - if(VERSION_OK) - set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]") - else() - set(${_NAME}_FOUND FALSE) - endif() - - - # print the result: - if (${_NAME}_FOUND) - FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") - else () - - if(FPHSA_CONFIG_MODE) - _FPHSA_HANDLE_FAILURE_CONFIG_MODE() - else() - if(NOT VERSION_OK) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - else() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - endif() - endif() - - endif () - - set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) - set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) -endfunction() diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindPackageMessage.cmake deepin-terminal-5.4.13/cmake/FindPackageMessage.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindPackageMessage.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindPackageMessage.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#.rst: -# FindPackageMessage -# ------------------ -# -# -# -# FIND_PACKAGE_MESSAGE( "message for user" "find result details") -# -# This macro is intended to be used in FindXXX.cmake modules files. It -# will print a message once for each unique find result. This is useful -# for telling the user where a package was found. The first argument -# specifies the name (XXX) of the package. The second argument -# specifies the message to display. The third argument lists details -# about the find result so that if they change the message will be -# displayed again. The macro also obeys the QUIET argument to the -# find_package command. -# -# Example: -# -# :: -# -# if(X11_FOUND) -# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" -# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") -# else() -# ... -# endif() - -#============================================================================= -# Copyright 2008-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -function(FIND_PACKAGE_MESSAGE pkg msg details) - # Avoid printing a message repeatedly for the same find result. - if(NOT ${pkg}_FIND_QUIETLY) - string(REPLACE "\n" "" details "${details}") - set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) - if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") - # The message has not yet been printed. - message(STATUS "${msg}") - - # Save the find details in the cache to avoid printing the same - # message again. - set("${DETAILS_VAR}" "${details}" - CACHE INTERNAL "Details about finding ${pkg}") - endif() - endif() -endfunction() diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindVala.cmake deepin-terminal-5.4.13/cmake/FindVala.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindVala.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindVala.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -## -# Find module for the Vala compiler (valac) -# -# This module determines whether a Vala compiler is installed on the current -# system and where its executable is. -# -# Call the module using "find_package(Vala) from within your CMakeLists.txt. -# -# The following variables will be set after an invocation: -# -# VALA_FOUND Whether the vala compiler has been found or not -# VALA_EXECUTABLE Full path to the valac executable if it has been found -# VALA_VERSION Version number of the available valac -## - - -# Search for the valac executable in the usual system paths. -find_program(VALA_EXECUTABLE - NAMES valac) - -# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call. -# Furthermore set VALA_FOUND to TRUE if Vala has been found (aka. -# VALA_EXECUTABLE is set) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Vala DEFAULT_MSG VALA_EXECUTABLE) - -mark_as_advanced(VALA_EXECUTABLE) - -# Determine the valac version -if(VALA_FOUND) - execute_process(COMMAND ${VALA_EXECUTABLE} "--version" - OUTPUT_VARIABLE "VALA_VERSION") - string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) - string(STRIP ${VALA_VERSION} "VALA_VERSION") -endif(VALA_FOUND) diff -Nru deepin-terminal-5.0.0+ds1/cmake/FindVTE.cmake deepin-terminal-5.4.13/cmake/FindVTE.cmake --- deepin-terminal-5.0.0+ds1/cmake/FindVTE.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/FindVTE.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -# Remmina - The GTK+ Remote Desktop Client -# -# Copyright (C) 2011 Marc-Andre Moreau -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, -# Boston, MA 02111-1307, USA. - -if(NOT _VTE_VERSION_NUM) - set(_VTE_LIB_NAME vte) - set(_VTE_VERSION vte) -else() - set(_VTE_LIB_NAME vte${_VTE_VERSION_NUM}) - set(_VTE_VERSION vte-${_VTE_VERSION_NUM}) -endif() - -string(REPLACE . _ _VTE_LIB_NAME ${_VTE_LIB_NAME}) - -pkg_check_modules(PC_VTE ${_VTE_VERSION}) - -find_path(VTE_INCLUDE_DIR NAMES vte/vte.h - HINTS ${PC_VTE_INCLUDEDIR} ${PC_VTE_INCLUDE_DIRS} - PATH_SUFFIXES ${_VTE_VERSION}) - -find_library(VTE_LIBRARY NAMES ${_VTE_LIB_NAME}) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(VTE DEFAULT_MSG VTE_LIBRARY VTE_INCLUDE_DIR) - -set(VTE_LIBRARIES ${VTE_LIBRARY}) -set(VTE_INCLUDE_DIRS ${VTE_INCLUDE_DIR}) - -mark_as_advanced(VTE_INCLUDE_DIR VTE_LIBRARY) - diff -Nru deepin-terminal-5.0.0+ds1/cmake/LibFindMacros.cmake deepin-terminal-5.4.13/cmake/LibFindMacros.cmake --- deepin-terminal-5.0.0+ds1/cmake/LibFindMacros.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/LibFindMacros.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -# Works the same as find_package, but forwards the "REQUIRED" argument used for -# the current package and always uses the "QUIET" flag. For this to work, the -# first parameter must be the prefix of the current package, then the prefix of -# the new package etc, which are passed to find_package. -macro (libfind_package PREFIX) - set (LIBFIND_PACKAGE_ARGS ${ARGN} QUIET) - if (${PREFIX}_FIND_REQUIRED) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) - endif (${PREFIX}_FIND_REQUIRED) - find_package(${LIBFIND_PACKAGE_ARGS}) -endmacro (libfind_package) - -# Damn CMake developers made the UsePkgConfig system deprecated in the same release (2.6) -# where they added pkg_check_modules. Consequently I need to support both in my scripts -# to avoid those deprecated warnings. Here's a helper that does just that. -# Works identically to pkg_check_modules, except that no checks are needed prior to use. -macro (libfind_pkg_check_modules PREFIX PKGNAME) - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(${PREFIX} ${PKGNAME}) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) -endmacro (libfind_pkg_check_modules) - -# Do the final processing once the paths have been detected. -# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain -# all the variables, each of which contain one include directory. -# Ditto for ${PREFIX}_PROCESS_LIBS and library files. -# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. -# Also handles errors in case library detection was required, etc. -macro (libfind_process PREFIX) - # Skip processing if already processed during this run - if (NOT ${PREFIX}_FOUND) - # Start with the assumption that the library was found - set (${PREFIX}_FOUND TRUE) - - # Process all includes and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_INCLUDES}) - if (i) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) - mark_as_advanced(${i}) - else (i) - set (${PREFIX}_FOUND FALSE) - endif (i) - endforeach (i) - - # Process all libraries and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_LIBS}) - if (i) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) - mark_as_advanced(${i}) - else (i) - set (${PREFIX}_FOUND FALSE) - endif (i) - endforeach (i) - - # Print message and/or exit on fatal error - if (${PREFIX}_FOUND) - if (NOT ${PREFIX}_FIND_QUIETLY) - message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") - endif (NOT ${PREFIX}_FIND_QUIETLY) - else (${PREFIX}_FOUND) - if (${PREFIX}_FIND_REQUIRED) - foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) - message("${i}=${${i}}") - endforeach (i) - message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") - endif (${PREFIX}_FIND_REQUIRED) - endif (${PREFIX}_FOUND) - endif (NOT ${PREFIX}_FOUND) -endmacro (libfind_process) - diff -Nru deepin-terminal-5.0.0+ds1/cmake/ParseArguments.cmake deepin-terminal-5.4.13/cmake/ParseArguments.cmake --- deepin-terminal-5.0.0+ds1/cmake/ParseArguments.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/ParseArguments.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -## -# This is a helper Macro to parse optional arguments in Macros/Functions -# It has been taken from the public CMake wiki. -# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and -# licensing. -## -macro(parse_arguments prefix arg_names option_names) - set(DEFAULT_ARGS) - foreach(arg_name ${arg_names}) - set(${prefix}_${arg_name}) - endforeach(arg_name) - foreach(option ${option_names}) - set(${prefix}_${option} FALSE) - endforeach(option) - - set(current_arg_name DEFAULT_ARGS) - set(current_arg_list) - foreach(arg ${ARGN}) - set(larg_names ${arg_names}) - list(FIND larg_names "${arg}" is_arg_name) - if(is_arg_name GREATER -1) - set(${prefix}_${current_arg_name} ${current_arg_list}) - set(current_arg_name ${arg}) - set(current_arg_list) - else(is_arg_name GREATER -1) - set(loption_names ${option_names}) - list(FIND loption_names "${arg}" is_option) - if(is_option GREATER -1) - set(${prefix}_${arg} TRUE) - else(is_option GREATER -1) - set(current_arg_list ${current_arg_list} ${arg}) - endif(is_option GREATER -1) - endif(is_arg_name GREATER -1) - endforeach(arg) - set(${prefix}_${current_arg_name} ${current_arg_list}) -endmacro(parse_arguments) diff -Nru deepin-terminal-5.0.0+ds1/cmake/ValaPrecompile.cmake deepin-terminal-5.4.13/cmake/ValaPrecompile.cmake --- deepin-terminal-5.0.0+ds1/cmake/ValaPrecompile.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/ValaPrecompile.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,180 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -include(ParseArguments) -find_package(Vala REQUIRED) - -## -# Compile vala files to their c equivalents for further processing. -# -# The "vala_precompile" macro takes care of calling the valac executable on the -# given source to produce c files which can then be processed further using -# default cmake functions. -# -# The first parameter provided is a variable, which will be filled with a list -# of c files outputted by the vala compiler. This list can than be used in -# conjunction with functions like "add_executable" or others to create the -# necessary compile rules with CMake. -# -# The initial variable is followed by a list of .vala files to be compiled. -# Please take care to add every vala file belonging to the currently compiled -# project or library as Vala will otherwise not be able to resolve all -# dependencies. -# -# The following sections may be specified afterwards to provide certain options -# to the vala compiler: -# -# PACKAGES -# A list of vala packages/libraries to be used during the compile cycle. The -# package names are exactly the same, as they would be passed to the valac -# "--pkg=" option. -# -# OPTIONS -# A list of optional options to be passed to the valac executable. This can be -# used to pass "--thread" for example to enable multi-threading support. -# -# CUSTOM_VAPIS -# A list of custom vapi files to be included for compilation. This can be -# useful to include freshly created vala libraries without having to install -# them in the system. -# -# GENERATE_VAPI -# Pass all the needed flags to the compiler to create an internal vapi for -# the compiled library. The provided name will be used for this and a -# .vapi file will be created. -# -# GENERATE_HEADER -# Let the compiler generate a header file for the compiled code. There will -# be a header file as well as an internal header file being generated called -# .h and _internal.h -# -# The following call is a simple example to the vala_precompile macro showing -# an example to every of the optional sections: -# -# vala_precompile(VALA_C -# source1.vala -# source2.vala -# source3.vala -# PACKAGES -# gtk+-2.0 -# gio-1.0 -# posix -# DIRECTORY -# gen -# OPTIONS -# --thread -# CUSTOM_VAPIS -# some_vapi.vapi -# GENERATE_VAPI -# myvapi -# GENERATE_HEADER -# myheader -# ) -# -# Most important is the variable VALA_C which will contain all the generated c -# file names after the call. -## - -macro(vala_precompile output) - parse_arguments(ARGS "PACKAGES;OPTIONS;DIRECTORY;GENERATE_HEADER;GENERATE_VAPI;CUSTOM_VAPIS" "" ${ARGN}) - if(ARGS_DIRECTORY) - set(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_DIRECTORY}) - else(ARGS_DIRECTORY) - set(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - endif(ARGS_DIRECTORY) - include_directories(${DIRECTORY}) - set(vala_pkg_opts "") - foreach(pkg ${ARGS_PACKAGES}) - list(APPEND vala_pkg_opts "--pkg=${pkg}") - endforeach(pkg ${ARGS_PACKAGES}) - set(vala_define_opts "") - foreach(def ${ARGS_DEFINITIONS}) - list(APPEND vala_define_opts "--define=${def}") - endforeach(def ${ARGS_DEFINITIONS}) - set(in_files "") - set(out_files "") - set(${output} "") - foreach(src ${ARGS_DEFAULT_ARGS}) - list(APPEND in_files "${CMAKE_CURRENT_SOURCE_DIR}/${src}") - string(REPLACE ".vala" ".c" src ${src}) - string(REPLACE ".gs" ".c" src ${src}) - set(out_file "${DIRECTORY}/${src}") - list(APPEND out_files "${DIRECTORY}/${src}") - list(APPEND ${output} ${out_file}) - endforeach(src ${ARGS_DEFAULT_ARGS}) - - set(custom_vapi_arguments "") - if(ARGS_CUSTOM_VAPIS) - foreach(vapi ${ARGS_CUSTOM_VAPIS}) - if(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - list(APPEND custom_vapi_arguments ${vapi}) - else (${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - list(APPEND custom_vapi_arguments ${CMAKE_CURRENT_SOURCE_DIR}/${vapi}) - endif(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR}) - endforeach(vapi ${ARGS_CUSTOM_VAPIS}) - endif(ARGS_CUSTOM_VAPIS) - - set(vapi_arguments "") - if(ARGS_GENERATE_VAPI) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi") - set(vapi_arguments "--internal-vapi=${ARGS_GENERATE_VAPI}.vapi") - - # Header and internal header is needed to generate internal vapi - if (NOT ARGS_GENERATE_HEADER) - set(ARGS_GENERATE_HEADER ${ARGS_GENERATE_VAPI}) - endif(NOT ARGS_GENERATE_HEADER) - endif(ARGS_GENERATE_VAPI) - - set(header_arguments "") - if(ARGS_GENERATE_HEADER) - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}.h") - list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}_internal.h") - list(APPEND header_arguments "--header=${DIRECTORY}/${ARGS_GENERATE_HEADER}.h") - list(APPEND header_arguments "--internal-header=${DIRECTORY}/${ARGS_GENERATE_HEADER}_internal.h") - endif(ARGS_GENERATE_HEADER) - - add_custom_command(OUTPUT ${out_files} - COMMAND - ${VALA_EXECUTABLE} - ARGS - "-C" - ${header_arguments} - ${vapi_arguments} - "-b" ${CMAKE_CURRENT_SOURCE_DIR} - "-d" ${DIRECTORY} - ${vala_pkg_opts} - ${vala_define_opts} - ${ARGS_OPTIONS} - ${in_files} - ${custom_vapi_arguments} - DEPENDS - ${in_files} - ${ARGS_CUSTOM_VAPIS} - ) -endmacro(vala_precompile) diff -Nru deepin-terminal-5.0.0+ds1/cmake/ValaVersion.cmake deepin-terminal-5.4.13/cmake/ValaVersion.cmake --- deepin-terminal-5.0.0+ds1/cmake/ValaVersion.cmake 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/cmake/ValaVersion.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -## -# Copyright 2009-2010 Jakob Westhoff. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of Jakob Westhoff -## - -include(ParseArguments) -find_package(Vala REQUIRED) - -## -# Ensure a certain valac version is available -# -# The initial argument is the version to check for -# -# It may be followed by a optional parameter to specify a version range. The -# following options are valid: -# -# EXACT -# Vala needs to be available in the exact version given -# -# MINIMUM -# The provided version is the minimum version. Therefore Vala needs to be -# available in the given version or any higher version -# -# MAXIMUM -# The provided version is the maximum. Therefore Vala needs to be available -# in the given version or any version older than this -# -# If no option is specified the version will be treated as a minimal version. -## -macro(ensure_vala_version version) - parse_arguments(ARGS "" "MINIMUM;MAXIMUM;EXACT" ${ARGN}) - set(compare_message "") - set(error_message "") - if(ARGS_MINIMUM) - set(compare_message "a minimum ") - set(error_message "or greater ") - elseif(ARGS_MAXIMUM) - set(compare_message "a maximum ") - set(error_message "or less ") - endif(ARGS_MINIMUM) - - message(STATUS - "checking for ${compare_message}Vala version of ${version}" - ) - - unset(version_accepted) - - # MINIMUM is the default if no option is specified - if(ARGS_EXACT) - if(${VALA_VERSION} VERSION_EQUAL ${version} ) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_EQUAL ${version}) - elseif(ARGS_MAXIMUM) - if(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - else(ARGS_MAXIMUM) - if(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - set(version_accepted TRUE) - endif(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version}) - endif(ARGS_EXACT) - - if (NOT version_accepted) - message(FATAL_ERROR - "Vala version ${version} ${error_message}is required." - ) - endif(NOT version_accepted) - - message(STATUS - " found Vala, version ${VALA_VERSION}" - ) -endmacro(ensure_vala_version) diff -Nru deepin-terminal-5.0.0+ds1/CMakeLists.txt deepin-terminal-5.4.13/CMakeLists.txt --- deepin-terminal-5.0.0+ds1/CMakeLists.txt 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/CMakeLists.txt 2021-09-01 02:11:44.000000000 +0000 @@ -1,241 +1,281 @@ -project("dterminal" C) +project(deepin-terminal) -set(target deepin-terminal) +cmake_minimum_required(VERSION 3.9.5) -cmake_minimum_required(VERSION 2.6) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) -include(ExternalProject) -include(ValaPrecompile) -include(ValaVersion) -find_package(Vala) -ensure_vala_version("0.22.0" MINIMUM) -find_package(PkgConfig) -find_package(GLib "2.48" REQUIRED) -find_package(JsonGlib) -find_package(Libsecret) -find_package(FontConfig) -find_package(X11) -find_package(Gettext) - -pkg_check_modules(GTK3 REQUIRED gtk+-3.0) -pkg_check_modules(GEE REQUIRED gee-0.8) -pkg_check_modules(GIO REQUIRED gio-unix-2.0) -pkg_check_modules(RSVG REQUIRED librsvg-2.0) -pkg_check_modules(WNCK REQUIRED libwnck-3.0) -pkg_check_modules(FONTCONFIG REQUIRED fontconfig) -pkg_check_modules(GLIB REQUIRED glib-2.0) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -option(TEST_BUILD "Build with native testing" ON) -option(USE_VENDOR_LIB "Backport support for debian stretch" ON) +include (src/DtkSettingsToolsMacros) +option(TERM_RPATH "Do you want to use compiled libraries" ON) -if (NOT USE_VENDOR_LIB) -pkg_check_modules(VTE REQUIRED vte-2.91) +if(TERM_RPATH) +set(CMAKE_SKIP_INSTALL_RPATH YES) +set(CMAKE_SKIP_RPATH YES) endif() -if (NOT DEFINED VERSION) -find_package(Git) -message("generate version from git") -execute_process(COMMAND ${GIT_EXECUTABLE} - describe --abbrev=6 --dirty --tags - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE -) -endif() -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/lib/constant.vala.in - ${CMAKE_CURRENT_SOURCE_DIR}/lib/constant.vala -) +set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 11) + +# Find includes in corresponding build directories +set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Instruct CMake to run moc automatically when needed +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(QT_MINIMUM_VERSION "5.7.1") + +if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee") +endif () + +#compile flags +if (CMAKE_BUILD_TYPE MATCHES Debug) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra") -if(TEST_BUILD) -message("set project_path to native test") -execute_process( - COMMAND sed s|@@PROJECT_PATH@@|\"${CMAKE_SOURCE_DIR}\"|g - OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/project_path.c - INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/project_path.c.in -) -list(APPEND ARGS_DEFINITIONS "TEST_BUILD") + # Enable Qt builtin debug mode + add_definitions("-DQT_MESSAGELOGCONTEXT") else() -message("set project_path to ${CMAKE_INSTALL_PREFIX}") -execute_process( - COMMAND sed s|@@PROJECT_PATH@@|\"${CMAKE_INSTALL_PREFIX}\"|g - OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/project_path.c - INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/project_path.c.in -) + # -Wl, -O2 Enable linker optimizations + # -Wl, --gc-sections + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,-O1 -Wl,--gc-sections") endif() -if (USE_VENDOR_LIB) -ExternalProject_Add(Vte-0.52 - SOURCE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/vte-0.52.1 - CONFIGURE_COMMAND ./configure --enable-static - BUILD_COMMAND make - INSTALL_COMMAND "" - BUILD_IN_SOURCE 1 - ) - -ExternalProject_Add(zssh-1.5c - SOURCE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/zssh-1.5c - CONFIGURE_COMMAND ./configure - BUILD_COMMAND make - INSTALL_COMMAND "" - BUILD_IN_SOURCE 1 - ) -endif() - -set(CFLAGS - ${GIO_CFLAGS} - ${GTK3_CFLAGS} ${GTK3_CFLAGS_OTHER} - ${GEE_CFLAGS} - ${X11_CFLAGS} ${X11_CFLAGS_OTHER} - -DWNCK_I_KNOW_THIS_IS_UNSTABLE - -DGETTEXT_PACKAGE=${target} - -s -O3 -w - # -g -) -add_compile_options(${CFLAGS}) -set(INCLUDE_PATHS - ${GIO_INCLUDE_DIRS} - ${GTK3_INCLUDE_DIRS} - ${GEE_INCLUDE_DIRS} - ${WNCK_INCLUDE_DIRS} - ${RSVG_INCLUDE_DIRS} - ${JsonGlib_INCLUDE_DIRS} - ${LIBSECRET_INCLUDE_DIRS} +#Use deepin-turbo for Performance optimization +set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wl,--as-need -fPIE") +set(CMAKE_EXE_LINKER_FLAGS "-pie") + +configure_file(src/environments.h.in environments.h @ONLY) + +# Find the QtWidgets library + +find_package(PkgConfig REQUIRED) +find_package(Qt5Core REQUIRED) +find_package(Qt5DBus REQUIRED) +find_package(Qt5Gui REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5LinguistTools REQUIRED) +find_package(Qt5Network REQUIRED) +find_package(Qt5X11Extras REQUIRED) +#find_package(DtkWidget REQUIRED) +#find_package(DtkCore REQUIRED) +#find_package(DtkGui REQUIRED) + +include(FindPkgConfig) + +pkg_search_module(DtkWidget REQUIRED dtkwidget) +pkg_search_module(DtkGui REQUIRED dtkgui) +pkg_search_module(DtkCore REQUIRED dtkcore) +pkg_search_module(GOBJECT REQUIRED gobject-2.0) +pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus) +pkg_check_modules(LIBSECRET REQUIRED libsecret-1) +pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11) + + +# Compile definitions for TerminalWidget +# So we can use QT_VERSION_CHECK +set(TERMINALWIDGET_VERSION_MAJOR "0") +set(TERMINALWIDGET_VERSION_MINOR "14") +set(TERMINALWIDGET_VERSION_PATCH "1") + +add_subdirectory(3rdparty/terminalwidget) + +include_directories(${DtkWidget_INCLUDE_DIRS}) +include_directories(${DtkGui_INCLUDE_DIRS}) +include_directories(${DtkCore_INCLUDE_DIRS}) + +include_directories("src/common") +include_directories("src/customcommand") +include_directories("src/encodeplugin") +include_directories("src/main") +include_directories("src/remotemanage") +include_directories("src/settings") +include_directories("src/views") +include_directories("3rdparty/terminalwidget/lib") + +set(LINK_LIBS + Qt5::Core + Qt5::DBus + Qt5::Widgets + Qt5::WidgetsPrivate + Qt5::Network + + ${DtkWidget_LIBRARIES} + ${DtkCore_LIBRARIES} + ${DtkGUI_LIBRARIES} + ${DFrameworkDBus_LIBRARIES} + ${GOBJECT_LIBRARIES} + ${LIBSECRET_LIBRARIES} + ${XCB_EWMH_LIBRARIES} + ${Qt5X11Extras_LIBRARIES} ) -if (USE_VENDOR_LIB) - list(APPEND INCLUDE_PATHS ${CMAKE_SOURCE_DIR}/3rdparty/vte-0.52.1/src) - find_library(VTE_LIB NAMES libvte-2.91.a tcmalloc_minimal) -else() - list(APPEND INCLUDE_PATHS ${VTE_INCLUDE_DIRS}) -endif() - -include_directories(${INCLUDE_PATHS}) -set(LIBS - ${GIO_LIBRARIES} - ${GTK3_LIBRARIES} - ${GEE_LIBRARIES} - ${WNCK_LIBRARIES} - ${RSVG_LIBRARIES} - ${JsonGlib_LIBRARIES} - ${LIBSECRET_LIBRARIES} - ${ZLIB_LIBRARIES} - ${X11_LIBRARIES} - ${XTST_LIBRARIES} - ${FONTCONFIG_LIBRARY} - ${M_LIBRARIES} - stdc++ - m - z - pthread - gnutls - pcre2-8 +# Populate a CMake variable with the sources +# TODO: portable headers? +set (DTNG_CPP_FILES + src/common/utils.cpp + src/common/settingio.cpp + src/customcommand/customcommandoptdlg.cpp + src/customcommand/customcommandpanel.cpp + src/customcommand/customcommandplugin.cpp + src/customcommand/customcommandsearchrstpanel.cpp + src/customcommand/customcommandtoppanel.cpp + src/encodeplugin/encodepanelplugin.cpp + src/encodeplugin/encodepanel.cpp + src/encodeplugin/encodelistview.cpp + src/encodeplugin/encodelistmodel.cpp + src/main/main.cpp + src/main/service.cpp + src/main/windowsmanager.cpp + src/main/mainwindow.cpp + src/main/terminalapplication.cpp + src/main/termproperties.cpp + src/main/dbusmanager.cpp + src/remotemanage/remotemanagementpanel.cpp + src/remotemanage/remotemanagementplugn.cpp + src/remotemanage/remotemanagementsearchpanel.cpp + src/remotemanage/remotemanagementtoppanel.cpp + src/remotemanage/serverconfiggrouppanel.cpp + src/remotemanage/serverconfigmanager.cpp + src/remotemanage/serverconfigoptdlg.cpp + src/settings/newdspinbox.cpp + src/settings/settings.cpp + src/settings/settings_translation.cpp + src/settings/shortcutmanager.cpp + src/views/commonpanel.cpp + src/views/pagesearchbar.cpp + src/views/rightpanel.cpp + src/views/tabbar.cpp + src/views/tabrenamedlg.cpp + src/views/tabrenamewidget.cpp + src/views/termwidget.cpp + src/views/termwidgetpage.cpp + src/views/termbasedialog.cpp + src/views/termcommandlinkbutton.cpp + src/views/titlebar.cpp + src/views/itemwidget.cpp + src/views/focusframe.cpp + src/views/iconbutton.cpp + src/views/listview.cpp + src/views/customthemesettingdialog.cpp + src/views/themepreviewarea.cpp ) -if (NOT USE_VENDOR_LIB) - list(APPEND LIBS ${VTE_LIBRARIES}) -endif() +set (DTNG_HEADER_FILES + src/common/define.h + src/common/utils.h + src/common/settingio.h + src/customcommand/customcommandoptdlg.h + src/customcommand/customcommandpanel.h + src/customcommand/customcommandplugin.h + src/customcommand/customcommandsearchrstpanel.h + src/customcommand/customcommandtoppanel.h + src/encodeplugin/encodepanelplugin.h + src/encodeplugin/encodepanel.h + src/encodeplugin/encodelistview.h + src/encodeplugin/encodelistmodel.h + src/main/windowsmanager.h + src/main/mainwindow.h + src/main/mainwindowplugininterface.h + src/main/service.h + src/main/terminalapplication.h + src/main/termproperties.h + src/main/dbusmanager.h + src/remotemanage/remotemanagementpanel.h + src/remotemanage/remotemanagementplugn.h + src/remotemanage/remotemanagementsearchpanel.h + src/remotemanage/remotemanagementtoppanel.h + src/remotemanage/serverconfiggrouppanel.h + src/remotemanage/serverconfigmanager.h + src/remotemanage/serverconfigoptdlg.h + src/settings/newdspinbox.h + src/settings/settings.h + src/settings/shortcutmanager.h + src/views/commonpanel.h + src/views/pagesearchbar.h + src/views/rightpanel.h + src/views/tabbar.h + src/views/tabrenamedlg.h + src/views/tabrenamewidget.h + src/views/termwidget.h + src/views/termwidgetpage.h + src/views/titlebar.h + src/views/termbasedialog.h + src/views/termcommandlinkbutton.h + src/views/itemwidget.h + src/views/focusframe.h + src/views/iconbutton.h + src/views/listview.h + src/views/customthemesettingdialog.h + src/views/themepreviewarea.h +) -SET(APP_SOURCES, "") -FILE(GLOB valalist LIST_FILES true */*.vala) -FOREACH(child ${valalist}) - file(RELATIVE_PATH - file_path - ${CMAKE_SOURCE_DIR} - ${child} - ) - set (APP_SOURCES ${APP_SOURCES} ${file_path}) -ENDFOREACH() - -set(VALA_PRECOMPILE_PACKAGES - xcb - gtk+-3.0 - vte-2.91 - gee-0.8 - json-glib-1.0 - gio-2.0 - libwnck-3.0 - posix - libsecret-1 - gdk-x11-3.0 - glib-2.0 - librsvg-2.0 +set (DTNG_QRC_FILES + src/assets/resources.qrc ) -if (USE_VENDOR_LIB) - list(APPEND VALA_PRECOMPILE_PACKAGES fontconfig) +# Program +set (EXE_NAME deepin-terminal) - vala_precompile(VALA_C - ./main.vala - ${APP_SOURCES} - - OPTIONS - --vapidir=${CMAKE_SOURCE_DIR}/vapi - - PACKAGES - ${VALA_PRECOMPILE_PACKAGES} - ) -else() - vala_precompile(VALA_C - ./main.vala - ${APP_SOURCES} - - PACKAGES - ${VALA_PRECOMPILE_PACKAGES} - ) -endif() +# Translation +file (GLOB DTNG_TS_FILES translations/*.ts) +set (DTNG_CPP_FILES_FOR_I18N ${DTNG_CPP_FILES}) + +dtk_create_i18n_from_json(DTNG_SETTINGS_I18N_FILES default-config.json settings_translation.cpp) +list (APPEND DTNG_CPP_FILES_FOR_I18N ${DTNG_SETTINGS_I18N_FILES}) +qt5_create_translation(DTNG_QM_FILES ${DTNG_CPP_FILES_FOR_I18N} ${DTNG_TS_FILES}) + +add_executable (${EXE_NAME} + ${DTNG_HEADER_FILES} + ${DTNG_CPP_FILES} + ${DTNG_QRC_FILES} + ${DTNG_QM_FILES} +) -add_executable(${target} ${VALA_C} ${CMAKE_SOURCE_DIR}/project_path.c ${CMAKE_SOURCE_DIR}/lib/font.c) +target_include_directories(${EXE_NAME} PUBLIC ${Qt5Widgets_LIBRARIES} + ${Qt5DBus_LIBRARIES} + ${Qt5Widgets_PRIVATE_INCLUDE_DIRS} + ${Qt5Core_PRIVATE_INCLUDE_DIRS} + ${Qt5Gui_PRIVATE_INCLUDE_DIRS} + ${PROJECT_BINARY_DIR} + ${DtkWidget_INCLUDE_DIRS} + ${DtkCore_LIBRARIES} + ${DtkGUI_INCLUDE_DIRS} + ${DFrameworkDBus_INCLUDE_DIRS} + ${ATSPI2_INCLUDE_DIRS} + ${GOBJECT_INCLUDE_DIRS} + ${LIBSECRET_INCLUDE_DIRS} + ${XCB_EWMH_INCLUDE_DIRS}) + +target_link_libraries (deepin-terminal ${LINK_LIBS} terminalwidget5) + +# Install settings + +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX /usr) +endif () + +# Installation + +#install(TARGETS deepin-terminal DESTINATION ${CMAKE_INSTALL_PREFIX}/share/deepin-terminal) + +install(FILES src/deepin-terminal.desktop + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/) + +install(FILES src/assets/logo/deepin-terminal.svg + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/deepin-terminal + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + PERMISSIONS OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) -if (USE_VENDOR_LIB) - target_link_libraries(${target} ${LIBS} ${CMAKE_SOURCE_DIR}/3rdparty/vte-0.52.1/src/.libs/libvte-2.91.a) - add_dependencies(${target} Vte-0.52) -else() - target_link_libraries(${target} ${LIBS}) -endif() +install(FILES ${DTNG_QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/deepin-terminal/translations) -FILE(GLOB children LIST_DIRECTORIES true po/*) -SET(dirlist "") +install(DIRECTORY src/assets/deepin-terminal + DESTINATION /usr/share/deepin-manual/manual-assets/application/) -FOREACH(child ${children}) - IF(IS_DIRECTORY ${child}) - get_filename_component(childdir ${child} NAME) - LIST(APPEND dirlist ${childdir}) - ENDIF() -ENDFOREACH() - -FOREACH(lang ${dirlist}) - SET(gmoFiles) - FOREACH(current_PO_FILE po/${lang}/LC_MESSAGES/deepin-terminal.po) - SET(gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}-${target}.gmo) - SET(INSTALL_DESTINATION share/locale/) - ADD_CUSTOM_COMMAND(OUTPUT ${gmoFile} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${gmoFile} ${current_PO_FILE} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - DEPENDS ${current_PO_FILE} - ) - INSTALL(FILES ${gmoFile} DESTINATION ${INSTALL_DESTINATION}/${lang}/LC_MESSAGES/ RENAME ${target}.mo) - - LIST(APPEND gmoFiles ${gmoFile}) - ENDFOREACH(current_PO_FILE) - - ADD_CUSTOM_TARGET(${lang} ALL DEPENDS ${gmoFiles}) - -ENDFOREACH(lang) - -INSTALL (TARGETS ${target} DESTINATION bin) -if (USE_VENDOR_LIB) - INSTALL (PROGRAMS ${CMAKE_SOURCE_DIR}/3rdparty/ssh_login.sh ${CMAKE_SOURCE_DIR}/3rdparty/zssh-1.5c/zssh DESTINATION lib/${target}) -else() - INSTALL (PROGRAMS ssh_login.sh DESTINATION lib/${target}) -endif() -INSTALL (FILES hicolor/32x32/${target}.png DESTINATION share/icons/hicolor/32x32/apps) -INSTALL (FILES hicolor/48x48/${target}.png DESTINATION share/icons/hicolor/48x48/apps) -INSTALL (FILES hicolor/96x96/${target}.png DESTINATION share/icons/hicolor/96x96/apps) -INSTALL (FILES hicolor/128x128/${target}.png DESTINATION share/icons/hicolor/128x128/apps) -INSTALL (FILES hicolor/${target}.svg DESTINATION share/icons/hicolor/scalable/apps) -INSTALL (DIRECTORY image DESTINATION share/${target} FILES_MATCHING PATTERN "*.png") -INSTALL (DIRECTORY image DESTINATION share/${target} FILES_MATCHING PATTERN "*.svg") -INSTALL (DIRECTORY theme DESTINATION share/${target} FILES_MATCHING PATTERN "*") -INSTALL (FILES style.css DESTINATION share/${target}) -INSTALL (FILES ${target}.desktop DESTINATION share/applications) +# Unit Test +add_subdirectory(tests) diff -Nru deepin-terminal-5.0.0+ds1/debian/changelog deepin-terminal-5.4.13/debian/changelog --- deepin-terminal-5.0.0+ds1/debian/changelog 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/changelog 2021-10-09 04:57:05.000000000 +0000 @@ -1,11 +1,27 @@ -deepin-terminal (5.0.0+ds1-3) unstable; urgency=medium +deepin-terminal (5.4.13-ubuntu1) impish; urgency=medium - * debian/patches: - + Add 0004-basic-wayland-support patch file. (Closes: #987933, #894323) + * New upstream release for impish. + + -- Ananta Mishra Sat, 09 Oct 2021 10:42:05 +0545 + +deepin-terminal (5.2.11-1~exp1) experimental; urgency=medium + + * New upstream version 5.2.11. * debian/control: - + Add Arun Kumar Pariyar to uploaders list. + + Bump debhelper compat to v13. + + Cleanup un-used the build-depends. + + Remove deepin-menu from package dependency. + * debian/patches: + + Remove 0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch + + Remove 0003-utils-adjust-to-change-in-vte3-0.59.0.patch + + Add 0002-fix-desktop-entry-invalid-category-for-DDE.patch + + Add 0003-remove-definitions-DQT_NO_CAST_FROM_ASCII-DQT_NO_CAS.patch + * debian/postrm + + Add sript to remove user configuration for deepin-terminal. + * debian/rules: + + Remove valaflags. - -- Arun Kumar Pariyar Mon, 03 May 2021 00:46:19 +0545 + -- Arun Kumar Pariyar Tue, 14 Jul 2020 23:59:49 +0545 deepin-terminal (5.0.0+ds1-2) unstable; urgency=high diff -Nru deepin-terminal-5.0.0+ds1/debian/control deepin-terminal-5.4.13/debian/control --- deepin-terminal-5.0.0+ds1/debian/control 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/control 2021-10-09 04:57:05.000000000 +0000 @@ -1,37 +1,32 @@ Source: deepin-terminal Section: x11 Priority: optional -Maintainer: Debian Deepin Packaging Team +Maintainer: Ananta Mishra +XSBC-Original-Maintainer: Debian Deepin Packaging Team Uploaders: Yangfl , Yanhao Mo , Boyuan Yang , Arun Kumar Pariyar , Build-Depends: + chrpath, cmake, - debhelper-compat (= 12), - gettext, - gnome-pkg-tools (>= 0.10), - gobject-introspection (>= 0.9.12-4~), - gperf, - gtk-doc-tools, - intltool (>= 0.35), - libgee-0.8-dev, - libgirepository1.0-dev (>= 0.9.12), - libgladeui-dev, - libglib2.0-dev (>= 2.40.0), - libgnutls28-dev (>= 3.2.7), - libgtk-3-dev (>= 3.20), - libjson-glib-dev, - libpango1.0-dev (>= 1.22.0), - libpcre2-dev (>= 10.21), - libreadline-dev, - librsvg2-dev, + debhelper-compat (= 13), + libatspi2.0-dev, + libdframeworkdbus-dev, + libdtkwidget-dev, + libgmock-dev, + libglib2.0-dev, libsecret-1-dev, - libvte-2.91-dev, - libwnck-3-dev, - libxml2-utils, - valac, + libutf8proc-dev, + libxcb-ewmh-dev, + lxqt-build-tools (>= 0.6.0~), + pkg-config, + libgtest-dev, + qt5-qmake, + qtbase5-dev, + qtbase5-private-dev, + qttools5-dev-tools, Rules-Requires-Root: no Standards-Version: 4.5.0 Homepage: https://github.com/linuxdeepin/deepin-terminal @@ -43,10 +38,7 @@ Provides: x-terminal-emulator, Depends: - dbus-x11, - deepin-menu, expect, - lrzsz, zssh, ${misc:Depends}, ${shlibs:Depends}, diff -Nru deepin-terminal-5.0.0+ds1/debian/copyright deepin-terminal-5.4.13/debian/copyright --- deepin-terminal-5.0.0+ds1/debian/copyright 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/copyright 2021-10-09 04:56:09.000000000 +0000 @@ -1,52 +1,72 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: deepin-terminal Source: https://github.com/linuxdeepin/deepin-terminal -Files-Excluded: 3rdparty vapi/* +Upstream-Contact: https://github.com/linuxdeepin/deepin-terminal/issues Files: * Copyright: 2016-2019 Deepin Technology Co., Ltd. 2011-2017 Wang Yong License: GPL-3+ -Files: cmake/CMakeParseArguments.cmake - cmake/FindGettext.cmake - cmake/FindPackageHandleStandardArgs.cmake - cmake/FindPackageMessage.cmake -Copyright: 2007-2009 Kitware, Inc. - 2007-2010 Alexander Neundorf +Files: DtkSettingsToolsMacros.cmake +Copyright: 2019 Gary Wang License: BSD-3-Clause -Files: cmake/FindGLib.cmake -Copyright: 2016 Evan Nemerson -License: Expat - -Files: cmake/FindLibsecret.cmake -Copyright: 2012 Raphael Kubo da Costa - 2014 Igalia S.L. -License: BSD-2-Clause - -Files: cmake/FindVala.cmake -Copyright: 2009-2010 Jakob Westhoff. -License: BSD-2-Clause - -Files: cmake/FindVTE.cmake -Copyright: 2011 Marc-Andre Moreau +Files: 3rdparty/terminalwidget/example/main.cpp + 3rdparty/terminalwidget/lib/TerminalCharacterDecoder.* + 3rdparty/terminalwidget/lib/kprocess.* + 3rdparty/terminalwidget/lib/kpty* + 3rdparty/terminalwidget/lib/qtermwidget.* + 3rdparty/terminalwidget/lib/TerminalCharacterDecoder +Copyright: Adriaan de Groot + 2010, KDE e.V + 2002-2007, Oswald Buddenhagen + 2006-2008, Robert Knight + 2002, Waldo Bastian + 2008, e_k + 1997,1998 by Lars Doelle +License: LGPL-2+ + +Files: 3rdparty/terminalwidget/lib/BlockArray.* + 3rdparty/terminalwidget/lib/Character* + 3rdparty/terminalwidget/lib/ColorScheme.* + 3rdparty/terminalwidget/lib/Emulation.* + 3rdparty/terminalwidget/lib/Filter.* + 3rdparty/terminalwidget/lib/History.* + 3rdparty/terminalwidget/lib/HistorySearch.* + 3rdparty/terminalwidget/lib/KeyboardTranslator.* + 3rdparty/terminalwidget/lib/ProcessInfo.* + 3rdparty/terminalwidget/lib/Pty.* + 3rdparty/terminalwidget/lib/Screen* + 3rdparty/terminalwidget/lib/SessionManager.* + 3rdparty/terminalwidget/lib/ShellCommand.* + 3rdparty/terminalwidget/lib/TerminalDisplay.* + 3rdparty/terminalwidget/lib/Vt102Emulation.* +Copyright: 2007-2008 by Robert Knight + 1997,1998 by Lars Doelle + 1996 by Matthias Ettrich + 2013 Christian Surlykke + Maxim Bourmistrov + 2008 e_k License: GPL-2+ -Files: cmake/ValaPrecompile.cmake - cmake/ValaVersion.cmake -Copyright: 2009-2010 Jakob Westhoff -License: BSD-2-Clause - -Files: lib/animation.vala -Copyright: 2011-2012 Canonical Ltd -License: GPL-3 +Files: 3rdparty/terminalwidget/pyqt/cmake/* +Copyright: 2012, Luca Beltrame + 2012, Rolf Eike Beer + 2007-2014, Simon Edwards +License: BSD-3-clause + +Files: 3rdparty/terminalwidget/cmake/FindUtf8Proc.cmake +Copyright: 2009-2011, Kitware, Inc + 2009-2011, Philip Lowman +License: BSD-3-clause Files: debian/* Copyright: 2016 Deepin Packages Builder 2018 Yangfl 2018 Yanhao Mo -License: GPL-2+ + 2020 Arun Kumar Pariyar +License: GPL-2+ and Expat License: GPL-2+ This program is free software: you can redistribute it and/or modify @@ -65,21 +85,23 @@ On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". -License: GPL-3 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 3. +License: LGPL-2+ + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. . - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . - On Debian systems, the complete text of the GNU General - Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + On Debian systems, the complete text of the GNU Lesser General + Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. License: GPL-3+ This program is free software: you can redistribute it and/or modify @@ -98,28 +120,6 @@ On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". -License: BSD-2-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - License: BSD-3-Clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff -Nru deepin-terminal-5.0.0+ds1/debian/deepin-terminal.postrm deepin-terminal-5.4.13/debian/deepin-terminal.postrm --- deepin-terminal-5.0.0+ds1/debian/deepin-terminal.postrm 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/debian/deepin-terminal.postrm 2021-10-09 04:56:09.000000000 +0000 @@ -0,0 +1,9 @@ +#! /bin/sh +set -e +userName=$(who) +if [ $1 = 'purge' ] +then + rm -rf /home/${userName%% *}/.config/deepin/deepin-terminal/* +fi + +#DEBHELPER# diff -Nru deepin-terminal-5.0.0+ds1/debian/lintian-overrides deepin-terminal-5.4.13/debian/lintian-overrides --- deepin-terminal-5.0.0+ds1/debian/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/debian/lintian-overrides 2021-10-09 04:56:09.000000000 +0000 @@ -0,0 +1,2 @@ +deepin-terminal: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libterminalwidget5.so.0.14.1 usr/lib/x86_64-linux-gnu/libterminalwidget5.so +deepin-terminal: package-name-doesnt-match-sonames libterminalwidget5-0 diff -Nru deepin-terminal-5.0.0+ds1/debian/missing-sources/Copyright.txt deepin-terminal-5.4.13/debian/missing-sources/Copyright.txt --- deepin-terminal-5.0.0+ds1/debian/missing-sources/Copyright.txt 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/missing-sources/Copyright.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -CMake - Cross Platform Makefile Generator -Copyright 2000-2018 Kitware, Inc. and Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name of Kitware, Inc. nor the names of Contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------- - -The following individuals and institutions are among the Contributors: - -* Aaron C. Meadows -* Adriaan de Groot -* Aleksey Avdeev -* Alexander Neundorf -* Alexander Smorkalov -* Alexey Sokolov -* Alex Turbov -* Andreas Pakulat -* Andreas Schneider -* André Rigland Brodtkorb -* Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf -* Benjamin Eikel -* Bjoern Ricks -* Brad Hards -* Christopher Harvey -* Christoph Grüninger -* Clement Creusot -* Daniel Blezek -* Daniel Pfeifer -* Enrico Scholz -* Eran Ifrah -* Esben Mose Hansen, Ange Optimization ApS -* Geoffrey Viola -* Google Inc -* Gregor Jasny -* Helio Chissini de Castro -* Ilya Lavrenov -* Insight Software Consortium -* Jan Woetzel -* Kelly Thompson -* Konstantin Podsvirov -* Mario Bensi -* Mathieu Malaterre -* Matthaeus G. Chajdas -* Matthias Kretz -* Matthias Maennich -* Michael Stürmer -* Miguel A. Figueroa-Villanueva -* Mike Jackson -* Mike McQuaid -* Nicolas Bock -* Nicolas Despres -* Nikita Krupen'ko -* NVIDIA Corporation -* OpenGamma Ltd. -* Per Øyvind Karlsen -* Peter Collingbourne -* Petr Gotthard -* Philip Lowman -* Philippe Proulx -* Raffi Enficiaud, Max Planck Society -* Raumfeld -* Roger Leigh -* Rolf Eike Beer -* Roman Donchenko -* Roman Kharitonov -* Ruslan Baratov -* Sebastian Holtermann -* Stephen Kelly -* Sylvain Joubert -* Thomas Sondergaard -* Tobias Hunger -* Todd Gamblin -* Tristan Carel -* University of Dundee -* Vadim Zhukov -* Will Dicharry - -See version control history for details of individual contributions. - -The above copyright and license notice applies to distributions of -CMake in source and binary form. Third-party software packages supplied -with CMake under compatible licenses provide their own copyright notices -documented in corresponding subdirectories or source files. - ------------------------------------------------------------------------------- - -CMake was initially developed by Kitware with the following sponsorship: - - * National Library of Medicine at the National Institutes of Health - as part of the Insight Segmentation and Registration Toolkit (ITK). - - * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel - Visualization Initiative. - - * National Alliance for Medical Image Computing (NAMIC) is funded by the - National Institutes of Health through the NIH Roadmap for Medical Research, - Grant U54 EB005149. - - * Kitware, Inc. diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/0001-get-rid-of-lintian-warning-desktop-entry-invalid-cat.patch deepin-terminal-5.4.13/debian/patches/0001-get-rid-of-lintian-warning-desktop-entry-invalid-cat.patch --- deepin-terminal-5.0.0+ds1/debian/patches/0001-get-rid-of-lintian-warning-desktop-entry-invalid-cat.patch 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/0001-get-rid-of-lintian-warning-desktop-entry-invalid-cat.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -From: Yanhao Mo -Date: Tue, 26 Feb 2019 14:05:28 +0800 -Subject: get rid of lintian warning desktop-entry-invalid-category - ---- - deepin-terminal.desktop | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deepin-terminal.desktop b/deepin-terminal.desktop -index b24d632..8968e83 100644 ---- a/deepin-terminal.desktop -+++ b/deepin-terminal.desktop -@@ -1,5 +1,5 @@ - [Desktop Entry] --Categories=GNOME;GTK;DDE;Utility;System;TerminalEmulator; -+Categories=GNOME;GTK;Utility;System;TerminalEmulator; - Comment=Use the command line - Exec=deepin-terminal - GenericName=Terminal diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/0002-fix-desktop-entry-invalid-category-for-DDE.patch deepin-terminal-5.4.13/debian/patches/0002-fix-desktop-entry-invalid-category-for-DDE.patch --- deepin-terminal-5.0.0+ds1/debian/patches/0002-fix-desktop-entry-invalid-category-for-DDE.patch 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/0002-fix-desktop-entry-invalid-category-for-DDE.patch 2021-10-09 04:57:05.000000000 +0000 @@ -0,0 +1,19 @@ +From: Arun Kumar Pariyar +Date: Thu, 9 Jul 2020 00:06:08 +0545 +Subject: [PATCH] fix desktop-entry-invalid-category for DDE + +--- + src/deepin-terminal.desktop | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: deepin-terminal/src/deepin-terminal.desktop +=================================================================== +--- deepin-terminal.orig/src/deepin-terminal.desktop ++++ deepin-terminal/src/deepin-terminal.desktop +@@ -1,5 +1,5 @@ + [Desktop Entry] +-Categories=DDE;Utility;System;TerminalEmulator; ++Categories=X-DDE;Utility;System;TerminalEmulator; + Comment=Use the command line + Exec=deepin-terminal + GenericName=Terminal diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch deepin-terminal-5.4.13/debian/patches/0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch --- deepin-terminal-5.0.0+ds1/debian/patches/0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -From: Đoàn Trần Công Danh -Date: Sat, 4 Apr 2020 10:23:18 +0700 -Subject: vala: libify raw_data conversion for Terminal::feed_child - -In a later patch, we will add a conditional build for API change -from VTE 0.60. - -Forwarded: https://github.com/linuxdeepin/deepin-terminal/pull/221 -Bug-Debian: https://bugs.debian.org/954581 ---- - lib/utils.vala | 4 ++++ - widget/command_panel.vala | 2 +- - widget/terminal.vala | 20 ++++++++++---------- - widget/workspace.vala | 2 +- - 4 files changed, 16 insertions(+), 12 deletions(-) - -diff --git a/lib/utils.vala b/lib/utils.vala -index 11c782e..96d7970 100644 ---- a/lib/utils.vala -+++ b/lib/utils.vala -@@ -556,4 +556,8 @@ namespace Utils { - - return command; - } -+ -+ public char[] to_raw_data(string str) { -+ return str.to_utf8(); -+ } - } -diff --git a/widget/command_panel.vala b/widget/command_panel.vala -index 5bbcf5d..f1380fa 100644 ---- a/widget/command_panel.vala -+++ b/widget/command_panel.vala -@@ -299,7 +299,7 @@ namespace Widgets { - public void execute_command(string command) { - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - var command_string = "%s\n".printf(command); -- focus_term.term.feed_child(command_string.to_utf8()); -+ focus_term.term.feed_child(Utils.to_raw_data(command_string)); - - workspace.hide_command_panel(); - if (focus_widget != null) { -diff --git a/widget/terminal.vala b/widget/terminal.vala -index 0b5f024..339e296 100644 ---- a/widget/terminal.vala -+++ b/widget/terminal.vala -@@ -605,7 +605,7 @@ namespace Widgets { - } - upload_command = upload_command + "\n"; - -- this.term.feed_child(upload_command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(upload_command)); - - return false; - }); -@@ -633,7 +633,7 @@ namespace Widgets { - GLib.Timeout.add(100, () => { - // NOTE: Use quote around $file to avoid escape filepath. - string command = "read -e -a files -p \"%s: \"; sz \"${files[@]}\"\n".printf(_("Type path to download file")); -- this.term.feed_child(command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(command)); - - enter_sz_command = true; - -@@ -678,17 +678,17 @@ namespace Widgets { - GLib.Timeout.add(100, () => { - // Switch directory in zssh. - string switch_command = "cd %s\n".printf(save_file_directory); -- this.term.feed_child(switch_command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(switch_command)); - - // Do rz command to download file. - GLib.Timeout.add(100, () => { - string download_command = "rz\n"; -- this.term.feed_child(download_command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(download_command)); - - // Press enter automatically. - GLib.Timeout.add(100, () => { - string enter_command = "\n"; -- this.term.feed_child(enter_command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(enter_command)); - - return false; - }); -@@ -973,7 +973,7 @@ namespace Widgets { - foreach (unowned string option in command_config_file.get_groups ()) { - if (keyname == command_config_file.get_value(option, "Shortcut")) { - var command_string = "%s\n".printf(command_config_file.get_value(option, "Command")); -- term.feed_child(command_string.to_utf8()); -+ term.feed_child(Utils.to_raw_data(command_string)); - - return true; - } -@@ -1084,7 +1084,7 @@ namespace Widgets { - } - upload_command = upload_command + "\n"; - -- this.term.feed_child(upload_command.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(upload_command)); - - return false; - }); -@@ -1099,7 +1099,7 @@ namespace Widgets { - } - - string uris_s = string.joinv("", uris); -- this.term.feed_child(uris_s.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(uris_s)); - } - - break; -@@ -1108,7 +1108,7 @@ namespace Widgets { - var data = selection_data.get_text (); - - if (data != null) { -- this.term.feed_child(data.to_utf8()); -+ this.term.feed_child(Utils.to_raw_data(data)); - } - - break; -@@ -1581,7 +1581,7 @@ namespace Widgets { - if (term != null) { - string login_command = "expect -f " + tmpfile.get_path() + "\n"; - expect_file_path = tmpfile.get_path(); -- term.feed_child(login_command.to_utf8()); -+ term.feed_child(Utils.to_raw_data(login_command)); - } - } catch (Error e) { - stderr.printf("login_server: %s\n", e.message); -diff --git a/widget/workspace.vala b/widget/workspace.vala -index 6a8784b..83b45e3 100644 ---- a/widget/workspace.vala -+++ b/widget/workspace.vala -@@ -141,7 +141,7 @@ namespace Widgets { - if (term_dir.length > 0) { - Term new_focus_term = get_focus_term(this); - string switch_command = "cd %s\n".printf(term_dir); -- new_focus_term.term.feed_child(switch_command.to_utf8()); -+ new_focus_term.term.feed_child(Utils.to_raw_data(switch_command)); - } - - return false; diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/0003-utils-adjust-to-change-in-vte3-0.59.0.patch deepin-terminal-5.4.13/debian/patches/0003-utils-adjust-to-change-in-vte3-0.59.0.patch --- deepin-terminal-5.0.0+ds1/debian/patches/0003-utils-adjust-to-change-in-vte3-0.59.0.patch 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/0003-utils-adjust-to-change-in-vte3-0.59.0.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -From: Đoàn Trần Công Danh -Date: Sat, 4 Apr 2020 10:53:14 +0700 -Subject: utils: adjust to change in vte3>0.59.0 - -vte3 has changed the parameter to Terminal::feed_child from char[] -to uint8[] - -Forwarded: https://github.com/linuxdeepin/deepin-terminal/pull/221 -Bug-Debian: https://bugs.debian.org/954581 ---- - CMakeLists.txt | 4 ++++ - lib/utils.vala | 6 ++++++ - 2 files changed, 10 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e93e38d..8b45393 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -30,6 +30,10 @@ option(USE_VENDOR_LIB "Backport support for debian stretch" ON) - - if (NOT USE_VENDOR_LIB) - pkg_check_modules(VTE REQUIRED vte-2.91) -+# There're 3 releases for 0.59.x, only 0.59.0 keeps old behaviour -+if("${VTE_VERSION}" VERSION_GREATER "0.59.0") -+ list(APPEND ARGS_DEFINITIONS "VTE_0_60") -+endif() - endif() - - if (NOT DEFINED VERSION) -diff --git a/lib/utils.vala b/lib/utils.vala -index 96d7970..b4558a3 100644 ---- a/lib/utils.vala -+++ b/lib/utils.vala -@@ -557,7 +557,13 @@ namespace Utils { - return command; - } - -+#if VTE_0_60 -+ public uint8[] to_raw_data(string str) { -+ return str.data; -+ } -+#else - public char[] to_raw_data(string str) { - return str.to_utf8(); - } -+#endif - } diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/0004-basic-wayland-support.patch deepin-terminal-5.4.13/debian/patches/0004-basic-wayland-support.patch --- deepin-terminal-5.0.0+ds1/debian/patches/0004-basic-wayland-support.patch 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/0004-basic-wayland-support.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,376 +0,0 @@ -From: Gary Wang -Date: Sun, 12 Jan 2020 21:30:47 +0800 -Subject: [PATCH] feat: basic wayland support -Origin: upstream, https://github.com/linuxdeepin/deepin-terminal-gtk/commit/4797cc462a803726a0001ecc2e8e5b7d10d013cd -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987933 -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894323 - ---- - lib/utils.vala | 55 ++++++++++++++--- - lib/xutils.vala | 113 ---------------------------------- - widget/quake_window.vala | 11 +--- - widget/window.vala | 16 ++--- - widget/window_event_area.vala | 32 +++++----- - 5 files changed, 75 insertions(+), 152 deletions(-) - delete mode 100644 lib/xutils.vala - -diff --git a/lib/utils.vala b/lib/utils.vala -index bd1b2ec5..07e3f399 100644 ---- a/lib/utils.vala -+++ b/lib/utils.vala -@@ -3,8 +3,10 @@ - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong -+ * 2019 ~ 2020 Gary Wang - * - * Author: Wang Yong -+ * Gary Wang - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify -@@ -186,18 +188,53 @@ namespace Utils { - return alloc; - } - -- public bool move_window(Gtk.Widget widget, Gdk.EventButton event, Gtk.Window window) { -- if (is_left_button(event)) { -- window.begin_move_drag( -- (int)event.button, -- (int)event.x_root, -- (int)event.y_root, -- event.time); -+ public bool move_window(Gtk.Widget widget, Gdk.EventButton event) { -+ if (is_primary_button(event)) { -+ widget.get_toplevel().get_window().begin_move_drag( -+ (int) event.button, -+ (int) event.x_root, -+ (int) event.y_root, -+ event.time -+ ); - } - - return false; - } - -+ public bool resize_window(Gtk.Widget widget, Gdk.EventButton event, Gdk.CursorType cursor_type) { -+ widget.get_toplevel().get_window().begin_resize_drag( -+ cursor_type_to_window_edge(cursor_type), -+ (int) event.button, -+ (int) event.x_root, -+ (int) event.y_root, -+ event.time -+ ); -+ -+ return true; -+ } -+ -+ public Gdk.WindowEdge? cursor_type_to_window_edge(Gdk.CursorType cursor_type) { -+ if (cursor_type == Gdk.CursorType.TOP_LEFT_CORNER) { -+ return WindowEdge.NORTH_WEST; -+ } else if (cursor_type == Gdk.CursorType.TOP_SIDE) { -+ return WindowEdge.NORTH; -+ } else if (cursor_type == Gdk.CursorType.TOP_RIGHT_CORNER) { -+ return WindowEdge.NORTH_EAST; -+ } else if (cursor_type == Gdk.CursorType.RIGHT_SIDE) { -+ return WindowEdge.EAST; -+ } else if (cursor_type == Gdk.CursorType.BOTTOM_RIGHT_CORNER) { -+ return WindowEdge.SOUTH_EAST; -+ } else if (cursor_type == Gdk.CursorType.BOTTOM_SIDE) { -+ return WindowEdge.SOUTH; -+ } else if (cursor_type == Gdk.CursorType.BOTTOM_LEFT_CORNER) { -+ return WindowEdge.SOUTH_WEST; -+ } else if (cursor_type == Gdk.CursorType.LEFT_SIDE) { -+ return WindowEdge.WEST; -+ } -+ -+ return null; -+ } -+ - public void toggle_max_window(Gtk.Window window) { - var window_state = window.get_window().get_state(); - if (Gdk.WindowState.MAXIMIZED in window_state) { -@@ -207,6 +244,10 @@ namespace Utils { - } - } - -+ public bool is_primary_button(Gdk.EventButton event) { -+ return event.button == Gdk.BUTTON_PRIMARY; -+ } -+ - public bool is_left_button(Gdk.EventButton event) { - return event.button == 1; - } -diff --git a/lib/xutils.vala b/lib/xutils.vala -deleted file mode 100644 -index 014c28ef..00000000 ---- a/lib/xutils.vala -+++ /dev/null -@@ -1,113 +0,0 @@ --/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- -- * -*- coding: utf-8 -*- -- * -- * Copyright (C) 2011 ~ 2018 Deepin, Inc. -- * 2011 ~ 2018 Wang Yong -- * -- * Author: Wang Yong -- * Maintainer: Wang Yong -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see . -- */ -- --namespace XUtils { -- public static int _NET_WM_MOVERESIZE_MOVE = 8; -- public static int _NET_WM_MOVERESIZE_SIZE_BOTTOM = 5; -- public static int _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT = 6; -- public static int _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT = 4; -- public static int _NET_WM_MOVERESIZE_SIZE_LEFT = 7; -- public static int _NET_WM_MOVERESIZE_SIZE_RIGHT = 3; -- public static int _NET_WM_MOVERESIZE_SIZE_TOP = 1; -- public static int _NET_WM_MOVERESIZE_SIZE_TOPLEFT = 0; -- public static int _NET_WM_MOVERESIZE_SIZE_TOPRIGHT = 2; -- -- public void seat_ungrab() { -- Gdk.Display gdk_display = Gdk.Display.get_default(); -- var seat = gdk_display.get_default_seat(); -- seat.ungrab(); -- } -- -- public void move_window(Gtk.Widget widget, int x, int y, int button) { -- seat_ungrab(); -- send_message((int)((Gdk.X11.Window) widget.get_toplevel().get_window()).get_xid(), -- (long) x, -- (long) y, -- _NET_WM_MOVERESIZE_MOVE, -- button, -- 0 // this value must be 0, otherwise moveresize won't work. -- ); -- } -- -- public void resize_window(Gtk.Widget widget, int x, int y, int button, Gdk.CursorType cursor_type) { -- int? action = cursor_type_to_action(cursor_type); -- if (action != null) { -- seat_ungrab(); -- send_message((int)((Gdk.X11.Window) widget.get_toplevel().get_window()).get_xid(), -- (long) x, -- (long) y, -- action, -- button, -- 1 -- ); -- } -- } -- -- public int? cursor_type_to_action(Gdk.CursorType cursor_type) { -- if (cursor_type == Gdk.CursorType.TOP_LEFT_CORNER) { -- return _NET_WM_MOVERESIZE_SIZE_TOPLEFT; -- } else if (cursor_type == Gdk.CursorType.TOP_SIDE) { -- return _NET_WM_MOVERESIZE_SIZE_TOP; -- } else if (cursor_type == Gdk.CursorType.TOP_RIGHT_CORNER) { -- return _NET_WM_MOVERESIZE_SIZE_TOPRIGHT; -- } else if (cursor_type == Gdk.CursorType.RIGHT_SIDE) { -- return _NET_WM_MOVERESIZE_SIZE_RIGHT; -- } else if (cursor_type == Gdk.CursorType.BOTTOM_RIGHT_CORNER) { -- return _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT; -- } else if (cursor_type == Gdk.CursorType.BOTTOM_SIDE) { -- return _NET_WM_MOVERESIZE_SIZE_BOTTOM; -- } else if (cursor_type == Gdk.CursorType.BOTTOM_LEFT_CORNER) { -- return _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT; -- } else if (cursor_type == Gdk.CursorType.LEFT_SIDE) { -- return _NET_WM_MOVERESIZE_SIZE_LEFT; -- } -- -- return null; -- } -- -- public void send_message(int xid, long x, long y, int action, int button, int secret_value) { -- weak X.Display display = Gdk.X11.get_default_xdisplay(); -- weak X.Window xrootwindow = display.root_window(0); -- -- X.Event event = X.Event(); -- -- event.xclient.type = X.EventType.ClientMessage; -- event.xclient.message_type = Gdk.X11.get_xatom_by_name("_NET_WM_MOVERESIZE"); -- event.xclient.display = display; -- event.xclient.window = xid; -- event.xclient.format = 32; -- event.xclient.data.l[0] = x; -- event.xclient.data.l[1] = y; -- event.xclient.data.l[2] = action; -- event.xclient.data.l[3] = button; -- event.xclient.data.l[4] = secret_value; -- -- display.send_event( -- xrootwindow, -- false, -- X.EventMask.SubstructureNotifyMask | X.EventMask.SubstructureRedirectMask, -- ref event); -- -- display.flush(); -- } --} -diff --git a/widget/quake_window.vala b/widget/quake_window.vala -index 3e5a065c..58d2dd33 100644 ---- a/widget/quake_window.vala -+++ b/widget/quake_window.vala -@@ -24,7 +24,6 @@ - using Gtk; - using Utils; - using Widgets; --using XUtils; - - namespace Widgets { - public class QuakeWindow : Widgets.ConfigWindow { -@@ -166,10 +165,7 @@ namespace Widgets { - e.device.get_position(null, out pointer_x, out pointer_y); - - if (pointer_x != press_x || pointer_y != press_y) { -- pointer_x *= get_scale_factor(); -- pointer_y *= get_scale_factor(); -- resize_window(this, pointer_x, pointer_y, (int) e.button, Gdk.CursorType.BOTTOM_SIDE); -- -+ Utils.resize_window(this, e, cursor_type); - return false; - } else { - return true; -@@ -191,10 +187,7 @@ namespace Widgets { - e.device.get_position(null, out pointer_x, out pointer_y); - - if (pointer_x != press_x || pointer_y != press_y) { -- pointer_x *= get_scale_factor(); -- pointer_y *= get_scale_factor(); -- resize_window(this, pointer_x, pointer_y, (int) e.button, Gdk.CursorType.BOTTOM_SIDE); -- -+ Utils.resize_window(this, e, cursor_type); - return false; - } else { - return true; -diff --git a/widget/window.vala b/widget/window.vala -index 65513860..ad91526a 100644 ---- a/widget/window.vala -+++ b/widget/window.vala -@@ -3,8 +3,10 @@ - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong -+ * 2019 ~ 2020 Gary Wang - * - * Author: Wang Yong -+ * Gary Wang - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify -@@ -26,7 +28,6 @@ using Config; - using Gtk; - using Utils; - using Wnck; --using XUtils; - using Widgets; - - namespace Widgets { -@@ -205,9 +206,7 @@ namespace Widgets { - - var cursor_type = get_frame_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { -- pointer_x *= get_scale_factor(); -- pointer_y *= get_scale_factor(); -- resize_window(this, pointer_x, pointer_y, (int) e.button, cursor_type); -+ Utils.resize_window(this, e, cursor_type); - return true; - } - } -@@ -223,9 +222,7 @@ namespace Widgets { - - var cursor_type = get_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { -- pointer_x *= get_scale_factor(); -- pointer_y *= get_scale_factor(); -- resize_window(this, pointer_x, pointer_y, (int) e.button, cursor_type); -+ Utils.resize_window(this, e, cursor_type); - return true; - } - } -@@ -320,6 +317,11 @@ namespace Widgets { - } - - public void update_blur_status(bool force_update=false) { -+ Gdk.Display current_display = get_window().get_display(); -+ if ((current_display as Gdk.X11.Display) == null) { -+ return; -+ } -+ - try { - int width, height; - get_size(out width, out height); -diff --git a/widget/window_event_area.vala b/widget/window_event_area.vala -index 3693cb83..404d85e7 100644 ---- a/widget/window_event_area.vala -+++ b/widget/window_event_area.vala -@@ -3,8 +3,10 @@ - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong -+ * 2019 ~ 2020 Gary Wang - * - * Author: Wang Yong -+ * Gary Wang - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify -@@ -23,7 +25,6 @@ - - using Gtk; - using Widgets; --using XUtils; - - namespace Widgets { - public class WindowEventArea : Gtk.EventBox { -@@ -95,23 +96,22 @@ namespace Widgets { - e.device.get_position(null, out press_x, out press_y); - - GLib.Timeout.add(10, () => { -- // Send 'move_window' event to xserver once find user first do drag. -- if (is_press) { -- int pointer_x, pointer_y; -- e.device.get_position(null, out pointer_x, out pointer_y); -- -- if (pointer_x != press_x || pointer_y != press_y) { -- pointer_x *= get_scale_factor(); -- pointer_y *= get_scale_factor(); -- move_window(this, pointer_x, pointer_y, (int) e.button); -- return false; -- } else { -- return true; -- } -- } else { -+ // blumia: should use begin_move_drag instead of send event to X -+ // so it should also works under wayland :) -+ if (is_press) { -+ int pointer_x, pointer_y; -+ e.device.get_position(null, out pointer_x, out pointer_y); -+ -+ if (pointer_x != press_x || pointer_y != press_y) { -+ Utils.move_window(this, e); - return false; -+ } else { -+ return true; - } -- }); -+ } else { -+ return false; -+ } -+ }); - - - var child = get_child_at_pos(drawing_area, (int) e.x, (int) e.y); diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/add-fPIC-cmake.patch deepin-terminal-5.4.13/debian/patches/add-fPIC-cmake.patch --- deepin-terminal-5.0.0+ds1/debian/patches/add-fPIC-cmake.patch 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/add-fPIC-cmake.patch 2021-10-09 04:57:05.000000000 +0000 @@ -0,0 +1,46 @@ +Description: + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + deepin-terminal (5.4.13-ubuntu1) impish; urgency=medium + . + * New upstream release for impish. +Author: Ananta Mishra + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2021-10-10 + +--- deepin-terminal-5.4.13.orig/3rdparty/terminalwidget/CMakeLists.txt ++++ deepin-terminal-5.4.13/3rdparty/terminalwidget/CMakeLists.txt +@@ -48,6 +48,7 @@ endif() + #include(LXQtPreventInSourceBuilds) + include(LXQtTranslateTs) + include(LXQtCompilerSettings NO_POLICY_SCOPE) ++remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII) + include(LXQtCreatePkgConfigFile) + + if(APPLE) +--- deepin-terminal-5.4.13.orig/CMakeLists.txt ++++ deepin-terminal-5.4.13/CMakeLists.txt +@@ -43,7 +43,7 @@ else() + endif() + + #Use deepin-turbo for Performance optimization +-set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wl,--as-need -fPIE") ++set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wl,--as-need -fPIC") + set(CMAKE_EXE_LINKER_FLAGS "-pie") + + configure_file(src/environments.h.in environments.h @ONLY) diff -Nru deepin-terminal-5.0.0+ds1/debian/patches/series deepin-terminal-5.4.13/debian/patches/series --- deepin-terminal-5.0.0+ds1/debian/patches/series 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/patches/series 2021-10-09 04:57:05.000000000 +0000 @@ -1,4 +1,2 @@ -0001-get-rid-of-lintian-warning-desktop-entry-invalid-cat.patch -0002-vala-libify-raw_data-conversion-for-Terminal-feed_ch.patch -0003-utils-adjust-to-change-in-vte3-0.59.0.patch -0004-basic-wayland-support.patch +0002-fix-desktop-entry-invalid-category-for-DDE.patch +add-fPIC-cmake.patch diff -Nru deepin-terminal-5.0.0+ds1/debian/rules deepin-terminal-5.4.13/debian/rules --- deepin-terminal-5.0.0+ds1/debian/rules 2021-05-02 19:01:19.000000000 +0000 +++ deepin-terminal-5.4.13/debian/rules 2021-10-09 04:56:09.000000000 +0000 @@ -1,27 +1,33 @@ #!/usr/bin/make -f -# export DH_VERBOSE = 1 +export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export QT_SELECT := 5 -# Vala work arounds: DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk -export VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w)) + +include /usr/share/dpkg/default.mk %: dh $@ +execute_after_dh_auto_install: + rm -rf debian/deepin-terminal/build + chmod 755 debian/deepin-terminal/usr/bin/deepin-terminal + chrpath --delete debian/deepin-terminal/usr/bin/deepin-terminal + +override_dh_shlibdeps: + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l/usr/lib + override_dh_auto_configure: dh_auto_configure -- \ - -DTEST_BUILD=OFF \ - -DUSE_VENDOR_LIB=OFF - - -override_dh_missing: - dh_missing --fail-missing + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DAPP_VERSION=$(DEB_VERSION_UPSTREAM) \ + -DVERSION=$(DEB_VERSION_UPSTREAM) \ + LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) diff -Nru deepin-terminal-5.0.0+ds1/deepin-terminal.desktop deepin-terminal-5.4.13/deepin-terminal.desktop --- deepin-terminal-5.0.0+ds1/deepin-terminal.desktop 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/deepin-terminal.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -[Desktop Entry] -Categories=GNOME;GTK;DDE;Utility;System;TerminalEmulator; -Comment=Use the command line -Exec=deepin-terminal -GenericName=Terminal -Icon=deepin-terminal -Keywords=shell;prompt;command;commandline; -Name=Deepin Terminal -StartupNotify=true -TryExec=deepin-terminal -Type=Application -X-Deepin-Vendor=deepin - -# Translations: -# Do not manually modify! -Comment[am_ET]=የ ትእዛዝ መስመር ይጠቀሙ -Comment[ar]=استخدام سطر الأوامر -Comment[ast]=Usa la llinia comandos -Comment[az]=Əmr sətirindən istifadə et -Comment[bg]=Използване на команден ред -Comment[ca]=Useu la línia d'ordres -Comment[cs]=Používejte příkazový řádek -Comment[da]=Brug kommandolinjen -Comment[de]=Kommandozeile benutzen -Comment[el]=Χρήση της γραμμής εντολών -Comment[en_AU]=Use the command line -Comment[eo]=Uzi la komandlinio -Comment[es]=Usar la línea de comando -Comment[es_419]=Usar la línea de comandos -Comment[fi]=Käytä komentoriviä -Comment[fr]=Utiliser la ligne de commande -Comment[gl_ES]=Empregar a liña de comandos -Comment[he]=השתמש בשורת פקודה -Comment[hi_IN]=आदेश रेखा का उपयोग करें -Comment[hr]=Koristi naredbeni redak -Comment[hu]= A parancssor használata -Comment[hy]=Օգտագործել հրամանների տողը -Comment[id]=Gunakan baris perintah -Comment[it]=Usa linea di comando -Comment[ja]=コマンドラインを使用する -Comment[ko]=명령어 사용 -Comment[lt]=Naudoti komandų eilutę -Comment[ml]=കമാൻഡ് ലൈൻ ഉപയോഗിക്കുക -Comment[ms]=guna baris perintah -Comment[nb]=Bruk kommandolinjen -Comment[nl]=De opdrachtregel gebruiken -Comment[pam]=Gamitan ing command line -Comment[pl]=Użyj wiersza poleceń -Comment[pt]=Utilize a linha de comandos -Comment[pt_BR]=Usar a linha de comando -Comment[ro]=Utilizare linia de comandă -Comment[ru]=Использовать командную строку -Comment[sk]=Použiť príkazový riadok -Comment[sl]=Uporabi ukazno vrstico -Comment[sq]=Përdorni rresht urdhrash -Comment[sr]=Користите командну линију -Comment[sv]=Använd kommandoraden -Comment[tr]=Komut satırını kullan -Comment[uk]=Використовувати командний рядок -Comment[zh_CN]=使用命令行 -Comment[zh_HK]=使用命令列 -Comment[zh_TW]=使用命令列介面 -GenericName[af]=Terminaal -GenericName[am_ET]=ተርሚናል -GenericName[ar]=الطرفية -GenericName[ast]=Terminal -GenericName[az]=Terminal -GenericName[bg]=Терминал -GenericName[bn]=প্রান্তিক -GenericName[ca]=Terminal -GenericName[cs]=Terminál -GenericName[da]=Terminal -GenericName[de]=Terminal -GenericName[el]=Τερματικό -GenericName[en_AU]=Terminal -GenericName[eo]=Terminalo -GenericName[es]=Terminal -GenericName[es_419]=Terminal -GenericName[fa]=ترمینال -GenericName[fi]=Pääte -GenericName[fr]=Terminal -GenericName[gl_ES]=Terminal -GenericName[he]=מסוף -GenericName[hi_IN]=टर्मिनल -GenericName[hr]=Terminal -GenericName[hu]=Terminál -GenericName[id]=Terminal -GenericName[it]=Terminale -GenericName[ja]=ターミナル -GenericName[ko]=터미널 -GenericName[lt]=Terminalas -GenericName[ml]=ടെർമിനൽ -GenericName[mn]=Терминал -GenericName[ms]=Terminal -GenericName[nb]=Terminal -GenericName[nl]=Terminal -GenericName[pl]=Terminal -GenericName[pt]=Abrir Terminal -GenericName[pt_BR]=Terminal -GenericName[ro]=Terminalul -GenericName[ru]=Терминал -GenericName[sk]=Terminál -GenericName[sl]=Terminal -GenericName[sq]=Terminal -GenericName[sr]=Терминал -GenericName[sv]=Terminal -GenericName[ta]=முனையம் -GenericName[tr]=Uçbirim -GenericName[ug]=تېرمىنال -GenericName[uk]=Термінал -GenericName[vi]=Đầu cuối -GenericName[zh_CN]=终端 -GenericName[zh_HK]=終端機 -GenericName[zh_TW]=終端機 -Keywords[ca]=shell;intèrpretd'ordres;ordre;línead'ordres; -Keywords[it]=shell;prompt;command;commandline; -Keywords[lt]=apvalkalas;užklausa;komanda;komandų eilutė;eilutė;komandos; -Keywords[nl]=shell;prompt;opdracht;opdrachtregel; -Keywords[pt_BR]=shell;prompt;command;commandline; -Keywords[ru]=shell;prompt;command;commandline; -Keywords[sk]=shell;prompt;command;commandline; -Keywords[sq]=shell;prompt;command;commandline; -Keywords[tr]=shell;prompt;command;commandline;kabuk;komut;komutsatırı; -Keywords[uk]=shell;prompt;command;commandline;оболонка;запит;команда;командна;рядок; -Keywords[zh_CN]=shell;prompt;command;commandline; -Name[am_ET]=የ ዲፕኢን ተርሚናል -Name[ar]=طرفية ديبين -Name[ast]=Deepin Terminal -Name[az]=Deepin Terminal -Name[bg]=Deepin терминал -Name[ca]=Terminal del Deepin -Name[cs]=Terminál -Name[da]=Deepin terminal -Name[de]=Deepin Terminal -Name[el]=Deepin Tερματικό -Name[en_AU]=Deepin Terminal -Name[eo]=Deepin terminalo -Name[es]=Terminal Deepin -Name[es_419]=Terminal Deepin -Name[fi]=Deepin-terminaali -Name[fil]=Deepin Terminal -Name[fr]=Deepin Terminal -Name[gl_ES]=Terminal -Name[he]=מסוף Deepin -Name[hi_IN]=डीपइन छोर -Name[hr]=Deepin terminal -Name[hu]=Deepin Terminál -Name[hy]=Deepin Տերմինալ -Name[id]=Terminal Deepin -Name[it]=Deepin Terminal -Name[ja]=Deepin Terminal -Name[ko]=Deepin 터미널 -Name[lt]=Deepin terminalas -Name[ml]=ഡീപിൻ ടെർമിനൽ -Name[ms]=Terminal Deepin -Name[nb]=Deepin terminal -Name[nl]=Deepin Terminal -Name[pam]=Deepin Terminal -Name[pl]=Terminal Deepin -Name[pt]=Deepin Terminal -Name[pt_BR]=Terminal Deepin -Name[ro]=Terminalul Deepin -Name[ru]= Терминал Deepin -Name[sk]=Deepin Terminál -Name[sl]=Terminal Deepin -Name[sq]=Terminali Deepin -Name[sr]=Дипин Терминал -Name[sv]=Deepin-terminal -Name[tr]=Deepin Uçbirim -Name[ug]=Deepin تېرمىنالى -Name[uk]=Термінал Deepin -Name[vi]=Deepin Terminal -Name[zh_CN]=深度终端 -Name[zh_HK]=Deepin 終端機 -Name[zh_TW]=Deepin Terminal - -[NewWindow Shortcut Group] -Exec=deepin-terminal -Name=New Window - -# Translations: -# Do not manually modify! -Name[ast]=Ventana nueva -Name[ca]=Finestra nova -Name[fr]=Nouvelle fenêtre -Name[hu]=Új ablak -Name[it]=Nuova finestra -Name[lt]=Naujas langas -Name[nl]=Nieuw venster -Name[pt_BR]=Nova Janela -Name[ru]=Новое Окно -Name[sk]=Nové okno -Name[sq]=Dritare e Re -Name[sr]=Нови прозор -Name[tr]=Yeni Pencere -Name[uk]=Нове вікно -Name[zh_CN]=新建窗口 - -[Quake Shortcut Group] -Exec=deepin-terminal --quake-mode -Name=Quake Terminal - -# Translations: -# Do not manually modify! -Name[ast]=Terminal Quake -Name[ca]=Terminal Quake -Name[it]=Terminale in primo piano -Name[lt]=Quake terminalas -Name[nl]=Quake-terminal -Name[pt_BR]=Terminal Quake -Name[ru]=Выпадающий Терминал -Name[sk]=Quake terminál -Name[sq]=Terminal Quake -Name[sr]=Спуштајући терминал -Name[tr]=Quake Uçbirim -Name[uk]=Термінал Quake -Name[zh_CN]=雷神终端 - diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/CMakeLists.txt deepin-terminal-5.4.13/FuzzyTest/CMakeLists.txt --- deepin-terminal-5.0.0+ds1/FuzzyTest/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/CMakeLists.txt 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,55 @@ + +cmake_minimum_required(VERSION 3.9.5) +project(FuzzyTest) + +set(EXE_ATSPI_NAME atspi_test) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_C_COMPILER /usr/bin/clang) +set(CMAKE_CXX_COMPILER /usr/bin/clang++) + +include(FindPkgConfig) +pkg_check_modules(MOD_ATSPI2 REQUIRED atspi-2) +pkg_check_modules(MOD_GOBJECT REQUIRED gobject-2.0) + +find_package(Qt5 COMPONENTS Core Widgets Gui REQUIRED) + + +file(GLOB_RECURSE SRC_LIST FOLLOW_SYMLINKS LIST_DIRECTORIES false ${PROJECT_SOURCE_DIR}/src/*.cpp) +file(GLOB_RECURSE INC_LIST FOLLOW_SYMLINKS LIST_DIRECTORIES false ${PROJECT_SOURCE_DIR}/src/*.h) +file(GLOB_RECURSE HEAD_LIST FOLLOW_SYMLINKS LIST_DIRECTORIES false ${PROJECT_SOURCE_DIR}/include/*.h) +list(APPEND INC_LIST ${HEAD_LIST}) + +add_executable(${EXE_ATSPI_NAME} ${SRC_LIST}) + +target_include_directories(${EXE_ATSPI_NAME} + PRIVATE Qt5::Core Qt5::Widgets Qt5::Gui) + +target_link_libraries(${EXE_ATSPI_NAME} + PRIVATE Qt5::Core Qt5::Widgets Qt5::Gui) + +target_compile_options(${EXE_ATSPI_NAME} + PRIVATE -g -std=c++11) + +target_link_options(${EXE_ATSPI_NAME} + PRIVATE -fsanitize=undefined,address,leak -fsanitize=fuzzer) + +target_include_directories(${EXE_ATSPI_NAME} + PRIVATE ${MOD_ATSPI2_INCLUDE_DIRS} + PRIVATE ${MOD_GOBJECT_INCLUDE_DIRS} + ) + +target_link_libraries(${EXE_ATSPI_NAME} + PRIVATE ${MOD_ATSPI2_LIBRARIES} + PRIVATE ${MOD_GOBJECT_LIBRARIES} + PRIVATE libFuzzer.a + PRIVATE pthread) +target_link_directories(${EXE_ATSPI_NAME} + PRIVATE ${MOD_ATSPI2_LIBRARY_DIRS} + PRIVATE ${MOD_GOBJECT_LIBRARY_DIRS} + PRIVATE ${PROJECT_SOURCE_DIR}/thirdlib) + + + diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerBuiltins.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerBuiltins.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerBuiltins.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerBuiltins.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,35 @@ +//===- FuzzerBuiltins.h - Internal header for builtins ----------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Wrapper functions and marcos around builtin functions. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_BUILTINS_H +#define LLVM_FUZZER_BUILTINS_H + +#include "FuzzerDefs.h" + +#if !LIBFUZZER_MSVC +#include + +#define GET_CALLER_PC() __builtin_return_address(0) + +namespace fuzzer { + +inline uint8_t Bswap(uint8_t x) { return x; } +inline uint16_t Bswap(uint16_t x) { return __builtin_bswap16(x); } +inline uint32_t Bswap(uint32_t x) { return __builtin_bswap32(x); } +inline uint64_t Bswap(uint64_t x) { return __builtin_bswap64(x); } + +inline uint32_t Clzll(unsigned long long X) { return __builtin_clzll(X); } +inline uint32_t Clz(unsigned long long X) { return __builtin_clz(X); } +inline int Popcountll(unsigned long long X) { return __builtin_popcountll(X); } + +} // namespace fuzzer + +#endif // !LIBFUZZER_MSVC +#endif // LLVM_FUZZER_BUILTINS_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerBuiltinsMsvc.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerBuiltinsMsvc.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerBuiltinsMsvc.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerBuiltinsMsvc.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +//===- FuzzerBuiltinsMSVC.h - Internal header for builtins ------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Wrapper functions and marcos that use intrinsics instead of builtin functions +// which cannot be compiled by MSVC. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_BUILTINS_MSVC_H +#define LLVM_FUZZER_BUILTINS_MSVC_H + +#include "FuzzerDefs.h" + +#if LIBFUZZER_MSVC +#include +#include +#include + +// __builtin_return_address() cannot be compiled with MSVC. Use the equivalent +// from +#define GET_CALLER_PC() _ReturnAddress() + +namespace fuzzer { + +inline uint8_t Bswap(uint8_t x) { return x; } +// Use alternatives to __builtin functions from and on +// Windows since the builtins are not supported by MSVC. +inline uint16_t Bswap(uint16_t x) { return _byteswap_ushort(x); } +inline uint32_t Bswap(uint32_t x) { return _byteswap_ulong(x); } +inline uint64_t Bswap(uint64_t x) { return _byteswap_uint64(x); } + +// The functions below were mostly copied from +// compiler-rt/lib/builtins/int_lib.h which defines the __builtin functions used +// outside of Windows. +inline uint32_t Clzll(uint64_t X) { + unsigned long LeadZeroIdx = 0; + +#if !defined(_M_ARM) && !defined(_M_X64) + // Scan the high 32 bits. + if (_BitScanReverse(&LeadZeroIdx, static_cast(X >> 32))) + return static_cast(63 - (LeadZeroIdx + 32)); // Create a bit offset from the MSB. + // Scan the low 32 bits. + if (_BitScanReverse(&LeadZeroIdx, static_cast(X))) + return static_cast(63 - LeadZeroIdx); + +#else + if (_BitScanReverse64(&LeadZeroIdx, X)) return 63 - LeadZeroIdx; +#endif + return 64; +} + +inline uint32_t Clz(uint32_t X) { + unsigned long LeadZeroIdx = 0; + if (_BitScanReverse(&LeadZeroIdx, X)) return 31 - LeadZeroIdx; + return 32; +} + +inline int Popcountll(unsigned long long X) { +#if !defined(_M_ARM) && !defined(_M_X64) + return __popcnt(X) + __popcnt(X >> 32); +#else + return __popcnt64(X); +#endif +} + +} // namespace fuzzer + +#endif // LIBFUZER_MSVC +#endif // LLVM_FUZZER_BUILTINS_MSVC_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerCommand.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerCommand.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerCommand.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerCommand.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,178 @@ +//===- FuzzerCommand.h - Interface representing a process -------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// FuzzerCommand represents a command to run in a subprocess. It allows callers +// to manage command line arguments and output and error streams. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_COMMAND_H +#define LLVM_FUZZER_COMMAND_H + +#include "FuzzerDefs.h" +#include "FuzzerIO.h" + +#include +#include +#include +#include + +namespace fuzzer { + +class Command final { +public: + // This command line flag is used to indicate that the remaining command line + // is immutable, meaning this flag effectively marks the end of the mutable + // argument list. + static inline const char *ignoreRemainingArgs() { + return "-ignore_remaining_args=1"; + } + + Command() : CombinedOutAndErr(false) {} + + explicit Command(const Vector &ArgsToAdd) + : Args(ArgsToAdd), CombinedOutAndErr(false) {} + + explicit Command(const Command &Other) + : Args(Other.Args), CombinedOutAndErr(Other.CombinedOutAndErr), + OutputFile(Other.OutputFile) {} + + Command &operator=(const Command &Other) { + Args = Other.Args; + CombinedOutAndErr = Other.CombinedOutAndErr; + OutputFile = Other.OutputFile; + return *this; + } + + ~Command() {} + + // Returns true if the given Arg is present in Args. Only checks up to + // "-ignore_remaining_args=1". + bool hasArgument(const std::string &Arg) const { + auto i = endMutableArgs(); + return std::find(Args.begin(), i, Arg) != i; + } + + // Gets all of the current command line arguments, **including** those after + // "-ignore-remaining-args=1". + const Vector &getArguments() const { return Args; } + + // Adds the given argument before "-ignore_remaining_args=1", or at the end + // if that flag isn't present. + void addArgument(const std::string &Arg) { + Args.insert(endMutableArgs(), Arg); + } + + // Adds all given arguments before "-ignore_remaining_args=1", or at the end + // if that flag isn't present. + void addArguments(const Vector &ArgsToAdd) { + Args.insert(endMutableArgs(), ArgsToAdd.begin(), ArgsToAdd.end()); + } + + // Removes the given argument from the command argument list. Ignores any + // occurrences after "-ignore_remaining_args=1", if present. + void removeArgument(const std::string &Arg) { + auto i = endMutableArgs(); + Args.erase(std::remove(Args.begin(), i, Arg), i); + } + + // Like hasArgument, but checks for "-[Flag]=...". + bool hasFlag(const std::string &Flag) const { + std::string Arg("-" + Flag + "="); + auto IsMatch = [&](const std::string &Other) { + return Arg.compare(0, std::string::npos, Other, 0, Arg.length()) == 0; + }; + return std::any_of(Args.begin(), endMutableArgs(), IsMatch); + } + + // Returns the value of the first instance of a given flag, or an empty string + // if the flag isn't present. Ignores any occurrences after + // "-ignore_remaining_args=1", if present. + std::string getFlagValue(const std::string &Flag) const { + std::string Arg("-" + Flag + "="); + auto IsMatch = [&](const std::string &Other) { + return Arg.compare(0, std::string::npos, Other, 0, Arg.length()) == 0; + }; + auto i = endMutableArgs(); + auto j = std::find_if(Args.begin(), i, IsMatch); + std::string result; + if (j != i) { + result = j->substr(Arg.length()); + } + return result; + } + + // Like AddArgument, but adds "-[Flag]=[Value]". + void addFlag(const std::string &Flag, const std::string &Value) { + addArgument("-" + Flag + "=" + Value); + } + + // Like RemoveArgument, but removes "-[Flag]=...". + void removeFlag(const std::string &Flag) { + std::string Arg("-" + Flag + "="); + auto IsMatch = [&](const std::string &Other) { + return Arg.compare(0, std::string::npos, Other, 0, Arg.length()) == 0; + }; + auto i = endMutableArgs(); + Args.erase(std::remove_if(Args.begin(), i, IsMatch), i); + } + + // Returns whether the command's stdout is being written to an output file. + bool hasOutputFile() const { return !OutputFile.empty(); } + + // Returns the currently set output file. + const std::string &getOutputFile() const { return OutputFile; } + + // Configures the command to redirect its output to the name file. + void setOutputFile(const std::string &FileName) { OutputFile = FileName; } + + // Returns whether the command's stderr is redirected to stdout. + bool isOutAndErrCombined() const { return CombinedOutAndErr; } + + // Sets whether to redirect the command's stderr to its stdout. + void combineOutAndErr(bool combine = true) { CombinedOutAndErr = combine; } + + // Returns a string representation of the command. On many systems this will + // be the equivalent command line. + std::string toString() const { + std::stringstream SS; + for (auto arg : getArguments()) + SS << arg << " "; + if (hasOutputFile()) + SS << ">" << getOutputFile() << " "; + if (isOutAndErrCombined()) + SS << "2>&1 "; + std::string result = SS.str(); + if (!result.empty()) + result = result.substr(0, result.length() - 1); + return result; + } + +private: + Command(Command &&Other) = delete; + Command &operator=(Command &&Other) = delete; + + Vector::iterator endMutableArgs() { + return std::find(Args.begin(), Args.end(), ignoreRemainingArgs()); + } + + Vector::const_iterator endMutableArgs() const { + return std::find(Args.begin(), Args.end(), ignoreRemainingArgs()); + } + + // The command arguments. Args[0] is the command name. + Vector Args; + + // True indicates stderr is redirected to stdout. + bool CombinedOutAndErr; + + // If not empty, stdout is redirected to the named file. + std::string OutputFile; +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_COMMAND_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerCorpus.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerCorpus.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerCorpus.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerCorpus.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,310 @@ +//===- FuzzerCorpus.h - Internal header for the Fuzzer ----------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::InputCorpus +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_CORPUS +#define LLVM_FUZZER_CORPUS + +#include "FuzzerDataFlowTrace.h" +#include "FuzzerDefs.h" +#include "FuzzerIO.h" +#include "FuzzerRandom.h" +#include "FuzzerSHA1.h" +#include "FuzzerTracePC.h" +#include +#include +#include +#include + +namespace fuzzer { + +struct InputInfo { + Unit U; // The actual input data. + uint8_t Sha1[kSHA1NumBytes]; // Checksum. + // Number of features that this input has and no smaller input has. + size_t NumFeatures = 0; + size_t Tmp = 0; // Used by ValidateFeatureSet. + // Stats. + size_t NumExecutedMutations = 0; + size_t NumSuccessfullMutations = 0; + bool MayDeleteFile = false; + bool Reduced = false; + bool HasFocusFunction = false; + Vector UniqFeatureSet; + Vector DataFlowTraceForFocusFunction; +}; + +class InputCorpus { + static const size_t kFeatureSetSize = 1 << 21; + public: + InputCorpus(const std::string &OutputCorpus) : OutputCorpus(OutputCorpus) { + memset(InputSizesPerFeature, 0, sizeof(InputSizesPerFeature)); + memset(SmallestElementPerFeature, 0, sizeof(SmallestElementPerFeature)); + } + ~InputCorpus() { + for (auto II : Inputs) + delete II; + } + size_t size() const { return Inputs.size(); } + size_t SizeInBytes() const { + size_t Res = 0; + for (auto II : Inputs) + Res += II->U.size(); + return Res; + } + size_t NumActiveUnits() const { + size_t Res = 0; + for (auto II : Inputs) + Res += !II->U.empty(); + return Res; + } + size_t MaxInputSize() const { + size_t Res = 0; + for (auto II : Inputs) + Res = std::max(Res, II->U.size()); + return Res; + } + + size_t NumInputsThatTouchFocusFunction() { + return std::count_if(Inputs.begin(), Inputs.end(), [](const InputInfo *II) { + return II->HasFocusFunction; + }); + } + + size_t NumInputsWithDataFlowTrace() { + return std::count_if(Inputs.begin(), Inputs.end(), [](const InputInfo *II) { + return !II->DataFlowTraceForFocusFunction.empty(); + }); + } + + bool empty() const { return Inputs.empty(); } + const Unit &operator[] (size_t Idx) const { return Inputs[Idx]->U; } + InputInfo *AddToCorpus(const Unit &U, size_t NumFeatures, bool MayDeleteFile, + bool HasFocusFunction, + const Vector &FeatureSet, + const DataFlowTrace &DFT, const InputInfo *BaseII) { + assert(!U.empty()); + if (FeatureDebug) + Printf("ADD_TO_CORPUS %zd NF %zd\n", Inputs.size(), NumFeatures); + Inputs.push_back(new InputInfo()); + InputInfo &II = *Inputs.back(); + II.U = U; + II.NumFeatures = NumFeatures; + II.MayDeleteFile = MayDeleteFile; + II.UniqFeatureSet = FeatureSet; + II.HasFocusFunction = HasFocusFunction; + std::sort(II.UniqFeatureSet.begin(), II.UniqFeatureSet.end()); + ComputeSHA1(U.data(), U.size(), II.Sha1); + auto Sha1Str = Sha1ToString(II.Sha1); + Hashes.insert(Sha1Str); + if (HasFocusFunction) + if (auto V = DFT.Get(Sha1Str)) + II.DataFlowTraceForFocusFunction = *V; + // This is a gross heuristic. + // Ideally, when we add an element to a corpus we need to know its DFT. + // But if we don't, we'll use the DFT of its base input. + if (II.DataFlowTraceForFocusFunction.empty() && BaseII) + II.DataFlowTraceForFocusFunction = BaseII->DataFlowTraceForFocusFunction; + UpdateCorpusDistribution(); + PrintCorpus(); + // ValidateFeatureSet(); + return &II; + } + + // Debug-only + void PrintUnit(const Unit &U) { + if (!FeatureDebug) return; + for (uint8_t C : U) { + if (C != 'F' && C != 'U' && C != 'Z') + C = '.'; + Printf("%c", C); + } + } + + // Debug-only + void PrintFeatureSet(const Vector &FeatureSet) { + if (!FeatureDebug) return; + Printf("{"); + for (uint32_t Feature: FeatureSet) + Printf("%u,", Feature); + Printf("}"); + } + + // Debug-only + void PrintCorpus() { + if (!FeatureDebug) return; + Printf("======= CORPUS:\n"); + int i = 0; + for (auto II : Inputs) { + if (std::find(II->U.begin(), II->U.end(), 'F') != II->U.end()) { + Printf("[%2d] ", i); + Printf("%s sz=%zd ", Sha1ToString(II->Sha1).c_str(), II->U.size()); + PrintUnit(II->U); + Printf(" "); + PrintFeatureSet(II->UniqFeatureSet); + Printf("\n"); + } + i++; + } + } + + void Replace(InputInfo *II, const Unit &U) { + assert(II->U.size() > U.size()); + Hashes.erase(Sha1ToString(II->Sha1)); + DeleteFile(*II); + ComputeSHA1(U.data(), U.size(), II->Sha1); + Hashes.insert(Sha1ToString(II->Sha1)); + II->U = U; + II->Reduced = true; + UpdateCorpusDistribution(); + } + + bool HasUnit(const Unit &U) { return Hashes.count(Hash(U)); } + bool HasUnit(const std::string &H) { return Hashes.count(H); } + InputInfo &ChooseUnitToMutate(Random &Rand) { + InputInfo &II = *Inputs[ChooseUnitIdxToMutate(Rand)]; + assert(!II.U.empty()); + return II; + } + + // Returns an index of random unit from the corpus to mutate. + size_t ChooseUnitIdxToMutate(Random &Rand) { + size_t Idx = static_cast(CorpusDistribution(Rand)); + assert(Idx < Inputs.size()); + return Idx; + } + + void PrintStats() { + for (size_t i = 0; i < Inputs.size(); i++) { + const auto &II = *Inputs[i]; + Printf(" [% 3zd %s] sz: % 5zd runs: % 5zd succ: % 5zd focus: %d\n", i, + Sha1ToString(II.Sha1).c_str(), II.U.size(), + II.NumExecutedMutations, II.NumSuccessfullMutations, II.HasFocusFunction); + } + } + + void PrintFeatureSet() { + for (size_t i = 0; i < kFeatureSetSize; i++) { + if(size_t Sz = GetFeature(i)) + Printf("[%zd: id %zd sz%zd] ", i, SmallestElementPerFeature[i], Sz); + } + Printf("\n\t"); + for (size_t i = 0; i < Inputs.size(); i++) + if (size_t N = Inputs[i]->NumFeatures) + Printf(" %zd=>%zd ", i, N); + Printf("\n"); + } + + void DeleteFile(const InputInfo &II) { + if (!OutputCorpus.empty() && II.MayDeleteFile) + RemoveFile(DirPlusFile(OutputCorpus, Sha1ToString(II.Sha1))); + } + + void DeleteInput(size_t Idx) { + InputInfo &II = *Inputs[Idx]; + DeleteFile(II); + Unit().swap(II.U); + if (FeatureDebug) + Printf("EVICTED %zd\n", Idx); + } + + bool AddFeature(size_t Idx, uint32_t NewSize, bool Shrink) { + assert(NewSize); + Idx = Idx % kFeatureSetSize; + uint32_t OldSize = GetFeature(Idx); + if (OldSize == 0 || (Shrink && OldSize > NewSize)) { + if (OldSize > 0) { + size_t OldIdx = SmallestElementPerFeature[Idx]; + InputInfo &II = *Inputs[OldIdx]; + assert(II.NumFeatures > 0); + II.NumFeatures--; + if (II.NumFeatures == 0) + DeleteInput(OldIdx); + } else { + NumAddedFeatures++; + } + NumUpdatedFeatures++; + if (FeatureDebug) + Printf("ADD FEATURE %zd sz %d\n", Idx, NewSize); + SmallestElementPerFeature[Idx] = Inputs.size(); + InputSizesPerFeature[Idx] = NewSize; + return true; + } + return false; + } + + size_t NumFeatures() const { return NumAddedFeatures; } + size_t NumFeatureUpdates() const { return NumUpdatedFeatures; } + +private: + + static const bool FeatureDebug = false; + + size_t GetFeature(size_t Idx) const { return InputSizesPerFeature[Idx]; } + + void ValidateFeatureSet() { + if (FeatureDebug) + PrintFeatureSet(); + for (size_t Idx = 0; Idx < kFeatureSetSize; Idx++) + if (GetFeature(Idx)) + Inputs[SmallestElementPerFeature[Idx]]->Tmp++; + for (auto II: Inputs) { + if (II->Tmp != II->NumFeatures) + Printf("ZZZ %zd %zd\n", II->Tmp, II->NumFeatures); + assert(II->Tmp == II->NumFeatures); + II->Tmp = 0; + } + } + + // Updates the probability distribution for the units in the corpus. + // Must be called whenever the corpus or unit weights are changed. + // + // Hypothesis: units added to the corpus last are more interesting. + // + // Hypothesis: inputs with infrequent features are more interesting. + void UpdateCorpusDistribution() { + size_t N = Inputs.size(); + assert(N); + Intervals.resize(N + 1); + Weights.resize(N); + std::iota(Intervals.begin(), Intervals.end(), 0); + for (size_t i = 0; i < N; i++) + Weights[i] = Inputs[i]->NumFeatures + ? (i + 1) * (Inputs[i]->HasFocusFunction ? 1000 : 1) + : 0.; + if (FeatureDebug) { + for (size_t i = 0; i < N; i++) + Printf("%zd ", Inputs[i]->NumFeatures); + Printf("SCORE\n"); + for (size_t i = 0; i < N; i++) + Printf("%f ", Weights[i]); + Printf("Weights\n"); + } + CorpusDistribution = std::piecewise_constant_distribution( + Intervals.begin(), Intervals.end(), Weights.begin()); + } + std::piecewise_constant_distribution CorpusDistribution; + + Vector Intervals; + Vector Weights; + + std::unordered_set Hashes; + Vector Inputs; + + size_t NumAddedFeatures = 0; + size_t NumUpdatedFeatures = 0; + uint32_t InputSizesPerFeature[kFeatureSetSize]; + uint32_t SmallestElementPerFeature[kFeatureSetSize]; + + std::string OutputCorpus; +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_CORPUS diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDataFlowTrace.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDataFlowTrace.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDataFlowTrace.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDataFlowTrace.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,135 @@ +//===- FuzzerDataFlowTrace.h - Internal header for the Fuzzer ---*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::DataFlowTrace; reads and handles a data-flow trace. +// +// A data flow trace is generated by e.g. dataflow/DataFlow.cpp +// and is stored on disk in a separate directory. +// +// The trace dir contains a file 'functions.txt' which lists function names, +// oner per line, e.g. +// ==> functions.txt <== +// Func2 +// LLVMFuzzerTestOneInput +// Func1 +// +// All other files in the dir are the traces, see dataflow/DataFlow.cpp. +// The name of the file is sha1 of the input used to generate the trace. +// +// Current status: +// the data is parsed and the summary is printed, but the data is not yet +// used in any other way. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_DATA_FLOW_TRACE +#define LLVM_FUZZER_DATA_FLOW_TRACE + +#include "FuzzerDefs.h" +#include "FuzzerIO.h" + +#include +#include +#include +#include + +namespace fuzzer { + +int CollectDataFlow(const std::string &DFTBinary, const std::string &DirPath, + const Vector &CorporaFiles); + +class BlockCoverage { + public: + bool AppendCoverage(std::istream &IN); + bool AppendCoverage(const std::string &S); + + size_t NumCoveredFunctions() const { return Functions.size(); } + + uint32_t GetCounter(size_t FunctionId, size_t BasicBlockId) { + auto It = Functions.find(FunctionId); + if (It == Functions.end()) return 0; + const auto &Counters = It->second; + if (BasicBlockId < Counters.size()) + return Counters[BasicBlockId]; + return 0; + } + + uint32_t GetNumberOfBlocks(size_t FunctionId) { + auto It = Functions.find(FunctionId); + if (It == Functions.end()) return 0; + const auto &Counters = It->second; + return Counters.size(); + } + + uint32_t GetNumberOfCoveredBlocks(size_t FunctionId) { + auto It = Functions.find(FunctionId); + if (It == Functions.end()) return 0; + const auto &Counters = It->second; + uint32_t Result = 0; + for (auto Cnt: Counters) + if (Cnt) + Result++; + return Result; + } + + Vector FunctionWeights(size_t NumFunctions) const; + void clear() { Functions.clear(); } + + private: + + typedef Vector CoverageVector; + + uint32_t NumberOfCoveredBlocks(const CoverageVector &Counters) const { + uint32_t Res = 0; + for (auto Cnt : Counters) + if (Cnt) + Res++; + return Res; + } + + uint32_t NumberOfUncoveredBlocks(const CoverageVector &Counters) const { + return Counters.size() - NumberOfCoveredBlocks(Counters); + } + + uint32_t SmallestNonZeroCounter(const CoverageVector &Counters) const { + assert(!Counters.empty()); + uint32_t Res = Counters[0]; + for (auto Cnt : Counters) + if (Cnt) + Res = Min(Res, Cnt); + assert(Res); + return Res; + } + + // Function ID => vector of counters. + // Each counter represents how many input files trigger the given basic block. + std::unordered_map Functions; + // Functions that have DFT entry. + std::unordered_set FunctionsWithDFT; +}; + +class DataFlowTrace { + public: + void ReadCoverage(const std::string &DirPath); + bool Init(const std::string &DirPath, std::string *FocusFunction, + Vector &CorporaFiles, Random &Rand); + void Clear() { Traces.clear(); } + const Vector *Get(const std::string &InputSha1) const { + auto It = Traces.find(InputSha1); + if (It != Traces.end()) + return &It->second; + return nullptr; + } + + private: + // Input's sha1 => DFT for the FocusFunction. + std::unordered_map > Traces; + BlockCoverage Coverage; + std::unordered_set CorporaHashes; +}; +} // namespace fuzzer + +#endif // LLVM_FUZZER_DATA_FLOW_TRACE diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDefs.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDefs.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDefs.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDefs.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,209 @@ +//===- FuzzerDefs.h - Internal header for the Fuzzer ------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Basic definitions. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_DEFS_H +#define LLVM_FUZZER_DEFS_H + +#include +#include +#include +#include +#include +#include +#include +#include + + +// Platform detection. +#ifdef __linux__ +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 1 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 0 +#elif __APPLE__ +#define LIBFUZZER_APPLE 1 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 0 +#elif __NetBSD__ +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 1 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 0 +#elif __FreeBSD__ +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 1 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 0 +#elif __OpenBSD__ +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 1 +#define LIBFUZZER_WINDOWS 0 +#elif _WIN32 +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 0 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 1 +#elif __Fuchsia__ +#define LIBFUZZER_APPLE 0 +#define LIBFUZZER_FUCHSIA 1 +#define LIBFUZZER_LINUX 0 +#define LIBFUZZER_NETBSD 0 +#define LIBFUZZER_FREEBSD 0 +#define LIBFUZZER_OPENBSD 0 +#define LIBFUZZER_WINDOWS 0 +#else +#error "Support for your platform has not been implemented" +#endif + +#if defined(_MSC_VER) && !defined(__clang__) +// MSVC compiler is being used. +#define LIBFUZZER_MSVC 1 +#else +#define LIBFUZZER_MSVC 0 +#endif + +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif + +#define LIBFUZZER_POSIX \ + (LIBFUZZER_APPLE || LIBFUZZER_LINUX || LIBFUZZER_NETBSD || \ + LIBFUZZER_FREEBSD || LIBFUZZER_OPENBSD) + +#ifdef __x86_64 +# if __has_attribute(target) +# define ATTRIBUTE_TARGET_POPCNT __attribute__((target("popcnt"))) +# else +# define ATTRIBUTE_TARGET_POPCNT +# endif +#else +# define ATTRIBUTE_TARGET_POPCNT +#endif + + +#ifdef __clang__ // avoid gcc warning. +# if __has_attribute(no_sanitize) +# define ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory"))) +# else +# define ATTRIBUTE_NO_SANITIZE_MEMORY +# endif +# define ALWAYS_INLINE __attribute__((always_inline)) +#else +# define ATTRIBUTE_NO_SANITIZE_MEMORY +# define ALWAYS_INLINE +#endif // __clang__ + +#if LIBFUZZER_WINDOWS +#define ATTRIBUTE_NO_SANITIZE_ADDRESS +#else +#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) +#endif + +#if LIBFUZZER_WINDOWS +#define ATTRIBUTE_ALIGNED(X) __declspec(align(X)) +#define ATTRIBUTE_INTERFACE __declspec(dllexport) +// This is used for __sancov_lowest_stack which is needed for +// -fsanitize-coverage=stack-depth. That feature is not yet available on +// Windows, so make the symbol static to avoid linking errors. +#define ATTRIBUTES_INTERFACE_TLS_INITIAL_EXEC static +#define ATTRIBUTE_NOINLINE __declspec(noinline) +#else +#define ATTRIBUTE_ALIGNED(X) __attribute__((aligned(X))) +#define ATTRIBUTE_INTERFACE __attribute__((visibility("default"))) +#define ATTRIBUTES_INTERFACE_TLS_INITIAL_EXEC \ + ATTRIBUTE_INTERFACE __attribute__((tls_model("initial-exec"))) thread_local + +#define ATTRIBUTE_NOINLINE __attribute__((noinline)) +#endif + +#if defined(__has_feature) +# if __has_feature(address_sanitizer) +# define ATTRIBUTE_NO_SANITIZE_ALL ATTRIBUTE_NO_SANITIZE_ADDRESS +# elif __has_feature(memory_sanitizer) +# define ATTRIBUTE_NO_SANITIZE_ALL ATTRIBUTE_NO_SANITIZE_MEMORY +# else +# define ATTRIBUTE_NO_SANITIZE_ALL +# endif +#else +# define ATTRIBUTE_NO_SANITIZE_ALL +#endif + +namespace fuzzer { + +template T Min(T a, T b) { return a < b ? a : b; } +template T Max(T a, T b) { return a > b ? a : b; } + +class Random; +class Dictionary; +class DictionaryEntry; +class MutationDispatcher; +struct FuzzingOptions; +class InputCorpus; +struct InputInfo; +struct ExternalFunctions; + +// Global interface to functions that may or may not be available. +extern ExternalFunctions *EF; + +// We are using a custom allocator to give a different symbol name to STL +// containers in order to avoid ODR violations. +template + class fuzzer_allocator: public std::allocator { + public: + fuzzer_allocator() = default; + + template + fuzzer_allocator(const fuzzer_allocator&) {} + + template + struct rebind { typedef fuzzer_allocator other; }; + }; + +template +using Vector = std::vector>; + +template +using Set = std::set, fuzzer_allocator>; + +typedef Vector Unit; +typedef Vector UnitVector; +typedef int (*UserCallback)(const uint8_t *Data, size_t Size); + +int FuzzerDriver(int *argc, char ***argv, UserCallback Callback); + +uint8_t *ExtraCountersBegin(); +uint8_t *ExtraCountersEnd(); +void ClearExtraCounters(); + +extern bool RunningUserCallback; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_DEFS_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDictionary.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDictionary.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerDictionary.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerDictionary.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,118 @@ +//===- FuzzerDictionary.h - Internal header for the Fuzzer ------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::Dictionary +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_DICTIONARY_H +#define LLVM_FUZZER_DICTIONARY_H + +#include "FuzzerDefs.h" +#include "FuzzerIO.h" +#include "FuzzerUtil.h" +#include +#include + +namespace fuzzer { +// A simple POD sized array of bytes. +template class FixedWord { +public: + static const size_t kMaxSize = kMaxSizeT; + FixedWord() {} + FixedWord(const uint8_t *B, uint8_t S) { Set(B, S); } + + void Set(const uint8_t *B, uint8_t S) { + assert(S <= kMaxSize); + memcpy(Data, B, S); + Size = S; + } + + bool operator==(const FixedWord &w) const { + return Size == w.Size && 0 == memcmp(Data, w.Data, Size); + } + + static size_t GetMaxSize() { return kMaxSize; } + const uint8_t *data() const { return Data; } + uint8_t size() const { return Size; } + +private: + uint8_t Size = 0; + uint8_t Data[kMaxSize]; +}; + +typedef FixedWord<64> Word; + +class DictionaryEntry { + public: + DictionaryEntry() {} + DictionaryEntry(Word W) : W(W) {} + DictionaryEntry(Word W, size_t PositionHint) : W(W), PositionHint(PositionHint) {} + const Word &GetW() const { return W; } + + bool HasPositionHint() const { return PositionHint != std::numeric_limits::max(); } + size_t GetPositionHint() const { + assert(HasPositionHint()); + return PositionHint; + } + void IncUseCount() { UseCount++; } + void IncSuccessCount() { SuccessCount++; } + size_t GetUseCount() const { return UseCount; } + size_t GetSuccessCount() const {return SuccessCount; } + + void Print(const char *PrintAfter = "\n") { + PrintASCII(W.data(), W.size()); + if (HasPositionHint()) + Printf("@%zd", GetPositionHint()); + Printf("%s", PrintAfter); + } + +private: + Word W; + size_t PositionHint = std::numeric_limits::max(); + size_t UseCount = 0; + size_t SuccessCount = 0; +}; + +class Dictionary { + public: + static const size_t kMaxDictSize = 1 << 14; + + bool ContainsWord(const Word &W) const { + return std::any_of(begin(), end(), [&](const DictionaryEntry &DE) { + return DE.GetW() == W; + }); + } + const DictionaryEntry *begin() const { return &DE[0]; } + const DictionaryEntry *end() const { return begin() + Size; } + DictionaryEntry & operator[] (size_t Idx) { + assert(Idx < Size); + return DE[Idx]; + } + void push_back(DictionaryEntry DE) { + if (Size < kMaxDictSize) + this->DE[Size++] = DE; + } + void clear() { Size = 0; } + bool empty() const { return Size == 0; } + size_t size() const { return Size; } + +private: + DictionaryEntry DE[kMaxDictSize]; + size_t Size = 0; +}; + +// Parses one dictionary entry. +// If successful, write the enty to Unit and returns true, +// otherwise returns false. +bool ParseOneDictionaryEntry(const std::string &Str, Unit *U); +// Parses the dictionary file, fills Units, returns true iff all lines +// were parsed successfully. +bool ParseDictionaryFile(const std::string &Text, Vector *Units); + +} // namespace fuzzer + +#endif // LLVM_FUZZER_DICTIONARY_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerExtFunctions.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerExtFunctions.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerExtFunctions.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerExtFunctions.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,34 @@ +//===- FuzzerExtFunctions.h - Interface to external functions ---*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Defines an interface to (possibly optional) functions. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_EXT_FUNCTIONS_H +#define LLVM_FUZZER_EXT_FUNCTIONS_H + +#include +#include + +namespace fuzzer { + +struct ExternalFunctions { + // Initialize function pointers. Functions that are not available will be set + // to nullptr. Do not call this constructor before ``main()`` has been + // entered. + ExternalFunctions(); + +#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \ + RETURN_TYPE(*NAME) FUNC_SIG = nullptr + +#include "FuzzerExtFunctions.def" + +#undef EXT_FUNC +}; +} // namespace fuzzer + +#endif diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerFork.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerFork.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerFork.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerFork.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,24 @@ +//===- FuzzerFork.h - run fuzzing in sub-processes --------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_FORK_H +#define LLVM_FUZZER_FORK_H + +#include "FuzzerDefs.h" +#include "FuzzerOptions.h" +#include "FuzzerRandom.h" + +#include + +namespace fuzzer { +void FuzzWithFork(Random &Rand, const FuzzingOptions &Options, + const Vector &Args, + const Vector &CorpusDirs, int NumJobs); +} // namespace fuzzer + +#endif // LLVM_FUZZER_FORK_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerInterface.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerInterface.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerInterface.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerInterface.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,79 @@ +//===- FuzzerInterface.h - Interface header for the Fuzzer ------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Define the interface between libFuzzer and the library being tested. +//===----------------------------------------------------------------------===// + +// NOTE: the libFuzzer interface is thin and in the majority of cases +// you should not include this file into your target. In 95% of cases +// all you need is to define the following function in your file: +// extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); + +// WARNING: keep the interface in C. + +#ifndef LLVM_FUZZER_INTERFACE_H +#define LLVM_FUZZER_INTERFACE_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Define FUZZER_INTERFACE_VISIBILITY to set default visibility in a way that +// doesn't break MSVC. +#if defined(_WIN32) +#define FUZZER_INTERFACE_VISIBILITY __declspec(dllexport) +#else +#define FUZZER_INTERFACE_VISIBILITY __attribute__((visibility("default"))) +#endif + +// Mandatory user-provided target function. +// Executes the code under test with [Data, Data+Size) as the input. +// libFuzzer will invoke this function *many* times with different inputs. +// Must return 0. +FUZZER_INTERFACE_VISIBILITY int +LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); + +// Optional user-provided initialization function. +// If provided, this function will be called by libFuzzer once at startup. +// It may read and modify argc/argv. +// Must return 0. +FUZZER_INTERFACE_VISIBILITY int LLVMFuzzerInitialize(int *argc, char ***argv); + +// Optional user-provided custom mutator. +// Mutates raw data in [Data, Data+Size) inplace. +// Returns the new size, which is not greater than MaxSize. +// Given the same Seed produces the same mutation. +FUZZER_INTERFACE_VISIBILITY size_t +LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size, size_t MaxSize, + unsigned int Seed); + +// Optional user-provided custom cross-over function. +// Combines pieces of Data1 & Data2 together into Out. +// Returns the new size, which is not greater than MaxOutSize. +// Should produce the same mutation given the same Seed. +FUZZER_INTERFACE_VISIBILITY size_t +LLVMFuzzerCustomCrossOver(const uint8_t *Data1, size_t Size1, + const uint8_t *Data2, size_t Size2, uint8_t *Out, + size_t MaxOutSize, unsigned int Seed); + +// Experimental, may go away in future. +// libFuzzer-provided function to be used inside LLVMFuzzerCustomMutator. +// Mutates raw data in [Data, Data+Size) inplace. +// Returns the new size, which is not greater than MaxSize. +FUZZER_INTERFACE_VISIBILITY size_t +LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize); + +#undef FUZZER_INTERFACE_VISIBILITY + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +#endif // LLVM_FUZZER_INTERFACE_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerInternal.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerInternal.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerInternal.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerInternal.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,172 @@ +//===- FuzzerInternal.h - Internal header for the Fuzzer --------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Define the main class fuzzer::Fuzzer and most functions. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_INTERNAL_H +#define LLVM_FUZZER_INTERNAL_H + +#include "FuzzerDataFlowTrace.h" +#include "FuzzerDefs.h" +#include "FuzzerExtFunctions.h" +#include "FuzzerInterface.h" +#include "FuzzerOptions.h" +#include "FuzzerSHA1.h" +#include "FuzzerValueBitMap.h" +#include +#include +#include +#include +#include +#include + +namespace fuzzer { + +using namespace std::chrono; + +class Fuzzer { +public: + + Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, + FuzzingOptions Options); + ~Fuzzer(); + void Loop(Vector &CorporaFiles); + void ReadAndExecuteSeedCorpora(Vector &CorporaFiles); + void MinimizeCrashLoop(const Unit &U); + void RereadOutputCorpus(size_t MaxSize); + + size_t secondsSinceProcessStartUp() { + return duration_cast(system_clock::now() - ProcessStartTime) + .count(); + } + + bool TimedOut() { + return Options.MaxTotalTimeSec > 0 && + secondsSinceProcessStartUp() > + static_cast(Options.MaxTotalTimeSec); + } + + size_t execPerSec() { + size_t Seconds = secondsSinceProcessStartUp(); + return Seconds ? TotalNumberOfRuns / Seconds : 0; + } + + size_t getTotalNumberOfRuns() { return TotalNumberOfRuns; } + + static void StaticAlarmCallback(); + static void StaticCrashSignalCallback(); + static void StaticExitCallback(); + static void StaticInterruptCallback(); + static void StaticFileSizeExceedCallback(); + static void StaticGracefulExitCallback(); + + void ExecuteCallback(const uint8_t *Data, size_t Size); + bool RunOne(const uint8_t *Data, size_t Size, bool MayDeleteFile = false, + InputInfo *II = nullptr, bool *FoundUniqFeatures = nullptr); + + // Merge Corpora[1:] into Corpora[0]. + void Merge(const Vector &Corpora); + void CrashResistantMergeInternalStep(const std::string &ControlFilePath); + MutationDispatcher &GetMD() { return MD; } + void PrintFinalStats(); + void SetMaxInputLen(size_t MaxInputLen); + void SetMaxMutationLen(size_t MaxMutationLen); + void RssLimitCallback(); + + bool InFuzzingThread() const { return IsMyThread; } + size_t GetCurrentUnitInFuzzingThead(const uint8_t **Data) const; + void TryDetectingAMemoryLeak(const uint8_t *Data, size_t Size, + bool DuringInitialCorpusExecution); + + void HandleMalloc(size_t Size); + static void MaybeExitGracefully(); + std::string WriteToOutputCorpus(const Unit &U); + +private: + void AlarmCallback(); + void CrashCallback(); + void ExitCallback(); + void CrashOnOverwrittenData(); + void InterruptCallback(); + void MutateAndTestOne(); + void PurgeAllocator(); + void ReportNewCoverage(InputInfo *II, const Unit &U); + void PrintPulseAndReportSlowInput(const uint8_t *Data, size_t Size); + void WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix); + void PrintStats(const char *Where, const char *End = "\n", size_t Units = 0, + size_t Features = 0); + void PrintStatusForNewUnit(const Unit &U, const char *Text); + void CheckExitOnSrcPosOrItem(); + + static void StaticDeathCallback(); + void DumpCurrentUnit(const char *Prefix); + void DeathCallback(); + + void AllocateCurrentUnitData(); + uint8_t *CurrentUnitData = nullptr; + std::atomic CurrentUnitSize; + uint8_t BaseSha1[kSHA1NumBytes]; // Checksum of the base unit. + + bool GracefulExitRequested = false; + + size_t TotalNumberOfRuns = 0; + size_t NumberOfNewUnitsAdded = 0; + + size_t LastCorpusUpdateRun = 0; + + bool HasMoreMallocsThanFrees = false; + size_t NumberOfLeakDetectionAttempts = 0; + + system_clock::time_point LastAllocatorPurgeAttemptTime = system_clock::now(); + + UserCallback CB; + InputCorpus &Corpus; + MutationDispatcher &MD; + FuzzingOptions Options; + DataFlowTrace DFT; + + system_clock::time_point ProcessStartTime = system_clock::now(); + system_clock::time_point UnitStartTime, UnitStopTime; + long TimeOfLongestUnitInSeconds = 0; + long EpochOfLastReadOfOutputCorpus = 0; + + size_t MaxInputLen = 0; + size_t MaxMutationLen = 0; + size_t TmpMaxMutationLen = 0; + + Vector UniqFeatureSetTmp; + + // Need to know our own thread. + static thread_local bool IsMyThread; +}; + +struct ScopedEnableMsanInterceptorChecks { + ScopedEnableMsanInterceptorChecks() { + if (EF->__msan_scoped_enable_interceptor_checks) + EF->__msan_scoped_enable_interceptor_checks(); + } + ~ScopedEnableMsanInterceptorChecks() { + if (EF->__msan_scoped_disable_interceptor_checks) + EF->__msan_scoped_disable_interceptor_checks(); + } +}; + +struct ScopedDisableMsanInterceptorChecks { + ScopedDisableMsanInterceptorChecks() { + if (EF->__msan_scoped_disable_interceptor_checks) + EF->__msan_scoped_disable_interceptor_checks(); + } + ~ScopedDisableMsanInterceptorChecks() { + if (EF->__msan_scoped_enable_interceptor_checks) + EF->__msan_scoped_enable_interceptor_checks(); + } +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_INTERNAL_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerIO.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerIO.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerIO.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerIO.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,108 @@ +//===- FuzzerIO.h - Internal header for IO utils ----------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// IO interface. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_IO_H +#define LLVM_FUZZER_IO_H + +#include "FuzzerDefs.h" + +namespace fuzzer { + +long GetEpoch(const std::string &Path); + +Unit FileToVector(const std::string &Path, size_t MaxSize = 0, + bool ExitOnError = true); + +std::string FileToString(const std::string &Path); + +void CopyFileToErr(const std::string &Path); + +void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path); +// Write Data.c_str() to the file without terminating null character. +void WriteToFile(const std::string &Data, const std::string &Path); +void WriteToFile(const Unit &U, const std::string &Path); + +void ReadDirToVectorOfUnits(const char *Path, Vector *V, + long *Epoch, size_t MaxSize, bool ExitOnError); + +// Returns "Dir/FileName" or equivalent for the current OS. +std::string DirPlusFile(const std::string &DirPath, + const std::string &FileName); + +// Returns the name of the dir, similar to the 'dirname' utility. +std::string DirName(const std::string &FileName); + +// Returns path to a TmpDir. +std::string TmpDir(); + +std::string TempPath(const char *Extension); + +bool IsInterestingCoverageFile(const std::string &FileName); + +void DupAndCloseStderr(); + +void CloseStdout(); + +void Printf(const char *Fmt, ...); +void VPrintf(bool Verbose, const char *Fmt, ...); + +// Print using raw syscalls, useful when printing at early init stages. +void RawPrint(const char *Str); + +// Platform specific functions: +bool IsFile(const std::string &Path); +size_t FileSize(const std::string &Path); + +void ListFilesInDirRecursive(const std::string &Dir, long *Epoch, + Vector *V, bool TopDir); + +void RmDirRecursive(const std::string &Dir); + +// Iterate files and dirs inside Dir, recursively. +// Call DirPreCallback/DirPostCallback on dirs before/after +// calling FileCallback on files. +void IterateDirRecursive(const std::string &Dir, + void (*DirPreCallback)(const std::string &Dir), + void (*DirPostCallback)(const std::string &Dir), + void (*FileCallback)(const std::string &Dir)); + +struct SizedFile { + std::string File; + size_t Size; + bool operator<(const SizedFile &B) const { return Size < B.Size; } +}; + +void GetSizedFilesFromDir(const std::string &Dir, Vector *V); + +char GetSeparator(); +// Similar to the basename utility: returns the file name w/o the dir prefix. +std::string Basename(const std::string &Path); + +FILE* OpenFile(int Fd, const char *Mode); + +int CloseFile(int Fd); + +int DuplicateFile(int Fd); + +void RemoveFile(const std::string &Path); +void RenameFile(const std::string &OldPath, const std::string &NewPath); + +void DiscardOutput(int Fd); + +intptr_t GetHandleFromFd(int fd); + +void MkDir(const std::string &Path); +void RmDir(const std::string &Path); + +const std::string &getDevNull(); + +} // namespace fuzzer + +#endif // LLVM_FUZZER_IO_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerMerge.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerMerge.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerMerge.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerMerge.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,86 @@ +//===- FuzzerMerge.h - merging corpa ----------------------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Merging Corpora. +// +// The task: +// Take the existing corpus (possibly empty) and merge new inputs into +// it so that only inputs with new coverage ('features') are added. +// The process should tolerate the crashes, OOMs, leaks, etc. +// +// Algorithm: +// The outter process collects the set of files and writes their names +// into a temporary "control" file, then repeatedly launches the inner +// process until all inputs are processed. +// The outer process does not actually execute the target code. +// +// The inner process reads the control file and sees a) list of all the inputs +// and b) the last processed input. Then it starts processing the inputs one +// by one. Before processing every input it writes one line to control file: +// STARTED INPUT_ID INPUT_SIZE +// After processing an input it write another line: +// DONE INPUT_ID Feature1 Feature2 Feature3 ... +// If a crash happens while processing an input the last line in the control +// file will be "STARTED INPUT_ID" and so the next process will know +// where to resume. +// +// Once all inputs are processed by the innner process(es) the outer process +// reads the control files and does the merge based entirely on the contents +// of control file. +// It uses a single pass greedy algorithm choosing first the smallest inputs +// within the same size the inputs that have more new features. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_MERGE_H +#define LLVM_FUZZER_MERGE_H + +#include "FuzzerDefs.h" + +#include +#include +#include +#include + +namespace fuzzer { + +struct MergeFileInfo { + std::string Name; + size_t Size = 0; + Vector Features, Cov; +}; + +struct Merger { + Vector Files; + size_t NumFilesInFirstCorpus = 0; + size_t FirstNotProcessedFile = 0; + std::string LastFailure; + + bool Parse(std::istream &IS, bool ParseCoverage); + bool Parse(const std::string &Str, bool ParseCoverage); + void ParseOrExit(std::istream &IS, bool ParseCoverage); + size_t Merge(const Set &InitialFeatures, Set *NewFeatures, + const Set &InitialCov, Set *NewCov, + Vector *NewFiles); + size_t ApproximateMemoryConsumption() const; + Set AllFeatures() const; +}; + +void CrashResistantMerge(const Vector &Args, + const Vector &OldCorpus, + const Vector &NewCorpus, + Vector *NewFiles, + const Set &InitialFeatures, + Set *NewFeatures, + const Set &InitialCov, + Set *NewCov, + const std::string &CFPath, + bool Verbose); + +} // namespace fuzzer + +#endif // LLVM_FUZZER_MERGE_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerMutate.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerMutate.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerMutate.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerMutate.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,156 @@ +//===- FuzzerMutate.h - Internal header for the Fuzzer ----------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::MutationDispatcher +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_MUTATE_H +#define LLVM_FUZZER_MUTATE_H + +#include "FuzzerDefs.h" +#include "FuzzerDictionary.h" +#include "FuzzerOptions.h" +#include "FuzzerRandom.h" + +namespace fuzzer { + +class MutationDispatcher { +public: + MutationDispatcher(Random &Rand, const FuzzingOptions &Options); + ~MutationDispatcher() {} + /// Indicate that we are about to start a new sequence of mutations. + void StartMutationSequence(); + /// Print the current sequence of mutations. + void PrintMutationSequence(); + /// Indicate that the current sequence of mutations was successful. + void RecordSuccessfulMutationSequence(); + /// Mutates data by invoking user-provided mutator. + size_t Mutate_Custom(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by invoking user-provided crossover. + size_t Mutate_CustomCrossOver(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by shuffling bytes. + size_t Mutate_ShuffleBytes(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by erasing bytes. + size_t Mutate_EraseBytes(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by inserting a byte. + size_t Mutate_InsertByte(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by inserting several repeated bytes. + size_t Mutate_InsertRepeatedBytes(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by chanding one byte. + size_t Mutate_ChangeByte(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by chanding one bit. + size_t Mutate_ChangeBit(uint8_t *Data, size_t Size, size_t MaxSize); + /// Mutates data by copying/inserting a part of data into a different place. + size_t Mutate_CopyPart(uint8_t *Data, size_t Size, size_t MaxSize); + + /// Mutates data by adding a word from the manual dictionary. + size_t Mutate_AddWordFromManualDictionary(uint8_t *Data, size_t Size, + size_t MaxSize); + + /// Mutates data by adding a word from the TORC. + size_t Mutate_AddWordFromTORC(uint8_t *Data, size_t Size, size_t MaxSize); + + /// Mutates data by adding a word from the persistent automatic dictionary. + size_t Mutate_AddWordFromPersistentAutoDictionary(uint8_t *Data, size_t Size, + size_t MaxSize); + + /// Tries to find an ASCII integer in Data, changes it to another ASCII int. + size_t Mutate_ChangeASCIIInteger(uint8_t *Data, size_t Size, size_t MaxSize); + /// Change a 1-, 2-, 4-, or 8-byte integer in interesting ways. + size_t Mutate_ChangeBinaryInteger(uint8_t *Data, size_t Size, size_t MaxSize); + + /// CrossOver Data with CrossOverWith. + size_t Mutate_CrossOver(uint8_t *Data, size_t Size, size_t MaxSize); + + /// Applies one of the configured mutations. + /// Returns the new size of data which could be up to MaxSize. + size_t Mutate(uint8_t *Data, size_t Size, size_t MaxSize); + + /// Applies one of the configured mutations to the bytes of Data + /// that have '1' in Mask. + /// Mask.size() should be >= Size. + size_t MutateWithMask(uint8_t *Data, size_t Size, size_t MaxSize, + const Vector &Mask); + + /// Applies one of the default mutations. Provided as a service + /// to mutation authors. + size_t DefaultMutate(uint8_t *Data, size_t Size, size_t MaxSize); + + /// Creates a cross-over of two pieces of Data, returns its size. + size_t CrossOver(const uint8_t *Data1, size_t Size1, const uint8_t *Data2, + size_t Size2, uint8_t *Out, size_t MaxOutSize); + + void AddWordToManualDictionary(const Word &W); + + void PrintRecommendedDictionary(); + + void SetCrossOverWith(const Unit *U) { CrossOverWith = U; } + + Random &GetRand() { return Rand; } + + private: + struct Mutator { + size_t (MutationDispatcher::*Fn)(uint8_t *Data, size_t Size, size_t Max); + const char *Name; + }; + + size_t AddWordFromDictionary(Dictionary &D, uint8_t *Data, size_t Size, + size_t MaxSize); + size_t MutateImpl(uint8_t *Data, size_t Size, size_t MaxSize, + Vector &Mutators); + + size_t InsertPartOf(const uint8_t *From, size_t FromSize, uint8_t *To, + size_t ToSize, size_t MaxToSize); + size_t CopyPartOf(const uint8_t *From, size_t FromSize, uint8_t *To, + size_t ToSize); + size_t ApplyDictionaryEntry(uint8_t *Data, size_t Size, size_t MaxSize, + DictionaryEntry &DE); + + template + DictionaryEntry MakeDictionaryEntryFromCMP(T Arg1, T Arg2, + const uint8_t *Data, size_t Size); + DictionaryEntry MakeDictionaryEntryFromCMP(const Word &Arg1, const Word &Arg2, + const uint8_t *Data, size_t Size); + DictionaryEntry MakeDictionaryEntryFromCMP(const void *Arg1, const void *Arg2, + const void *Arg1Mutation, + const void *Arg2Mutation, + size_t ArgSize, + const uint8_t *Data, size_t Size); + + Random &Rand; + const FuzzingOptions Options; + + // Dictionary provided by the user via -dict=DICT_FILE. + Dictionary ManualDictionary; + // Temporary dictionary modified by the fuzzer itself, + // recreated periodically. + Dictionary TempAutoDictionary; + // Persistent dictionary modified by the fuzzer, consists of + // entries that led to successful discoveries in the past mutations. + Dictionary PersistentAutoDictionary; + + Vector CurrentDictionaryEntrySequence; + + static const size_t kCmpDictionaryEntriesDequeSize = 16; + DictionaryEntry CmpDictionaryEntriesDeque[kCmpDictionaryEntriesDequeSize]; + size_t CmpDictionaryEntriesDequeIdx = 0; + + const Unit *CrossOverWith = nullptr; + Vector MutateInPlaceHere; + Vector MutateWithMaskTemp; + // CustomCrossOver needs its own buffer as a custom implementation may call + // LLVMFuzzerMutate, which in turn may resize MutateInPlaceHere. + Vector CustomCrossOverInPlaceHere; + + Vector Mutators; + Vector DefaultMutators; + Vector CurrentMutatorSequence; +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_MUTATE_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerOptions.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerOptions.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerOptions.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerOptions.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,82 @@ +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::FuzzingOptions +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_OPTIONS_H +#define LLVM_FUZZER_OPTIONS_H + +#include "FuzzerDefs.h" + +namespace fuzzer { + +struct FuzzingOptions { + int Verbosity = 1; + size_t MaxLen = 0; + size_t LenControl = 1000; + int UnitTimeoutSec = 300; + int TimeoutExitCode = 70; + int OOMExitCode = 71; + int InterruptExitCode = 72; + int ErrorExitCode = 77; + bool IgnoreTimeouts = true; + bool IgnoreOOMs = true; + bool IgnoreCrashes = false; + int MaxTotalTimeSec = 0; + int RssLimitMb = 0; + int MallocLimitMb = 0; + bool DoCrossOver = true; + int MutateDepth = 5; + bool ReduceDepth = false; + bool UseCounters = false; + bool UseMemmem = true; + bool UseCmp = false; + int UseValueProfile = false; + bool Shrink = false; + bool ReduceInputs = false; + int ReloadIntervalSec = 1; + bool ShuffleAtStartUp = true; + bool PreferSmall = true; + size_t MaxNumberOfRuns = -1L; + int ReportSlowUnits = 10; + bool OnlyASCII = false; + std::string OutputCorpus; + std::string ArtifactPrefix = "./"; + std::string ExactArtifactPath; + std::string ExitOnSrcPos; + std::string ExitOnItem; + std::string FocusFunction; + std::string DataFlowTrace; + std::string CollectDataFlow; + std::string FeaturesDir; + std::string StopFile; + bool SaveArtifacts = true; + bool PrintNEW = true; // Print a status line when new units are found; + bool PrintNewCovPcs = false; + int PrintNewCovFuncs = 0; + bool PrintFinalStats = false; + bool PrintCorpusStats = false; + bool PrintCoverage = false; + bool DumpCoverage = false; + bool DetectLeaks = true; + int PurgeAllocatorIntervalSec = 1; + int TraceMalloc = 0; + bool HandleAbrt = false; + bool HandleBus = false; + bool HandleFpe = false; + bool HandleIll = false; + bool HandleInt = false; + bool HandleSegv = false; + bool HandleTerm = false; + bool HandleXfsz = false; + bool HandleUsr1 = false; + bool HandleUsr2 = false; +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_OPTIONS_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerRandom.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerRandom.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerRandom.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerRandom.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,38 @@ +//===- FuzzerRandom.h - Internal header for the Fuzzer ----------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::Random +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_RANDOM_H +#define LLVM_FUZZER_RANDOM_H + +#include + +namespace fuzzer { +class Random : public std::minstd_rand { + public: + Random(unsigned int seed) : std::minstd_rand(seed) {} + result_type operator()() { return this->std::minstd_rand::operator()(); } + size_t Rand() { return this->operator()(); } + size_t RandBool() { return Rand() % 2; } + size_t SkewTowardsLast(size_t n) { + size_t T = this->operator()(n * n); + size_t Res = sqrt(T); + return Res; + } + size_t operator()(size_t n) { return n ? Rand() % n : 0; } + intptr_t operator()(intptr_t From, intptr_t To) { + assert(From < To); + intptr_t RangeSize = To - From + 1; + return operator()(RangeSize) + From; + } +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_RANDOM_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerSHA1.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerSHA1.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerSHA1.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerSHA1.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,32 @@ +//===- FuzzerSHA1.h - Internal header for the SHA1 utils --------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// SHA1 utils. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_SHA1_H +#define LLVM_FUZZER_SHA1_H + +#include "FuzzerDefs.h" +#include +#include + +namespace fuzzer { + +// Private copy of SHA1 implementation. +static const int kSHA1NumBytes = 20; + +// Computes SHA1 hash of 'Len' bytes in 'Data', writes kSHA1NumBytes to 'Out'. +void ComputeSHA1(const uint8_t *Data, size_t Len, uint8_t *Out); + +std::string Sha1ToString(const uint8_t Sha1[kSHA1NumBytes]); + +std::string Hash(const Unit &U); + +} // namespace fuzzer + +#endif // LLVM_FUZZER_SHA1_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerTracePC.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerTracePC.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerTracePC.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerTracePC.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,289 @@ +//===- FuzzerTracePC.h - Internal header for the Fuzzer ---------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// fuzzer::TracePC +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_TRACE_PC +#define LLVM_FUZZER_TRACE_PC + +#include "FuzzerDefs.h" +#include "FuzzerDictionary.h" +#include "FuzzerValueBitMap.h" + +#include +#include + +namespace fuzzer { + +// TableOfRecentCompares (TORC) remembers the most recently performed +// comparisons of type T. +// We record the arguments of CMP instructions in this table unconditionally +// because it seems cheaper this way than to compute some expensive +// conditions inside __sanitizer_cov_trace_cmp*. +// After the unit has been executed we may decide to use the contents of +// this table to populate a Dictionary. +template +struct TableOfRecentCompares { + static const size_t kSize = kSizeT; + struct Pair { + T A, B; + }; + ATTRIBUTE_NO_SANITIZE_ALL + void Insert(size_t Idx, const T &Arg1, const T &Arg2) { + Idx = Idx % kSize; + Table[Idx].A = Arg1; + Table[Idx].B = Arg2; + } + + Pair Get(size_t I) { return Table[I % kSize]; } + + Pair Table[kSize]; +}; + +template +struct MemMemTable { + static const size_t kSize = kSizeT; + Word MemMemWords[kSize]; + Word EmptyWord; + + void Add(const uint8_t *Data, size_t Size) { + if (Size <= 2) return; + Size = std::min(Size, Word::GetMaxSize()); + size_t Idx = SimpleFastHash(Data, Size) % kSize; + MemMemWords[Idx].Set(Data, Size); + } + const Word &Get(size_t Idx) { + for (size_t i = 0; i < kSize; i++) { + const Word &W = MemMemWords[(Idx + i) % kSize]; + if (W.size()) return W; + } + EmptyWord.Set(nullptr, 0); + return EmptyWord; + } +}; + +class TracePC { + public: + void HandleInline8bitCountersInit(uint8_t *Start, uint8_t *Stop); + void HandlePCsInit(const uintptr_t *Start, const uintptr_t *Stop); + void HandleCallerCallee(uintptr_t Caller, uintptr_t Callee); + template void HandleCmp(uintptr_t PC, T Arg1, T Arg2); + size_t GetTotalPCCoverage(); + void SetUseCounters(bool UC) { UseCounters = UC; } + void SetUseValueProfileMask(uint32_t VPMask) { UseValueProfileMask = VPMask; } + void SetPrintNewPCs(bool P) { DoPrintNewPCs = P; } + void SetPrintNewFuncs(size_t P) { NumPrintNewFuncs = P; } + void UpdateObservedPCs(); + template void CollectFeatures(Callback CB) const; + + void ResetMaps() { + ValueProfileMap.Reset(); + ClearExtraCounters(); + ClearInlineCounters(); + } + + void ClearInlineCounters(); + + void UpdateFeatureSet(size_t CurrentElementIdx, size_t CurrentElementSize); + void PrintFeatureSet(); + + void PrintModuleInfo(); + + void PrintCoverage(); + + template + void IterateCoveredFunctions(CallBack CB); + + void AddValueForMemcmp(void *caller_pc, const void *s1, const void *s2, + size_t n, bool StopAtZero); + + TableOfRecentCompares TORC4; + TableOfRecentCompares TORC8; + TableOfRecentCompares TORCW; + MemMemTable<1024> MMT; + + void RecordInitialStack(); + uintptr_t GetMaxStackOffset() const; + + template + void ForEachObservedPC(CallBack CB) { + for (auto PC : ObservedPCs) + CB(PC); + } + + void SetFocusFunction(const std::string &FuncName); + bool ObservedFocusFunction(); + + struct PCTableEntry { + uintptr_t PC, PCFlags; + }; + + uintptr_t PCTableEntryIdx(const PCTableEntry *TE); + const PCTableEntry *PCTableEntryByIdx(uintptr_t Idx); + static uintptr_t GetNextInstructionPc(uintptr_t PC); + bool PcIsFuncEntry(const PCTableEntry *TE) { return TE->PCFlags & 1; } + +private: + bool UseCounters = false; + uint32_t UseValueProfileMask = false; + bool DoPrintNewPCs = false; + size_t NumPrintNewFuncs = 0; + + // Module represents the array of 8-bit counters split into regions + // such that every region, except maybe the first and the last one, is one + // full page. + struct Module { + struct Region { + uint8_t *Start, *Stop; + bool Enabled; + bool OneFullPage; + }; + Region *Regions; + size_t NumRegions; + uint8_t *Start() { return Regions[0].Start; } + uint8_t *Stop() { return Regions[NumRegions - 1].Stop; } + size_t Size() { return Stop() - Start(); } + size_t Idx(uint8_t *P) { + assert(P >= Start() && P < Stop()); + return P - Start(); + } + }; + + Module Modules[4096]; + size_t NumModules; // linker-initialized. + size_t NumInline8bitCounters; + + template + void IterateCounterRegions(Callback CB) { + for (size_t m = 0; m < NumModules; m++) + for (size_t r = 0; r < Modules[m].NumRegions; r++) + CB(Modules[m].Regions[r]); + } + + struct { const PCTableEntry *Start, *Stop; } ModulePCTable[4096]; + size_t NumPCTables; + size_t NumPCsInPCTables; + + Set ObservedPCs; + std::unordered_map ObservedFuncs; // PC => Counter. + + uint8_t *FocusFunctionCounterPtr = nullptr; + + ValueBitMap ValueProfileMap; + uintptr_t InitialStack; +}; + +template +// void Callback(size_t FirstFeature, size_t Idx, uint8_t Value); +ATTRIBUTE_NO_SANITIZE_ALL +size_t ForEachNonZeroByte(const uint8_t *Begin, const uint8_t *End, + size_t FirstFeature, Callback Handle8bitCounter) { + typedef uintptr_t LargeType; + const size_t Step = sizeof(LargeType) / sizeof(uint8_t); + const size_t StepMask = Step - 1; + auto P = Begin; + // Iterate by 1 byte until either the alignment boundary or the end. + for (; reinterpret_cast(P) & StepMask && P < End; P++) + if (uint8_t V = *P) + Handle8bitCounter(FirstFeature, P - Begin, V); + + // Iterate by Step bytes at a time. + for (; P < End; P += Step) + if (LargeType Bundle = *reinterpret_cast(P)) + for (size_t I = 0; I < Step; I++, Bundle >>= 8) + if (uint8_t V = Bundle & 0xff) + Handle8bitCounter(FirstFeature, P - Begin + I, V); + + // Iterate by 1 byte until the end. + for (; P < End; P++) + if (uint8_t V = *P) + Handle8bitCounter(FirstFeature, P - Begin, V); + return End - Begin; +} + +// Given a non-zero Counter returns a number in the range [0,7]. +template +unsigned CounterToFeature(T Counter) { + // Returns a feature number by placing Counters into buckets as illustrated + // below. + // + // Counter bucket: [1] [2] [3] [4-7] [8-15] [16-31] [32-127] [128+] + // Feature number: 0 1 2 3 4 5 6 7 + // + // This is a heuristic taken from AFL (see + // http://lcamtuf.coredump.cx/afl/technical_details.txt). + // + // This implementation may change in the future so clients should + // not rely on it. + assert(Counter); + unsigned Bit = 0; + /**/ if (Counter >= 128) Bit = 7; + else if (Counter >= 32) Bit = 6; + else if (Counter >= 16) Bit = 5; + else if (Counter >= 8) Bit = 4; + else if (Counter >= 4) Bit = 3; + else if (Counter >= 3) Bit = 2; + else if (Counter >= 2) Bit = 1; + return Bit; +} + +template // void Callback(size_t Feature) +ATTRIBUTE_NO_SANITIZE_ADDRESS +ATTRIBUTE_NOINLINE +void TracePC::CollectFeatures(Callback HandleFeature) const { + auto Handle8bitCounter = [&](size_t FirstFeature, + size_t Idx, uint8_t Counter) { + if (UseCounters) + HandleFeature(FirstFeature + Idx * 8 + CounterToFeature(Counter)); + else + HandleFeature(FirstFeature + Idx); + }; + + size_t FirstFeature = 0; + + for (size_t i = 0; i < NumModules; i++) { + for (size_t r = 0; r < Modules[i].NumRegions; r++) { + if (!Modules[i].Regions[r].Enabled) continue; + FirstFeature += 8 * ForEachNonZeroByte(Modules[i].Regions[r].Start, + Modules[i].Regions[r].Stop, + FirstFeature, Handle8bitCounter); + } + } + + FirstFeature += + 8 * ForEachNonZeroByte(ExtraCountersBegin(), ExtraCountersEnd(), + FirstFeature, Handle8bitCounter); + + if (UseValueProfileMask) { + ValueProfileMap.ForEach([&](size_t Idx) { + HandleFeature(FirstFeature + Idx); + }); + FirstFeature += ValueProfileMap.SizeInBits(); + } + + // Step function, grows similar to 8 * Log_2(A). + auto StackDepthStepFunction = [](uint32_t A) -> uint32_t { + if (!A) return A; + uint32_t Log2 = Log(A); + if (Log2 < 3) return A; + Log2 -= 3; + return (Log2 + 1) * 8 + ((A >> Log2) & 7); + }; + assert(StackDepthStepFunction(1024) == 64); + assert(StackDepthStepFunction(1024 * 4) == 80); + assert(StackDepthStepFunction(1024 * 1024) == 144); + + if (auto MaxStackOffset = GetMaxStackOffset()) + HandleFeature(FirstFeature + StackDepthStepFunction(MaxStackOffset / 8)); +} + +extern TracePC TPC; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_TRACE_PC diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerUtil.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerUtil.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerUtil.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerUtil.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,106 @@ +//===- FuzzerUtil.h - Internal header for the Fuzzer Utils ------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// Util functions. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_UTIL_H +#define LLVM_FUZZER_UTIL_H + +#include "FuzzerBuiltins.h" +#include "FuzzerBuiltinsMsvc.h" +#include "FuzzerCommand.h" +#include "FuzzerDefs.h" + +namespace fuzzer { + +void PrintHexArray(const Unit &U, const char *PrintAfter = ""); + +void PrintHexArray(const uint8_t *Data, size_t Size, + const char *PrintAfter = ""); + +void PrintASCII(const uint8_t *Data, size_t Size, const char *PrintAfter = ""); + +void PrintASCII(const Unit &U, const char *PrintAfter = ""); + +// Changes U to contain only ASCII (isprint+isspace) characters. +// Returns true iff U has been changed. +bool ToASCII(uint8_t *Data, size_t Size); + +bool IsASCII(const Unit &U); + +bool IsASCII(const uint8_t *Data, size_t Size); + +std::string Base64(const Unit &U); + +void PrintPC(const char *SymbolizedFMT, const char *FallbackFMT, uintptr_t PC); + +std::string DescribePC(const char *SymbolizedFMT, uintptr_t PC); + +void PrintStackTrace(); + +void PrintMemoryProfile(); + +unsigned NumberOfCpuCores(); + +// Platform specific functions. +void SetSignalHandler(const FuzzingOptions& Options); + +void SleepSeconds(int Seconds); + +unsigned long GetPid(); + +size_t GetPeakRSSMb(); + +int ExecuteCommand(const Command &Cmd); + +FILE *OpenProcessPipe(const char *Command, const char *Mode); + +const void *SearchMemory(const void *haystack, size_t haystacklen, + const void *needle, size_t needlelen); + +std::string CloneArgsWithoutX(const Vector &Args, + const char *X1, const char *X2); + +inline std::string CloneArgsWithoutX(const Vector &Args, + const char *X) { + return CloneArgsWithoutX(Args, X, X); +} + +inline std::pair SplitBefore(std::string X, + std::string S) { + auto Pos = S.find(X); + if (Pos == std::string::npos) + return std::make_pair(S, ""); + return std::make_pair(S.substr(0, Pos), S.substr(Pos)); +} + +std::string DisassembleCmd(const std::string &FileName); + +std::string SearchRegexCmd(const std::string &Regex); + +size_t SimpleFastHash(const uint8_t *Data, size_t Size); + +inline uint32_t Log(uint32_t X) { return 32 - Clz(X) - 1; } + +inline size_t PageSize() { return 4096; } +inline uint8_t *RoundUpByPage(uint8_t *P) { + uintptr_t X = reinterpret_cast(P); + size_t Mask = PageSize() - 1; + X = (X + Mask) & ~Mask; + return reinterpret_cast(X); +} +inline uint8_t *RoundDownByPage(uint8_t *P) { + uintptr_t X = reinterpret_cast(P); + size_t Mask = PageSize() - 1; + X = X & ~Mask; + return reinterpret_cast(X); +} + +} // namespace fuzzer + +#endif // LLVM_FUZZER_UTIL_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerValueBitMap.h deepin-terminal-5.4.13/FuzzyTest/include/FuzzerValueBitMap.h --- deepin-terminal-5.0.0+ds1/FuzzyTest/include/FuzzerValueBitMap.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/include/FuzzerValueBitMap.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +//===- FuzzerValueBitMap.h - INTERNAL - Bit map -----------------*- C++ -* ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// ValueBitMap. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_FUZZER_VALUE_BIT_MAP_H +#define LLVM_FUZZER_VALUE_BIT_MAP_H + +#include "FuzzerDefs.h" + +namespace fuzzer { + +// A bit map containing kMapSizeInWords bits. +struct ValueBitMap { + static const size_t kMapSizeInBits = 1 << 16; + static const size_t kMapPrimeMod = 65371; // Largest Prime < kMapSizeInBits; + static const size_t kBitsInWord = (sizeof(uintptr_t) * 8); + static const size_t kMapSizeInWords = kMapSizeInBits / kBitsInWord; + public: + + // Clears all bits. + void Reset() { memset(Map, 0, sizeof(Map)); } + + // Computes a hash function of Value and sets the corresponding bit. + // Returns true if the bit was changed from 0 to 1. + ATTRIBUTE_NO_SANITIZE_ALL + inline bool AddValue(uintptr_t Value) { + uintptr_t Idx = Value % kMapSizeInBits; + uintptr_t WordIdx = Idx / kBitsInWord; + uintptr_t BitIdx = Idx % kBitsInWord; + uintptr_t Old = Map[WordIdx]; + uintptr_t New = Old | (1ULL << BitIdx); + Map[WordIdx] = New; + return New != Old; + } + + ATTRIBUTE_NO_SANITIZE_ALL + inline bool AddValueModPrime(uintptr_t Value) { + return AddValue(Value % kMapPrimeMod); + } + + inline bool Get(uintptr_t Idx) { + assert(Idx < kMapSizeInBits); + uintptr_t WordIdx = Idx / kBitsInWord; + uintptr_t BitIdx = Idx % kBitsInWord; + return Map[WordIdx] & (1ULL << BitIdx); + } + + size_t SizeInBits() const { return kMapSizeInBits; } + + template + ATTRIBUTE_NO_SANITIZE_ALL + void ForEach(Callback CB) const { + for (size_t i = 0; i < kMapSizeInWords; i++) + if (uintptr_t M = Map[i]) + for (size_t j = 0; j < sizeof(M) * 8; j++) + if (M & ((uintptr_t)1 << j)) + CB(i * sizeof(M) * 8 + j); + } + + private: + ATTRIBUTE_ALIGNED(512) uintptr_t Map[kMapSizeInWords]; +}; + +} // namespace fuzzer + +#endif // LLVM_FUZZER_VALUE_BIT_MAP_H diff -Nru deepin-terminal-5.0.0+ds1/FuzzyTest/src/main.cpp deepin-terminal-5.4.13/FuzzyTest/src/main.cpp --- deepin-terminal-5.0.0+ds1/FuzzyTest/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/FuzzyTest/src/main.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,38 @@ + +#include +#include +#include +#include +using namespace std; + +void on_event(AtspiEvent *event, void *data) +{ + g_object_unref(event->source); + g_free(event->type); + g_value_unset(&event->any_data); + g_free(event); +} + +int init(void) +{ + int result = atspi_init(); + if (result != 0) + { + std::cout <<"init error"< - - - - - - - - - - - - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/i18n/create_po.sh deepin-terminal-5.4.13/i18n/create_po.sh --- deepin-terminal-5.0.0+ds1/i18n/create_po.sh 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/create_po.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -#!/bin/sh -for lang in ../po/* -do - msginit --no-translator -i deepin-terminal.pot -l $(basename ${lang}).UTF-8 -o ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal.po -done diff -Nru deepin-terminal-5.0.0+ds1/i18n/create_pot.sh deepin-terminal-5.4.13/i18n/create_pot.sh --- deepin-terminal-5.0.0+ds1/i18n/create_pot.sh 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/create_pot.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#!/bin/sh - -xgettext --language="C#" --keyword=_ --escape --sort-output --from-code=utf-8 --output=deepin-terminal.pot ../main.vala ../widget/about_widget.vala ../widget/add_button.vala ../widget/workspace_manager.vala ../widget/remote_server_dialog.vala ../widget/confirm_dialog.vala ../widget/preference_slidebar.vala ../widget/preference.vala ../widget/terminal.vala ../widget/search_entry.vala ../widget/config_window.vala ../widget/appbar.vala ../widget/remote_panel.vala ../widget/tabbar.vala ../widget/file_button.vala ../widget/command_panel.vala ../widget/command_button.vala ../widget/command_dialog.vala ../widget/entry_menu.vala ../widget/shortcut_entry.vala diff -Nru deepin-terminal-5.0.0+ds1/i18n/deepin-terminal.pot deepin-terminal-5.4.13/i18n/deepin-terminal.pot --- deepin-terminal-5.0.0+ds1/i18n/deepin-terminal.pot 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/deepin-terminal.pot 1970-01-01 00:00:00.000000000 +0000 @@ -1,700 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple " -"windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/i18n/merge_po.sh deepin-terminal-5.4.13/i18n/merge_po.sh --- deepin-terminal-5.0.0+ds1/i18n/merge_po.sh 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/merge_po.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -#!/bin/sh -for lang in ../po/* -do - mv ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal.po ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal_backup.po - msgmerge ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal_backup.po deepin-terminal.pot > ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal.po - rm ../po/$(basename ${lang})/LC_MESSAGES/deepin-terminal_backup.po -done - diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_af.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_af.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_af.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_af.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalNew WindowQuake TerminalTerminalTerminaalUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_am_ET.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_am_ET.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_am_ET.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_am_ET.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminalየ ዲፕኢን ተርሚናልNew WindowQuake TerminalTerminalተርሚናልUse the command lineየ ትእዛዝ መስመር ይጠቀሙshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ar.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ar.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ar.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ar.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminalطرفية ديبينNew Windowنافذة جديدةQuake Terminalطرفية كواكTerminalالطرفيةUse the command lineاستخدام سطر الأوامرshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ast.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ast.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ast.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ast.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowVentana nuevaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUsa la llinia de comandosshell;prompt;command;commandline;shell;comandu;llinia;llinia de comandos;comandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_az.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_az.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_az.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_az.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalTerminalUse the command lineƏmr sətirindən istifadə etshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_bg.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_bg.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_bg.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_bg.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin терминалNew WindowНов прозорецQuake TerminalQuake терминалTerminalТерминалUse the command lineИзползване на команден редshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_bn.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_bn.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_bn.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_bn.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalNew WindowQuake TerminalTerminalপ্রান্তিকUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ca.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ca.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ca.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ca.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal del Deepin New WindowFinestra novaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUseu la línia d'ordresshell;prompt;command;commandline;shell;intèrpret;intèrpret d'ordres;ordres;ordre;línia d'ordres; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_cs.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_cs.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_cs.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_cs.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminálNew WindowNové oknoQuake TerminalTerminál QuakeTerminalTerminálUse the command linePoužít příkazový řádekshell;prompt;command;commandline;shell;prompt;příkaz;příkazový řádek; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_da.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_da.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_da.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_da.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin terminalNew WindowNyt vindueQuake TerminalQuake-terminalTerminalTerminalUse the command lineBrug kommandolinjenshell;prompt;command;commandline;skal;prompt;kommando;kommandolinje; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_de.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_de.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_de.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_de.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowNeues FensterQuake TerminalQuake TerminalTerminalTerminalUse the command lineKommandozeile benutzenshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_el.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_el.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_el.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_el.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TερματικόNew WindowΝέο παράθυροQuake TerminalΤερματικό "Quake"TerminalΤερματικόUse the command lineΧρήση της γραμμής εντολώνshell;prompt;command;commandline;κέλυφος;προτροπή;εντολή;γραμμή-εντολών; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_en_AU.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_en_AU.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_en_AU.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_en_AU.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalTerminalUse the command lineUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_eo.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_eo.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_eo.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_eo.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin terminaloNew WindowQuake TerminalTerminalTerminaloUse the command lineUzi la komandlinioshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_es_419.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_es_419.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_es_419.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_es_419.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowNueva ventanaQuake TerminalTerminal en modo QuakeTerminalTerminal Use the command lineUsar la línea de comandosshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_es.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_es.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_es.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_es.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowNueva ventanaQuake TerminalTerminal QuakeTerminalTerminal Use the command lineUsar la línea de comandoshell;prompt;command;commandline;shell;prompt;command;comando;commandline;lineadecomandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fa.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fa.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fa.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fa.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalNew WindowQuake TerminalTerminalترمینالUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fil.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fil.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fil.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fil.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fi.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fi.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fi.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fi.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin pääteNew WindowUusi ikkunaQuake TerminalQuake pääteTerminalPääteUse the command lineKäytä komentoriviäshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fr.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fr.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_fr.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_fr.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowNouvelle fenêtreQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUtiliser la ligne de commandeshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_gl_ES.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_gl_ES.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_gl_ES.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_gl_ES.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminalNew WindowQuake TerminalTerminalTerminalUse the command lineEmpregar a liña de comandosshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_he.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_he.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_he.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_he.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminalמסוף DeepinNew WindowQuake TerminalTerminalמסוףUse the command lineהשתמש בשורת פקודהshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hi_IN.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hi_IN.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hi_IN.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hi_IN.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminalडीपइन छोरNew WindowQuake TerminalTerminalटर्मिनलUse the command lineआदेश रेखा का उपयोग करेंshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hr.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hr.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hr.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hr.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin terminalNew WindowQuake TerminalTerminalTerminalUse the command lineKoristi naredbeni redakshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hu.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hu.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hu.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hu.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminálNew WindowÚj ablakQuake TerminalQuake TerminálTerminalTerminálUse the command line Parancssor használatashell;prompt;command;commandline;shell;prompt;parancs;parancssor \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hy.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hy.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_hy.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_hy.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin ՏերմինալNew WindowQuake TerminalTerminalUse the command lineՕգտագործել հրամանների տողըshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_id.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_id.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_id.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_id.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowJendela BaruQuake TerminalTerminal QuakeTerminalTerminalUse the command lineGunakan baris perintahshell;prompt;command;commandline;shell;prompt;perintah;barisperintah; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_it.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_it.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_it.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_it.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowNuova finestraQuake TerminalTerminale in primo pianoTerminalTerminaleUse the command lineUsa linea di comandoshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ja.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ja.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ja.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ja.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin ターミナルNew Window新しいウィンドウQuake Terminalターミナルを振動させるTerminalターミナルUse the command lineコマンドラインを使用するshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ko.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ko.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ko.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ko.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin 터미널New Window새 창Quake Terminal퀘이크 터미널Terminal터미널Use the command line명령 행 사용shell;prompt;command;commandline;shell;prompt;command;commandline;쉘; 프롬프트; 명령; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_lt.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_lt.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_lt.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_lt.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin terminalasNew WindowNaujas langasQuake TerminalQuake terminalasTerminalTerminalasUse the command lineNaudoti komandų eilutęshell;prompt;command;commandline;apvalkalas;užklausa;komanda;komandų eilutė;eilutė;komandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ml.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ml.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ml.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ml.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminalഡീപിൻ ടെർമിനൽNew WindowQuake TerminalTerminalടെർമിനൽUse the command lineകമാൻഡ് ലൈൻ ഉപയോഗിക്കുകshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_mn.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_mn.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_mn.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_mn.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalДээпин ТерминалNew WindowШинэ ЦонхQuake TerminalКуаке ТерминалTerminalТерминалUse the command lineКомманд мѳр ашиглахshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ms.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ms.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ms.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ms.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowTerminal BaharuQuake TerminalTerminal QuakeTerminalTerminalUse the command lineguna baris perintahshell;prompt;command;commandline;shell;prom;perintah;barisperintah; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_nb.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_nb.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_nb.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_nb.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin terminalNew WindowQuake TerminalTerminalTerminalUse the command lineBruk kommandolinjenshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ne.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ne.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ne.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ne.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalNew WindowQuake TerminalTerminalटर्मिनलUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_nl.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_nl.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_nl.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_nl.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowNieuw vensterQuake TerminalQuake-terminalTerminalTerminalUse the command lineDe opdrachtregel gebruikenshell;prompt;command;commandline;shell;prompt;opdracht;opdrachtregel; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pam.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pam.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pam.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pam.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalUse the command lineGamitan ing command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pl.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pl.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pl.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pl.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowNowe oknoQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUżyj wiersza poleceńshell;prompt;command;commandline;powłoka;zapytanie;polecenie;wiersz;poleceń; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pt_BR.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pt_BR.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pt_BR.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pt_BR.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowNova JanelaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUsar a linha de comandoshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pt.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pt.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_pt.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_pt.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowNova JanelaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUtilize a linha de comandosshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ro.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ro.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ro.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ro.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminalul DeepinNew WindowQuake TerminalTerminalTerminalulUse the command lineUtilizare linia de comandăshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ru.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ru.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ru.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ru.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminal Терминал Deepin New WindowНовое ОкноQuake TerminalВыпадающий ТерминалTerminalТерминалUse the command lineИспользовать командную строкуshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sk.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sk.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sk.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sk.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminálNew WindowNové oknoQuake TerminalQuake terminálTerminalTerminálUse the command linePoužiť príkazový riadokshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sl.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sl.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sl.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sl.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminal DeepinNew WindowQuake TerminalTerminalTerminalUse the command lineUporabi ukazno vrsticoshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sq.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sq.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sq.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sq.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalTerminali DeepinNew WindowDritare e ReQuake TerminalTerminal QuakeTerminalTerminalUse the command linePërdorni rresht urdhrashshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sr.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sr.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sr.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sr.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalДипин ТерминалNew WindowНови прозорQuake TerminalСпуштајући терминалTerminalТерминалUse the command lineКористите командну линијуshell;prompt;command;commandline;shell;prompt;команда;командна линија; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sv.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sv.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_sv.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_sv.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin-terminalNew WindowNytt fönsterQuake TerminalTerminalTerminalUse the command lineAnvänd kommandoradenshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ta.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ta.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ta.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ta.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalNew WindowQuake TerminalTerminalமுனையம்Use the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_tr.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_tr.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_tr.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_tr.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin UçbirimNew WindowYeni PencereQuake TerminalQuake UçbirimTerminalUçbirimUse the command lineKomut satırını kullanshell;prompt;command;commandline;shell;prompt;command;commandline;kabuk;komut;komutsatırı; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - -desktopDeepin TerminalNew WindowQuake TerminalTerminalUse the command lineshell;prompt;command;commandline; diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ug.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ug.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_ug.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_ug.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin تېرمىنالىNew WindowQuake TerminalTerminalتېرمىنالUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_uk.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_uk.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_uk.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_uk.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalТермінал DeepinNew WindowНове вікноQuake TerminalТермінал QuakeTerminalТерміналUse the command lineВикористовувати командний рядокshell;prompt;command;commandline;shell;prompt;command;commandline;оболонка;запит;команда;командна;рядок; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_vi.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_vi.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_vi.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_vi.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalĐầu cuốiUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_CN.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_CN.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_CN.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_CN.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin Terminal深度终端New Window新建窗口Quake Terminal雷神终端Terminal终端Use the command line使用命令行shell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_HK.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_HK.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_HK.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_HK.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin 終端機New WindowQuake TerminalTerminal終端機Use the command line使用命令列shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_TW.ts deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_TW.ts --- deepin-terminal-5.0.0+ds1/i18n/translations/deepin-terminal-desktop/desktop_zh_TW.ts 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/i18n/translations/deepin-terminal-desktop/desktop_zh_TW.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -desktopDeepin TerminalDeepin 終端器New Window開新視窗Quake Terminal雷神模式終端器Terminal終端機Use the command line使用命令列介面shell;prompt;command;commandline;shell;prompt;command;commandline;提示;指令;指令列; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/active_theme_border.svg deepin-terminal-5.4.13/image/active_theme_border.svg --- deepin-terminal-5.0.0+ds1/image/active_theme_border.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/active_theme_border.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ - - - - active_theme_border - Created with Sketch. - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_dark_hover.svg deepin-terminal-5.4.13/image/back_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/back_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - back_dark_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_dark_normal.svg deepin-terminal-5.4.13/image/back_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/back_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - back_dark_normal - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_dark_press.svg deepin-terminal-5.4.13/image/back_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/back_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - back_dark_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_light_hover.svg deepin-terminal-5.4.13/image/back_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/back_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - back_light_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_light_normal.svg deepin-terminal-5.4.13/image/back_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/back_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - back_light_normal - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/back_light_press.svg deepin-terminal-5.4.13/image/back_light_press.svg --- deepin-terminal-5.0.0+ds1/image/back_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/back_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - back_light_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_dark_hover.svg deepin-terminal-5.4.13/image/button_edit_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_dark_hover - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_dark_normal.svg deepin-terminal-5.4.13/image/button_edit_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_dark_normal - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_dark_press.svg deepin-terminal-5.4.13/image/button_edit_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_dark_press - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_light_hover.svg deepin-terminal-5.4.13/image/button_edit_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_light_hover - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_light_normal.svg deepin-terminal-5.4.13/image/button_edit_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_light_normal - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/button_edit_light_press.svg deepin-terminal-5.4.13/image/button_edit_light_press.svg --- deepin-terminal-5.0.0+ds1/image/button_edit_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/button_edit_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - button_edit_light_press - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_checked_hover.svg deepin-terminal-5.4.13/image/checkbox_checked_hover.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_checked_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_checked_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ - - - - checkbox_checked_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_checked_insensitive.svg deepin-terminal-5.4.13/image/checkbox_checked_insensitive.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_checked_insensitive.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_checked_insensitive.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - checkbox_checked_insensitive - Created with Sketch. - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_checked_normal.svg deepin-terminal-5.4.13/image/checkbox_checked_normal.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_checked_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_checked_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - checkbox-checked - Created with Sketch. - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_checked_press.svg deepin-terminal-5.4.13/image/checkbox_checked_press.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_checked_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_checked_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - checkbox_checked_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_hover.svg deepin-terminal-5.4.13/image/checkbox_unchecked_hover.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_unchecked_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ - - - - checkbox_unchecked_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_insensitive.svg deepin-terminal-5.4.13/image/checkbox_unchecked_insensitive.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_insensitive.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_unchecked_insensitive.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - checkbox_unchecked_insensitive - Created with Sketch. - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_normal.svg deepin-terminal-5.4.13/image/checkbox_unchecked_normal.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_unchecked_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - checkbox_unchecked - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_press.svg deepin-terminal-5.4.13/image/checkbox_unchecked_press.svg --- deepin-terminal-5.0.0+ds1/image/checkbox_unchecked_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/checkbox_unchecked_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - checkbox_unchecked_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/command_dark.svg deepin-terminal-5.4.13/image/command_dark.svg --- deepin-terminal-5.0.0+ds1/image/command_dark.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/command_dark.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - command_dark_dark - Created with Sketch. - - - - - - - - - - - - - - - - - - - >_ - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/command_light.svg deepin-terminal-5.4.13/image/command_light.svg --- deepin-terminal-5.0.0+ds1/image/command_light.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/command_light.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - command_dark_light - Created with Sketch. - - - - - - - - - - - - - - - - - - >_ - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_block_checked.svg deepin-terminal-5.4.13/image/cursor_block_checked.svg --- deepin-terminal-5.0.0+ds1/image/cursor_block_checked.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_block_checked.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - cursor_block_checked - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_block_hover.svg deepin-terminal-5.4.13/image/cursor_block_hover.svg --- deepin-terminal-5.0.0+ds1/image/cursor_block_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_block_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - cursor_block_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_block_normal.svg deepin-terminal-5.4.13/image/cursor_block_normal.svg --- deepin-terminal-5.0.0+ds1/image/cursor_block_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_block_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ - - - - cursor_block_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_block_press.svg deepin-terminal-5.4.13/image/cursor_block_press.svg --- deepin-terminal-5.0.0+ds1/image/cursor_block_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_block_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ - - - - cursor_block_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_ibeam_checked.svg deepin-terminal-5.4.13/image/cursor_ibeam_checked.svg --- deepin-terminal-5.0.0+ds1/image/cursor_ibeam_checked.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_ibeam_checked.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - cursor_ibeam_checked - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_ibeam_hover.svg deepin-terminal-5.4.13/image/cursor_ibeam_hover.svg --- deepin-terminal-5.0.0+ds1/image/cursor_ibeam_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_ibeam_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - cursor_ibeam_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_ibeam_normal.svg deepin-terminal-5.4.13/image/cursor_ibeam_normal.svg --- deepin-terminal-5.0.0+ds1/image/cursor_ibeam_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_ibeam_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ - - - - cursor_ibeam_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_ibeam_press.svg deepin-terminal-5.4.13/image/cursor_ibeam_press.svg --- deepin-terminal-5.0.0+ds1/image/cursor_ibeam_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_ibeam_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ - - - - cursor_ibeam_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_underline_checked.svg deepin-terminal-5.4.13/image/cursor_underline_checked.svg --- deepin-terminal-5.0.0+ds1/image/cursor_underline_checked.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_underline_checked.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - cursor_underline_checked - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_underline_hover.svg deepin-terminal-5.4.13/image/cursor_underline_hover.svg --- deepin-terminal-5.0.0+ds1/image/cursor_underline_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_underline_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - cursor_underline_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_underline_normal.svg deepin-terminal-5.4.13/image/cursor_underline_normal.svg --- deepin-terminal-5.0.0+ds1/image/cursor_underline_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_underline_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ - - - - cursor_underline_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/cursor_underline_press.svg deepin-terminal-5.4.13/image/cursor_underline_press.svg --- deepin-terminal-5.0.0+ds1/image/cursor_underline_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/cursor_underline_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ - - - - cursor_underline_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/dark_theme_border.svg deepin-terminal-5.4.13/image/dark_theme_border.svg --- deepin-terminal-5.0.0+ds1/image/dark_theme_border.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/dark_theme_border.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ - - - - dark_theme_border - Created with Sketch. - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/deepin-terminal.svg deepin-terminal-5.4.13/image/deepin-terminal.svg --- deepin-terminal-5.0.0+ds1/image/deepin-terminal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/deepin-terminal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/dialog_icon.svg deepin-terminal-5.4.13/image/dialog_icon.svg --- deepin-terminal-5.0.0+ds1/image/dialog_icon.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/dialog_icon.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - 深度终端-64px - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/file_add_hover.svg deepin-terminal-5.4.13/image/file_add_hover.svg --- deepin-terminal-5.0.0+ds1/image/file_add_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/file_add_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - fileload_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/file_add_normal.svg deepin-terminal-5.4.13/image/file_add_normal.svg --- deepin-terminal-5.0.0+ds1/image/file_add_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/file_add_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - fileload_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/file_add_press.svg deepin-terminal-5.4.13/image/file_add_press.svg --- deepin-terminal-5.0.0+ds1/image/file_add_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/file_add_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - fileload_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/icon.svg deepin-terminal-5.4.13/image/icon.svg --- deepin-terminal-5.0.0+ds1/image/icon.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/icon.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - 深度终端-96px - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/light_theme_border.svg deepin-terminal-5.4.13/image/light_theme_border.svg --- deepin-terminal-5.0.0+ds1/image/light_theme_border.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/light_theme_border.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ - - - - light_theme_border - Created with Sketch. - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/list_arrow_dark.svg deepin-terminal-5.4.13/image/list_arrow_dark.svg --- deepin-terminal-5.0.0+ds1/image/list_arrow_dark.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/list_arrow_dark.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - 菜单箭头选中 - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/list_arrow_light.svg deepin-terminal-5.4.13/image/list_arrow_light.svg --- deepin-terminal-5.0.0+ds1/image/list_arrow_light.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/list_arrow_light.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - 菜单箭头 - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/logo.svg deepin-terminal-5.4.13/image/logo.svg --- deepin-terminal-5.0.0+ds1/image/logo.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/logo.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - logo - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_hide_hover.svg deepin-terminal-5.4.13/image/password_hide_hover.svg --- deepin-terminal-5.0.0+ds1/image/password_hide_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_hide_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - hide_password_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_hide_normal.svg deepin-terminal-5.4.13/image/password_hide_normal.svg --- deepin-terminal-5.0.0+ds1/image/password_hide_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_hide_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - hide_password_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_hide_press.svg deepin-terminal-5.4.13/image/password_hide_press.svg --- deepin-terminal-5.0.0+ds1/image/password_hide_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_hide_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - hide_password_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_show_hover.svg deepin-terminal-5.4.13/image/password_show_hover.svg --- deepin-terminal-5.0.0+ds1/image/password_show_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_show_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - show_password_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_show_normal.svg deepin-terminal-5.4.13/image/password_show_normal.svg --- deepin-terminal-5.0.0+ds1/image/password_show_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_show_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - show_password_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/password_show_press.svg deepin-terminal-5.4.13/image/password_show_press.svg --- deepin-terminal-5.0.0+ds1/image/password_show_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/password_show_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - show_password_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/progress_pointer.svg deepin-terminal-5.4.13/image/progress_pointer.svg --- deepin-terminal-5.0.0+ds1/image/progress_pointer.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/progress_pointer.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - slider_handle - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_hover.svg deepin-terminal-5.4.13/image/quit_fullscreen_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_normal.svg deepin-terminal-5.4.13/image/quit_fullscreen_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_press.svg deepin-terminal-5.4.13/image/quit_fullscreen_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_hover.svg deepin-terminal-5.4.13/image/quit_fullscreen_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_normal.svg deepin-terminal-5.4.13/image/quit_fullscreen_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_press.svg deepin-terminal-5.4.13/image/quit_fullscreen_light_press.svg --- deepin-terminal-5.0.0+ds1/image/quit_fullscreen_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/quit_fullscreen_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/reset_button_hover.svg deepin-terminal-5.4.13/image/reset_button_hover.svg --- deepin-terminal-5.0.0+ds1/image/reset_button_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/reset_button_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - reset_button_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/reset_button_normal.svg deepin-terminal-5.4.13/image/reset_button_normal.svg --- deepin-terminal-5.0.0+ds1/image/reset_button_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/reset_button_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - reset_button_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/reset_button_press.svg deepin-terminal-5.4.13/image/reset_button_press.svg --- deepin-terminal-5.0.0+ds1/image/reset_button_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/reset_button_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - reset_button_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/resize_grip.svg deepin-terminal-5.4.13/image/resize_grip.svg --- deepin-terminal-5.0.0+ds1/image/resize_grip.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/resize_grip.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_dark_hover.svg deepin-terminal-5.4.13/image/search_clear_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - search_clear_dark_hover - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_dark_normal.svg deepin-terminal-5.4.13/image/search_clear_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - search_clear_dark_normal - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_dark_press.svg deepin-terminal-5.4.13/image/search_clear_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - search_clear_dark_press - Created with Sketch. - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_light_hover.svg deepin-terminal-5.4.13/image/search_clear_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - search_clear_light_hover - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_light_normal.svg deepin-terminal-5.4.13/image/search_clear_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - search_clear_light_normal - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_clear_light_press.svg deepin-terminal-5.4.13/image/search_clear_light_press.svg --- deepin-terminal-5.0.0+ds1/image/search_clear_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_clear_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ - - - - search_clear_light_press - Created with Sketch. - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_dark_hover.svg deepin-terminal-5.4.13/image/search_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon_dark - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_dark_normal.svg deepin-terminal-5.4.13/image/search_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon_dark - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_dark_press.svg deepin-terminal-5.4.13/image/search_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/search_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon_dark - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_light_hover.svg deepin-terminal-5.4.13/image/search_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_light_normal.svg deepin-terminal-5.4.13/image/search_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_light_press.svg deepin-terminal-5.4.13/image/search_light_press.svg --- deepin-terminal-5.0.0+ds1/image/search_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - search_icon - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_dark_disabled.svg deepin-terminal-5.4.13/image/search_next_dark_disabled.svg --- deepin-terminal-5.0.0+ds1/image/search_next_dark_disabled.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_dark_disabled.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_dark_disabled - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_dark_hover.svg deepin-terminal-5.4.13/image/search_next_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_next_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_dark_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_dark_normal.svg deepin-terminal-5.4.13/image/search_next_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_next_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_dark_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_dark_press.svg deepin-terminal-5.4.13/image/search_next_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/search_next_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_dark_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_light_hover.svg deepin-terminal-5.4.13/image/search_next_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_next_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_light_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_light_normal.svg deepin-terminal-5.4.13/image/search_next_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_next_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_light_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_next_light_press.svg deepin-terminal-5.4.13/image/search_next_light_press.svg --- deepin-terminal-5.0.0+ds1/image/search_next_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_next_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_next_light_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_dark_disabled.svg deepin-terminal-5.4.13/image/search_previous_dark_disabled.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_dark_disabled.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_dark_disabled.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_dark_disabled - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_dark_hover.svg deepin-terminal-5.4.13/image/search_previous_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_dark_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_dark_normal.svg deepin-terminal-5.4.13/image/search_previous_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_dark_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_dark_press.svg deepin-terminal-5.4.13/image/search_previous_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_dark_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_light_hover.svg deepin-terminal-5.4.13/image/search_previous_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_light_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_light_normal.svg deepin-terminal-5.4.13/image/search_previous_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_light_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/search_previous_light_press.svg deepin-terminal-5.4.13/image/search_previous_light_press.svg --- deepin-terminal-5.0.0+ds1/image/search_previous_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/search_previous_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - search_previous_light_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/server_dark.svg deepin-terminal-5.4.13/image/server_dark.svg --- deepin-terminal-5.0.0+ds1/image/server_dark.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/server_dark.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ - - - - server_dark - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 178.890.46.30 - - - 远程服务器1 - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/server_group_dark.svg deepin-terminal-5.4.13/image/server_group_dark.svg --- deepin-terminal-5.0.0+ds1/image/server_group_dark.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/server_group_dark.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - server_group_dark - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/server_group_light.svg deepin-terminal-5.4.13/image/server_group_light.svg --- deepin-terminal-5.0.0+ds1/image/server_group_light.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/server_group_light.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ - - - - server_group_light - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/server_light.svg deepin-terminal-5.4.13/image/server_light.svg --- deepin-terminal-5.0.0+ds1/image/server_light.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/server_light.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - server_light - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/shortcut_button_left.svg deepin-terminal-5.4.13/image/shortcut_button_left.svg --- deepin-terminal-5.0.0+ds1/image/shortcut_button_left.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/shortcut_button_left.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - shortcut_button_left - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/shortcut_button_right.svg deepin-terminal-5.4.13/image/shortcut_button_right.svg --- deepin-terminal-5.0.0+ds1/image/shortcut_button_right.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/shortcut_button_right.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - shortcut_button_right - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_dark_hover.svg deepin-terminal-5.4.13/image/tab_add_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_dark_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_dark_normal.svg deepin-terminal-5.4.13/image/tab_add_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_dark_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_dark_press.svg deepin-terminal-5.4.13/image/tab_add_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_dark_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_light_hover.svg deepin-terminal-5.4.13/image/tab_add_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_light_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_light_normal.svg deepin-terminal-5.4.13/image/tab_add_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_light_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_add_light_press.svg deepin-terminal-5.4.13/image/tab_add_light_press.svg --- deepin-terminal-5.0.0+ds1/image/tab_add_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_add_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - tab_add_light_press - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_close_hover.svg deepin-terminal-5.4.13/image/tab_close_hover.svg --- deepin-terminal-5.0.0+ds1/image/tab_close_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_close_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - tab_close_hover - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_close_normal.svg deepin-terminal-5.4.13/image/tab_close_normal.svg --- deepin-terminal-5.0.0+ds1/image/tab_close_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_close_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - tab_close_normal - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/tab_close_press.svg deepin-terminal-5.4.13/image/tab_close_press.svg --- deepin-terminal-5.0.0+ds1/image/tab_close_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/tab_close_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - tab_close_press - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/titlebar_close_hover.svg deepin-terminal-5.4.13/image/titlebar_close_hover.svg --- deepin-terminal-5.0.0+ds1/image/titlebar_close_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/titlebar_close_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - window_close_light_hover - Created with Sketch. - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/titlebar_close_normal.svg deepin-terminal-5.4.13/image/titlebar_close_normal.svg --- deepin-terminal-5.0.0+ds1/image/titlebar_close_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/titlebar_close_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - window_close_light_normal - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/titlebar_close_press.svg deepin-terminal-5.4.13/image/titlebar_close_press.svg --- deepin-terminal-5.0.0+ds1/image/titlebar_close_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/titlebar_close_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - window_close_light_press - Created with Sketch. - - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/title_icon.svg deepin-terminal-5.4.13/image/title_icon.svg --- deepin-terminal-5.0.0+ds1/image/title_icon.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/title_icon.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - 深度终端-24px - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_dark_hover.svg deepin-terminal-5.4.13/image/window_close_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_close_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_dark_normal.svg deepin-terminal-5.4.13/image/window_close_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_close_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_dark_press.svg deepin-terminal-5.4.13/image/window_close_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/window_close_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_light_hover.svg deepin-terminal-5.4.13/image/window_close_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_close_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_light_normal.svg deepin-terminal-5.4.13/image/window_close_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_close_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_close_light_press.svg deepin-terminal-5.4.13/image/window_close_light_press.svg --- deepin-terminal-5.0.0+ds1/image/window_close_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_close_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_dark_hover.svg deepin-terminal-5.4.13/image/window_max_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_max_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_dark_normal.svg deepin-terminal-5.4.13/image/window_max_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_max_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_dark_press.svg deepin-terminal-5.4.13/image/window_max_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/window_max_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_light_hover.svg deepin-terminal-5.4.13/image/window_max_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_max_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_light_normal.svg deepin-terminal-5.4.13/image/window_max_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_max_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_max_light_press.svg deepin-terminal-5.4.13/image/window_max_light_press.svg --- deepin-terminal-5.0.0+ds1/image/window_max_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_max_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_dark_hover.svg deepin-terminal-5.4.13/image/window_menu_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_dark_normal.svg deepin-terminal-5.4.13/image/window_menu_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_dark_press.svg deepin-terminal-5.4.13/image/window_menu_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_light_hover.svg deepin-terminal-5.4.13/image/window_menu_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_light_normal.svg deepin-terminal-5.4.13/image/window_menu_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_menu_light_press.svg deepin-terminal-5.4.13/image/window_menu_light_press.svg --- deepin-terminal-5.0.0+ds1/image/window_menu_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_menu_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_dark_hover.svg deepin-terminal-5.4.13/image/window_min_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_min_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_dark_normal.svg deepin-terminal-5.4.13/image/window_min_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_min_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_dark_press.svg deepin-terminal-5.4.13/image/window_min_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/window_min_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_light_hover.svg deepin-terminal-5.4.13/image/window_min_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_min_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_light_normal.svg deepin-terminal-5.4.13/image/window_min_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_min_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_min_light_press.svg deepin-terminal-5.4.13/image/window_min_light_press.svg --- deepin-terminal-5.0.0+ds1/image/window_min_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_min_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_dark_hover.svg deepin-terminal-5.4.13/image/window_unmax_dark_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_dark_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_dark_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_dark_normal.svg deepin-terminal-5.4.13/image/window_unmax_dark_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_dark_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_dark_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_dark_press.svg deepin-terminal-5.4.13/image/window_unmax_dark_press.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_dark_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_dark_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_light_hover.svg deepin-terminal-5.4.13/image/window_unmax_light_hover.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_light_hover.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_light_hover.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_light_normal.svg deepin-terminal-5.4.13/image/window_unmax_light_normal.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_light_normal.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_light_normal.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ - - - diff -Nru deepin-terminal-5.0.0+ds1/image/window_unmax_light_press.svg deepin-terminal-5.4.13/image/window_unmax_light_press.svg --- deepin-terminal-5.0.0+ds1/image/window_unmax_light_press.svg 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/image/window_unmax_light_press.svg 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru deepin-terminal-5.0.0+ds1/lib/animation.vala deepin-terminal-5.4.13/lib/animation.vala --- deepin-terminal-5.0.0+ds1/lib/animation.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/animation.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,141 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * - * Copyright (C) 2011,2012 Canonical Ltd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Authors: Robert Ancell - * Michael Terry - */ - -namespace Animation { - public class AnimateTimer : Object { - public bool is_running { get { return timeout != 0; } } - public double progress { get; private set; } - - /* speed is in milliseconds */ - public int speed { get; set; } - - public unowned EasingFunc easing_func { get; private set; } - - /* progress is from 0.0 to 1.0 */ - public signal void animate (double progress); - - /* AnimateTimer requires two things: an easing function and a speed. - - The speed is just the duration of the animation in milliseconds. - - The easing function describes how fast the animation occurs at different - parts of the duration. - - See http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html - for examples of various easing functions. - - A few are provided with this class, notably ease_in_out and - ease_out_quint. - */ - /* speed is in milliseconds */ - - /* x and y are 0.0 to 1.0 */ - public delegate double EasingFunc (double x); - - private TimeSpan extra_time = 0; - private TimeSpan length = 0; - private TimeSpan start_time = 0; - private double extra_progress = 0.0; - private uint timeout = 0; - - public AnimateTimer (EasingFunc func, int speed) { - Object (speed: speed); - this.easing_func = func; - } - - ~AnimateTimer () { - stop (); - } - - /* temp_speed is in milliseconds */ - public void reset (int temp_speed = -1) { - stop (); - - timeout = Timeout.add (16, animate_cb); - progress = 0; - start_time = 0; - extra_time = 0; - extra_progress = 0; - - if (temp_speed == -1) - temp_speed = speed; - - length = temp_speed * TimeSpan.MILLISECOND; - } - - public void stop () { - if (timeout != 0) - Source.remove (timeout); - timeout = 0; - } - - private bool animate_cb () { - if (start_time == 0) - start_time = GLib.get_monotonic_time (); - - var time_progress = normalize_time (GLib.get_monotonic_time ()); - progress = calculate_progress (time_progress); - animate (progress); - - if (time_progress >= 1.0) { - timeout = 0; - return false; - } else { - return true; - } - } - - /* Returns 0.0 to 1.0 where 1.0 is at or past end_time */ - private double normalize_time (TimeSpan now) { - if (length == 0) - return 1.0f; - - return (((double)(now - start_time)) / length).clamp (0.0, 1.0); - } - - /* Returns 0.0 to 1.0 where 1.0 is done. - time is not normalized yet! */ - private double calculate_progress (double time_progress) { - var y = easing_func (time_progress); - return y.clamp (0.0, 1.0); - } - - public static double ease_in_out (double x) { - return (1 - Math.cos (Math.PI * x)) / 2; - } - - public static double ease_in_quad (double x) { - return Math.pow (x, 2); - } - - public static double ease_out_quad (double x) { - return -1 * Math.pow (x - 1, 2) + 1; - } - - public static double ease_in_quint (double x) { - return Math.pow (x, 5); - } - - public static double ease_out_quint (double x) { - return Math.pow (x - 1, 5) + 1; - } - } -} - diff -Nru deepin-terminal-5.0.0+ds1/lib/config.vala deepin-terminal-5.4.13/lib/config.vala --- deepin-terminal-5.0.0+ds1/lib/config.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/config.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,486 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using GLib; -using Gee; - -namespace Config { - public class Config : GLib.Object { - public ArrayList backspace_key_erase_names; - public ArrayList del_key_erase_names; - public ArrayList encoding_names; - public HashMap erase_map; - public double default_opacity = 0.9; - public int default_size = 11; - public string default_mono_font = ""; - public KeyFile config_file; - public string config_file_path = Utils.get_config_file_path("config.conf"); - public string? temp_theme = null; - - public signal void update(); - - public Config() { - default_mono_font = font_match("mono"); - - config_file = new KeyFile(); - - backspace_key_erase_names = new ArrayList(); - string[] backspace_key_erase_list = {"ascii-del", "auto", "control-h", "escape-sequence", "tty"}; - foreach (string name in backspace_key_erase_list) { - backspace_key_erase_names.add(name); - } - - del_key_erase_names = new ArrayList(); - string[] del_key_erase_list = {"escape-sequence", "ascii-del", "auto", "control-h", "tty"}; - foreach (string name in del_key_erase_list) { - del_key_erase_names.add(name); - } - - erase_map = new HashMap(); - erase_map.set("ascii-del", "ascii-del"); - erase_map.set("auto", "auto"); - erase_map.set("control-h", "control-h"); - erase_map.set("escape-sequence", "escape-sequence"); - erase_map.set("tty", "tty"); - - encoding_names = new ArrayList(); - string[] encoding_list = {"UTF-8", "UTF-16", "GB18030", "GB2312", "GBK", "BIG5", "BIG5-HKSCS", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-8-I", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "ARMSCII-8", "CP866", "EUC-JP", "EUC-KR", "EUC-TW", "GEORGIAN-PS", "IBM850", "IBM852", "IBM855", "IBM857", "IBM862", "IBM864", "ISO-2022-JP", "ISO-2022-KR", "ISO-IR-111", "KOI8-R", "KOI8-U", "MAC_ARABIC", "MAC_CE", "MAC_CROATIAN", "MAC-CYRILLIC", "MAC_DEVANAGARI", "MAC_FARSI", "MAC_GREEK", "MAC_GUJARATI", "MAC_GURMUKHI", "MAC_HEBREW", "MAC_ICELANDIC", "MAC_ROMAN", "MAC_ROMANIAN", "MAC_TURKISH", "MAC_UKRAINIAN", "SHIFT_JIS", "TCVN", "TIS-620", "UHC", "VISCII", "WINDOWS-1250", "WINDOWS-1251", "WINDOWS-1252", "WINDOWS-1253", "WINDOWS-1254", "WINDOWS-1255", "WINDOWS-1256", "WINDOWS-1257", "WINDOWS-1258"}; - foreach (string name in encoding_list) { - encoding_names.add(name); - } - - var file = File.new_for_path(config_file_path); - if (!file.query_exists()) { - init_config(); - } else { - load_config(); - } - } - - public void init_config() { - try { - config_file.set_string("general", "theme", "deepin"); - config_file.set_double("general", "opacity", default_opacity); - config_file.set_string("general", "font", default_mono_font); - config_file.set_integer("general", "font_size", default_size); - - config_file.set_string("shortcut", "copy", "Ctrl + Shift + c"); - config_file.set_string("shortcut", "paste", "Ctrl + Shift + v"); - config_file.set_string("shortcut", "open", "Ctrl + Shift + x"); - config_file.set_string("shortcut", "search", "Ctrl + Shift + f"); - config_file.set_string("shortcut", "zoom_in", "Ctrl + ="); - config_file.set_string("shortcut", "zoom_out", "Ctrl + -"); - config_file.set_string("shortcut", "default_size", "Ctrl + 0"); - config_file.set_string("shortcut", "select_all", "Ctrl + Shift + a"); - config_file.set_string("shortcut", "jump_to_next_command", "Shift + Down"); - config_file.set_string("shortcut", "jump_to_previous_command", "Shift + Up"); - - config_file.set_string("shortcut", "new_workspace", "Ctrl + Shift + t"); - config_file.set_string("shortcut", "close_workspace", "Ctrl + Shift + w"); - config_file.set_string("shortcut", "next_workspace", "Ctrl + Tab"); - config_file.set_string("shortcut", "previous_workspace", "Ctrl + Shift + Tab"); - config_file.set_string("shortcut", "vertical_split", "Ctrl + Shift + j"); - config_file.set_string("shortcut", "horizontal_split", "Ctrl + Shift + h"); - config_file.set_string("shortcut", "select_upper_window", "Alt + k"); - config_file.set_string("shortcut", "select_lower_window", "Alt + j"); - config_file.set_string("shortcut", "select_left_window", "Alt + h"); - config_file.set_string("shortcut", "select_right_window", "Alt + l"); - config_file.set_string("shortcut", "close_window", "Ctrl + Alt + q"); - config_file.set_string("shortcut", "close_other_windows", "Ctrl + Shift + q"); - - config_file.set_string("shortcut", "rename_title", "F2"); - config_file.set_string("shortcut", "switch_fullscreen", "F11"); - config_file.set_string("shortcut", "display_shortcuts", "Ctrl + Shift + ?"); - config_file.set_string("shortcut", "custom_commands", "Ctrl + ["); - config_file.set_string("shortcut", "remote_management", "Ctrl + /"); - config_file.set_string("shortcut", "select_workspace", "Alt"); - config_file.set_string("shortcut", "new_theme_terminal", "Ctrl + Alt"); - - config_file.set_string("advanced", "cursor_shape", "block"); - config_file.set_boolean("advanced", "cursor_blink_mode", true); - config_file.set_boolean("advanced", "cursor_auto_hide", false); - - config_file.set_boolean("advanced", "scroll_on_key", true); - config_file.set_boolean("advanced", "scroll_on_output", false); - config_file.set_integer("advanced", "scroll_line", -1); - config_file.set_string("advanced", "use_on_starting", "window"); - config_file.set_boolean("advanced", "blur_background", false); - config_file.set_integer("advanced", "window_width", 0); - config_file.set_integer("advanced", "window_height", 0); - config_file.set_double("advanced", "quake_window_height", 0); - config_file.set_boolean("advanced", "quake_window_fullscreen", false); - config_file.set_string("advanced", "remote_commands", "zssh"); - config_file.set_boolean("advanced", "hide_quakewindow_after_lost_focus", false); - config_file.set_boolean("advanced", "show_quakewindow_tab", true); - config_file.set_boolean("advanced", "follow_active_window", true); - config_file.set_boolean("advanced", "hide_quakewindow_when_active", true); - config_file.set_boolean("advanced", "print_notify_after_script_finish", true); - config_file.set_boolean("advanced", "run_as_login_shell", false); - config_file.set_boolean("advanced", "show_highlight_frame", false); - config_file.set_boolean("advanced", "copy_on_select", false); - config_file.set_boolean("advanced", "tabbar_at_the_bottom", false); - config_file.set_boolean("advanced", "audible_bell", false); - config_file.set_boolean("advanced", "always_hide_resize_grip", false); - - config_file.set_string("theme", "color_1", "#073642"); - config_file.set_comment("theme", "color_1", "host"); - config_file.set_string("theme", "color_2", "#bdb76b"); - config_file.set_comment("theme", "color_2", "string"); - config_file.set_string("theme", "color_3", "#859900"); - config_file.set_comment("theme", "color_3", "command"); - config_file.set_string("theme", "color_4", "#b58900"); - config_file.set_comment("theme", "color_4", "command"); - config_file.set_string("theme", "color_5", "#ffd700"); - config_file.set_comment("theme", "color_5", "path"); - config_file.set_string("theme", "color_6", "#d33682"); - config_file.set_comment("theme", "color_6", "variable"); - config_file.set_string("theme", "color_7", "#2aa198"); - config_file.set_comment("theme", "color_7", "prompt"); - config_file.set_string("theme", "color_8", "#eee8d5"); - config_file.set_string("theme", "color_9", "#002b36"); - config_file.set_string("theme", "color_10", "#8b0000"); - config_file.set_comment("theme", "color_10", "error"); - config_file.set_string("theme", "color_11", "#00ff00"); - config_file.set_comment("theme", "color_11", "execute"); - config_file.set_string("theme", "color_12", "#657b83"); - config_file.set_string("theme", "color_13", "#1e90ff"); - config_file.set_comment("theme", "color_13", "folder"); - config_file.set_string("theme", "color_14", "#6c71c4"); - config_file.set_string("theme", "color_15", "#93a1a1"); - config_file.set_string("theme", "color_16", "#fdf6e3"); - config_file.set_string("theme", "background", "#000000"); - config_file.set_string("theme", "foreground", "#00cd00"); - config_file.set_string("theme", "tab", "#2CA7F8"); - config_file.set_string("theme", "style", "dark"); - - config_file.set_string("theme_terminal", "theme1", "solarized dark"); - config_file.set_string("theme_terminal", "theme2", "bim"); - config_file.set_string("theme_terminal", "theme3", "hemisu light"); - config_file.set_string("theme_terminal", "theme4", "gruvbox light"); - config_file.set_string("theme_terminal", "theme5", "elementary"); - config_file.set_string("theme_terminal", "theme6", "azu"); - config_file.set_string("theme_terminal", "theme7", "aco"); - config_file.set_string("theme_terminal", "theme8", "miu"); - config_file.set_string("theme_terminal", "theme9", "material"); - } catch (Error e) { - print("Config init_config: %s\n", e.message); - } - - save(); - } - - public void check_string(string group, string key, string value) { - try { - if (!config_file.has_group(group) || !config_file.has_key(group, key)) { - config_file.set_string(group, key, value); - } else { - config_file.get_string(group, key); - } - } catch (KeyFileError e) { - print("check_string: %s\n", e.message); - - config_file.set_string(group, key, value); - print("Reset [%s] %s with %s\n", group, key, value); - } - } - - public void check_font(string group, string key, string value) { - try { - if (!config_file.has_group(group) || !config_file.has_key(group, key)) { - config_file.set_string(group, key, value); - } else { - var font = config_file.get_string(group, key); - bool mono_font_exist = false; - int num; - string[] mono_or_dot_fonts = (string[]) list_mono_or_dot_fonts(out num); - - for (int i = 0; i < num; i++) { - if (font == mono_or_dot_fonts[i]) { - mono_font_exist = true; - break; - } - } - - if (!mono_font_exist) { - config_file.set_string(group, key, value); - print("Font '%s' is not exist in system, use '%s' instead.\n", font, value); - } - } - } catch (KeyFileError e) { - print("check_font: %s\n", e.message); - - config_file.set_string(group, key, value); - print("Reset [%s] %s with %s\n", group, key, value); - } - } - - public void check_integer(string group, string key, int value) { - try { - if (!config_file.has_group(group) || !config_file.has_key(group, key)) { - print("** start!\n"); - config_file.set_integer(group, key, value); - } else { - config_file.get_integer(group, key); - } - } catch (KeyFileError e) { - print("check_integer: %s\n", e.message); - - config_file.set_integer(group, key, value); - print("Reset [%s] %s with %i\n", group, key, value); - } - } - - public void check_double(string group, string key, double value) { - try { - if (!config_file.has_group(group) || !config_file.has_key(group, key)) { - config_file.set_double(group, key, value); - } else { - config_file.get_double(group, key); - } - } catch (KeyFileError e) { - print("check_double: %s\n", e.message); - - config_file.set_double(group, key, value); - print("Reset [%s] %s with %f\n", group, key, value); - } - } - - public void check_boolean(string group, string key, bool value) { - try { - if (!config_file.has_group(group) || !config_file.has_key(group, key)) { - config_file.set_boolean(group, key, value); - } else { - config_file.get_boolean(group, key); - } - } catch (KeyFileError e) { - print("check_boolean: %s\n", e.message); - - config_file.set_boolean(group, key, value); - print("Reset [%s] %s with %s\n", group, key, value.to_string()); - } - } - - public void check_config() { - try { - config_file.load_from_file(config_file_path, KeyFileFlags.NONE); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("Config check_config: %s\n", e.message); - } - } - - check_string("general", "theme", "deepin"); - check_double("general", "opacity", default_opacity); - check_font("general", "font", default_mono_font); - check_integer("general", "font_size", default_size); - - check_string("shortcut", "copy", "Ctrl + Shift + c"); - check_string("shortcut", "paste", "Ctrl + Shift + v"); - check_string("shortcut", "open", "Ctrl + Shift + x"); - check_string("shortcut", "search", "Ctrl + Shift + f"); - check_string("shortcut", "zoom_in", "Ctrl + ="); - check_string("shortcut", "zoom_out", "Ctrl + -"); - check_string("shortcut", "default_size", "Ctrl + 0"); - check_string("shortcut", "jump_to_next_command", "Shift + Down"); - check_string("shortcut", "jump_to_previous_command", "Shift + Up"); - check_string("shortcut", "select_all", "Ctrl + Shift + a"); - - check_string("shortcut", "new_workspace", "Ctrl + Shift + t"); - check_string("shortcut", "close_workspace", "Ctrl + Shift + w"); - check_string("shortcut", "next_workspace", "Ctrl + Tab"); - check_string("shortcut", "previous_workspace", "Ctrl + Shift + Tab"); - - check_string("shortcut", "resize_workspace_up", "Ctrl + Alt + Up"); - check_string("shortcut", "resize_workspace_down", "Ctrl + Alt + Down"); - check_string("shortcut", "resize_workspace_left", "Ctrl + Alt + Left"); - check_string("shortcut", "resize_workspace_right", "Ctrl + Alt + Right"); - - check_string("shortcut", "vertical_split", "Ctrl + Shift + j"); - check_string("shortcut", "horizontal_split", "Ctrl + Shift + h"); - check_string("shortcut", "select_upper_window", "Alt + k"); - check_string("shortcut", "select_lower_window", "Alt + j"); - check_string("shortcut", "select_left_window", "Alt + h"); - check_string("shortcut", "select_right_window", "Alt + l"); - check_string("shortcut", "close_window", "Ctrl + Alt + q"); - check_string("shortcut", "close_other_windows", "Ctrl + Shift + q"); - - check_string("shortcut", "rename_title", "F2"); - check_string("shortcut", "switch_fullscreen", "F11"); - check_string("shortcut", "display_shortcuts", "Ctrl + Shift + ?"); - check_string("shortcut", "custom_commands", "Ctrl + ["); - check_string("shortcut", "remote_management", "Ctrl + /"); - check_string("shortcut", "select_workspace", "Alt"); - check_string("shortcut", "new_theme_terminal", "Ctrl + Alt"); - - check_string("advanced", "cursor_shape", "block"); - check_boolean("advanced", "cursor_blink_mode", true); - check_boolean("advanced", "cursor_auto_hide", false); - check_boolean("advanced", "bold_is_bright", false); - check_boolean("advanced", "audible_bell", false); - check_boolean("advanced", "always_hide_resize_grip", false); - - check_boolean("advanced", "scroll_on_key", true); - check_boolean("advanced", "scroll_on_output", false); - check_integer("advanced", "scroll_line", -1); - check_string("advanced", "use_on_starting", "window"); - check_boolean("advanced", "blur_background", false); - check_integer("advanced", "window_width", 0); - check_integer("advanced", "window_height", 0); - check_double("advanced", "quake_window_height", 0); - check_boolean("advanced", "quake_window_fullscreen", false); - check_string("advanced", "remote_commands", "ssh;zssh;tmux;screen"); - check_boolean("advanced", "hide_quakewindow_after_lost_focus", false); - check_boolean("advanced", "show_quakewindow_tab", true); - check_boolean("advanced", "follow_active_window", true); - check_boolean("advanced", "hide_quakewindow_when_active", true); - check_boolean("advanced", "print_notify_after_script_finish", true); - check_boolean("advanced", "run_as_login_shell", false); - check_boolean("advanced", "show_highlight_frame", false); - check_boolean("advanced", "copy_on_select", false); - check_boolean("advanced", "tabbar_at_the_bottom", false); - - check_string("theme", "color_1", "#073642"); - check_string("theme", "color_2", "#bdb76b"); // string - check_string("theme", "color_3", "#859900"); - check_string("theme", "color_4", "#b58900"); - check_string("theme", "color_5", "#ffd700"); // path - check_string("theme", "color_6", "#d33682"); - check_string("theme", "color_7", "#2aa198"); - check_string("theme", "color_8", "#eee8d5"); - check_string("theme", "color_9", "#002b36"); - check_string("theme", "color_10", "#8b0000"); // error - check_string("theme", "color_11", "#00ff00"); // exec - check_string("theme", "color_12", "#657b83"); - check_string("theme", "color_13", "#1e90ff"); // folder - check_string("theme", "color_14", "#6c71c4"); - check_string("theme", "color_15", "#93a1a1"); - check_string("theme", "color_16", "#fdf6e3"); - check_string("theme", "background", "#000000"); // background - check_string("theme", "foreground", "#00cd00"); // foreground - check_string("theme", "tab", "#2CA7F8"); // tab - check_string("theme", "style", "dark"); // style - - check_string("theme_terminal", "theme1", "solarized dark"); - check_string("theme_terminal", "theme2", "bim"); - check_string("theme_terminal", "theme3", "hemisu light"); - check_string("theme_terminal", "theme4", "gruvbox light"); - check_string("theme_terminal", "theme5", "elementary"); - check_string("theme_terminal", "theme6", "azu"); - check_string("theme_terminal", "theme7", "aco"); - check_string("theme_terminal", "theme8", "miu"); - check_string("theme_terminal", "theme9", "material"); - - save(); - } - - public void load_config() { - try { - check_config(); - - config_file.load_from_file(config_file_path, KeyFileFlags.NONE); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("Config load_config: %s\n", e.message); - } - } - } - - public void load_temp_theme(string theme_name) { - update_theme(theme_name); - temp_theme = theme_name; - } - - public void set_theme(string theme_name) { - // Set temp theme with null to override. - temp_theme = null; - - update_theme(theme_name); - save(); - update(); - } - - public void update_theme(string theme_name) { - try { - KeyFile theme_file = new KeyFile(); - theme_file.load_from_file(Utils.get_theme_path(theme_name), KeyFileFlags.NONE); - - foreach (string key in theme_file.get_keys("theme")) { - config_file.set_string("theme", key, theme_file.get_string("theme", key).strip()); - } - - var background = theme_file.get_string("theme", "background").strip(); - if (Utils.is_light_color(background)) { - config_file.set_string("theme", "style", "light"); - } else { - config_file.set_string("theme", "style", "dark"); - } - - config_file.set_string("general", "theme", theme_name); - } catch (Error e) { - print("Config update_theme: %s\n", e.message); - } - } - - public void save() { - try { - Utils.touch_dir(Utils.get_config_dir()); - - // Restore config file theme if temp_theme is not null. - if (temp_theme != null) { - try { - var theme_file = new KeyFile(); - theme_file.load_from_file(config_file_path, KeyFileFlags.NONE); - - var theme_name = theme_file.get_string("general", "theme").strip(); - update_theme(theme_name); - } catch (KeyFileError e) { - print("save: %s\n", e.message); - } - } - - config_file.save_to_file(config_file_path); - } catch (GLib.FileError e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("save: %s\n", e.message); - } - } - } - - public int get_terminal_monitor() { - bool follow_active_window = true; - - try { - follow_active_window = config_file.get_boolean("advanced", "follow_active_window"); - } catch (Error e) { - print("Config get_terminal_monitor: %s\n", e.message); - } - - Gdk.Screen screen = Gdk.Screen.get_default(); - if (follow_active_window) { - return Utils.get_active_monitor(screen); - } else { - return Utils.get_pointer_monitor(screen); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/lib/constant.vala.in deepin-terminal-5.4.13/lib/constant.vala.in --- deepin-terminal-5.0.0+ds1/lib/constant.vala.in 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/constant.vala.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -public class Constant { - public static double TERMINAL_MIN_OPACITY = 0; - public const string VERSION = "@VERSION@"; - public static int ACTIVE_TAB_UNDERLINE_HEIGHT = 2; - public static int CLOSE_BUTTON_MARGIN_RIGHT = 0; - public static int CLOSE_BUTTON_MARGIN_TOP = 0; - public static int CLOSE_BUTTON_WIDTH = 40; - public static int COMMAND_BUTTON_HEIGHT = 54; - public static int COMMAND_BUTTON_PADDING = 5; - public static int COMMAND_BUTTON_WIDTH = 190; - public static int COMMAND_SLIDER_WIDTH = 280; - public static int DIALOG_BUTTON_HEIGHT = 28; - public static int ENCODING_BUTTON_HEIGHT = 54; - public static int ENCODING_BUTTON_PADDING = 5; - public static int ENCODING_BUTTON_WIDTH = 190; - public static int ENCODING_SLIDER_WIDTH = 230; - public static int FONT_MAX_SIZE = 50; - public static int FONT_MIN_SIZE = 5; - public static int MAX_SCROLL_LINES = 1000; - public static int PREFERENCE_SLIDEBAR_WIDTH = 160; - public static int PREFERENCE_WIDGET_WIDTH = 220; - public static int REMOTE_PANEL_SEARCHBAR_HEIGHT = 36; - public static int RESPONSE_RADIUS = 10; - public static int SEARCH_PANEL_WIDTH = 322; - public static int SLIDER_PANEL_TEXT_WIDTH = 150; - public static int SLIDER_WIDTH = 280; - public static int THEME_BUTTON_HEIGHT = 54; - public static int THEME_BUTTON_PADDING = 5; - public static int THEME_BUTTON_WIDTH = 190; - public static int THEME_SLIDER_WIDTH = 230; - public static int TITLEBAR_HEIGHT = 39; - public static int WINDOW_BUTTON_WIDHT = 40; - public static int EXIT_CODE_BAD_SMABA = 139; - public static int EXIT_CODE_NORMAL = 0; -} \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/lib/draw.vala deepin-terminal-5.4.13/lib/draw.vala --- deepin-terminal-5.0.0+ds1/lib/draw.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/draw.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,239 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; - -namespace Draw { - public void draw_surface(Cairo.Context cr, ImageSurface surface, int x = 0, int y = 0, int width=0, int height=0) { - if (surface != null) { - cr.set_source_surface(surface, x + int.max(0, (int)(width - surface.get_width() / Utils.get_default_monitor_scale()) / 2), - y + int.max(0, (int)(height - surface.get_height() / Utils.get_default_monitor_scale()) / 2)); - cr.paint_with_alpha(1.0); - } - } - - public Pango.Layout create_layout_from_context_for_text(Cairo.Context cr, string text, int font_size, int layout_width, - Pango.Alignment horizontal_alignment = Pango.Alignment.LEFT, - string vertical_align = "middle", int? wrap_width=null) { - - var font_description = new Pango.FontDescription(); - font_description.set_size((int)(font_size * Pango.SCALE)); - - var layout = Pango.cairo_create_layout(cr); - layout.set_font_description(font_description); - layout.set_markup(text, text.length); - layout.set_alignment(horizontal_alignment); - if (wrap_width == null) { - layout.set_single_paragraph_mode(true); - layout.set_width(layout_width * Pango.SCALE); - layout.set_ellipsize(Pango.EllipsizeMode.END); - } else { - layout.set_width(wrap_width * Pango.SCALE); - layout.set_wrap(Pango.WrapMode.WORD); - } - - return layout; - } - - public void draw_text(Cairo.Context cr, string text, int x, int y, int width, int height, int size, - Pango.Alignment horizontal_alignment=Pango.Alignment.LEFT, - string vertical_align = "middle", - int? wrap_width=null) { - cr.save(); - - var layout = create_layout_from_context_for_text(cr, text, size, width, horizontal_alignment, vertical_align, wrap_width); - - int text_width, text_height; - layout.get_pixel_size(out text_width, out text_height); - - int render_y; - if (vertical_align == "top") { - render_y = y; - } else if (vertical_align == "middle") { - render_y = y + int.max(0, (height - text_height) / 2); - } else { - render_y = y + int.max(0, height - text_height); - } - - cr.move_to(x, render_y); - Pango.cairo_update_layout(cr, layout); - Pango.cairo_show_layout(cr, layout); - - cr.restore(); - } - - public void draw_layout(Cairo.Context cr, Pango.Layout layout, int x, int y) { - cr.move_to(x, y); - Pango.cairo_update_layout(cr, layout); - Pango.cairo_show_layout(cr, layout); - } - - public Pango.Layout create_layout_from_widget_for_text(Gtk.Widget widget, string text, int font_size, int layout_width, - Pango.Alignment horizontal_alignment = Pango.Alignment.LEFT, - string vertical_align = "middle", int? wrap_width=null) { - - var font_description = new Pango.FontDescription(); - font_description.set_size((int)(font_size * Pango.SCALE)); - - var layout = widget.create_pango_layout(null); - layout.set_font_description(font_description); - layout.set_text(text, text.length); - layout.set_alignment(horizontal_alignment); - if (wrap_width == null) { - layout.set_single_paragraph_mode(true); - layout.set_width(layout_width * Pango.SCALE); - layout.set_ellipsize(Pango.EllipsizeMode.END); - } else { - layout.set_width(wrap_width * Pango.SCALE); - layout.set_wrap(Pango.WrapMode.WORD); - } - - return layout; - } - - public void get_text_bounding_rect_from_widget(Gtk.Widget widget, string text, int font_size, int layout_width, - out int bounding_width, out int bounding_height, - Pango.Alignment horizontal_alignment = Pango.Alignment.LEFT, - string vertical_align = "middle", int? wrap_width=null) { - - var layout = create_layout_from_widget_for_text(widget, text, font_size, layout_width, horizontal_alignment, vertical_align, wrap_width); - - layout.get_pixel_size(out bounding_width, out bounding_height); - } - - public void get_text_bounding_rect_from_context(Cairo.Context cr, string text, int font_size, int layout_width, - out int bounding_width, out int bounding_height, - Pango.Alignment horizontal_alignment = Pango.Alignment.LEFT, - string vertical_align = "middle", int? wrap_width=null) { - - var layout = create_layout_from_context_for_text(cr, text, font_size, layout_width, horizontal_alignment, vertical_align, wrap_width); - - layout.get_pixel_size(out bounding_width, out bounding_height); - } - - public int get_text_render_height(Gtk.Widget widget, string text, int width, int height, int size, - Pango.Alignment horizontal_alignment=Pango.Alignment.LEFT, - string vertical_align = "middle", - int? wrap_width=null) { - - int text_width, text_height; - - get_text_bounding_rect_from_widget(widget, text, size, width, out text_width, out text_height, horizontal_alignment, vertical_align, wrap_width); - - return text_height; - } - - public int get_text_render_width(Cairo.Context cr, string text, int width, int height, int size, - Pango.Alignment horizontal_alignment=Pango.Alignment.LEFT, - string vertical_align = "middle", - int? wrap_width=null) { - - int text_width, text_height; - - get_text_bounding_rect_from_context(cr, text, size, width, out text_width, out text_height, horizontal_alignment, vertical_align, wrap_width); - - return text_width; - } - - public void set_context_source_color(Cairo.Context cr, Gdk.RGBA rgba) { - cr.set_source_rgba(rgba.red, rgba.green, rgba.blue, rgba.alpha); - } - - public void draw_rectangle(Cairo.Context cr, int x, int y, int w, int h, bool fill=true) { - cr.rectangle(x, y, w, h); - if (fill) { - cr.fill(); - } else { - cr.stroke(); - } - } - - public void fill_rounded_rectangle(Context cr, int x, int y, int width, int height, double r) { - cr.new_sub_path(); - cr.arc(x + width - r, y + r, r, Math.PI * 3 / 2, Math.PI * 2); - cr.arc(x + width - r, y + height - r, r, 0, Math.PI / 2); - cr.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI); - cr.arc(x + r, y + r, r, Math.PI, Math.PI * 3 / 2); - cr.close_path(); - - cr.fill(); - } - - public void stroke_rounded_rectangle(Context cr, int x, int y, int width, int height, double r, Gdk.RGBA frame_color, Gdk.RGBA background_color, int line_width=1) { - cr.set_source_rgba(frame_color.red, frame_color.green, frame_color.blue, frame_color.alpha); - Draw.fill_rounded_rectangle(cr, x, y, width, height, r); - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, background_color.alpha); - Draw.fill_rounded_rectangle(cr, x + line_width, y + line_width, width - line_width * 2, height - line_width * 2, r); - } - - public void draw_search_rectangle(Context cr, int x, int y, int width, int height, double r, bool fill=true) { - // Top side. - cr.move_to(x, y); - cr.line_to(x + width, y); - - // Right side. - cr.line_to(x + width, y + height); - - // Bottom side. - cr.line_to(x + r, y + height); - - // Bottom-left corner. - cr.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI); - - // Left side. - cr.line_to(x, y); - - // Close path. - cr.close_path(); - - if (fill) { - cr.fill(); - } else { - cr.stroke(); - } - } - - public void draw_radial(Cairo.Context cr, int x, int width, int height, Gdk.RGBA center_color, Gdk.RGBA edge_color) { - Cairo.Pattern pattern = new Cairo.Pattern.radial(x + width / 2, height, width / 2, x + width / 2, height, 0); - pattern.add_color_stop_rgba(1, center_color.red, center_color.green, center_color.blue, center_color.alpha); - pattern.add_color_stop_rgba(0, edge_color.red, edge_color.green, edge_color.blue, edge_color.alpha); - cr.set_source(pattern); - cr.paint(); - } - - public void clip_rectangle(Cairo.Context cr, int x, int y, int w, int h) { - cr.rectangle(x, y, w, h); - cr.clip(); - } - - public void clip_rounded_rectangle(Context cr, int x, int y, int width, int height, double r) { - cr.new_sub_path(); - cr.arc(x + width - r, y + r, r, Math.PI * 3 / 2, Math.PI * 2); - cr.arc(x + width - r, y + height - r, r, 0, Math.PI / 2); - cr.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI); - cr.arc(x + r, y + r, r, Math.PI, Math.PI * 3 / 2); - cr.close_path(); - - cr.clip(); - } -} diff -Nru deepin-terminal-5.0.0+ds1/lib/font.c deepin-terminal-5.4.13/lib/font.c --- deepin-terminal-5.0.0+ds1/lib/font.c 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/font.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include - -static int string_rematch(const char* string,const char* pattern) { - int ret = 0; - regex_t regex; - regcomp(®ex, pattern, REG_ICASE); - if (regexec(®ex, string, 0, NULL, 0) == REG_NOERROR) - ret = 1; - regfree(®ex); - return ret; -} - -gchar** list_mono_or_dot_fonts(gint* num, int* result_length) { - FcInit(); - - FcPattern *pat = FcPatternCreate(); - if (!pat) { - fprintf(stderr, "Create FcPattern Failed\n"); - return NULL; - } - - FcObjectSet *os = FcObjectSetBuild( - FC_FAMILY, - FC_FAMILYLANG, - FC_FULLNAME, - FC_FULLNAMELANG, - FC_STYLE, - FC_FILE, - FC_LANG, - FC_SPACING, - FC_CHARSET, - NULL); - if (!os) { - fprintf(stderr, "Build FcObjectSet Failed\n"); - FcPatternDestroy(pat); - return NULL; - } - - FcFontSet *fs = FcFontList(0, pat, os); - FcObjectSetDestroy(os); - FcPatternDestroy(pat); - if (!fs) { - fprintf(stderr, "List Font Failed\n"); - return NULL; - } - - /* Read family name of mono font. */ - gchar** fonts = NULL; - int j; - int count = 0; - for (j = 0; j < fs->nfont; j++) { - /* printf("family: %s\n familylang: %s\n fullname: %s\n fullnamelang: %s\n style: %s\n file: %s\n lang: %s\n spacing: %s\n charset: %s\n", */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{family}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{familylang}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{fullname}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{fullnamelang}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{style}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{file}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{lang}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{spacing}"), */ - /* FcPatternFormat(fs->fonts[j], (FcChar8*)"%{charset}") */ - /* ); */ - - char *font_family = (char*) FcPatternFormat(fs->fonts[j], (FcChar8*)"%{family}"); - char *comma = NULL; - - // split with ',' and using last one - while ((comma = strchr(font_family, ',')) != NULL) - font_family = comma + 1; - - /* spacing 100 is mono font, spacing 110 is dot font */ - if (strcmp((char*) FcPatternFormat(fs->fonts[j], (FcChar8*)"%{spacing}"), "100") == 0 - || strcmp((char*) FcPatternFormat(fs->fonts[j], (FcChar8*)"%{spacing}"), "110") == 0 - || string_rematch(font_family, "mono") - || strcmp(font_family, "YaHei Consolas Hybrid") == 0 - || strcmp(font_family, "Monaco") == 0 - ) { - /* Realloc was realloc(fonts, 0), and you have to take space for */ - fonts = realloc(fonts, (count + 1) * sizeof(gchar*)); - if (fonts == NULL) { - fprintf(stderr, "Alloc memory at append %d font info failed\n", count + 1); - return NULL; - } - - /* Filter charset font */ - char *charset = (char*)FcPatternFormat(fs->fonts[j], (FcChar8*)"%{charset}"); - if (charset == NULL || strlen(charset) == 0) { - free(charset); - continue; - } - free(charset); - - /* Got font name */ - gchar* font = g_strdup(font_family); - - /* Need space for store font */ - fonts[count] = malloc((strlen(font) + 1) * sizeof(gchar)); - if (fonts[count] == NULL) { - fprintf(stderr, "Malloc %d failed\n", count + 1); - return NULL; - } - - strcpy(fonts[count], font); - - free(font); - - count++; - } - } - - /* Remove duplicate font family. */ - int i, k; - for (i = 0; i < count; i++) { - for (j = i + 1; j < count;) { - if (strcmp(fonts[j], fonts[i]) == 0) { - for (k = j; k < count; k++) { - fonts[k] = fonts[k + 1]; - } - count--; - } else - j++; - } - } - *num = count; - *result_length = count; - - FcFontSetDestroy(fs); - - return fonts; -} - -gchar* font_match(gchar* family) { - FcPattern* pat = FcNameParse((FcChar8*)family); - if (!pat) { - return NULL; - } - - FcConfigSubstitute(NULL, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - - FcResult result; - FcPattern* match = FcFontMatch(NULL, pat, &result); - FcPatternDestroy(pat); - if (!match) { - return NULL; - } - - FcFontSet* fs = FcFontSetCreate(); - if (!fs) { - FcPatternDestroy(match); - return NULL; - } - - FcFontSetAdd(fs, match); - FcPattern* font = FcPatternFilter(fs->fonts[0], NULL); - FcChar8* ret = FcPatternFormat(font, (const FcChar8*)"%{family}"); - - FcPatternDestroy(font); - FcFontSetDestroy(fs); - FcPatternDestroy(match); - - if (!ret) { - return NULL; - } - - return (gchar*)ret; -} - -/* void main(int argc, char *argv[]) { - gint num = 0; - int font_num = 0; - gchar** fonts = list_mono_or_dot_fonts(&num, &font_num); - - int i; - for (i = 0; i < font_num; i++) { - printf("%s\n", fonts[i]); - } - - printf("\n"); - printf("%s", font_match("Mono")); -} */ diff -Nru deepin-terminal-5.0.0+ds1/lib/keymap.vala deepin-terminal-5.4.13/lib/keymap.vala --- deepin-terminal-5.0.0+ds1/lib/keymap.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/keymap.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using GLib; - -namespace Keymap { - public string get_keyevent_name(Gdk.EventKey key_event) { - if ((key_event.is_modifier) != 0) { - return ""; - } else { - var key_modifiers = get_key_event_modifiers(key_event); - var key_name = get_key_name(key_event.keyval); - - if (key_modifiers.length == 0) { - return key_name; - } else { - var name = ""; - foreach (string modifier in key_modifiers) { - name += modifier + " + "; - } - name += key_name; - - return name; - } - } - } - - public string[] get_key_event_modifiers(Gdk.EventKey key_event) { - string[] modifiers = {}; - - if ((key_event.state & Gdk.ModifierType.CONTROL_MASK) != 0) { - modifiers += "Ctrl"; - } - - if ((key_event.state & Gdk.ModifierType.SUPER_MASK) != 0) { - modifiers += "Super"; - } - - if ((key_event.state & Gdk.ModifierType.HYPER_MASK) != 0) { - modifiers += "Hyper"; - } - - if ((key_event.state & Gdk.ModifierType.MOD1_MASK) != 0) { - modifiers += "Alt"; - } - - if ((key_event.state & Gdk.ModifierType.SHIFT_MASK) != 0) { - modifiers += "Shift"; - } - - return modifiers; - } - - public string get_key_name(uint keyval) { - unichar key_unicode = Gdk.keyval_to_unicode(Gdk.keyval_to_lower(keyval)); - - if (key_unicode == 0) { // function keys at top line of keyboard - var keyname = Gdk.keyval_name(keyval); - - // Gdk.keyval_name will return null when user's hardware got KEY_UNKNOWN from hardware. - // So, we need return empty string to protect program won't crash later. - if (keyname == null) { - return ""; - } - - if (keyname == "ISO_Left_Tab") { - return "Tab"; - } else { - return keyname; - } - } else { - if (key_unicode == 13) { - return "Enter"; - } else if (key_unicode == 9) { - return "Tab"; - } else if (key_unicode == 27) { - return "Esc"; - } else if (key_unicode == 8) { - return "Backspace"; - } else if (key_unicode == 127) { - return "Delete"; - } else if (key_unicode == 32) { - return "Space"; - } else { - return key_unicode.to_string(); - } - } - } - - public bool has_ctrl_mask(Gdk.EventKey key_event) { - string[] mask_list = {"Control_L", "Control_R"}; - - return get_key_name(key_event.keyval) in mask_list; - } - - public bool has_shift_mask(Gdk.EventKey key_event) { - string[] mask_list = {"Shift_L", "Shift_R"}; - return get_key_name(key_event.keyval) in mask_list; - } - - public bool is_no_key_press(Gdk.EventKey key_event) { - return (key_event.is_modifier == 0 && get_key_name(key_event.keyval) == get_keyevent_name(key_event) || - key_event.is_modifier != 0 && get_key_event_modifiers(key_event).length == 1); - } -} diff -Nru deepin-terminal-5.0.0+ds1/lib/menu.vala deepin-terminal-5.4.13/lib/menu.vala --- deepin-terminal-5.0.0+ds1/lib/menu.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/menu.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -namespace Menu { - [DBus (name = "com.deepin.menu.Manager")] - interface MenuManagerInterface : Object { - public abstract string RegisterMenu() throws Error; - public abstract void UnregisterMenu(string object_path) throws Error; - } - - [DBus (name = "com.deepin.menu.Menu")] - interface MenuInterface : Object { - public abstract void ShowMenu(string menu_json_content) throws Error; - public signal void ItemInvoked(string item_id, bool checked); - public signal void MenuUnregistered(); - } - - public class MenuItem : Object { - public string menu_item_id; - public string menu_item_text; - public List menu_item_submenu; - - public MenuItem(string item_id, string item_text) { - menu_item_id = item_id; - menu_item_text = item_text; - - menu_item_submenu = new List(); - } - - public void add_submenu_item(MenuItem item) { - menu_item_submenu.append(item); - } - } - - public class Menu : Object { - MenuManagerInterface menu_manager_interface; - MenuInterface menu_interface; - static string? menu_object_path; - - public signal void click_item(string item_id); - public signal void destroy(); - - public Menu(int menu_x, int menu_y, List menu_content) { - try { - menu_manager_interface = Bus.get_proxy_sync(BusType.SESSION, "com.deepin.menu", "/com/deepin/menu"); - - if (menu_object_path != null) - unregister(); - menu_object_path = menu_manager_interface.RegisterMenu(); - - menu_interface = Bus.get_proxy_sync(BusType.SESSION, "com.deepin.menu", menu_object_path); - menu_interface.ItemInvoked.connect((item_id, checked) => { - click_item(item_id); - }); - menu_interface.MenuUnregistered.connect(() => { - menu_object_path = null; - destroy(); - }); - } catch (Error e) { - stderr.printf ("%s\n", e.message); - } - - show_menu(menu_x, menu_y, menu_content); - } - - public void unregister(){ - try { - menu_manager_interface.UnregisterMenu(menu_object_path); - } catch (Error e) { - stderr.printf ("%s\n", e.message); - } - menu_object_path = null; - } - - public void show_menu(int x, int y, List menu_content) { - // since GTK only supports integral scaling yet DDE supports fractional scaling, - // the scale on both sides may not be the same, so we need to negtiate here. - var scale = Utils.get_default_monitor_scale(); - var dde_scale = Utils.get_dde_scale_ratio(); - - if (scale != dde_scale) { - x = (int)(x * scale / dde_scale); - y = (int)(y * scale / dde_scale); - } - - try { - Json.Builder builder = new Json.Builder(); - - builder.begin_object(); - - builder.set_member_name("x"); - builder.add_int_value(x); - - builder.set_member_name("y"); - builder.add_int_value(y); - - builder.set_member_name("isDockMenu"); - builder.add_boolean_value(false); - - builder.set_member_name("menuJsonContent"); - builder.add_string_value(get_items_node(menu_content)); - - builder.set_member_name("isScaled"); - builder.add_boolean_value(false); - - builder.end_object (); - - Json.Generator generator = new Json.Generator(); - Json.Node root = builder.get_root(); - generator.set_root(root); - - string menu_json_content = generator.to_data(null); - - menu_interface.ShowMenu(menu_json_content); - } catch (Error e) { - stderr.printf ("%s\n", e.message); - } - } - - public string get_items_node(List menu_content) { - Json.Builder builder = new Json.Builder(); - - builder.begin_object(); - - builder.set_member_name("items"); - builder.begin_array (); - foreach (MenuItem item in menu_content) { - builder.add_value(get_item_node(item)); - } - builder.end_array (); - - builder.end_object (); - - Json.Generator generator = new Json.Generator(); - generator.set_root(builder.get_root()); - - return generator.to_data(null); - } - - public Json.Node get_item_node(MenuItem item) { - Json.Builder builder = new Json.Builder(); - - builder.begin_object(); - - builder.set_member_name("itemId"); - builder.add_string_value(item.menu_item_id); - - builder.set_member_name("itemText"); - builder.add_string_value(item.menu_item_text); - - builder.set_member_name("itemIcon"); - builder.add_string_value(""); - - builder.set_member_name("itemIconHover"); - builder.add_string_value(""); - - builder.set_member_name("itemIconInactive"); - builder.add_string_value(""); - - builder.set_member_name("itemExtra"); - builder.add_string_value(""); - - builder.set_member_name("isActive"); - builder.add_boolean_value(true); - - builder.set_member_name("checked"); - builder.add_boolean_value(false); - - builder.set_member_name("itemSubMenu"); - unowned List submenu_items = item.menu_item_submenu; - - if (submenu_items.length() == 0) { - builder.add_null_value(); - } else { - Json.Builder _builder = new Json.Builder(); - - _builder.begin_object (); - - _builder.set_member_name("items"); - - _builder.begin_array (); - foreach (MenuItem _item in submenu_items) { - _builder.add_value(get_item_node(_item)); - } - _builder.end_array (); - - _builder.end_object (); - - builder.add_value(_builder.get_root()); - } - - builder.end_object (); - - return builder.get_root(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/lib/utils.vala deepin-terminal-5.4.13/lib/utils.vala --- deepin-terminal-5.0.0+ds1/lib/utils.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/utils.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,559 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gdk; -using Gee; -using Gtk; -using Rsvg; -using Cairo; - -extern char* project_path(); -extern string font_match(string family); -extern string[] list_mono_or_dot_fonts(out int num); -private static bool is_tiling = false; -private static bool tiling_checked = false; - -namespace Utils { - [DBus (name = "com.deepin.Manual.Open")] - interface DeepinManualInterface : Object { - public abstract void ShowManual(string appName) throws GLib.Error; - } - - public Gdk.RGBA hex_to_rgba(string hex_color, double alpha=1.0) { - Gdk.RGBA rgba_color = Gdk.RGBA(); - rgba_color.parse(hex_color); - rgba_color.alpha = alpha; - - return rgba_color; - } - - public void set_context_color(Cairo.Context cr, Gdk.RGBA color) { - cr.set_source_rgba(color.red, color.green, color.blue, color.alpha); - } - - public void propagate_draw(Gtk.Container widget, Cairo.Context cr) { - if (widget.get_children().length() > 0) { - foreach (Gtk.Widget child in widget.get_children()) { - widget.propagate_draw(child, cr); - } - } - } - - public bool is_light_color(string color_string) { - Gdk.RGBA color = Gdk.RGBA(); - color.parse(color_string); - - double r = color.red; - double g = color.green; - double b = color.blue; - - double max_v = double.max(r, double.max(g, b)); - double min_v = double.min(r, double.min(g, b)); - - double s; - - if (max_v == 0) { - s = 0.0; - } else { - s = 1.0 - min_v / max_v; - } - - b = max_v; - - return b > 0.35 && s < 0.7; - } - - public double get_color_brightness(string color_string) { - Gdk.RGBA color = Gdk.RGBA(); - color.parse(color_string); - - double r = color.red; - double g = color.green; - double b = color.blue; - - double max_v = double.max(r, double.max(g, b)); - double min_v = double.min(r, double.min(g, b)); - - double s; - - if (max_v == 0) { - s = 0.0; - } else { - s = 1.0 - min_v / max_v; - } - - b = max_v; - - return b; - } - - public bool is_tiling_wm() { - // This check needed to prevent multiple queries to Process.spawn - if (tiling_checked) return is_tiling; - var output = ""; - try { - // This command returns something if one of this WMs will be running or "" if non - Process.spawn_command_line_sync (@"pidof i3 xmonad wmii wmfs wingo subtle sway stumpwm spectrwm snapwm ratpoison qtile notion herbstluftwm frankenwm dwm bspwm awesome alopex", out output); - } catch (GLib.SpawnError e) { - warning("Something bad happened with pidof command %s", e.message); - } - is_tiling = output != ""; - tiling_checked = true; - return is_tiling; - } - - public void touch_dir(string dir) { - var dir_file = GLib.File.new_for_path(dir); - if (!dir_file.query_exists()) { - try { - dir_file.make_directory_with_parents(null); - } catch (GLib.Error err) { - print("Could not create dir: %s\n", err.message); - } - } - } - - public void create_file(string file_path) { - var file = GLib.File.new_for_path(file_path); - if (!file.query_exists()) { - try { - file.create(GLib.FileCreateFlags.NONE, null); - } catch (GLib.Error e) { - print("create_file: %s\n", e.message); - } - } - } - - public ArrayList list_files(string path) { - ArrayList files = new ArrayList(); - - try { - FileEnumerator enumerator = File.new_for_path(path).enumerate_children( - "standard::*", - FileQueryInfoFlags.NOFOLLOW_SYMLINKS); - - FileInfo info = null; - while (((info = enumerator.next_file()) != null)) { - if (info.get_file_type() != FileType.DIRECTORY) { - files.add(info.get_name()); - } - } - } catch (GLib.Error e) { - print("list_files: %s\n", e.message); - } - - return files; - } - - public void remove_all_children(Gtk.Container container) { - foreach (Widget w in container.get_children()) { - container.remove(w); - } - } - - public void destroy_all_children(Gtk.Container container) { - foreach (Widget w in container.get_children()) { - container.remove(w); - w.destroy(); - } - } - - public Gtk.Allocation get_origin_allocation(Gtk.Widget w) { - Gtk.Allocation alloc; - w.get_allocation(out alloc); - - w.translate_coordinates(w.get_toplevel(), 0, 0, out alloc.x, out alloc.y); - return alloc; - } - - public bool move_window(Gtk.Widget widget, Gdk.EventButton event, Gtk.Window window) { - if (is_left_button(event)) { - window.begin_move_drag( - (int)event.button, - (int)event.x_root, - (int)event.y_root, - event.time); - } - - return false; - } - - public void toggle_max_window(Gtk.Window window) { - var window_state = window.get_window().get_state(); - if (Gdk.WindowState.MAXIMIZED in window_state) { - window.unmaximize(); - } else { - window.maximize(); - } - } - - public bool is_left_button(Gdk.EventButton event) { - return event.button == 1; - } - - public bool is_mouse_wheel(Gdk.EventButton event) { - return event.button == 2; - } - - public bool is_right_button(Gdk.EventButton event) { - return event.button == 3; - } - - public bool is_action_mouse_button(Gdk.EventButton event) { - return is_left_button(event) || is_mouse_wheel(event); - } - - public bool is_double_click(Gdk.EventButton event) { - return event.button == 1 && event.type == Gdk.EventType.2BUTTON_PRESS; - } - - public void load_css_theme(string css_path) { - var screen = Gdk.Screen.get_default(); - var css_provider = new Gtk.CssProvider(); - try { - css_provider.load_from_path(css_path); - } catch (GLib.Error e) { - print("Got error when load css: %s\n", e.message); - } - Gtk.StyleContext.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER); - } - - public string slice_string(string str, int unichar_num) { - string slice_str = ""; - - unichar c; - for (int i = 0; str.get_next_char(ref i, out c);) { - if (i > unichar_num) { - return slice_str.concat("... "); - } else { - slice_str = slice_str.concat(c.to_string()); - } - } - - return slice_str; - } - - public bool is_command_exist(string command_name) { - string? paths = Environment.get_variable("PATH"); - - foreach (string bin_path in paths.split(":")) { - var file = File.new_for_path(GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, bin_path, command_name)); - if (file.query_exists()) { - return true; - } - } - - return false; - } - - public string get_command_output(string cmd) { - try { - int exit_code; - string std_out; - Process.spawn_command_line_sync(cmd, out std_out, null, out exit_code); - return std_out; - } catch (GLib.Error e){ - return ""; - } - } - - public string get_proc_file_content(string proc_file_path) { - try { - uint8[] data; - GLib.FileUtils.get_data(proc_file_path, out data); - if (data != null) { - for(var i=0; i(null, null); - attributes["number"] = "8"; - attributes["string"] = "eight"; - attributes["even"] = "true"; - - try { - Secret.password_clear_sync(password_schema, null, "number", 8, "string", "eight", "even", true); - } catch (GLib.Error e) { - print("%s", e.message); - return; - } - - Secret.password_storev.begin(password_schema, attributes, Secret.COLLECTION_DEFAULT, - "com.deepin.terminal.password.%s.%s".printf(user, server_address), - password, - null, (obj, async_res) => { - try { - Secret.password_store.end(async_res); - } catch (GLib.Error e) { - print("%s", e.message); - return; - } - }); - - } - - public void get_pointer_position(out int x, out int y) { - Gdk.Display gdk_display = Gdk.Display.get_default(); - var seat = gdk_display.get_default_seat(); - var device = seat.get_pointer(); - - device.get_position(null, out x, out y); - } - - public bool pointer_in_widget_area(Gtk.Widget widget) { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - Gtk.Allocation widget_rect = get_origin_allocation(widget); - - int window_x, window_y; - widget.get_toplevel().get_window().get_root_origin(out window_x, out window_y); - - return pointer_x > window_x + widget_rect.x && pointer_x < window_x + widget_rect.x + widget_rect.width && pointer_y > window_y + widget_rect.y && pointer_y < window_y + widget_rect.y + widget_rect.height; - } - - public void show_manual() { - try { - DeepinManualInterface deepin_manual_interface = Bus.get_proxy_sync(BusType.SESSION, "com.deepin.Manual.Open", "/com/deepin/Manual/Open"); - deepin_manual_interface.ShowManual("deepin-terminal"); - } catch (GLib.Error e) { - print("show_manual: %s\n", e.message); - } - } - - public void write_log(string log) { - var log_file_dir = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "deepin", "deepin-terminal"); - var log_file = GLib.Path.build_path(GLib.Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "deepin", "deepin-terminal", "deepin-terminal.log"); - touch_dir(log_file_dir); - try { - FileUtils.set_contents(log_file, log); - } catch (GLib.Error e) { - print("write_log: %s\n", e.message); - } - } - - public Cairo.ImageSurface create_image_surface(string surface_path) { - try { - var scale = get_default_monitor_scale(); - Rsvg.Handle r = new Rsvg.Handle.from_file(Utils.get_image_path(surface_path)); - Rsvg.DimensionData d = r.get_dimensions(); - Cairo.ImageSurface cs = new Cairo.ImageSurface(Cairo.Format.ARGB32, (int)(d.width * scale), (int)(d.height * scale)); - cs.set_device_scale(scale, scale); - Cairo.Context c = new Cairo.Context(cs); - r.render_cairo(c); - - return cs; - } catch (GLib.Error e) { - print("create_image_surface: %s %s\n", surface_path, e.message); - - Cairo.ImageSurface cs = new Cairo.ImageSurface(Cairo.Format.ARGB32, 1, 1); - return cs; - } - } - - public int get_active_monitor(Gdk.Screen screen) { - var window = screen.get_active_window(); - if (window != null) { - return screen.get_monitor_at_window(window); - } else { - return screen.get_primary_monitor(); - } - } - - public double get_default_monitor_scale() { - var display = Display.get_default(); - if (display != null) { - var monitor = display.get_primary_monitor(); - if (monitor != null) { - return monitor.get_scale_factor(); - } - } - return 1.0; - } - - public double get_dde_scale_ratio() { - var scaleStr = GLib.Environment.get_variable("QT_SCALE_FACTOR"); - if (scaleStr == null) { - var dpiStr = GLib.Environment.get_variable("QT_FONT_DPI"); - if (dpiStr == null) { - return 1.0; - } - return double.parse(dpiStr)/96; - } - - var parsedScale = double.parse(scaleStr); - return parsedScale == 0 ? 1.0 : parsedScale; - } - - public int get_pointer_monitor(Gdk.Screen screen) { - int x, y; - get_pointer_position(out x, out y); - - return screen.get_monitor_at_point(x, y); - } - - public string get_process_cmdline(int pid) { - var cmd_file = File.new_for_path ("/proc/%d/cmdline".printf(pid)); - string command = ""; - if (!cmd_file.query_exists()) { - return command; - } - - try { - var dis = new DataInputStream (cmd_file.read ()); - uint8[] data = new uint8[4097]; - var size = dis.read (data); - - if (size <= 0) { - command = ""; - } - - for (int pos = 0; pos < size; pos++) { - if (data[pos] == '\0' || data[pos] == '\n') { - data[pos] = ' '; - } - } - - command = (string) data; - } catch (GLib.Error e) { - warning ("%s\n", e.message); - } - - return command; - } -} diff -Nru deepin-terminal-5.0.0+ds1/lib/xutils.vala deepin-terminal-5.4.13/lib/xutils.vala --- deepin-terminal-5.0.0+ds1/lib/xutils.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/lib/xutils.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -namespace XUtils { - public static int _NET_WM_MOVERESIZE_MOVE = 8; - public static int _NET_WM_MOVERESIZE_SIZE_BOTTOM = 5; - public static int _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT = 6; - public static int _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT = 4; - public static int _NET_WM_MOVERESIZE_SIZE_LEFT = 7; - public static int _NET_WM_MOVERESIZE_SIZE_RIGHT = 3; - public static int _NET_WM_MOVERESIZE_SIZE_TOP = 1; - public static int _NET_WM_MOVERESIZE_SIZE_TOPLEFT = 0; - public static int _NET_WM_MOVERESIZE_SIZE_TOPRIGHT = 2; - - public void seat_ungrab() { - Gdk.Display gdk_display = Gdk.Display.get_default(); - var seat = gdk_display.get_default_seat(); - seat.ungrab(); - } - - public void move_window(Gtk.Widget widget, int x, int y, int button) { - seat_ungrab(); - send_message((int)((Gdk.X11.Window) widget.get_toplevel().get_window()).get_xid(), - (long) x, - (long) y, - _NET_WM_MOVERESIZE_MOVE, - button, - 0 // this value must be 0, otherwise moveresize won't work. - ); - } - - public void resize_window(Gtk.Widget widget, int x, int y, int button, Gdk.CursorType cursor_type) { - int? action = cursor_type_to_action(cursor_type); - if (action != null) { - seat_ungrab(); - send_message((int)((Gdk.X11.Window) widget.get_toplevel().get_window()).get_xid(), - (long) x, - (long) y, - action, - button, - 1 - ); - } - } - - public int? cursor_type_to_action(Gdk.CursorType cursor_type) { - if (cursor_type == Gdk.CursorType.TOP_LEFT_CORNER) { - return _NET_WM_MOVERESIZE_SIZE_TOPLEFT; - } else if (cursor_type == Gdk.CursorType.TOP_SIDE) { - return _NET_WM_MOVERESIZE_SIZE_TOP; - } else if (cursor_type == Gdk.CursorType.TOP_RIGHT_CORNER) { - return _NET_WM_MOVERESIZE_SIZE_TOPRIGHT; - } else if (cursor_type == Gdk.CursorType.RIGHT_SIDE) { - return _NET_WM_MOVERESIZE_SIZE_RIGHT; - } else if (cursor_type == Gdk.CursorType.BOTTOM_RIGHT_CORNER) { - return _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT; - } else if (cursor_type == Gdk.CursorType.BOTTOM_SIDE) { - return _NET_WM_MOVERESIZE_SIZE_BOTTOM; - } else if (cursor_type == Gdk.CursorType.BOTTOM_LEFT_CORNER) { - return _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT; - } else if (cursor_type == Gdk.CursorType.LEFT_SIDE) { - return _NET_WM_MOVERESIZE_SIZE_LEFT; - } - - return null; - } - - public void send_message(int xid, long x, long y, int action, int button, int secret_value) { - weak X.Display display = Gdk.X11.get_default_xdisplay(); - weak X.Window xrootwindow = display.root_window(0); - - X.Event event = X.Event(); - - event.xclient.type = X.EventType.ClientMessage; - event.xclient.message_type = Gdk.X11.get_xatom_by_name("_NET_WM_MOVERESIZE"); - event.xclient.display = display; - event.xclient.window = xid; - event.xclient.format = 32; - event.xclient.data.l[0] = x; - event.xclient.data.l[1] = y; - event.xclient.data.l[2] = action; - event.xclient.data.l[3] = button; - event.xclient.data.l[4] = secret_value; - - display.send_event( - xrootwindow, - false, - X.EventMask.SubstructureNotifyMask | X.EventMask.SubstructureRedirectMask, - ref event); - - display.flush(); - } -} diff -Nru deepin-terminal-5.0.0+ds1/main.vala deepin-terminal-5.4.13/main.vala --- deepin-terminal-5.0.0+ds1/main.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/main.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,272 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2017 Deepin, Inc. - * 2011 ~ 2017 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gdk; -using Gee; -using Gtk; -using Keymap; -using Vte; -using Widgets; - -[DBus (name = "com.deepin.terminal")] -public class TerminalApp : Application { - public static void on_bus_acquired(DBusConnection conn, TerminalApp app) { - try { - conn.register_object("/com/deepin/terminal", app); - } catch (Error e) { - stderr.printf("Could not register service\n"); - } - } - - public void exit() { - quit(); - window.quit(); - } - - public signal void quit(); -} - -[DBus (name = "com.deepin.quake_terminal")] -public class QuakeTerminalApp : Application { - public static void on_bus_acquired(DBusConnection conn, QuakeTerminalApp app) { - try { - conn.register_object("/com/deepin/quake_terminal", app); - } catch (Error e) { - stderr.printf("Could not register service\n"); - } - } - - public void show_or_hide() { - this.quake_window.toggle_quake_window(); - } -} - -[DBus (name = "com.deepin.quake_terminal")] -interface QuakeDaemon : Object { - public abstract void show_or_hide() throws Error; -} - - -const string GETTEXT_PACKAGE = "deepin-terminal"; - -public class Application : Object { - - private static bool quake_mode = false; - private static string? window_mode = null; - private static string? work_directory = null; - private static string? load_theme = null; - - // pass_options just for print help information, we need parse -e or -x commands myself. - [CCode (array_length = false, array_null_terminated = true)] - public static string[]? pass_options = null; - - public Widgets.QuakeWindow quake_window; - public Widgets.Window window; - public WorkspaceManager workspace_manager; - public static ArrayList commands; - public static int64 start_time; - - private bool inited = false; - private static bool version = false; - - public static void main(string[] args) { - start_time = GLib.get_real_time() / 1000; - - // NOTE: set IBUS_NO_SNOOPER_APPS variable to avoid Ctrl + 5 eat by input method (such as fcitx.); - Environment.set_variable("IBUS_DISABLE_SNOOPER", "1", true); - - // Set 'NO_AT_BRIDGE' environment variable with 1 to dislable accessibility dbus warning. - Environment.set_variable("NO_AT_BRIDGE", "1", true); - - Intl.setlocale(); - Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "utf-8"); - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - // Need parse -e or -x commands my self, OptionEntry just will got first argument after -e or -x. - commands = new ArrayList(); - bool find_command_flag = false; - foreach (string arg in args) { - if (find_command_flag) { - commands.add(arg); - } - - if (arg == "-e" || arg == "-x") { - find_command_flag = true; - } - } - - try { - string window_mode_description = "%s (normal, maximize, fullscreen)".printf(_("Set the terminal window mode")); - - GLib.OptionEntry[] pass_options = { - OptionEntry() { - long_name="version", - short_name=0, - flags=0, - arg=OptionArg.NONE, - arg_data=&version, - description=_("Display version"), - arg_description=null - }, - OptionEntry() { - long_name="work-directory", - short_name='w', - flags=0, - arg=OptionArg.FILENAME, - arg_data=&work_directory, - description=_("Set the terminal startup directory"), - arg_description=null - }, - OptionEntry() { - long_name="window-mode", - short_name='m', - flags=0, - arg=OptionArg.STRING, - arg_data=&window_mode, - description=window_mode_description, - arg_description=null - }, - OptionEntry() { - long_name="execute", - short_name='e', - flags=0, - arg=OptionArg.STRING_ARRAY, - arg_data=&pass_options, - description=_("Run a program in the terminal"), - arg_description=null - }, - OptionEntry() { - long_name="execute", - short_name='x', - flags=0, - arg=OptionArg.STRING_ARRAY, - arg_data=&pass_options, - description=_("Run a program in the terminal"), - arg_description=null - }, - OptionEntry() { - long_name="quake-mode", - short_name='q', - flags=0, - arg=OptionArg.NONE, - arg_data=&quake_mode, - description=_("Quake mode"), - arg_description=null - }, - OptionEntry() { - long_name="load-theme", - short_name='l', - flags=0, - arg=OptionArg.STRING, - arg_data=&load_theme, - description=_("Load theme"), - arg_description=null - }, - OptionEntry() - }; - - var opt_context = new OptionContext(_("Deepin Terminal")); - opt_context.set_summary(_("Deepin Teminal is an advanced terminal emulator with window-splitting, workspaces, remote management, Quake mode and other features.")); - opt_context.set_help_enabled(true); - opt_context.add_main_entries(pass_options, null); - opt_context.parse(ref args); - } catch (OptionError e) { - // Don't print option error, avoid confuse user. - } - - if (version) { - stdout.printf("Deepin Terminal %s\n".printf(Constant.VERSION)); - stdout.printf ("Copyright 2011-2017 Deepin, Inc.\n"); - } else { - Gtk.init(ref args); - - // Just for debug perfermance. - // Gdk.Window.set_debug_updates(true); - - if (quake_mode) { - QuakeTerminalApp app = new QuakeTerminalApp(); - Bus.own_name(BusType.SESSION, - "com.deepin.quake_terminal", - BusNameOwnerFlags.NONE, - ((con) => {QuakeTerminalApp.on_bus_acquired(con, app);}), - () => {app.run(false);}, - () => {app.run(true);}); - } else { - TerminalApp app = new TerminalApp(); - Bus.own_name(BusType.SESSION, - "com.deepin.terminal", - BusNameOwnerFlags.NONE, - ((con) => {TerminalApp.on_bus_acquired(con, app);}), - () => {app.run(false);}, - () => {app.run(true);}); - } - - Gtk.main(); - } - } - - public void run(bool has_start) { - // Bus.own_name is callback, when application exit will execute `run` function. - // Use inited variable to avoid application run by Bus.own_name release. - if (inited) { - return; - } - inited = true; - - if (has_start && quake_mode) { - try { - QuakeDaemon daemon = Bus.get_proxy_sync(BusType.SESSION, "com.deepin.quake_terminal", "/com/deepin/quake_terminal"); - daemon.show_or_hide(); - } catch (Error e) { - stderr.printf("%s\n", e.message); - } - - Gtk.main_quit(); - } else { - Utils.load_css_theme(Utils.get_root_path("style.css")); - - Tabbar tabbar = new Tabbar(); - workspace_manager = new WorkspaceManager(tabbar, work_directory); - - if (quake_mode) { - quake_window = new Widgets.QuakeWindow(); - quake_window.show_window(workspace_manager, tabbar); - Utils.write_log("Deepin quake terminal start in: %s\n".printf((GLib.get_real_time() / 1000 - Application.start_time).to_string())); - tabbar.init(workspace_manager, quake_window); - } else { - window = new Widgets.Window(window_mode); - window.set_has_resize_grip(true); - - // Change theme temporary if 'load_theme' option is valid. - if (load_theme != null) { - window.config.load_temp_theme(load_theme); - } - - window.show_window((TerminalApp) this, workspace_manager, tabbar, has_start); - Utils.write_log("Deepin terminal start in: %s\n".printf((GLib.get_real_time() / 1000 - Application.start_time).to_string())); - tabbar.init(workspace_manager, window); - } - - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/po/af/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/af/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/af/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/af/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Maggie Liu , 2017\n" -"Language-Team: Afrikaans (https://www.transifex.com/linuxdeepin/teams/3976/af/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: af\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Voeg by" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Kanselleer" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Sluit venster" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Instruksie" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopieer" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Verwyder" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Volskerm" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Koppelvlak" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimeer" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Naam" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Oop" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Wagwoord" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Stoor" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminaal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Gebruikersnaam" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Venster" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Werkspasie" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/am_ET/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/am_ET/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/am_ET/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/am_ET/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,711 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# samson , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: samson , 2017\n" -"Language-Team: Amharic (Ethiopia) (https://www.transifex.com/linuxdeepin/teams/3976/am_ET/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: am_ET\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"ትእዛዙ ተፈጽሟል: ይጫኑ ማስገቢያውን ከ ተርሚናል ለ መውጣት" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "ስለ" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "ማረጋገጫ" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "መጨመሪያ" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "ትእዛዝ መጨመሪያ" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "ሰርቨር መጨመሪያ" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "ትእዛዝ መጨመሪያ" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "ሰርቨር መጨመሪያ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "አድራሻ" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "አድራሻ:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "የረቀቀ" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "የረቀቀ ምርጫ" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "የ ኋሊት ደምሳሽ ቁልፍ" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "የ ኋሊት ደምሳሽ ቁልፍ" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "መሰረታዊ" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "መደብ ማደብዘዣ" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "መሰረዣ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "የምስክር ወረቀት" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "የምስክር ወረቀት" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "ሌሎች መስኮቶችን መዝጊያ" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "ሌሎች መስኮቶችን መዝጊያ" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "መስኮቶች መዝጊያ" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "መስኮት መዝጊያ:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr " የ ስራ ቦታ መዝጊያ" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr " የ ስራ ቦታ መዝጊያ:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "ትእዛዝ" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "ትእዛዝ:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "ይዞታው" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "ኮፒ" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "አገናኝ ኮፒ ማድረጊያ" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "ኮፒ:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "መጠቆሚያ" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "መጠቆሚያ በራሱ መደበቂያ" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "የ መጠቆሚያው ብልጭ ድርግም ባይ" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "የ መጠቆሚያው ዘዴ: " - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "ትእዛዝ ማስተካከያ" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "ትእዛዝ ማስተካከያ" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "መቁረጫ" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "የ ዲፕኢን ተርሚናል" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"የ ዲፕኢን ተርሚናል በጣም ዘመናዊ ነው: ከ በርካታ የ ስራ ቦታዎች: በርካታ መስኮቶች: የ ሩቅ አስተዳዳሪ እና የ quake ዘዴ እንዲሁም ሌሎች ገጽታዎች ጋር: \n" -"\n" -"በ እርስዎ ትኩረት ላይ ያተኩራል ለ አለም አቀፍ ትእዛዞዝ መስመሮች!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "ነባር መጠን" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "ነባር መጠን:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "ማጥፊያ" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "ትእዛዝ ማጥፊያ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "ማጥፊያ ቁልፍ" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "ማጥፊያ ቁልፍ:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "ሰርቨር ማጥፊያ" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "አቋራጭ ማሳያ" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "አቋራጭ ማሳያ:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "እትም ማሳያ" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "ፋይል ማውረጃ" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "ትእዛዝ ማረሚያ" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "ሰርቨር ማረሚያ" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Encoding" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Encoding:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "መውጫ" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "ከ ሙሉ መመልከቻው ዘዴ መውጫ" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "የ ፊደል መጠን:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "ፊደል:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "በሙሉ መመልከቻ ዘዴ" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "በሙሉ መመልከቻ ዘዴ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "ቡድን" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "ቡድን:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "እርዳታ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "በ አግድም መክፈያ" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "በ አግድም መክፈያ:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "ገጽታ" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "ወደሚቀጥለው ትእዛዝ መዝለያ" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "ወደሚቀጥለው ትእዛዝ መዝለያ:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "ወዳለፈው ትእዛዝ መዝለያ" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "ወዳለፈው ትእዛዝ መዝለያ:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "ገጽታ መጫኛ" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "ማሳደጊያ" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "ስም" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "ስም: " - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "አዲስ መስኮት" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "አዲስ የ ስራ ቦታ" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "አዲስ የ ስራ ቦታ:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "የሚቀጥለው የ ስራ ቦታ" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "የሚቀጥለው የ ስራ ቦታ:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "መደበኛ መስኮት" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "በ ውስጡ ብርሀን የማያሳልፍ" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "መክፈቻ" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "መክፈቻ" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "ምርጫ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "የ መግቢያ ቃል" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "የ መግቢያ ቃል" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "መለጠፊያ" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "መለጠፊያ:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "መንገድ" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "መንገድ:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "እባክዎን አዲስ አቋራ ያስገቡ" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "ቀደም ያለው የ ስራ ቦታ" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "ቀደም ያለው የ ስራ ቦታ" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "ፕሮግራም በ ተርሚናል ውስጥ እየሄደ ነው" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "በ Quake ዘዴ" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "የ ሩቅ አስተዳዳሪ" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "የ ሩቅ አስተዳዳሪ:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "እንደገና መሰየሚያ" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "አርእስት እንደገና መሰየሚያ" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "አርእስት እንደገና መሰየሚያ:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "ያስፈልጋል " - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "ነባር እንደ ነበር መመለሻ" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "ፕሮግራም በ ተርሚናል ውስጥ ማስኬጃ" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "ማስቀመጫ" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "መሸብለያ" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "መሸብለያ ቁልፍ በሚጫኑ ጊዜ:" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "መሸብለያ በ ውጤት ላይ:" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "መፈለጊያ" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "መፈለጊያ:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "ይምረጡ" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "ሁሉንም መምረጫ" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "ሁሉንም መምረጫ:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "የሚጫን ፋይል ይምረጡ" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "የ ግራ መስኮት ይምረጡ" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "የ ግራ መስኮት ይምረጡ:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "የ ታችኛውን መስኮት ይምረጡ" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "የ ታችኛውን መስኮት ይምረጡ:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "የ ቀኝ መስኮት ይምረጡ" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "የ ቀኝ መስኮት ይምረጡ:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "የ ግል ቁልፍ ፋይል ይምረጡ" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "የ ላይኛውን መስኮት ይምረጡ" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "የ ላይኛውን መስኮት ይምረጡ:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr " የ ስራ ቦታ ይምረጡ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "የ ሰርቨር ስም" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "የ ሰርቨር ስም:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "ተርሚናል በማስጀመሪያ ዳይሬክቶሪ ውስጥ ማሰናጃ" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "ተርሚናል በ መስኮት ዘዴ ማሰናጃ" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "ማሰናጃዎች" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "አቋራጭ " - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "አቋራጮች:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "ገጽታ መቀየሪያ" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "ተርሚናል" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "መጫኛ" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "ፋይል መጫኛ" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "በሚጀምር ጊዜ መጠቀሚያ:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "የ ተጠቃሚ ስም" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "የ ተጠቃሚ ስም:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "እትም" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "በ ቁመት መክፈያ" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "በ ቁመት መክፈያ:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"እንኳን ደህና መጡ ወደ ዲፕኢን ተርሚናል: እባክዎን እርግጠኛ ይሁኑ የ rz እና sz ትእዛዝ መገጠሙን በ ሰርቨር ውስጥ" -" በ ቀኝ ከ መጫንዎት በፊት: ፋይሎችን ለ መጫን እና ለ ማውረድ" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "መስኮት" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "የስራ ቦታ" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "በርቀት ማሳያ" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "በቅርብ ማሳያ" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "በርቀት ማሳያ" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "በርቀት ማሳያ:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "ዲፕኢን" diff -Nru deepin-terminal-5.0.0+ds1/po/ar/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ar/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ar/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ar/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,720 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# goodboy5 , 2017 -# كريم أولاد الشلحة , 2017 -# abs1515 , 2017 -# Abdellah Chadidi , 2017 -# abdelbasset t , 2017 -# mo-hd , 2017 -# Abdullah Alnahdy , 2017 -# MUHAAB SHAAM , 2018 -# أشرف بصرى , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: أشرف بصرى , 2019\n" -"Language-Team: Arabic (https://www.transifex.com/linuxdeepin/teams/3976/ar/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"تم الإنتهاء من الأوامر، اضغط ENTER للخروج من الطرفية." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "حول" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "شكر وتقدير " - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "إضافة" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "إضافة أمر" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "إضافة خادم" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "إضافة أمر" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "إضافة خادم" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "عنوان" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "العنوان:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "متقدم" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "خيارات متقدمة" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "هل أنت متأكد أنك تريد حذف %s ؟" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "هل أنت متأكد أنك تريد الخروج ؟" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "مفتاح مسافة للخلف" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "مفتاح مسافة للخلف:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "أساسي" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "خلفية ضبابية" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "إلغاء" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "شهادة" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "شهادة:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "إغلاق النوافذ الأخرى" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "إغلاق النوافذ الأخرى:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "إغلاق النافذة" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "إغلاق النافذة:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "إغلاق مساحة العمل" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "إغلاق مساحة العمل:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "أمر" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "أمر" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "محتوى" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "نسخ" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "نسخ الرابط" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "نسخ عند التحديد" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "نسخ:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "مؤشر" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "إخفاء تلقائي للمؤشر" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "وميض المؤشر" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "نمط المؤشر:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "أوامر مخصصة" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "أوامر مخصصة:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "قص" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"طرفية ديبين : محاكي طرفية متقدم بمساحات عمل ، متعدد النوافذ ،إدارة عن بعد ،" -" وضع عائم وخيارات أخرى ." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "طرفية ديبين" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"طرفية ديبين : محاكي طرفية متقدم بمساحات عمل ، متعدد النوافذ ،إدارة عن بعد ، وضع عائم وخيارات أخرى .\n" -"\n" -"إنها تجعل تركيزك حاداً في عالم سطر الأوامر." - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "الحجم الافتراضي" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "الحجم الافتراضي:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "حذف" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "حذف الأمر" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "مفتاح الحذف" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "مفتاح الحذف:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "حذف الخادم" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "عرض الإختصارات" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "عرض الإختصارات:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "عرض الإصدار" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "تحميل الملف" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "تعديل الأمر" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "تعديل الخادم" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "التشفير" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "التشفير:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "خروج" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "خروج من وضع ملء الشاشة" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "بحث" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "حجم الخط:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "الخط:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "ملء الشاشة" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "ملء الشاشة:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "مجموعة" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "مجموعة:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "مساعدة" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "إخفاء النافذة العائمة بعد فقدان التركيز" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "تقسيم أفقي" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "التقسيم الأفقي :" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "الواجهة" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "الانتقال إلى الأمر التالي" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "الانتقال إلى الأمر التالي :" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "الانتقال إلى الأمر السابق" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "الانتقال إلى الأمر السابق :" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "تحميل سمة" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "تكبير" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "الاسم" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "الاسم :" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "نافذة جديدة" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "مساحة عمل جديدة" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "مساحة عمل جديدة:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "مساحة العمل التالية" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "مساحة العمل التالية:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "نافذة عادية" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "التعتيم" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "فتح" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "فتح في مدير الملفات" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "فتح رابط" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "بدأ طرفية بتنسيق جديد" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "فتح:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "اختياري" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "كلمة المرور" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "كلمة المرور:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "لصق" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "لصق:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "مسار" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "المسار:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "يرجى إدخال اختصار جديد" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "المنفذ:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "مساحة العمل السابقة" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "مساحة العمل السابقة:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "لا تزال هناك برامج تعمل في الطرفية" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "الوضع العائم" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "الإدارة عن بعد" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "الإدارة عن بعد:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "إعادة تسمية" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "إعادة تسمية العنوان" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "إعادة تسمية العنوان :" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "مطلوب" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "استعادة الافتراضيات" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "تشغيل برنامج في الطرفية" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "حفظ" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "تمرير" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "تنقل بالمفاتيح" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "التمرير على المخرجات" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "بحث " - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "بحث:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "تحديد" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "تحديد الكل" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "تحديد الكل:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "حدد دليل لحفظ الملف" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "تحديد ملف للرفع" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "تحدبد النافذة اليسرى" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "تحدبد النافذة اليسرى:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "تحدبد النافذة السفلى" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "تحدبد النافذة السفلى:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "تحدبد النافذة اليمنى" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "تحدبد النافذة اليمنى:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "تحديد ملف المفتاح الخاص" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "حدد النافذة العليا" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "تحديد النافذة العليا:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "تحديد مساحة عمل" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "اسم الخادم" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "اسم الخادم :" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "إعداد دليل بدء تشغيل الطرفية" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "إعداد وضع نافذة الطرفية" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "الإعدادات" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "الإختصارات" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "اختصارات:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "تغيير السمة" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "الطرفية" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "تبديل ملء الشاشة" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "اكتب المسار لتنزيل الملف" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "رفع" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "رفع الملف" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "استخدام عند البدء:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "اسم المستخدم" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "اسم المستخدم:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "الإصدار :" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "تقسيم عمودي" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "التقسيم العمودي :" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"مرحباً بكم في طرفية ديبين ، الرجاء التأكد من أن الأمرين rz و sz يجب " -"تثبيتهما في الخادم قبل النقر لرفع أو تنزيل الملفات" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "النافذة" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "مساحة العمل" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "تكبير" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "تقريب" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "تصغير" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "تبعيد" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "دييبن" diff -Nru deepin-terminal-5.0.0+ds1/po/ast/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ast/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ast/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ast/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,711 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Ḷḷumex03 , 2017 -# enolp , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: enolp , 2018\n" -"Language-Team: Asturian (https://www.transifex.com/linuxdeepin/teams/3976/ast/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ast\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Completóse'l comandu, primi INTRO pa colar de la terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Tocante a" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecimentos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Amestar" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Amiestu d'un comandu" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Amiestu d'un sirvidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Amestar un comandu" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Amestar un sirvidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Direición" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Direición:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanzao" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opciones avanzaes" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla del retrocesu" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla del retrocesu:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Desenfocar el fondu" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Encaboxar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificáu" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificáu:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zarrar les otres ventanes" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zarrar les otres ventanes:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zarrar la ventana" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zarrar la ventana" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zarrar la estaya de trabayu" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zarrar la estaya de trabayu" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comandu" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comandu:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Conteníu" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar l'enllaz" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Anubrir automáticamente'l cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Parpaguiu del cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilu del cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizaos" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizaos:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal ye un emulador avanzáu de la terminal con sofitu pa estayes de trabayu, munches vistes dixebraes, xestión remota, mou Quake y otres carauterístiques.\n" -"\n" -"¡Afina'l to enfoque nel mundu de la llinia de comandos!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamañu predetermináu" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamañu predetermináu:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Desaniciar" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Desaniciar comandu" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Tecla del desaniciu" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Tecla del desaniciu:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Desnaiciar sirvidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Amosar atayos" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Amosar atayos:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Amuesa la versión" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Ficheru de la descarga" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Edición d'un comandu" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Edición d'un sirvidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificación" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificación:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Colar" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Colar de la pantalla completa" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Alcontrar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamañu de la fonte:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fonte:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pantalla completa" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pantalla completa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupu" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupu:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ayuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Dixebra horizontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Dixebra horizontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfaz" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Dir al comandu siguiente" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Dir al comandu siguiente:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Dir al comandu anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Dir al comandu anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Carga un estilu" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nome" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nome:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Ventana nueva" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Estaya de trabayu nueva" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Estaya de trabayu nueva:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Estaya siguiente de trabayu" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Estaya siguiente de trabayu" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Ventana normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidá:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abrir" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir nel xestor de ficheros" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Contraseña" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Contraseña:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Apegar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Apegar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Camín" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Camín:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Introduz un comandu nuevu" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Puertu:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Estaya anterior de trabayu" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Estaya anterior de trabayu" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Entá hai programes n'execución na terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Mou Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Xestión remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Xestión remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renomar" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renomar el títulu" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renomar el títulu:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Ríquese" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Reafitar valores" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Executa un programa na terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Guardar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Desplazamientu" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Desplazase la primir les fleches direicionales" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Desplazase al xenerase la salida" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Guetar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Guetar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Esbillar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Esbillar too" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Esbillar too:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Esbilla del ficheru a unviar" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Esbillar la ventana esquierda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Esbillar la ventana esquierda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Esbillar la ventana baxera" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Esbillar la ventana baxera:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Esbillar la ventana drecha" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Esbillar la ventana drecha:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Esbilla del ficheru de la clave privada" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Esbillar ventana cimera" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Esbillar ventana cimera:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Esbillar estaya de trabayu" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nome del sirvidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nome del sirvidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Afita'l direutoriu del aniciu de la terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Afita'l mou de la ventana de la terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Axustes" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Atayos" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atayos:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Camudar l'estilu" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Xubir" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Xuba del ficheru" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Nel aniciu:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nome del usuariu" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nome del usuariu:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versión:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Dixebra vertical" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Dixebra vertical:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Afáyate en Deepin Terminal. Asegúrate que los comandos rz y sz tán instalaos" -" nel sirvidor enantes de facer clic drechu pa xubir o baxar ficheros." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Ventana" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Estaya de trabayu" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Averar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Averar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Alloñar" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Alloñar:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/az/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/az/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/az/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/az/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,709 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Mehman Bashirov , 2017 -# Vagif Khansultanov , 2017 -# Nicat Məmmədov , 2017 -# manymous , 2018 -# Elşad , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Elşad , 2018\n" -"Language-Team: Azerbaijani (https://www.transifex.com/linuxdeepin/teams/3976/az/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: az\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Komanda tamamdır, terminaldan çıxmaq üçün ENTER düyməsini basın" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Haqqında" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Təşəkkürlər" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Əlavə et" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Command əlavə et" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Server əlavə edin" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Command əlavə et" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Server əlavə edin" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Address" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Address" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Təkmilləşmiş" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "İmtina" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Digər pəncərələri bağla" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "İş sahəsini bağla" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Əmr" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopyala" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Sil" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Çıxış" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Tam ekrandan çıx" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Tam ekran" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Kömək" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Böyüt" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Ad" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Yeni iş sahəsi" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Sonrakı iş sahəsi" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Aç" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Şifrə" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Əlavə et" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Zəhmət olmasa yeni qısayolu daxil edin" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Əvvəlki iş sahəsi" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Yenidən adlandır" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Tələb olunur" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Saxla" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Axtar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Tənzimləmələr" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Qısayollar" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "İstifadəçi adı" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versiya:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Pəncərə" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "İş sahəsi" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Yaxınlaşdır" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Uzaqlaşdır" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/bg/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/bg/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/bg/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/bg/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# yulian yordanov, 2017 -# Радослав Иванов , 2017 -# alexandar topalov , 2017 -# Petya Antonova , 2017 -# Kiril Kirilov , 2017 -# Tony Ivanov , 2017 -# Galin Iskrenov , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Galin Iskrenov , 2019\n" -"Language-Team: Bulgarian (https://www.transifex.com/linuxdeepin/teams/3976/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Командата приключи, настиснете ENTER за изход от терминала." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Относно:" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Благодарности" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Добави" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Добавяне на Команда" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Добавяне на Сървър" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Добави комада" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Добави сървър" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Адрес" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Адрес:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Разширени" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Разширени опции" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Клавиш Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Клавиш Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Основен" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Размазване на фон" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Отказ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Сертификат" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Сертификат:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Затвори другите прозорци" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Затваряне на другите прозорци:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Затваряне на прозореца" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Затваряне на прозореца:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Затвори работното място" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Затвори работното място:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Команда" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Команда:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Съдържание" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Копиране" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Копиране на връзка" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Копиране на избрано" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Копиране" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Курсор" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Автоматично скриване на курсора" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Мигащ курсор" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Стил на курсор:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Потребителски команди" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Потребителски команди:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Изрежи" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin терминал" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal разширен терминален емулатор с работно пространство, с множество прозорци, отдалечено управление, quake режим и други екстри.\n" -"\n" -"Фокусира вниманието ви в света на командния ред!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Стандартен размер" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Стандартен размер:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Изтриване" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Команда за изтриване" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Клавиш за изтриване" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Клавиш за изтриване:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Изтриване на сървър" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Комбинации за екрана" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Комбинации за екрана:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Версия монитор" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Файл за сваляне" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Команда за редактиране" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Редакция сървър" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Кодиране" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Кодиране:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Изход" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Изход от цял екран" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Търси" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Размер шрифт:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Шрифт:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Цял екран" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Цял екран:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Група" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Група:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Помощ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Раздели хоризонтално" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Раздели хоризонтално:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Интерфейс" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Скок към следваща команда" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Скок към следваща команда:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Скок към предишна команда" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Скок към предишна команда:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Зареди тема" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Максимизиране" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Име" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Име:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Нов прозорец" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Ново работно място" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Ново работно място:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Следващото работно място" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Следващото работно място:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Нормален прозорец" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Непрозрачност:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Отваряне" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Отвори във файловия мениджър" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Отваряне:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Допълнително" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Парола" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Парола:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Поставяне" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Поставяне:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Път" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Път:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Моля, въведете нов кратък път" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Порт:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Предишното работно място" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Предишното работно място:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Програни се извършват в теминала" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake режим" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Отдалечено управление" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Отдалечено управление:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Преименуване" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Преименуване на заглавие" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Преименуване на заглавие:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Задължителен" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Възстанови стандартните настройки" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Пусни програмата в терминал" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Запазване" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Превъртане" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Превъртане с клавиши" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Превъртана на изхода:" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Търсене" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Търсене:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Избери" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Избери всички" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Избери всичко:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Изберете файл за качване" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Избор на ляв прозорец" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Избор на ляв прозорец:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Избор на долен прозорец" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Избор на долен прозорец:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Избор на десен прозорец" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Избор на десен прозорец:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Избор на файл частен ключ" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Избор на горен прозорец" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Избор на горен прозорец:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Избор на работно място" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Име на съсвър" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Име на сървър:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Задаване на стартова папка на терминал" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Задаване прозоречен режим на терминал" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Настройки" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Кратък път" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr " Кратък път:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Смяна на тема" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Терминал" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Качване" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Качване на файл" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Използване при стартиране:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Потребителско име" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Потребителско име:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Версия:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Вертикално разделяне" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Вертикално разделяне:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Добре дошли в Deepin терминал, убедете се, че командите rz и sz са " -"инсталирани на сървъра преди дясно щракване за качаване или сваляне на " -"файлове." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Прозорец" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Работно място" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Увеличаване" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Увеличаване:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Намаляване" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Намаляване:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/bn/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/bn/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/bn/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/bn/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,708 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Syed Muhammad Mahmudul Haque, 2017 -# Sekander Badsha , 2017 -# TechLovinGeek , 2017 -# Siam Sami , 2017 -# deepin_transifex , 2018 -# Md. Emruz Hossain , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Md. Emruz Hossain , 2018\n" -"Language-Team: Bengali (https://www.transifex.com/linuxdeepin/teams/3976/bn/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bn\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "সম্পর্কে" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "যোগ করুন" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "উন্নত" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "প্রাথমিক" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "বাতিল" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "উইন্ডো বন্ধ করুন" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "কমান্ড" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "কপি" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "কাট" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "মুছে ফেলুন" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "বের হয়ে যান" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "সম্পূর্ণ পর্দা থেকে বের হয়ে যান" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "সম্পূর্ণ পর্দা" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "সাহায্য করুন" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "ইন্টারফেস" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "বড় কর" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "নাম " - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "খুলুন" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "ঐচ্ছিক" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "পাসওয়ার্ড" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "পেস্ট" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "পথ " - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "অনুগ্রহ করে একটি নতুন শর্টকাট প্রবেশ করান" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "আবশ্যক" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "পূর্বনির্ধারিত জিনিসে ফিরে যান" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "সংরক্ষণ করুন" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "খুঁজুন" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "নির্বাচন করুন" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "সব সিলেক্ট" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "সেটিংস" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "শর্টকাট" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "প্রান্তিক" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "ব্যবহারকারীর নাম " - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "সংস্করন" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "উইন্ডো" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/ca/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ca/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ca/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ca/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,718 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Marc Sancho , 2017 -# jordi222 , 2017 -# el_libre como el chaval , 2017 -# Davidmp , 2019 -# Jaime Muñoz Martín , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Jaime Muñoz Martín , 2019\n" -"Language-Team: Catalan (https://www.transifex.com/linuxdeepin/teams/3976/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"L'ordre s'ha completat, premeu RETORN per sortir del terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Quant a" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agraïments" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Afegeix" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Afegeix una ordre" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Afegeix un servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Afegeix una ordre" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Afegeix un servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adreça" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adreça:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avançat" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opcions avançades" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Segur que voleu eliminar %1?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Segur que voleu sortir-ne?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla de retrocés" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla de retrocés:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Bàsic" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Fons difuminat" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancel·la" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Tanca les altres finestres" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Tanca les altres finestres:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Tanca la finestra" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Tanca la finestra:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Tanca l'espai de treball" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Tanca l'espai de treball:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Ordre" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Ordre:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contingut" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copia" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copia l'enllaç" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copia en seleccionar" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copia:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Ocultació automàtica del cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Intermitència del cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estil del cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Ordres personalitzades" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Ordres personalitzades:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Retalla" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"El Terminal del Deepin és un emulador de terminal avançat amb divisió de " -"finestres, espais de treball, gestió remota, mode Quake i altres " -"característiques." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal del Deepin " - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"El Terminal del Deepin és un emulador de terminal avançat amb espai de treball, finestres múltiples, gestió remota, mode Quake i altres característiques.\n" -"\n" -"Augmenta el vostre enfocament al món de la línia d'ordres!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Mida per defecte" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Mida per defecte:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Elimina" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Elimina l'ordre" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Elimina la clau" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Elimina la clau:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Elimina el servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Mostra les dreceres" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Mostra les dreceres:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Mostra la versió" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Baixa el fitxer" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Edita l'ordre" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Edita el servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificació" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificació:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Surt" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Surt de la pantalla completa" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Troba" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Mida de la lletra:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Lletra:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pantalla completa" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pantalla completa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grup" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grup:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ajuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Oculta la finestra desplegable en perdre el focus." - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Divisió horitzontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Divisió horitzontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfície" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Salta a l'ordre següent" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Salta a l'ordre següent:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Salta a l'ordre anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Salta a l'ordre anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Carrega el tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximitza" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nom" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nom:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Finestra nova" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Espai de treball nou" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Espai de treball nou:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Espai de treball següent" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Espai de treball següent:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Finestra normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacitat:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Obre" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Obre al gestor de fitxers" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Obre l'enllaç" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Obre un terminal amb un tema nou." - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Obre:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Contrasenya" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Contrasenya:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Enganxa" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Enganxa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Camí" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Camí:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Introduïu una drecera nova" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Espai de treball anterior" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Espai de treball anterior:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Encara hi ha programes executant-se al terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Mode de Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Gestió remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Gestió remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Canvia'n el nom" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Canvia'n el títol" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Canvia'n el títol:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Necessari" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaura els valors per defecte" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Executa un programa al terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Desa" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Desplaçament" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Desplaçament en tocar una tecla" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Desplaçament en una sortida" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Cerca" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Cerca:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Selecciona" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Selecciona-ho tot" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Selecciona-ho tot:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Seleccioneu el directori per desar-hi el fitxer." - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Seleccioneu el fitxer per carregar" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Selecciona la finestra de l'esquerra" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Selecciona la finestra de l'esquerra:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Selecciona la finestra de baix" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Selecciona la finestra de baix:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Selecciona la finestra de la dreta" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecciona la finestra de la dreta:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Selecciona el fitxer de clau privada" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Selecciona la finestra de dalt" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Selecciona la finestra de dalt:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Selecciona l'espai de treball" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nom de servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nom de servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Estableix el directori d'inici del terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Estableix el mode de finestra del terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Configuració" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Dreceres" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Dreceres:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Canvia el tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Commuta la pantalla completa" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Escriviu el camí per baixar el fitxer." - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Carrega" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Carrega un fitxer" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Usa en iniciar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nom d'usuari" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nom d'usuari:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versió:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Divisió vertical" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Divisió vertical:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Us donem la benvinguda al Terminal del Deepin. Si us plau, assegureu-vos que" -" les ordres rz i sz s'han instal·lat al servidor abans d'usar el clic " -"contrari per carregar i baixar fitxers." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Finestra" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Espai de treball" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Ampliació" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Ampliació:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Reducció" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Reducció:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/cs/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/cs/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/cs/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/cs/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,715 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# 李洪武 , 2017 -# fri, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: fri, 2019\n" -"Language-Team: Czech (https://www.transifex.com/linuxdeepin/teams/3976/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Příkaz byl dokončen, stiskněte klávesu ENTER pro ukončení terminálu." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "O programu" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Poděkování" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Přidat" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Přidat příkaz" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Přidat server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Přidat příkaz" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Přidat server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresa" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresa:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Pokročilé" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Pokročilé volby" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Opravdu je chcete smazat %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Opravdu chcete opustit?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Klávesa Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Klávesa Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Základní" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Rozmazat pozadí" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Zrušit" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certifikát" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certifikát:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zavřít další okna" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zavřít další okna:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zavřít okno" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zavřít okno:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zavřít pracovní prostor" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zavřít pracovní prostor:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Příkaz" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Příkaz:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Obsah" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopírovat" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopírovat odkaz" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopírovat při výběru" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopírovat:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Ukazatel" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Automatické skrytí ukazatele" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Blikání ukazatele" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Styl ukazatele: " - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Vlastní příkazy" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Vlastní příkazy:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Vyjmout" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Terminál Deepin je pokročilým emulátorem terminálu s rozdělováním oken, " -"pracovními plochami, vzdálenou správou, režimem Quake a dalšími funkcemi." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminál" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminál Deepin je pokročilým emulátorem terminálu s pracovním prostorem, více okny, vzdálenou správou, režimem quake a dalšími funkcemi.\n" -"\n" -"Vylepší vaše zaměření ve světě příkazového řádku!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Výchozí velikost" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Výchozí velikost:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Smazat" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Smazat příkaz" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Smazat klávesu" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Smazat klávesu:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Smazat server" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Zobrazit klávesové zkratky" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Zobrazit klávesové zkratky:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Zobrazit verzi" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Stáhnout soubor" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Upravit příkaz" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Upravit server" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kódování" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kódování:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Ukončit" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Opustit celou obrazovku" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Najít" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Velikost písma: " - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Písmo:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Celá obrazovka" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Celá obrazovka:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Skupina" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Skupina:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Nápověda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Skrýt okno Quake po ztrátě zaměření..." - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Vodorovné rozdělení" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Vodorovné rozdělení:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Rozhraní" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Skočit na další příkaz" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Skočit na další příkaz:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Skočit na předchozí příkaz" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Skočit na předchozí příkaz:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Nahrát vzhled" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Zvětšit" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Název" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Název: " - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nové okno" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nový pracovní prostor" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nový pracovní prostor:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Další pracovní prostor" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Další pracovní prostor:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Obyčejné okno" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Neprůhlednost:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Otevřít" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Otevřít ve správci souborů" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Otevřít odkaz" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Otevřít terminál s novým vzhledem" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Otevřít:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Volitelné" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Heslo" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Heslo:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Vložit" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Vložit:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Cesta" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Cesta:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Zadejte, prosím, novou zkratku" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Přípojka (port): " - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Předchozí pracovní prostor" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Předchozí pracovní prostor:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "V terminálu stále běží programy" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Režim Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Vzdálená správa" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Vzdálená správa:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Přejmenovat" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Přejmenovat název" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Přejmenovat název:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Požadováno" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Obnovit výchozí" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Spustit program v terminálu" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Uložit" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Otáčet kolečkem myši" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Posunout při úhozu na klávesnici" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Posunout při výstupu" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Hledat" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Hledat:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Vybrat" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Vybrat vše" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Vybrat vše:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Vybrat adresář pro uložení souboru" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Vybrat soubor k nahrání" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Vybrat levé okno" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Vybrat levé okno:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Vybrat dolní okno" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Vybrat dolní okno:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Vybrat pravé okno" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Vybrat pravé okno:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Vybrat soubor se soukromým klíčem" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Vybrat horní okno" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Vybrat horní okno:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Vybrat pracovní prostor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Název serveru" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Název serveru:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Nastavit spouštěcí adresář terminálu" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Nastavit okenní režim terminálu" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Nastavení" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Klávesové zkratky" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Klávesové zkratky:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Přepnout vzhled" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminál" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Přepnout na celou obrazovku" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Napsat cestu pro stažení souboru" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Nahrát" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Nahrát soubor" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Použít při spuštění:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Uživatelské jméno" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Uživatelské jméno:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Verze:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Svislé rozdělení" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Svislé rozdělení:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Vítejte v terminálu. Ujistěte se, prosím, že byly na server nainstalovány " -"příkazy rz a sz, předtím než klepnete pravým tlačítkem myši pro nahrání a " -"stažení souborů." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Okno" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Pracovní prostor" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Přiblížit" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Přiblížit:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Oddálit" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Oddálit:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/da/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/da/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/da/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/da/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,716 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Morten Juhl-Johansen Zölde-Fejér , 2017 -# 31c8ff7daf246c6bd598eefe84c1433c, 2017 -# scootergrisen, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: scootergrisen, 2019\n" -"Language-Team: Danish (https://www.transifex.com/linuxdeepin/teams/3976/da/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: da\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Kommando er blevet fuldført, tryk på ENTER for at forlade terminalen." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Om" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Tilkendegivelser" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Tilføj" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Tilføj kommando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Tilføj server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Tilføj kommando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Tilføj server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresse" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresse:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanceret" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Avancerede valgmuligheder" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Er du sikker på, at du vil slette %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Er du sikker på, at du vil afslutte?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace-tast" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace-tast:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Grundlæggende" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Sløret baggrund" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Annuller" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Luk andre vinduer" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Luk andre vinduer:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Luk vindue" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Luk vindue:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Luk arbejdsområde" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Luk arbejdsområde:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Kommando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Kommando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Indhold" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiér" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopiér link" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopiér ved vælg" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopiér:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Markør" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Skjul markør automatisk" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Markørblink" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Markørstil:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Brugerdefinerede kommandoer" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Brugerdefinerede kommandoer:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Klip" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin terminal er en avanceret terminalemulator med vinduesopdeling, " -"arbejdsområder, fjern-håndtering, Quake-tilstand og andre faciliteter." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin terminal er en avanceret terminalemulator med arbejdsområde, flere vinduer, fjern-håndtering, quake-tilstand og andre faciliteter.\n" -"\n" -"Den skærper din fokus i kommandolinjernes verden!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Standardstørrelse" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Standardstørrelse:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Slet" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Slet-kommando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Slet-tast" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Slet-tast:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Slet server" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Vis genveje" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Vis genveje:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Vis version" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Download fil" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Rediger kommando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Rediger server" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kodning" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kodning:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Afslut" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Forlad fuldskærm" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Find" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Skiftstørrelse:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Skrifttype:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Fuldskærm" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Fuldskærm:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Gruppe" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Gruppe:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Hjælp" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Skjul Quake-vindue efter fokus mistes" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Vandret opdeling" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Vandret opdeling:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Brugerflade" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Hop til næste kommando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Hop til næste kommando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Hop til forrige kommando" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Hop til forrige kommando:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Indlæs tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimer" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Navn" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Navn:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nyt vindue" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nyt arbejdsområde" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nyt arbejdsområde:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Næste arbejdsområde" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Næste arbejdsområde:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalt vindue" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacitet:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Åbn" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Åbn i filhåndtering" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Åbn link" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Åbn terminal med et nyt tema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Åbn:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Valgfri" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Adgangskode" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Adgangskode:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Indsæt" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Indsæt:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Sti" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Sti:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Indtast venligst en ny genvej" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Forrige arbejdsområde" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Forrige arbejdsområde:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programmer kører stadig i terminalen" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake-tilstand" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Fjern-håndtering" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Fjern-håndtering:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Omdøb" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Omdøb titel" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Omdøb titel:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Påkrævet" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Gendan standarder" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Kør et program i terminalen" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Gem" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Rulning" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Rul ved tastetryk" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Rul ved output" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Søg" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Søg:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Vælg" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Vælg alt" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Slet alt:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Vælg mappe hvor filen skal gemmes" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Vælg til som skal uploades" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Vælg venstre vindue" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Vælg venstre vindue:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Vælg nedre vindue" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Vælg nedre vindue:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Vælg højre vindue" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Vælg højre vindue:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Vælg den private nøglefil" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Vælg øvre vindue" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Vælg øvre vindue:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Vælg arbejdsområde" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Servernavn" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Servernavn:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Indstil terminalens opstartsmappe" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Indstil terminalens vinduestilstand" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Indstillinger" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Genveje" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Genveje:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Skift tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Fuldskærm til/fra" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Skriv stil for at downloade fil" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Upload" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Upload fil" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Ved start, brug:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Brugernavn" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Brugernavn:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Version:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Lodret opdeling" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Lodret opdeling:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Velkommen til Deepin terminal. Sørg venligst for at rz- og sz-kommandoer er " -"blevet installeret på serveren, inden højreklik bruges til upload og " -"download af filer." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Vindue" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Arbejdsområde" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom ind" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Zoom ind:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom ud" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Zoom ud:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/de/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/de/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/de/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/de/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,730 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Eduard Gotwig , 2017 -# Albert Schotschneider , 2017 -# Maggie Liu , 2017 -# Matt Hudson , 2017 -# corEr , 2017 -# Michał Trzebiatowski , 2017 -# Jochen Herter , 2017 -# Antisound , 2017 -# Till Robin Zickel , 2017 -# Joachim Namyslo, 2017 -# webcrush , 2017 -# Niklas Poslovski , 2017 -# Matthäus Beyrle , 2017 -# Marcel Pa , 2019 -# Ettore Atalan , 2019 -# Timo Kröning, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Timo Kröning, 2019\n" -"Language-Team: German (https://www.transifex.com/linuxdeepin/teams/3976/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Befehl wurde abgeschlossen, drücken Sie ENTER, um das Terminal zu verlassen." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Über" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Danksagungen" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Hinzufügen" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Befehl hinzufügen " - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Server hinzufügen " - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Befehl hinzufügen " - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Server hinzufügen " - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresse" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresse:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Erweitert" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Erweiterte Optionen " - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Sind Sie sicher, dass Sie %s löschen möchten?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Sie sind sicher, dass Sie beenden wollen?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Rücklauftaste" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Rücklauftaste:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Basis" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Hintergrund weichzeichnen" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Abbrechen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Zertifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Zertifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Andere Fenster schließen" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Andere Fenster schließen:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Fenster schließen" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Fenster schließen:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Arbeitsfläche schließen" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Arbeitsfläche schließen:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Befehl" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Befehl:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Inhalt" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopieren" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Link kopieren " - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopieren bei Auswahl" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopieren:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Mauszeiger" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Mauszeiger automatisch ausblenden" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Cursorblinkgeschwindigkeit" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Mauszeigerstil:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Benutzerdefinierte Befehle" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Benutzerdefinierte Befehle:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Ausschneiden" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal ist ein fortschrittlicher Terminal-Emulator mit " -"Fensterteilung, Arbeitsbereichen, Fernverwaltung, Quake-Modus und anderen " -"Funktionen." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal ist ein erweiterter Terminalemulator mit Arbeitsfläche, mehreren Fenstern, Fernverwaltung, Quake-Modus und anderen Funktionen.\n" -"\n" -"Es schärft Ihren Fokus in der Welt der Befehlszeile!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Standardgröße" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Standardgröße:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Löschen" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Befehl löschen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Taste löschen " - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Taste löschen:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Server löschen" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Tastenkürzel anzeigen " - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Tastenkürzel anzeigen:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Version anzeigen " - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Datei herunterladen " - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Befehl bearbeiten" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Server bearbeiten" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kodierung" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kodierung:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Beenden" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Vollbild beenden" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Suchen" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Schriftgröße:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Schriftart:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Vollbild" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Vollbild:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Gruppe " - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Gruppe:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Hilfe" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Verstecke das Quake-Fenster, nachdem der Fokus verloren wurde" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Horizontal teilen" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Horizontal teilen:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Schnittstelle" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Zum nächsten Befehl springen" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Zum nächsten Befehl springen:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Zum vorherigen Befehl springen" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Zum vorherigen Befehl springen:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Aktives Theme" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximieren" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Name" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Name:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Neues Fenster " - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Neue Arbeitsfläche" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Neue Arbeitsfläche:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Nächste Arbeitsfläche" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Nächste Arbeitsfläche:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normales Fenster" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Undurchsichtigkeit:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Öffnen" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Im Dateimanager öffnen" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Link öffnen" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Terminal mit einem neuen Thema öffnen" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Öffnen:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Optional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Passwort" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Passwort:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Einfügen" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Einfügen:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Pfad" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Pfad:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Bitte geben Sie ein neues Tastenkürzel ein " - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Vorherige Arbeitsfläche" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Vorherige Arbeitsfläche:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Es werden noch Programme im Terminal ausgeführt" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake-Modus" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Fernverwaltung" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Fernverwaltung:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Umbenennen" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Titel umbenennen" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Titel umbenennen:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Erforderlich" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Standardeinstellungen wiederherstellen" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Ein Programm im Terminal ausführen " - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Speichern" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Bildlauf" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Bildlauf bei Tastendruck" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Bildlauf bei Ausgabe" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Suchen" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Suchen:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Auswählen" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Alles auswählen" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Alles auswählen:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Wählen Sie das Verzeichnis aus, um die Datei zu speichern" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Datei zum Hochladen auswählen" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Linkes Fenster auswählen" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Linkes Fenster auswählen:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Unteres Fenster auswählen" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Unteres Fenster auswählen:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Rechtes Fenster auswählen" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Rechtes Fenster auswählen:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Private Schlüsseldatei auswählen" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Oberes Fenster auswählen" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Oberes Fenster auswählen:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Arbeitsfläche auswählen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Servername" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Servername:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Hauptverzeichnis festlegen indem das Terminal gestartet wird." - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Den Fenstermodus des Terminals festlegen." - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Einstellungen" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Tastenkürzel" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Tastenkürzel:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Thema wechseln" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Vollbild umschalten" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Geben Sie den Pfad zum Herunterladen der Datei ein" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Hochladen" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Datei hochladen" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Beim Startvorgang verwenden:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Benutzername" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Benutzername:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Version:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Vertikal teilen" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Vertikal teilen:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Willkommen im Deepin Terminal. Bitte stellen Sie sicher, dass Sie die " -"Programme rz und sz auf dem Server installiert haben, bevor Sie mit einem " -"Rechtsklick Dateien auf den Server Hochladen oder einen Download vom Server " -"beginnen." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Fenster" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Arbeitsfläche" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Hineinzoomen:" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Hineinzoomen:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Hinauszoomen:" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Hinauszoomen:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/el/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/el/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/el/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/el/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,720 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Jim Spentzos , 2017 -# Francesko Isallari , 2017 -# Michael Slave , 2017 -# Panagiotis Tabakis , 2017 -# Maggie Liu , 2017 -# Jim Gios (Joker) , 2018 -# Mark A , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Mark A , 2019\n" -"Language-Team: Greek (https://www.transifex.com/linuxdeepin/teams/3976/el/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: el\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Η εντολή ολοκληρώθηκε, πατήστε ENTER για να κλείσετε το τερματικό." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Σχετικά" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Ευχαριστίες" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Προσθήκη" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Προσθήκη Εντολής" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Προσθήκη Διακομιστή" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Προσθήκη εντολής" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Προσθήκη διακομιστή" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Διεύθυνση" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Διεύθυνση:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Προηγμένες" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Προηγμένες επιλογές" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Είστε βέβαιος ότι θέλετε να διαγράψετε %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Σίγουρα θέλετε να πραγματοποιήσετε έξοδο;" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Πλήκτρο Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Πλήκτρο Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Βασικές" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Θωλό παρασκήνιο" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Ακύρωση" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Πιστοποιητικό" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Πιστοποιητικό:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Κλείσιμο άλλων παραθύρων" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Κλείσιμο άλλων παραθύρων:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Κλείσιμο παράθυρου" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Κλείσιμο παράθυρου:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Κλείσιμο χώρου εργασίας" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Κλείσιμο χώρου εργασίας:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Εντολή" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Εντολή:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Περιεχόμενο" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Αντιγραφή" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Αντιγραφή συνδέσμου" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Αντιγραφή κατά την επιλογή:" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Αντιγραφή:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Δρομέας" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Αυτόματο κρύψιμο κέρσορα" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Αναβόσβημα δρομέα" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Στυλ δρομέα:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Προσαρμοσμένες εντολές" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Προσαρμοσμένες εντολές:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Αποκοπή" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Το τερματικό Deepin είναι ένας προχωρημένος εξομοιωτής τερματικού με " -"διαιρεμένα παράθυρα, σταθμούς εργασίας, απομακρυσμένο έλεγχο, λειτουργία " -"\"Quake\" και άλλες λειτουργίες." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Tερματικό" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Το Deepin Τερματικό είναι ένας προηγμένος εξομοιωτής τερματικού με χώρο εργασίας, πολλαπλά παράθυρα, απομακρυσμένη διαχείριση, λειτουργία quake και άλλα χαρακτηριστικά.\n" -"\n" -"Ακονίζει την εστίασή σας στον κόσμο της γραμμής εντολών!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Προεπιλεγμένο μέγεθος" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Προεπιλεγμένο μέγεθος:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Διαγραφή" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Εντολή Διαγραφής" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Πλήκτρο Delete" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Πλήκτρο Delete:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Διαγραφή διακομιστή" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Προβολή συντομεύσεων" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Προβολή συντομεύσεων:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Προβολή έκδοσης" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Λήψη αρχείου" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Επεξεργασία Εντολής" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Επεξεργασία Διακομιστή" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Κωδικοποίηση" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Κωδικοποίηση:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Έξοδος" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Έξοδος από πλήρη οθόνη" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Εύρεση" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Μέγεθος γραμματοσειράς:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Γραμματοσειρά:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Πλήρης οθόνη" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Πλήρης οθόνη:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Ομάδα" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Ομάδα:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Βοήθεια" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Απόκρυψη παραθύρου \"Quake\" μετά από την απώλεια εστίασης" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Οριζόντια διαίρεση" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Οριζόντια διαίρεση:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Διεπαφή" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Μετάβαση στην επόμενη εντολή" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Μετάβαση στην επόμενη εντολή:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Μετάβαση στην προηγούμενη εντολή" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Μετάβαση στην προηγούμενη εντολή:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Φόρτωση θέματος" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Μεγιστοποίηση" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Όνομα" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Όνομα:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Νέο παράθυρο" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Νέος χώρος εργασίας" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Νέος χώρος εργασίας:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Επόμενος χώρος εργασίας" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Επόμενος χώρος εργασίας:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Κανονικό παράθυρο" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Αδιαφάνεια:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Άνοιγμα" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Άνοιγμα στη διαχείριση αρχείων" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Άνοιγμα συνδέσμου" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Ανοίξτε το τερματικό με νέο θέμα" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Άνοιγμα:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Προαιρετικό" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Κωδικός πρόσβασης" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Κωδικός πρόσβασης:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Επικόλληση" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Επικόλληση:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Διαδρομή" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Διαδρομή:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Παρακαλώ εισάγετε μια νέα συντόμευση" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Θύρα:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Προηγούμενος χώρος εργασίας" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Προηγούμενος χώρος εργασίας:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Εξακολουθούν να τρέχουν προγράμματα στο τερματικό" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Λειτουργία Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Απομακρυσμένη διαχείριση" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Απομακρυσμένη διαχείριση:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Μετονομασία" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Μετονομασία τίτλου" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Μετονομασία τίτλου:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Απαιτείται" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Ανάκτηση Προεπιλογών" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Τρέξτε ένα πρόγραμμα στο τερματικό" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Αποθήκευση" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Κύλιση" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Κύλιση με πληκτρολόγηση" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Κύλιση στην εκροή" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Αναζήτηση" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Αναζήτηση:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Επιλογή" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Επιλογή όλων" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Επιλογή όλων:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Επιλέξτε φάκελο για αποθήκευση του αρχείου" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Επιλογή αρχείου προς μεταφόρτωση" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Επιλογή αριστερού παράθυρου" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Επιλογή αριστερού παράθυρου:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Επιλογή κατώτερου παράθυρου" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Επιλογή κατώτερου παράθυρου:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Επιλογή δεξιού παράθυρου" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Επιλογή δεξιού παράθυρου:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Επιλογή αρχείου ιδιωτικού κλειδιού" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Επιλογή ανώτερου παράθυρου" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Επιλογή ανώτερου παράθυρου:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Επιλογή χώρου εργασίας" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Όνομα διακομιστή" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Όνομα διακομιστή:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Ρύθμιση καταλόγου εκκίνησης τερματικού" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Ρύθμιση λειτουργίας παραθύρων τερματικού" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Ρυθμίσεις" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Συντομεύσεις" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Συντομεύσεις:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Εναλλαγή θέματος" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Τερματικό" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Eναλλαγή σε πλήρη οθόνη" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Πληκτρολογήστε διαδρομή για το αρχείο λήψης" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Μεταφόρτωση" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Μεταφόρτωση αρχείου" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Χρήση κατά την εκκίνηση:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Όνομα χρήστη" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Όνομα χρήστη:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Έκδοση:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Κάθετη διαίρεση" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Κάθετη διαίρεση:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Καλώς ήρθατε στο Deepin Τερματικό, παρακαλώ βεβαιωθείτε ότι οι εντολές rz " -"και sz έχουν εγκατασταθεί στον διακομιστή, πριν κάνετε δεξί κλικ για να " -"μεταφορτώσετε και να κάνετε λήψη αρχείων." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Παράθυρο" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Χώρος εργασίας" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Μεγέθυνση" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Μεγέθυνση:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Σμίκρυνση" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Σμίκρυνση:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/en_AU/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/en_AU/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/en_AU/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/en_AU/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Patrick Ryan , 2017 -# ilox11 , 2017 -# Mogi Fu, 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Mogi Fu, 2017\n" -"Language-Team: English (Australia) (https://www.transifex.com/linuxdeepin/teams/3976/en_AU/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: en_AU\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "About" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Add" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Advanced" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancel" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Close other windows" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Close window" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Close workspace" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Command" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copy" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cut" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Delete" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Exit" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Exit fullscreen" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Fullscreen" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interface" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximize" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Name" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "New workspace" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Next workspace" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Open" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Password" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Paste" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Previous workspace" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Save" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Search" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Select" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Select all" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Settings" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Username" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Version:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Window" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Workspace" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom in" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom out" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/eo/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/eo/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/eo/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/eo/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,704 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# mi estas ni , 2017 -# Pablo Chere , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Pablo Chere , 2017\n" -"Language-Team: Esperanto (https://www.transifex.com/linuxdeepin/teams/3976/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Pri" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Aldoni" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Nuligi" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Komando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopii" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Indikilo" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Tranĉi" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminalo" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Forigi" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Eliri" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Tutekrana" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Helpo" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfaco" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimumigi" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nomo" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Pasvorto" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Alglui" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Nepra" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Gardi" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Serĉi" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Elekti ĉiujn" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Agordoj" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Fulmoklavoj" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminalo" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Uzantonomo" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Fenestro" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Laborspaco" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/es/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/es/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/es/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/es/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,727 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# ICesarI , 2017 -# iceleaf , 2017 -# efedezeta , 2017 -# Maggie Liu , 2017 -# Alejandro Hamann , 2017 -# Francisco B.G. , 2017 -# jose luis , 2017 -# Luis Castillo , 2017 -# roberto lopez , 2017 -# jhalo , 2017 -# Jean Rivas , 2017 -# Diego Sanguinetti, 2018 -# Alvaro Samudio , 2019 -# Deepin en Español, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Deepin en Español, 2019\n" -"Language-Team: Spanish (https://www.transifex.com/linuxdeepin/teams/3976/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"El comando se ha completado, presiona ENTER para salir del terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Acerca de" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecimientos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Añadir" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Añadir comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Añadir servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Añadir comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Añadir servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Dirección" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Dirección:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanzado" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opciones avanzadas" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "¿Estás seguro que quieres eliminarlos?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "¿Esta seguro que desea salir?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla de retroceso" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla de retroceso:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Desenfoque del fondo" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancelar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificado" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificado:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Cerrar otras ventanas" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Cerrar otras ventanas:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Cerrar ventana" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Cerrar ventana:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Cerrar espacio de trabajo" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Cerrar espacio de trabajo:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contenido" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar enlace" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copiar al seleccionar:" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Autoocultar cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Parpadear cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilo cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizados" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizados:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Terminal Deepin es un emulador de terminal avanzado con espacio de trabajo " -"múltiples y ventanas, administración remota, modo rápido y otras " -"características." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal Deepin es un emulador de terminal avanzado con espacio de trabajo, múltiples ventanas, administración remota, modo rápido y otras características.\n" -"\n" -"¡Enfoque tu atención en el mundo de la línea de comandos! " - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamaño por defecto" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamaño por defecto:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Eliminar" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Borrar comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Borrar letra" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Borrar letra:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Borrar servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Atajos de pantalla" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Atajos de pantalla:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Versión pantalla" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Archivo descargado" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Editar comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Editar servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificación" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificación:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Salir" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Salir de pantalla completa" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Buscar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamaño fuente:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fuente:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pantalla completa" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pantalla completa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ayuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Esconder el modo quake después de desenfocar" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "División horizontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "División horizontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfaz" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Saltar al siguiente comando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Saltar al siguiente comando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Saltar al comando anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Saltar al comando anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Cargar tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nombre" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nombre:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nueva ventana" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nuevo espacio de trabajo" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nuevo espacio de trabajo:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Espacio de trabajo siguiente" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Siguiente espacio de trabajo:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Ventana normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidad:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abierta" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir en el gestor de archivos" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Enlace abierto" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Abrir terminal con un nuevo tema." - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Contraseña" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Contraseña:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Pegar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Pegar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Ruta de acceso" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Ruta de acceso:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Por favor introduzca un nuevo atajo de teclado" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Puerto:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Espacio de trabajo previo" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Espacio de trabajo previo:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programas todavia se estan ejecutando en la terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Modo Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Administración remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Administración remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renombrar" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renombrar título" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renombrar título:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Requerido" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurar los valores predeterminados" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Ejecute un programa en la terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Guardar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Desplazar" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Desplazamiento de tecla" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Desplazamiento en la impresión" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Buscar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Buscar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Seleccionar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Seleccionar todo" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Seleccionar todo:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Seleccionar directorio para guardar el archivo" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Seleccionar archivo para subir" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Seleccionar ventana izquierda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Seleccionar ventana izquierda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Seleccionar ventana inferior" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Seleccionar ventana inferior:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Seleccionar ventana derecha" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecccionar ventana derecha:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Seleccione el archivo de clave privado " - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Seleccionar ventana superior" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Seleccionar ventana superior:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Seleccionar espacio de trabajo" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nombre servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nombre servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Establecer el directorio de inicio terminal " - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Establecer el modo de ventana de terminal " - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Ajustes" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Teclas atajo" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atajos de teclado:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Cambiar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal " - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Cambiar a pantalla completa" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Escriba ruta de acceso para descarga de archivo" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Subir" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Subir archivo" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Usar al empezar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nombre de usuario" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nombre de usuario:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versión:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "División vertical" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "División vertical:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Bienvenido a Terminal Deepin, asegúrese de que los comandos rz y sz se han " -"instalado en el servidor antes de hacer clic derecho para subir y descargar " -"archivos." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Ventana" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Espacio de trabajo" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Acercar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Acercar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Alejar" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Alejar:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/es_419/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/es_419/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/es_419/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/es_419/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Deepin en Español, 2017 -# Alvaro Samudio , 2017 -# Gilberto , 2019 -# Miltuxon Miltuxon , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Miltuxon Miltuxon , 2019\n" -"Language-Team: Spanish (Latin America) (https://www.transifex.com/linuxdeepin/teams/3976/es_419/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es_419\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"El comando se ha completado, presiona ENTER para salir del terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Acerca de" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecimientos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Añadir" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Añadir comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Añadir servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Añadir comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Añadir servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Dirección" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Dirección:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanzado" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opciones avanzadas" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Está seguro de que quiere borrar %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Está seguro que quiere salir?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla de retroceso" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla de retroceso:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Desenfoque del fondo" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancelar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificado" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificado:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Cerrar otras ventanas" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Cerrar otras ventanas:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Cerrar ventana" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Cerrar ventana:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Cerrar espacio de trabajo" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Cerrar espacio de trabajo:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contenido" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar enlace" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copiar al seleccionar" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Autoocultar cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Parpadeo cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilo cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizados" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizados:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Terminal Deepin es un emulador de terminal avanzado con soporte a ventana " -"dividida, espacios de trabajo, administración remota, modo Quake y otras " -"características." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal Deepin es un emulador de terminal avanzado con espacio de trabajo, " -"múltiples ventanas, administración remota, modo rápido y otras " -"características.¡Enfoque tu atención en el mundo de la línea de comandos! " - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamaño por defecto" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamaño por defecto:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Eliminar" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Borrar comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Borrar letra" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Borrar letra:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Borrar servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Atajos de pantalla" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Atajos de pantalla:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Versión pantalla" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Archivo descargado" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Editar comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Editar servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificando" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificando:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Salir" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Salir de pantalla completa" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Buscar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamaño fuente:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fuente:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pantalla completa" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pantalla completa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ayuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "En modo Quake, ocultar ventana al perder el foco" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "División horizontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "División horizontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfaz" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Saltar al siguiente comando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Saltar al siguiente comando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Saltar al comando anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Saltar al comando anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Cargar tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nombre" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nombre:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nueva ventana" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nuevo espacio de trabajo" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nuevo espacio de trabajo:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Espacio de trabajo siguiente" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Siguiente espacio de trabajo:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Ventana normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidad:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abierta" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir en el gestor de archivos" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Abrir enlace" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Abrir terminal con un nuevo tema." - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Contraseña" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Contraseña:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Pegar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Pegar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Ruta de acceso" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Ruta de acceso:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Por favor introduzca un nuevo atajo de teclado" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Puerto:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Espacio de trabajo previo" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Espacio de trabajo previo:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programas todavia se estan ejecutando en la terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Modo Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Administración remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Administración remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renombrar" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renombrar título" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renombrar título:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Requerido" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurar los valores predeterminados" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Ejecute un programa en la terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Guardar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Desplazar" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Desplazamiento de tecla" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Desplazarse en la salida" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Buscar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Buscar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Seleccionar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Seleccionar todo" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Seleccionar todo:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Seleccione el directorio para guardar el archivo" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Seleccionar archivo para subir" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Seleccionar ventana izquierda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Seleccionar ventana izquierda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Seleccionar ventana inferior" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Seleccionar ventana inferior:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Seleccionar ventana derecha" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecccionar ventana derecha:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Seleccione el archivo de clave privado " - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Seleccionar ventana superior" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Seleccionar ventana superior:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Seleccionar espacio de trabajo" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nombre servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nombre servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Establecer el directorio de inicio terminal " - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Establecer el modo de ventana de terminal " - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Configuración" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Atajos de teclado" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atajos de teclado:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Cambiar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal " - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Cambiar a pantalla completa" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Escriba la ruta para descargar el archivo" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Subir" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Subir archivo" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Usar para empezar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nombre de usuario" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nombre de usuario:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versión:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "División vertical" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "División vertical:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Bienvenido a Terminal Deepin, asegúrese de que los comandos rz y sz se han " -"instalado en el servidor antes de hacer clic derecho para subir y descargar " -"archivos." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Ventana" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Espacio de trabajo" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Acercar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Acercar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Alejar" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Alejar:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/fa/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/fa/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/fa/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/fa/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,711 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Hadi Kamell , 2017 -# Hootan Baraary , 2017 -# p.ajorlou , 2017 -# Alik Miankoli , 2017 -# ali rahimi , 2017 -# ali amiry , 2018 -# Amir Dadash , 2018 -# AmirHosein Lesani , 2019 -# Cindy0514, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Cindy0514, 2019\n" -"Language-Team: Persian (https://www.transifex.com/linuxdeepin/teams/3976/fa/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fa\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "درباره" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "اضافه کردن" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "پایه ای" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "انصراف" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "بستن پنجره" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "دستور" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "رونوشت" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "اشاره گر" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "برش" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "حذف" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "کدگذاری" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "خروج" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "خروج از تمام صفحه" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "تمام صفحه" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "راهنما" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "رابط" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "حداکثر" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "نام" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "باز کردن" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "پسورد" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "افزودن" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "مسیر" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "آدرس:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "تغییر نام" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "بازگرداندن پیش فرض ها" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "ذخیره" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "جستجو" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "انتخاب" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "انتخاب همه" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "تنظیمات" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "میانبر" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "ترمینال" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "نام کاربری" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "نسخه:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "پنجره" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "فضای کار" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/fi/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/fi/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/fi/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/fi/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# ImSpaceman, 2017 -# Maggie Liu , 2017 -# artor , 2017 -# Kimmo Siniluoto , 2017 -# Deathmist, 2018 -# Kimmo Kujansuu , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Kimmo Kujansuu , 2019\n" -"Language-Team: Finnish (https://www.transifex.com/linuxdeepin/teams/3976/fi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fi\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Komento on suoritettu, paina ENTER poistuaksesi päätteestä." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Tietoja" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Kiitokset" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Lisää" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Lisää Komento" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Lisää Palvelin" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Lisää komento" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Lisää palvelin" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Osoite" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Osoite:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Lisäasetukset" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Lisäasetukset" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Haluatko varmasti poistaa %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Oletko varma, että haluat poistua?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Askelpalautin" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Askelpalautin:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Perusasetukset" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Sumeuta tausta" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Peruuta" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Sertifikaatti" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Sertifikaatti:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Sulje muut paneelit" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Sulje muut paneelit:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Sulje paneeli" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Sulje paneeli:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Sulje välilehti" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Sulje välilehti:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Käsky" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Komento:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Sisältö" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopioi" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopioi linkki" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopioi valittu" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopioi:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kursori" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Kursorin piilotus" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Kursorin vilkkuminen" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Kursorin tyyli:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Mukautetut komennot" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Mukautetut komennot:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Leikkaa" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal on edistynyt pääte-emulaattori, jossa on välilehdet, " -"työtilat, etähallinta, Quake-tila ja muut ominaisuudet." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminaali" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Pääte on edistynyt pääte-emulaattori, jossa on välilehdet, useita paneeleja, SSH-palvelinten hallinta, quake-tila ja muita ominaisuuksia.\n" -"\n" -"Se terävöittää keskittymistäsi komentorivin maailmassa!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Oletuskoko" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Oletuskoko:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Poista" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Poista komento" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Delete-näppäin" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Delete-näppäin:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Poista palvelin" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Näytä pikanäppäimet" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Näytä pikanäppäimet:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Näytetty versio" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Lataa tiedosto" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Muokkaa komentoa" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Muokkaa palvelinta" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Tavuesitys" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Tavuesitys:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Poistu" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Poistu kokoruudusta" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Etsi" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Fonttien koko:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fontti:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Kokoruututila" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Kokoruutu:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Ryhmä" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Ryhmä:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ohje" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Piilota quake-ikkuna kadotetun tarkennuksen jälkeen" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Vaakasuora jako" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Vaakasuora jako:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Käyttöliittymä" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Siirry seuraavaan komentoon" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Siirry seuraavaan komentoon:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Siirry edelliseen komentoon" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Siirry edelliseen komentoon:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Lataa teema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Suurenna" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nimi" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nimi:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Uusi ikkuna" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Uusi välilehti" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Uusi välilehti:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Seuraava välilehti" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Seuraava välilehti:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normaali ikkuna" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Läpikuultamattomuus:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Avaa" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Avaa tiedostonhallinnassa" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Avaa linkki" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Avaa terminaali uudella teemalla" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Avaa:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Valinnainen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Salasana" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Salasana:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Liitä" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Liitä:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Polku" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Polku:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Ole hyvä ja anna uusi pikanäppäin" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Portti:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Edellinen välilehti" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Edellinen välilehti:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Ohjelmia on silti käynnissä päätteessä" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake-tila" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Etähallinta" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Etähallinta:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Nimeä uudelleen" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Nimeä välilehti" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Nimeä välilehti:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Vaadittu" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Palauta oletukset" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Suorita ohjelma päätteessä" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Tallenna" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Vieritä" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Selaa näppäimillä" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Selaa ulostuloa" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Etsi" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Etsi:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Valitse" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Valitse kaikki" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Valitse kaikki:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Valitse hakemisto tallentaaksesi tiedoston" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Valitse lähetettävä tiedosto" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Valitse vasen paneeli" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Valitse vasen paneeli:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Valitse alempi paneeli" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Valitse alempi paneeli:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Valitse oikea paneeli" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Valitse oikea paneeli:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Valitse yksityinen avaintiedosto" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Valitse ylempi paneeli" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Valitse ylempi paneeli:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Valitse välilehti" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Palvelimen nimi" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Palvelimen nimi:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Aseta pääteikkunan aloituskansio" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Aseta pääteikkunan tila" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Asetukset" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Pikanäppäimet" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Pikanäppäimet:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Vaihda teemaa" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Pääte" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Vaihda kokonäyttöön" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Kirjoita ladattavan tiedoston polku" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Lähetä" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Lähetä tiedosto" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Käytä käynnistäessä:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Käyttäjänimi" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Käyttäjänimi:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versio:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Pystysuora jako" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Pystysuora jako:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Tervetuloa Deepin Päätteeseen, ole hyvä ja varmista, että palvelimelle on " -"asennettu rz- ja sz-komennot ennen tiedostojen lähettämistä ja lataamista." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Ikkuna" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Välilehti" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Lähennä" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Lähennä:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Loitonna" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Loitonna:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "Deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/fil/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/fil/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/fil/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/fil/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Selwyn Francisco , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Selwyn Francisco , 2017\n" -"Language-Team: Filipino (https://www.transifex.com/linuxdeepin/teams/3976/fil/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fil\n" -"Plural-Forms: nplurals=2; plural=(n == 1 || n==2 || n==3) || (n % 10 != 4 || n % 10 != 6 || n % 10 != 9);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Tulong" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Password" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Username" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/fr/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/fr/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/fr/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/fr/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,725 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# ZereoX , 2017 -# Tristan Denni , 2017 -# 4goodapp <4goodapp@gmail.com>, 2017 -# FFXP , 2017 -# Nissar Chababy , 2017 -# Sami G.-D., 2017 -# Charles Monzat , 2017 -# clement leclerc , 2017 -# lexross , 2018 -# Kristien , 2019 -# Doryan R, 2019 -# Rox fr , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Rox fr , 2019\n" -"Language-Team: French (https://www.transifex.com/linuxdeepin/teams/3976/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Commande executée, appuyez sur ENTER pour quitter le terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "À propos" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Remerciements " - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Ajouter" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Insérez une commande" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Ajouter un serveur" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Insérez une commande" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Ajouter un serveur" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresse" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresse :" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avancé" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Options avancées" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Êtes-vous sûr de vouloir supprimer %s ?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Êtes-vous sûr de vouloir sortir ?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Touche retour arrière" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Touche retour arrière :" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Simple" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Atténuer l'arrière-plan" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Annuler" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificat :" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Fermer les autres fenêtres" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Fermer les autres fenêtres :" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Fermer la fenêtre" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Fermer la fenêtre :" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Fermer l'espace de travail" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Fermer l'espace de travail :" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Commande" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Commande :" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contenu" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copier " - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copier le lien" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copier la sélection" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copier :" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Curseur" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Masquage automatique du curseur" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Clignotement du curseur" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Thème du curseur :" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Commandes personnalisées" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Commandes personnalisées :" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Couper" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal est un émulateur de terminal avancé avec fenêtre divisée, " -"espaces de travail, gestion à distance, mode Quake et d'autres " -"fonctionnalités." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal est un terminal avancé avec espace de travail, fenêtres " -"multiples, gestion à distance, mode \"quake\" et autres fonctionnalités." - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Taille par défaut " - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Taille par défaut :" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Supprimer" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Supprimer la commande" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Supprimer la clé" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Supprimer la clé :" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Supprimer le serveur" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Afficher raccourcis " - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Afficher les raccourcis :" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Afficher la version" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Télécharger le fichier" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Éditer la commande" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Éditer le serveur" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Encodage" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Encodage :" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Arrêter" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Quitter le mode plein écran" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Trouver" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Taille de police :" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Police de caractère :" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Plein écran" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Plein écran :" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Groupe " - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Groupe :" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Aide" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Cacher la fenêtre Quake après avoir perdu le focus" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Diviser horizontalement" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Diviser horizontalement :" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interface" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Commande suivante" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Commande suivante :" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Commande précédente " - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Commande précédente :" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Charger un thème" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Agrandir" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nom" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nom :" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nouvelle fenêtre" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nouvel espace de travail" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nouvel espace de travail" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Espace de travail suivant" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Espace de travail suivant :" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Fenêtre normale" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Transparence :" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Ouvrir" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Ouvrir le gestionnaire de fichiers" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Ouvrir le lien" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Ouvrir le terminal avec un nouveau thème" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Ouvrir :" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Options" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Mot de passe" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Mot de passe :" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Coller" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Coller :" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Chemin" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Chemin :" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Veuillez créer un nouveau raccourci" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port :" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Espace de travail précédent" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Espace de travail précédent :" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Des programmes sont toujours en cours d'exécution dans le terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Mode quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Contrôle à distance" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Contrôle à distance :" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renommer" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renommer le titre" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renommer le titre :" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Requis" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurer les valeurs par défaut" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Exécuter un programme dans le terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Sauvegarder" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Défiler" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Défilement sur pression d'une touche" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Faire défiler la sortie" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Rechercher" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Rechercher :" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Choisir" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Tout sélectionner" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Tout sélectionner :" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Sélectionner un répertoire où enregistrer le fichier" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Sélectionner le fichier à envoyer" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Sélectionnez fenêtre gauche" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Sélectionner fenêtre gauche :" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Sélectionnez la fenêtre inférieure" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Sélectionner la fenêtre inférieure :" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Sélectionnez fenêtre droite" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Sélectionner fenêtre droite :" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Sélectionnez le fichier de clé privée" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Sélectionnez la fenêtre supérieure" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Sélectionnez la fenêtre supérieure :" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Sélectionnez l'espace de travail suivant" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nom du serveur" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nom du serveur :" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Définir le répertoire de démarrage du terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Définir le mode de la fenêtre du terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Paramètres " - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Raccourcis " - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Raccourcis :" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Changer de thème" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Basculer en plein écran" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Taper le chemin pour télécharger le fichier" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Envoyer " - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Envoyer fichier" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Utilisation au démarrage :" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nom d'utilisateur" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nom d'utilisateur :" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Version :" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Diviser verticalement" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Diviser verticalement :" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Bienvenue dans Deepin Terminal, assurez-vous que les commandes rz et sz ont " -"été installées sur le serveur avant de cliquer avec le bouton droit de la " -"souris pour envoyer et télécharger les fichiers." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Fenêtre" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Espace de travail" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom avant" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Zoom avant :" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom arrière" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Zoom arrière :" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/gl_ES/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/gl_ES/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/gl_ES/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/gl_ES/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Xnake, 2017 -# Rubén , 2017 -# Adrián Ramos García , 2018 -# Xurxo Guerra Perez , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Xurxo Guerra Perez , 2018\n" -"Language-Team: Galician (Spain) (https://www.transifex.com/linuxdeepin/teams/3976/gl_ES/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gl_ES\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Comandos completados, preme INTRO para pechar o terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Sobre" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecementos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Engadir" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Engadir Comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Engadir Servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Engadir comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Engadir servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Enderezo" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Enderezo:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanzado" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opcións avanzadas" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla retroceso" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla retroceso:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Fondo desenfocado" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancelar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificado" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificado:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Pechar outras xanelas" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Pechar outras xanelas:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Pechar a xanela" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Pechar a xanela:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Pechar o espazo de traballo" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Pechar o espazo de traballo:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contido" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar ligazón" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Ocultar auto. o cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Intermitencia do cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilo do cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizados" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizados:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal é un emulador avanzado do terminal con espazo de traballo, múltiples xanelas, xestión remota, modo quake e outras características.\n" -"\n" -"Pon o foco da atención no mundo da liña de comandos!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamaño predefinido" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamaño predefinido:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Eliminar" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Eliminar comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Eliminar chave" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Eliminar chave:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Eliminar servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Amosar atallos" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Amosar atallos:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Amosar versión" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Descargar ficheiro" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Editar Comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Editar Servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificación" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificación:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Saír" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Saír da pantalla completa" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Atopar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamaño da fonte:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fonte:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pantalla completa" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pantalla completa:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Axuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "División horizontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "División horizontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interface" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Ir ao comando seguinte" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Ir ao comando seguinte:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Ir ao comando anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Ir ao comando anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Cargar tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nome" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nome:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nova xanela" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Novo espazo de traballo" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Novo espazo de traballo:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Seguinte espazo de traballo" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Seguinte espazo de traballo:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Xanela normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidade:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abrir" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir no xestor de ficheiros" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Contrasinal" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Contrasinal:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Pegar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Pegar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Ruta" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Ruta:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Por favor insire un novo atallo" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Porto:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Espazo de traballo previo" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Espazo de traballo previo:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Aínda hai programas en execución no terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Modo Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Xestión remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Xestión remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renomear" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renomear título" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renomear título:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Requirido" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restablecer o predefinido" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Executar un programa no terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Gardar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Desprazar" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Desprazar cunha pulsación de tecla" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Desprazar a saída" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Buscar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Buscar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Seleccionar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Seleccionar todo" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Seleccionar todo:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Seleccionar ficheiro a subir" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Seleccionar xanela esquerda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Seleccionar xanela esquerda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Seleccionar xanela inferior" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Seleccionar xanela inferior:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Seleccionar xanela dereita" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Seleccionar xanela dereita:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Seleccionar o ficheiro de clave privada" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Seleccionar xanela superior" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Seleccionar xanela superior:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Seleccionar espazo de traballo" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nome de servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nome de servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Definir o cartafol de inicio do terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Definir o modo da xanela do terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Configuración" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Atallos" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atallos:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Trocar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Subir" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Subir ficheiro" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Empregar no inicio:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nome de usuario" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nome de usuario:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versión:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "División vertical" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "División vertical:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Benvido/a ao Terminal, por favor verifica que os comandos rz e sz están " -"instalados no servidor antes de poder subir e baixar ficheiros mediante o " -"clic co botón dereito." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Xanela" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Área de traballo" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Achegar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Achegar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Afastar" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Afastar:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/he/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/he/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/he/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/he/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,704 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Yuval Bar-On , 2017 -# Yaron Shahrabani , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Yaron Shahrabani , 2017\n" -"Language-Team: Hebrew (https://www.transifex.com/linuxdeepin/teams/3976/he/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: he\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "על אודות" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "הוספה" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "הוספת פקודה" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "הוספת שרת" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "הוספת פקודה" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "הוספת שרת" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "כתובת" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "כתובת:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "מתקדם" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "אפשרויות מתקדמות" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "בסיסי" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "ביטול" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "אישור" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "אישור:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "סגירת חלונות אחרים" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "סגירת חלונות אחרים:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "סגירת חלון" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "סגירת חלון:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "סגירת אזור עבודה" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "סגירת אזור עבודה:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "פקודה" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "פקודה:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "תוכן" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "העתקה" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "העתקת קישור" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "העתקה:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "סמן" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "הבהוב סמן" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "סגנון סמן" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "פקודות בהתאמה אישית" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "פקודות בהתאמה אישית:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "גזירה" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "מסוף Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "גודל בררת מחדל" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "גודל בררת מחדל:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "מחיקה" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "קידוד" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "יציאה" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "צא ממסך מלא" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "מסך מלא" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "עזרה" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "ממשק" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "הגדל" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "שם" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "איזור עבודה חדש" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "איזור עבודה הבא" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "פתיחה" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "ססמה" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "הדבק" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "נתיב:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "איזור עבודה קודם" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "שינוי שם" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "שמור" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "גלגלת" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "חיפוש" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "בחר" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "בחר הכל" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "הגדרות" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "קיצורי דרך" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "מסוף" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "שם משתמש" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "גרסא:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "חלון" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "סביבת עבודה" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "הגדל תצוגה" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "הקטן תצוגה" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/hi_IN/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/hi_IN/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/hi_IN/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/hi_IN/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,706 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# e2f_in_c3 , 2017 -# Panwar108 , 2018 -# Shubham Prakash , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Shubham Prakash , 2019\n" -"Language-Team: Hindi (India) (https://www.transifex.com/linuxdeepin/teams/3976/hi_IN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hi_IN\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "बारे में" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "जोड़ें" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "उन्नत" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "मौलिक" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "रद्द करो" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "अन्य खिड़की को बंद करें" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "विंडो बंद करें " - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "कार्यस्थल बंद करें" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "कमांड " - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "प्रति" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "कर्सर " - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "काटें" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "डीपइन छोर" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "हटाएँ" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "एन्कोडिंग" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "बाहर" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "पूर्ण स्क्रीन से बाहर आयें" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "पूर्ण स्क्रीन" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "सहायता" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "इंटरफेस " - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "बड़ा करें" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "नाम" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "नया कार्यस्थल" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "अगला कार्यस्थल" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "खोलो" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "वैकल्पिक" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "पासवर्ड " - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "चिपकाएँ" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "रास्ता:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "कृपया नया शॉर्टकट दर्ज करें" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "पिछला कार्यस्थल" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "रीनैम " - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "आवश्यक" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "डिफॉल्ट्स पुनःस्थापित करें" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "सहेजें" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "ऊपर नीचे" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "खोज" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "चुनो" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "सबको चुनें" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "व्यवस्था" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "शॉर्टकट" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "छोर" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "यूजर नेम " - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "विंडो" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "कार्यस्थल" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "बड़ा करें" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "छोटा करें" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/hr/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/hr/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/hr/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/hr/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,715 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Vlado V. , 2017 -# 3e282d1ae4897f0bb79601171df0b2ff, 2017 -# gogo , 2017 -# Marino Vuletić , 2017 -# Ivica Kolić , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Ivica Kolić , 2017\n" -"Language-Team: Croatian (https://www.transifex.com/linuxdeepin/teams/3976/hr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Naredba je kompletirana, pritisnite ENTER za izlazak iz terminala." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "O programu" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Zahvale" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Dodaj" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Dodaj naredbu" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Dodaj poslužitelj" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Dodaj naredbu" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Dodaj poslužitelj" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresa" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresa:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Napredno" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Napredne opcije" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace tipka" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace tipka:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Osnovno" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Otkaži" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zatvori ostale prozore" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zatvori ostale prozore:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zatvori prozor" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zatvori prozor:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zatvori radni prostor" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zatvori radni prostor:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Naredba" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Naredba:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Sadržaj" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiraj" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopiraj poveznicu" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopiraj:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Pokazivač" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Samoskrivanje pokazivača" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Treptanje pokazivača" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Stil pokazivača:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Prilagođene naredbe" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Prilagođene naredbe:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Izreži" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal je napredni emulator terminala sa radnim prostorom, višestrukim prozorima, udaljenim upravljanjem, quake načinim rada i ostalim značajkama.\n" -"\n" -"Izoštrava vaš fokus u svijetu naredbenog retka!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Zadana veličina" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Zadana veličina:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Obriši" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Obriši naredbu" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Obriši tipku" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Obriši tipku:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Obriši poslužitelj" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Prikaži prečace" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Prikaži prečace:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Prikaži verziju" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Preuzmi datoteku" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Uredi naredbu" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Uredi poslužitelj" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Enkodiranje" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kodiranje:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Izađi" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Izađi iz cijelog zaslona" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Veličina fonta" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Font: " - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Cijeli zaslon" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Cijeli zaslon:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupa" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupa:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Pomoć" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Vodoravna podjela" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Vodoravna podjela:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Sučelje" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Skoči na slijedeću naredbu" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Skoči na slijedeću naredbu:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Skoči na prethodnu naredbu" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Skoči na prethodnu naredbu:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Učitaj temu" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Uvećaj" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Ime" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Ime:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Novi prozor" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Novi radni prostor" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Novi radni prostor:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Slijedeći radni prostor" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Slijedeći radni prostor:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalni prozor" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Neprozirnost:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Otvori" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Otvori:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Lozinka" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Lozinka:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Zalijepi" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Zalijepi:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Putanja" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Putanja:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Molim unesite novi prečac" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port: " - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Prethodni radni prostor" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Prethodni radni prostor:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programi još rade u terminalu" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Udaljeno upravljanje" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Udaljeno upravljanje:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Preimenuj" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Preimenuj naslov" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Preimenuj naslov:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Potrebno" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Obnovi zadano" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Pokreni program u terminalu" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Spremi" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Kliži" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Traži" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Traži:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Odaberi" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Odaberi sve" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Odaberi sve:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Odaberite datoteku za slanje" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Odaberite lijevi prozor" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Odaberite lijevi prozor:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Odaberite donji prozor" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Odaberite donji prozor:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Odaberite desni prozor" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Odaberite desni prozor:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Odaberite gornji prozor" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Odaberite gornji prozor:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Odaberite radni prostor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Ime poslužitelja" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Ime poslužitelja:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Postavi početni direktorij terminala" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Postavke" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Prečaci" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Prečaci:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Promjeni temu" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Slanje" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Slanje datoteke" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Korisničko ime" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Korisničko ime:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Inačica:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Okomita podjela" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Okomita podjela:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Dobrodošli u Deepin Terminal, molim provjerite da su naredbe rz i sz " -"instalirane u poslužitelj prije nego klika desnim dugmetom za slanje i " -"preuzimanje datoteka." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Prozor" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Radni prostor" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Povećaj" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Povećaj:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Smanji" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Smanji:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/hu/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/hu/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/hu/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/hu/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,722 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Gerstmayer Norbert , 2017 -# b1094bbfad3b29958bce7f8a2c08de92, 2017 -# vmarci21 , 2017 -# kdavid97 , 2017 -# ddabrahim , 2017 -# Laszlo Espadas, 2017 -# SlazO , 2017 -# Kiss Zoltan , 2017 -# Jack Howell , 2018 -# ccedb894e6c246847bbbb58794dea50d, 2018 -# Walton Henry , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Walton Henry , 2018\n" -"Language-Team: Hungarian (https://www.transifex.com/linuxdeepin/teams/3976/hu/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hu\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"A parancs végrehajtásra került. Nyomj ENTER-t a kilépéshez." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Névjegy" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Köszönetnyilvánítás" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Hozzáadás" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Parancs hozzáadása" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Szerver hozzáadása" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Parancs hozzáadása" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Szerver hozzáadása" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Cím" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Cím:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Kibővített" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "További opciók" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace billentyű" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace billentyű:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Alap" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Háttér elhomályosítása" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Mégse" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Tanúsítvány" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Tanúsítvány:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Egyéb ablakok bezárása" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Egyéb ablakok bezárása:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Ablak bezárása" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Ablak bezárása:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Munkaterület bezárása " - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Munkaterület bezárása:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Parancs" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Parancs:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Tartalom" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Másolás" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Hivatkozás másolása" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Másolás:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kurzor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Kurzor automata elrejtés" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Kurzor villogás" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Kurzor stílus:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Egyedi parancsok" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Egyedi parancsok:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Kivágás" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminál" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"A Deepin Terminal egy felosztható munkaterülettel, távoli menedzsmenttel rendelkező, testre szabható billentyűzetparancsokkal rendelkező korszerű terminálemulátor.\n" -"\n" -"Ez egy gyöngyszem a parancssor-kezelők világában." - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Alapértelmezett méret" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Alapértelmezett méret:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Törlés" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Parancs törlése" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Törlés gomb" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Törlés gomb:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Szerver törlése" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Billentyűzetparancsok megjelenítése" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Billentyűzetparancsok:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Verzió megjelenítése" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Fájl letöltése" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Parancs szerkesztése" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Szerver szerkesztése" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kódolás" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kódolás:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Kilépés" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Kilépés a teljes képernyőböl" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Keresés" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Betűméret:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Betűtípus:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Teljes képernyő" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Teljes képernyő:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Csoport" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Csoport:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Súgó" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Kettéosztás vízszintesen" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Kettéosztás vízszintesen:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Felület" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Ugrás a következő parancsra" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Ugrás a következő parancsra:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Visszaugrás az előző parancsra" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Visszaugrás az előző parancsra:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Téma betöltés" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximalizálás" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Név" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Név:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Új ablak" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Új munkaterület" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Új munkaterület:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Következő munkaterület" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Új munkaterület:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normál ablak" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Átlátszóság:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Megnyitás" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Megnyitás fájlkezelőben" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Megnyitás:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Tetszőleges" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Jelszó" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Jelszó:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Beillesztés" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Beillesztés:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Elérési útvonal" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Elérési útvonal:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Új gyorsbillentyű neve" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Előző munkaterület " - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Előző munkaterület :" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Még futnak programok a terminal ablakban" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Remegő mód" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Távoli elérés" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Távoli elérés:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Átnevezés" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Elem átnevezése" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Elem átnevezése:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Szükséges" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Alaphelyzetbe állítás" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Program futtatása terminál ablakban" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Mentés" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Görgetés" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Görgetés gombnyomásra" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Görgetés kimenetnél" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Keresés" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Keresés:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Kiválaszt" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Összes kijelölése" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Összes kijelölése:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Feltöltendő fájl kijelölése" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Bal oldali ablak kiválasztás" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Bal oldali ablak kiválasztás:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Lenti ablak kiválasztás" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Lenti ablak kiválasztás:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Jobb oldali ablak kiválasztás" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Jobb oldali ablak kiválasztás:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Privát kulcs fájl kiválasztása" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Felső ablak kiválasztás" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Felső ablak kiválasztás:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Munkaterület választás" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Szerver név" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Szerver név:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Teminal indulási könyvtár beállítása" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Terminal-ablak mód beállítás" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Beállítások" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Gyorsbillentyűk" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Gyorsbillentyűk:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Sablon váltás" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminál" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Feltöltés" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Fájl feltöltése" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Induláskor használjuk:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Felhasználónév" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Felhasználónév:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Verzió:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Függőleges elválasztás" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Függőleges elválasztás:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Üdvözlet a Deepin Terminálban, Bizonyosodjunk meg róla, hogy az rz és sz " -"parancsok telepítve vannak a szerveren mielőtt jobb egérgombbal fel vagy le " -"töltenénk fájlokat." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Ablak" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Munkaterület" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Nagyítás" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Nagyítás:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Kicsinyítés" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Kicsinyítés:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/hy/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/hy/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/hy/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/hy/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,704 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# vgevorgyan , 2017 -# Maggie Liu , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Maggie Liu , 2017\n" -"Language-Team: Armenian (https://www.transifex.com/linuxdeepin/teams/3976/hy/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hy\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Տեղեկություն" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Ավելացնել" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Չեղարկել" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Տերմինալ" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Ջնջել" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Անվանում" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Վերանվանել" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Պահել" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Շարժել" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Փնտրել" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Կարգավորումներ" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Պատուհան" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/id/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/id/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/id/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/id/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,719 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Dj Anthony , 2017 -# eko ikhyar , 2017 -# Maggie Liu , 2017 -# Sucipto , 2017 -# Rhevin Fardhika , 2017 -# Dedy Yugo Purwanto , 2017 -# Muhammad Fauzi , 2018 -# Aril Apria Susanto , 2018 -# jemmy surya , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: jemmy surya , 2019\n" -"Language-Team: Indonesian (https://www.transifex.com/linuxdeepin/teams/3976/id/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: id\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Perintah telah diselesaikan, tekan ENTER untuk keluar terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Tentang" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Ucapan terima kasih" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Tambah" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Tambah perintah" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Tambah Server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Tambah perintah" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Tambah server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Alamat" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Alamat:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Lanjutan" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opsi lanjutan" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Kunci Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Kunci Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Dasar" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Latar belakang buram" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Batal" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Sertifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Sertifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Tutup jendela lainnya" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Tutup jendela lainnya:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Tutup jendela" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Tutup jendela:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Tutup ruang kerja" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Tutup ruang kerja:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Perintah" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Perintah:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Konten" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Salin" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Salin tautan" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Salin saat pilih" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Salin:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Otomomatis sembunyi kursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Kedip Kursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Gaya Kursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Perintah sesuaian" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Perintah sesuaian:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Potong" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal adalah emulator terminal lanjutan dengan ruang kerja, multi jendela, manajemen jarak jauh, mode gempa dan fitur lainnya\n" -"\n" -"Mempertajam fokus Anda di dunia command line!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Ukuran bawaan" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Ukuran bawaan:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Hapus" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Hapus perintah" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Hapus kunci" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Hapus kunci:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Hapus server" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Tampilkan pintasan" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Tampilkan pintasan:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Versi tampilan" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Unduh berkas" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Ubah perintah" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Ubah server" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Menyandi" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Menyandi:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Keluar" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Keluar layar penuh" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Temukan" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Ukuran fon:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fon:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Layar Penuh" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Layar Penuh:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grup" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grup:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Bantuan" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Bagi horizontal" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Bagi horizontal:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Antarmuka" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Loncat ke perintah berikutnya" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Loncat ke perintah berikutnya:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Loncat ke perintah sebelumnya" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Loncat ke perintah berikutnya:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Muat tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimalkan" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nama" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nama:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Jendela baru" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Ruang kerja baru" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Ruang kerja baru:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Ruang kerja berikutnya" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Ruang kerja selanjutnya:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Jendela normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Kegelapan:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Buka" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Buka pada manajer berkas" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Buka:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Pilihan" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Sandi lewat" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Sandi lewat:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Tempel" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Tempel:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Jejak" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Jejak:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Silakan masukkan sebuah pintasan baru" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Ruang kerja sebelumnya" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Ruang kerja sebelumnya:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Program masih berjalan dalam terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Mode quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Manajemen jarak jauh" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Manajemen jarak jauh:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Ganti nama" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Ubah judul" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Ubah judul:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Dibutuhkan" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Kembalikan Defaults" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Jalankan program dalam terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Simpan" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Gulung" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Gulung ke keystroke" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Gulung pada keluaran" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Cari" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Cari:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Pilih" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Pilih semua" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Pilih semua:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Pilih berkas untuk diunggah" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Pilih jendela kiri" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Pilih jendela kiri:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Pilih jendela lebih rendah" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Pilih jendela lebih rendah:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Pilih jendela lebih kanan" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Pilih jendela lebih kanan:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Pilih berkas kunci pribadi" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Pilih jendela lebih tinggi" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Pilih jendela lebih tinggi" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Pilih ruang kerja" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nama server" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nama server:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Setel terminal direktori memulai" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Setel terminal mode jendela" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Pengaturan" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Pintasan" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Pintasan:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Alih tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Unggaj" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Unggah berkas" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Gunakan pada saat dimulai:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nama pengguna" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nama pengguna:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versi:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Bagi vertikal" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Bagi vertikal" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Selamat datang di Deepin terminal, pastikan perintah rz dan sz telaj " -"diinstal dalam server sebelum mengklik-kanan untuk mengunggah dan mengunduh " -"berkas." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Jendela" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Ruang kerja" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Perbesar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Perbesar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Perkecil" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Perkecil:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/it/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/it/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/it/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/it/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# massimo.carofano , 2017 -# Massimo A. Carofano , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Massimo A. Carofano , 2019\n" -"Language-Team: Italian (https://www.transifex.com/linuxdeepin/teams/3976/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Comando completato, premi ENTER per uscire dal Terminale." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Info" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Considerazioni" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Aggiungi" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Aggiungi Comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Aggiungi Server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Aggiungi comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Aggiungi server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Indirizzo" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Indirizzo:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avanzate" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opzioni avanzate" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Sicuro di voler eliminare %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Sicuro di voler uscire?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tasto cancella" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tasto cancella:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Base" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Sfondo Blur" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancella" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificato" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificato:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Chiudi le altre finestre" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Chiudi le altre finestre:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Chiudi finestra" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Chiudi finestra:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Chiudi spazio di lavoro" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Chiudi spazio di lavoro:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Command" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Contenuto" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copia" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copia link" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copia sulla selezione" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copia:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursore" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Nascondi automaticamente il cursore" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Intermittenza cursore" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Stile cursore:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandi personalizzati" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandi personalizzati:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Taglia" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal è un emulatore di terminale avanzato con spazi di lavoro, multi finestre, gestione remota, quake mode ed altre features.\n" -"Localizzazione italiana a cura di Massimo A. Carofano" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal è un emulatore di terminale avanzato con spazi di lavoro, multi finestre, gestione remota, quake mode ed altre features.\n" -"\n" -"Focalizza la tua attenzione sul mondo della linea di comando!\n" -"Localizzazione italiana a cura di Massimo A. Carofano" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Dimensione di default" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Dimensione di default:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Elimina" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Elimina comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Elimina chiave" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Elimina chiave:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Elimina server" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Visualizza scorciatoie" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Visualizza scorciatoie:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Versione" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Scarica file" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Modifica Comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Modifica Server" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Encoding" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Encoding:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Esci" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Esci dalla modalità fullscreen" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Trova" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Dimensione font:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Font:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Schermo intero" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Fullscreen:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Gruppo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Gruppo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Aiuto" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Nascondi Quake window dopo il movimento del mouse" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Dividi orizzontalmente" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Dividi orizzontalmente:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfaccia" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Salta al comando successivo" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Salta al comando successivo:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Torna al comando precedente" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Torna al comando precedente:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Carica tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Massimizza" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nome" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nome:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nuova finestra" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nuovo spazio di lavoro" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nuovo spazio di lavoro:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Spazio di lavoro successivo" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Spazio di lavoro successivo:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Finestra normale" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacità:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Apri" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Apri nel file manager" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Apri link" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Apri il terminale con un nuovo tema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Apri:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opzionale" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Password" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Password:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Incolla" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Incolla:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Percorso" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Percorso:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Immetti una nuova scorciatoia" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Porta:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Spazio di lavoro precedente" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Spazio di lavoro precedente:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programmi in esecuzione nel terminale" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake mode" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Gestione remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Gestione remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Rinomina" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Titolo rinominato" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Titolo rinominato:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Richiesta" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Ripristina i valori di default" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Esegui nel terminale" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Salva" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Scroll" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Scorri automaticamente verso il basso" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Scorri automaticamente verso l'output" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Cerca" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Cerca:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Seleziona" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Seleziona tutto" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Seleziona tutto:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Seleziona una cartella per salvare i file" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Seleziona il file da caricare" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Seleziona finestra a sinistra" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Seleziona finestra a sinistra:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Seleziona finestra inferiore" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Seleziona finestra inferiore:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Seleziona finestra a destra" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Seleziona finestra a destra:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Seleziona il file di chiave privata" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Seleziona finestra superiore" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Seleziona finestra superiore:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Seleziona spazio di lavoro" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nome server" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nome server:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Seleziona la directory di avvio del terminale" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Seleziona la modalità finestra del terminale" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Impostazioni" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Scorciatoie" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Scorciatoie:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Cambia tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminale" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Pulsante schermo intero" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Digita il percorso per scaricare i file" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Carica" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Carica file" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Usa all'avvio:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Username" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Username:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versione: " - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Split verticale" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Split verticale:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Benvenuto nel Deepin Terminale, assicurati che i comandi rz e sz siano stati" -" installati nel server prima di caricare o scaricare dei files." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Finestra" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Spazio di lavoro" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom più" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Zoom in:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom meno" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Zoom out:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ja/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ja/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ja/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ja/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,712 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# luozengbin , 2017 -# blend , 2017 -# 李洪武 , 2017 -# Maggie Liu , 2017 -# ふうせん Fu-sen. | BALLOON a.k.a. Fu-sen., 2017 -# 月下 立花 , 2017 -# Pedro Lopes , 2018 -# Hinaloe , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Hinaloe , 2019\n" -"Language-Team: Japanese (https://www.transifex.com/linuxdeepin/teams/3976/ja/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ja\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"コマンドが完了しました。ENTERを押すとターミナルを終了します。" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "バージョン情報" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "追加" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "コマンドを追加" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "サーバーを追加" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "コマンドを追加" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "サーバーを追加" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "アドレス" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "アドレス:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "高度" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "高度なオプション" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "%sを削除してもよろしいですか?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "終了しますか?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "ベーシック" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "背景のブラー" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "キャンセル" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "他のウィンドウを閉じる" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "他のウインドウを閉じる:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "ウインドウを閉じる" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "ウインドウを閉じる:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "ワークスペースを閉じる" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "ワークスペースを閉じる:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "コマンド" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "コマンド:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "コピー" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "リンクをコピー" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "コピー:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "カーソル" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "カーソルを自動的に隠す" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "カーソル点滅" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "カーソルスタイル:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "カスタムコマンド" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "カスタムコマンド:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "切り取り" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "削除" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "エンコーディング" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "エンコーディング:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "終了" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "フルスクリーンを解除" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "検索" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "フォントサイズ:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "フォント" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "フルスクリーンにする" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "フルスクリーン:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "グループ" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "グループ:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "ヘルプ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "インターフェイス" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "最大化" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "名前" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "新しいウインドウ" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "新しいワークスペース" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "新しいワークスペース:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "次のワークスペース" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "透明度:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "開く" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "ファイルマネージャーを開く" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "新しいテーマでターミナルを開く" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "開く:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "パスワード" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "パスワード:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "貼り付け" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "貼り付け:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "パス" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "パス:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "新しいショートカットを入力してください" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "ポート:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "前のワークスペース" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "名前の変更" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "必須" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "保存" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "スクロール" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "検索" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "検索:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "選択" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "全選択" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "全選択:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "ワークスペースを選択" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "サーバー名" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "サーバー名:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "設定" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "ショートカット" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "ショートカット:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "テーマ切り替え" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "ターミナル" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "アップロード" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "ファイルをアップロード" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "ユーザー名" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "ユーザー名:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "バージョン" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "ウインドウ" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "ワークスペース" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "縮小" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "拡大" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/kn_IN/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/kn_IN/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/kn_IN/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/kn_IN/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Chandan Veerabhadrappa , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Chandan Veerabhadrappa , 2018\n" -"Language-Team: Kannada (India) (https://www.transifex.com/linuxdeepin/teams/3976/kn_IN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: kn_IN\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "ಸಹಾಯ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "ತೆರೆಯಿರಿ" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/ko/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ko/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ko/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ko/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,715 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# 박찬 , 2017 -# Sangmin Lee , 2017 -# Thomas Sungjin Kang , 2017 -# Maggie Liu , 2017 -# 이정희 , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: 이정희 , 2019\n" -"Language-Team: Korean (https://www.transifex.com/linuxdeepin/teams/3976/ko/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ko\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"명령이 완료 되었으면, ENTER를 눌러 터미널을 종료하세요." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "소개" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "승인" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "추가" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "명령 추가" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "서버 추가" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "명령 추가" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "서버 추가" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "주소" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "주소:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "고급" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "고급 옵션" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "%s을 삭제하시겠습니까?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "종료 하시겠습니까?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "백스페이스 키" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "백스페이스 키:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "기본" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "배경 흐림" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "취소" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "인증서" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "인증서:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "다른 창 닫기" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "다른 창 닫기:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "창 닫기" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "창 닫기:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "작업공간 닫기" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "작업공간 닫기:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "명령" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "명령:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "내용" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "복사" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "링크 복사" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "선택시 복사" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "복사:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "커서" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "커서 자동 숨기기" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "커서 깜박임" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "커서 스타일:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "사용자 지정 명령" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "사용자 지정 명령:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "잘라내기" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin 터미널은 윈도우 분할, 작업 공간, 원격 관리, 퀘이크 모드 및 기타 기능을 갖춘 고급 터미널 에뮬레이터 입니다." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin 터미널" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin 터미널은 작업 공간, 다중 창, 원격 관리, 지진 모드 및 기타 기능을 갖춘 고급 터미널 에뮬레이터입니다. \n" -"\n" -"그것은 커맨드 라인의 세계에서 여러분의 집중력을 향상시킵니다!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "기본 크기" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "기본 크기:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "삭제" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "명령 삭제" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "키 삭제" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "키 삭제:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "서버 삭제" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "단축키 표시" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "단축키 표시:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "버전 표시" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "다운로드 파일" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "명령 편집" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "서버 편집" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "인코딩" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "인코딩:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "종료" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "전체화면 종료" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "찾기" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "글꼴 크기:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "글꼴" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "전체화면" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "전체화면:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "그룹" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "그룹:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "도움말" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "초점을 잃은 후 퀘이크 창 숨기기" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "수평 분할" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "수평 분할:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "인터페이스" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "다음 명령으로 이동" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "다음 명령으로 이동:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "이전 명령으로 이동" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "이전 명령으로 이동:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "테마 불러오기" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "최대화" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "이름" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "이름:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "새 창" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "새 작업공간" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "새 작업공간:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "다음 작업공간" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "다음 작업공간" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "보통 창" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "불투명도:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "열기" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "파일 관리자에서 열기" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "링크 열기" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "새로운 테마로 터미널 열기" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "열기:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "옵션" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "비밀번호" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "비밀번호:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "붙여넣기" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "붙여넣기:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "경로" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "경로:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "새 단축키를 입력하세요" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "포트:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "이전 작업공간" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "이전 작업공간:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "프로그램이 터미널에서 계속 실행되고 있습니다" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "퀘이크 모드" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "원격 관리" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "원격 관리:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "이름 변경" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "제목 이름 변경" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "제목 이름 변경:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "요구됨" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "기본값 복원" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "터미널에서 프로그램 실행" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "저장" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "스크롤" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "키 입력시 스크롤" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "출력시 스크롤" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "검색" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "검색:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "선택" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "전체 선택" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "모두 선택:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "파일을 저장할 디렉토리 선택" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "업로드할 파일 선택" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "왼쪽 창 선택" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "왼쪽 창 선택:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "아래쪽 창 선택" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "아래쪽 창 선택:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "오른쪽 창 선택" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "오른쪽 창 선택:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "개인 키 파일 선택" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "위쪽 창 선택" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "위쪽 창 선택:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "작업 공간 선택" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "서버 이름" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "서버 이름:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "터미널 시작 디렉터리 설정" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "터미널 창 모드 설정" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "설정 " - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "단축키" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "단축키" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "테마 전환" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "터미널" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "전체화면 전환" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "파일을 다운로드할 경로 입력" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "업로드" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "파일 업로드" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "시작시 사용:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "사용자 이름" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "사용자 이름:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "버전:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "수직 분할" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "수평 분할:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Deepin 터미널에 오신 것을 환영합니다. 파일을 업로드 및 다운로드하려면 오른쪽 버튼을 클릭하기 전에 서버에 rz 및 sz 명령이 " -"설치되어 있는지 확인하세요." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "창" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "작업 공간" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "확대" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "확대:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "축소" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "축소:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ku_IQ/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ku_IQ/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ku_IQ/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ku_IQ/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,704 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Haval Abdulkarim , 2017 -# wêl xebroshky , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: wêl xebroshky , 2018\n" -"Language-Team: Kurdish (Iraq) (https://www.transifex.com/linuxdeepin/teams/3976/ku_IQ/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ku_IQ\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "دەربارە" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Bingehîn" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "پاشگەزبوونەوە" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "لەبەرگرتنەوە" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "بڕین" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Jê bibe" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kodkirin" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "دەرچوون" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Ji dîmentêrê derkeve" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Dîmentêr" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "گەورەکردن" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "لکاندن" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Rê" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Rê:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Dîsa nav lê bide" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Mîhengên Destpêkê Dîsa Bîne" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Lê bigere" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Hilbijêre" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "دیاریکردنی هەمووی" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Mîheng" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Kurtebirî" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/lt/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/lt/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/lt/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/lt/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,716 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Mantas Kriaučiūnas , 2017 -# Jonas Motiejūnas , 2017 -# Moo, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Moo, 2019\n" -"Language-Team: Lithuanian (https://www.transifex.com/linuxdeepin/teams/3976/lt/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: lt\n" -"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Komanda užbaigta, norėdami išeiti iš terminalo, paspauskite įvedimo (ENTER) klavišą." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Apie" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Padėkos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Pridėti" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Pridėti komandą" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Pridėti serverį" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Pridėti komandą" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Pridėti serverį" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresas" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresas:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Išplėstinės" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Išplėstinės parinktys" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Ar tikrai norite ištrinti %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Ar tikrai norite išeiti?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Naikinimo klavišas" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Naikinimo klavišas:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Pagrindiniai" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Sulieti foną" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Atsisakyti" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Liudijimas" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Liudijimas:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Užverti kitus langus" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Užverti kitus langus:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Užverti langą" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Užverti langą:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Užverti darbo sritį" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Užverti darbo sritį:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Komanda" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Komanda:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Turinys" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopijuoti" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopijuoti nuorodą" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopijuoti, žymint tekstą" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopijuoti:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Žymeklis" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Automatiškai slėpti žymeklį" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Žymeklio mirksėjimas" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Žymeklio stilius:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Tinkintos komandos" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Tinkintos komandos:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Iškirpti" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin terminalas yra išplėstinis terminalo emuliatorius su lango " -"perskyrimo, darbo sričių, nuotolinio administravimo, Quake veiksenos ir " -"kitomis ypatybės." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminalas" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin terminalas yra išplėstinis terminalo emuliatorius su darbo sričių, kelių langų, nuotolinio administravimo, quake veiksenos ir kitomis ypatybės.\n" -"\n" -"Jis sutelkia jūsų dėmesį komandų eilutės pasaulyje!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Numatytasis dydis" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Numatytasis dydis:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Ištrinti" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Ištrinti komandą" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Šalinimo klavišas" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Šalinimo klavišas:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Ištrinti serverį" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Rodyti sparčiuosius klavišus" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Rodyti sparčiuosius klavišus:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Rodyti versiją" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Atsisiųsti failą" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Redaguoti komandą" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Redaguoti serverį" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Koduotė" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Koduotė:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Išeiti" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Išeiti iš viso ekrano" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Rasti" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Šrifto dydis:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Šriftas:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Visas ekranas" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Visas ekranas:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupė" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupė:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Žinynas" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Slėpti Quake langą, jam praradus fokusavimą" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Horizontalus dalijimas" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Horizontalus dalijimas:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Sąsaja" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Pereiti prie kitos komandos" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Pereiti prie kitos komandos:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Pereiti prie ankstesnės komandos" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Pereiti prie ankstesnės komandos:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Įkelti temą" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Išskleisti" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Pavadinimas" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Pavadinimas:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Naujas langas" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nauja darbo sritis" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nauja darbo sritis:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Kita darbo sritis" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Kita darbo sritis:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalus langas" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Nepermatomumas:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Atverti" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Atverti failų tvarkytuvėje" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Atverti nuorodą" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Atverti terminalą su nauja tema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Atverti:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Nebūtina" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Slaptažodis" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Slaptažodis:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Įdėti" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Įdėti:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Kelias" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Kelias:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Įveskite naują trumpinį" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Prievadas:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Ankstesnė darbo sritis" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Ankstesnė darbo sritis:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Terminale yra vis dar veikiančių programų" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake veiksena" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Nuotolinis administravimas" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Nuotolinis administravimas:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Pervadinti" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Pervadinti pavadinimą" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Pervadinti pavadinimą:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Būtina" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Atkurti numatytuosius" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Paleisti programą terminale" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Įrašyti" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Slinkimas" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Slinkti paspaudus klavišą" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Slinkti parodžius išvestį" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Paieška" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Paieška:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Pasirinkti" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Žymėti viską" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Žymėti viską:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Pasirinkite katalogą failo įrašymui" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Pasirinkti failą įkėlimui" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Pasirinkti kairįjį langą" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Pasirinkti kairįjį langą:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Pasirinkti žemesnį langą" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Pasirinkti žemesnį langą" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Pasirinkti dešinįjį langą" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Pasirinkti dešinįjį langą:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Pasirinkite privačiojo rakto failą" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Pasirinkti aukštesnį langą" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Pasirinkti aukštesnį langą:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Pasirinkti darbo sritį" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Serverio pavadinimas" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Serverio pavadinimas:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Nustatyti terminalo paleisties katalogą" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Nustatyti terminalo lango veikseną" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Nustatymai" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Trumpiniai" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Trumpiniai:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Pakeisti temą" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminalas" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Perjungti visą ekraną" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Įveskite kelią atsiunčiamam failui" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Įkelti" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Įkelti failą" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Paleidžiant, naudoti:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Naudotojo vardas" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Naudotojo vardas:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versija:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Vertikalus dalijimas" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Vertikalus dalijimas:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Sveiki atvykę į Deepin Terminalą, prieš spustelėjant dešiniu mygtuku, norint" -" įkelti ir atsisiųsti failus, įsitikinkite, kad serveryje yra įdiegtos rz ir" -" sz komandos." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Langas" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Darbo sritis" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Didinti" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Didinti:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Mažinti" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Mažinti:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ml/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ml/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ml/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ml/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Ashik Salahudeen , 2017 -# Abhinav Krishna C K , 2017 -# Balasankar C , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Balasankar C , 2017\n" -"Language-Team: Malayalam (https://www.transifex.com/linuxdeepin/teams/3976/ml/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ml\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "ഇതിനെ കുറിച്ച്" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "ചേർക്കുക" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "റദ്ദാക്കുക" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "നിർദേശം" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "പകർത്തുക" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "ഡീപിൻ ടെർമിനൽ" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "നീക്കം ചെയ്യുക" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "പുറത്തേക്ക് കടക്കുക" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "പേര്" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "രഹസ്യവാക്ക്" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "സൂക്ഷിക്കുക" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "തിരയുക" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "ടെർമിനൽ" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "ഉപയോക്തൃനാമം" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "ജാലകം" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "പ്രവർത്തന സ്ഥലം" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/mn/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/mn/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/mn/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/mn/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,710 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Gantulga Gansukh , 2017 -# Zorig, 2019 -# Өлзийбат Нансалцог , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Өлзийбат Нансалцог , 2019\n" -"Language-Team: Mongolian (https://www.transifex.com/linuxdeepin/teams/3976/mn/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: mn\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Тушаал биелэгдсэн, ENTER товчыг дарж терминалаас гараарай." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Тухай" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Талархал" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Нэмэх" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Комманд нэмэх" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Сервер нэмэх" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Комманд нэмэх" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Сервер нэмэх" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Хаяг" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Хаяг:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Нарийвчилсан" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Нарийвчилсан тохиргоо" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Энгийн" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Дэвсгэрийн бүдэгрэлт" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Цуцлах" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Гэрчилгээ" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Гэрчилгээ:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Бусад цонхныг хаах" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Бусад цонхыг хаах:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Цонх хаах" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Цонх хаах:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Ажлын талбар хаах" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Ажлын талбар хаах:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Комманд" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Тушаал" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Агуулга" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Хуулах" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Холбоос хуулах" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Идэвхижүүлсэнийг хуулах" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Хуулах:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Заагч" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Заагчыг автоматаар нуух" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Заагч анивчих" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Заагчын харагдац:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Тусгай коммандууд" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Тусгай коммандууд:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Огтлох" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Дээпин Терминал" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Дээпин терминал нь ажлын орчинд суурилсан ахисан түвшиний эмулятор, олон цонхонд ажиллах, алсын зайны зохицуулагч, дэлгэц хуваах горим гэх мэт олон боломжуудтай.\n" -"\n" -"Энэ таны анхаарлыг коммандын мөрний ертөнцөд бүрэн төвлөрүүлж чадна!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Үндсэн хэмжээ" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Үндсэн хэмжээ:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Устгах" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Комманд устгах" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Түлхүүр устгах" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Түлхүүр устгах:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Сервер устгах" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Товчилбор устгах" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Товчилбор харуулах:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Дэлгэцийн хувилбар" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Файл татах" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Комманд засварлах" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Сервер засварлах" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Энкод" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Кодчлол:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Гарах" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Дүүрэн дэлгэцээс гарах" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Хай" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Фонтын хэмжээ:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Фонт:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Дэлгэц дүүрэн" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Дүүрэн дэлгэц:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Групп" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Гурпп:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Тусламж" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Хэвтээ хуваалт" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Хэвтээ хуваалт:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Харагдах байдал" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Дараагийн коммандруу шилжих" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Дараагийн коммандруу шилжих" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Өмнөх коммандруу шилжих" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Өмнөх коммандруу шилжих:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Загвар ачааллах" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximize" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Нэр" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Нэр:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Шинэ цонх" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Шинэ ажлын талбар" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Шинэ ажлын талбар:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Дараагийн ажлын талбар" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Дараагийн ажлын талбар:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Энгийн цонх" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Нэвтрэлт:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Нээх" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Файл зохицуулагч дээр нээх" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Нээх:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Шаардлагагүй" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Нууц үг" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Нууц үг:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Наах" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Наах:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Зам" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Зам:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Шинэ товчилборыг оруулна уу" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Оролт:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Өмнөх ажлын талбар" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Өмнөх ажлын талбар:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Програм терминал дээр ажилласаар байна" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Дэлгэц хуваах горим" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Алсын удирдлага" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Алсын удирдалага:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Дахин нэрлэх" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Гарчигыг дахин нэрлэх" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Дахин нэрлэх гарчиг:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Шаардлагатай" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Анхдагч утга сэргээх" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Програмыг терминал дээр ажиллуулах" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Хадгалах" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Гүйлгэх" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Хайх" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Хайх:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Сонгох" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Бүгдийг сонгох" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Бүгдийг сонгох" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Тохиргоо" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Товчилборууд" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Терминал" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Хэрэглэгчийн нэр" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Цонх" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Ажлийн талбар" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/ms/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ms/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ms/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ms/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,715 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# inashdeen , 2017 -# abuyop , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: abuyop , 2019\n" -"Language-Team: Malay (https://www.transifex.com/linuxdeepin/teams/3976/ms/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ms\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Perintah telah selesai, tekan ENTER untuk keluar dari terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Perihal" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Perakuan" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Tambah" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Tambah Perintah" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Tambah Pelayan" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Tambah perintah" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Tambah pelayan" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Alamat" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Alamat:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Lanjutan" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Pilihan lanjutan" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Anda pasti mahu memadam %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Anda pasti mahu keluar?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Kekunci Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Kekunci Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Asas" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Latar belakang kabur" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Batal" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Sijil" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Sijil:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Tutup tetingkap lain" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Tutup tetingkap lain:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Tutup tetingkap" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Tutup tetingkap:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Tutup ruang kerja" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Tutup ruang kerja:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Perintah" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Perintah:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Kandungan" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Salin" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Salin pautan" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Salin ketika memilih" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Salin:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Kursor autosembunyi" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Kerlipan kursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Gaya kursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Perintah suai" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Perintah suai:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Potong" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Terminal Deepin ialah sebuah emulator terminal lanjutan dengan fitur " -"pemisahan tetingkap, ruang kerja, pengurusan jauh, mod Quake dan lain-lain " -"fitur." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal Deepin ialah sebuah emulator terminal lanjutan dengan fitur ruang kerja, tetingkap berbilang, pengurusan jauh, mod quake dan lain-lain fitur.\n" -"\n" -"Ia menjelaskan lagi fokus anda terhadap dunia baris perintah!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Saiz lalai" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Saiz lalai:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Padam" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Padam perintah" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Kekunci delete" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Kekunci delete:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Padam pelayan" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Papar pintasan" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Papar pintasan:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Papar versi" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Muat turun fail" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Sunting Perintah" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Sunting Pelayan" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Pengekodan" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Pengekodan:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Keluar" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Keluar dari skrin penuh" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Cari" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Saiz fon:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fon:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Skrin Penuh" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Skrin penuh:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Kumpulan" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Kumpulan:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Bantuan" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Sembunyi tetingkap Quake setelah hilang fokus" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Pisah mengufuk" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Pisah mengufuk:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Antaramuka" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Lompat ke perintah berikutnya" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Lompat ke perintah berikutnya:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Lompat ke perintah terdahulu" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Lompat ke perintah terdahulu:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Muat tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimumkan" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nama" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nama:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Tetingkap baharu" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Ruang kerja baharu" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Ruang kerja baharu:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Ruang kerja berikutnya" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Ruang kerja berikutnya:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Tetingkap biasa" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Kelegapan:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Buka" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Buka dalam pengurus fail" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Buka pautan" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Buka terminal dengan tema baharu" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Buka:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Pilihan" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Kata Laluan" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Kata Laluan:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Tampal" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Tampal:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Laluan" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Laluan:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Sila masukkan pintasan baharu" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Ruang kerja terdahulu" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Ruang kerja terdahulu:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Program masih lagu berjalan di dalam terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Mod Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Pengurusan jauh" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Pengurusan jauh:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Nama Semula" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Nama semula tajuk" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Nama semula tajuk:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Diperlukan" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Pulih ke Lalai" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Jalankan satu program di dalam terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Simpan" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Tatal" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Tatal ketika ketukan kekunci" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Tatal ketika output" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Gelintar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Gelintar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Pilih" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Pilih semua" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Pilih semua:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Pilih direktori untuk menyimpan fail" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Pilih fail untuk dimuat naik" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Pilih tetingkap kiri" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Pilih tetingkap kiri:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Pilih tetingkap lebih bawah" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Pilih tetingkap lebih bawah:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Pilih tetingkap kanan" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Pilih tetingkap kanan:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Pilih fail kunci persendirian" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Pilih tetingkap lebih atas" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Pilih tetingkap lebih atas:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Pilih ruang kerja" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nama pelayan" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nama pelayan:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Tetapkan direktori permulaan terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Tetapkan mod tetingkap terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Tetapan" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Pintasan" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Pintasan:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Tukar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Togol skrin penuh" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Taip laluan untuk muat turun fail" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Muat naik" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Muat naik fail" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Guna ketika memulakan:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nama Pengguna" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nama Pengguna:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versi:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Pisah menegak" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Pisah menegak:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Selamat datang ke Terminal Deepin, sila pastikan perintah rz dan sz telah " -"dipasang ke dalam pelayan sebelum mengklik-kanan untuk muat naik dan muat " -"turun fail." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Tetingkap" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Ruang Kerja" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zum masuk" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Zum masuk:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zum keluar" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Zum keluar:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/nb/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/nb/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/nb/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/nb/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,719 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Kristoffer Ulseth , 2017 -# Torstein Olsen , 2017 -# Ronnie André Bjørvik Sletta , 2017 -# Espen Bye, 2017 -# grognak , 2017 -# heimeg , 2017 -# Andreas Dreyer Hysing, 2017 -# hansa71 , 2018 -# ddybing , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: ddybing , 2018\n" -"Language-Team: Norwegian Bokmål (https://www.transifex.com/linuxdeepin/teams/3976/nb/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: nb\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Kommandoen har fullført, trykk ENTER for å lukke terminalen." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Om " - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Godkjenninger" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Legg til " - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Legg til kommando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Legg til server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Legg til kommando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Legg til server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresse" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresse:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avansert" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Avanserte innstillinger" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace knappen" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace knappen:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Grunnleggende" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Uklar bakgrunn" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Avbryt" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Sertifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Sertifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Lukk andre vinduer" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Lukk andre vinduer:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Lukk vindu" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Lukk vindu:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Lukk arbeidsområde" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Lukk arbeidsområde:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Kommando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Kommando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Innhold" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopier" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopier link" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopier:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Markør" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Gjem markør automatisk" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Blinkende markør" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Markørstil:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Egendefinterte kommandoer" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Egendefinerte kommandoer:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Klipp" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminalen er en avansert terminalemulator med arbeidsrom, flere vinduer, fjernstyring, skjelvemodus og andre funksjoner.\n" -"\n" -"Den skjerper fokuset ditt i verden av kommando linje!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Standard størrelse" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Standard størrelse:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Slett" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Slette kommando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Sletteknapp" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Sletteknapp:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Slett tjener" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Vis hurtigtaster" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Vis hurtigtaster:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Vis versjon" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Last ned fil" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Rediger Kommando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Rediger Tjener" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Enkoding" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Enkoding:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Lukk" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Lukk fullskjerm" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Finn" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Skriftstørrelse:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Skrifttype:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Fullskjerm" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Fullskjerm:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Gruppe" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Gruppe:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Hjelp" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Horisontal splitt" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Horisontal splitt:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Grensesnitt" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Hopp til neste kommando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Hopp til neste kommando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Hopp til forrige kommando" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Hopp til forrige kommando:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Last inn tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksimer" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Navn" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Navn:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nytt vindu" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nytt arbeidsområde" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nytt arbeidsrom" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Neste arbeidsområde" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Nytt arbeidsrom:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalt vindu" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Gjennomsiktighet:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Åpne" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Åpne i filbehandleren" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Åpne:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Valgfri" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Passord" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Passord:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Lim inn" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Lim inn:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Sti" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Sti:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Vennligst oppgi en ny hurtigtast" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Forrige arbeidsområde" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Forrige arbeidsrom:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programmer kjører forsatt i terminalen" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Skjelvemodus" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Fjernstyring" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Fjernstyring:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Endre navn" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Endre tittel" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Endre tittel:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Påkrevd" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Gjenopprett Standard" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Kjør et program i terminalen" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Lagre" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Rull" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Ruller ved tastetryk" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Ruller på output" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Søk" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Søk:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Velg" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Velg alle" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Søk alle:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Velg en fil å laste op" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Velg venstre vind" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Velg venstre vindu:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Velg nedre vindu" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Velg nedre vindu:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Velg høyre vindu" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Velg høyre vindu:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Velg den private nøkkelfila" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Velg øvre vind" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Velg øvre vindu:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Velg arbeidsrom" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Tjenernav" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Tjenernavn:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Velg oppstartsmapppe for terminalen" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Velg terminalens vindusmodus" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Instillinger" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Hurtigtaster" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Hurtigtaster:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Bytt tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Last opp" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Last opp fila" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Bruk ved oppstart av:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Brukernavn" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Brukernavn:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versjon:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Vertikal splitt" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Vertikal splitt:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Velkommen til Deepin Terminalen, vennligst forsikre deg om at rz og sz " -"kommandoene har blitt installert i tjeneren før du høyreklikker for å laste " -"opp, og ned, filer." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Vindu" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Arbeidsområde" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom inn" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Zoom inn:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom ut" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Zoom ut:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ne/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ne/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ne/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ne/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Saroj Poudel , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Saroj Poudel , 2018\n" -"Language-Team: Nepali (https://www.transifex.com/linuxdeepin/teams/3976/ne/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ne\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "थप्नुहोस्" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "उच्च" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "रद्द गर्नुहोस्" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "आदेश" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "कपी" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "मेटाउनुहोस्" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "सहायता" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "इन्टरफेस" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "नाम" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "खोल्नुहोस्" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "वैकल्पिक" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "पासवर्ड" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "कृपया नयाँ सर्टकट प्रविष्ट गर्नुहोस्" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "आवश्यक छ" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "बचत गर्नुहोस्" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "खोजी गर्नुहोस्" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "सेटिंग्स" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "सर्टकटहरू" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "टर्मिनल" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "प्रयोगकर्तानाम" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "विन्डो" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/nl/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/nl/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/nl/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/nl/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,724 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Jop Vernooij , 2017 -# Lars Acou , 2017 -# closeddoors1559 , 2017 -# Timothy Vanderaerden , 2017 -# Alain Baudrez , 2017 -# Anne , 2017 -# Maggie Liu , 2017 -# Anduxor, 2017 -# jasper580 , 2017 -# dragnadh, 2018 -# Heimen Stoffels , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Heimen Stoffels , 2019\n" -"Language-Team: Dutch (https://www.transifex.com/linuxdeepin/teams/3976/nl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"De opdracht is afgerond. Druk op ENTER om de terminal af te sluiten." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Over" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Erkenningen" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Toevoegen" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Opdracht toevoegen" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Server toevoegen" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Opdracht toevoegen" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Server toevoegen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adres" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adres:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Geavanceerd" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Geavanceerde opties" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Weet je zeker dat je %s wilt verwijderen?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Weet je zeker dat je wilt afsluiten?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace-toets" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace-toets:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Basis" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Achtergrond vervagen" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Annuleren" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificaat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificaat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Andere vensters sluiten" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Andere vensters sluiten:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Sluit venster" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Venster sluiten:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Werkblad sluiten" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Werkblad sluiten:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Commando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Opdracht:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Inhoud" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiëren" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Link kopiëren" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopiëren bij selecteren" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopiëren:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Cursor automatisch verbergen" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Cursorknippering" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Cursor-stijl:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Aangepaste opdrachten" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Aangepaste opdrachten:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Knippen" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal is een geavanceerde terminalemulator met functies als " -"werkbladen, meerdere vensters, beheer op afstand, quake-modus en nog veel " -"meer." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminal is een geavanceerde terminalemulator met mogelijkheden als werkbladen, meerdere vensters, beheer op afstand, quake-modus en nog veel meer.\n" -"\n" -"Het verscherpt uw focus in de opdrachtregelwereld!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Standaard grootte" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Standaard grootte:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Verwijderen" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Opdracht verwijderen" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Toets verwijderen" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Toets verwijderen:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Server verwijderen" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Sneltoetsen weergeven" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Sneltoetsen weergeven:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Versie weergeven" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Bestand downloaden" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Opdracht bewerken" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Server bewerken" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Versleuteling" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Versleuteling:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Afsluiten" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Volledig scherm afsluiten" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Zoeken" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Lettertypegrootte:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Lettertype:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Volledig scherm" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Volledig scherm:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Groep" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Groep:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Hulp" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Quake-venster verbergen na verliezen van focus" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Horizontaal splitsen" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Horizontaal splitsen:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Uiterlijk" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Overgaan naar volgende opdracht" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Overgaan naar volgende opdracht:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Overgaan naar vorige opdracht" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Overgaan naar vorige opdracht:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Thema laden" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximaliseren" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Naam" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Naam:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nieuw venster" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nieuw werkblad" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nieuw werkblad:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Volgend werkblad" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Volgend werkblad:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normaal venster" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Doorzichtigheid:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Openen" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Openen in bestandsbeheerder" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Link openen" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Terminal openen met nieuw thema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Open:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Optioneel" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Wachtwoord" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Wachtwoord:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Plakken" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Plakken:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Pad" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Pad:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Voer een nieuwe sneltoets in" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Poort:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Vorig werkblad" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Vorig werkblad:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Er draaien nog applicaties in de terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake-modus" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Beheer op afstand" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Beheer op afstand:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Naam wijzigen" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Titelnaam wijzigen" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Titelnaam wijzigen:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Verplicht" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Standaardwaarden herstellen" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Draai een applicatie in de terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Opslaan" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Scrollen" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Scrollen bij toetsaanslag" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Scrollen bij uitvoer" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Zoeken" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Zoeken:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Selecteren" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Alles selecteren" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Alles selecteren:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Kies de map waarin het bestand moet worden opgeslagen" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Selecteer te uploaden bestand" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Selecteer linkervenster" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Selecteer linkervenster:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Selecteer ondervenster" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Selecteer ondervenster:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Selecteer rechtervenster" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecteer rechtervenster:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Selecteer het privésleutelbestand" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Selecteer bovenvenster" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Selecteer bovenvenster:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Selecteer werkblad" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Servernaam" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Servernaam:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Stel de terminal-opstartmap in" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Stel de terminalvenstermodus in" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Instellingen" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Sneltoetsen" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Sneltoetsen:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Thema wijzigen" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Beeldvullende modus aan/uit" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Typ het pad om het bestand te downloaden" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Uploaden" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Bestand uploaden" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Gebruiken bij opstarten:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Gebruikersnaam" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Gebruikersnaam:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versie:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Verticaal splitsen" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Verticaal splitsen:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Welkom bij Deepin Terminal! Zorg ervoor dat de rz- en sz-opdrachten " -"geïnstalleerd zijn op de server voordat u bestanden upload en download " -"middels de rechtermuisknop." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Venster" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Werkblad" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Inzoomen" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Inzoomen:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Uitzoomen" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Uitzoomen:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/pa/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/pa/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/pa/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/pa/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# A S Alam , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: A S Alam , 2019\n" -"Language-Team: Panjabi (Punjabi) (https://www.transifex.com/linuxdeepin/teams/3976/pa/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pa\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "ਰੱਦ ਕਰੋ" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "ਮਦਦ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "ਖੋਲ੍ਹੋ" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "ਪਾਸਵਰਡ" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "ਖੋਜੋ" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "ਸੈਟਿੰਗਾਂ" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/pam/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/pam/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/pam/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/pam/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Alfred Malaza , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Alfred Malaza , 2017\n" -"Language-Team: Kapampangan (https://www.transifex.com/linuxdeepin/teams/3976/pam/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pam\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Idagdag" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Advanced" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "I-cancel" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Isara aliwa pang awang" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Isara workspace" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopyan" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Pututan" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Buran" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Lumwal fullscreen" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "I-fullscreen" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Paragulan" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Lagyu" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Bayung workspace" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Katuking workspace" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Ibuklat" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Pasword" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Dikit" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Milabas a workspace" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Isinup" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Manintun" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Pilinan ngan" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Username" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Workspace" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zoom in" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zoom out" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/pl/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/pl/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/pl/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/pl/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Piotr Strębski , 2018 -# Krzysztof Kut , 2019 -# Marcin Kozioł , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Marcin Kozioł , 2019\n" -"Language-Team: Polish (https://www.transifex.com/linuxdeepin/teams/3976/pl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pl\n" -"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Wykonywanie polecenia zostało ukończone; wciśnij ENTER, aby wyjść z terminala." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "O programie" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Podziękowania" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Dodaj" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Dodaj polecenie" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Dodaj serwer" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Dodaj polecenie" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Dodaj serwer" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adres" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adres:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Zaawansowane" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Zaawansowane opcje" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Czy jesteś pewny że chcesz usunąć %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Czy jesteś pewny że chcesz wyjść?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Przycisk Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Przycisk Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Podstawowe" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Rozmycie tła" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Anuluj" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certyfikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certyfikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zamknij inne okna" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zamknij inne okna:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zamknij okno" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zamknij okno:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zamknij przestrzeń roboczą" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zamknij przestrzeń roboczą:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Polecenie" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Polecenie:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Zawartość" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiuj" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopiuj odnośnik" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopiuj przy zaznaczaniu" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopiuj:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Automatyczne ukrywanie kursora" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Miganie kursora" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Styl kursora:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Polecenia własne" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Polecenia własne:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Wytnij" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminal to zaawansowany emulator terminala z podziałem okien, " -"przestrzeniami roboczymi, zdalnym zarządzaniem, trybem Quake i innymi " -"funkcjami." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal Deepin to zaawansowany emulator terminala z obszarami roboczymi, obsługą wielu okien, zdalnym zarządzaniem, trybem quake i innymi funkcjami.\n" -"\n" -"Wyostrza on Twoją uwagę na świat wiersza poleceń!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Domyślny rozmiar" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Domyślny rozmiar:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Usuń" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Usuń polecenie" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Przycisk Delete" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Przycisk Delete:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Usuń serwer" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Wyświetl skróty" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Wyświetl skróty:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Wyświetl wersję" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Pobierz plik" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Edycja polecenia" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Edycja serwera" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kodowanie" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kodowanie:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Wyjdź" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Opuść tryb pełnoekranowy" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Znajdź" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Rozmiar czcionki:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Czcionka:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Pełny ekran" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Pełny ekran:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupa" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupa:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Pomoc" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Ukryj okno Quake po utracie ostrości" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Podział poziomy" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Podział poziomy:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfejs" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Przejdź do następnego polecenia" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Przejdź do następnego polecenia:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Przejdź do poprzedniego polecenia" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Przejdź do poprzedniego polecenia:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Wczytaj motyw" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maksymalizuj" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nazwa" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nazwa:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nowe okno" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nowa przestrzeń robocza" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nowa przestrzeń robocza:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Następna przestrzeń robocza" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Następna przestrzeń robocza:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalne okno" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Przezroczystość:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Otwórz" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Otwórz w menedżerze plików" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Otwórz terminal z nowym motywem" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Otwórz:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcjonalne" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Hasło" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Hasło:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Wklej" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Wklej:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Ścieżka" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Ścieżka:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Podaj nowy skrót" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Poprzednia przestrzeń robocza" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Poprzednia przestrzeń robocza:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programy są wciąż uruchomione w terminalu" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Tryb quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Zdalne zarządzanie" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Zdalne zarządzanie:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Zmień nazwę" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Zmień nazwę tytułu" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Zmień nazwę tytułu:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Wymagane" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Przywróć domyślne" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Uruchom program w terminalu" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Zapisz" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Przewijanie" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Przewiń przy naciśnięciu klawisza" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Przewiń przy wyjściu" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Szukaj" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Szukaj:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Wybierz" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Zaznacz wszystko" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Zaznacz wszystko:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Wybierz katalog, aby zapisać plik" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Wybierz plik do przesłania" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Wybierz lewe okno" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Wybierz lewe okno:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Wybierz dolne okno" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Wybierz dolne okno:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Wybierz prawe okno" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Wybierz prawe okno:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Wybierz plik klucza prywatnego" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Wybierz górne okno" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Wybierz górne okno:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Wybierz przestrzeń roboczą" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nazwa serwera" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nazwa serwera:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Ustaw katalog uruchomieniowy terminala" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Ustaw tryb okna terminala" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Ustawienia" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Skróty" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Skróty:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Przełącz motyw" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Przełącz tryb pełnoekranowy" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Wpisz ścieżkę, aby pobrać plik" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Prześlij" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Prześlij plik" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Użyj przy uruchomieniu:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nazwa użytkownika" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nazwa użytkownika:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Wersja:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Podział pionowy" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Podział pionowy:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Witamy w Terminalu Deepin! Upewnij się, że polecenia rz i sz zostały " -"zainstalowane na serwerze, aby móc korzystać z wysyłania i pobierania plików" -" poprzez kliknięcie prawym przyciskiem myszki." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Okno" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Przestrzeń robocza" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Przybliż" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Przybliż:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Oddal" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Oddal:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/pt/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/pt/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/pt/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/pt/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,720 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Luis Neves , 2017 -# Maggie Liu , 2017 -# Ricardo Simões , 2017 -# João P Carvalhinho , 2017 -# Luís Lima , 2018 -# Manuela Silva , 2018 -# Cindy0514, 2019 -# Hugo Carvalho , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Hugo Carvalho , 2019\n" -"Language-Team: Portuguese (https://www.transifex.com/linuxdeepin/teams/3976/pt/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"O comando foi executado com sucesso, pressione ENTER para sair do terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Acerca" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecimentos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Adicionar" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Adicionar Comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Adicionar Servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Adicionar comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Adicionar servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Endereço" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Endereço:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avançado" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opções avançadas" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Tem a certeza que deseja eliminar %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Tem a certeza que deseja sair?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Fundo desfocado" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancelar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificado" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificado:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Fechar outras janelas" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Fechar outras janelas:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Fechar janela" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Fechar janela:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Fechar área de trabalho" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Fechar área de trabalho:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Conteúdo" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar hiperligação" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copiar ao selecionar" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Ocultar automaticamente o cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Piscar do cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilo do cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizados" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizados:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"O Deepin Terminal é um emulador de terminal avançado com áreas de trabalho, " -"múltiplas janelas, gestão remota, modo \"Quake\" e outras funcionalidades." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"O Deepin Terminal é um emulador de terminal avançado com áreas de trabalho, múltiplas janelas, gestão remota, modo \"quake\" e outras funcionalidades.\n" -"\n" -"Isto aviva o seu foco no mundo da linha de comandos!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamanho Predefinido" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamanho predefinido:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Eliminar" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Eliminar comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Tecla Delete" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Tecla Delete:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Eliminar servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Exibir atalhos" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Exibir atalhos:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Exibir versão" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Transferir ficheiro" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Editar Comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Editar Servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificação" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "A codificar:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Sair" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Sair de ecrã completo" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Encontrar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamanho da letra:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Tipo de letra:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Ecrã completo" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Ecrã completo:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ajuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Ocultar janela Quake depois de perder o foco" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Dividir horizontalmente" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Dividir horizontalmente:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interface" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Ir para o próximo comando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Ir para o próximo comando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Ir para o comando anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Ir para o comando anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Carregar tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nome" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nome:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nova janela" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nova área de trabalho" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nova área de trabalho:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Área de trabalho seguinte" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Área de trabalho seguinte:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Janela normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidade:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abrir" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir no gestor de ficheiros" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Abrir hiperligação" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Abra o terminal com um novo tema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Palavra-passe" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Palavra passe:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Colar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Colar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Caminho" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Caminho:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Por favor, insira um novo atalho" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Porta:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Área de trabalho anterior" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Área de trabalho anterior:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Os programas ainda estão em execução no terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Modo Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Gestão remota" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Gestão remota:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renomear" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renomear título" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renomear título:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Obrigatório" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurar Predefinições" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Executar um programa no terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Guardar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Rolar" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Rolar ao tocar em tecla" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Rolar na saída" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Procurar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Procurar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Selecionar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Selecionar tudo" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Selecionar tudo:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Selecionar diretoria para guardar o ficheiro" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Selecionar ficheiro para enviar" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Selecionar janela esquerda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Selecionar janela esquerda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Selecionar janela inferior" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Selecionar janela inferior:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Selecionar janela direita" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecionar janela direita:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Selecionar o ficheiro de chave privada" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Selecionar janela superior" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Selecionar janela superior:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Selecionar área de trabalho" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nome do servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nome do servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Definir a diretoria de início do terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Definir o modo de janela do terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Definições" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Atalhos" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atalhos:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Mudar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Alternar para ecrã completo" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Digite o caminho para transferir o ficheiro" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Enviar" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Enviar ficheiro" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Utilizar ao iniciar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nome de utilizador" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Nome de utilizador:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versão:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Dividir verticalmente" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Dividir verticalmente:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Bem-vindo ao Deepin Terminal, por favor, certifique-se que os comandos 'rz' " -"e 'sz' foram instalados no servidor antes de clicar no botão direito para " -"enviar e transferir os ficheiros" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Janela" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Área de Trabalho" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Aumentar" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Aumentar:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Diminuir" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Diminuir:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/pt_BR/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/pt_BR/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/pt_BR/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/pt_BR/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,722 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# viniciusarl , 2017 -# Kayo Martins , 2017 -# Tati Navarro , 2017 -# Pablo Alessandro , 2017 -# Bruno Gonçalves , 2017 -# RAFAEL GAUNA , 2017 -# 58fae44c6c4ff84516f8c8656a7fb14d, 2018 -# Raphael Miquelis , 2018 -# Paulo Schopf, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Paulo Schopf, 2019\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/linuxdeepin/teams/3976/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Comando concluído, pressione ENTER para sair do terminal." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Sobre" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Agradecimentos" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Adicionar" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Adicionar comando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Adicionar servidor" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Adicionar comando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Adicionar servidor" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Endereço" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Endereço:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avançado" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Opções avançadas" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Quer realmente excluir %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Quer realmente sair?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Tecla backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Tecla backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Básico" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Desfoque de fundo" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Cancelar" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certificado" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certificado:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Fechar outras janelas" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Fechar outras janelas:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Fechar janela" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Fechar janela:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Fechar espaço de trabalho" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Fechar espaço de trabalho:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Comando:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Conteúdo" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiar" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Copiar link" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Copiar ao selecionar" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Copiar:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Auto ocultar cursor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Intermitência do cursor" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Estilo do cursor:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Comandos personalizados" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Comandos personalizados:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Recortar" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"O Deepin Terminal é um emulador de terminal avançado com divisão de janelas," -" áreas de trabalho, gerenciamento remoto, modo Quake e outros recursos." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal é um emulador de terminal avançado, com áreas de trabalho, múltiplas janelas, gerenciamento remoto, modo quake e outras características.\n" -"\n" -"Isso aguça seu foco no mundo das linhas de comandos!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Tamanho padrão" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Tamanho padrão:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Excluir" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Excluir comando" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Excluir chave" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Excluir chave:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Excluir servidor" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Exibir atalhos" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Exibir atalhos:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Exibir versão" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Baixar arquivo" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Editar comando" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Editar servidor" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Codificação" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Codificação:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Sair" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Sair da tela cheia" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Encontrar" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Tamanho da fonte:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Fonte:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Tela cheia" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Tela cheia:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grupo" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grupo:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ajuda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Ocultar a janela do Quake após perder o foco" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Dividir horizontalmente" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Dividir horizontalmente:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interface" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Pular para o próximo comando" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Pular para o próximo comando:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Pular para o comando anterior" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Pular para o comando anterior:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Carregar tema" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximizar" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nome" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Nome:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nova janela" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Novo espaço de trabalho" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nova área de trabalho:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Próximo espaço de trabalho" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Próxima área de trabalho:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Janela normal" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Opacidade:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Abrir" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Abrir no gerenciador de arquivos" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Abrir link" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Abrir o terminal com um novo tema" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Abrir:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opcional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Senha" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Senha:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Colar" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Colar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Caminho" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Caminho:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Por favor, insira o novo atalho" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Porta:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Área de trabalho anterior" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Área de trabalho anterior:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Os programas ainda estão sendo executados no terminal" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Modo Quake" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Gerenciamento remoto" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Gerenciamento remoto:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Renomear" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Renomear o título" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Renomear o título:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Requerido" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurar padrões" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Executar um programa no terminal" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Salvar" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Rolagem" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Rolar ao teclar" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Rolar com a saída de dados" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Pesquisar" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Pesquisar:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Selecionar" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Selecionar tudo" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Selecionar tudo:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Selecionar o diretório para salvar o arquivo" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Selecionar arquivo para enviar" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Selecionar janela à esquerda" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Selecionar janela à esquerda:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Selecionar janela abaixo" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Selecionar janela abaixo:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Selecionar janela à direita" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Selecionar janela à direita:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Selecionar o arquivo de chave privada" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Selecionar a janela superior" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Selecionar a janela superior:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Selecionar área de trabalho" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Nome do servidor" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Nome do servidor:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Definir o diretório inicial do terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Definir o tipo de janela do terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Configurações" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Atalhos" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Atalhos:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Alterar tema" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Alternar para o modo tela cheia" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Digite o caminho para baixar o arquivo" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Enviar" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Enviar arquivo" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Utilizar ao iniciar:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Usuário" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Usuário:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versão:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Dividir verticalmente" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Dividir verticalmente:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Bem-vindo ao Terminal, por favor, certifique-se de que os comandos rz e sz " -"foram instalados no servidor antes de usar o botão direito do mouse para " -"enviar e baixar arquivos." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Janela" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Espaço de trabalho" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Aumentar zoom" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Aumentar zoom:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Diminuir zoom" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Diminuir zoom:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ro/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ro/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ro/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ro/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,709 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# pacificator , 2017 -# Maggie Liu , 2017 -# Nicolae Crefelean, 2017 -# cricri8o , 2017 -# Vasile Rusu , 2017 -# Holyme, 2018 -# Tiberiu Fratila , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Tiberiu Fratila , 2018\n" -"Language-Team: Romanian (https://www.transifex.com/linuxdeepin/teams/3976/ro/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Despre" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Adaugă" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Avansat" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Simplu" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Anulează" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Închide celelalte ferestre" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Închidere fereastră" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Închide spațiu de lucru" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Comandă" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Copiere" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Cursor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Tăiere" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminalul Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Șterge" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Compresie" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Ieşire" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Ieșire ecran complet" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Tot ecranul" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Ajutor" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Interfață" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Mărește" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Nume" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Spațiu de lucru nou" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Spațiul de lucru următor" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Deshide" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Opțional" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Parola" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Lipire" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Cale fișier" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Cale fișier" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Vă rugăm să introduceți o nouă scurtătură" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Spațiul de lucru precedent" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Redenumire" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Necesar" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Restaurare setări implicite" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Salvare" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Rulare" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Căutare" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Selectare" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Selectează totul" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Setări" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Scurtături" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminalul" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Nume utilizator" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Versiune:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Fereastră" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Spațiu de lucru" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "A apropia" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "A îndepărta" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/ru/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ru/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ru/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ru/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,720 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# crja72 , 2017 -# Serge Kukharski, 2017 -# Vasile Rusu , 2017 -# Анатолий Валерианович , 2017 -# jvjey , 2017 -# evilscorpio , 2017 -# Валерий Владимирович, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Валерий Владимирович, 2019\n" -"Language-Team: Russian (https://www.transifex.com/linuxdeepin/teams/3976/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Команда была завершена, нажмите ENTER, чтобы выйти из терминала." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "О программе " - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Выражение признательности" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Добавить" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Добавить Команду " - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Добавить Сервер" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Добавить команду" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Добавить сервер" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Адрес" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Адрес:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Дополнительно" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Дополнительные опции" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Вы уверены, что хотите удалить %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Вы уверены, что хотите выйти?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Клавиша Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Клавиша Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Основная" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Размытие фона" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Отмена" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Сертификат" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Сертификат:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Закрыть другие окна" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Закрыть другие окна:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Закрыть окно" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Закрыть окно:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Закрыть рабочую область" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Закрыть рабочую область:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Команда" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Команда:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Содержание" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Копировать" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Копировать ссылку" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Копирование на выбор" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Копировать:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Курсор" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Автоматическое скрытие курсора" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Частота мигания курсора" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Вид Курсора:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Пользовательские команды" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Пользовательские команды:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Вырезать" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Терминал является передовым эмулятором терминала с вкладками, " -"многооконным интерфейсом, удаленным управлением, выпадающим режимом и " -"другими функциями. " - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr " Терминал Deepin " - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Терминал является передовым эмулятором терминала с вкладками, многооконным интерфейсом, удаленным управлением, выпадающим режимом и другими функциями.\n" -"\n" -"Он погрузит вас в мир командной строки! " - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Размер по умолчанию" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Размер по умолчанию" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Удалить" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Удалить комманду" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Удалить ключ" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Удалить ключ:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Удалить сервер" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Горячие клавиши" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Отобразить сочетания клавиш:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Отобразить версию" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Загрузить файл" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Редактировать Команду" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Редактировать Сервер" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Кодировка" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Кодировка:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Выход" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Выйти из полноэкранного режима" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Найти" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Размер шрифта:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Шрифт:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Полноэкранный режим" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Полный экран:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Группа" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Группа:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Помощь" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Скрыть окно Выпадающего Терминала после потери фокуса" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Разделить по горизонтали" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Разделить по горизонтали:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Интерфейс" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Перейти к следующий команде" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Перейти к следующий команде:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Перейти к предыдущей команде" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Перейти к предыдущей команде:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Загрузить тему" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Развернуть" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Имя" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Имя:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Новое окно" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Новая рабочая область" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Новая вкладка:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Следующая рабочая область" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Следующая вкладка:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Обычное окно" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Непрозрачность:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Открыть" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Открыть в файловом менеджере" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Открыть ссылку" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Открытый терминал с новой темой" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Открыть:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Необязательный" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Пароль" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Пароль:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Вставить" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Вставить:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Путь" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Путь:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Пожалуйста, введите новое сочетание" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Порт:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Предыдущая вкладка" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Предыдущая вкладка:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Программы по-прежнему работают в терминале" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Выпадающий режим" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Удаленное управление" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Удаленное управление:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Переименовать" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Переименовать заголовок" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Переименовать заголовок:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Требуется" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Восстановить Значения по умолчанию" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Запустить в терминале" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Сохранить" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Прокрутка" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Прокрутка нажатием клавиши" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Прокрутка при вводе" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Поиск" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Поиск:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Выбрать" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Выбрать все" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Выбрать все:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Выберите папку для сохранения файла" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Выберите файл для загрузки" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Выберите левое окно" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Выберите левое окно:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Выберите нижнее окно" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Выберите нижнее окно:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Выберите правое окно" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Выберите правое окно:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Выберите файл с закрытым ключом" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Выберите верхнее окно" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Выберите верхнее окно:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Выбрать вкладку" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Имя сервера" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Имя сервера:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Установить каталог запуска терминала" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Установить режим окна для терминала" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Настройки" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Горячие клавиши" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Комбинации клавиш:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Переключить тему оформления" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Терминал" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Включить полноэкранный режим" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Введите путь для загрузки файла" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Загрузить" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Загрузить файл" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Запускать при старте:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Имя пользователя" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Имя пользователя:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Версия:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Разделить по вертикали" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Разделить по вертикали" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Добро пожаловать в Deepin терминал, пожалуйста, убедитесь, что rz и sz " -"команды были установлены на сервере, для возможности использования правой " -"кнопки мыши, при загрузке и скачивании файлов." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Окно" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Рабочая область" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Приблизить" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Приблизить:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Отдалить" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Отдалить:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/sk/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/sk/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/sk/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/sk/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Microtus , 2017 -# fasier , 2017 -# Cindy0514, 2019 -# Marek Bujko , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Marek Bujko , 2019\n" -"Language-Team: Slovak (https://www.transifex.com/linuxdeepin/teams/3976/sk/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sk\n" -"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Príkaz bol dokončený, stlačte Enter pre opustenie terminálu." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "O programe" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Poďakovanie" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Pridať" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Pridať príkaz" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Pridať server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Pridať príkaz" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Pridať server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adresa" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adresa:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Pokročilé" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Pokročilé možnosti" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Naozaj chcete vymazať %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Naozaj chcete ukončiť?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace klávesa" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace klávesa:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Základ" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Rozostrené pozadie" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Zrušiť" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certifikát" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certifikát:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zatvoriť ostatné okná" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zatvoriť ostatné okná" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zatvoriť okno" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zatvoriť okno:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zatvoriť pracovné prostredie" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zatvoriť pracovné prostredie:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Príkaz" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Príkaz:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Obsah" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopírovať" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopírovať odkaz" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Kopírovať pri výbere" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopírovať:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kurzor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Automatické skrývanie kurzora" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Blikanie kurzora" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Štýl kurzora:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Vlastné príkazy" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Vlastné príkazy:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Vystrihnúť" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Terminál je pokročilý emulátor terminálu s pracovným priestorom, " -"množstvom okien, vzdialenou správou, režimom quake a ďalšími funkciami." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminál" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Terminál je pokročilý emulátor terminálu s pracovným priestorom, množstvom okien, vzdialenou správou, režimom quake a ďalšími funkciami.\n" -"\n" -"Zlepšuje vaše smerovanie vo svete príkazového riadku!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Predvolená veľkosť" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Predvolená veľkosť:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Vymazať" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Odstrániť príkaz" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Vymazať kľúč" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Vymazať kľúč:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Vymazať server" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Zobraziť skratky" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Zobraziť skratky:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Zobraziť verziu" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Stiahnuť súbor" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Upraviť príkaz" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Upraviť server" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kódovanie" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kódovanie:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Ukončiť" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Zrušiť celú obrazovku" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Nájsť" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Veľkosť písma:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Písmo:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Celá obrazovka" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Celá obrazovka:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Skupina" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Skupina:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Nápoveda" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Skryť quake okno po rozostrení" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Horizontálne rozdelenie" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Horizontálne rozdelenie:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Rozhranie" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Prejsť na ďalší príkaz" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Prejsť na ďalší príkaz:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Prejsť na predchádzajúci príkaz" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Prejsť na predchádzajúci príkaz:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Načítať tému" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Zväčšiť" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Názov" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Názov:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Nové okno" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nové pracovné prostredie" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nové pracovné prostredie:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Ďalšie pracovné prostredie" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Ďalšie pracovné prostredie:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normálne okno" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Nepriehľadnosť:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Otvoriť" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Otvoriť v správcovi súborov" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Otvoriť terminál s novou témou" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Otvoriť:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Voliteľné" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Heslo" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Heslo:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Prilepiť" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Prilepiť:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Cesta" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Cesta:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Prosím, zadajte novú skratku" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Predchádzajúce pracovné prostredie" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Predchádzajúce pracovné prostredie:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programy stále bežia v termináli" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake režim" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Vzdialená správa" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Vzdialená správa:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Premenovať" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Premenovať názov" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Neplatný alebo neexistujúci súbor" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Požadované" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Obnoviť predvolené nastavenia" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Spustiť program v termináli" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Uložiť" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Otočiť kolieskom myši" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Posunúť po prejdení po údere na klávesnici" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Posunúť pri výstupe" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Hľadať" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Vyhľadávanie:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Vybrať" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Vybrať všetko" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Vybrať všetko:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Vyberte adresár pre uloženie sťahovaných súborov" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Vyberte súbor, ktorý chcete nahrať" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Vybrať ľavé okno" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Vybrať ľavé okno:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Vybrať spodné okno" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Vybrať spodné okno:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Vybrať pravé okno" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Vybrať pravé okno:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Vyberte súbor súkromného kľúča" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Vybrať horné okno" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Vybrať horné okno:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Vybrať pracovné prostredie" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Meno servera" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Meno servera:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Nastavte spúšťací priečinok terminálu" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Nastavte režim okna terminálu" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Nastavenia" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Odkazy" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Skratky:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Zmeniť tému" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminál" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Prepnúť na celú obrazovku" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Typ cesty k súboru na stiahnutie" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Nahrať" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Nahrať súbor" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Použiť pri štarte:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Užívateľské meno" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Užívateľské meno:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Verzia:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Vertikálne rozdelenie" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Vertikálne rozdelenie:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Vitajte v Deepin Termináli, skontrolujte si, či príkazy rz a sz máte " -"nainštalované na serveri predtým, ako kliknete na nahrávať a sťahovať " -"súbory." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Okno" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Pracovné prostredie" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Priblížiť" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Priblížiť:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Oddialiť" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Oddialiť:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/sl/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/sl/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/sl/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/sl/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,717 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Filip Komar , 2017 -# worm , 2017 -# andrej55 , 2017 -# RokX, 2017 -# France Lipuzic , 2017 -# kloki , 2017 -# Gorzy Gorup , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Gorzy Gorup , 2018\n" -"Language-Team: Slovenian (https://www.transifex.com/linuxdeepin/teams/3976/sl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Ukaz je bil izvršen, za izhod iz terminala pritisnite ENTER." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "O programu" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Zahvala" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Dodaj" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Dodaj Ukaz" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Dodaj Strežnik" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Dodaj ukaz" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Dodaj strežnik" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Naslov" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Naslov:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Napredno" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Napredne možnosti" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Vračalka" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Vračalka:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Osnove" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Zabriši ozadje" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Prekliči" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Certifikat" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Certifikat:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Zapri druga okna" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Zapri druga okna:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Zapri okno" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Zapri okno:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Zapri delovno površino" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Zapri delovno površino:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Ukaz" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Ukaz:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Vsebina" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiraj" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Kopiraj bližnjico" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopiraj:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Kurzor" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Samodejno skrij kurzor" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Utripanje kazalca" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Oblika kazalca:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Ukazi po meri" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Ukazi po meri:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Izreži" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminal Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Terminal Deepin je napreden terminal z delovnim prostorom, več okni, upravljanjem na daljavo, načinom \"quake\" in drugimi lastnostmi.\n" -"\n" -"Z njim se lažje osredotočite v svetu ukazov!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Privzeta velikost" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Privzeta velikost:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Izbriši" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Izbriši ukaz" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Izbriši ključ" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Izbriši ključ:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Izbriši strežnik" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Prikaži bližnjice" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Prikaži bližnjice:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Prikaži različico" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Prenesi datoteko" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Uredi ukaz" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Uredi strežnik" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Encoding" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Encoding:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Izhod" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Izhod iz celozaslonskega načina" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Najdi" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Velikost pisave:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Pisava:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Celozaslonski način" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Celozaslonski način:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Skupina" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Skupina:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Pomoč" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Vodoravna razdelitev" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Vodoravna razdelitev:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Vmesnik" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Skoči na naslednji ukaz" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Skoči na naslednji ukaz:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Skoči na prejšnji ukaz" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Skoči na prejšnji ukaz:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Naloži temo" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Povečaj" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Ime" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Ime:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Novo okno" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Nova delovna površina" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Nov delovni prostor:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Naslednja delovna površina" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Naslednji delovni prostor:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normalno okno" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Prozornost:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Odpri" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Odpri v upravitelju datotek" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Odpri:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Po želji" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Geslo" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Geslo:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Prilepi" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Prilepi:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Pot" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Pot:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Prosim, vnesite novo bližnjico" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Vrata:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Prejšnja delovna površina" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Prejšnja delovna površina:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Programi še tečejo v terminalu" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Način \"Quake\"" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Upravljanje na daljavo" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Upravljanje na daljavo:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Preimenuj" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Preimenuj naslov" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Preimenuj naslov:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Zahtevano" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Obnovi privzeto" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Zaženi program v terminalu" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Shrani" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Miškin kolešček" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Premikaj se s tipkovnico" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Pomakni se na izhod" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Išči" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Iskanje:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Izberi" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Izberi vse" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Izberi vse:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Izberi datoteko za nalaganje" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Izberi levo okno" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Izberi levo okno:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Izberi spodnje okno" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Izberi spodnje okno:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Izberi desno okno" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Izberi desno okno:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Izberi zasebno datoteko s ključem" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Izberi zgornje okno" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Izberi zgornje okno:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Izberi delovno površino" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Ime strežnika" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Ime strežnika:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Nastavi zagonski direktorij za terminal" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Nastavi okenski način za terminal" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Nastavitve" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Bližnjice" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Bližnjice:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Preklopi temo" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Naloži" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Naloži datoteko" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Uporabi na začetku:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Uporabniško ime" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Uporabniško ime:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Različica:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Navpična razdelitev" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Navpična razdelitev:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Dobrodošli v Terminal Deepin. Prosim, prepričajte se, da so bili \"rz\" in " -"\"sz\" ukazi nameščeni v strežnik, preden desno kliknete za nalaganje in " -"prenašanje datotek." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Okno" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Delovna površina" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Povečaj" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Povečaj:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Pomanjšaj" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Pomanjšaj:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/sq/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/sq/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/sq/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/sq/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,703 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Besnik , 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Besnik , 2018\n" -"Language-Team: Albanian (https://www.transifex.com/linuxdeepin/teams/3976/sq/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sq\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Anuloje" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Terminali Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Dalje" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Fjalëkalim" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Emër përdoruesi" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/sr/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/sr/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/sr/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/sr/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,716 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Boki Ball , 2017 -# Nikola Obradović , 2017 -# kolera , 2017 -# Smarty , 2018 -# Један Пријатељ <3acejax@gmail.com>, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Један Пријатељ <3acejax@gmail.com>, 2019\n" -"Language-Team: Serbian (https://www.transifex.com/linuxdeepin/teams/3976/sr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sr\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Команда је извршена, притисните УНЕСИ да напустите терминал." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "О програму" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Заслуге" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Додај" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Додај команду" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Додај сервер" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Додај команду" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Додај сервер" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Адреса" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Адреса:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Напредно" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Напредне опције" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Заиста желите да обришете %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Заиста желите да изађете?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace тастер" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace тастер:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Основно" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Замућена позадина" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Откажи" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Сертификат" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Сертификат:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Затвори остале прозоре" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Затвори остале прозоре:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Затвори прозор" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Затвори прозор:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Затвори радни простор" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Затвори радни простор:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Команда" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Команда:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Садржај" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Копирај" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Копирај везу" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Копирај при избору" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Копирај:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Показивач" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Самоскривање показивача" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Трептање показивача" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Стил показивача:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Прилагођене команде" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Прилагођене команде:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Исеци" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Дипин Терминал је напредни емулатор терминала са дељивим прозорима, радним " -"просторима, даљинским управљањем, спуштајућим режимом и осталим функцијама." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Дипин Терминал" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Дипин Терминал је напредни емулатор терминала са радним просторима, вишеструким прозорима, даљинским управљањем, спуштајућим режимом и осталим функцијама.\n" -"\n" -"Изоштрава ваш фокус у свету командне линије!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Подразумевана величина" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Подразумевана величина:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Обриши" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Обриши команду" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Delete тастер" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Delete тастер:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Обриши сервер" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Прикажи пречице" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Прикажи пречице:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Прикажи верзију" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Преузми датотеку" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Уреди команду" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Уреди сервер" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Кодирање" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Кодирање:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Изађи" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Напусти цео екран" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Пронађи" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Величина фонта:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Фонт:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Цео екран" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Цео екран:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Група" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Група:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Помоћ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Сакриј спуштајући терминал када није у фокусу" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Хоризонтална подела" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Хоризонтална подела:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Сучеље" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Иди на следећу команду" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Иди на следећу команду:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Иди на претходну команду" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Иди на претходну команду:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Учитај тему" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Максимализуј" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Име" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Име:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Нови прозор" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Нови радни простор" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Нови радни простор:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Следећи радни простор" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Следећи радни простор:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Нормалан прозор" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Прозирност:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Отвори" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Отвори у управнику података" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Отвори везу" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Отвори терминал са новом темом" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Отвори:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Опционо" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Лозинка" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Лозинка:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Убаци" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Убаци:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Путања" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Путања:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Молимо вас унесите нову пречицу" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Прикључак:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Претходни радни простор" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Претходни радни простор:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Програми још раде у терминалу" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Спуштајући режим" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Даљинско управљање" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Даљинско управљање:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Преименуј" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Промени наслов" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Промени наслов:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Неопходно" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Врати Подразумевано" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Покрени програм у терминалу" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Сачувај" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Клизање" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Клизај притиском на тастер" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Клизај по излазима" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Претражи" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Претражи:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Изабери" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Изабери све" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Изабери све:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Изабери директоријум за чување датотеке" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Изабери датотеку за отпремање" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Изабери леви прозор" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Изабери леви прозор:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Изабери доњи прозор" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Изабери доњи прозор:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Изабери десни прозор" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Изабери десни прозор:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Изабери датотеку са приватним кључем" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Изабери горњи прозор" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Изабери горњи прозор:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Изабери радни простор" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Име сервера" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Име сервера:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Постави почетни директоријум терминала" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Постави режим прозора терминала" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Подешавања" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Пречице" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Пречице:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Промени тему" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Терминал" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Цео екран" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Унеси путању за преузимање датотеке" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Отпреми" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Отпреми датотеку" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Користи при покретању:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Корисничко Име" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Корисничко име:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Верзија:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Вертикална подела" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Вертикална подела:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Добро дошли у Дипин Терминал, уверите се да су rz и sz команде инсталиране " -"на серверу пре коришћења десног клика за преузимање и отпремање датотека." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Прозор" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Радни простор" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Увеличај" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Увеличај:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Умањи" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Умањи:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/sv/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/sv/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/sv/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/sv/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Jonatan Nyberg, 2017 -# Maggie Liu , 2017 -# Joakim Nylén , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Joakim Nylén , 2019\n" -"Language-Team: Swedish (https://www.transifex.com/linuxdeepin/teams/3976/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Om" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Erkännanden" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Lägg till" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Lägg till kommando" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Lägg till server" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Lägg till kommando" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Lägg till server" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adress" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adress:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Advancerad" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Avancerade alternativ" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Är du säker på att du vill ta bort %1?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Avbryt" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Stäng andra fönster" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Stäng fönster" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Stäng arbetsyta" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Kommando" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopiera" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Pil" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Klipp ut" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin-terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Radera" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Avsluta" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Stäng fullskärm" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Fullskärm" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Hjälp" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Gränssnitt" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Maximera" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Namn" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Ny arbetsyta" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Nästa arbetsyta" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Öppna" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Lösenord" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Klistra in" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Föregående arbetsyta" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Byt namn" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Krävs" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Spara" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Skrolla" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Sök" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Välj" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Välj alla" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Inställningar" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Genvägar" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Terminal" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Användarnamn" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Version:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Fönster" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Arbetsyta" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Zooma in" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Zooma ut" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/ta/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ta/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ta/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ta/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,709 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Praveen Thangamuthu (பிரவீன்) , 2017 -# Muthuramalingam , 2017 -# dhasthagheer , 2017 -# Aravindan Aravind , 2017 -# vimalkumar , 2017 -# Buvanesh Kumar , 2017 -# Moganesswaran Panchanathan , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Moganesswaran Panchanathan , 2017\n" -"Language-Team: Tamil (https://www.transifex.com/linuxdeepin/teams/3976/ta/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ta\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "சேர்" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "நிறுத்து" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "சாளரத்தை மூடு" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "கட்டளை" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "படியெடு" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "இடஞ்சுட்டி" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "வெட்டு" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "அழி" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "வெளியேறுக" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "இடைமுகம்" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "பெயர்" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "திற" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "கடவுச்சொல்" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "ஒட்டு" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "சேமி" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "தேர்வு" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "அனைத்தையும் தெரிவுசெய்" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "அமைவுகள்" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "முனையம்" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "பயனர் " - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "சாரளம்" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "பணியிடம்" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/tr/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/tr/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/tr/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/tr/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,722 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Hadate Maluken , 2017 -# Sinan Eldem, 2017 -# Vahap Karataş , 2017 -# yakup , 2017 -# Ömer GÖK , 2017 -# Enes YAVUZ , 2017 -# meda , 2018 -# Kaya Zeren , 2019 -# Serdar Sağlam , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Serdar Sağlam , 2019\n" -"Language-Team: Turkish (https://www.transifex.com/linuxdeepin/teams/3976/tr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: tr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Komut tamamlandı, uçbirimden çıkmak için ENTER tuşuna basın." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Hakkında" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Emeği Geçenler" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Ekle" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Komut Ekle" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Sunucu Ekle" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Komut ekle" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Sunucu ekle" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Adres" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Adres:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Gelişmiş" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Gelişmiş seçenekler" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "%s ögesini silmek istediğinize emin misiniz?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Çıkmak istediğinize emin misiniz?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Geriye silme tuşu" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Geriye silme tuşu:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Temel" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Arkaplanı bulanıklaştır" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "İptal" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Sertifika" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Sertifika:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Diğer pencereleri kapat" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Diğer pencereleri kapat:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Pencereyi kapat" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Pencereyi kapat:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Çalışma alanını kapat" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Çalışma alanını kapat:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Komut" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Komut:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "İçerik" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Kopyala" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Bağlantıyı kopyala" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Seçildiğinde kopyala" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Kopyala:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "İmleç" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "İmleç otomatik gizlensin" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "İmleç yanıp sönmesi" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "İmleç biçemi:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Özel komutlar" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Özel komutlar:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Kes" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Deepin Uçbirim, birden fazla pencere, çalışma alanları, uzaktan yönetim, " -"Quake kipi gibi pek çok özelliği olan gelişmiş bir uçbirim uygulamasıdır." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Uçbirim" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin Uçbirim, çalışma alanı, birden fazla pencere, uzaktan yönetim, quake kipi gibi pek çok özelliği olan gelişmiş bir uçbirim uygulamasıdır.\n" -"\n" -"Komut satırı dünyasına odaklanmanızı sağlar!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Varsayılan boyut" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Varsayılan boyut:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Sil" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Komutu sil" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Anahtarı sil" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Anahtarı sil:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Sunucuyu sil" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Kısayolları görüntüle" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Kısayolları görüntüle:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Sürümü görüntüle" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Dosya indir" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Komutu Düzenle" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Sunucuyu Düzenle" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Kodlama" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Kodlama:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Çıkış" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Tam ekrandan çık" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Bul" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Yazı tipi boyutu:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Yazı tipi:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Tam ekran" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "Tam ekran:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Grup" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Grup:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Yardım" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Odakta olmadığında Quake penceresi gizlensin" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Yatay böl" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Yatay böl:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Arayüz" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Sonraki komuta atla" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Sonraki komuta atla:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Önceki komuta atla" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Önceki komuta atla:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Tema yükle" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Büyüt" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Ad" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Ad:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Yeni pencere" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Yeni çalışma alanı" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Yeni çalışma alanı:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Sonraki çalışma alanı" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Sonraki çalışma alanı:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Normal pencere" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Matlık:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Aç" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Dosya yöneticisinde aç" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Bağlantıyı aç" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Uçbirimi yeni bir tema ile aç" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Aç:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "İsteğe bağlı" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Parola" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Parola:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Yapıştır" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Yapıştır:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Yol" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Yol:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Lütfen yeni bir kısayol gir" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Port: " - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Önceki çalışma alanı" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Önceki çalışma alanı:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Uçbirimde hala çalışan programlar var" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Quake kipi" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Uzaktan yönetim" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Uzaktan yönetim:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Yeniden adlandır" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Başlığı yeniden adlandır" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Başlığı yeniden adlandır:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Zorunlu" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Varsayılanları Geri Yükle" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Uçbirimde bir program çalıştır" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Kaydet" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Kaydırma" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Tuşa basıldığında kaydır" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Çıktı geldiğinde kaydırılsın" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Ara" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Ara:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Seç" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Tümünü seç" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Tümünü seç:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Dosyanın kaydedileceği dizini seç" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Yüklenecek dosyayı seç" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Sol pencereyi seç" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Sol pencereyi seç:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Alt pencereyi seç" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Alt pencereyi seç:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Sağ pencereyi seç" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Sağ pencereyi seç:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Özel anahtar dosyasını seç" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Üst pencereyi seç" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Üst pencereyi seç:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Çalışma alanı seç" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Sunucu adı" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Sunucu adı:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Uçbirim başlangıç klasörünü ayarla" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Uçbirim pencere kipini ayarla" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Ayarlar" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Kısayollar" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Kısayollar:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Temayı değiştir" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Uçbirim" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Tam ekranı aç/kapat" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Dosyanın indirileceği yolu yazın" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Yükle" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Dosya yükle" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Başlangıçta kullan:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Kullanıcı Adı" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Kullanıcı adı:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Sürüm:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Dikey bölme" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Dikey bölme:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Deepin Uçbirim uygulamasına hoş geldiniz. Dosya yükleme ve indirme işlemleri" -" için sağ tıklamadan önce sunucuda rz ve sz komutlarının kurulu olduğundan " -"emin olun." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Pencere" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Çalışma alanı" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Yakınlıştır" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Yakınlaştır:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Uzaklaştır" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Uzaklaştır:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ug/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ug/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ug/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ug/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,705 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Ghelibe , 2017 -# مۇختەر مەخمۇت , 2017 -# Abdusalam Huxur <2250907458@qq.com>, 2018 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Abdusalam Huxur <2250907458@qq.com>, 2018\n" -"Language-Team: Uighur (https://www.transifex.com/linuxdeepin/teams/3976/ug/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ug\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "ھەققىدە" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "ئالىي" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "بىكار قىلىش" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "كۆزنەكنى تاقاش" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "كېسىش" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin تېرمىنالى" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "چېكىنىش" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "تولۇق ئېكران" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "ياردەم" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "ئۇلىنىش ئېغىزى" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "ئېچىش" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "ئىختىيارىي" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "چاپلاش" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "قايتا ئىسىم قويۇش" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "سۈكۈتتىكى ھالىتىگە قايتۇرۇش" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "ئىزدەش" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "تاللاش" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "ھەممىنى تاللاش" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/uk/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/uk/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/uk/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/uk/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,721 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# Vitalik Drozd , 2017 -# Roman , 2017 -# Yuriy Moskalchuk , 2017 -# Andriy Kyrylenko , 2017 -# Максим Назаренко , 2018 -# Yuri Chornoivan , 2019 -# Marck Hrin , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Marck Hrin , 2019\n" -"Language-Team: Ukrainian (https://www.transifex.com/linuxdeepin/teams/3976/uk/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: uk\n" -"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"Команда завершена, натисніть клавішу ENTER, щоб вийти з терміналу." - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Про програму" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "Підтвердження" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Додати" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "Додати команду" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "Додати сервер" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "Додати команду" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "Додати сервер" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "Адреса" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "Адреса:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Додаткове" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "Розширені параметри" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "Ви впевнені, що хочете видалити %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "Ви впевнені, що хочете вийти?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Клавіша Backspace" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Клавіша Backspace:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "Основний" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "Розмитий фон" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Скасувати" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "Сертифікат" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "Сертифікат:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Закрити інші вікна" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "Закрити інші вікна:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Закрити вікно" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "Закрити вікно" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Закрити робочий простір" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "Закрити робочий простір:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Команда" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "Команда:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "Вміст" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Копіювати" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "Копіювати посилання" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "Копіювати при позначенні" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "Копіювати:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Курсор" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "Автоматично приховувати курсор" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "Моргання курсору" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "Стиль курсору:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "Користувацькі команди" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "Користувацькі команди:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Вирізати" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"Термінал Deepin - це просунутий емулятор терміналу з багатовіконним " -"інтерфейсом, робочими просторами, віддаленим керуванням, випадаючим режимом " -"та іншими функціями." - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Термінал Deepin" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Термінал Deepin - це просунутий емулятор терміналу з багатовіконним інтерфейсом, робочими просторами, віддаленим керуванням, випадаючим режимом та іншими функціями.\n" -"\n" -"Він занурить вас у світ командного рядка!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "Стандартний розмір" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "Стандартний розмір:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Видалити" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "Видалити команду" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "Видалити ключ" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "Видалити ключ:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "Видалити сервер" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "Показати ярлики" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "Показати ярлики:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "Показати версію" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "Завантажити файл" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "Редагувати команду" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "Редагувати сервер" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "Кодування" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "Кодування:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Вихід" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Вийти з повноекранного режиму" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "Знайти" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "Розмір шрифту:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "Шрифт:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "На весь екран" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "На весь екран:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "Група" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "Група:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Допомога" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "Приховати вікно випадаючого Терміналу після втрати фокусу" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "Горизонтальний розподіл" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "Горизонтальний розподіл:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Інтерфейс" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "Перейти до наступної команди" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "Перейти до наступної команди:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "Перейти до попередньої команди" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "Перейти до попередньої команди:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "Завантажити тему" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Розгорнути" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "Назва" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "Ім'я:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "Нове вікно" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Новий робочий простір" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "Новий робочий простір:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Наступна робоча область" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "Наступна робоча область:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "Нормальне вікно" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "Непрозорість:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Відкрити" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "Відкрити у файловому менеджері" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "Відкрити посилання" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "Відкрийте термінал з новою темою" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "Відкрити:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "Необов'язково" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Пароль" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "Пароль:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Вставити" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "Вставити:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "Шлях" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "Шлях:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Будь ласка, введіть нове сполучення клавіш" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "Порт:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Попередній робочий простір" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "Попередній робочий простір:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "Програми все ще працюють у терміналі" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "Випадаючий режим" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "Дистанційне керування" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "Дистанційне керування:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "Перейменувати" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "Перейменувати назву" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "Перейменувати назву:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Вимагається" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "Відновити за замовчуванням" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "Запуск програми в терміналі" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Зберегти" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "Прогорнути" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "Прокручування натисканням клавіші" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "Прокручування при введенні" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Пошук" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "Пошук:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Обрати" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Вибрати все" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "Вибрати все:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "Виберіть директорію, щоб зберегти файл " - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "Вибрати файл для вивантаження" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "Вибрати ліве вікно" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "Вибрати ліве вікно:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "Вибрати нижнє вікно" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "Вибрати нижнє вікно:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "Вибрати праве вікно" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "Вибрати праве вікно:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "Вибрати файл приватного ключа" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "Вибрати верхнє вікно" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "Вибрати верхнє вікно:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "Вибрати робочу область" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "Ім'я серверу" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "Ім'я серверу:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "Встановити директорію запуску терміналу" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "Встановити режим вікна терміналу" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Налаштування" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Ярлики" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "Ярлики:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "Перемкнути тему" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Термінал" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "Ввімкнути повноекранний режим" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "Введіть шлях для завантаження файлу" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "Вивантажити" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "Вивантажити файл" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "Використовувати при запуску:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Ім'я користувача" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "Ім'я користувача:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Версія:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "Вертикальний розподіл" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "Вертикальний розподіл:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" -"Ласкаво просимо до Deepin Terminal, будь ласка, переконайтеся, що команди rz" -" і sz були встановлені на сервері, перш ніж клацнути правою кнопкою миші, " -"щоб надіслати та отримати файли." - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Вікно" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Робоча область" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Збільшити масштаб" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "Збільшити масштаб:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Зменшити масштаб" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "Зменшити масштаб:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/po/ur/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/ur/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/ur/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/ur/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,689 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# MUHAMMAD FAHAD IRSHAD , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-08 12:45+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: MUHAMMAD FAHAD IRSHAD , 2017\n" -"Language-Team: Urdu (https://www.transifex.com/linuxdeepin/teams/3976/ur/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ur\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../widget/terminal.vala:1241 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:332 ../widget/preference.vala:344 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure to delete" -msgstr "" - -#: ../widget/confirm_dialog.vala:131 -msgid "Are you sure to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:247 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:407 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:131 -#: ../widget/terminal.vala:576 ../widget/terminal.vala:604 -#: ../widget/terminal.vala:638 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:382 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:380 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "" - -#: ../widget/preference.vala:320 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:343 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "" - -#: ../widget/terminal.vala:347 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:302 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:347 -msgid "Cursor" -msgstr "" - -#: ../widget/preference.vala:372 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:371 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:199 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:443 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:603 -msgid "Deepin Terminal" -msgstr "" - -#: ../main.vala:189 ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:308 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:340 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:448 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:442 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:131 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "" - -#: ../widget/terminal.vala:392 -msgid "Exit fullscreen" -msgstr "" - -#: ../widget/terminal.vala:398 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:291 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:290 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:396 ../widget/terminal.vala:394 -msgid "Fullscreen" -msgstr "" - -#: ../widget/preference.vala:338 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Hide quake window after lost focus" -msgstr "" - -#: ../widget/terminal.vala:378 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:324 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:250 -msgid "Interface" -msgstr "" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:309 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:395 -msgid "Maximize" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "New theme terminal" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:386 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:319 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "" - -#: ../widget/preference.vala:322 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:394 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:136 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:360 ../widget/config_window.vala:306 -msgid "Open" -msgstr "" - -#: ../widget/terminal.vala:368 -msgid "Open in file manager" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:353 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "" - -#: ../widget/preference.vala:303 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:131 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:639 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:441 ../widget/terminal.vala:636 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:339 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:413 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:374 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:380 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:381 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:401 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "" - -#: ../widget/preference.vala:305 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:605 ../widget/file_button.vala:71 -msgid "Select" -msgstr "" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:603 -msgid "Select directory to save download file" -msgstr "" - -#: ../widget/terminal.vala:574 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:452 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:293 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/config_window.vala:358 -msgid "Switch fullscreen" -msgstr "" - -#: ../widget/terminal.vala:439 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:296 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Type path for download file" -msgstr "" - -#: ../widget/terminal.vala:578 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:447 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "صارف کا نام" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "" - -#: ../widget/terminal.vala:379 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:323 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1544 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:383 -msgid "Window" -msgstr "" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:313 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "" - -#: ../widget/preference.vala:307 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:787 ../widget/terminal.vala:1267 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/vi/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/vi/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/vi/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/vi/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,704 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# mousewis , 2017 -# Phạm Đông Giang , 2017 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Phạm Đông Giang , 2017\n" -"Language-Team: Vietnamese (https://www.transifex.com/linuxdeepin/teams/3976/vi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: vi\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "Giới thiệu" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "Thêm" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "Nâng cao" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "Hủy" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "Đóng cửa sổ khác" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "Đóng cửa sổ" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "Đóng không gian làm việc" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "Lệnh" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "Sao chép" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "Con trỏ" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "Cắt" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin Terminal" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "Xóa" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "Thoát" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "Thoát toàn màn hình" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "Đầy màn hình" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "Giúp đỡ" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "Giao diện" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "Phóng to" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "tên" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "Không gian làm việc mới" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "Không gian làm việc tiếp theo" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "Mở" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "Mật mã" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "Dán" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "Xin hãy đưa vào một phím tắt mới" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "Không gian làm việc trước" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "Cần thiết" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "Lưu" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "Tìm kiếm" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "Chọn" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "Chọn tất cả" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "Cài đặt" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "Phím tắt" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "Đầu cuối" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "Tên người dùng" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "Phiên bản:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "Cửa sổ" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "Không gian làm việc" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "Thu nhỏ" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "Phóng to" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/zh_CN/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/zh_CN/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/zh_CN/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/zh_CN/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# hualet , 2017 -# cxbii , 2017 -# Maggie Liu , 2017 -# Cindy0514, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Cindy0514, 2019\n" -"Language-Team: Chinese (China) (https://www.transifex.com/linuxdeepin/teams/3976/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"命令已经执行完成,请按回车退出终端。" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "关于" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "鸣谢" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "添加" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "添加命令" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "添加服务器" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "添加命令" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "添加服务器" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "地址" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "地址:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "高级设置" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "高级选项" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "您确定要删除%s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "您确定要退出吗?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "退格键" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "退格键:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "基础设置" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "背景模糊" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "取消" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "证书" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "证书:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "关闭其他窗口" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "关闭其他窗口:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "关闭窗口" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "关闭窗口:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "关闭工作区" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "关闭工作区:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "命令" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "命令:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "内容" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "复制" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "复制链接" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "选中文字时自动复制到剪切板" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "复制:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "光标" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "光标自动隐藏" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "光标闪烁" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "光标风格:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "自定义命令" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "自定义命令:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "剪切" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" -"深度终端是一款集工作区、多窗口、远程管理、雷神模式等功能的高级的终端模拟器。\n" -"\n" -"深度终端, 让您更专注于命令行世界!" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "深度终端" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"深度终端是一款集工作区、多窗口、远程管理、雷神模式等功能的高级的终端模拟器。\n" -"\n" -"深度终端, 让您更专注于命令行世界!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "默认大小" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "默认大小:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "删除" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "删除命令" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "删除键" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "删除键:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "删除服务器" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "显示快捷键" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "显示快捷键:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "显示版本" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "下载文件" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "编辑命令" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "编辑服务器" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "编码方式" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "编码方式:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "退出" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "退出全屏" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "查找" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "字体大小:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "字体:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "全屏" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "全屏:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "分组" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "分组:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "帮助" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "丢失焦点后隐藏雷神窗口" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "横向分屏" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "横向分屏:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "界面" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "跳转到下一个命令" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "跳转到下一个命令:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "跳转到上一个命令" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "跳转到上一个命令:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "加载主题" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "最大化" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "名称" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "名称:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "新建窗口" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "新建工作区" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "新建工作区:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "下一个工作区" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "下一个工作区:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "正常窗口" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "透明度:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "打开" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "在文件管理器中打开" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "打开链接" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "新建主题终端" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "打开:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "选填" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "密码" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "密码:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "粘贴" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "粘贴:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "路径" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "路径:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "请输入新的快捷键" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "端口:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "上一个工作区" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "上一个工作区:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "终端仍然有程序在运行" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "雷神模式" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "远程管理" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "远程管理:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "重命名" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "重命名标题" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "重命名标题:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "必填" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "恢复默认" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "在终端运行一个程序" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "保存" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "滚动" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "按键时滚动" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "输出时滚动" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "搜索" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "搜索:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "选择" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "全选" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "全选:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "选择下载文件的保存目录" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "选择要上传的文件" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "选择左边的窗口" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "选择左边的窗口:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "选择下面的窗口" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "选择下面的窗口:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "选择右边的窗口" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "选择右边的窗口:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "选择私钥文件" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "选择上面的窗口" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "选择上面的窗口:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "选择工作区" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "服务器名" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "服务器名:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "设置终端的启动目录" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "设置终端的窗口模式" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "设置" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "快捷键" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "快捷键:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "切换主题" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "终端" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "切换全屏" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "请输入下载文件的路径" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "上传" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "上传文件" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "启动时使用:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "用户名" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "用户名:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "版本:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "纵向分屏" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "纵向分屏:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "欢迎使用深度终端, 在您使用右键菜单进行上传和下载文件之前, 请先确保服务器已经安装了rz和sz命令。" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "窗口" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "工作区" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "放大" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "放大:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "缩小" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "缩小:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "深度" diff -Nru deepin-terminal-5.0.0+ds1/po/zh_HK/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/zh_HK/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/zh_HK/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/zh_HK/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,712 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# nigelinux , 2017 -# tomoe_musashi , 2017 -# Tam Chun Kit , 2017 -# spions kwong, 2017 -# Chi-Hsun Tsai, 2017 -# Michelle Lam , 2017 -# Philip CHEUNG, 2017 -# iceleaf , 2017 -# 李洪武 , 2017 -# Tony Wong, 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: Tony Wong, 2019\n" -"Language-Team: Chinese (Hong Kong) (https://www.transifex.com/linuxdeepin/teams/3976/zh_HK/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_HK\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "關於" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "新增時間:" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "進階" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "基本" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "取消" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "關閉視窗" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "關閉工作區" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "命令" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "複製" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "鼠標" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "剪下" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin 終端機" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "刪除" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "" - -#: ../main.vala:128 -msgid "Display version" -msgstr "" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "編號" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "離開" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "離開全螢幕" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "全螢幕" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "協助" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "介面" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "最大化" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "名稱" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "下一個工作區" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "開啟" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "密碼" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "貼上" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "路徑:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "上一個工作區" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "重命名" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "恢復預設值" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "儲存" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "滑鼠滾輪" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "搜尋" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "選擇" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "選擇全部" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "設置" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "捷徑" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "終端機" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "用戶名稱" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "版本:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "視窗" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "工作區" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "拉近" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "拉遠" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "" diff -Nru deepin-terminal-5.0.0+ds1/po/zh_TW/LC_MESSAGES/deepin-terminal.po deepin-terminal-5.4.13/po/zh_TW/LC_MESSAGES/deepin-terminal.po --- deepin-terminal-5.0.0+ds1/po/zh_TW/LC_MESSAGES/deepin-terminal.po 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/po/zh_TW/LC_MESSAGES/deepin-terminal.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -# Translators: -# Maggie Liu , 2017 -# iceleaf , 2017 -# LNDDYL, 2017 -# 李洪武 , 2017 -# 凡凡不想平凡 , 2017 -# Julian Lai , 2018 -# byStarTW (pan93412) , 2019 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-26 13:06+0800\n" -"PO-Revision-Date: 2017-02-04 05:38+0000\n" -"Last-Translator: byStarTW (pan93412) , 2019\n" -"Language-Team: Chinese (Taiwan) (https://www.transifex.com/linuxdeepin/teams/3976/zh_TW/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_TW\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../widget/terminal.vala:1214 -msgid "" -"\n" -"Command has been completed, press ENTER to exit the terminal." -msgstr "" -"\n" -"命令已完成,按 ENTER 離開終端機。" - -#: ../widget/appbar.vala:129 -msgid "About" -msgstr "關於" - -#: ../widget/about_widget.vala:81 -msgid "Acknowledgments" -msgstr "鳴謝" - -#: ../widget/remote_server_dialog.vala:352 ../widget/command_dialog.vala:197 -msgid "Add" -msgstr "加入" - -#: ../widget/command_dialog.vala:126 -msgid "Add Command" -msgstr "加入命令" - -#: ../widget/remote_server_dialog.vala:154 -msgid "Add Server" -msgstr "加入伺服器" - -#: ../widget/command_panel.vala:311 -msgid "Add command" -msgstr "加入命令" - -#: ../widget/remote_panel.vala:468 -msgid "Add server" -msgstr "加入伺服器" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Address" -msgstr "位址" - -#: ../widget/remote_server_dialog.vala:190 -msgid "Address:" -msgstr "位址:" - -#: ../widget/preference_slidebar.vala:74 ../widget/preference_slidebar.vala:81 -#: ../widget/preference.vala:334 ../widget/preference.vala:346 -#: ../widget/config_window.vala:366 -msgid "Advanced" -msgstr "進階" - -#: ../widget/remote_server_dialog.vala:337 -msgid "Advanced options" -msgstr "進階選項" - -#: ../widget/remote_server_dialog.vala:426 ../widget/command_dialog.vala:249 -msgid "Are you sure you want to delete %s?" -msgstr "確定刪除 %s?" - -#: ../widget/confirm_dialog.vala:130 -msgid "Are you sure you want to exit?" -msgstr "確定退出?" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Backspace key" -msgstr "Backspace 鍵" - -#: ../widget/remote_server_dialog.vala:321 -msgid "Backspace key:" -msgstr "Backspace 鍵:" - -#: ../widget/preference_slidebar.vala:55 ../widget/preference.vala:249 -msgid "Basic" -msgstr "基本" - -#: ../widget/preference.vala:410 -msgid "Blur background" -msgstr "模糊背景" - -#: ../widget/remote_server_dialog.vala:347 -#: ../widget/remote_server_dialog.vala:427 ../widget/confirm_dialog.vala:130 -#: ../widget/terminal.vala:590 ../widget/terminal.vala:618 -#: ../widget/terminal.vala:652 ../widget/file_button.vala:69 -#: ../widget/command_dialog.vala:192 ../widget/command_dialog.vala:250 -msgid "Cancel" -msgstr "取消" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Certificate" -msgstr "憑證檔案" - -#: ../widget/remote_server_dialog.vala:261 -msgid "Certificate:" -msgstr "憑證檔案:" - -#: ../widget/terminal.vala:387 ../widget/config_window.vala:343 -msgid "Close other windows" -msgstr "關閉其他視窗" - -#: ../widget/preference.vala:332 -msgid "Close other windows:" -msgstr "關閉其他視窗:" - -#: ../widget/terminal.vala:385 ../widget/config_window.vala:342 -msgid "Close window" -msgstr "關閉視窗" - -#: ../widget/preference.vala:331 -msgid "Close window:" -msgstr "關閉視窗:" - -#: ../widget/config_window.vala:331 -msgid "Close workspace" -msgstr "關閉工作區" - -#: ../widget/preference.vala:322 -msgid "Close workspace:" -msgstr "關閉工作區:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Command" -msgstr "命令" - -#: ../widget/remote_server_dialog.vala:295 ../widget/command_dialog.vala:172 -msgid "Command:" -msgstr "命令:" - -#: ../widget/command_dialog.vala:83 -msgid "Content" -msgstr "內容" - -#: ../widget/terminal.vala:347 ../widget/config_window.vala:304 -#: ../widget/entry_menu.vala:39 -msgid "Copy" -msgstr "複製" - -#: ../widget/terminal.vala:352 -msgid "Copy link" -msgstr "複製連結" - -#: ../widget/preference.vala:375 -msgid "Copy on select" -msgstr "選取時複製" - -#: ../widget/preference.vala:304 -msgid "Copy:" -msgstr "複製:" - -#: ../widget/preference_slidebar.vala:84 ../widget/preference.vala:349 -msgid "Cursor" -msgstr "游標" - -#: ../widget/preference.vala:374 -msgid "Cursor autohide" -msgstr "自動隱藏游標" - -#: ../widget/preference.vala:373 -msgid "Cursor blink" -msgstr "游標閃爍" - -#: ../widget/preference.vala:200 -msgid "Cursor style:" -msgstr "游標樣式:" - -#: ../widget/terminal.vala:448 ../widget/config_window.vala:360 -#: ../widget/appbar.vala:122 -msgid "Custom commands" -msgstr "自訂命令" - -#: ../widget/preference.vala:343 -msgid "Custom commands:" -msgstr "自訂命令:" - -#: ../widget/entry_menu.vala:38 -msgid "Cut" -msgstr "剪下" - -#: ../main.vala:189 -msgid "" -"Deepin Teminal is an advanced terminal emulator with window-splitting, " -"workspaces, remote management, Quake mode and other features." -msgstr "Deepin 終端機是個進階的終端模擬器,具備視窗切割、工作區、遠端管理、雷神模式等其他功能。" - -#: ../main.vala:188 ../widget/about_widget.vala:101 ../widget/tabbar.vala:610 -msgid "Deepin Terminal" -msgstr "Deepin 終端機" - -#: ../widget/about_widget.vala:49 -msgid "" -"Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n" -"\n" -"It sharpens your focus in the world of command line!" -msgstr "" -"Deepin 終端機是一款進階的終端機模擬器,具備工作區、視窗切割、遠端管理、雷神模式等功能。\n" -"\n" -"Deepin 終端機讓你專注在命令列世界!" - -#: ../widget/config_window.vala:310 -msgid "Default size" -msgstr "預設大小" - -#: ../widget/preference.vala:310 -msgid "Default size:" -msgstr "預設大小:" - -#: ../widget/remote_server_dialog.vala:428 ../widget/command_dialog.vala:251 -#: ../widget/entry_menu.vala:44 -msgid "Delete" -msgstr "刪除" - -#: ../widget/command_dialog.vala:238 ../widget/command_dialog.vala:248 -msgid "Delete command" -msgstr "刪除命令" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Delete key" -msgstr "刪除鍵" - -#: ../widget/remote_server_dialog.vala:334 -msgid "Delete key:" -msgstr "刪除鍵:" - -#: ../widget/remote_server_dialog.vala:415 -#: ../widget/remote_server_dialog.vala:425 -msgid "Delete server" -msgstr "刪除伺服器" - -#: ../widget/config_window.vala:359 -msgid "Display shortcuts" -msgstr "顯示快速鍵" - -#: ../widget/preference.vala:342 -msgid "Display shortcuts:" -msgstr "顯示快速鍵:" - -#: ../main.vala:128 -msgid "Display version" -msgstr "顯示版本" - -#: ../widget/terminal.vala:453 -msgid "Download file" -msgstr "下載檔案" - -#: ../widget/command_dialog.vala:124 -msgid "Edit Command" -msgstr "編輯命令" - -#: ../widget/remote_server_dialog.vala:152 -msgid "Edit Server" -msgstr "編輯伺服器" - -#: ../widget/remote_server_dialog.vala:107 ../widget/terminal.vala:447 -msgid "Encoding" -msgstr "編碼方式" - -#: ../widget/remote_server_dialog.vala:308 -msgid "Encoding:" -msgstr "編碼方式:" - -#: ../widget/confirm_dialog.vala:130 ../widget/appbar.vala:130 -msgid "Exit" -msgstr "離開" - -#: ../widget/terminal.vala:397 -msgid "Exit fullscreen" -msgstr "結束全螢幕" - -#: ../widget/terminal.vala:403 -msgid "Find" -msgstr "搜尋" - -#: ../widget/preference.vala:293 -msgid "Font size:" -msgstr "字型大小:" - -#: ../widget/preference.vala:292 -msgid "Font:" -msgstr "字型:" - -#: ../widget/preference.vala:399 ../widget/terminal.vala:399 -msgid "Fullscreen" -msgstr "全螢幕" - -#: ../widget/preference.vala:340 -msgid "Fullscreen:" -msgstr "全螢幕:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Group" -msgstr "分組" - -#: ../widget/remote_server_dialog.vala:277 -msgid "Group:" -msgstr "分組:" - -#: ../widget/appbar.vala:127 -msgid "Help" -msgstr "說明" - -#: ../widget/preference.vala:403 -msgid "Hide Quake window after losing focus" -msgstr "失去焦點時隱藏雷神視窗" - -#: ../widget/terminal.vala:383 ../widget/config_window.vala:337 -msgid "Horizontal split" -msgstr "水平分割" - -#: ../widget/preference.vala:326 -msgid "Horizontal split:" -msgstr "水平分割:" - -#: ../widget/preference_slidebar.vala:58 ../widget/preference.vala:252 -msgid "Interface" -msgstr "界面" - -#: ../widget/config_window.vala:312 -msgid "Jump to next command" -msgstr "跳到下個命令" - -#: ../widget/preference.vala:311 -msgid "Jump to next command:" -msgstr "跳到下個命令:" - -#: ../widget/config_window.vala:313 -msgid "Jump to previous command" -msgstr "跳到上個命令" - -#: ../widget/preference.vala:312 -msgid "Jump to previous command:" -msgstr "跳到上個命令:" - -#: ../main.vala:182 -msgid "Load theme" -msgstr "載入主題" - -#: ../widget/preference.vala:398 -msgid "Maximize" -msgstr "最大化視窗" - -#: ../widget/command_dialog.vala:83 -msgid "Name" -msgstr "名稱" - -#: ../widget/command_dialog.vala:159 -msgid "Name:" -msgstr "名稱:" - -#: ../widget/appbar.vala:120 -msgid "New window" -msgstr "新增視窗" - -#: ../widget/terminal.vala:391 ../widget/config_window.vala:330 -msgid "New workspace" -msgstr "新增工作區" - -#: ../widget/preference.vala:321 -msgid "New workspace:" -msgstr "新增工作區:" - -#: ../widget/config_window.vala:332 -msgid "Next workspace" -msgstr "切換到下個工作區" - -#: ../widget/preference.vala:324 -msgid "Next workspace:" -msgstr "切換到下個工作區:" - -#: ../widget/preference.vala:397 -msgid "Normal window" -msgstr "正常視窗" - -#: ../widget/preference.vala:137 -msgid "Opacity:" -msgstr "不透明度:" - -#: ../widget/terminal.vala:365 ../widget/config_window.vala:306 -msgid "Open" -msgstr "開啟" - -#: ../widget/terminal.vala:373 -msgid "Open in file manager" -msgstr "在檔案管理器中開啟" - -#: ../widget/terminal.vala:351 -msgid "Open link" -msgstr "開啟連結" - -#: ../widget/config_window.vala:335 -msgid "Open terminal with a new theme" -msgstr "開啟套用新主題的終端機" - -#: ../widget/preference.vala:306 -msgid "Open:" -msgstr "開啟:" - -#: ../widget/remote_server_dialog.vala:275 -#: ../widget/remote_server_dialog.vala:285 -#: ../widget/remote_server_dialog.vala:294 -msgid "Optional" -msgstr "選填" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Password" -msgstr "密碼" - -#: ../widget/remote_server_dialog.vala:247 -msgid "Password:" -msgstr "密碼:" - -#: ../widget/terminal.vala:358 ../widget/config_window.vala:305 -#: ../widget/entry_menu.vala:41 -msgid "Paste" -msgstr "貼上" - -#: ../widget/preference.vala:305 -msgid "Paste:" -msgstr "貼上:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Path" -msgstr "路徑" - -#: ../widget/remote_server_dialog.vala:286 -msgid "Path:" -msgstr "路徑:" - -#: ../widget/shortcut_entry.vala:147 -msgid "Please enter a new shortcut" -msgstr "請輸入新快速鍵" - -#: ../widget/remote_server_dialog.vala:199 -msgid "Port:" -msgstr "通訊埠:" - -#: ../widget/config_window.vala:333 -msgid "Previous workspace" -msgstr "切換到上個工作區" - -#: ../widget/preference.vala:323 -msgid "Previous workspace:" -msgstr "切換到上個工作區:" - -#: ../widget/confirm_dialog.vala:130 -msgid "Programs are still running in terminal" -msgstr "多個程式仍在執行" - -#: ../main.vala:173 -msgid "Quake mode" -msgstr "雷神模式" - -#: ../widget/terminal.vala:449 ../widget/config_window.vala:361 -#: ../widget/appbar.vala:123 -msgid "Remote management" -msgstr "遠端管理" - -#: ../widget/preference.vala:344 -msgid "Remote management:" -msgstr "遠端管理:" - -#: ../widget/terminal.vala:653 -msgid "Rename" -msgstr "重新命名" - -#: ../widget/terminal.vala:446 ../widget/terminal.vala:650 -#: ../widget/config_window.vala:357 -msgid "Rename title" -msgstr "重命名分頁" - -#: ../widget/preference.vala:341 -msgid "Rename title:" -msgstr "重命名分頁:" - -#: ../widget/remote_server_dialog.vala:186 -#: ../widget/remote_server_dialog.vala:196 -#: ../widget/remote_server_dialog.vala:232 ../widget/command_dialog.vala:158 -#: ../widget/command_dialog.vala:171 -msgid "Required" -msgstr "必須" - -#: ../widget/preference.vala:416 -msgid "Restore Defaults" -msgstr "還原至預設值" - -#: ../main.vala:155 ../main.vala:164 -msgid "Run a program in the terminal" -msgstr "於終端機執行程式" - -#: ../widget/remote_server_dialog.vala:350 ../widget/command_dialog.vala:195 -msgid "Save" -msgstr "儲存" - -#: ../widget/preference_slidebar.vala:87 ../widget/preference.vala:377 -msgid "Scroll" -msgstr "捲動" - -#: ../widget/preference.vala:383 -msgid "Scroll on keystroke" -msgstr "點擊鍵盤時捲動" - -#: ../widget/preference.vala:384 -msgid "Scroll on output" -msgstr "輸出時捲動" - -#: ../widget/terminal.vala:406 ../widget/search_entry.vala:64 -#: ../widget/search_entry.vala:66 ../widget/config_window.vala:307 -msgid "Search" -msgstr "搜尋" - -#: ../widget/preference.vala:307 ../widget/remote_panel.vala:357 -#: ../widget/command_panel.vala:201 -msgid "Search:" -msgstr "搜尋:" - -#: ../widget/terminal.vala:619 ../widget/file_button.vala:71 -msgid "Select" -msgstr "選擇" - -#: ../widget/config_window.vala:311 ../widget/entry_menu.vala:47 -msgid "Select all" -msgstr "全選" - -#: ../widget/preference.vala:313 -msgid "Select all:" -msgstr "全選:" - -#: ../widget/terminal.vala:617 -msgid "Select directory to save the file" -msgstr "選擇檔案儲存路徑" - -#: ../widget/terminal.vala:588 -msgid "Select file to upload" -msgstr "選擇要上傳的檔案" - -#: ../widget/config_window.vala:340 -msgid "Select left window" -msgstr "選擇左側視窗" - -#: ../widget/preference.vala:329 -msgid "Select left window:" -msgstr "選擇左側視窗:" - -#: ../widget/config_window.vala:339 -msgid "Select lower window" -msgstr "選擇底部視窗" - -#: ../widget/preference.vala:328 -msgid "Select lower window:" -msgstr "選擇底部視窗:" - -#: ../widget/config_window.vala:341 -msgid "Select right window" -msgstr "選擇右側視窗" - -#: ../widget/preference.vala:330 -msgid "Select right window:" -msgstr "選擇右側視窗:" - -#: ../widget/file_button.vala:67 -msgid "Select the private key file" -msgstr "選擇私鑰檔案" - -#: ../widget/config_window.vala:338 -msgid "Select upper window" -msgstr "選擇頂部視窗" - -#: ../widget/preference.vala:327 -msgid "Select upper window:" -msgstr "選擇頂部視窗:" - -#: ../widget/config_window.vala:334 -msgid "Select workspace" -msgstr "選擇工作區" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Server name" -msgstr "伺服器名稱" - -#: ../widget/remote_server_dialog.vala:187 -msgid "Server name:" -msgstr "伺服器名稱:" - -#: ../main.vala:137 -msgid "Set the terminal startup directory" -msgstr "設定終端機的啟動目錄" - -#: ../main.vala:119 -msgid "Set the terminal window mode" -msgstr "設定終端機的視窗模式" - -#: ../widget/terminal.vala:457 ../widget/appbar.vala:125 -msgid "Settings" -msgstr "設定" - -#: ../widget/preference_slidebar.vala:65 ../widget/preference.vala:295 -#: ../widget/command_dialog.vala:83 -msgid "Shortcuts" -msgstr "快速鍵" - -#: ../widget/command_dialog.vala:180 -msgid "Shortcuts:" -msgstr "快速鍵:" - -#: ../widget/terminal.vala:444 ../widget/appbar.vala:121 -msgid "Switch theme" -msgstr "更換主題" - -#: ../widget/preference_slidebar.vala:68 ../widget/preference.vala:298 -#: ../widget/config_window.vala:318 -msgid "Terminal" -msgstr "終端機" - -#: ../widget/config_window.vala:358 -msgid "Toggle fullscreen" -msgstr "切換全螢幕" - -#: ../widget/terminal.vala:631 -msgid "Type path to download file" -msgstr "輸入位置以下載檔案" - -#: ../widget/terminal.vala:592 -msgid "Upload" -msgstr "上傳" - -#: ../widget/terminal.vala:452 -msgid "Upload file" -msgstr "上傳檔案" - -#: ../widget/preference.vala:400 -msgid "Use on starting:" -msgstr "啟動時使用:" - -#: ../widget/remote_server_dialog.vala:107 -msgid "Username" -msgstr "使用者名稱" - -#: ../widget/remote_server_dialog.vala:233 -msgid "Username:" -msgstr "使用者名稱:" - -#: ../widget/about_widget.vala:105 -msgid "Version:" -msgstr "版本:" - -#: ../widget/terminal.vala:384 ../widget/config_window.vala:336 -msgid "Vertical split" -msgstr "垂直分割" - -#: ../widget/preference.vala:325 -msgid "Vertical split:" -msgstr "垂直分割:" - -#: ../widget/terminal.vala:1519 -msgid "" -"Welcome to Deepin Terminal, please make sure that rz and sz commands have " -"been installed in the server before right clicking to upload and download " -"files." -msgstr "歡迎使用 Deepin 終端機,使用右鍵點擊上傳和下載檔案前,請確認伺服器已安裝 rz 和 sz 指令。" - -#: ../widget/preference_slidebar.vala:90 ../widget/preference.vala:386 -msgid "Window" -msgstr "視窗" - -#: ../widget/preference_slidebar.vala:71 ../widget/preference.vala:315 -#: ../widget/config_window.vala:348 -msgid "Workspace" -msgstr "工作區" - -#: ../widget/config_window.vala:308 -msgid "Zoom in" -msgstr "放大" - -#: ../widget/preference.vala:308 -msgid "Zoom in:" -msgstr "放大:" - -#: ../widget/config_window.vala:309 -msgid "Zoom out" -msgstr "縮小" - -#: ../widget/preference.vala:309 -msgid "Zoom out:" -msgstr "縮小:" - -#: ../widget/terminal.vala:792 ../widget/terminal.vala:1240 -msgid "deepin" -msgstr "deepin" diff -Nru deepin-terminal-5.0.0+ds1/.project.json deepin-terminal-5.4.13/.project.json --- deepin-terminal-5.0.0+ds1/.project.json 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/.project.json 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,6 @@ + { + "type": "homebrew", + "3rdparty": ["./3rdparty"], + "ignore": [".git", "translations", "debian", "color-schemes", "kb-layouts", "LineFont.src", "CMakeLists.txt.user", "README", "README.md", "CHANGELOG", "COPYING-CMAKE-SCRIPTS", "LICENSE", "LICENSE.*", "*.keytab", "*.spec", "*.cmake", "*.desktop", "./.tx", "*.qrc", "*.svg", "*.png", "*.qm", "*.ts"], + "license": ["GPLv3"] + } diff -Nru deepin-terminal-5.0.0+ds1/project_path.c.in deepin-terminal-5.4.13/project_path.c.in --- deepin-terminal-5.0.0+ds1/project_path.c.in 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/project_path.c.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2016 Deepin, Inc. - * 2011 ~ 2016 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include - -char* project_path() { - return @@PROJECT_PATH@@; -} diff -Nru deepin-terminal-5.0.0+ds1/README.md deepin-terminal-5.4.13/README.md --- deepin-terminal-5.0.0+ds1/README.md 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/README.md 2021-09-01 02:11:44.000000000 +0000 @@ -1,189 +1,76 @@ # Deepin Terminal -This is default terminal emulation application for Deepin. +Deepin Terminal is an advanced terminal emulator with workspace , multiple windows, remote management, quake mode and other features. ## Dependencies -In debian, use below command to install compile dependencies: +### Build dependencies +* cmake +* pkg-config +* Qt5(>= 5.7.1) with modules: + - qtbase5-dev + - qtbase5-private-dev + - qttools5-dev-tools +* libdtkwidget-dev(>=5.2.2) with modules: + - dtkcore-dev + - dtkwidget-dev + - dtkgui-dev +* lxqt-build-tools(>= 0.6.0) +* libdframeworkdbus-dev +* libutf8proc-dev +* libatspi2.0-dev +* libglib2.0-dev +* libsecret-1-dev -`sudo apt-get install valac cmake g++ intltool libgtk-3-dev libgee-0.8-dev libjson-glib-dev libsecret-1-dev libwnck-3-dev librsvg2-dev libreadline-dev libpcre2-dev gobject-introspection libgirepository1.0-dev gperf libxml2-utils` - -In debian, use below command to install running dependencies: - -`sudo apt-get install libatk1.0-0 libc6 libcairo-gobject2 libcairo2 libfontconfig1 libgdk-pixbuf2.0-0 libgee-0.8-2 libglib2.0-0 libgnutls30 libgtk-3-0 libice6 libjson-glib-1.0-0 libpango-1.0-0 libpangocairo-1.0-0 libpcre2-8-0 libreadline7 librsvg2-2 libsecret-1-0 libsm6 libstdc++6 libtinfo5 libwnck-3-0 libx11-6 libxext6 zlib1g lrzsz expect deepin-menu` +## Installation -And you also need the [`deepin-menu`](https://github.com/linuxdeepin/deepin-menu) package. +### Build from source code -## Installation +1. Make sure you have installed all dependencies, you can use the following command. +``` +$ cd deepin-terminal +$ sudo apt build-dep . +``` -`mkdir build; cd build; cmake ..; make; ./deepin-terminal` +2. Build: +``` +$ cd deepin-terminal +$ mkdir build +$ cd build +$ cmake .. +$ make +``` -Tip: Use `cmake ../ -DUSE_VENDOR_LIB=off` if you don't want to use the vendor lib. +3. Install: +``` +$ sudo make install +``` -## Usage +The executable binary file could be found at `/usr/bin/deepin-terminal` after the installation is finished. -Below is keymap list for deepin-terminal: +### Other distro -| Function | Shortcut | -|---------------------------------|---------------------------------------------------------| -| Copy | Ctrl + Shift + c | -| Paste | Ctrl + Shift + v | -| Select word | Double click | -| Open URL | Ctrl + LeftButton | -| Search | Ctrl + Shfit + f | -| Zoom in | Ctrl + = | -| Zoom out | Ctrl + - | -| Default size | Ctrl + 0 | -| Select all | Ctrl + Shift + a | -| | -| New workspace | Ctrl + Shift + t | -| Close workspace | Ctrl + Shift + w | -| Next workspace | Ctrl + Tab | -| Preview workspace | Ctrl + Shfit + Tab | -| Select workspace with number | Alt + number | -| Resize workspace | Ctrl + Alt + Arrow Key | -| Vertical split | Ctrl + Shift + j | -| Horizontal split | Ctrl + Shfit + h | -| Select upper window | Alt + k | -| Select lower window | Alt + j | -| Select left window | Alt + h | -| Select right window | Alt + l | -| Close window | Ctrl + Alt + q | -| Close other windows | Ctrl + Shift + q | -| Create new theme window | Ctrl + Alt + number | -| | -| Switch fullscreen | F11 | -| Adjust background opacity | Ctrl + ScrollButton | -| Display shortcuts | Ctrl + Shift + ? | -| Custom commands | Ctrl + \[ | -| Remote management | Ctrl + / | +CMake will tell you which package you are missing. ## Config file -Terminal's configure save at: + +* Terminal Settings's configure save at:
~/.config/deepin/deepin-terminal/config.conf -Remote servers' configure save at: +* Remote Servers' configure save at:
~/.config/deepin/deepin-terminal/server-config.conf -Customize command's configure save at: +* Custom Command's configure save at:
~/.config/deepin/deepin-terminal/command-config.conf -## Advanced config -#### cursor_shape -Cursor shape type, can set with 'block', 'ibeam', 'underline', default is block type. - -#### cursor_blink_mode -Whether blink cursor, the default is true, set with false will improve performance though decrease repaint times. - -#### cursor_auto_hide -Whether auto hide cursor when don't type in terminal, this default option is false. - -#### scroll_on_key -Scroll terminal when type something in terminal, this option the default is true. - -#### scroll_on_output -Scroll terminal when have new output, this default option is false, please don't enable this option, it's nosing. - -#### scroll_line -The line of terminal can scroll back, default is -1, mean save all history, don't stripe terminal output. - -#### use_on_starting -The window status at start, can set with 'window', 'maximize' and 'fullscreen', default is 'window'. - -#### blur_background -Whether blur terminal's background, blur feature provide by DDE's window manager -- deepin-wm, default set false for better performance. - -#### window_width -Window width when start, this option is record when you adjust window size. -Of course, you can set it manually. - -#### window_height -Window height when start, this option is record when you adjust window size. -Of course, you can set it manually. - -#### quake_window_height -The max height of quake terminal, set it with 1.0 can make quake window with any height you like. - -#### quake_window_fullscreen -Whether make quake window use fullscreen mode, default is false. - -#### remote_commands -Remote command list to help deepin-terminal detect current environment whether in remote server, default is zssh. -You can add new command in list, command separator use character ; -like remote_commands=zssh;new_command;another_command; - -#### hide_quakewindow_after_lost_focus -Hide quake window after lost keyboard focus immediately, default is false to keep quake window even lost keyboard focus. -Anyway, feel free to turn this option if you more like quake window hide after lost keyboard focus. - -#### show_quakewindow_tab -Whether show tabbar in quake terminal, the default is true. It's cool if you don't like tabbar in quake terminal. - -#### follow_active_window -Create new terminal in active monitor when this option set as true, create new terminal with cursor place when this option set as false. - -#### hide_quakewindow_when_active -Just hide quake window when cursor is active when this option is true, if cursor is inactive, press quake-terminal keystroke will focus quake window first, and hide quake-terminal when press quake-temrinal keystroke again. -This behaviour help user jump back to quake-terminal quickly. -It's feel free to turn off this feature if you just like to toggle quake-terminal when you press quake-terminal keystroke. - -#### print_notify_after_script_finish -Press notify after you use terminal execute script finish, terminal won't exit until you press key, this feature useful to watch script execute result. -The default is true, feel free to turn off this option if you know script's result exactly. - -#### run_as_login_shell -Run shell as login_shell, default is false. - -#### show_highlight_frame -Show highlight frame when you focus on terminal window, notify user cursor place. -this default option is false, because it's too nosing to me. - -#### copy_on_select -Copy select text to system clipboard directly if you turn on this option, i think many XShell users like this. ;) -This optoin default is false, because it's linux style. ;) - -#### bold_is_bright -Checks whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact. -Some people may miss the matrix look-n-feel with the default theme since this value used to be `true` by default, now it's `false` by default. - -#### tabbar_at_the_bottom -Some tiling WM user may prefer let the tabbar at the window bottom, set `tabbar_at_the_bottom` to `true` will do this for ya, default is `false`. - -#### audible_bell -Controls whether or not the terminal will beep when the child outputs the "bl" sequence. Default is `false`. - -#### always_hide_resize_grip -When you are using deepin-terminal with not composited window manager, there will be a resize grip line at the bottom of the window for resizing the window. To disable the extra resize grip line, set `always_hide_resize_grip` to true. - -## Customize themes -User can place its own theme file to `~/.config/deepin/deepin-terminal/themes` (create if path not exist), the theme file added to this location will available to use from the theme selection panel. - -## Customize search engine -Deepin terminal build-in many search engine for engineer, such as Google, Bing, Baidu, GitHub, Stackover Flow, DuckDuckGo. -Anyway, if you want build your own search engine, just follow below command: -* Create config file ~/.config/deepin/deepin-terminal/search-engine-config.conf with below content: - -``` -[flickr] -name=Flickr -api=https://www.flickr.com/search/?text=%s - -[googleimage] -name=Google Image -api=http://images.google.com/search?q=%s -``` - -* Content in [] is searchengine name, use by terminal for id search. - -* name mean human name of search engine, you can name it to anything you like +## Usage -* api mean search api for search engine, note, you need use %s replace search keyword, otherwise, deepin-terminal don't know how to concat search api url and search keyboard. +Execute `deepin-terminal -h` to get more details. ## Getting help Any usage issues can ask for help via -* [Developer Center](https://github.com/linuxdeepin/developer-center/issues) * [Gitter](https://gitter.im/orgs/linuxdeepin/rooms) * [IRC channel](https://webchat.freenode.net/?channels=deepin) * [Forum](https://bbs.deepin.org) diff -Nru deepin-terminal-5.0.0+ds1/rpm/deepin-terminal.spec deepin-terminal-5.4.13/rpm/deepin-terminal.spec --- deepin-terminal-5.0.0+ds1/rpm/deepin-terminal.spec 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/rpm/deepin-terminal.spec 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,130 @@ +%define specrelease 1%{?dist} +%if 0%{?openeuler} +%define specrelease 1 +%endif + +%define libname libqtermwidget5 + +Name: deepin-terminal +Version: 5.4.1.1 +Release: %{specrelease} +Summary: Default terminal emulation application for Deepin +License: GPLv3+ +URL: https://github.com/linuxdeepin/%{name} +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz + +Provides: deepin-terminal-data +Obsoletes: deepin-terminal-data + +BuildRequires: gcc-c++ +BuildRequires: cmake3 +BuildRequires: qt5-linguist + +BuildRequires: pkgconfig(dtkcore) +BuildRequires: pkgconfig(dtkwidget) +BuildRequires: pkgconfig(dtkgui) +BuildRequires: pkgconfig(dframeworkdbus) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(atspi-2) +BuildRequires: pkgconfig(libsecret-1) + +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5DBus) +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: lxqt-build-tools >= 0.6.0~ +BuildRequires: utf8proc-devel +BuildRequires: gtest-devel +BuildRequires: gmock-devel + +Requires: libqtermwidget5 +Requires: libqtermwidget5-data +Requires: expect +Requires: zssh +Requires: qt-at-spi +Requires: at-spi2-core + +%description +%{summary}. + +%package -n %{libname} +Summary: Terminal emulator widget for Qt 5 +%description -n %{libname} +Terminal emulator widget for Qt 5 (shared libraries) +QTermWidget is a Unicode-enabled, embeddable Qt widget that can be used as +built-in console or terminal emulation widget. + +%package -n %{libname}-devel +Summary: Terminal emulator widget for Qt 5 +%description -n %{libname}-devel +Terminal emulator widget for Qt 5 (shared libraries) +QTermWidget is a Unicode-enabled, embeddable Qt widget that can be used as +built-in console or terminal emulation widget. + + +%package -n %{libname}-data +Summary: Terminal emulator widget for Qt 5 +%description -n %{libname}-data +Terminal emulator widget for Qt 5 (shared libraries) +QTermWidget is a Unicode-enabled, embeddable Qt widget that can be used as +built-in console or terminal emulation widget. + +%prep +%autosetup + +%build +# help find (and prefer) qt5 utilities, e.g. qmake, lrelease +export PATH=%{_qt5_bindir}:$PATH +# cmake_minimum_required version is too high +sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt") +mkdir build && pushd build +%cmake -DCMAKE_BUILD_TYPE=Release -DAPP_VERSION=%{version} -DVERSION=%{version} ../ +%make_build +popd + +%install +%make_install -C build INSTALL_ROOT="%buildroot" + +%post -n %{libname} +ldconfig + +%postun -n %{libname} +ldconfig + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{_datadir}/%{name}/translations/*.qm +%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg +%{_datadir}/applications/%{name}.desktop +%{_datadir}/deepin-manual/manual-assets/application/deepin-terminal/terminal/ + +%files -n %{libname} +%{_libdir}/libterminalwidget5.so.0.14.1 + +%files -n %{libname}-devel +%{_includedir}/terminalwidget5/*.h +%{_libdir}/cmake/terminalwidget5/*.cmake +%{_libdir}/libterminalwidget5.so +%{_libdir}/libterminalwidget5.so.0 +%{_libdir}/pkgconfig/terminalwidget5.pc + +%files -n %{libname}-data +%{_datadir}/terminalwidget5/color-schemes/*.schema +%{_datadir}/terminalwidget5/color-schemes/*.colorscheme +%{_datadir}/terminalwidget5/color-schemes/historic/*.schema +%{_datadir}/terminalwidget5/kb-layouts/*.keytab +%{_datadir}/terminalwidget5/kb-layouts/historic/*.keytab +%{_datadir}/terminalwidget5/translations/*.qm + +%changelog +* Mon Apr 19 2021 zhangdingwen - 5.4.1.1-1 +- init spec for euler + +* Tue Oct 20 2020 guoqinglan - 5.2.36-1 +- update to 5.2.36 + +* Tue Sep 29 2020 guoqinglan - 5.2.35-1 +- update to 5.2.35 diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/attention.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/attention.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/attention.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/attention.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,9 @@ + + + attention + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/close_icon.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/close_icon.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/close_icon.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/close_icon.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,15 @@ + + + + Rectangle 9 + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/Ctrl.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/Ctrl.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/Ctrl.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/Ctrl.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,16 @@ + + + + Ctrl + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin_launcher.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin_launcher.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin_launcher.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin_launcher.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin_terminal.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin_terminal.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin_terminal.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin_terminal.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin-terminal.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin-terminal.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/deepin-terminal.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/deepin-terminal.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/down.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/down.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/down.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/down.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,73 @@ + + + + + + image/svg+xml + + + + + + + next + Created with Sketch. + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/edit_icon.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/edit_icon.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/edit_icon.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/edit_icon.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/edit.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/edit.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/edit.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/edit.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,3 @@ + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/icon_menu.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/icon_menu.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/icon_menu.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/icon_menu.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + img_upload + + + + + + img_upload + Created with Sketch. + + + + + + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/notes.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/notes.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/notes.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/notes.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,11 @@ + + + notes + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/plus_icon.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/plus_icon.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/plus_icon.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/plus_icon.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/QM.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/QM.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/QM.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/QM.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,13 @@ + + + + QM + Created with Sketch. + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/Shift.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/Shift.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/Shift.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/Shift.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,18 @@ + + + + Shift + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/+.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/+.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/+.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/+.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,13 @@ + + + + + + Created with Sketch. + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/tips.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/tips.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/tips.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/tips.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,9 @@ + + + tips + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/up.svg deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/up.svg --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/common/up.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/common/up.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,73 @@ + + + + + + image/svg+xml + + + + + + + previous + Created with Sketch. + + + + + + Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/addsshall.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/addsshall.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/closesplitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/closesplitscreen.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/delete.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/delete.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/deletessh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/deletessh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/download.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/download.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/editserver.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/editserver.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/editssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/editssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/export.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/export.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/groupssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/groupssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/hotkey.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/hotkey.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/interface.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/interface.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/newwindow.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/newwindow.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/openfile.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/openfile.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/rename.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/rename.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/rightclick.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/rightclick.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/searchssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/searchssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/splitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/splitscreen.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/upload.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/upload.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/fig/workspace.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/fig/workspace.png differ diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/s_terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/s_terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/s_terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/s_terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,369 @@ +# Terminal|deepin-terminal| + +## Overview + +Terminal is a terminal emulator with simple interface providing diversified powerful functions including multi-windows, workspace, remote management, Quake mode, among others. You can instantly start and close Terminal smoothly like any normal file windows, refraining you from limitations and hassles while writing commands. Take a try of the Quake mode which enables you to browse other windows while inputting commands on one screen. When there are multiple tasks, you can add tabs in terminal to create more workspaces like in the browser or split the workspace into multiple windows. It's also a piece of cake to upload and download files with remote management. More powerful functions are waiting for you to explore! + + ![1|interface](fig/interface.png) + + +## Guide + +You can run, exit or create shortcuts for Terminal. + +### Run Terminal + +1. Click the Launcher icon ![deepin_launcher](../common/deepin_launcher.svg) in the Dock to enter launcher interface. +2. Locate Terminal ![deepin_terminal](../common/deepin_terminal.svg) by scrolling the mouse wheel or searching "terminal" in the Launcher interface and click it to run. +3. Right-click ![deepin_terminal](../common/deepin_terminal.svg) to: + - Select **Send to desktop** to create a desktop shortcut. + - Select **Send to dock** to fix it in the Dock. + - Select **Add to startup** to add the application to startup and it will automatically run when the system starts up. + +> ![notes](../common/notes.svg) Notes: You can also press **Ctrl** + **Alt** + **T** to open Terminal. + + +### Exit Terminal + +1. On the Terminal interface, click ![close_icon](../common/close_icon.svg) to exit. +2. Right-click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock and select **Close All** to exit. +3. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg) to select **Exit**. + +> ![notes](../common/notes.svg)Notes: A prompt will display when programs are still running in Terminal to avoid your data loss. + + +### View Shortcuts + +On the Terminal interface, press **Ctrl + Shift + ?** to view shortcuts. Proficiency in shortcuts will greatly improve your efficiency. + + ![1|shortcuts](fig/hotkey.png) + + +## Basic Operations + +You can right-click on the Terminal interface for daily operations. + + ![1|rightclick](fig/rightclick.png) + + +### Find + +You can use **Find** function to quickly search contents in terminal. + +1. Right-click on the Terminal interface to select **Find** or click the **Ctrl** + **Alt** + **F** key on the keyboard. +2. Type the word in the search box. +3. Press the **Enter** key on the keyboard and the search results will be highlighted. +4. Press **Esc** on keyboard or click any blank area on the Terminal interface to hide search. + +> ![tips](../common/tips.svg)Tips: Press **Enter** to search down from the current location. You can also search by clicking ![up](../common/up.svg) and ![down](../common/down.svg) on the interface. + + +### Web Search + +You can use browser in Terminal for quick and convenient web search against selected content on the Terminal interface. + +1. On the Terminal interface, select the content you want to search. +2. Right-click to select **Search**. +3. Select a search website. +4. Your browser will pop up and start searching based on the content selected on the Terminal interface. + + +### Copy/Paste + +- Copy + - On the Terminal interface, select the content you want to copy and press **Ctrl** + **Shift** + **C**. + - On the Terminal interface, select the content you want to copy, right-click and select **Copy**. +- Paste + - On the Terminal interface, press **Ctrl** + **Shift** + **V**. + - On the Terminal interface, middle-click to paste. + - On the Terminal interface, right-click and select **Paste**. + +> ![tips](../common/tips.svg) Tips: +> - If you want to copy a hyperlink, you don't need to select any content. Just simply copy it with a right-click. +> - Check **Copy on select** in **Settings** under the main menu to copy the selected text to clipboard automatically. + +### Select Quake Mode + +Quake Mode is a unique function of Terminal. Press **Alt** + **F2** to open a quake window, and press again to hide it. + +> ![tips](../common/tips.svg) Tips: You can also right-click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock to select **Quake Terminal** to open a quake window. + +### Open Files and Applications + +On the Terminal interface, select the file in the current directory and right-click to **Open** it by system application. + +1. On the Terminal interface, input **ls -al** to display files in current directory. +2. Double-click to select the file name. +3. Right-click and select **Open**. +4. The file will be opened with the proper application. + + ![1|openfile](fig/openfile.png) + + +### Adjust Encoding Methods + +When there is a messy code or display error, you may switch the encoding to solve it. + +1. On the Terminal interface, right-click to select **Encoding**. +2. Select one encoding in the list to see if the content is correctly displayed. +3. Repeat Step 2 until you get correct display of content. + +> ![notes](../common/notes.svg)Notes: Usually, correct encoding methods are matched automatically in Terminal. Once any error appears under some special circumstances, you can adjust encoding methods manually. You can directly choose the correct encoding method if you are sure of it. If you are not sure, you can try multiple times. + + +## Window Operations + +Window serves as the foundation for your operations in Terminal. A window is created when you launch the terminal. You can create many tabs in one window and split one tab or window into multiple workspaces. + + +### Create Windows + +You can create a new window in the following ways: + +- Open Terminal and click ![icon_menu](../common/icon_menu.svg)> **New Window**. +- Click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock to select **New Window**. + + +![0|new_window](fig/newwindow.png) + +### Display Windows in Fullscreen + +1. Open Terminal in the launcher interface. +2. Press **F11** to display Terminal in fullscreen. +3. If you want to restore to the normal display, please press **F11**. + +> ![notes](../common/notes.svg)Notes: You can also right-click to select **Fullscreen** or **Exit fullscreen** on the Terminal interface. + + +### Split Windows + +1. On the Terminal interface, right-click to: + + - Select **Vertical split** to split the interface into left and right columns. + - Select **Horizontal split** to split the interface into top and bottom rows. + +2. You can input commands in each terminal window, and view execution results of different commands in different windows simultaneously. + +> ![tips](../common/tips.svg)Tips: You can also press **Ctrl**+ **Shift** +**J** on the keyboard to split windows vertically, and press **Ctrl** + **Shift** + **H** to split windows horizontally. + + ![1|splitscreen](fig/splitscreen.png) + + + +### Close Workspaces + +You can close multiple split workspaces in the following steps: + +1. On the Terminal interface, move the cursor over one of the split workspaces. +2. Right-click to: + + - Select **Close workspace** to close this split workspace. + - Select **Close other workspaces** to close other split workspaces except for the current one. + + ![1|closewindow](fig/closesplitscreen.png) + + +## Tab Operations + +### Create Tabs + +You can create new tabs as follows: + +- On the Terminal interface, right-click and select **New tab** to create a new tab. +- Click ![add](../common/+.svg) on the top to create a tab. +- Press **Ctrl** + **Shift** + **T** on the keyboard to create a new tab. + + +### Switch/Adjust Tabs + +You can freely switch among multiple tabs via following methods: + +- Press **Ctrl** + **Tab** or scroll the mouse wheel on the tab title to switch in sequence. +- Press **Ctrl** + **Shift** + **1~9** number keys to select the tab. When there are more than 9 tabs, the last tab will be selected rather the ninth one. +- Drag one tab to switch sequence in the one window. +- Drag one tab out of the current window to create a new window. +- Drag one tab out of the current window to another window. + + +### Rename Tabs + + +1. On the Terminal interface, right-click a tab and select **Rename title**. + + - Tab title format: Select one format in the **Insert** drop-down list and you can customize the current tab title as needed. + - Remote tab title format: Select one format in the **Insert** drop-down list and you can customize the remote tab title as needed. + + +2. Click **Confirm**. + +> ![tips](../common/tips.svg)Tips: You can also press **F2** to rename the window. + + ![1|rename](fig/rename.png) + +### Close Tabs + +You can close tab as follows: + +1. Select the tab to be closed and click ![add](../common/close_icon.svg) . +2. Right-click any tab to: + - Select **Close tab** to close it. + - Select **Close other tabs** to close other tabs other than the current one. + +> ![tips](../common/tips.svg)Tips: When there is only one tab in the workspace, you can also right-click and select **Close workspace** to close the tab. + +## Remote Server Management + +You can open remote management panel to add remote servers via the main menu or right-click menu. Once a remote server is added into the management list, you can automatically login just by one click. + +### Add Servers + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg)> **Remote management**. +2. Click **Add Server** and a pop-up box will display. +3. Fill out **Server name**, **Address**, **Username** and **Password**. +4. Click **Add**. + + > ![notes](../common/notes.svg)Notes: If you need to set up more parameters, please click **Advanced options**. + + ![1|addssh](fig/addsshall.png) + +### Edit Servers + +1. On the Remote Management interface, click ![edit_icon](../common/edit_icon.svg) on the server. +2. Edit server information as needed. +3. Click **Save**. + + ![0|editssh](fig/editssh.png) + + +### Group Servers + +When you set a group for a server, it will be added in the corresponding group and displayed in the remote management panel on the right side. + +1. On the terminal interface, click the **Add Server** icon to open the Add Server dialogue or click the ![edit_icon](../common/edit_icon.svg)icon beside an existing server to open the Edit Server dialogue. +2. Click **Advanced options**. +3. Input **Group** information. +4. Click **Save**. + + ![0|groupssh](fig/groupssh.png) + + +### Search Servers + +When there are multiple servers or groups, the search box will be displayed on the top, so you can quickly search all servers. + +1. On the Terminal interface, right-click and select **Remote management**. +2. Input the keywords and press **Enter**. +3. The search results will be displayed. + +![0|searchssh](fig/searchssh.png) + + +### Upload/Download Files + +You can upload and download files after logging into a remote server. + +#### Upload Files + +1. On the Remote Management panel, select one server to log in. +2. On the Terminal interface, right-click to select **Upload file**. +3. Select the file to be uploaded in the pop-up window. +4. Click **Upload** and the file will be uploaded to the remote server. + +> ![tips](../common/tips.svg) Tips: You can drag the file directly into the terminal interface to upload after connecting the remote server. + +![1|upload](fig/upload.png) + + +#### Download Files + +1. On the Remote Management panel, select one server to log in. +2. On the Terminal interface, right-click to select **Download file**. +3. Select the storage location. +4. Input the path of the file to be downloaded. The file will be downloaded to the specified location. + +![1|download](fig/download.png) + + +### Delete Servers + +1. Enter **Edit Server** interface. +2. Click **Advanced options**. +3. Select **Delete server**. +4. Click **Delete** on the pop-up window to confirm. + +![0|groupssh](fig/deletessh.png) + +## Main Menu + +In the Main Menu, you can create [New Window](#Create Window), customize commands, perform [Remote Management](#Remote Management), switch themes, view help manual and get more information about Album. + +### Theme + +The window theme provides multiple themes. + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg). +2. Click **Theme** and you can: + + - choose one theme that comes with Terminal. + - customize the theme in the **Custom Theme** window according to your need. + +### Custom Commands + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg). +2. Select **Custom commands**. +3. Select **Add command**. +4. Input **Name**, **Command** and **Shortcuts**. +5. Click **Add**. + +### Settings + +#### Basic Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Basic** options, you can: + + - Set the font type and size. + - Click the "+" or "-" icon or scroll the mouse wheel in the Font Size edition box to adjust the font size. + +3. In the **Tab titles** options, you can set the name for all the tabs and remote tabs in terminal. + +#### Shortcuts Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Shortcuts** options, you can: + + - Modify shortcuts: Click the shortcuts to be modified and input new shortcuts via the keyboard in the editable input box. + - Disable shortcuts: Click the shortcuts to be modified and the input box will be editable. Press **Backspace** on the keyboard to disable the shortcut. + + +#### Advanced Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Advanced** options, you can: + + - Set cursor style. + - Enable or disable **Cursor blink**. + - Enable or disable **Copy on select**. + - Enable or disable **Scroll on keystroke**. + - Enable or disable **Scroll on output**. + - Set the window startup mode. + - Enable or disable **Hide quake window after losing focus**. + - Select **Shell profile**. + - Enable or disable flow control by **Ctrl** + **S** and **Ctrl** + **Q**. + +### Help + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **Help** to view the manual of Terminal. + + +### About + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **About** to view the version and introduction of Terminal. + + +### Exit + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **Exit** to exit Terminal. diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/en_US/terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/en_US/terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,373 @@ +# Terminal|deepin-terminal| + +## Overview + +Terminal is a terminal emulator with simple interface providing diversified powerful functions including multi-windows, workspace, remote management, Quake mode, among others. You can instantly start and close Terminal smoothly like any normal file windows, refraining you from limitations and hassles while writing commands. Take a try of the Quake mode which enables you to browse other windows while inputting commands on one screen. When there are multiple tasks, you can add tabs in terminal to create more workspaces like in the browser or split the workspace into multiple windows. It's also a piece of cake to upload and download files with remote management. More powerful functions are waiting for you to explore! + + ![1|interface](fig/interface.png) + + +## Guide + +You can run, exit or create shortcuts for Terminal. + +### Run Terminal + +1. Click the Launcher icon ![deepin_launcher](../common/deepin_launcher.svg) in the Dock to enter launcher interface. +2. Locate Terminal ![deepin_terminal](../common/deepin_terminal.svg) by scrolling the mouse wheel or searching "terminal" in the Launcher interface and click it to run. +3. Right-click ![deepin_terminal](../common/deepin_terminal.svg) to: + - Select **Send to desktop** to create a desktop shortcut. + - Select **Send to dock** to fix it in the Dock. + - Select **Add to startup** to add the application to startup and it will automatically run when the system starts up. + +> ![notes](../common/notes.svg)Notes: You can also press **Ctrl** + **Alt** + **T** to open Terminal. + + +### Exit Terminal + +1. On the Terminal interface, click ![close_icon](../common/close_icon.svg) to exit. +2. Right-click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock and select **Close All** to exit. +3. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg) to select **Exit**. + +> ![notes](../common/notes.svg)Notes: A prompt will display when programs are still running in Terminal to avoid your data loss. + + +### View Shortcuts + +On the Terminal interface, press **Ctrl + Shift + ?** to view shortcuts. Proficiency in shortcuts will greatly improve your efficiency. + + ![1|shortcuts](fig/hotkey.png) + + +## Basic Operations + +You can right-click on the Terminal interface for daily operations. + + ![1|rightclick](fig/rightclick.png) + + +### Find + +You can use **Find** function to quickly search contents in terminal. + +1. Right-click on the Terminal interface to select **Find** or click the **Ctrl** + **Alt** + **F** key on the keyboard. +2. Type the word in the search box. +3. Press the **Enter** key on the keyboard and the search results will be highlighted. +4. Press **Esc** on the keyboard or click any blank area on the Terminal interface to hide search. + +> ![tips](../common/tips.svg)Tips: Press **Enter** to search down from the current location. You can also search by clicking ![up](../common/up.svg) and ![down](../common/down.svg) on the interface. + + +### Web Search + +You can use browser in Terminal for quick and convenient web search against selected content on the Terminal interface. + +1. On the Terminal interface, select the content you want to search. +2. Right-click to select **Search**. +3. Select a search website. +4. Your browser will pop up and start searching based on the content selected on the Terminal interface. + + +### Copy/Paste + +- Copy + - On the Terminal interface, select the content you want to copy and press **Ctrl** + **Shift** + **C**. + - On the Terminal interface, select the content you want to copy, right-click and select **Copy**. +- Paste + - On the Terminal interface, press **Ctrl** + **Shift** + **V**. + - On the Terminal interface, middle-click to paste. + - On the Terminal interface, right-click and select **Paste**. + +> ![tips](../common/tips.svg) Tips: +> - If you want to copy a hyperlink, you don't need to select any content. Just simply copy it with a right-click. +> - Check **Copy on select** in **Settings** under the main menu to copy the selected text to clipboard automatically. + +### Select Quake Mode + +Quake Mode is a unique function of Terminal. Press **Alt** + **F2** to open a quake window, and press again to hide it. + +> ![tips](../common/tips.svg) Tips: You can also right-click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock to select **Quake Terminal** to open a quake window. + +### Open Files and Applications + +On the Terminal interface, select the file in the current directory and right-click to **Open** it by system application. + +1. On the Terminal interface, input **ls -al** to display files in current directory. +2. Double-click to select the file name. +3. Right-click and select **Open**. +4. The file will be opened with the proper application. + + ![1|openfile](fig/openfile.png) + + +### Adjust Encoding Methods + +When there is a messy code or display error, you may switch the encoding to solve it. + +1. On the Terminal interface, right-click to select **Encoding**. +2. Select one encoding in the list to see if the content is correctly displayed. +3. Repeat Step 2 until you get correct display of content. + +> ![notes](../common/notes.svg)Notes: Usually, correct encoding methods are matched automatically in Terminal. Once any error appears under some special circumstances, you can adjust encoding methods manually. You can directly choose the correct encoding method if you are sure of it. If you are not sure, you can try multiple times. + + +## Window Operations + +Window serves as the foundation for your operations in Terminal. A window is created when you launch the terminal. You can create many tabs in one window and split one tab or window into multiple workspaces. + + +### Create Windows + +You can create a new window in the following ways: + +- Open Terminal and click ![icon_menu](../common/icon_menu.svg)> **New Window**. +- Click ![deepin_terminal](../common/deepin_terminal.svg) in the Dock to select **New Window**. + + +![0|new_window](fig/newwindow.png) + +### Display Windows in Fullscreen + +1. On the Terminal interface, Press **F11** on the keyboard or right-click to select **Fullscreen** to display Terminal in fullscreen. +2. If you want to restore to the normal display, please press **F11** or right-click to select **Exit fullscreen**. + + +### Split Windows + +1. On the Terminal interface, right-click to: + + - Select **Vertical split** to split the interface into left and right columns. + - Select **Horizontal split** to split the interface into top and bottom rows. + +2. You can input commands in each terminal window, and view execution results of different commands in different windows simultaneously. + +> ![tips](../common/tips.svg)Tips: You can also press **Ctrl**+ **Shift** +**J** on the keyboard to split windows vertically, and press **Ctrl** + **Shift** + **H** to split windows horizontally. + + ![1|splitscreen](fig/splitscreen.png) + + + +### Close Workspaces + +You can close multiple split workspaces in the following steps: + +1. On the Terminal interface, move the cursor over one of the split workspaces. +2. Right-click to: + + - Select **Close workspace** to close this split workspace. + - Select **Close other workspaces** to close other split workspaces except for the current one. + + ![1|closewindow](fig/closesplitscreen.png) + + +## Tab Operations + +### Create Tabs + +You can create new tabs as follows: + +- On the Terminal interface, right-click and select **New tab** to create a new tab. +- Click ![add](../common/+.svg) on the top to create a tab. +- Press **Ctrl** + **Shift** + **T** on the keyboard to create a new tab. + + +### Switch/Adjust Tabs + +You can freely switch among multiple tabs via following methods: + +- Press **Ctrl** + **Tab** or scroll the mouse wheel on the tab title to switch in sequence. +- Press **Ctrl** + **Shift** + **1~9** number keys to select the tab. When there are more than 9 tabs, the last tab will be selected rather the ninth one. +- Drag one tab to switch sequence in the one window. +- Drag one tab out of the current window to create a new window. +- Drag one tab out of the current window to another window. + + +### Rename Tabs + + +1. On the Terminal interface, right-click a tab and select **Rename title**. + + - Tab title format: Select one format in the **Insert** drop-down list and you can customize the current tab title as needed. + - Remote tab title format: Select one format in the **Insert** drop-down list and you can customize the remote tab title as needed. + + +2. Click **Confirm**. + +> ![tips](../common/tips.svg)Tips: You can also press **F2** to rename the window. + + ![1|rename](fig/rename.png) + +### Close Tabs + +You can close tab as follows: + +1. Select the tab to be closed and click ![add](../common/close_icon.svg) . +2. Right-click any tab to: + - Select **Close tab** to close it. + - Select **Close other tabs** to close other tabs other than the current one. + +> ![tips](../common/tips.svg)Tips: When there is only one tab in the workspace, you can also right-click and select **Close workspace** to close the tab. + +## Remote Management + +You can open remote management panel to add remote servers via the main menu or right-click menu. Once a remote server is added into the management list, you can automatically login just by one click. + +### Add Servers + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg)> **Remote management**. +2. Click **Add Server** and a pop-up box will display. +3. Fill out **Server name**, **Address**, **Username** and **Password**. +4. Click **Add**. + +> ![notes](../common/notes.svg)Notes: If you need to set up more parameters, please click **Advanced options**. + + ![1|addssh](fig/addsshall.png) + +### Edit Servers + +1. On the Remote Management interface, click ![edit_icon](../common/edit_icon.svg) on the server. +2. Edit server information as needed. +3. Click **Save**. + + ![0|editssh](fig/editssh.png) + + +### Group Servers + +When you set a group for a server, it will be added in the corresponding group and displayed in the remote management panel on the right side. + +1. On the terminal interface, click the **Add Server** icon to open the Add Server dialogue or click the ![edit_icon](../common/edit_icon.svg)icon beside an existing server to open the Edit Server dialogue. +2. Click **Advanced options**. +3. Input **Group** information. +4. Click **Save**. + + ![0|groupssh](fig/groupssh.png) + + +### Search Servers + +When there are multiple servers or groups, the search box will be displayed on the top, so you can quickly search all servers. + +1. On the Terminal interface, right-click and select **Remote management**. +2. Input the keywords and press **Enter**. +3. The search results will be displayed. + +![0|searchssh](fig/searchssh.png) + + +### Upload/Download Files + +You can upload and download files after logging into a remote server. + +#### Upload Files + +1. On the Remote Management panel, select one server to log in. +2. On the Terminal interface, right-click to select **Upload file**. +3. Select the file to be uploaded in the pop-up window. +4. Click **Upload** and the file will be uploaded to the remote server. + +> ![tips](../common/tips.svg)Tips: You can drag the file directly into the terminal interface to upload after connecting the remote server. + +![1|upload](fig/upload.png) + + +#### Download Files + +1. On the Remote Management panel, select one server to log in. +2. On the Terminal interface, right-click to select **Download file**. +3. Select the storage location. +4. Input the path of the file to be downloaded. The file will be downloaded to the specified location. + +![1|download](fig/download.png) + + +### Delete Servers + +1. Enter **Edit Server** interface. +2. Click **Advanced options**. +3. Select **Delete server**. +4. Click **Delete** on the pop-up window to confirm. + +![0|groupssh](fig/deletessh.png) + +## Main Menu + +In the Main Menu, you can [Create Windows](#Create Windows), customize commands, perform [Remote Management](#Remote Management), switch themes, view help manual and get more information about Album. + +### Theme + +The window theme provides multiple themes. + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg). +2. Click **Theme** and you can: + + - choose one theme that comes with Terminal. + - customize the theme in the **Custom Theme** window according to your need. + +### Custom Commands + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg). +2. Select **Custom commands**. +3. Select **Add command**. +4. Input **Name**, **Command** and **Shortcuts**. +5. Click **Add**. + +### Settings + +#### Basic Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Basic** options, you can: + + - Set **Opacity** for the background. + + >![notes](../common/notes.svg)Notes: if Window Effect is turned off in Control Center, the **Opacity** scroll bar will be hidden. + + - Set the font type and size. + - Click the "+" or "-" icon or scroll the mouse wheel in the Font Size edition box to adjust the font size. + +3. In the **Tab titles** options, you can set the name for all the tabs and remote tabs in terminal. + +#### Shortcuts Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Shortcuts** options, you can: + + - Modify shortcuts: Click the shortcuts to be modified and input new shortcuts via the keyboard in the editable input box. + - Disable shortcuts: Click the shortcuts to be modified and the input box will be editable. Press **Backspace** on the keyboard to disable the shortcut. + + +#### Advanced Settings + +1. On the Terminal interface, click ![main_menu](../common/icon_menu.svg)> **Settings**. +2. In the **Advanced** options, you can: + + - Set **Cursor style**. + - Enable or disable **Cursor blink**. + - Enable or disable **Copy on select**. + - Enable or disable **Scroll on keystroke**. + - Enable or disable **Scroll on output**. + - Set the window startup mode. + - Enable or disable **Blur background**. + >![notes](../common/notes.svg)Notes: If Window Effect is turned off in Control Center, **Blur background** option will be hidden. + + - Enable or disable **Hide quake window after losing focus**. + - Select **Shell profile**. + - Enable or disable flow control by **Ctrl** + **S** and **Ctrl** + **Q**. + +### Help + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **Help** to view the manual of Terminal. + + +### About + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **About** to view the version and introduction of Terminal. + + +### Exit + +1. On the Terminal interface, click ![icon_menu](../common/icon_menu.svg). +2. Click **Exit** to exit Terminal. Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/addssh_all.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/addssh_all.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/closesplitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/closesplitscreen.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/delete.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/delete.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/download.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/download.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/editssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/editssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/export.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/export.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/groupssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/groupssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/hotkey.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/hotkey.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/interface.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/interface.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/newwindow.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/newwindow.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/openfile.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/openfile.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/rename.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/rename.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/rightclick.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/rightclick.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/searchssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/searchssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/fig/splitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/fig/splitscreen.png differ diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/s_terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/s_terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/s_terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/s_terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,333 @@ +# 终端|deepin-terminal| + +## 概述 + +终端是⼀款集多窗⼝、⼯作区、远程管理、雷神模式等功能的⾼级终端模拟器。它拥有简单的界面,丰富而强大的功能。您可以瞬间启动和关闭,使用起来像普通文件窗口一样流畅,让您在输入命令时心无旁骛,得心应手。试试雷神模式,一边看页面一边输入命令;当有多任务进行时,您可以像在浏览器中增加页签一样建立多个窗口或者将标签页分割成多个工作区;远程管理,上传下载文件再也不是问题。更多强大功能,静待您的发掘! + +![1|interface](fig/interface.png) + +## 使用入门 +通过以下方式运行或关闭终端,或者创建终端的快捷方式。 + +### 运行终端 + +1. 单击任务栏上的启动器图标 ![deepin_launcher](../common/deepin_launcher.svg),进入启动器界面。 +2. 上下滚动鼠标滚轮浏览或通过搜索,找到终端图标 ![deepin_terminal](../common/deepin_terminal.svg),单击运行。 +3. 右键单击 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 单击 **发送到桌面**,在桌面创建快捷方式。 + - 单击 **发送到任务栏**,将应用程序固定到任务栏。 + - 单击 **开机自动启动**,将应用程序添加到开机启动项,在电脑开机时自动运行该应用。 + +> ![notes](../common/notes.svg)说明:使用快捷键 **Ctrl + Alt + T** 也可以启动终端。 + +### 关闭终端 + +- 在终端界面单击 ![close_icon](../common/close_icon.svg),退出终端。 +- 在任务栏右键单击 ![deepin_terminal](../common/deepin_terminal.svg),选择 **关闭所有**,退出终端。 +- 在终端界面单击 ![icon_menu](../common/icon_menu.svg),选择 **退出**,退出终端。 + +> ![notes](../common/notes.svg)说明:如果关闭终端时终端里面依然有程序在运行,会弹出一个对话框询问用户是否退出, 避免强制关闭引起的用户数据丢失。 + +### 查看快捷键 + +在终端界面,使用快捷键 **Ctrl + Shift + ?** 打开快捷键预览界面。熟练地使用快捷键,将大大提升您的操作效率。 + +![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在终端界面单击鼠标右键来进行常规操作。 + +![1|rightclick](fig/rightclick.png) + +### 查找 +使用“查找”功能快速查找终端显示的内容。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **查找**。 +3. 在搜索框中输入要查找的字符。 +4. 按下键盘上的 **Enter** 键,搜索到的结果将高亮显示。 +5. 如果想隐藏搜索界面,可以单击终端空白区域按下键盘上的 **Esc** 键。 + +> ![tips](../common/tips.svg)窍门:搜索时按下键盘上的 **Enter** 键从当前位置向下搜索,您也可以单击搜索界面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 图标向上或向下搜索。 + +### 网页搜索 +使用“搜索”功能可以调用浏览器,搜索终端中的内容,快捷又方便。 + +1. 在终端界面,选中想要搜索的内容。 +2. 单击鼠标右键,选择 **搜索**。 +3. 在下拉选项中选择一个网站来搜索选中的内容。 + +### 复制和粘贴 + +- 复制 + + 在终端界面,选中要复制的内容后使用快捷键 **Ctrl + Shift + C** 复制内容。 + + 在终端界面,选中要复制的内容后单击鼠标右键选择 **复制**。 +- 粘贴 + + 在终端界面,使用快捷键 **Ctrl + Shift + V** 粘贴内容。 + + 在终端界面,单击鼠标中键粘贴内容。 + + 在终端界面,单击鼠标右键选择 **粘贴**。 + + > ![notes](../common/notes.svg)说明: + > - 终端已默认开启 **选中文字时自动复制到剪切板**,您可以在![icon_menu](../common/icon_menu.svg) > **设置** 中进行修改。 + > - 如果当前光标下是超链接内容,即使没有选中任何内容,也可以通过右键菜单复制。 + +### 雷神模式 + +雷神模式是终端特有的便捷功能,使用快捷键 **Alt + F2** 打开雷神终端窗口,再按一下 **Alt + F2** 隐藏雷神终端窗口。 + +> ![tips](../common/tips.svg)窍门 :鼠标右键单击任务栏上的图标 ![deepin_terminal](../common/deepin_terminal.svg),选择 **雷神终端**,打开雷神模式的终端窗口。 + +### 打开文件和应用程序 + +在终端界面上选中当前目录下的文件,右键菜单则显示 **打开** 菜单项,单击 **打开** 调用系统中的应用来打开选中的文件。 + +1. 在终端界面,输入 **ls -al** 显示当前目录下的文件。 +2. 双击鼠标左键,选中文件名。 +3. 单击鼠标右键选择 **打开**。 + +![1|openfile](fig/openfile.png) + + +### 调整编码方式 +当某些文件信息显示乱码或者错误时,可以通过调整编码方式来解决问题。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **编码**。 +3. 在右侧展开的面板中,选择一种编码方式并查看调整后的效果。 +4. 重复步骤3直到内容显示正确。 + +> ![notes](../common/notes.svg)说明:通常终端都会匹配正确的编码方式,一些特殊情况下出现错误后,可以手动调整编码方式,如果您确定需要哪种编码方式可以直接选择,不确定的情况下多尝试几次。 + +## 窗口操作 + +终端窗口是实现各种功能的基础,可以创建多个标签页,也可以分割多个工作区。 + +### 新建窗口 + +在终端界面,通过以下方法新建窗口: + + - 单击 ![menu](../common/icon_menu.svg)> **新建窗口**,打开一个新的终端窗口。 + - 右键单击任务栏上的图标 ![deepin_terminal](../common/deepin_terminal.svg) ,选择 **新建窗口**。 + +![0|newwindow](fig/newwindow.png) + +### 全屏显示 + +1. 在终端界面,按下键盘上的 **F11** 键或单击鼠标右键选择 **全屏**,终端窗口将全屏显示。 +2. 如果要恢复正常大小显示,按下键盘上的 **F11** 键或单击鼠标右键选择 **退出全屏**。 + +### 分割工作区 + +1. 在终端界面,单击鼠标右键。 + + - 选择 **纵向分屏**,工作区被分为左右两个部分。 + - 选择 **横向分屏**,工作区被分为上下两个部分。 +2. 您可以在各个工作区中输入命令,并可以同时查看到命令执行的结果。 + +> ![tips](../common/tips.svg)窍门 :您也可以使用快捷键 **Ctrl + Shift + J** 纵向分屏、 **Ctrl + Shift + H** 横向分屏。 + +![1|splitscreen](fig/splitscreen.png) + + +### 关闭工作区 +执行以下步骤关闭多个工作区: + +1. 在终端界面,将鼠标指针置于其中一个工作区中。 +2. 单击鼠标右键,您可以: + - 选择 **关闭工作区**,关闭此工作区。 + - 选择 **关闭其他工作区**,关闭除此工作区以外的其他工作区。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 标签页操作 + +### 新建标签页 + +通过以下方法之一新建标签页: +- 在终端界面,单击标签页上的按钮 **+** ,新建标签页。 +- 在终端界面,单击鼠标右键,选择 **新建标签页**。 +- 使用快捷键 **Ctrl + Shift + T** 新建标签页。 + + + +### 切换/调整标签页 +通过以下方法在多个标签页之间任意切换或调整: + +- 使用快捷键 **Ctrl + Tab** 或将鼠标指针置于标签页上,滚动鼠标滚轮依次切换标签页。 +- 使用快捷键 **Ctrl + Shift + 1~9** 数字键来选择对应的标签页,当标签页大于9时,将选中最后一个标签页而不是第9个标签页。 +- 同一窗口内拖拽标签页排序。 +- 拖拽标签页移出当前窗口,创建一个新的窗口。 +- 拖拽标签页从一个窗口到另一个窗口中。 + + +### 重命名标签页 + +1. 在终端界面,右键单击一个标签页。 +2. 选择 **重命名标题**。 + - 标签标题格式:自定义当前标签页名称;可在 **插入** 下拉选项中选择一种格式。 + - 远程标签标题格式:自定义远程标签页名称;可在 **插入** 下拉选项中选择一种格式。当工作区连接远程服务器时,标签页会显示您所设置的参数。 + +3. 单击 **确定**。 + +> ![tips](../common/tips.svg)窍门 :您也可以按下键盘上的 **F2** 来重命名标签页。 + +![1|rename](fig/rename.png) + +### 关闭标签页 +通过以下方法之一关闭标签页: + +- 选择某一个标签页,单击按钮 ![close_icon](../common/close_icon.svg) 关闭该标签页。 +- 右键单击某一个标签页: + + 选择 **关闭标签页**,关闭此标签页。 + + 选择 **关闭其他标签页**,关闭除此标签页以外的其他标签页。 + +> ![tips](../common/tips.svg)窍门:当该标签页中只有一个工作区时,使用右键 **关闭工作区** 也可以关闭当前标签页。 + +## 远程管理 + +通过主菜单或者右键菜单打开远程管理,将远程服务器添加到管理列表后,只需单击一下便可自动登录。 + +### 添加服务器 +1. 在终端界面,选择 ![icon_menu](../common/icon_menu.svg)> **远程管理**。 +2. 单击 **添加服务器**,弹出添加服务器窗口。 +3. 输入 **服务器名**、**地址**、**用户名**、**密码**。 +4. 单击 **添加**。 + +> ![notes](../common/notes.svg)说明:在添加服务器时,您可以单击 **高级选项** 来设置更多参数。 + +![1|addssh](fig/addssh_all.png) + + +### 编辑服务器 +1. 打开终端远程管理界面,将光标置于某一个服务器上,则显示编辑按钮 ![edit_icon](../common/edit.svg),单击该按钮弹出编辑服务器窗口。 +2. 修改服务器名称、地址等信息。 +3. 单击 **保存**。 + +![0|editssh](fig/editssh.png) + + + +### 分组服务器 + +添加服务器时若设置了分组,该服务器会添加到远程管理对应的分组中。 + +1. 在终端远程管理界面,打开添加服务器或编辑服务器窗口。 +2. 单击 **高级选项**。 +3. 输入 **分组** 信息。 +4. 单击 **保存**。 + +![0|groupssh](fig/groupssh.png) + +### 搜索服务器 +当存在多个服务器或服务器分组时,服务器列表中会显示搜索输入框,可快速搜索服务器。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **远程管理**。 +3. 在搜索框中输入关键词。 +4. 按下键盘上的 **Enter** 键,显示搜索结果。 + +![0|searchssh](fig/searchssh.png) + +### 上传和下载文件 +登录远程服务器之后,可以直接通过终端上传和下载文件。 + +#### 上传文件 + +1. 打开终端远程管理界面,选择一个服务器登录。 +2. 单击鼠标右键选择 **上传文件**。 +3. 在弹出的窗口中选择要上传的文件。 +4. 单击 **上传**,文件将被上传到远程服务器。 + +> ![tips](../common/tips.svg)窍门 :连接到远程服务器后,您可直接将文件拖拽到终端来上传。 + +![0|export](fig/export.png) + +#### 下载文件 + +1. 打开终端远程管理界面,选择一个服务器登录。 +2. 单击鼠标右键选择 **下载文件**。 +3. 在弹出的窗口中选择文件需要存放的位置。 +4. 输入要下载的文件路径,文件将下载到指定位置。 + +![0|download](fig/download.png) + +### 删除服务器 + +1. 在终端远程管理界面,打开编辑服务器窗口。 +2. 单击 **高级选项**。 +3. 单击 **删除服务器**。 +4. 弹出删除服务器对话框,单击 **删除**,确认删除服务器。 + +![0|delete](fig/delete.png) + +## 主菜单 + +在主菜单中,您可以[新建窗口](#新建窗口)、自定义命令、[远程管理](#远程管理)、切换窗口主题、查看帮助手册、进一步了解终端的更多信息。 + +### 主题 + +窗口主题支持多种主题模式,也支持自定义主题颜色。 +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **主题**,您可以: + - 选择终端自带的主题。 + - 选择自定义主题,在自定义主题窗口中设置主题风格、前景色、背景色和提示符的颜色。 + +### 自定义命令 + +添加自定义命令,通过快捷键可快速调用命令。 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)> **自定义命令**。 +2. 选择 **添加命令**。 +3. 输入命令的 **名称**、**命令**、**快捷键**。 +4. 单击 **添加**。 + +### 设置 + +#### 基础设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)> **设置**。 + +2. 在 **基础设置** 页签下,您可以: + + - 设置终端字体样式和字体大小。 + + - 对终端中所有标签及远程标签的标题进行设置。 + + +#### 快捷键设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)> **设置**。 +2. 在 **快捷键** 页签下,您可以: + - 修改快捷键:单击要修改的快捷键,此时输入框呈可编辑状态,使用键盘输入新的快捷键。 + - 禁用快捷键:单击要修改的快捷键,此时输入框呈可编辑状态,按下键盘上的 **Backspace** 键。 + +#### 高级设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg) > **设置**。 +2. 在 **高级设置** 页签下,您可以: + - 设置光标样式。 + - 开启或关闭光标闪烁。 + - 开启或关闭选中文字时自动复制到剪切板。 + - 选择滚动效果。 + - 设置窗口默认大小。 + - 开启或关闭失去焦点自动隐藏雷神窗口。 + - 选择Shell配置。 + - 开启或禁用Ctrl+S和Ctrl+Q控制。 + +### 帮助 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **帮助**。 +3. 查看终端的帮助手册。 + +### 关于 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **关于**。 +3. 查看终端的版本和介绍。 + +### 退出 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **退出**。 \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_CN/terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_CN/terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,340 @@ +# 终端|deepin-terminal| + +## 概述 + +终端是⼀款集多窗⼝、⼯作区、远程管理、雷神模式等功能的⾼级终端模拟器。它拥有简单的界面,丰富而强大的功能。您可以瞬间启动和关闭,使用起来像普通文件窗口一样流畅,让您在输入命令时心无旁骛,得心应手。试试雷神模式,一边看页面一边输入命令;当有多任务进行时,您可以像在浏览器中增加页签一样建立多个窗口或者将标签页分割成多个工作区;远程管理,上传下载文件再也不是问题。更多强大功能,静待您的发掘! + +![1|interface](fig/interface.png) + +## 使用入门 +通过以下方式运行或关闭终端,或者创建终端的快捷方式。 + +### 运行终端 + +1. 单击任务栏上的启动器图标 ![deepin_launcher](../common/deepin_launcher.svg),进入启动器界面。 +2. 上下滚动鼠标滚轮浏览或通过搜索,找到终端图标 ![deepin_terminal](../common/deepin_terminal.svg),单击运行。 +3. 右键单击 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 单击 **发送到桌面**,在桌面创建快捷方式。 + - 单击 **发送到任务栏**,将应用程序固定到任务栏。 + - 单击 **开机自动启动**,将应用程序添加到开机启动项,在电脑开机时自动运行该应用。 + +> ![notes](../common/notes.svg)说明:使用快捷键 **Ctrl + Alt + T** 也可以启动终端。 + +### 关闭终端 + +- 在终端界面单击 ![close_icon](../common/close_icon.svg),退出终端。 +- 在任务栏右键单击 ![deepin_terminal](../common/deepin_terminal.svg),选择 **关闭所有**,退出终端。 +- 在终端界面单击 ![icon_menu](../common/icon_menu.svg),选择 **退出**,退出终端。 + +> ![notes](../common/notes.svg)说明:如果关闭终端时终端里面依然有程序在运行,会弹出一个对话框询问用户是否退出, 避免强制关闭引起的用户数据丢失。 + +### 查看快捷键 + +在终端界面,使用快捷键 **Ctrl + Shift + ?** 打开快捷键预览界面。熟练地使用快捷键,将大大提升您的操作效率。 + +![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在终端界面单击鼠标右键来进行常规操作。 + +![1|rightclick](fig/rightclick.png) + +### 查找 +使用“查找”功能快速查找终端显示的内容。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **查找**。 +3. 在搜索框中输入要查找的字符。 +4. 按下键盘上的 **Enter** 键,搜索到的结果将高亮显示。 +5. 如果想隐藏搜索界面,可以单击终端空白区域按下键盘上的 **Esc** 键。 + +> ![tips](../common/tips.svg)窍门:搜索时按下键盘上的 **Enter** 键从当前位置向下搜索,您也可以单击搜索界面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 图标向上或向下搜索。 + +### 网页搜索 +使用“搜索”功能可以调用浏览器,搜索终端中的内容,快捷又方便。 + +1. 在终端界面,选中想要搜索的内容。 +2. 单击鼠标右键,选择 **搜索**。 +3. 在下拉选项中选择一个网站来搜索选中的内容。 + +### 复制和粘贴 + +- 复制 + + 在终端界面,选中要复制的内容后使用快捷键 **Ctrl + Shift + C** 复制内容。 + + 在终端界面,选中要复制的内容后单击鼠标右键选择 **复制**。 +- 粘贴 + + 在终端界面,使用快捷键 **Ctrl + Shift + V** 粘贴内容。 + + 在终端界面,单击鼠标中键粘贴内容。 + + 在终端界面,单击鼠标右键选择 **粘贴**。 + + > ![notes](../common/notes.svg)说明: + > - 终端已默认开启 **选中文字时自动复制到剪切板**,您可以在 ![icon_menu](../common/icon_menu.svg) > **设置** 中进行修改。 + > - 如果当前光标下是超链接内容,即使没有选中任何内容,也可以通过右键菜单复制。 + +### 雷神模式 + +雷神模式是终端特有的便捷功能,使用快捷键 **Alt + F2** 打开雷神终端窗口,再按一下 **Alt + F2** 隐藏雷神终端窗口。 + +> ![tips](../common/tips.svg)窍门 :右键单击任务栏上的终端图标 ![deepin_terminal](../common/deepin_terminal.svg),选择 **雷神终端**,打开雷神模式的终端窗口。 + +### 打开文件和应用程序 + +在终端界面上选中当前目录下的文件,右键菜单会显示 **打开** 菜单项,单击 **打开** 调用系统的应用来打开选中的文件。 + +1. 在终端界面,输入 **ls -al** 显示当前目录下的文件。 +2. 双击鼠标左键,选中文件名。 +3. 单击鼠标右键选择 **打开**。 + +![1|openfile](fig/openfile.png) + + +### 调整编码方式 +当某些文件信息显示乱码或者错误时,可以通过调整编码方式来解决问题。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **编码**。 +3. 在右侧展开的面板中,选择一种编码方式并查看调整后的效果。 +4. 重复步骤3直到内容显示正确。 + +> ![notes](../common/notes.svg)说明:通常终端都会匹配正确的编码方式,一些特殊情况下出现错误后,可以手动调整编码方式,如果您确定需要哪种编码方式可以直接选择,不确定的情况下多尝试几次。 + +## 窗口操作 + +终端窗口是实现各种功能的基础,可以创建多个标签页,也可以分割多个工作区。 + +### 新建窗口 + +在终端界面,通过以下方法新建窗口: + + - 单击 ![menu](../common/icon_menu.svg) > **新建窗口**,打开一个新的终端窗口。 + - 右键单击任务栏上的终端图标 ![deepin_terminal](../common/deepin_terminal.svg),选择 **新建窗口**。 + +![0|newwindow](fig/newwindow.png) + +### 全屏显示 + +1. 在终端界面,按下键盘上的 **F11** 键或单击鼠标右键选择 **全屏**,终端窗口将全屏显示。 +2. 如果要恢复正常大小显示,按下键盘上的 **F11** 键或单击鼠标右键选择 **退出全屏**。 + +### 分割工作区 + +1. 在终端界面,单击鼠标右键。 + + - 选择 **纵向分屏**,工作区被分为左右两个部分。 + - 选择 **横向分屏**,工作区被分为上下两个部分。 +2. 您可以在各个工作区中输入命令,并同时查看到命令执行的结果。 + +> ![tips](../common/tips.svg)窍门 :您可以使用快捷键 **Ctrl + Shift + J** 纵向分屏、 **Ctrl + Shift + H** 横向分屏。 + +![1|splitscreen](fig/splitscreen.png) + + +### 关闭工作区 +执行以下步骤关闭多个工作区: + +1. 在终端界面,将鼠标指针置于其中一个工作区中。 +2. 单击鼠标右键,您可以: + - 选择 **关闭工作区**,关闭此工作区。 + - 选择 **关闭其他工作区**,关闭除此工作区以外的其他工作区。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 标签页操作 + +### 新建标签页 + +通过以下方法之一新建标签页: +- 在终端界面,单击标签页上的按钮 **+**,新建标签页。 +- 在终端界面,单击鼠标右键,选择 **新建标签页**。 +- 使用快捷键 **Ctrl + Shift + T** 新建标签页。 + + + +### 切换/调整标签页 +通过以下方法在多个标签页之间任意切换或调整: + +- 使用快捷键 **Ctrl + Tab** 或将鼠标指针置于标签页上,滚动鼠标滚轮依次切换标签页。 +- 使用快捷键 **Ctrl + Shift + 1~9** 数字键来选择对应的标签页,当标签页大于9时,将选中最后一个标签页而不是第9个标签页。 +- 同一窗口内拖拽标签页排序。 +- 拖拽标签页移出当前窗口,创建一个新的窗口。 +- 拖拽标签页从一个窗口到另一个窗口中。 + + +### 重命名标签页 + +1. 在终端界面,右键单击一个标签页。 +2. 选择 **重命名标题**。 + - 标签标题格式:自定义当前标签页名称;可在 **插入** 下拉选项中选择一种格式。 + - 远程标签标题格式:自定义远程标签页名称;可在 **插入** 下拉选项中选择一种格式。当工作区连接远程服务器时,标签页会显示您所设置的参数。 + +3. 单击 **确定**。 + +> ![tips](../common/tips.svg)窍门 :您也可以按下键盘上的 **F2** 来重命名标签页。 + +![1|rename](fig/rename.png) + +### 关闭标签页 +通过以下方法之一关闭标签页: + +- 选择某一个标签页,单击按钮 ![close_icon](../common/close_icon.svg) 关闭该标签页。 +- 右键单击某一个标签页: + + 选择 **关闭标签页**,关闭此标签页。 + + 选择 **关闭其他标签页**,关闭除此标签页以外的其他标签页。 + +> ![tips](../common/tips.svg)窍门:当该标签页中只有一个工作区时,使用右键 **关闭工作区** 也可以关闭当前标签页。 + +## 远程管理 + +通过主菜单或者右键菜单打开远程管理,将远程服务器添加到管理列表后,只需单击一下便可自动登录。 + +### 添加服务器 +1. 在终端界面,选择 ![icon_menu](../common/icon_menu.svg) > **远程管理**。 +2. 选择 **添加服务器**,弹出添加服务器窗口。 +3. 输入 **服务器名**、**地址**、**用户名**、**密码**。 +4. 单击 **添加**。 + +> ![notes](../common/notes.svg)说明:在添加服务器时,您可以单击 **高级选项** 来设置更多参数。 + +![1|addssh](fig/addssh_all.png) + + +### 编辑服务器 +1. 打开终端远程管理界面,将光标置于某一个服务器上,则显示编辑按钮 ![edit_icon](../common/edit_icon.svg),单击该按钮弹出编辑服务器窗口。 +2. 修改服务器名称、地址等信息。 +3. 单击 **保存**。 + +![0|editssh](fig/editssh.png) + + + +### 分组服务器 + +添加服务器时若设置了分组,该服务器会添加到远程管理对应的分组中。 + +1. 在终端远程管理界面,打开添加服务器或编辑服务器窗口。 +2. 单击 **高级选项**。 +3. 输入 **分组** 信息。 +4. 单击 **保存**。 + +![0|groupssh](fig/groupssh.png) + +### 搜索服务器 +当存在多个服务器或服务器分组时,服务器列表中会显示搜索输入框,可快速搜索服务器。 + +1. 在终端界面,单击鼠标右键。 +2. 选择 **远程管理**。 +3. 在搜索框中输入关键词。 +4. 按下键盘上的 **Enter** 键,显示搜索结果。 + +![0|searchssh](fig/searchssh.png) + +### 上传和下载文件 +登录远程服务器之后,可以直接通过终端上传和下载文件。 + +#### 上传文件 + +1. 打开终端远程管理界面,选择一个服务器登录。 +2. 单击鼠标右键选择 **上传文件**。 +3. 在弹出的窗口中选择要上传的文件。 +4. 单击 **上传**,文件将被上传到远程服务器。 + +> ![tips](../common/tips.svg)窍门 :连接到远程服务器后,您可直接将文件拖拽到终端来上传。 + +![0|export](fig/export.png) + +#### 下载文件 + +1. 打开终端远程管理界面,选择一个服务器登录。 +2. 单击鼠标右键选择 **下载文件**。 +3. 在弹出的窗口中选择文件需要存放的位置。 +4. 输入要下载的文件路径,文件将下载到指定位置。 + +![0|download](fig/download.png) + +### 删除服务器 + +1. 在终端远程管理界面,打开编辑服务器窗口。 +2. 单击 **高级选项**。 +3. 单击 **删除服务器**。 +4. 弹出删除服务器对话框,单击 **删除**,确认删除服务器。 + +![0|delete](fig/delete.png) + +## 主菜单 + +在主菜单中,您可以 [新建窗口](#新建窗口)、自定义命令、[远程管理](#远程管理)、切换窗口主题、查看帮助手册、进一步了解终端的更多信息。 + +### 主题 + +窗口主题支持多种主题模式,也支持自定义主题颜色。 +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **主题**,您可以: + - 选择终端自带的主题。 + - 选择自定义主题,在自定义主题窗口中设置主题风格、前景色、背景色和提示符的颜色。 + +### 自定义命令 + +添加自定义命令,通过快捷键可快速调用命令。 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg) > **自定义命令**。 +2. 单击按钮 **添加命令**。 +3. 输入命令的 **名称**、**命令**、**快捷键**。 +4. 单击 **添加**。 + +### 设置 + +#### 基础设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg) > **设置**。 +2. 在 **基础设置** 页签下,您可以: + - 调节终端的背景透明度。 + + >![notes](../common/notes.svg)说明:当窗口特效关闭后,透明度调节功能会被隐藏。 + + - 设置终端字体样式和字体大小。 + + - 可以对终端中所有标签及远程标签的标题进行设置。 + + +#### 快捷键设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg) > **设置**。 +2. 在 **快捷键** 页签下,您可以: + - 修改快捷键:单击要修改的快捷键,此时输入框呈可编辑状态,使用键盘输入新的快捷键。 + - 禁用快捷键:单击要修改的快捷键,此时输入框呈可编辑状态,按下键盘上的 **Backspace** 键。 + +#### 高级设置 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg) > **设置**。 +2. 在 **高级设置** 页签下,您可以: + - 设置光标样式。 + - 开启或关闭光标闪烁。 + - 开启或关闭选中文字时自动复制到剪切板。 + - 选择滚动效果。 + - 设置窗口默认大小。 + - 开启或关闭背景模糊。 + + >![notes](../common/notes.svg)说明:当窗口特效关闭后,背景模糊选项会被隐藏。 + + - 开启或关闭失去焦点自动隐藏雷神窗口。 + - 选择Shell配置。 + - 开启或禁用Ctrl+S和Ctrl+Q控制。 + + +### 帮助 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **帮助**。 +3. 查看终端的帮助手册。 + +### 关于 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **关于**。 +3. 查看终端的版本和介绍。 + +### 退出 + +1. 在终端界面,单击 ![icon_menu](../common/icon_menu.svg)。 +2. 选择 **退出**。 \ No newline at end of file Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/allssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/allssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/closesplitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/closesplitscreen.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/deletessh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/deletessh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/download.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/download.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/editssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/editssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/export.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/export.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/groupssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/groupssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/hotkey.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/hotkey.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/interface.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/interface.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/newwindow.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/newwindow.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/openfile.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/openfile.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/rename.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/rename.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/rightclick.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/rightclick.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/searchssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/searchssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/fig/splitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/fig/splitscreen.png differ diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/s_terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/s_terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/s_terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/s_terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,334 @@ +# 終端|deepin-terminal| + +## 概述 + +終端是⼀款集多窗⼝、⼯作區、遠程管理、雷神模式等功能的⾼級終端模擬器。它擁有簡單的界面,豐富而強大的功能,可以瞬間啟動和關閉,使用起來像普通文件窗口一樣流暢,讓您在輸入命令時心無旁騖,得心應手。試試雷神模式,一邊看頁面一邊輸入命令;當有多任務進行時,您可以像在瀏覽器中增加頁籤一樣建立多個工作區;遠程管理,上傳下載文件再也不是問題。更多強大功能,靜待您的發掘! + +![1|interface](fig/interface.png) + +## 使用入門 +通過以下方式運行或關閉終端,或者創建終端的快捷方式。 + +### 運行終端機 + +1. 單擊任務欄上的啟動器圖標 ![deepin_launcher](../common/deepin_launcher.svg),進入啟動器界面。 +2. 上下滾動鼠標滾輪瀏覽或通過搜索,找到終端圖標 ![deepin_terminal](../common/deepin_terminal.svg),單擊運行。 +3. 右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 單擊 **傳送到桌面**,在桌面創建快捷方式。 + - 單擊 **傳送到任務欄**,將應用程序固定到任務欄。 + - 單擊 **加至開機啟動**,將應用程序添加到開機啟動項,在電腦開機時自動運行該應用。 + +> ![notes](../common/notes.svg)說明:使用快捷鍵 **Ctrl + Alt + T** 也可以啟動終端。 + +### 關閉終端機 + +- 在終端界面單擊 ![close_icon](../common/close_icon.svg),關閉終端。 +- 在任務欄右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **關閉所有** 來關閉終端。 +- 在終端界面單擊 ![icon_menu](../common/icon_menu.svg),選擇 **退出** 來關閉終端。 + +> ![notes](../common/notes.svg)說明:如果關閉終端時終端裏面依然有程序在運行,會彈出一個對話框詢問是否退出, 避免強制關閉引起的數據丟失。 + +### 查看快捷鍵 + +在終端界面,使用快捷鍵 **Ctrl + Shift + ?** 打開快捷鍵預覽界面。熟練地使用快捷鍵,將大大提升您的操作效率。 + + ![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在終端界面單擊鼠標右鍵來進行常規操作。 + +![1|rightclick](fig/rightclick.png) + +### 查找 +使用“查找”功能來快速查找終端顯示的內容。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 選擇 **查找**。 +3. 在搜索框中輸入要查找的字符。 +4. 按下鍵盤上的 **Enter** 鍵,搜索到的結果將高亮顯示。 +5. 如果想隱藏搜索界面,可以單擊終端空白區域按下鍵盤上的 **Esc** 鍵。 + +> ![tips](../common/tips.svg)竅門:搜索時按下鍵盤上的 **Enter** 鍵是從當前位置向下搜索,您也可以通過單擊搜索界面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 按鈕來向上搜索或向下搜索。 + +### 網頁搜尋 +終端可以調用瀏覽器搜尋終端中的內容,快捷又方便。 + +1. 在終端界面,選中想要搜尋的內容。 +2. 單擊鼠標右鍵,選擇 **搜尋**。 +3. 在下拉選項中選擇一個網站來搜尋選中的內容。 + +### 複製和黏貼 + +- 複製 + + 在終端界面,選中要複製的內容後使用快捷鍵 **Ctrl + Shift + C** 複製內容。 + + 在終端界面,選中要複製的內容後單擊鼠標右鍵選擇 **複製**。 +- 黏貼 + + 在終端界面,使用快捷鍵 **Ctrl + Shift + V** 黏貼內容。 + + 在終端界面,單擊鼠標中鍵黏貼內容。 + + 在終端界面,單擊鼠標右鍵選擇 **黏貼**。 + + > ![tips](../common/tips.svg)竅門: + > - 終端已默認開啟 **選中文字時自動複製到剪切板**,您可以在![icon_menu](../common/icon_menu.svg) > **設置** 中進行修改。 + > - 如果當前光標下是超鏈接內容,即使沒有選中任何內容,也可以通過右鍵菜單複製。 + + +### 雷神模式 +雷神模式是終端特有的便捷功能,只需使用快捷鍵 **Alt + F2** 就可以打開雷神終端窗口,再按一下 **Alt + F2** 隱藏雷神終端窗口。 + +> ![tips](../common/tips.svg)竅門 :您也可以右鍵單擊任務欄上的圖標 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **雷神終端**,打開雷神模式的終端窗口。 + +### 開啟文件和應用程序 + +在終端界面上選中當前目錄下的文件,右鍵菜單會顯示 **開啟** 菜單項,單擊 **開啟** 調用系統中的應用來打開選中的文件。 + +1. 在終端界面,輸入 **ls -al** 顯示當前目錄下的文件。 +2. 雙擊鼠標左鍵,選中文件名。 +3. 單擊鼠標右鍵選擇 **打開**。 + +![1|openfile](fig/openfile.png) + + +### 調整編碼方式 +當某些文件訊息顯示亂碼或者錯誤時,可以通過調整編碼方式來解決問題。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 單擊 **編碼**。 +3. 在右側展開的面板中,選擇一種編碼方式並查看調整後的效果。 +4. 重複步驟3直到內容顯示正確。 + +> ![notes](../common/notes.svg)說明:通常終端都會匹配正確的編碼方式,一些特殊情況下出現錯誤後,可以手動調整編碼方式,如果您確定需要哪種編碼方式可以直接選擇,不確定的情況下可以多嘗試幾次。 + +## 窗口操作 + +終端窗口是實現各種功能的基礎,可以創建多個標籤頁,也可以分割多個工作區。 + +### 新建視窗 + +在終端界面,通過以下方法新建視窗: + + - 選擇 ![menu](../common/icon_menu.svg) > **新建視窗**,打開一個新的終端。 + - 右鍵單擊任務欄上的圖標 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **新建視窗**。 + +![0|newwindow](fig/newwindow.png) + +### 全螢幕顯示 + +1. 在終端界面,按下鍵盤上的 **F11** 鍵或單擊鼠標右鍵選擇 **全螢幕**,視窗將全螢幕顯示。 +2. 如果要恢復正常大小顯示,按下鍵盤上的 **F11** 鍵或單擊鼠標右鍵選擇 **離開全螢幕**。 + + +### 分割工作區 + +1. 在終端界面,單擊鼠標右鍵。 + - 選擇 **縱向分屏**,工作區被分為左右兩個部分。 + - 選擇 **橫向分屏**,工作區被分為上下兩個部分。 +2. 您可以在各個工作區中輸入命令,同時查看到命令執行的結果。 + +> ![tips](../common/tips.svg)竅門 :您也可以使用快捷鍵 **Ctrl + Shift + J** 縱向分屏、 **Ctrl + Shift + H** 橫向分屏。 + +![1|splitscreen](fig/splitscreen.png) + + +### 關閉工作區 +執行以下操作關閉工作區: + +1. 在終端界面,將鼠標指針置於其中一個終端視窗中。 +2. 單擊右鍵,您可以: + - 選擇 **關閉工作區**,關閉此工作區。 + - 選擇 **關閉其他工作區**,關閉除此工作區以外的其他工作區。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 標籤頁操作 + +### 新建標籤頁 + +通過以下方法之一新建標籤頁: +- 在終端界面,單擊標籤頁上的按鈕 **+** ,新建一個標籤頁。 +- 在終端界面,單擊鼠標右鍵,選擇 **新建標籤頁**。 +- 使用快捷鍵 **Ctrl + Shift + T** 新建標籤頁。 + + +### 切換/調整標籤頁 +通過以下方法在多個標籤頁之間任意切換或調整: + +- 使用快捷鍵 **Ctrl + Tab** 或將鼠標指針置於標籤頁上,滾動鼠標滾輪依次切換標籤頁。 +- 使用快捷鍵 **Ctrl + Shift + 1~9** 數字鍵來選擇對應的標籤頁,當標籤頁大於9時,將選中最後一個標籤頁而不是第9個標籤頁。 +- 同一窗口內拖拽標籤頁排序。 +- 拖拽標籤頁移出當前窗口,創建一個新的窗口。 +- 拖拽標籤頁從一個窗口到另一個窗口中。 + + + +### 重命名標籤頁 + +1. 在終端界面,右鍵單擊一個標籤頁。 +2. 選擇 **重命名標題**。 + - 標籤標題格式:自定義當前標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。 + - 遠程標籤標題格式:自定義遠程標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。當工作區連接遠程伺服器時,標籤頁會顯示您所設置的參數。 + +3. 單擊 **確定**。 + +> ![tips](../common/tips.svg)竅門 :您也可以按下鍵盤上的 **F2** 來重命名標籤頁。 + +![1|rename](fig/rename.png) + +### 關閉標籤頁 +通過以下方法之一關閉標籤頁: + +- 選擇某一個標籤頁,單擊按鈕 ![close_icon](../common/close_icon.svg) 關閉該標籤頁。 +- 右鍵單擊某一個標籤頁: + + 選擇 **關閉標籤頁**,關閉此標籤頁。 + + 選擇 **關閉其他標籤頁**,關閉除此標籤頁以外的其他標籤頁。 + +> ![tips](../common/tips.svg)竅門:當該標籤頁中只有一個工作區時,使用右鍵 **關閉工作區** 也可以關閉當前標籤頁。 + +## 遠程伺服器管理 + +通過主菜單或者右鍵菜單打開遠程管理,將遠程伺服器添加到管理列表後,只需單擊一下便可以自動登錄。 + +### 添加伺服器 +1. 在終端界面,選擇 ![icon_menu](../common/icon_menu.svg) > **遠程管理**。 +2. 選擇 **添加伺服器**,彈出添加伺服器窗口。 +3. 輸入 **伺服器名**、**地址**、**用戶名**、**密碼**。 +4. 單擊 **添加**。 + +> ![notes](../common/notes.svg)說明:在添加伺服器時,您可以單擊 **高級選項** 來設置更多參數。 + +![1|addssh](fig/allssh.png) + + +### 編輯伺服器 +1. 打開終端遠程管理界面,將光標置於某一個伺服器上,則顯示編輯按鈕 ![edit_icon](../common/edit.svg),單擊該按鈕彈出編輯伺服器窗口。 +2. 修改伺服器名稱、地址等訊息。 +3. 單擊 **保存**。 + +![0|editssh](fig/editssh.png) + + + +### 分組伺服器 + +添加伺服器時若設置了分組, 該伺服器會被添加到遠程管理對應的分組中。 + +1. 在終端遠程管理界面,打開添加伺服器或編輯伺服器窗口。 +2. 單擊 **高級選項**。 +3. 輸入 **分組** 訊息。 +4. 單擊 **保存**。 + +![0|groupssh](fig/groupssh.png) + +### 搜索伺服器 + +當存在多個伺服器或伺服器分組時, 會在頂部顯示搜索輸入框, 可以快速搜索伺服器。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 選擇 **遠程管理**。 +3. 在搜索框中輸入關鍵詞。 +4. 按下鍵盤上的 **Enter** 鍵,顯示搜索結果。 + +![0|searchssh](fig/searchssh.png) + +### 上傳和下載文件 + +登錄遠程伺服器之後,可以直接通過終端機上傳和下載文件。 + +#### 上傳文件 + +1. 在終端機遠程管理界面,選擇一個伺服器登錄。 +2. 單擊鼠標右鍵選擇 **上傳文件**。 +3. 在彈出的窗口中選擇要上傳的文件。 +5. 單擊 **上傳**,文件將被上傳到遠程伺服器。 +> ![tips](../common/tips.svg)竅門 :連接到遠程伺服器後,可以直接將文件拖拽到終端來上傳。 + +![0|export](fig/export.png) + +#### 下載文件 + +1. 在終端遠程管理界面,選擇一個伺服器登錄。 +2. 單擊鼠標右鍵選擇 **下載文件**。 +3. 在彈出的窗口中選擇文件要存放的位置。 +4. 輸入要下載的文件路徑,文件將下載到指定位置。 + +![0|download](fig/download.png) + +### 刪除伺服器 + +1. 在終端界面,打開編輯伺服器對話框。 +2. 單擊 **高級選項**。 +3. 單擊 **刪除伺服器**。 +4. 彈出刪除伺服器對話框,單擊 **刪除**,確認刪除該伺服器。 + +![0|delete](fig/deletessh.png) + +## 主菜單 + +在主菜單中,您可以[新建視窗](#新建視窗)、自定義命令、[遠程管理](#遠程管理)、切換窗口主題、查看幫助手冊,了解終端的更多訊息。 + +### 主題 + +窗口主題支持多種主題模式,也支持自定義主題顏色。 +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **主題**,您可以: + - 選擇終端自帶的主題。 + - 選擇自定義主題,在自定義主題窗口中,可分別設置主題風格、前景色、背景色和提示符的顏色。 + +### 自定義命令 + +添加自定義命令,通過快捷鍵快速調用命令。 +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **自定義命令**。 +2. 選擇 **添加命令**。 +3. 輸入命令的 **名稱**、**命令**、**快捷鍵**。 +4. 單擊 **添加**。 + +### 設置 + +#### 基本設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)> **設置**。 +2. 在 **基本** 設置頁簽下,您可以: + - 設置終端字體樣式和字體大小。 + - 對終端中所有標籤及遠程標籤的標題進行設置。 + +#### 快捷鍵設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **設置**。 +2. 在 **快捷鍵** 頁簽下,您可以: + - 修改快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,使用鍵盤輸入新的快捷鍵。 + - 禁用快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,按下鍵盤上的 **Backspace** 鍵。 + +#### 高級設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **設置**。 +2. 在 **高級設置** 頁簽下,您可以: + - 設置光標樣式。 + - 開啟或關閉光標閃爍。 + - 開啟或關閉選中文字時自動複製到剪切板。 + - 選擇滾動效果。 + - 設置窗口默認大小。 + - 開啟或關閉失去焦點自動隱藏雷神窗口。 + - 選擇Shell配置。 + - 開啟或禁用Ctrl+S和Ctrl+Q控制。 + + + + +### 幫助 + +查看幫助手冊,進一步了解和使用終端。 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **幫助**。 +3. 查看終端的幫助手冊。 + +### 關於 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **關於**。 +3. 查看終端的版本和介紹。 + +### 退出 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **退出**。 \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_HK/terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_HK/terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,340 @@ +# 終端|deepin-terminal| + +## 概述 + +終端是⼀款集多窗⼝、⼯作區、遠程管理、雷神模式等功能的⾼級終端模擬器。它擁有簡單的界面,豐富而強大的功能,可以瞬間啟動和關閉,使用起來像普通文件窗口一樣流暢,讓您在輸入命令時心無旁騖,得心應手。試試雷神模式,一邊看頁面一邊輸入命令;當有多任務進行時,您可以像在瀏覽器中增加頁籤一樣建立多個工作區;遠程管理,上傳下載文件再也不是問題。更多強大功能,靜待您的發掘! + +![1|interface](fig/interface.png) + +## 使用入門 +通過以下方式運行或關閉終端,或者創建終端機的快捷方式。 + +### 運行終端機 + +1. 單擊任務欄上的啟動器圖標 ![deepin_launcher](../common/deepin_launcher.svg),進入啟動器界面。 +2. 上下滾動鼠標滾輪瀏覽或通過搜索,找到終端圖標 ![deepin_terminal](../common/deepin_terminal.svg),單擊運行。 +3. 右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 單擊 **傳送到桌面**,在桌面創建快捷方式。 + - 單擊 **傳送到任務欄**,將應用程序固定到任務欄。 + - 單擊 **加至開機啟動**,將應用程序添加到開機啟動項,在電腦開機時自動運行該應用。 + +> ![notes](../common/notes.svg)說明:使用快捷鍵 **Ctrl + Alt + T** 也可以啟動終端。 + +### 關閉終端機 + +- 在終端界面單擊 ![close_icon](../common/close_icon.svg),關閉終端。 +- 在任務欄右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **關閉所有**,關閉終端。 +- 在終端機界面單擊 ![icon_menu](../common/icon_menu.svg),選擇 **退出**,關閉終端。 + +> ![notes](../common/notes.svg)說明:如果關閉終端時終端裏面依然有程序在運行,會彈出一個對話框詢問是否退出, 避免強制關閉引起的數據丟失。 + +### 查看快捷鍵 + +在終端界面,使用快捷鍵 **Ctrl + Shift + ?** 打開快捷鍵預覽界面。熟練地使用快捷鍵,將大大提升您的操作效率。 + + ![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在終端界面單擊鼠標右鍵來進行常規操作。 + +![1|rightclick](fig/rightclick.png) + +### 查找 +使用“查找”功能來快速查找終端顯示的內容。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 選擇 **查找**。 +3. 在搜索框中輸入要查找的字符。 +4. 按下鍵盤上的 **Enter** 鍵,搜索到的結果將高亮顯示。 +5. 如果想隱藏搜索界面,可以單擊終端空白區域按下鍵盤上的 **Esc** 鍵。 + +> ![tips](../common/tips.svg)竅門:搜索時按下鍵盤上的 **Enter** 鍵是從當前位置向下搜索,您也可以通過單擊搜索界面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 按鈕來向上搜索或向下搜索。 + +### 網頁搜尋 +終端可以調用瀏覽器搜尋終端中的內容,快捷又方便。 + +1. 在終端界面,選中想要搜尋的內容。 +2. 單擊鼠標右鍵,選擇 **搜尋**。 +3. 在下拉選項中選擇一個網站來搜尋選中的內容。 + +### 複製和黏貼 + +- 複製 + + 在終端界面,選中要複製的內容後使用快捷鍵 **Ctrl + Shift + C** 複製內容。 + + 在終端機界面,選中要複製的內容後單擊鼠標右鍵選擇 **複製**。 +- 黏貼 + + 在終端界面,使用快捷鍵 **Ctrl + Shift + V** 黏貼內容。 + + 在終端界面,單擊鼠標中鍵黏貼內容。 + + 在終端界面,單擊鼠標右鍵選擇 **黏貼**。 + + > ![tips](../common/tips.svg)竅門: + > - 終端已默認開啟 **選中文字時自動複製到剪切板**,您可以在 ![icon_menu](../common/icon_menu.svg) > **設置** 中進行修改。 + > - 如果當前光標下是超鏈接內容,即使沒有選中任何內容,也可以通過右鍵菜單複製。 + + +### 雷神模式 + +雷神模式是終端特有的便捷功能,只需使用快捷鍵 **Alt + F2** 就可以打開雷神終端窗口,再按一下 **Alt + F2** 隱藏雷神終端窗口。 + +> ![tips](../common/tips.svg)竅門 :您也可以右鍵單擊任務欄上的圖標 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **雷神終端**,打開雷神模式的終端窗口。 + +### 開啟文件和應用程序 + +在終端界面上選中當前目錄下的文件,右鍵菜單會顯示 **開啟** 菜單項,單擊 **開啟** 調用系統中的應用來打開選中的文件。 + +1. 在終端界面,輸入 **ls -al** 顯示當前目錄下的文件。 +2. 雙擊鼠標左鍵,選中文件名。 +3. 單擊鼠標右鍵選擇 **打開**。 + +![1|openfile](fig/openfile.png) + + +### 調整編碼方式 +當某些文件訊息顯示亂碼或者錯誤時,可以通過調整編碼方式來解決問題。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 單擊 **編碼**。 +3. 在右側展開的面板中,選擇一種編碼方式並查看調整後的效果。 +4. 重複步驟3直到內容顯示正確。 + +> ![notes](../common/notes.svg)說明:通常終端都會匹配正確的編碼方式,一些特殊情況下出現錯誤後,可以手動調整編碼方式,如果您確定需要哪種編碼方式可以直接選擇,不確定的情況下可以多嘗試幾次。 + +## 窗口操作 + +終端窗口是實現各種功能的基礎,可以創建多個標籤頁,也可以分割多個工作區。 + +### 新建視窗 + +在終端界面,通過以下方法新建視窗: + + - 選擇 ![menu](../common/icon_menu.svg) > **新建視窗**,打開一個新的終端。 + - 右鍵單擊任務欄上的圖標 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **新建視窗**。 + +![0|newwindow](fig/newwindow.png) + +### 全螢幕顯示 + +1. 在終端界面,按下鍵盤上的 **F11** 鍵或單擊鼠標右鍵選擇 **全螢幕**,視窗將全螢幕顯示。 +2. 如果要恢復正常大小顯示,按下鍵盤上的 **F11** 鍵或單擊鼠標右鍵選擇 **離開全螢幕**。 + + +### 分割工作區 + +1. 在終端界面,單擊鼠標右鍵。 + - 選擇 **縱向分屏**,工作區被分為左右兩個部分。 + - 選擇 **橫向分屏**,工作區被分為上下兩個部分。 +2. 您可以在各個工作區中輸入命令,並同時查看到命令執行的結果。 + +> ![tips](../common/tips.svg)竅門 :您也可以使用快捷鍵 **Ctrl + Shift + J** 縱向分屏、**Ctrl + Shift + H** 橫向分屏。 + +![1|splitscreen](fig/splitscreen.png) + + +### 關閉工作區 +執行以下操作來關閉工作區: + +1. 在終端界面,將鼠標指針置於其中一個終端視窗中。 +2. 單擊右鍵,您可以: + - 選擇 **關閉工作區**,關閉此工作區。 + - 選擇 **關閉其他工作區**,關閉除此工作區以外的其他工作區。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 標籤頁操作 + +### 新建標籤頁 + +通過以下方法之一新建標籤頁: +- 在終端界面,單擊標籤頁上的按鈕 **+** ,新建一個標籤頁。 +- 在終端界面,單擊鼠標右鍵,選擇 **新建標籤頁**。 +- 使用快捷鍵 **Ctrl + Shift + T** 新建標籤頁。 + + +### 切換/調整標籤頁 +通過以下方法在多個標籤頁之間任意切換或調整: + +- 使用快捷鍵 **Ctrl + Tab** 或將鼠標指針置於標籤頁上,滾動鼠標滾輪依次切換標籤頁。 +- 使用快捷鍵 **Ctrl + Shift + 1~9** 數字鍵來選擇對應的標籤頁,當標籤頁大於9時,將選中最後一個標籤頁而不是第9個標籤頁。 +- 同一窗口內拖拽標籤頁排序。 +- 拖拽標籤頁移出當前窗口,創建一個新的窗口。 +- 拖拽標籤頁從一個窗口到另一個窗口中。 + + +### 重命名標籤頁 + +1. 在終端界面,右鍵單擊一個標籤頁。 +2. 選擇 **重命名標題**。 + - 標籤標題格式:自定義當前標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。 + - 遠程標籤標題格式:自定義遠程標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。當工作區連接遠程伺服器時,標籤頁會顯示您所設置的參數。 + +3. 單擊 **確定**。 + +> ![tips](../common/tips.svg)竅門 :您也可以按下鍵盤上的 **F2** 來重命名標籤頁。 + +![1|rename](fig/rename.png) + +### 關閉標籤頁 +通過以下方法之一關閉標籤頁: + +- 選擇某一個標籤頁,單擊按鈕 ![close_icon](../common/close_icon.svg) 關閉該標籤頁。 +- 右鍵單擊某一個標籤頁: + + 選擇 **關閉標籤頁**,關閉此標籤頁。 + + 選擇 **關閉其他標籤頁**,關閉除此標籤頁以外的其他標籤頁。 + +> ![tips](../common/tips.svg)竅門:當該標籤頁中只有一個工作區時,使用右鍵 **關閉工作區** 也可以關閉當前標籤頁。 + +## 遠程管理 + +通過主菜單或者右鍵菜單打開遠程管理,將遠程伺服器添加到管理列表後,只需單擊一下便可以自動登錄。 + +### 添加伺服器 +1. 在終端界面,選擇 ![icon_menu](../common/icon_menu.svg) > **遠程管理**。 +2. 選擇 **添加伺服器**,彈出添加伺服器窗口。 +3. 輸入 **伺服器名**、**地址**、**用戶名**、**密碼**。 +4. 單擊 **添加**。 + +> ![notes](../common/notes.svg)說明:在添加伺服器時,您可以單擊 **高級選項** 來設置更多參數。 + +![1|addssh](fig/allssh.png) + + +### 編輯伺服器 +1. 打開終端遠程管理界面,將光標置於某一個伺服器上,則顯示編輯按鈕 ![edit_icon](../common/edit.svg),單擊該按鈕彈出編輯伺服器窗口。 +2. 修改伺服器名稱、地址等訊息。 +3. 單擊 **保存**。 + +![0|editssh](fig/editssh.png) + + + +### 分組伺服器 + +添加伺服器時若設置了分組, 該伺服器會被添加到遠程管理對應的分組中。 + +1. 在終端遠程管理界面,打開添加伺服器或編輯伺服器窗口。 +2. 單擊 **高級選項**。 +3. 輸入 **分組** 訊息。 +4. 單擊 **保存**。 + +![0|groupssh](fig/groupssh.png) + +### 搜索伺服器 + +當存在多個伺服器或伺服器分組時, 會在頂部顯示搜索輸入框, 可以快速搜索伺服器。 + +1. 在終端界面,單擊鼠標右鍵。 +2. 選擇 **遠程管理**。 +3. 在搜索框中輸入關鍵詞。 +4. 按下鍵盤上的 **Enter** 鍵,顯示搜索結果。 + +![0|searchssh](fig/searchssh.png) + +### 上傳和下載文件 + +登錄遠程伺服器之後,可以直接通過終端機上傳和下載文件。 + +#### 上傳文件 + +1. 在終端遠程管理界面,選擇一個伺服器登錄。 +2. 單擊鼠標右鍵選擇 **上傳文件**。 +3. 在彈出的窗口中選擇要上傳的文件。 +5. 單擊 **上傳**,文件將被上傳到遠程伺服器。 +> ![tips](../common/tips.svg)竅門 :連接到遠程伺服器後,您可直接將文件拖拽到終端來上傳。 + +![0|export](fig/export.png) + +#### 下載文件 + +1. 在終端遠程管理界面,選擇一個伺服器登錄。 +2. 單擊鼠標右鍵選擇 **下載文件**。 +3. 在彈出的窗口中選擇文件要存放的位置。 +4. 輸入要下載的文件路徑,文件將下載到指定位置。 + +![0|download](fig/download.png) + +### 刪除伺服器 + +1. 在終端界面,打開編輯伺服器對話框。 +2. 單擊 **高級選項**。 +3. 單擊 **刪除伺服器**。 +4. 彈出刪除伺服器對話框,單擊 **刪除** 來確認刪除伺服器。 + +![0|delete](fig/deletessh.png) + +## 主菜單 + +在主菜單中,您可以[新建視窗](#新建視窗)、自定義命令、 [遠程管理](#遠程管理)、切換窗口主題、查看幫助手冊,了解終端的更多訊息。 + +### 主題 + +窗口主題支持多種主題模式,也支持自定義主題顏色。 +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **主題**,您可以: + - 選擇終端自帶的主題。 + - 選擇自定義主題,在自定義主題窗口中,可分別設置主題風格、前景色、背景色和提示符的顏色。 + +### 自定義命令 + +添加自定義命令,通過快捷鍵快速調用命令。 +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **自定義命令**。 +2. 選擇 **添加命令**。 +3. 輸入命令的 **名稱**、**命令**、**快捷鍵**。 +4. 單擊 **添加**。 + +### 設置 + +#### 基本設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **設置**。 +2. 在 **基本** 設置頁簽下,您可以: + - 設置終端的背景透明度。 + + >![notes](../common/notes.svg)說明:當視窗特效關閉後,透明度調節功能將會被隱藏。 + + - 設置終端機的字體樣式和字體大小。 + - 對終端中所有標籤及遠程標籤的標題進行設置。 + +#### 快捷鍵設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **設置**。 +2. 在 **快捷鍵** 頁簽下,您可以: + - 修改快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,使用鍵盤輸入新的快捷鍵。 + - 禁用快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,按下鍵盤上的 **Backspace** 鍵。 + +#### 高級設置 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg) > **設置**。 +2. 在 **高級設置** 頁簽下,您可以: + - 設置光標樣式。 + - 開啟或關閉光標閃爍。 + - 開啟或關閉選中文字時自動複製到剪切板。 + - 選擇滾動效果。 + - 設置窗口默認大小。 + - 開啟或關閉背景模糊。 + + >![notes](../common/notes.svg)說明:當窗口特效關閉後,背景模糊選項將會被隱藏。 + + - 開啟或關閉失去焦點自動隱藏雷神窗口。 + - 選擇Shell配置。 + - 開啟或禁用Ctrl+S和Ctrl+Q控制。 + + +### 幫助 + +查看幫助手冊,進一步了解和使用終端。 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **幫助**。 +3. 查看終端的幫助手冊。 + +### 關於 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **關於**。 +3. 查看終端的版本和介紹。 + +### 退出 + +1. 在終端界面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **退出**。 \ No newline at end of file Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/add server.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/add server.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/addssh-all.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/addssh-all.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/closesplitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/closesplitscreen.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/delete.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/delete.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/download.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/download.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/editssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/editssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/export.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/export.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/groupssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/groupssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/hotkey.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/hotkey.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/interface.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/interface.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/newwindow.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/newwindow.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/newwindows.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/newwindows.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/openfile.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/openfile.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/rename.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/rename.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/rightclick.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/rightclick.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/searchssh.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/searchssh.png differ Binary files /tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/fig/splitscreen.png and /tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/fig/splitscreen.png differ diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/s_terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/s_terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/s_terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/s_terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,330 @@ +# 終端機|deepin-terminal| + +## 概述 + +終端機是⼀款集多窗⼝、⼯作區、遠端管理、雷神模式等功能的⾼級終端模擬器。它擁有簡單的介面,豐富而強大的功能。您可以瞬間啟動和關閉,使用起來像普通文件視窗一樣流暢,讓您在輸入指令時心無旁騖,得心應手。試試雷神模式,一邊看頁面一邊輸入指令;當有多任務進行時,您可以像在瀏覽器中增加頁籤一樣建立多個工作區或者將工作區分割成多個視窗;遠端管理,上傳下載檔案再也不是問題。更多強大功能,靜待您的發掘! + +![1|interface](fig/interface.png) + +## 使用入門 +透過以下方式執行或關閉終端機,或者建立終端機的捷徑。 + +### 執行終端機 + +1. 單擊任務欄上的啟動器圖示 ![deepin_launcher](../common/deepin_launcher.svg),進入啟動器介面。 +2. 上下滾動滑鼠滾輪瀏覽或透過搜尋,找到終端機 ![deepin_terminal](../common/deepin_terminal.svg) 單擊執行。 +3. 右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 單擊 **建立桌面捷徑**,在桌面建立捷徑。 + - 單擊 **釘選到Dock**,將應用程式固定到Dock中。 + - 單擊 **開機啟動**,將應用程式添加到開機啟動項,在電腦開機時自動執行該應用。 + +> ![notes](../common/notes.svg)說明:按下鍵盤上的 **Ctrl + Alt + T** 快捷鍵也可以啟動終端機。 + +### 關閉終端機 + +- 在終端機介面單擊 ![close_icon](../common/close_icon.svg),關閉終端機。 +- 在Dock中右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **全部關閉** 關閉終端機。 +- 在終端機介面單擊 ![icon_menu](../common/icon_menu.svg),選擇 **離開** 關閉終端機。 + +> ![notes](../common/notes.svg)說明:如果關閉終端機時終端裡面依然有程式在執行,會彈出一個對話框詢問使用者是否退出, 避免強制關閉引起的使用者資料遺失。 + +### 查看快捷鍵 + +在終端機介面上,使用快捷鍵 **Ctrl + Shift + ?** 打開快捷鍵預覽介面。熟練的使用快捷鍵,將大大提升您的操作效率。 + + ![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在終端機介面單擊滑鼠右鍵進行一般操作。 + +![1|rightclick](fig/rightclick.png) + +### 尋找 ### +您可以使用「尋找」功能快速尋找終端顯示的內容。 +1. 在終端機介面,單擊滑鼠右鍵。 +2. 單擊 **尋找**。 +3. 在搜尋框中輸入要尋找的字元。 +4. 按下鍵盤上的 **Enter** 鍵,搜尋到的結果將突顯顯示。 +5. 如果想隱藏搜尋介面,可以單擊終端空白區域按下鍵盤上的 **Esc** 鍵。 + +> ![tips](../common/tips.svg)竅門:搜尋時按下鍵盤上的 **Enter** 鍵是從目前位置向下搜尋,您也可以透過單擊搜尋介面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 圖示向上搜尋或向下搜尋。 + +### 網頁搜尋 +使用「搜尋」功能可以呼叫瀏覽器,搜尋終端中的內容,快捷又方便。 +1. 在終端機介面,選中想要搜尋的內容。 +2. 單擊滑鼠右鍵,選擇 **搜尋**。 +3. 在下拉選項中選擇一個網站搜尋選中的內容。 + +### 複製和貼上 + +- 複製 + + 在終端機介面,選中要複製的內容後使用快捷鍵 **Ctrl + Shift + C** 複製內容。 + + 在終端機介面,選中要複製的內容後單擊滑鼠右鍵選擇 **複製**。 +- 貼上 + + 在終端機介面,使用快捷鍵 **Ctrl + Shift + V** 貼上內容。 + + 在終端機介面,單擊滑鼠中鍵貼上內容。 + + 在終端機介面,單擊滑鼠右鍵選擇 **貼上**。 + + >![notes](../common/notes.svg)說明: + >- 終端已預設開啟 **選取時複製**,您可以在![icon_menu](../common/icon_menu.svg) > **設定** 中進行修改。 + >- 如果目前游標下是超連結內容,即使沒有選中任何內容,也可以透過右鍵選單複製。 + +### 雷神模式 + +雷神模式是終端特有的便捷功能,使用快捷鍵 **Alt + F2** 打開雷神終端視窗,再按一下 **Alt + F2** 快捷鍵隱藏雷神終端視窗。 + +> ![tips](../common/tips.svg)竅門 :右鍵單擊Dock中的 ![deepin_terminal](../common/deepin_terminal.svg) 圖示,選擇 **雷神模式終端器**,打開雷神模式的終端視窗。 + +### 開啟文件和應用程式 + +在終端機介面上選中目前目錄下的文件,右鍵選單會顯示 **開啟** 選單項,單擊 **開啟** 會呼叫系統的應用打開選中的文件。 + +1. 在終端機介面,輸入 **ls -al** 顯示目前目錄下的文件。 +2. 雙擊滑鼠左鍵,選中檔案名。 +3. 單擊滑鼠右鍵選擇 **開啟**。 + +![1|openfile](fig/openfile.png) + + +### 調整編碼方式 +當某些文件訊息顯示亂碼或者錯誤時,可以透過調整編碼方式解決問題。 + +1. 在終端機介面,單擊滑鼠右鍵。 +2. 選擇 **編碼**。 +3. 在右側展開的面板中,選擇一種編碼方式並查看調整後的效果。 +4. 重複步驟3直到內容顯示正確。 + +> ![notes](../common/notes.svg)說明:通常終端機都會匹配正確的編碼方式,一些特殊情況下出現錯誤後,可以手動調整編碼方式,如果您確定需要哪種編碼方式,可以直接選擇,不確定的情況下可以多嘗試幾次。 + +## 視窗操作 + +視窗是終端實現各種功能的基礎,可以建立多個標籤頁,也可以分割多個工作區。 + +### 新增視窗 + +在啟動器介面開啟終端,可以透過以下方法新增視窗: + + - 選擇 ![menu](../common/icon_menu.svg)> **新增視窗**,打開一個新的終端視窗。 + - 右鍵單擊任務欄上的 ![deepin_terminal](../common/deepin_terminal.svg) 圖示,選擇 **新增視窗**。 + +![0|newwindow](fig/newwindow.png) + +### 全螢幕顯示 + +1. 在終端機介面,按下鍵盤上的 **F11** 鍵或單擊滑鼠右鍵選擇 **全螢幕**,終端視窗將全螢幕顯示。 +2. 如果要復原正常大小顯示,按下鍵盤上的 **F11** 鍵或單擊滑鼠右鍵選擇 **退出全螢幕**。 + +### 分割工作區 + +1. 在終端機介面,單擊滑鼠右鍵。 + - 選擇 **水平分割**,工作區被分為左右兩個部分。 + - 選擇 **垂直分割**,工作區被分為上下兩個部分。 +2. 您可以在各個工作區中輸入指令,並可以同時查看到指令執行的結果。 + +> ![tips](../common/tips.svg)竅門 :您也可以使用快捷鍵 **Ctrl + Shift + J** 縱向分屏、 **Ctrl + Shift + H** 橫向分屏。 + +![1|splitscreen](fig/splitscreen.png) +### 關閉工作區 +執行以下步驟關閉多個工作區: + +1. 在終端機介面上,將滑鼠遊標置於其中一個工作區中。 +2. 單擊滑鼠右鍵,您可以: + + - 選擇 **關閉工作區**,關閉此工作區。 + - 選擇 **關閉其他工作區**,關閉除此工作區以外的其他工作區。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 標籤頁操作 + +### 建立標籤頁 + +透過以下方法建立標籤頁: + +- 在終端機介面上,單擊標籤頁上的 **+** 建立標籤頁。 + +- 在終端機介面上,單擊滑鼠右鍵,選擇 **建立標籤頁**。 + +- 使用快捷鍵 **Ctrl + Shift + T** 建立標籤頁。 + + +### 切換/調整標籤頁 + +透過以下方法在多個標籤頁之間任意切換或調整: + +- 使用快捷鍵 **Ctrl + Tab** 或將滑鼠游標置於分頁上,滾動滑鼠滾輪依次切換分頁。 +- 使用快捷鍵 **Ctrl + Shift + 1~9** 數字鍵選擇對應的分頁,當分頁大於9時,將選中最後一個分頁而不是第9個分頁 +- 同一視窗內拖曳標籤頁排序。 +- 拖曳標籤頁移出目前視窗,建立一個新的視窗。 +- 拖曳標籤頁從一個視窗到另一個視窗中。 + +### 重命名分頁 + +1. 在終端機介面,右鍵單擊一個標籤頁。 +2. 選擇 **重命名分頁**。 + - 標籤標題格式:自訂目前標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。 + - 遠端標籤標題格式:自訂遠端標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。當工作區連接遠端伺服器時,標籤頁會顯示您所設置的參數。 + +3. 單擊 **確定**。 + +> ![tips](../common/tips.svg)竅門 :您也可以按下鍵盤上的 **F2** 重新命名標籤頁。 + +![1|rename](fig/rename.png) + +### 關閉標籤頁 + +透過以下方式關閉標籤頁: + +- 單擊標籤頁上的![close_icon](../common/close_icon.svg)按鈕關閉該標籤頁。 +- 右鍵單擊標籤頁: + + 選擇 **關閉標籤頁**,關閉此標籤頁。 + + 選擇 **關閉其他標籤頁**,關閉除此標籤頁以外的其他標籤頁。 + +> ![tips](../common/tips.svg)竅門:當該標籤頁中只有一個工作區時,使用右鍵 **關閉工作區** 也可以關閉目前標籤頁。 + +## 遠端管理 + +終端機可以透過主選單或者右鍵選單開啟遠端管理,將遠端伺服器添加到管理列表後,只需單擊一下便可自動登入。 + +### 加入伺服器 +1. 在終端機介面上,選擇 ![icon_menu](../common/icon_menu.svg)> **遠端管理**。 +2. 選擇 **加入伺服器**,彈出添加伺服器對話框。 +3. 輸入 **伺服器名稱**、**位址**、**使用者名稱**、**密碼**。 +4. 單擊 **添加**。 +> ![notes](../common/notes.svg)說明:在添加伺服器時,您可以單擊 **進階選項** 設定更多參數。 + +![1|addssh](fig/addssh-all.png) + + +### 編輯伺服器 +1. 開啟終端遠端管理介面,將游標置於某一個伺服器上,則顯示按鈕 ![edit_icon](../common/edit_icon.svg),單擊該按鈕彈出編輯伺服器視窗。 +2. 修改伺服器訊息。 +3. 單擊 **儲存**。 + +![0|editssh](fig/editssh.png) + +### 分組伺服器 + +添加伺服器時若設定了分組,該伺服器會添加到遠端管理對應的分組中。 + +1. 在終端機介面上,打開添加伺服器或編輯伺服器視窗。 +2. 單擊 **進階選項**。 +3. 輸入 **分組** 訊息。 +4. 單擊 **添加**。 + +![0|groupssh](fig/groupssh.png) + +### 搜尋伺服器 +當存在多個伺服器或伺服器分組時, 伺服器列表中會顯示搜尋輸入框,可快速搜尋伺服器。 + +1. 在終端機介面上,單擊滑鼠右鍵。 +2. 選擇 **遠端管理**。 +3. 在搜尋框中輸入關鍵字。 +4. 按下鍵盤上的 **Enter** 鍵,顯示搜尋結果。 + +![0|searchssh](fig/searchssh.png) + +### 上傳和下載檔案 +登入遠端伺服器之後,可以直接透過終端上傳和下載檔案。 + +#### 上傳檔案 + +1. 在終端遠端管理介面上,選擇一個伺服器登入。 +2. 單擊滑鼠右鍵選擇 **上傳檔案**。 +3. 在彈出的视窗中選擇要上傳的檔案。 +4. 單擊 **上傳**,檔案將被上傳到遠端伺服器。 + +> ![tips](../common/tips.svg) 竅門 :連接到遠端伺服器後,您可直接將檔案拖曳到終端上傳。 + +![0|export](fig/export.png) + +#### 下載檔案 + +1. 在終端遠端管理介面上,選擇一個伺服器登入。 +2. 單擊滑鼠右鍵選擇 **下載檔案**。 +3. 在彈出的视窗中,選擇下載檔案存放位置。 +4. 輸入要下載的檔案路徑,檔案將下載到指定位置。 + +![0|download](fig/download.png) + +### 刪除伺服器 + +1. 在終端機介面上,打開編輯伺服器對話框。 +2. 單擊 **進階選項**。 +3. 單擊 **刪除伺服器**。 +4. 彈出刪除伺服器對話框,單擊 **刪除** ,確認刪除伺服器。 + +![0|delete](fig/delete.png) + +## 主選單 + +在主選單中,您可以[新增視窗](#新增視窗)、自訂指令、[遠端管理](#遠端管理)、切換視窗主題、查看說明手冊,了解終端的更多訊息。 + +### 主題 + +視窗主題支援多種主題模式,也支援自訂主題顏色。 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **主題**,您可以: + - 選擇終端自帶的主題。 + - 選擇自訂主題,在自訂主題視窗中,可分別設定主題風格、前景色、背景色和提示符的顏色。 + +### 自訂命令 + +添加自訂命令,透過快捷鍵可快速呼叫命令。 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **自訂命令**。 +2. 單擊 **加入命令**。 +3. 輸入指令的 **名稱**、**命令**、**快捷鍵**。 +4. 單擊 **添加**。 + +### 設定 + +#### 基本設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **設定**。 + +2. 在 **基本設定** 頁簽下,您可以: + + - 設定終端機字型樣式和字型大小。 + + - 對終端機中所有標籤及遠端標籤的標題進行設定。 + + +#### 快捷鍵設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **設定**。 +2. 在 **快捷鍵** 頁簽下,您可以: + - 修改快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,使用鍵盤輸入新的快捷鍵。 + - 禁用快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,按下鍵盤上的 **Backspace** 鍵。 + +#### 進階設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg) > **設定**。 +2. 在 **進階設定** 頁簽下,您可以: + - 設定游標樣式。 + - 開啟或關閉游標閃爍。 + - 開啟或關閉選取時複製。 + - 選擇捲動效果。 + - 設定啟動視窗時預設大小。 + - 開啟或關閉失去焦點自動隱藏雷神視窗。 + - 選擇Shell配置。 + - 開啟或禁用Ctrl+S和Ctrl+Q控制。 + +### 說明 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **說明**。 +3. 查看終端機的說明手冊。 + +### 關於 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **關於**。 +3. 查看終端機的版本和介紹。 + +### 離開 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **離開**。 \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/terminal.md deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/terminal.md --- deepin-terminal-5.0.0+ds1/src/assets/deepin-terminal/terminal/zh_TW/terminal.md 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/deepin-terminal/terminal/zh_TW/terminal.md 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,334 @@ +# 終端機|deepin-terminal| + +## 概述 + +終端機是⼀款集多窗⼝、⼯作區、遠端管理、雷神模式等功能的⾼級終端模擬器。它擁有簡單的介面,豐富而強大的功能。您可以瞬間啟動和關閉,使用起來像普通文件視窗一樣流暢,讓您在輸入指令時心無旁騖,得心應手。試試雷神模式,一邊看頁面一邊輸入指令;當有多任務進行時,您可以像在瀏覽器中增加頁籤一樣建立多個工作區或者將工作區分割成多個視窗;遠端管理,上傳下載檔案再也不是問題。更多強大功能,靜待您的發掘! + +![1|interface](fig/interface.png) + +## 使用入門 +透過以下方式執行或關閉終端機,或者建立終端機的捷徑。 + +### 執行終端機 + +1. 單擊任務欄上的啟動器圖示 ![deepin_launcher](../common/deepin_launcher.svg),進入啟動器介面。 +2. 上下滾動滑鼠滾輪瀏覽或透過搜尋,找到終端機 ![deepin_terminal](../common/deepin_terminal.svg) 單擊執行。 +3. 右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),您可以: + - 單擊 **建立桌面捷徑**,在桌面建立捷徑。 + - 單擊 **釘選到Dock**,將應用程式固定到Dock中。 + - 單擊 **開機啟動**,將應用程式添加到開機啟動項,在電腦開機時自動執行該應用。 + +> ![notes](../common/notes.svg)說明:按下鍵盤上的 **Ctrl + Alt + T** 快捷鍵也可以啟動終端機。 + +### 關閉終端機 + +- 在終端機介面單擊 ![close_icon](../common/close_icon.svg),關閉終端機。 +- 在Dock中右鍵單擊 ![deepin_terminal](../common/deepin_terminal.svg),選擇 **全部關閉**, 關閉終端機。 +- 在終端機介面單擊 ![icon_menu](../common/icon_menu.svg),選擇 **離開**, 關閉終端機。 + +> ![notes](../common/notes.svg)說明:如果關閉終端機時終端裡面依然有程式在執行,會彈出對話框詢問使用者是否退出, 避免強制關閉引起的使用者資料遺失。 + +### 查看快捷鍵 + +在終端機介面上,使用快捷鍵 **Ctrl + Shift + ?** 打開快捷鍵預覽介面。熟練的使用快捷鍵,將大大提升您的操作效率。 + + ![1|hotkey](fig/hotkey.png) + +## 基本操作 + +您可以在終端機介面單擊滑鼠右鍵進行一般操作。 + +![1|rightclick](fig/rightclick.png) + +### 尋找 ### +您可以使用「尋找」功能快速尋找終端顯示的內容。 +1. 在終端機介面,單擊滑鼠右鍵。 +2. 單擊 **尋找**。 +3. 在搜尋框中輸入要尋找的字元。 +4. 按下鍵盤上的 **Enter** 鍵,搜尋到的結果將突顯顯示。 +5. 如果想隱藏搜尋介面,可以單擊終端空白區域按下鍵盤上的 **Esc** 鍵。 + +> ![tips](../common/tips.svg)竅門:搜尋時按下鍵盤上的 **Enter** 鍵,從目前位置向下搜尋,您也可以透過單擊搜尋介面上的 ![up](../common/up.svg) 或 ![down](../common/down.svg) 圖示向上搜尋或向下搜尋。 + +### 網頁搜尋 +使用「搜尋」功能可以呼叫瀏覽器,搜尋終端中的內容,快捷又方便。 +1. 在終端機介面,選中想要搜尋的內容。 +2. 單擊滑鼠右鍵,選擇 **搜尋**。 +3. 在下拉選項中選擇一個網站搜尋選中的內容。 + +### 複製和貼上 + +- 複製 + + 在終端機介面,選中要複製的內容後使用快捷鍵 **Ctrl + Shift + C** 複製內容。 + + 在終端機介面,選中要複製的內容後單擊滑鼠右鍵選擇 **複製**。 +- 貼上 + + 在終端機介面,使用快捷鍵 **Ctrl + Shift + V** 組合貼上內容。 + + 在終端機介面,單擊滑鼠中鍵貼上內容。 + + 在終端機介面,單擊滑鼠右鍵選擇 **貼上**。 + + >![notes](../common/notes.svg)說明: + >- 終端已預設開啟 **選取時複製**,您可以在![icon_menu](../common/icon_menu.svg) > **設定** 中進行修改。 + >- 如果目前游標下是超連結內容,即使沒有選中任何內容,也可以透過右鍵選單複製。 + +### 雷神模式 + +雷神模式是終端特有的便捷功能,使用快捷鍵 **Alt + F2** 打開雷神終端視窗,再按一下 **Alt + F2** 快捷鍵隱藏雷神終端視窗。 + +> ![tips](../common/tips.svg)竅門 :右鍵單擊Dock中的 ![deepin_terminal](../common/deepin_terminal.svg) 圖示,選擇 **雷神模式終端器**,打開雷神模式的終端視窗。 + +### 開啟文件和應用程式 + +在終端機介面上選中目前目錄下的文件,右鍵選單會顯示 **開啟** 選單項,單擊 **開啟** 會呼叫系統的應用打開選中的文件。 + +1. 在終端機介面,輸入 **ls -al** 顯示目前目錄下的文件。 +2. 雙擊滑鼠左鍵,選中檔案名。 +3. 單擊滑鼠右鍵選擇 **開啟**。 + +![1|openfile](fig/openfile.png) + + +### 調整編碼方式 +當某些文件訊息顯示亂碼或者錯誤時,可以透過調整編碼方式解決問題。 + +1. 在終端機介面,單擊滑鼠右鍵。 +2. 選擇 **編碼**。 +3. 在右側展開的面板中,選擇一種編碼方式並查看調整後的效果。 +4. 重複步驟3直到內容顯示正確。 + +> ![notes](../common/notes.svg)說明:通常終端機都會匹配正確的編碼方式,一些特殊情況下出現錯誤後,可以手動調整編碼方式,如果您確定需要哪種編碼方式,可以直接選擇,不確定的情況下可以多嘗試幾次。 + +## 視窗操作 + +視窗是終端實現各種功能的基礎,可以建立多個標籤頁,也可以分割多個工作區。 + +### 新增視窗 + +在啟動器介面開啟終端,可以透過以下方法新增視窗: + + - 選擇 ![menu](../common/icon_menu.svg)> **新增視窗**,打開一個新的終端視窗。 + - 右鍵單擊任務欄上的 ![deepin_terminal](../common/deepin_terminal.svg) 圖示,選擇 **新增視窗**。 + +![0|newwindow](fig/newwindow.png) + +### 全螢幕顯示 + +1. 在終端機介面,按下鍵盤上的 **F11** 鍵或單擊滑鼠右鍵選擇 **全螢幕**,終端視窗將全螢幕顯示。 +2. 如果要復原正常大小顯示,按下鍵盤上的 **F11** 鍵或單擊滑鼠右鍵選擇 **退出全螢幕**。 + +### 分割工作區 + +1. 在終端機介面,單擊滑鼠右鍵。 + - 選擇 **水平分割**,工作區被分為左右兩個部分。 + - 選擇 **垂直分割**,工作區被分為上下兩個部分。 +2. 您可以在各個工作區中輸入指令,並可以同時查看到指令執行的結果。 + +> ![tips](../common/tips.svg)竅門 :您也可以使用快捷鍵 **Ctrl + Shift + J** 縱向分屏、 **Ctrl + Shift + H** 橫向分屏。 + +![1|splitscreen](fig/splitscreen.png) +### 關閉工作區 +執行以下步驟關閉多個工作區: + +1. 在終端機介面上,將滑鼠遊標置於其中一個工作區中。 +2. 單擊滑鼠右鍵,您可以: + + - 選擇 **關閉工作區**,關閉此工作區。 + - 選擇 **關閉其他工作區**,關閉除此工作區以外的其他工作區。 + +![1|closesplitscreen](fig/closesplitscreen.png) + +## 標籤頁操作 + +### 建立標籤頁 + +透過以下方法建立標籤頁: + +- 在終端機介面上,單擊標籤頁上的 **+** 建立標籤頁。 + +- 在終端機介面上,單擊滑鼠右鍵,選擇 **建立標籤頁**。 + +- 使用快捷鍵 **Ctrl + Shift + T** 建立標籤頁。 + + +### 切換/調整標籤頁 + +透過以下方法在多個標籤頁之間任意切換或調整: + +- 使用快捷鍵 **Ctrl + Tab** 或將滑鼠游標置於分頁上,滾動滑鼠滾輪依次切換分頁。 +- 使用快捷鍵 **Ctrl + Shift + 1~9** 數字鍵選擇對應的分頁,當分頁大於9時,將選中最後一個分頁而不是第9個分頁 +- 同一視窗內拖曳標籤頁排序。 +- 拖曳標籤頁移出目前視窗,建立一個新的視窗。 +- 拖曳標籤頁從一個視窗到另一個視窗中。 + +### 重命名分頁 + +1. 在終端機介面,右鍵單擊一個標籤頁。 +2. 選擇 **重命名分頁**。 + - 標籤標題格式:自訂目前標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。 + - 遠端標籤標題格式:自訂遠端標籤頁名稱;可在 **插入** 下拉選項中選擇一種格式。當工作區連接遠端伺服器時,標籤頁會顯示您所設置的參數。 + +3. 單擊 **確定**。 + +> ![tips](../common/tips.svg)竅門 :您也可以按下鍵盤上的 **F2** 重新命名標籤頁。 + +![1|rename](fig/rename.png) + +### 關閉標籤頁 + +透過以下方式關閉標籤頁: + +- 單擊標籤頁上的![close_icon](../common/close_icon.svg)按鈕關閉該標籤頁。 +- 右鍵單擊標籤頁: + + 選擇 **關閉標籤頁**,關閉此標籤頁。 + + 選擇 **關閉其他標籤頁**,關閉除此標籤頁以外的其他標籤頁。 + +> ![tips](../common/tips.svg)竅門:當該標籤頁中只有一個工作區時,使用右鍵 **關閉工作區** 也可以關閉目前標籤頁。 + +## 遠端管理 + +終端機可以透過主選單或者右鍵選單開啟遠端管理,將遠端伺服器添加到管理列表後,只需單擊一下便可自動登入。 + +### 加入伺服器 +1. 在終端機介面上,選擇 ![icon_menu](../common/icon_menu.svg)> **遠端管理**。 +2. 選擇 **加入伺服器**,彈出添加伺服器對話框。 +3. 輸入 **伺服器名稱**、**位址**、**使用者名稱**、**密碼**。 +4. 單擊 **添加**。 +> ![notes](../common/notes.svg)說明:在添加伺服器時,您可以單擊 **進階選項** 設定更多參數。 + +![1|addssh](fig/addssh-all.png) + + +### 編輯伺服器 +1. 開啟終端遠端管理介面,將游標置於某一個伺服器上,則顯示按鈕 ![edit_icon](../common/edit_icon.svg),單擊該按鈕彈出編輯伺服器視窗。 +2. 修改伺服器訊息。 +3. 單擊 **儲存**。 + +![0|editssh](fig/editssh.png) + +### 分組伺服器 + +添加伺服器時若設定了分組,該伺服器會添加到遠端管理對應的分組中。 + +1. 在終端機介面上,打開添加伺服器或編輯伺服器視窗。 +2. 單擊 **進階選項**。 +3. 輸入 **分組** 訊息。 +4. 單擊 **添加**。 + +![0|groupssh](fig/groupssh.png) + +### 搜尋伺服器 +當存在多個伺服器或伺服器分組時,伺服器列表中會顯示搜尋輸入框,可快速搜尋伺服器。 + +1. 在終端機介面上,單擊滑鼠右鍵。 +2. 選擇 **遠端管理**。 +3. 在搜尋框中輸入關鍵字。 +4. 按下鍵盤上的 **Enter** 鍵,顯示搜尋結果。 + +![0|searchssh](fig/searchssh.png) + +### 上傳和下載檔案 +登入遠端伺服器之後,可以直接透過終端上傳和下載檔案。 + +#### 上傳檔案 + +1. 在終端遠端管理介面上,選擇一個伺服器登入。 +2. 單擊滑鼠右鍵選擇 **上傳檔案**。 +3. 在彈出的视窗中選擇要上傳的檔案。 +4. 單擊 **上傳**,檔案將被上傳到遠端伺服器。 + +> ![tips](../common/tips.svg) 竅門:連接到遠端伺服器後,您可直接將檔案拖曳到終端上傳。 + +![0|export](fig/export.png) + +#### 下載檔案 + +1. 在終端遠端管理介面上,選擇一個伺服器登入。 +2. 單擊滑鼠右鍵選擇 **下載檔案**。 +3. 在彈出的视窗中,選擇下載檔案存放位置。 +4. 輸入要下載的檔案路徑,檔案將下載到指定位置。 + +![0|download](fig/download.png) + +### 刪除伺服器 + +1. 在終端機介面上,打開編輯伺服器對話框。 +2. 單擊 **進階選項**。 +3. 單擊 **刪除伺服器**。 +4. 彈出刪除伺服器對話框,單擊 **刪除**,確認刪除伺服器。 + +![0|delete](fig/delete.png) + +## 主選單 + +在主選單中,您可以[新增視窗](#新增視窗)、自訂指令、[遠端管理](#遠端管理)、切換視窗主題、查看說明手冊,了解終端的更多訊息。 + +### 主題 + +視窗主題支援多種主題模式,也支援自訂主題顏色。 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 選擇 **主題**,您可以: + - 選擇終端自帶的主題。 + - 選擇自訂主題,在自訂主題視窗中,可分別設定主題風格、前景色、背景色和提示符的顏色。 + +### 自訂命令 + +添加自訂命令,透過快捷鍵可快速呼叫命令。 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **自訂命令**。 +2. 單擊 **加入命令**。 +3. 輸入指令的 **名稱**、**命令**、**快捷鍵**。 +4. 單擊 **添加**。 + +### 設定 + +#### 基本設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **設定**。 +2. 在 **基本設定** 頁簽下,您可以: + - 設定終端機的背景透明度。 + >![notes](../common/notes.svg)說明:當視窗特效關閉後,透明度調節功能將會被隱藏。 + + - 選擇終端機字型樣式和字型大小。 + - 對終端機中所有標籤及遠端標籤的標題進行設定。 + +#### 快捷鍵設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)> **設定**。 +2. 在 **快捷鍵** 頁簽下,您可以: + - 修改快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,使用鍵盤輸入新的快捷鍵。 + - 禁用快捷鍵:單擊要修改的快捷鍵,此時輸入框呈可編輯狀態,按下鍵盤上的 **Backspace** 鍵。 + +#### 進階設定 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg) > **設定**。 +2. 在 **進階設定** 頁簽下,您可以: + - 設定游標樣式。 + - 開啟或關閉游標閃爍。 + - 開啟或關閉選取時複製。 + - 選擇捲動效果。 + - 設定啟動視窗時預設大小。 + - 開啟或關閉背景模糊。 + >![notes](../common/notes.svg)說明:當視窗特效關閉後,背景模糊選項將會被隱藏。 + + - 終端機或關閉失去焦點自動隱藏雷神視窗。 + - 選擇Shell配置。 + - 開啟或禁用Ctrl+S和Ctrl+Q控制。 + + + +### 說明 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **說明**。 +3. 查看終端機的說明手冊。 + +### 關於 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **關於**。 +3. 查看終端機的版本和介紹。 + +### 離開 + +1. 在終端機介面,單擊 ![icon_menu](../common/icon_menu.svg)。 +2. 單擊 **離開**。 \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_arrow_right_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_arrow_right_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_arrow_right_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_arrow_right_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,11 @@ + + + arrow/right_dark + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_command_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_command_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_command_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_command_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,23 @@ + + + + command_dark_light + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_edit_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_edit_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_edit_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_edit_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,15 @@ + + + + edit + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_left_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_left_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_left_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_left_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,16 @@ + + + + Opacity0 + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_right_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_right_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_right_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_opacity_right_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,16 @@ + + + + Opacity1 + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_server_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_server_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_server_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_server_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,31 @@ + + + + server + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_server_group_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_server_group_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/dark/icons/dt_server_group_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/dark/icons/dt_server_group_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,23 @@ + + + + server group + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_arrow_right_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_arrow_right_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_arrow_right_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_arrow_right_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,11 @@ + + + arrow/right_light + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_command_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_command_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_command_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_command_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,24 @@ + + + + command_dark_light + Created with Sketch. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_edit_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_edit_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_edit_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_edit_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,15 @@ + + + + edit + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_opacity_left_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_opacity_left_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_opacity_left_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_opacity_left_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,16 @@ + + + + Opacity0 + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_opacity_right_20px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_opacity_right_20px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_opacity_right_20px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_opacity_right_20px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,16 @@ + + + + Opacity1 + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_server_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_server_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_server_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_server_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,31 @@ + + + + server + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_server_group_44px.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_server_group_44px.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/light/icons/dt_server_group_44px.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/light/icons/dt_server_group_44px.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,23 @@ + + + + server group + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/warning.svg deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/warning.svg --- deepin-terminal-5.0.0+ds1/src/assets/icons/deepin/builtin/warning.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/icons/deepin/builtin/warning.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/logo/deepin-terminal.svg deepin-terminal-5.4.13/src/assets/logo/deepin-terminal.svg --- deepin-terminal-5.0.0+ds1/src/assets/logo/deepin-terminal.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/logo/deepin-terminal.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,28 @@ + + + + deepin-terminal-32px + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/logo/headbar-dark.svg deepin-terminal-5.4.13/src/assets/logo/headbar-dark.svg --- deepin-terminal-5.0.0+ds1/src/assets/logo/headbar-dark.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/logo/headbar-dark.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,33 @@ + + + headbar_dark + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/logo/headbar-light.svg deepin-terminal-5.4.13/src/assets/logo/headbar-light.svg --- deepin-terminal-5.0.0+ds1/src/assets/logo/headbar-light.svg 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/logo/headbar-light.svg 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,29 @@ + + + headbar_light + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/src/assets/other/acc_terminal.sh deepin-terminal-5.4.13/src/assets/other/acc_terminal.sh --- deepin-terminal-5.0.0+ds1/src/assets/other/acc_terminal.sh 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/other/acc_terminal.sh 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,332 @@ +#!/usr/bin/bash + + +#检查有没有deepin-terminal终端被安装 +dt=`which deepin-terminal` +echo $dt +if [ ! $dt ] ; then + echo "没有发现 deepin-terminal 终端被安装" + exit 0 +fi + + +version=`deepin-terminal -v` + +version=$(echo $version | sed -e 's/\(.*\)deepin-terminal\(.*\)/\2/g' -e 's/ //g') + +if [ ! "$version" ]; then +# version=5.2.19 + echo "deepin-terminal 没有获取到相应的版本号" + exit 0 +fi + +version=$(echo $version | sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/g') + +echo $version +#固定的头查询 +#fixhead="parse commandLine is ok" +fixhead="new terminal start run" +#固定的尾查询 +fixtail="m_enableShareMemory set true 1" +#创建终端延时时间 +creat_term_delay=0.5 +#cpu采样次数 +cpu_resample_number=10 + +#用于5.2.19版本 +fixid="app create all complete, MainWindowID = " + + +#打开log日志 +strdate=$(date +"%Y-%m-%d-%H-%M-%S") +accfile=$(pwd)/acc_$strdate.txt +#echo $logfile + +if [ -f $accfile ]; then + rm -rf $accfile +fi + +#检检查是不是使用deepin-terminal终端 +pid=$(ps -eo pid,ppid,sid,comm | grep 'deepin-terminal' | awk '{print $1;}') + +if [ $pid ]; then + echo "为了准确性,关闭deepin-terminal 终端,使用其他终端测试" + exit 0 +fi + +dtl=~/.cache/deepin/deepin-terminal/deepin-terminal.log +if [ -f $dtl ] ; then + rm -rf $dtl + sleep 0.2 +fi + + + +#默认100个终端 +count=10 + +#如果输入终端,则使用输入的终端 +if [ $1 ] ; then + count=$1 +fi + + +echo "理论启动终端个数:$count" + +#每隔100ms启动终端 + +#for (( i = 0; i < count; i++ )); do +# deepin-terminal & +# sleep 0.1 +#done +i=0 +firstvmhw=0 +firstvmsz=0 +first=1 +while [ $i -lt $count ] +do + deepin-terminal & + sleep $creat_term_delay + i=$(grep -c "create NormalWindow, current count" $dtl) + # if [ $i == 1 ]; then + # pid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print $1;}') +# firstvmhw=$(grep "VmHWM" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) +# firstvmsz=$(grep "VmSize" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) +# first=0 +# fi + if [ $first == 1 ]; then + pid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print $1;}') + firstvmhw=$(grep "VmHWM" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) + firstvmsz=$(grep "VmSize" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) + first=0 + fi +done + +pid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print $1}') + +if [ ! $pid ]; then + echo "没有终端被启动" + exit 0 +fi + +echo "分析中,请稍候..." +sleep 5 + +pid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print $1}') +#echo "TermPid: $pid" >> $accfile +#启动终端数 +#echo "启动终端总数: $tn" >> $accfile +echo "终端版本: $version" >> $accfile +echo "CPU平台: $(uname -a|cut -d " " -f 3)" >> $accfile +#启止时间 +starttime=$(head -n +1 $dtl) +starttime=${starttime%%[*} +starttime=${starttime/, / } +echo "开始时间: $starttime" >> $accfile + +tn=$(grep -c "create NormalWindow, current count" $dtl) +endtime=$(grep "create NormalWindow, current count = $tn" $dtl) +endtime=${endtime%%[*} +endtime=${endtime/, / } +echo "结束时间: ${endtime}" >> $accfile + +startstmp=$(date -d "$starttime" +%s%N) +endstmp=$(date -d "$endtime" +%s%N) +tottime=$[endstmp-startstmp] +tottime=$[tottime/1000000] + +tottime=$(echo "scale=2;$tottime/1000"|bc) +echo "总计用时(S): $tottime" >> $accfile + + +pid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print $1;}') + +#cat "/proc/$pid/status" | grep "Name" >> $accfile +#cat "/proc/$pid/status" | grep "VmPeak" >> $accfile +#cat "/proc/$pid/status" | grep "VmSize" >> $accfile +#cat "/proc/$pid/status" | grep "VmHWM" >> $accfile +#cat "/proc/$pid/status" | grep "VmPTE" >> $accfile +#$(grep "Name" /proc/$pid/status | cut -d ":" -f 2) + +#vmhwm=$(grep "VmHWM" /proc/$pid/status | cut -d ":" -f 2) + + +firstvmhw=$(echo $firstvmhw|sed -e 's/^[ \t]*//g') +#firstvmhw=$[firstvmhw/1000] +firstvmhw=$(echo "scale=3; $firstvmhw/1000"|bc) + +echo "启动物理内存(M): $firstvmhw" >> $accfile + +firstvmsz=$(echo $firstvmsz|sed -e 's/^[ \t]*//g') +#firstvmsz=$[firstvmsz/1000] +firstvmsz=$(echo "scale=3; $firstvmsz/1000"|bc) +echo "启动虚拟内存(M): $firstvmsz" >> $accfile + + + +vmhwm=$(grep "VmHWM" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) +vmhwm=$(echo $vmhwm|sed -e 's/^[ \t]*//g') +#vmhwm=$[vmhwm/1000] +vmhwm=$(echo "scale=3; $vmhwm/1000"|bc) +echo "最终物理内存(M): $vmhwm" >> $accfile + +vmsize=$(grep "VmSize" /proc/$pid/status | cut -d ":" -f 2 | cut -d "k" -f 1) +vmsize=$(echo $vmsize|sed -e 's/^[ \t]*//g') +#vmsize=$[vmsize/1000] +vmsize=$(echo "scale=3; $vmsize/1000"|bc) +echo "最终虚拟内存(M): $vmsize" >> $accfile + + +#cat "/proc/$pid/status" | grep "voluntary_ctxt_switches" >> $accfile +#cat "/proc/$pid/status" | grep "nonvoluntary_ctxt_switches" >> $accfile + +#cpu平均使用率 +avgcpu=0; +i=0 +echo "cpu采样次数为: $cpu_resample_number" +termpid=$(ps -eo pid,comm | grep 'deepin-terminal' | awk '{print$1;}') +for userpid in $termpid; do + if [ $userpid ] ; then + break + fi +done +while [ $i -lt $cpu_resample_number ] +do + # curcpu=$(top -n1 | grep "deepin-terminal" | awk '{print $10;}') +# curcpu=$(ps -eo pcpu,comm | grep "deepin-terminal" | awk '{print $1;}') + curcpu=`top -n 1 -d 1 -p $userpid | grep deepin | awk '{print $10;}'` +# echo "====================$curcpu==================" + if [ $curcpu ] ; then + # avgcpu=$((avgcpu+curcpu)) + avgcpu=$(echo "scale=2; $avgcpu+$curcpu"|bc) + i=$((i+1)) + echo "cpu采样第$i次" + fi + sleep 1 +done +#avgcpu=$((avgcpu/3)) +avgcpu=$(echo "scale=2; $avgcpu/$cpu_resample_number"|bc) +echo "最终平均CPU占用: $avgcpu %" >> $accfile + + + +tcount=$(grep -c "create NormalWindow, current count" $dtl) +#echo "$tcount" >> $accfile +tottime=0 +mintime=999999999999 +maxtime=0 +firsttime=0 +lasttime=0 +cmpversion=$(echo "$version" | sed 's/\.//g') + +if [ $cmpversion -ge 5219 ] ; then + for(( i =1; i <= tcount; i++ )); do + orgStr=$(grep "$fixid $i ," $dtl) + echo $orgStr + tmptime=$(echo $orgStr | sed 's/\(.*\)all time use \(.*\) ms/\2/g') + tottime=$[tottime+tmptime] + + if [ $i -eq 1 ]; then + firsttime=$tmptime + fi + + if [ $i -eq $tcount ] ; then + lasttime=$tmptime + fi + + if [ $maxtime -lt $tmptime ]; then + maxtime=$tmptime + fi + + if [ $tmptime -lt $mintime ]; then + mintime=$tmptime + fi + done + tottime=$[tottime*1000000] + mintime=$[mintime*1000000] + maxtime=$[maxtime*1000000] + firsttime=$[firsttime*1000000] + lasttime=$[lasttime*1000000] +else + + for (( ii = 1; ii <= tcount; ii++ )); do + orgStr="create NormalWindow, current count = $ii , SingleFlag" + line=$(grep -n "$orgStr" $dtl | cut -d ":" -f 1) + for(( ik=line; ik > 0 ; ik-- )); do + # str=$(head -n +$ik $dtl) + str=$(sed -n $ik\p $dtl) + #if [[ $str =~ "parse commandLine is ok" ]] + if [[ $str =~ $fixhead ]]; then + # tendtime=$(grep "create NormalWindow, current count = $ii , SingleFlag" $dtl) + tstarttime=${str%%[*} + tstarttime=${tstarttime/, / } + tstarttime=$(date -d "$tstarttime" +%s%N) + + # tendtime=${tendtime%%[*} + # tendtime=${tendtime/, / } + # tendtime=$(date -d "$tendtime" +%s%N) + # echo "WhichTerm: $ii" >> $accfile + # echo " StartTime: $tstarttime" >> $accfile + # echo " EndTime: $tendtime" >> $accfile + # tmptime=$[tendtime-tstarttime] + # tottime=$[tottime+tmptime] + break + fi + done + + for(( ik=line; ; ik++ )); do + str=$(sed -n $ik\p $dtl) + if [[ $str =~ $fixtail ]] + then + tendtime=${str%%[*} + tendtime=${tendtime/, / } + tendtime=$(date -d "$tendtime" +%s%N) + break + fi + done + + echo "终端创建开始时间: $tstarttime" + echo "终端创建结束时间: $tendtime" + + if [ $tstarttime -a $tendtime ] ; then + tmptime=$[tendtime-tstarttime] + tottime=$[tottime+tmptime] + + #首次启动时间 + if [ $firsttime -eq 0 ]; then + firsttime=$tmptime + fi + + if [ $ii -eq $tcount ]; then + lasttime=$tmptime + fi + + + #最大启动时间 + if [ $maxtime -lt $tmptime ]; then + maxtime=$tmptime + fi + #最小启动时间 + if [ $tmptime -lt $mintime ]; then + mintime=$tmptime + fi + fi + done +fi + +echo "首个终端启动时间: $[firsttime/1000000] 毫秒" >> $accfile +echo "末尾终端启动时间: $[lasttime/1000000] 毫秒" >> $accfile +echo "终端最小启动时间: $[mintime/1000000] 毫秒" >> $accfile +echo "终端最大启动时间: $[maxtime/1000000] 毫秒" >> $accfile +tottime=$[tottime/1000000] +avgtime=$[avgtime/1000000] +echo "所有程序真实启动时间: $tottime 毫秒" >> $accfile +avgtime=$[tottime/tcount] +echo "所有程序真实平均时间: $avgtime 毫秒" >> $accfile + + +echo "分析完成,请在$accfile 文件中查看" + +#echo $(grep "" $accfile) +cat $accfile + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/other/default-config.json deepin-terminal-5.4.13/src/assets/other/default-config.json --- deepin-terminal-5.0.0+ds1/src/assets/other/default-config.json 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/other/default-config.json 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,391 @@ +{ + "groups": [ + { + "key": "basic", + "name": "Basic", + "groups": [ + { + "key": "interface", + "name": "Interface", + "options": [ + { + "key": "opacity", + "name": "Opacity", + "type": "slider", + "max": 100, + "min": 20, + "default": 100 + }, + { + "key": "font", + "name": "Font", + "type": "fontcombobox", + "default": "Noto Sans Mono" + }, + { + "key": "font_size", + "name": "Font size", + "type": "spinbutton", + "default": 11, + "max": 50, + "min": 5 + }, + { + "key": "theme", + "hide": true, + "reset": false, + "default": "Linux" + }, + { + "key": "expand_theme", + "hide": true, + "reset": false, + "default": "" + } + ] + }, + { + "key": "tab_title", + "name": "Tab titles", + "options": [ + { + "key": "tab_title_format", + "name": "Tab title format", + "type": "tabformatedit", + "default": "%w" + }, + { + "key": "remote_tab_title_format", + "name": "Remote tab title format", + "type": "remotetabformatedit", + "default": "%U%h" + } + ] + } + ] + }, + { + "key": "shortcuts", + "name": "Shortcuts", + "groups": [ + { + "key" : "terminal", + "name" : "Terminal", + "options" : [ + { + "key": "copy", + "name": "Copy", + "type": "shortcut", + "default": "Ctrl+Shift+C" + }, + + + { + "key": "paste", + "name": "Paste", + "type": "shortcut", + "default": "Ctrl+Shift+V" + }, + { + "key": "find", + "name": "Find", + "type": "shortcut", + "default": "Ctrl+Alt+F" + }, + { + "key": "zoom_in", + "name": "Zoom in", + "type": "shortcut", + "default": "Ctrl+=" + }, + { + "key": "zoom_out", + "name": "Zoom out", + "type": "shortcut", + "default": "Ctrl+-" + }, + { + "key": "default_size", + "name": "Default size", + "type": "shortcut", + "default": "Ctrl+0" + }, + { + "key": "select_all", + "name": "Select all", + "type": "shortcut", + "default": "Ctrl+Shift+A" + } + ] + }, + { + "key" : "tab", + "name" : "Tabs", + "options" : [ + { + "key": "new_tab", + "name": "New tab", + "type": "shortcut", + "default": "Ctrl+Shift+T" + }, + { + "key": "close_tab", + "name": "Close tab", + "type": "shortcut", + "default": "Alt+W" + }, + { + "key": "close_other_tabs", + "name": "Close other tabs", + "type": "shortcut", + "default": "Ctrl+Shift+W" + }, + { + "key": "previous_tab", + "name": "Previous tab", + "type": "shortcut", + "default": "Ctrl+Tab" + }, + { + "key": "next_tab", + "name": "Next tab", + "type": "shortcut", + "default": "Ctrl+Shift+Tab" + }, + { + "key": "vertical_split", + "name": "Vertical split", + "type": "shortcut", + "default": "Ctrl+Shift+J" + }, + { + "key": "horionzal_split", + "name": "Horizontal split", + "type": "shortcut", + "default": "Ctrl+Shift+H" + }, + { + "key": "select_upper_workspace", + "name": "Select upper workspace", + "type": "shortcut", + "default": "Alt+Up" + }, + { + "key": "select_lower_workspace", + "name": "Select lower workspace", + "type": "shortcut", + "default": "Alt+Down" + }, + { + "key": "select_left_workspace", + "name": "Select left workspace", + "type": "shortcut", + "default": "Alt+Left" + }, + { + "key": "select_right_workspace", + "name": "Select right workspace", + "type": "shortcut", + "default": "Alt+Right" + }, + { + "key": "close_workspace", + "name": "Close workspace", + "type": "shortcut", + "default": "Alt+Q" + }, + { + "key": "close_other_workspaces", + "name": "Close other workspaces", + "type": "shortcut", + "default": "Ctrl+Shift+Q" + }, + { + "key": "switch_label_win_1", + "name": "Go to tab 1", + "type": "shortcut", + "default": "Ctrl+Shift+1" + }, + { + "key": "switch_label_win_2", + "name": "Go to tab 2", + "type": "shortcut", + "default": "Ctrl+Shift+2" + }, + { + "key": "switch_label_win_3", + "name": "Go to tab 3", + "type": "shortcut", + "default": "Ctrl+Shift+3" + }, + { + "key": "switch_label_win_4", + "name": "Go to tab 4", + "type": "shortcut", + "default": "Ctrl+Shift+4" + }, + { + "key": "switch_label_win_5", + "name": "Go to tab 5", + "type": "shortcut", + "default": "Ctrl+Shift+5" + }, + { + "key": "switch_label_win_6", + "name": "Go to tab 6", + "type": "shortcut", + "default": "Ctrl+Shift+6" + }, + { + "key": "switch_label_win_7", + "name": "Go to tab 7", + "type": "shortcut", + "default": "Ctrl+Shift+7" + }, + { + "key": "switch_label_win_8", + "name": "Go to tab 8", + "type": "shortcut", + "default": "Ctrl+Shift+8" + }, + { + "key": "switch_label_win_9", + "name": "Go to tab 9", + "type": "shortcut", + "default": "Ctrl+Shift+9" + } + ] + }, + { + "key" : "advanced", + "name" : "Others", + "options" : [ + { + "key": "switch_fullscreen", + "name": "Fullscreen", + "type": "shortcut", + "default": "F11" + }, + { + "key": "rename_title", + "name": "Rename title", + "type": "shortcut", + "default": "F2" + }, + { + "key": "display_shortcuts", + "name": "Display shortcuts", + "type": "shortcut", + "default": "Ctrl+Shift+?" + }, + { + "key": "custom_command", + "name": "Custom commands", + "type": "shortcut", + "default": "Alt+Ins" + }, + { + "key": "remote_management", + "name": "Remote management", + "type": "shortcut", + "default": "Alt+Del" + } + ] + } + ] + }, + { + "key": "advanced", + "name": "Advanced", + "groups": [ + { + "key": "cursor", + "name": "Cursor", + "options": [ + { + "key": "cursor_shape", + "name": "Cursor style", + "type": "buttongroup", + "items": ["▐","_","|"], + "default": 0, + "i18n_skip_keys": ["items"] + }, + { + "key": "cursor_blink", + "type": "checkbox", + "text": "Cursor blink", + "default": true + }, + + { + "key": "auto_copy_selection", + "type": "checkbox", + "text": "Copy on select", + "default": true + } + ] + }, + { + "key": "scroll", + "name": "Scroll", + "options": [ + { + "key": "scroll_on_key", + "type": "checkbox", + "text": "Scroll on keystroke", + "default": true + }, + { + "key": "scroll_on_output", + "type": "checkbox", + "text": "Scroll on output", + "default": true + } + ] + }, + { + "key": "window", + "name": "Window", + "options": [ + { + "key": "use_on_starting", + "name": "Use on starting", + "type": "combobox", + "default": "window_normal" + }, + { + "key": "blurred_background", + "text": "Blur background", + "type": "checkbox", + "default": "false" + }, + { + "key": "auto_hide_raytheon_window", + "text": "Hide Quake window after losing focus", + "type": "checkbox", + "default": "false" + } + ] + }, + { + "key": "shell", + "name": "Shell", + "options": [ + { + "key": "default_shell", + "name": "Shell profile", + "type": "shellconfigcombox", + "default": "$SHELL" + }, + { + "key": "enable_ctrl_flow", + "text": "Disable flow control using Ctrl+S, Ctrl+Q", + "type": "checkbox", + "default": "false" + } + ] + } + ] + } + ] +} diff -Nru deepin-terminal-5.0.0+ds1/src/assets/other/ssh_login.sh deepin-terminal-5.4.13/src/assets/other/ssh_login.sh --- deepin-terminal-5.0.0+ds1/src/assets/other/ssh_login.sh 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/other/ssh_login.sh 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,77 @@ +#! /usr/bin/expect -f + +# Copyright (C) 2011 ~ 2016 Deepin, Inc. +# 2011 ~ 2016 Wang Yong +# +# Author: Wang Yong +# Maintainer: Wang Yong +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +## All possible interactive messages: +# Are you sure you want to continue connecting (yes/no)? +# password: +# Enter passphrase for key + +## Main +# Delete self for secret, will not affect the following code +file delete $argv0 + +# Setup variables +# Set timeout -1 to avoid remote server dis-connect. +set timeout -1 +set user [lindex $argv 0] +set server [lindex $argv 1] +set port [lindex $argv 2] +set private_key [lindex $argv 3] +set password [lindex $argv 4] +set authentication {<>} +set ssh_cmd {zssh -X -o ServerAliveInterval=60} +set ssh_opt {$user@$server -p $port -o PubkeyAuthentication=$authentication} +set remote_command {<>} + +# fix bug#64758 修改服务器密码,点击连接没有密码错误提示语,且可以成功连接 +# 将ascii值转换为字符串,并保存到encoded_password变量中。 +set encoded_password "" +set hexstring $password +set len [string length $hexstring] +for {set i 0} {$i < [expr $len / 2]} {incr i} { + set j [expr 2 * $i] + set char [string range $hexstring $j [expr $j + 1]] + set encoded_password $encoded_password[format %c [format %i 0x$char]] +} + +# This code is use for synchronous pty's size to avoid terminal not update if login in remote server. +trap { + stty rows [stty rows] columns [stty columns] < $spawn_out(slave,name) +} WINCH + +# Spawn and expect +if { $authentication == "no" } { +eval spawn $ssh_cmd $ssh_opt -t $remote_command exec \\\$SHELL -l +} else { +eval spawn $ssh_cmd $ssh_opt -i $private_key -t $remote_command exec \\\$SHELL -l +} + +if { [string length $password] } { + expect { + timeout {send_user "ssh connection time out, please operate manually\n"} + -nocase "yes/no" {send "yes\r"; exp_continue} + -nocase -re "password:|enter passphrase for key" { + send "$encoded_password\r" + } + } +} +interact + diff -Nru deepin-terminal-5.0.0+ds1/src/assets/resources.qrc deepin-terminal-5.4.13/src/assets/resources.qrc --- deepin-terminal-5.0.0+ds1/src/assets/resources.qrc 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/assets/resources.qrc 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,24 @@ + + + other/default-config.json + other/ssh_login.sh + logo/deepin-terminal.svg + icons/deepin/builtin/light/icons/dt_server_44px.svg + icons/deepin/builtin/light/icons/dt_server_group_44px.svg + icons/deepin/builtin/light/icons/dt_arrow_right_20px.svg + icons/deepin/builtin/light/icons/dt_command_44px.svg + icons/deepin/builtin/light/icons/dt_edit_20px.svg + icons/deepin/builtin/dark/icons/dt_server_44px.svg + icons/deepin/builtin/dark/icons/dt_server_group_44px.svg + icons/deepin/builtin/dark/icons/dt_arrow_right_20px.svg + icons/deepin/builtin/dark/icons/dt_command_44px.svg + icons/deepin/builtin/dark/icons/dt_edit_20px.svg + icons/deepin/builtin/light/icons/dt_opacity_left_20px.svg + icons/deepin/builtin/light/icons/dt_opacity_right_20px.svg + icons/deepin/builtin/dark/icons/dt_opacity_left_20px.svg + icons/deepin/builtin/dark/icons/dt_opacity_right_20px.svg + icons/deepin/builtin/warning.svg + logo/headbar-dark.svg + logo/headbar-light.svg + + diff -Nru deepin-terminal-5.0.0+ds1/src/common/define.h deepin-terminal-5.4.13/src/common/define.h --- deepin-terminal-5.0.0+ds1/src/common/define.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/common/define.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DTNG_DEFINE_H +#define DTNG_DEFINE_H + +#include +#include +/* + TERMINALWIDGET_VERSION is (major << 16) + (minor << 8) + patch. + can be used like #if (TERMINALWIDGET_VERSION >= QT_VERSION_CHECK(0, 7, 1)) +*/ +#define TERMINALWIDGET_VERSION QT_VERSION_CHECK(TERMINALWIDGET_VERSION_MAJOR, TERMINALWIDGET_VERSION_MINOR, TERMINALWIDGET_VERSION_PATCH) +#define KEY_WIDGET_RUN (Qt::Key_Enter) + +#define SEARCHBAR_RIGHT_MARGIN 382 + +// qterminal +const QString TERM_WIDGET_NAME = "Konsole::TerminalScreen"; + +// log +// 性能测试相关日志 +const QString GRAB_POINT = "[GRABPOINT] "; +// 日志类型 +const QString LOGO_TYPE = "APPTESTPINT-"; +// 打开应用程序时间(ms) +const QString INIT_APP_TIME = "0001 "; +// 新建窗口时间(ms) +const QString CREATE_NEW_MAINWINDOE = "0004 "; +// 新建工作区时间(ms) +const QString CREATE_NEW_TAB_TIME = "0005 "; +// 查找时间(ms) +const QString SEARCH_TIME = "0006 "; +// 显示设置时间(ms) +const QString SHOW_SETTINGS_TIME = "0007 "; + +// 默认标签标题 +const QString DEFAULT_TAB_TITLE = "Terminal"; + +// 搜索框焦点状态 +enum SearchBar_State { + // 显示搜索框,焦点落入搜索框 + SearchBar_Show = 0, + // 隐藏搜索框,显示其他控件 + SearchBar_Hide = 1, + // 隐藏搜索框,焦点落回终端 + SearchBar_FocusOut = 2 +}; + +// 快捷键转换 +const QString SHORTCUT_CONVERSION_UP = "~!@#$%^&*()_+{}:\"|<>?"; +const QString SHORTCUT_CONVERSION_DOWN = "`1234567890-=[];'\\,./"; + +#endif // DTNG_DEFINE_H diff -Nru deepin-terminal-5.0.0+ds1/src/common/settingio.cpp deepin-terminal-5.4.13/src/common/settingio.cpp --- deepin-terminal-5.0.0+ds1/src/common/settingio.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/common/settingio.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,552 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: zhukewei +* +* Maintainer: zhukewei +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "settingio.h" + +#include +#include +#include +#include +#include + +#define SLASH_REPLACE_CHAR QChar(0x01) +bool SettingIO::rewrite = false; +SettingIO::SettingIO(QObject *parent) : QObject(parent) +{ + +} + +bool SettingIO::readIniFunc(QIODevice &device, QSettings::SettingsMap &settingsMap) +{ + QString currentSection; + QTextStream stream(&device); + stream.setCodec("UTF-8"); + QString data; + rewrite = false; + while (!stream.atEnd()) { + data = stream.readLine(); + if (data.trimmed().isEmpty()) + continue; + + if (QChar('[') == data[0]) { + QString iniSection; + int inx = data.indexOf(QChar(']')); + if (-1 == inx) + iniSection = data.mid(1); + else + iniSection = data.mid(1, inx - 1); + + iniSection = iniSection.trimmed(); + if (0 == iniSection.compare(QString("general"), Qt::CaseInsensitive)) { + currentSection.clear(); + } else { + if (0 == iniSection.compare(QString("%general"), Qt::CaseInsensitive)) { + currentSection = QString("general"); + } else { + iniSection = canTransfer(iniSection); + currentSection = iniSection; + } + currentSection.replace('/', SLASH_REPLACE_CHAR); + currentSection += QChar('/'); + } + } else { + bool inQuotes = false; + int equalsPos = -1; + QList commaPos; + int charPos = 0; + while (charPos < data.size()) { + QChar ch = data.at(charPos); + if (QChar('=') == ch) { + if (!inQuotes && equalsPos == -1) + equalsPos = charPos; + } else if (QChar('"') == ch) { + inQuotes = !inQuotes; + } + charPos++; + } + if (-1 == equalsPos) { + break; + } else { + QString key = data.mid(0, equalsPos).trimmed(); + if (key.isEmpty()) + break; + else + key = currentSection + key; + + if (commaPos.isEmpty()) { //value + QString v = data.mid(equalsPos + 1).trimmed(); + if (v.startsWith("\"") && v.endsWith("\"") && v.length() > 1) + v = v.mid(1, v.length() - 2); + + QString str = unescapedString(v); + //如果是3字节的Latin1中文,转换中文编码 + if (v.count("\\x") > 0 && 0 == v.count("\\x") % 3) { + int first = v.indexOf("\\x"); + int next = v.indexOf("\\x", first + 1); + int len = next - first; + if (4 == len) + str = QString::fromLocal8Bit(str.toLatin1()); + } + + settingsMap[key] = stringToVariant(str); + } else { //value list + commaPos.prepend(equalsPos); + commaPos.append(-1); + QVariantList vals; + for (int pos = 1; pos < commaPos.size(); ++pos) { + QString d = data.mid(commaPos.at(pos - 1) + 1, commaPos.at(pos) - commaPos.at(pos - 1) - 1); + QString v = d.trimmed(); + if (v.startsWith("\"") && v.endsWith("\"") && v.length() > 1) + v = v.mid(1, v.length() - 2); + + vals.append(stringToVariant(unescapedString(v))); + } + settingsMap[key] = vals; + } + } + } + } + return true; +} + +bool SettingIO::writeIniFunc(QIODevice &device, const QSettings::SettingsMap &settingsMap) +{ +#ifdef Q_OS_WIN + const char *const eol = "\r\n"; +#else + const char *eol = "\n"; +#endif + bool writeError = false; + + QString lastSection; + QMapIterator it(settingsMap); + while (it.hasNext() && !writeError) { + it.next(); + QString key = it.key(); + QString section; + // qInfo()<<"key: "<> result; + return result; + } + } + if (s.startsWith(QString("@@"))) + return QVariant(s.mid(1)); + } + return QVariant(s); +} + +QByteArray SettingIO::escapedString(const QString &src) +{ + bool needsQuotes = false; + bool escapeNextIfDigit = false; + QByteArray result; + result.reserve(src.size() * 3 / 2); + for (int i = 0; i < src.size(); ++i) { + uint ch = src.at(i).unicode(); + if (';' == ch || ',' == ch || '=' == ch || '#' == ch) + needsQuotes = true; + + if (escapeNextIfDigit && ((ch >= '0' && ch <= '9') + || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F'))) { + result += "\\x"; + result += QByteArray::number(ch, 16); + continue; + } + + escapeNextIfDigit = false; + + switch (ch) { + case '\0': + result += "\\0"; + escapeNextIfDigit = true; + break; + case '\n': + result += "\\n"; + break; + case '\r': + result += "\\r"; + break; + case '\t': + result += "\\t"; + break; + case '"': + case '\\': + result += '\\'; + result += (char)ch; + break; + default: + if (ch <= 0x1F) { + result += "\\x"; + result += QByteArray::number(ch, 16); + escapeNextIfDigit = true; + } else { + result += QString(src[i]).toUtf8(); + } + break; + } + } + if (result.size() > 0 && (' ' == result.at(0) || ' ' == result.at(result.size() - 1))) + needsQuotes = true; + + if (needsQuotes) { + result.prepend('"'); + result.append('"'); + } + return result; +} + + +const char hexDigits[] = "0123456789ABCDEF"; + +QString SettingIO::unescapedString(const QString &src) +{ + static const char escapeCodes[][2] = { + { 'a', '\a' }, + { 'b', '\b' }, + { 'f', '\f' }, + { 'n', '\n' }, + { 'r', '\r' }, + { 't', '\t' }, + { 'v', '\v' }, + { '"', '"' }, + { 's', ' '}, + { '?', '?' }, + { '\'', '\'' }, + { '\\', '\\' } + + }; + static const int numEscapeCodes = sizeof(escapeCodes) / sizeof(escapeCodes[0]); + + QString stringResult; + int escapeVal = 0; + QChar ch; + int i = 0; +normal: + while (i < src.size()) { + ch = src.at(i); + if (QChar('\\') == ch) { + ++i; + if (i >= src.size()) + break; + + ch = src.at(i++); + for (int j = 0; j < numEscapeCodes; ++j) { + if (ch == escapeCodes[j][0]) { + stringResult += QChar(escapeCodes[j][1]); + goto normal; + } + } + if ('x' == ch) { + escapeVal = 0; + if (i >= src.size()) + break; + ch = src.at(i); + if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')) + goto hexEscape; + } else if (ch >= '0' && ch <= '7') { + escapeVal = ch.unicode() - '0'; + goto octEscape; + } else { + //skip + } + } else { + stringResult += ch; + } + i++; + } + goto end; + +hexEscape: + if (i >= src.size()) { + stringResult += QChar(escapeVal); + goto end; + } + + ch = src.at(i); + if (ch >= 'a') + ch = ch.unicode() - ('a' - 'A'); + if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F')) { + escapeVal <<= 4; + escapeVal += strchr(hexDigits, ch.toLatin1()) - hexDigits; + ++i; + goto hexEscape; + } else { + stringResult += QChar(escapeVal); + goto normal; + } + +octEscape: + if (i >= src.size()) { + stringResult += QChar(escapeVal); + goto end; + } + + ch = src.at(i); + if (ch >= '0' && ch <= '7') { + escapeVal <<= 3; + escapeVal += ch.toLatin1() - '0'; + ++i; + goto octEscape; + } else { + stringResult += QChar(escapeVal); + goto normal; + } + +end: + return stringResult; +} + +QString SettingIO::canTransfer(const QString &str) +{ + QString res; + //如果有%U,是Uincode字符串 + if (str.contains("%U") || str.contains("%u")) { + rewrite = true; + //uincode + iniUnescapedKey(str.toLocal8Bit(), 0, str.size(), res); + } + //如果是%是Latin1格式的字符串 + else if (str.contains("%")) { + rewrite = true; + //utf-8转换为uincode过了 + iniUnescapedKey(str.toLocal8Bit(), 0, str.size(), res); + res = QString::fromLocal8Bit(res.toLatin1()); + } else { + res = str; + } + + return res; +} + +bool SettingIO::iniUnescapedKey(const QByteArray &key, int from, int to, QString &result) +{ + bool lowercaseOnly = true; + int i = from; + result.reserve(result.length() + (to - from)); + while (i < to && i < key.count()) { + int ch = (uchar)key.at(i); + + if ('\\' == ch) { + result += QLatin1Char('/'); + ++i; + continue; + } + + if (ch != '%' || i == to - 1) { + if (uint(ch - 'A') <= 'Z' - 'A') // only for ASCII + lowercaseOnly = false; + result += QLatin1Char(ch); + ++i; + continue; + } + + int numDigits = 2; + int firstDigitPos = i + 1; + + ch = key.at(i + 1); + if ('U' == ch) { + ++firstDigitPos; + numDigits = 4; + } + + if (firstDigitPos + numDigits > to) { + result += QLatin1Char('%'); + // ### missing U + ++i; + continue; + } + + bool ok; + ch = key.mid(firstDigitPos, numDigits).toInt(&ok, 16); + if (!ok) { + result += QLatin1Char('%'); + // ### missing U + ++i; + continue; + } + + QChar qch(ch); + if (qch.isUpper()) + lowercaseOnly = false; + result += qch; + i = firstDigitPos + numDigits; + } + return lowercaseOnly; +} + +//自定义规则 +QSettings::Format USettings::g_customFormat = QSettings::registerFormat("conf", SettingIO::readIniFunc, SettingIO::writeIniFunc); + +//构造函数 +USettings::USettings(const QString &fileName, QObject *parent) + : QSettings(fileName, g_customFormat, parent) +{ + QSettings::setIniCodec(QTextCodec::codecForName("UTF-8")); +} + +//析构函数 +USettings::~USettings() {} + +void USettings::beginGroup(const QString &prefix) +{ + QString tempPrefix = prefix; + tempPrefix.replace('/', SLASH_REPLACE_CHAR); + QSettings::beginGroup(tempPrefix); +} + +void USettings::endGroup() +{ + QSettings::endGroup(); +} + +void USettings::setValue(const QString &key, const QVariant &value) +{ + QString tempKey = key; + tempKey.replace('/', SLASH_REPLACE_CHAR); + QSettings::setValue(tempKey, value); +} + +QVariant USettings::value(const QString &key, const QVariant &defaultValue) const +{ + QString tempKey = key; + tempKey.replace('/', SLASH_REPLACE_CHAR); + QVariant value = QSettings::value(tempKey, defaultValue); + return value.toString().replace(SLASH_REPLACE_CHAR, '/'); +} + +void USettings::remove(const QString &key) +{ + QString tempKey = key; + tempKey.replace('/', SLASH_REPLACE_CHAR); + QSettings::remove(tempKey); +} + +bool USettings::contains(const QString &key) const +{ + QString tempKey = key; + tempKey.replace('/', SLASH_REPLACE_CHAR); + return QSettings::contains(tempKey); +} + +QStringList USettings::childGroups() +{ + QStringList childGroups = QSettings::childGroups(); + for (QString &child : childGroups) { + child.replace(SLASH_REPLACE_CHAR, '/'); + } + return childGroups; +} diff -Nru deepin-terminal-5.0.0+ds1/src/common/settingio.h deepin-terminal-5.4.13/src/common/settingio.h --- deepin-terminal-5.0.0+ds1/src/common/settingio.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/common/settingio.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,168 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: zhukewei +* +* Maintainer: zhukewei +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef SETTINGIO_H +#define SETTINGIO_H + +#include +#include +#include +#include + +class SettingIO : public QObject +{ + Q_OBJECT +public: + explicit SettingIO(QObject *parent = nullptr); + /** + * @brief 读取自定义配置文件 + * @author ut001811 朱科伟 + * @param device + * @param settingsMap + * @return + */ + static bool readIniFunc(QIODevice &device, QSettings::SettingsMap &settingsMap); + /** + * @brief 写入自定义配置文件 + * @author ut001811 朱科伟 + * @param device + * @param settingsMap + * @return + */ + static bool writeIniFunc(QIODevice &device, const QSettings::SettingsMap &settingsMap); +private: + /** + * @brief variant 在转换成QString + * @author ut001811 朱科伟 + * @param v + * @return + */ + static QString variantToString(const QVariant &v); + /** + * @brief stringToVariant + * @author ut001811 朱科伟 + * @author 将QString转换为Variant + * @param s + * @return + */ + static QVariant stringToVariant(const QString &s); + /** + * @brief 加入特殊字符\x + * @author ut001811 朱科伟 + * @param src + * @return + */ + static QByteArray escapedString(const QString &src); + /** + * @brief 去除特殊字符\x + * @author ut001811 朱科伟 + * @param src + * @return + */ + static QString unescapedString(const QString &src); + /** + * @brief uincode是否需要被转换 + * @author ut001811 朱科伟 + * @param str + * @return + */ + static QString canTransfer(const QString &str); + /** + * @brief 去除unicode的标识信息 %U + * @author ut001811 朱科伟 + * @param key + * @param from + * @param to + * @param result + * @return + */ + static bool iniUnescapedKey(const QByteArray &key, int from, int to, QString &result); +public: + static bool rewrite; +}; + +/** + * @brief The USettings class + * 1.conf配置文件“/”与QSettings(SLASH_REPLACE_CHAR)通过SettingIO实现转换 + * 2.QSettings(SLASH_REPLACE_CHAR)与Conmmand/Remote(/)通过USettings实现转换 + */ +class USettings : protected QSettings +{ + Q_OBJECT +public: + USettings(const QString &fileName, QObject *parent = nullptr); + ~USettings(); + + /** + * @brief Appends prefix to the current group. + * @author ut001121 zhangmeng + * @param prefix + */ + void beginGroup(const QString &prefix); + /** + * @brief Resets the group to what it was before the corresponding beginGroup() call. + * @author ut001121 zhangmeng + */ + void endGroup(); + + /** + * @brief Sets the value of setting key to value. If the key already exists, the previous value is overwritten. + * @author ut001121 zhangmeng + * @param key + * @param value + */ + void setValue(const QString &key, const QVariant &value); + /** + * @brief Returns the value for setting key. If the setting doesn't exist, returns defaultValue. + * @author ut001121 zhangmeng + * @param key + * @param defaultValue + * @return + */ + QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const; + + /** + * @brief Removes the setting key and any sub-settings of key. + * @author ut001121 zhangmeng + * @param key + */ + void remove(const QString &key); + /** + * @brief Returns true if there exists a setting called key; returns false otherwise. + * @author ut001121 zhangmeng + * @param key + * @return + */ + bool contains(const QString &key) const; + + /** + * @brief Returns a list of all key top-level groups that contain keys that can be read using the QSettings object. + * @author ut001121 zhangmeng + * @return + */ + QStringList childGroups(); + +private: + //自定义规则 + static Format g_customFormat; +}; + +#endif // SETTINGIO_H diff -Nru deepin-terminal-5.0.0+ds1/src/common/utils.cpp deepin-terminal-5.4.13/src/common/utils.cpp --- deepin-terminal-5.0.0+ds1/src/common/utils.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/common/utils.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,752 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "utils.h" +#include "termwidget.h" +#include "dbusmanager.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QHash Utils::m_imgCacheHash; +QHash Utils::m_fontNameCache; + +Utils::Utils(QObject *parent) : QObject(parent) +{ +} + +Utils::~Utils() +{ +} + +QString Utils::getQssContent(const QString &filePath) +{ + QFile file(filePath); + QString qss; + + if (file.open(QIODevice::ReadOnly)) + qss = file.readAll(); + + return qss; +} + +QString Utils::getConfigPath() +{ + static QStringList list = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation); + const QString path = list.value(0); + QDir dir( + QDir(path).filePath(qApp->organizationName())); + + return dir.filePath(qApp->applicationName()); +} + +QString Utils::suffixList() +{ + return QString("Font Files (*.ttf *.ttc *.otf)"); +} + +QString Utils::getElidedText(QFont font, QString text, int MaxWith, Qt::TextElideMode elideMode) +{ + if (text.isEmpty()) + return ""; + + QFontMetrics fontWidth(font); + + // 计算字符串宽度 + int width = fontWidth.width(text); + + // 当字符串宽度大于最大宽度时进行转换 + if (width >= MaxWith) { + // 右部显示省略号 + text = fontWidth.elidedText(text, elideMode, MaxWith); + } + + return text; +} + +QString Utils::getRandString() +{ + int max = 6; //字符串长度 + QString tmp = QString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + QString str; + QTime t; + t = QTime::currentTime(); + qsrand(static_cast(t.msec() + t.second() * 1000)); + for (int i = 0; i < max; i++) { + int len = qrand() % tmp.length(); + str[i] = tmp.at(len); + } + return str; +} + +QString Utils::showDirDialog(QWidget *widget) +{ + QString curPath = QDir::currentPath(); + QString dlgTitle = QObject::tr("Select a directory to save the file"); + + DFileDialog dialog(widget, dlgTitle, curPath); + dialog.setAcceptMode(QFileDialog::AcceptOpen); + dialog.setFileMode(QFileDialog::Directory); + dialog.setOption(DFileDialog::DontConfirmOverwrite); + dialog.setLabelText(QFileDialog::Accept, QObject::tr("Select")); + int code = dialog.exec(); + + if (QDialog::Accepted == code && !dialog.selectedFiles().isEmpty()) { + QStringList list = dialog.selectedFiles(); + const QString dirName = list.value(0); + return dirName; + } else { + return ""; + } +} + +QStringList Utils::showFilesSelectDialog(QWidget *widget) +{ + QString curPath = QDir::currentPath(); + QString dlgTitle = QObject::tr("Select file to upload"); + + DFileDialog dialog(widget, dlgTitle, curPath); + dialog.setAcceptMode(QFileDialog::AcceptOpen); + dialog.setFileMode(QFileDialog::ExistingFiles); + dialog.setLabelText(QFileDialog::Accept, QObject::tr("Upload")); + + // 选择文件,却点击了叉号 + int code = dialog.exec(); + if (code == QDialog::Accepted) + return dialog.selectedFiles(); + + return QStringList(); +} + +bool Utils::showExitConfirmDialog(CloseType type, int count) +{ + // count < 1 不提示 + if (count < 1) + return true; + + QString title; + QString txt; + if (type != CloseType_Window) { + // 默认的count = 1的提示 + title = QObject::tr("Close this terminal?"); + txt = QObject::tr("There is still a process running in this terminal. " + "Closing the terminal will kill it."); + // count > 1 提示 + if (count > 1) { + txt = QObject::tr("There are still %1 processes running in this terminal. " + "Closing the terminal will kill all of them.") + .arg(count); + } + } else { + title = QObject::tr("Close this window?"); + txt = QObject::tr("There are still processes running in this window. Closing the window will kill all of them."); + } + + DDialog dlg(title, txt); + dlg.setIcon(QIcon::fromTheme("deepin-terminal")); + dlg.addButton(QString(tr("Cancel", "button")), false, DDialog::ButtonNormal); + /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close Begin***************/ + dlg.addButton(QString(tr("Close", "button")), true, DDialog::ButtonWarning); + /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close End***************/ + return (DDialog::Accepted == dlg.exec()); +} + +void Utils::getExitDialogText(CloseType type, QString &title, QString &txt, int count) +{ + // count < 1 不提示 + if (count < 1) + return ; + + //QString title; + //QString txt; + if (CloseType_Window == type) { + title = QObject::tr("Close this window?"); + txt = QObject::tr("There are still processes running in this window. Closing the window will kill all of them."); + } else { + // 默认的count = 1的提示 + title = QObject::tr("Close this terminal?"); + txt = QObject::tr("There is still a process running in this terminal. " + "Closing the terminal will kill it."); + // count > 1 提示 + if (count > 1) { + txt = QObject::tr("There are still %1 processes running in this terminal. " + "Closing the terminal will kill all of them.") + .arg(count); + } + } +} + +bool Utils::showExitUninstallConfirmDialog() +{ + DDialog dlg(QObject::tr("Programs are still running in terminal"), QObject::tr("Are you sure you want to uninstall it?")); + dlg.setIcon(QIcon::fromTheme("deepin-terminal")); + dlg.addButton(QString(tr("Cancel", "button")), false, DDialog::ButtonNormal); + dlg.addButton(QString(tr("OK", "button")), true, DDialog::ButtonWarning); + return (DDialog::Accepted == dlg.exec()); +} + +//单词可能拼错了showUninstallConfirmDialog +bool Utils::showUninstallConfirmDialog(QString commandname) +{ + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 根据remove和purge卸载命令,显示不同的弹框信息 Begin***************/ + QString title = "", text = ""; + if ("remove" == commandname) { + title = QObject::tr("Are you sure you want to uninstall this application?"); + text = QObject::tr("You will not be able to use Terminal any longer."); + } else if ("purge" == commandname) { + //后面根据产品提供的信息,修改此处purge命令卸载时的弹框信息 + title = QObject::tr("Are you sure you want to uninstall this application?"); + text = QObject::tr("You will not be able to use Terminal any longer."); + } + DDialog dlg(title, text); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 根据remove和purge卸载命令,显示不同的弹框信息 Begin***************/ + dlg.setIcon(QIcon::fromTheme("dialog-warning")); + dlg.addButton(QObject::tr("Cancel", "button"), false, DDialog::ButtonNormal); + dlg.addButton(QObject::tr("OK", "button"), true, DDialog::ButtonWarning); + return (DDialog::Accepted == dlg.exec()); +} + +bool Utils::showShortcutConflictMsgbox(QString txt) +{ + + DDialog dlg; + dlg.setIcon(QIcon::fromTheme("dialog-warning")); + dlg.setTitle(QString(txt + QObject::tr("please set another one."))); + /***mod by ut001121 zhangmeng 20200521 将确认按钮设置为默认按钮 修复BUG26960***/ + dlg.addButton(QString(tr("OK", "button")), true, DDialog::ButtonNormal); + dlg.exec(); + return true; +} + +void Utils::setSpaceInWord(DPushButton *button) +{ + const QString &text = button->text(); + + if (2 == text.count()) { + for (const QChar &ch : text) { + switch (ch.script()) { + case QChar::Script_Han: + case QChar::Script_Katakana: + case QChar::Script_Hiragana: + case QChar::Script_Hangul: + break; + default: + return; + } + } + + button->setText(QString().append(text.at(0)).append(QChar::Nbsp).append(text.at(1))); + } +} + +void Utils::showSameNameDialog(QWidget *parent, const QString &firstLine, const QString &secondLine) +{ + DDialog *dlg = new DDialog(parent); + dlg->setAttribute(Qt::WA_DeleteOnClose); + dlg->setWindowModality(Qt::WindowModal); + dlg->setTitle(QString(firstLine + secondLine)); + dlg->setIcon(QIcon::fromTheme("dialog-warning")); + dlg->addButton(QString(QObject::tr("OK", "button")), true, DDialog::ButtonNormal); + dlg->show(); + moveToCenter(dlg); +} + +void Utils::clearChildrenFocus(QObject *objParent) +{ + // 可以获取焦点的控件名称列表 + QStringList foucswidgetlist; + foucswidgetlist << "QLineEdit" << TERM_WIDGET_NAME; + + //qInfo() << "checkChildrenFocus start" << objParent->children().size(); + for (QObject *obj : objParent->children()) { + if (!obj->isWidgetType()) + continue; + + QWidget *widget = qobject_cast(obj); + if (widget && Qt::NoFocus != widget->focusPolicy()) { + if (!foucswidgetlist.contains(widget->metaObject()->className())) + widget->setFocusPolicy(Qt::NoFocus); + + } + clearChildrenFocus(obj); + } +} + +void Utils::parseCommandLine(QStringList arguments, TermProperties &Properties, bool appControl) +{ + QCommandLineParser parser; + parser.setApplicationDescription(qApp->applicationDescription()); + parser.addHelpOption(); + parser.addVersionOption(); + parser.setOptionsAfterPositionalArgumentsMode(QCommandLineParser::ParseAsOptions); + parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsCompactedShortOptions); + QCommandLineOption optWorkDirectory({ "w", "work-directory" }, + QObject::tr("Set the work directory"), + "path"); + QCommandLineOption optWindowState({ "m", "window-mode" }, + QString(QObject::tr("Set the window mode on starting") + " (normal, maximum, fullscreen, splitscreen)"), + "state-mode"); + QCommandLineOption optExecute({ "e", "execute" }, + QObject::tr("Execute a command in the terminal"), + "command"); + QCommandLineOption optScript({ "C", "run-script" }, + QObject::tr("Run script string in the terminal"), + "script"); + // QCommandLineOption optionExecute2({"x", "Execute" }, "Execute command in the terminal", "command"); + QCommandLineOption optQuakeMode({ "q", "quake-mode" }, + QObject::tr("Run in quake mode"), + ""); + QCommandLineOption optKeepOpen("keep-open", + QObject::tr("Keep terminal open when command finishes"), + ""); + // parser.addPositionalArgument("e", "Execute command in the terminal", "command"); + + parser.addOptions({ optWorkDirectory, + optExecute, /*optionExecute2,*/ + optQuakeMode, + optWindowState, + optKeepOpen, + optScript }); + // parser.addPositionalArgument("-e", QObject::tr("Execute command in the terminal"), "command"); + + // 解析参数 + if (!parser.parse(arguments)) + qInfo() << "parser error:" << parser.errorText(); + + if (parser.isSet(optExecute)) { + /************************ Add by sunchengxi 2020-09-15:Bug#42864 无法同时打开多个终端 Begin************************/ + Properties[KeepOpen] = false; + Properties[Execute] = parseExecutePara(arguments); + /************************ Add by sunchengxi 2020-09-15:Bug#42864 无法同时打开多个终端 End ************************/ + } + if (parser.isSet(optWorkDirectory)) + Properties[WorkingDir] = parser.value(optWorkDirectory); + + if (parser.isSet(optKeepOpen)) + Properties[KeepOpen] = true; + + if (parser.isSet(optScript)) + Properties[Script] = parser.value(optScript); + + + if (parser.isSet(optQuakeMode)) + Properties[QuakeMode] = true; + else + Properties[QuakeMode] = false; + + // 默认均为非首个 + Properties[SingleFlag] = false; + if (parser.isSet(optWindowState)) { + Properties[StartWindowState] = parser.value(optWindowState); + if (appControl) { + QStringList validString = { "maximum", "fullscreen", "splitscreen", "normal" }; + // 参数不合法时,会显示help以后,直接退出。 + if (!validString.contains(parser.value(optWindowState))) { + parser.showHelp(); + qApp->quit(); + } + } + } + + if (appControl) { + // 处理相应参数,当遇到-v -h参数的时候,这里进程会退出。 + parser.process(arguments); + } else { + qInfo() << "input args:" << qPrintable(arguments.join(" ")); + qInfo() << "arg: optionWorkDirectory" << parser.value(optWorkDirectory); + qInfo() << "arg: optionExecute" << Properties[Execute].toStringList().join(" "); + qInfo() << "arg: optionQuakeMode" << parser.isSet(optQuakeMode); + qInfo() << "arg: optionWindowState" << parser.isSet(optWindowState); + // 这个位置参数解析出来是无法匹配的,可是不带前面标识符,无法准确使用。 + } + return; +} + +QStringList Utils::parseExecutePara(QStringList &arguments) +{ + QVector keys; + keys << "-e" + << "--execute"; + keys << "-h" + << "--help"; + keys << "-v" + << "--version"; + keys << "-w" + << "--work-directory"; + keys << "-q" + << "--quake-mode"; + keys << "-m" + << "--window-mode"; + keys << "--keep-open"; + keys << "-C" + << "--run-script"; + QString opt = "-e"; + int index = arguments.indexOf(opt); + if (-1 == index) { + opt = "--execute"; + index = arguments.indexOf(opt); + } + + index++; + int startIndex = index; + QStringList paraList; + while (index < arguments.size()) { + QString str = arguments.at(index); + // 如果找到下一个指令符就停 + if (keys.contains(str)) + break; + + if (index == startIndex) { + // 第一个参数,支持嵌入二次解析,其它的参数不支持 + paraList += parseNestedQString(str); + } else { + paraList.append(str); + } + + index++; + } + // 将-e 以及后面参数全部删除,防止出现参数被终端捕捉异常情况 + if (paraList.size() != 0) { + for (int i = 0; i < index - startIndex; i++) { + arguments.removeAt(startIndex); + qInfo() << arguments.size(); + } + arguments.removeOne("-e"); + arguments.removeOne("--execute"); + qInfo() << opt << paraList << "arguments" << arguments; + } + + return paraList; +} + +QStringList Utils::parseNestedQString(QString str) +{ + QStringList paraList; + int iLeft = NOT_FOUND; + int iRight = NOT_FOUND; + + // 如果只有一个引号 + if (str.count("\"") >= 1) { + iLeft = str.indexOf("\""); + iRight = str.lastIndexOf("\""); + } else if (str.count("\'") >= 1) { + iLeft = str.indexOf("\'"); + iRight = str.lastIndexOf("\'"); + } else { + + //对路径带空格的脚本,右键执行时不进行拆分处理, //./deepin-terminal "-e" "/home/lx777/Desktop/a b/PerfTools_1.9.sh" + QFileInfo fi(str); + if (fi.isFile()) { + qInfo() << "this is file,not split."; + paraList.append(str); + return paraList; + } + + paraList.append(str.split(QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts)); + return paraList; + } + + paraList.append(str.left(iLeft).split(QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts)); + paraList.append(str.mid(iLeft + 1, iRight - iLeft - 1)); + if (str.size() != iRight + 1) + paraList.append(str.right(str.size() - iRight - 1).split(QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts)); + + return paraList; +} + +QList Utils::encodeList() +{ + QList all = QTextCodec::availableCodecs(); + QList showEncodeList; + // 这是ubuntu18.04支持的编码格式,按国家排列的 + showEncodeList << "UTF-8" << "GB18030" << "GB2312" << "GBK" /*简体中文*/ + << "BIG5" << "BIG5-HKSCS" //<< "EUC-TW" /*繁体中文*/ + << "EUC-JP" << "SHIFT_JIS" //<< "ISO-2022-JP"/*日语*/ + << "EUC-KR" //<< "ISO-2022-KR" //<< "UHC" /*韩语*/ + << "IBM864" << "ISO-8859-6" << "ARABIC" << "WINDOWS-1256" /*阿拉伯语*/ + //<< "ARMSCII-8" /*美国语*/ + << "ISO-8859-13" << "ISO-8859-4" << "WINDOWS-1257" /*波罗的海各国语*/ + << "ISO-8859-14" /*凯尔特语*/ + << "IBM-852" << "ISO-8859-2" << "x-mac-CE" << "WINDOWS-1250" /*中欧*/ + //<< "x-mac-CROATIAN" /*克罗地亚*/ + << "IBM855" << "ISO-8859-5" << "KOI8-R" << "MAC-CYRILLIC" << "WINDOWS-1251" //<< "ISO-IR-111" /*西里尔语*/ + << "CP866" /*西里尔语或俄语*/ + << "KOI8-U" << "x-MacUkraine" /*西里尔语或乌克兰语*/ + //<< "GEORGIAN-PS" + << "ISO-8859-7" << "x-mac-GREEK" << "WINDOWS-1253" /*希腊语*/ + //<< "x-mac-GUJARATI" + //<< "x-mac-GURMUKHI" + << "IBM862" << "ISO-8859-8-I" << "WINDOWS-1255"//<< "x-mac-HEBREW" /*希伯来语*/ + << "ISO-8859-8" /*希伯来语*/ + //<< "x-mac-DEVANAGARI" + //<< "x-mac-ICELANDIC" /*冰岛语*/ + << "ISO-8859-10" /*北欧语*/ + //<< "x-mac-FARSI" /*波斯语*/ + //<< "x-mac-ROMANIAN" //<< "ISO-8859-16" /*罗马尼亚语*/ + << "ISO-8859-3" /*西欧语*/ + << "TIS-620" /*泰语*/ + << "IBM857" << "ISO-8859-9" << "x-mac-TURKISH" << "WINDOWS-1254" /*土耳其语*/ + << "WINDOWS-1258" //<< "TCVN" << "VISCII" /*越南语*/ + << "IBM850" << "ISO-8859-1" << "ISO-8859-15" << "x-ROMAN8" << "WINDOWS-1252"; /*西方国家*/ + + QList encodeList; + // 自定义的名称,系统里不一定大小写完全一样,再同步一下。 + for (const QByteArray &name : showEncodeList) { + QString strname1 = name; + bool bFind = false; + QByteArray encodename; + for (QByteArray &name2 : all) { + QString strname2 = name2; + if (strname1.compare(strname2, Qt::CaseInsensitive) == 0) { + bFind = true; + encodename = name2; + break; + } + } + if (!bFind) + qInfo() << "encode name :" << name << "not find!"; + else + encodeList << encodename; + + } + // 返回需要的值 + return encodeList; +} + +void Utils::set_Object_Name(QObject *object) +{ + if (object != nullptr) + object->setObjectName(object->metaObject()->className()); +} + +QString Utils::converUpToDown(QKeySequence keysequence) +{ + // 获取现在的快捷键字符串 + QString strKey = keysequence.toString(); + + // 是否有shift修饰 + if (!(strKey.contains("Shift") || strKey.contains("shift"))) { + // 没有直接返回字符串 + return strKey; + } + + // 遍历是否存在有shift修饰的字符串 + for (int i = 0; i < SHORTCUT_CONVERSION_UP.count(); ++i) { + QString key = SHORTCUT_CONVERSION_UP[i]; + if (strKey.endsWith(key)) { + // 若存在则替换字符 + strKey.replace(strKey.length() - 1, 1, SHORTCUT_CONVERSION_DOWN[i]); + } + } + + return strKey; +} + +QString Utils::converDownToUp(QKeySequence keysequence) +{ + // 获取现在的快捷键字符串 + QString strKey = keysequence.toString(); + // 是否有shift修饰 + if (!(strKey.contains("Shift") || strKey.contains("shift"))) { + // 没有直接返回字符串 + return strKey; + } + + // 遍历是否存在有shift修饰的字符串 + for (int i = 0; i < SHORTCUT_CONVERSION_DOWN.count(); ++i) { + QString key = SHORTCUT_CONVERSION_DOWN[i]; + if (strKey.contains(key)) { + // 若存在则替换字符 + strKey.replace(key, SHORTCUT_CONVERSION_UP[i]); + } + } + + return strKey; +} + +QString Utils::getCurrentEnvLanguage() +{ + return QString::fromLocal8Bit(qgetenv("LANGUAGE")); +} + +MainWindow *Utils::getMainWindow(QWidget *currWidget) +{ + MainWindow *main = nullptr; + QWidget *pWidget = currWidget->parentWidget(); + while (pWidget != nullptr) { + qInfo() << pWidget->metaObject()->className(); + if (("NormalWindow" == pWidget->objectName()) || ("QuakeWindow" == pWidget->objectName())) { + qInfo() << "has find MainWindow"; + main = static_cast(pWidget); + break; + } + pWidget = pWidget->parentWidget(); + } + return main; +} + +/******** Add by ut001000 renfeixiang 2020-06-15:增加 处理等宽字体的类 Begin***************/ +Q_GLOBAL_STATIC(FontFilter, FontFilters) +FontFilter *FontFilter::instance() +{ + return FontFilters; +} + +FontFilter::FontFilter() +{ + m_thread = new QThread(); + this->moveToThread(m_thread); + QObject::connect(m_thread, &QThread::started, this, [ = ]() { + compareWhiteList(); + m_thread->quit(); + }); +} + +FontFilter::~FontFilter() +{ + if (m_thread != nullptr) { + setStop(true); + m_thread->quit(); + m_thread->wait(); + delete m_thread; + m_thread = nullptr; + } +} + +void FontFilter::handleWidthFont() +{ + if (!m_thread->isRunning()) { + m_thread->start(); + return; + } + qInfo() << "m_thread is Running"; +} + +void FontFilter::setStop(bool stop) +{ + m_bstop = stop; +} + +void FontFilter::compareWhiteList() +{ + QStringList DBUSWhitelist = DBusManager::callAppearanceFont("monospacefont"); + std::sort(DBUSWhitelist.begin(), DBUSWhitelist.end(), [ = ](const QString & str1, const QString & str2) { + QCollator qc; + return qc.compare(str1, str2) < 0; + }); + + //在REPCHAR中增加了一个空格,空格在非等宽字体中长度和字符长度不同 + char REPCHAR[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefgjijklmnopqrstuvwxyz" + "0123456789 ./+@"; + QFontDatabase fontDatabase; + QStringList fontLst = fontDatabase.families(); + QStringList Whitelist; + Whitelist << "Courier 10 Pitch" << "DejaVu Sans Mono" << "Liberation Mono" << "Monospace" + << "Noto Mono" << "Noto Sans Mono" << "Noto Sans Mono CJK JP" << "Noto Sans Mono CJK JP Bold" + << "Noto Sans Mono CJK KR" << "Noto Sans Mono CJK KR Bold" << "Noto Sans Mono CJK SC" + << "Noto Sans Mono CJK SC Bold" << "Noto Sans Mono CJK TC" << "Noto Sans Mono CJK TC Bold" << "Unifont"; + QStringList Blacklist; + Blacklist << "webdings" << "Symbol" << "MT Extra [unknown]" << "Bitstream Charter" << "CESI仿宋-GB13000" << "CESI仿宋-GB18030" + << "CESI仿宋-GB2312" << "CESI宋体-GB13000" << "CESI宋体-GB18030" << "CESI宋体-GB2312" << "CESI小标宋-GB13000" + << "CESI小标宋-GB18030" << "CESI小标宋-GB2312" << "CESI楷体-GB13000" << "CESI楷体-GB18030" << "CESI楷体-GB2312" << "CESI黑体-GB13000" + << "CESI黑体-GB18030" << "CESI黑体-GB2312" << "DejaVu Math TeX Gyre" << "DejaVu Sans" << "DejaVu Serif" << "Liberation Sans" + << "Liberation Sans Narrow" << "Liberation Serif" << "Lohit Devanagari" << "MT Extra [PfEd]" << "Noto Kufi Arabic" << "Noto Music" + << "Noto Naskh Arabic" << "Noto Nastaliq Urdu" << "Noto Sans" << "Noto Sans Adlam" << "Noto Sans Adlam Unjoined" + << "Noto Sans Anatolian Hieroglyphs" << "Noto Sans Arabic" << "Noto Sans Armenian" << "Noto Sans Avestan" << "Noto Sans Bamum" + << "Noto Sans Bassa Vah" << "Noto Sans Batak" << "Noto Sans Bengali" << "Noto Sans Bhaiksuki" << "Noto Sans Brahmi" + << "Noto Sans Buginese" << "Noto Sans Buhid" << "Noto Sans Canadian Aboriginal" << "Noto Sans Carian" << "Noto Sans Caucasian Albanian" + << "Noto Sans Chakma" << "Noto Sans Cham" << "Noto Sans Cherokee" << "Noto Sans CJK JP" << "Noto Sans CJK JP Bold" << "Noto Sans CJK KR" + << "Noto Sans CJK KR Bold" << "Noto Sans CJK SC" << "Noto Sans CJK SC Bold" << "Noto Sans CJK TC" << "Noto Sans CJK TC Bold" + << "Noto Sans Coptic" << "Noto Sans Cuneiform" << "Noto Sans Cypriot" << "Noto Sans Deseret" << "Noto Sans Devanagari" << "Noto Sans Display" + << "Noto Sans Duployan" << "Noto Sans Egyptian Hieroglyphs" << "Noto Sans Elbasan" << "Noto Sans Ethiopic" << "Noto Sans Georgian" + << "Noto Sans Glagolitic" << "Noto Sans Gothic" << "Noto Sans Grantha" << "Noto Sans Gujarati" << "Noto Sans Gurmukhi" << "Noto Sans Hanunoo" + << "Noto Sans Hatran" << "Noto Sans Hebrew" << "Noto Sans Imperial Aramaic" << "Noto Sans Inscriptional Pahlavi" << "Noto Sans Inscriptional Parthian" + << "Noto Sans Javanese" << "Noto Sans Kaithi" << "Noto Sans Kannada" << "Noto Sans Kayah Li" << "Noto Sans Kharoshthi" << "Noto Sans Khmer" + << "Noto Sans Khojki" << "Noto Sans Khudawadi" << "Noto Sans Lao" << "Noto Sans Lepcha" << "Noto Sans Limbu" << "Noto Sans Linear A" + << "Noto Sans Linear B" << "Noto Sans Lisu" << "Noto Sans Lycian" << "Noto Sans Lydian" << "Noto Sans Mahajani" << "Noto Sans Malayalam" + << "Noto Sans Mandaic" << "Noto Sans Manichaean" << "Noto Sans Marchen" << "Noto Sans Math" << "Noto Sans Meetei Mayek" << "Noto Sans Mende Kikakui" + << "Noto Sans Meroitic" << "Noto Sans Miao" << "Noto Sans Modi" << "Noto Sans Mongolian" << "Noto Sans Mro" << "Noto Sans Multani" << "Noto Sans Myanmar" + << "Noto Sans Nabataean" << "Noto Sans New Tai Lue" << "Noto Sans Newa" << "Noto Sans NKo" << "Noto Sans Ogham" << "Noto Sans Ol Chiki" + << "Noto Sans Old Hungarian" << "Noto Sans Old Italic" << "Noto Sans Old North Arabian" << "Noto Sans Old Permic" << "Noto Sans Old Persian" + << "Noto Sans Old South Arabian" << "Noto Sans Old Turkic" << "Noto Sans Oriya" << "Noto Sans Osage" << "Noto Sans Osmanya" << "Noto Sans Pahawh Hmong" + << "Noto Sans Palmyrene" << "Noto Sans Pau Cin Hau" << "Noto Sans PhagsPa" << "Noto Sans Phoenician" << "Noto Sans Psalter Pahlavi" << "Noto Sans Rejang" + << "Noto Sans Runic" << "Noto Sans Samaritan" << "Noto Sans Saurashtra" << "Noto Sans Sharada" << "Noto Sans Shavian" << "Noto Sans Sinhala" + << "Noto Sans Sora Sompeng" << "Noto Sans Sundanese" << "Noto Sans Syloti Nagri" << "Noto Sans Symbols" << "Noto Sans Symbols2" << "Noto Sans Syriac" + << "Noto Sans Syriac Eastern" << "Noto Sans Syriac Estrangela" << "Noto Sans Syriac Western" << "Noto Sans Tagalog" << "Noto Sans Tagbanwa" + << "Noto Sans Tai Le" << "Noto Sans Tai Tham" << "Noto Sans Tai Viet" << "Noto Sans Takri" << "Noto Sans Tamil" << "Noto Sans Telugu" << "Noto Sans Thaana" + << "Noto Sans Thai" << "Noto Sans Tibetan" << "Noto Sans Tifinagh" << "Noto Sans Tirhuta" << "Noto Sans Ugaritic" << "Noto Sans Vai" + << "Noto Sans Warang Citi" << "Noto Sans Yi" << "Noto Serif" << "Noto Serif Ahom" << "Noto Serif Armenian" << "Noto Serif Balinese" + << "Noto Serif Bengali" << "Noto Serif CJK JP" << "Noto Serif CJK KR" << "Noto Serif CJK SC" << "Noto Serif CJK TC" << "Noto Serif Devanagari" + << "Noto Serif Display" << "Noto Serif Ethiopic" << "Noto Serif Georgian" << "Noto Serif Gujarati" << "Noto Serif Gurmukhi" << "Noto Serif Hebrew" + << "Noto Serif Kannada" << "Noto Serif Khmer" << "Noto Serif Lao" << "Noto Serif Malayalam" << "Noto Serif Myanmar" << "Noto Serif Sinhala" + << "Noto Serif Tamil" << "Noto Serif Tamil Slanted" << "Noto Serif Telugu" << "Noto Serif Thai" << "Noto Serif Tibetan" << "Sans Serif" << "Serif" + << "Symbola" << "Unifont CSUR" << "Unifont Upper" << "Wingdings" << "Wingdings 2" << "Wingdings 3"; + + for (const QString &sfont : fontLst) { + if (m_bstop) + break; + + if (Whitelist.contains(sfont) | Blacklist.contains(sfont)) + continue; + + bool fixedFont = true; + QFont font(sfont); + QFontMetrics fm(font); + int fw = fm.width(REPCHAR[0]); + + for (unsigned int i = 1; i < qstrlen(REPCHAR); i++) { + if (fw != fm.width(QLatin1Char(REPCHAR[i]))) { + fixedFont = false; + break; + } + } + if (fixedFont) + Whitelist.append(sfont); + else + Blacklist.append(sfont); + } + qInfo() << "DBUS get font:" << DBUSWhitelist; + qInfo() << "Compare font get font:" << Whitelist; +} +/******** Add by ut001000 renfeixiang 2020-06-15:增加 处理等宽字体的类 End***************/ diff -Nru deepin-terminal-5.0.0+ds1/src/common/utils.h deepin-terminal-5.4.13/src/common/utils.h --- deepin-terminal-5.0.0+ds1/src/common/utils.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/common/utils.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,349 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UTILS_H +#define UTILS_H +#include "settings.h" +#include "termproperties.h" +#include "define.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Konsole { +extern __attribute__((visibility("default"))) int __minFontSize; +extern __attribute__((visibility("default"))) int __maxFontSize; +} + +/******** Modify by m000714 daizhengwen 2020-04-03: 自绘的显示控件限制item的宽度****************/ +#define ITEMMAXWIDTH 140 +/********************* Modify by m000714 daizhengwen End ************************/ + +/******** Modify by m000714 daizhengwen 2020-04-17: 使用DTK的Dialog****************/ +#define USE_DTK +/********************* Modify by m000714 daizhengwen End ************************/ + +// kwin dbus +#define KWINDBUSSERVICE "org.kde.KWin" +#define KWINDBUSPATH "/KWin" + +#define MAX_NAME_LEN 32 + +// 列表最小高度 +#define LISTMINHEIGHT 222 + +// 行间空格间距 +#define SPACEHEIGHT 10 +#define SPACEWIDTH 10 +// 控件通用高度 +#define COMMONHEIGHT 36 +// 图标大小 +#define ICONSIZE_50 50 +#define ICONSIZE_36 36 +#define ICONSIZE_20 20 + +// limit font size +#define DEFAULT_MIN_FONT_SZIE 5 +#define DEFAULT_MAX_FONT_SZIE 50 +#define MIN_FONT_SZIE ({Konsole::__minFontSize;}) +#define MAX_FONT_SZIE ({Konsole::__maxFontSize;}) + +//Viewport Margins +#define MARGINS_TOP 10 +#define MARGINS_BOTTOM 10 +#define MARGINS_LEFT 10 +#define MARGINS_RIGHT 10 + +// MainWindow +#define WINDOW_DEFAULT_WIDTH 1000 //终端窗口默认宽度 +#define WINDOW_DEFAULT_HEIGHT 600 //终端窗口默认高度 +#define WINDOW_DEFAULT_SIZE QSize(WINDOW_DEFAULT_WIDTH, WINDOW_DEFAULT_HEIGHT) //终端窗口默认尺寸 +#define ICON_EXIT_FULL_SIZE QSize(ICONSIZE_36, ICONSIZE_36) //退出全屏按钮尺寸 +#define WIN_TITLE_BAR_HEIGHT 50 //标题栏高度 + +//Encode Plugin +#define ENCODE_ITEM_WIDTH 220 +#define ENCODE_ITEM_HEIGHT 60 + +/******************************************************************************* + 1. @类名: Utils + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class MainWindow; +class Utils : public QObject +{ + Q_OBJECT + +public: + explicit Utils(QObject *parent = nullptr); + ~Utils(); + enum CloseType { + CloseType_Window, + CloseType_Tab, + CloseType_OtherTab, + CloseType_Terminal, + CloseType_OtherTerminals, + }; + + static QHash m_imgCacheHash; + static QHash m_fontNameCache; + /** + * @brief 获取QSS中内容 + * @author ut000439 wangpeili + * @param filePath 文件路径 + * @return + */ + static QString getQssContent(const QString &filePath); + /** + * @brief 获取config的路径 + * @author ut000439 wangpeili + * @return + */ + static QString getConfigPath(); + /** + * @brief 设置后缀列表只包含*.ttf *.ttc *.otf格式 + * @author ut000439 wangpeili + * @return + */ + static QString suffixList(); + /** + * @brief 获取删除的文字 + * @author ut000439 wangpeili + * @param font 字体 + * @param str 文字 + * @param MaxWith + * @param elideMode + * @return + */ + static QString getElidedText(QFont font, QString text, int MaxWith, Qt::TextElideMode elideMode = Qt::ElideRight); + /** + * @brief 获取随机字符串 + * @author ut000439 wangpeili + * @return + */ + static QString getRandString(); + + /** + * @brief 显示目录对话框 + * @author ut000439 wangpeili + * @param widget + * @return + */ + static QString showDirDialog(QWidget *widget); + /** + * @brief 显示文件选择对话框 + * @author ut000439 wangpeili + * @param widget + * @return + */ + static QStringList showFilesSelectDialog(QWidget *widget); + + /** + * @brief 显示退出确认对话框 + * @author ut000439 wangpeili + * @param type 类型 + * @param count 数量 + * @return + */ + static bool showExitConfirmDialog(CloseType type, int count = 1); + /** + * @brief 获取退出对话框文本 + * @author ut000439 wangpeili + * @param type 类型 + * @param title 标题 + * @param txt 文本 + * @param count + */ + static void getExitDialogText(CloseType type, QString &title, QString &txt, int count = 1); + /** + * @brief 显示退出卸载确认对话框 + * @author ut000439 wangpeili + * @return + */ + static bool showExitUninstallConfirmDialog(); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + /** + * @brief 显示卸载确认对话框 + * @author ut000439 wangpeili + * @param commandname + * @return + */ + static bool showUninstallConfirmDialog(QString commandname); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + /** + * @brief 显示快捷方式冲突消息框 + * @author ut000439 wangpeili + * @param txt + * @return + */ + static bool showShortcutConflictMsgbox(QString txt); + /** + * @brief 为按钮两个中文之间添加空格 + * @author m000714 戴正文 + * @param button 按钮 + */ + static void setSpaceInWord(DPushButton *button); + + /** + * @brief 当有相同名称时,弹出弹窗给用户确认 + * @author ut000610 戴正文 + * @param parent + * @param firstLine + * @param secondLine + */ + static void showSameNameDialog(QWidget *parent, const QString &firstLine, const QString &secondLine); + /** + * @brief 清空控件内部所有子控件的焦点获取(安全考虑,不要全局使用.仅在个别控件中使用) + * @author n014361 王培利 + * @param objParent + */ + static void clearChildrenFocus(QObject *objParent); + /** + * @brief 函数参数解析 + * @author ut000439 王培利 + * @param arguments 参数 + * @param Properties 属性 + * @param appControl appControl = true, 为main函数使用,遇到-h -v 时,整个进程会退出为false时,为唯一进程使用,主要是解析变量出来。 + */ + static void parseCommandLine(QStringList arguments, TermProperties &Properties, bool appControl = false); + /** + * @brief 解析execute参数,解析出来后,会从参数表中删除相关内容,防止process异常.支持解析例子: + deepin-terminal -e "bash -c 'ping 127.0.0.1 -c 5'" -w / + deepin-terminal -e 'bash -c "ping 127.0.0.1 -c 5"' -w / + deepin-terminal -e bash -c 'ping 127.0.0.1 -c 5' -w / + deepin-terminal -e "ping 127.0.0.1 -c 5" + deepin-terminal -e "ping 127.0.0.1 -c 5" -w / + deepin-terminal -e ping 127.0.0.1 -c 5 -w / + deepin-terminal -e ping "127.0.0.1" -c 5 -w / + * @author ut000439 王培利 + * @param arguments 参数 + * @return + */ + static QStringList parseExecutePara(QStringList &arguments); + /** + * @brief 解析嵌套的qstring为qstringlist,只支持一级 + 如:"bash -c 'ping 127.0.0.1'" -> "bash", "-c", "ping 127.0.0.1" + 如:'bash -c "ping 127.0.0.1"' -> "bash, "-c", "ping 127.0.0.1" + 如:"bash -c ping 127.0.0.1"-> "bash, "-c", "ping 127.0.0.1" + * @author ut000439 王培利 + * @param str + * @return + */ + static QStringList parseNestedQString(QString str); + /** + * @brief 根据当前窗口获取最外层的主窗口,当前窗口:currWidget,返回值非空就找到最外层主窗口:MainWindow + * @author ut000125 sunchengxi + * @param currWidget 当前窗口 + * @return + */ + static MainWindow *getMainWindow(QWidget *currWidget); + + /** + * @brief 获取编码列表 + * @author ut000610 戴正文 + * @return + */ + static QList encodeList(); + static const int NOT_FOUND = -1; + + /** + * @brief 设置类的objectname,统一成一个函数 + * @author ut001000 任飞翔 + * @param object + */ + static void set_Object_Name(QObject *object); + + /** + * @brief 转换up2down + * @author ut000610 戴正文 + * @param keysequence + * @return + */ + static QString converUpToDown(QKeySequence keysequence); + //此接口暂时注释保留不删除,2020.12.23 + /** + * @brief 转换down2up + * @author ut000610 戴正文 + * @param keysequence + * @return + */ + static QString converDownToUp(QKeySequence keysequence); + + /** + * @brief 从环境变量里面获取当前语言 + * @author ut000438 王亮 + * @return + */ + static QString getCurrentEnvLanguage(); +}; + +/******************************************************************************* + 1. @类名: FontFilter + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 打印DBUS获取等宽字体和比较字体字符方法获取等宽字体,用来定位DBUS获取字体失败后的问题 +*******************************************************************************/ +/******** Add by ut001000 renfeixiang 2020-06-15:增加 处理等宽字体的类 Begin***************/ +class FontFilter : public QObject +{ + Q_OBJECT +public: + static FontFilter *instance(); + FontFilter(); + ~FontFilter(); + //启动thread,打印等宽字体函数 + /** + * @brief 启动thread,打印等宽字体函数 + * @author ut001000 任飞翔 + */ + void handleWidthFont(); + /** + * @brief 设置线程结束标志 + * @param stop true = 结束 false = 正常 + */ + void setStop(bool stop); + +private: + /** + * @brief 打印DBUS获取等宽字体和比较字体字符方法获取等宽字体,用来定位DBUS获取字体失败后的问题 + * @author ut001000 任飞翔 + */ + void compareWhiteList(); + //线程成员变量 + QThread *m_thread = nullptr; + //线程结束标志位 + bool m_bstop = false; +}; +/******** Add by ut001000 renfeixiang 2020-06-15:增加 处理等宽字体的类 End***************/ + +#endif diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandoptdlg.cpp deepin-terminal-5.4.13/src/customcommand/customcommandoptdlg.cpp --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandoptdlg.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandoptdlg.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,729 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandoptdlg.h" +#include "termcommandlinkbutton.h" +#include "utils.h" +#include "service.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +CustomCommandOptDlg::CustomCommandOptDlg(CustomCmdOptType type, CustomCommandData *currItemData, QWidget *parent) + : DAbstractDialog(parent) + , m_type(type) + , m_nameLineEdit(new DLineEdit(this)) + , m_commandLineEdit(new DLineEdit(this)) + , m_shortCutLineEdit(new DKeySequenceEdit(this)) + , m_bDelOpt(false) +{ + /******** Add by ut001000 renfeixiang 2020-08-13:增加 Begin***************/ + Utils::set_Object_Name(this); + m_nameLineEdit->setObjectName("CustomNameLineEdit"); + m_commandLineEdit->setObjectName("CustomCommandLineEdit"); + m_shortCutLineEdit->setObjectName("CustomShortCutLineEdit"); + /******** Add by ut001000 renfeixiang 2020-08-13:增加 End***************/ + setWindowModality(Qt::WindowModal); + if (currItemData) { + m_currItemData = new CustomCommandData; + *m_currItemData = *currItemData; + } + + initUITitle(); + initTitleConnections(); + initUI(); + + connect(Service::instance(), &Service::refreshCommandPanel, this, &CustomCommandOptDlg::slotRefreshData); +} + +CustomCommandOptDlg::~CustomCommandOptDlg() +{ + if (m_currItemData) { + delete m_currItemData; + m_currItemData = nullptr; + } + if (m_newAction) { + delete m_newAction; + m_newAction = nullptr; + } +} + +void CustomCommandOptDlg::initUI() +{ + QWidget *contentFrame = new QWidget(this); + + QVBoxLayout *contentLayout = new QVBoxLayout; + contentLayout->setSpacing(m_iSpaceSizeTen); + contentLayout->setContentsMargins(m_iLayoutSizeZero, m_iLayoutSizeZero, m_iLayoutSizeZero, m_iLayoutSizeZero); + + QWidget *nameFrame = new QWidget(this); + nameFrame->setFixedWidth(m_iFixedWidth); + QHBoxLayout *nameLayout = new QHBoxLayout; + nameLayout->setSpacing(m_iSpaceSizeZero); + nameLayout->setContentsMargins(m_iLayoutLeftSize, m_iLayoutSizeZero, m_iLayoutRightSize, m_iLayoutSizeZero); + nameFrame->setLayout(nameLayout); + + QWidget *cmdFrame = new QWidget(this); + QHBoxLayout *cmdLayout = new QHBoxLayout; + cmdLayout->setSpacing(m_iSpaceSizeZero); + cmdLayout->setContentsMargins(m_iLayoutLeftSize, m_iLayoutSizeZero, m_iLayoutRightSize, m_iLayoutSizeZero); + cmdFrame->setLayout(cmdLayout); + + QWidget *scFrame = new QWidget(this); + QHBoxLayout *scLayout = new QHBoxLayout; + scLayout->setSpacing(m_iSpaceSizeZero); + scLayout->setContentsMargins(m_iLayoutLeftSize, m_iLayoutSizeZero, m_iLayoutRightSize, m_iLayoutSizeZero); + scFrame->setLayout(scLayout); + + DLabel *nameLabel = new DLabel(tr("Name:")); + + DLabel *cmdLabel = new DLabel(tr("Command:")); + + DLabel *shortCutLabel = new DLabel(tr("Shortcuts:")); + + m_nameLineEdit->setFixedWidth(m_iLineEditWidth); + m_commandLineEdit->setFixedWidth(m_iLineEditWidth); + m_shortCutLineEdit->setFixedWidth(m_iLineEditWidth); + m_shortCutLineEdit->setFocusPolicy(Qt::FocusPolicy::StrongFocus); + + QTimer::singleShot(m_iSingleShotTime, this, [&]() { + m_nameLineEdit->lineEdit()->selectAll(); + }); + + m_nameLineEdit->lineEdit()->setPlaceholderText(tr("Required")); + m_commandLineEdit->lineEdit()->setPlaceholderText(tr("Required")); + m_shortCutLineEdit->ShortcutDirection(Qt::AlignLeft); + + nameLayout->addWidget(nameLabel); + nameLayout->addWidget(m_nameLineEdit); + + cmdLayout->addWidget(cmdLabel); + cmdLayout->addWidget(m_commandLineEdit); + + scLayout->addWidget(shortCutLabel); + scLayout->addWidget(m_shortCutLineEdit); + + contentLayout->addWidget(nameFrame); + contentLayout->addWidget(cmdFrame); + contentLayout->addWidget(scFrame); + + contentFrame->setLayout(contentLayout); + + connect(m_nameLineEdit, &DLineEdit::editingFinished, this, &CustomCommandOptDlg::slotNameLineEditingFinished); + + connect(m_commandLineEdit, &DLineEdit::editingFinished, this, &CustomCommandOptDlg::slotCommandLineEditingFinished); + + addContent(contentFrame); + //判断是添加操作窗口还是修改操作窗口 + if (CCT_ADD == m_type) { + setFixedSize(m_iFixedWidth, m_iFixedHeightAddSize); + setTitle(tr("Add Command")); + initCommandFromClipBoardText(); + + getMainLayout()->addSpacing(m_iSpaceSizeEighteen); + } else { + setFixedSize(m_iFixedWidth, m_iFixedHeightEditSize); + setTitle(tr("Edit Command")); + + QWidget *deleteCmdWidget = new QWidget(this); + deleteCmdWidget->setFixedHeight(m_iFixedHeight); + + QHBoxLayout *deleteCmdLayout = new QHBoxLayout(); + deleteCmdLayout->setSpacing(m_iSpaceSizeZero); + deleteCmdLayout->setContentsMargins(m_iLayoutSizeZero, m_iLayoutSizeZero, m_iLayoutSizeZero, m_iLayoutSizeZero); + TermCommandLinkButton *deleteCmdBtn = new TermCommandLinkButton(); + deleteCmdBtn->setFocusPolicy(Qt::TabFocus); + deleteCmdBtn->setText(tr("Delete Command")); + + deleteCmdLayout->addStretch(); + deleteCmdLayout->addWidget(deleteCmdBtn); + deleteCmdLayout->addStretch(); + deleteCmdWidget->setLayout(deleteCmdLayout); + + getMainLayout()->addWidget(deleteCmdWidget); + + connect(deleteCmdBtn, &DCommandLinkButton::clicked, this, &CustomCommandOptDlg::slotDelCurCustomCommand); + + QString strName = m_currItemData->m_cmdName; + QString strCommad = m_currItemData->m_cmdText; + QKeySequence keyseq = QKeySequence(m_currItemData->m_cmdShortcut); + m_lastCmdShortcut = m_currItemData->m_cmdShortcut; + m_nameLineEdit->setText(strName); + m_commandLineEdit->setText(strCommad); + m_shortCutLineEdit->setKeySequence(keyseq); + +#ifdef UI_DEBUG + deleteCmdWidget->setStyleSheet("background:green"); +#endif + } + + addCancelConfirmButtons(); + setCancelBtnText(tr("Cancel", "button")); + if (CCT_ADD == m_type) { + setConfirmBtnText(tr("Add", "button")); + } else { + setConfirmBtnText(tr("Save", "button")); + } + m_lastCmdShortcut = m_shortCutLineEdit->keySequence().toString(); + connect(this, &CustomCommandOptDlg::confirmBtnClicked, this, &CustomCommandOptDlg::slotAddSaveButtonClicked); + connect(m_shortCutLineEdit, &KeySequenceEdit::editingFinished, this, &CustomCommandOptDlg::slotShortCutLineEditingFinished); +} + +inline void CustomCommandOptDlg::slotNameLineEditingFinished() +{ + if (m_nameLineEdit->text().isEmpty()) + m_nameLineEdit->lineEdit()->setPlaceholderText(tr("Required")); +} + +inline void CustomCommandOptDlg::slotCommandLineEditingFinished() +{ + if (m_commandLineEdit->text().isEmpty()) + m_commandLineEdit->lineEdit()->setPlaceholderText(tr("Required")); +} + +inline void CustomCommandOptDlg::slotShortCutLineEditingFinished(const QKeySequence &sequence) +{ + //删除 + if ("Backspace" == sequence.toString()) { + qInfo() << "The KeySequenceE is Backspace"; + m_shortCutLineEdit->clear(); + m_lastCmdShortcut = ""; + return; + } + // 取消 + if ("Esc" == sequence.toString()) { + qInfo() << "The KeySequenceE is Esc"; + m_shortCutLineEdit->clear(); + m_shortCutLineEdit->setKeySequence(QKeySequence(m_lastCmdShortcut)); + /***add by ut001121 zhangmeng 20200521 在快捷键编辑框中按下ESC键时退出窗口 修复BUG27554***/ + close(); + return; + } + QString checkName; + //QString seq = m_shortCutLineEdit->text(); + if (m_type != CCT_ADD) + checkName = m_nameLineEdit->text(); + + QString reason; + // 判断快捷键是否冲突 + if (!ShortcutManager::instance()->checkShortcutValid(checkName, sequence.toString(), reason)) { + qInfo() << "checkShortcutValid"; + // 冲突 + if (sequence.toString() != "Esc") { + qInfo() << "sequence != Esc"; + showShortcutConflictMsgbox(reason); + } + m_shortCutLineEdit->clear(); + m_shortCutLineEdit->setKeySequence(QKeySequence(m_lastCmdShortcut)); + return; + } + m_lastCmdShortcut = sequence.toString(); + +#ifdef UI_DEBUG + contentFrame->setStyleSheet("background:cyan"); + nameLabel->setStyleSheet("background:#0000ff"); + cmdLabel->setStyleSheet("background:#00ff00"); + shortCutLabel->setStyleSheet("background:yellow"); + + m_nameLineEdit->setStyleSheet("background:#ff00ff"); + m_commandLineEdit->setStyleSheet("background:#ff00ff"); + m_shortCutLineEdit->setStyleSheet("background:#ff00ff"); +#endif +} + +void CustomCommandOptDlg::initUITitle() +{ + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->setSpacing(0); + mainLayout->setContentsMargins(0, 0, 0, 10); + + QHBoxLayout *titleLayout = new QHBoxLayout(); + titleLayout->setSpacing(0); + titleLayout->setContentsMargins(0, 0, 0, 0); + + m_titleBar = new QWidget(this); + m_titleBar->setObjectName("CustomTitleBar");//Add by ut001000 renfeixiang 2020-08-13 + m_titleBar->setFixedHeight(50); + m_titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + m_titleBar->setLayout(titleLayout); + + m_logoIcon = new DLabel(this); + m_logoIcon->setObjectName("CustomLogoIcon");//Add by ut001000 renfeixiang 2020-08-13 + m_logoIcon->setFixedSize(QSize(50, 50)); + m_logoIcon->setFocusPolicy(Qt::NoFocus); + m_logoIcon->setAttribute(Qt::WA_TransparentForMouseEvents); + + m_closeButton = new DWindowCloseButton(this); + m_closeButton->setObjectName("CustomCloseButton");//Add by ut001000 renfeixiang 2020-08-13 + m_closeButton->setFocusPolicy(Qt::TabFocus);//m_closeButton->setFocusPolicy(Qt::NoFocus); + m_closeButton->setIconSize(QSize(50, 50)); + + m_titleText = new DLabel(this); + m_titleText->setObjectName("CustomTitleTextLabel");//Add by ut001000 renfeixiang 2020-08-13 + m_titleText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + m_titleText->setAlignment(Qt::AlignCenter); + DFontSizeManager::instance()->bind(m_titleText, DFontSizeManager::T5, QFont::DemiBold); + // 字色 + DPalette palette = m_titleText->palette(); + QColor color; + if (DApplicationHelper::DarkType == DApplicationHelper::instance()->themeType()) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleText->setPalette(palette); + + titleLayout->addWidget(m_logoIcon, 0, Qt::AlignLeft | Qt::AlignVCenter); + titleLayout->addWidget(m_titleText, 0, Qt::AlignHCenter); + titleLayout->addWidget(m_closeButton, 0, Qt::AlignRight | Qt::AlignTop); + + //Dialog content + m_contentLayout = new QVBoxLayout(); + m_contentLayout->setObjectName("CustomContentLayout");//Add by ut001000 renfeixiang 2020-08-13 + m_contentLayout->setSpacing(0); + m_contentLayout->setContentsMargins(0, 0, 0, 0); + + m_content = new QWidget(this); + m_content->setObjectName("CustomContentWidget");//Add by ut001000 renfeixiang 2020-08-13 + m_content->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_content->setLayout(m_contentLayout); + + mainLayout->addWidget(m_titleBar, 0, Qt::AlignTop); + mainLayout->addWidget(m_content); + setLayout(mainLayout); + + m_mainLayout = mainLayout; +} + +void CustomCommandOptDlg::initTitleConnections() +{ + connect(m_closeButton, &DWindowCloseButton::clicked, this, &CustomCommandOptDlg::slotCloseButtonClicked); + // 字体颜色随主题变化变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CustomCommandOptDlg::slotThemeTypeChanged); +} + +inline void CustomCommandOptDlg::slotCloseButtonClicked() +{ + this->close(); +} + +inline void CustomCommandOptDlg::slotThemeTypeChanged(DGuiApplicationHelper::ColorType themeType) +{ + DPalette palette = m_titleText->palette(); + QColor color; + if (DApplicationHelper::DarkType == themeType) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleText->setPalette(palette); +} + +void CustomCommandOptDlg::initCommandFromClipBoardText() +{ + if (m_commandLineEdit) { + MainWindow *main = Utils::getMainWindow(this);//;getMainWindow(); + if (main != nullptr) { + QString clipText = main->selectedText(); + m_commandLineEdit->setText(clipText.trimmed()); + } + } +} + +QAction *CustomCommandOptDlg::getCurCustomCmd() +{ + return m_newAction; +} + +bool CustomCommandOptDlg::isDelCurCommand() +{ + return m_bDelOpt; +} + +void CustomCommandOptDlg::slotAddSaveButtonClicked() +{ + QString strName = m_nameLineEdit->text(); + QString strCommand = m_commandLineEdit->text(); + QKeySequence keytmp = m_shortCutLineEdit->keySequence(); + + strName = strName.trimmed();//空格的名称是无效的,剔除名称前后的空格 + if (strName.isEmpty()) { + qInfo() << "Name is empty"; + m_nameLineEdit->showAlertMessage(tr("Please enter a name"), m_nameLineEdit->parentWidget()); + return; + } + + /***add begin by ut001121 zhangmeng 20200615 限制名称字符长度 修复BUG31286***/ + if (strName.length() > MAX_NAME_LEN) { + qInfo() << "The name should be no more than 32 characters"; + m_nameLineEdit->showAlertMessage(QObject::tr("The name should be no more than 32 characters"), m_nameLineEdit->parentWidget()); + return; + } + /***add end by ut001121***/ + QString strCommandtemp = strCommand.trimmed();//空格的命令是无效的 + if (strCommandtemp.isEmpty()) { + qInfo() << "Command is empty"; + m_commandLineEdit->showAlertMessage(tr("Please enter a command"), m_commandLineEdit->parentWidget()); + return; + } + + m_newAction = new QAction(ShortcutManager::instance()); + m_newAction->setObjectName("CustomQAction");//Add by ut001000 renfeixiang 2020-08-13 + m_newAction->setText(strName); + m_newAction->setData(strCommand); + m_newAction->setShortcut(m_shortCutLineEdit->keySequence()); + + /************************ Mod by m000743 sunchengxi 2020-04-21:自定义命令修改的异常问题 Begin************************/ + QAction *existAction = nullptr; + int icount = 0; + if (CCT_MODIFY == m_type) { + qInfo() << "It is the modify type of custom command operation"; + if (m_bRefreshCheck) { + qInfo() << "CustomCommand was refreshed"; + QAction *refreshExitAction = nullptr; + refreshExitAction = ShortcutManager::instance()->checkActionIsExist(*m_newAction); + if (refreshExitAction) { + qInfo() << "CustomCommand already exists"; + accept(); + return; + } + } + + if (strName == m_currItemData->m_cmdName && strCommand == m_currItemData->m_cmdText && keytmp == QKeySequence(m_currItemData->m_cmdShortcut)) { + qInfo() << "CustomCommand don't need to save again"; + accept(); + return; + } + + existAction = ShortcutManager::instance()->checkActionIsExistForModify(*m_newAction); + + if (strName != m_currItemData->m_cmdName) { + qInfo() << "CustomCommand is changed"; + QList &customCommandActionList = ShortcutManager::instance()->getCustomCommandActionList(); + for (int i = 0; i < customCommandActionList.size(); i++) { + QAction *curAction = customCommandActionList[i]; + QString strCmdName = curAction->text(); + if (strCmdName == strName) + icount++; + } + } + } else { + existAction = ShortcutManager::instance()->checkActionIsExist(*m_newAction); + } + + if (nullptr != existAction || icount) { + qInfo() << "The name already exists"; + QString strFistLine = tr("The name already exists,"); + QString strSecondeLine = tr("please input another one."); + Utils::showSameNameDialog(this, strFistLine, strSecondeLine); + } else { + accept(); + } + /************************ Mod by m000743 sunchengxi 2020-04-21:自定义命令修改的异常问题 End ************************/ +} + +bool CustomCommandOptDlg::checkSequence(const QKeySequence &sequence) +{ + QString checkName = m_nameLineEdit->text(); + + if (sequence.toString().isEmpty()) + return true; + + QString reason; + // 判断快捷键是否冲突 + if (!ShortcutManager::instance()->checkShortcutValid(checkName, sequence.toString(), reason)) { + // 冲突 + if (sequence.toString() != "Esc") + showShortcutConflictMsgbox(reason); + + m_shortCutLineEdit->clear(); + m_shortCutLineEdit->setKeySequence(QKeySequence(m_lastCmdShortcut)); + + QTimer::singleShot(30, this, [&]() { + m_shortCutLineEdit->setFocus(); + }); + return false; + } + + return true; +} + +void CustomCommandOptDlg::setModelIndex(const QModelIndex &mi) +{ + modelIndex = mi; +} + +void CustomCommandOptDlg::slotDelCurCustomCommand() +{ + m_bDelOpt = true; + reject(); +} + +void CustomCommandOptDlg::addCancelConfirmButtons() +{ + QHBoxLayout *buttonsLayout = new QHBoxLayout(); + buttonsLayout->setSpacing(9); + buttonsLayout->setContentsMargins(10, 0, 10, 0); + + QFont btnFont; + m_cancelBtn = new DPushButton(this); + m_cancelBtn->setObjectName("CustomCancelButton");//Add by ut001000 renfeixiang 2020-08-13 + m_cancelBtn->setFixedWidth(209); + m_cancelBtn->setFixedHeight(36); + m_cancelBtn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_cancelBtn->setFont(btnFont); + + m_confirmBtn = new DSuggestButton(this); + m_confirmBtn->setObjectName("CustomConfirmButton");//Add by ut001000 renfeixiang 2020-08-13 + m_confirmBtn->setFixedWidth(209); + m_confirmBtn->setFixedHeight(36); + m_confirmBtn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_confirmBtn->setFont(btnFont); + + //设置回车键默认响应的按钮 + m_confirmBtn->setDefault(true); + + setTabOrder(m_confirmBtn, m_closeButton);//设置右上角关闭按钮的tab键控制顺序 + + DVerticalLine *verticalLine = new DVerticalLine(this); + DPalette pa = DApplicationHelper::instance()->palette(verticalLine); + QColor splitColor = pa.color(DPalette::ItemBackground); + pa.setBrush(DPalette::Background, splitColor); + verticalLine->setPalette(pa); + verticalLine->setBackgroundRole(QPalette::Background); + verticalLine->setAutoFillBackground(true); + verticalLine->setFixedSize(3, 28); + + buttonsLayout->addWidget(m_cancelBtn); + buttonsLayout->addWidget(verticalLine); + buttonsLayout->addWidget(m_confirmBtn); + /************************ Add by m000743 sunchengxi 2020-04-15:默认enter回车按下,走确认校验流程 Begin************************/ + m_confirmBtn->setDefault(true); + /************************ Add by m000743 sunchengxi 2020-04-15:默认enter回车按下,走确认校验流程 End ************************/ + + connect(m_cancelBtn, &DPushButton::clicked, this, &CustomCommandOptDlg::slotCancelBtnClicked); + + connect(m_confirmBtn, &DPushButton::clicked, this, &CustomCommandOptDlg::slotConfirmBtnClicked); + + /************************ Add by m000743 sunchengxi 2020-04-21:快捷键编辑结束后,enter按下可以响应校验 Begin************************/ + connect(m_shortCutLineEdit, &DKeySequenceEdit::editingFinished, this, &CustomCommandOptDlg::slotShortCutLineEditFinished); + /************************ Add by m000743 sunchengxi 2020-04-21:快捷键编辑结束后,enter按下可以响应校验 End ************************/ + + m_mainLayout->addLayout(buttonsLayout); +} + +inline void CustomCommandOptDlg::slotCancelBtnClicked() +{ + m_confirmResultCode = QDialog::Rejected; + reject(); +} + +inline void CustomCommandOptDlg::slotConfirmBtnClicked() +{ + m_confirmResultCode = QDialog::Accepted; + emit confirmBtnClicked(); +} + +inline void CustomCommandOptDlg::slotShortCutLineEditFinished() +{ + /******** Add by nt001000 renfeixiang 2020-05-14:修改快捷框输入后,添加(m_confirmBtn)按钮高亮问题,将光标从添加按钮取消,设置到快捷框上 Begin***************/ + //m_confirmBtn->setFocus(); + m_shortCutLineEdit->setFocus(); + /******** Add by nt001000 renfeixiang 2020-05-14:修改快捷框输入后,添加(m_confirmBtn)按钮高亮问题,将光标从添加按钮取消,设置到快捷框上 End***************/ +} + +QVBoxLayout *CustomCommandOptDlg::getMainLayout() +{ + return m_mainLayout; +} + +QDialog::DialogCode CustomCommandOptDlg::getConfirmResult() +{ + return m_confirmResultCode; +} + +/******************************************************************************* + 1. @函数: setLogoVisable + 2. @作者: sunchengxi + 3. @日期: 2020-07-31 + 4. @说明: 设置自定义命令操作窗口的图标是否可见 +*******************************************************************************/ +//void CustomCommandOptDlg::setLogoVisable(bool visible) +//{ +// if (nullptr != m_logoIcon) { +// m_logoIcon->setVisible(visible); +// } +//} + +void CustomCommandOptDlg::setTitle(const QString &title) +{ + if (nullptr != m_titleText) + m_titleText->setText(title); +} + +QLayout *CustomCommandOptDlg::getContentLayout() +{ + return m_contentLayout; +} + +void CustomCommandOptDlg::setCancelBtnText(const QString &strCancel) +{ + m_cancelBtn->setText(strCancel); + Utils::setSpaceInWord(m_cancelBtn); +} + +void CustomCommandOptDlg::setConfirmBtnText(const QString &strConfirm) +{ + m_confirmBtn->setText(strConfirm); + Utils::setSpaceInWord(m_confirmBtn); +} + +void CustomCommandOptDlg::showShortcutConflictMsgbox(QString txt) +{ + /******** Modify by ut000610 daizhengwen 2020-05-27: 出现提示和快捷键显示不一致的问题 bug#28507****************/ + // fix#bug 37399 + for (QString key : ShortcutManager::instance()->m_mapReplaceText.keys()) { + if (txt.contains(key)) + txt.replace(key, ShortcutManager::instance()->m_mapReplaceText[key]); + } + /********************* Modify by ut000610 daizhengwen End ************************/ + // 若没有弹窗,初始化 + if (nullptr == m_shortcutConflictDialog) { + m_shortcutConflictDialog = new DDialog(this); + m_shortcutConflictDialog->setObjectName("CustomShortcutConflictDialog");//Add by ut001000 renfeixiang 2020-08-13 + /******** Modify by nt001000 renfeixiang 2020-05-29:修改 因为弹框改为非模态之后,快捷框冲突选中快捷框功能移动这 Begin***************/ + connect(m_shortcutConflictDialog, &DDialog::finished, this, &CustomCommandOptDlg::slotShortcutConflictDialogFinished); + /******** Modify by nt001000 renfeixiang 2020-05-29:修改 修改因为弹框改为非模态之后,快捷框冲突选中快捷框功能移动这 End***************/ + m_shortcutConflictDialog->setIcon(QIcon::fromTheme("dialog-warning")); + /***mod by ut001121 zhangmeng 20200521 将确认按钮设置为默认按钮 修复BUG26960***/ + m_shortcutConflictDialog->addButton(QString(tr("OK", "button")), true, DDialog::ButtonNormal); + } + // 存在后显示 + m_shortcutConflictDialog->setTitle(QString(txt + QObject::tr("please set another one."))); + m_shortcutConflictDialog->show(); +} + +inline void CustomCommandOptDlg::slotShortcutConflictDialogFinished() +{ + m_shortcutConflictDialog->hide(); + /******** Add by nt001000 renfeixiang 2020-05-14:快捷框输入已经存在的快捷后,快捷框依然是选中状态 Begin***************/ + QTimer::singleShot(30, this, &CustomCommandOptDlg::slotSetShortCutLineEditFocus); + /******** Add by nt001000 renfeixiang 2020-05-14:快捷框输入已经存在的快捷后,快捷框依然是选中状态 End***************/ +} + +inline void CustomCommandOptDlg::slotSetShortCutLineEditFocus() +{ + m_shortCutLineEdit->setFocus(); +} + +void CustomCommandOptDlg::addContent(QWidget *content) +{ + Q_ASSERT(nullptr != getContentLayout()); + + getContentLayout()->addWidget(content); +} + +void CustomCommandOptDlg::setIconPixmap(const QPixmap &iconPixmap) +{ + if (nullptr != m_logoIcon) { + m_logoIcon->setVisible(true); + m_logoIcon->setPixmap(iconPixmap); + } +} + +void CustomCommandOptDlg::closeEvent(QCloseEvent *event) +{ + Q_UNUSED(event) + + done(-1); + + Q_EMIT closed(); +} + +void CustomCommandOptDlg::slotRefreshData(QString oldCmdName, QString newCmdName) +{ + if (CCT_ADD == m_type) { + qInfo() << "Currently is the add operation interface"; + return; + } + //不进行刷新操作 + if (oldCmdName.isEmpty() && newCmdName.isEmpty()) + return; + + //当前的自定义命令的名称 不是被修改的自定义名称时,不进行刷新操作 + if (m_currItemData->m_cmdName != oldCmdName) { + return; + } + m_bRefreshCheck = true; + qInfo() << "slotRefreshData---" << m_nameLineEdit->text(); + + QAction *currAction = new QAction(ShortcutManager::instance()); + if (nullptr == currAction) { + qInfo() << "slotRefreshData---new QAction error!!!"; + close(); + return; + } + currAction->setText(newCmdName); + QAction *existAction = nullptr; + existAction = ShortcutManager::instance()->checkActionIsExist(*currAction); + //根据 newCmdName 查找自定义命令 + if (nullptr == existAction) { + //不存在,则认为当前自定义命令在其他编辑窗口中删除了,如果打开了删除确认界面,则关闭删除确认界面。关闭当前编辑窗口 + delete currAction; + if (m_dlgDelete && m_dlgDelete->isVisible()) { + m_dlgDelete->close(); + m_dlgDelete = nullptr; + } + + close(); + } else { + //当前自定义命令在其他窗口修改,则更新数据 + delete currAction; + m_nameLineEdit->setText(existAction->text()); + m_commandLineEdit->setText(existAction->data().toString()); + m_shortCutLineEdit->setKeySequence(existAction->shortcut()); + m_currItemData->m_cmdName = newCmdName; + } + +} + +void CustomCommandOptDlg::closeRefreshDataConnection() +{ + disconnect(Service::instance(), &Service::refreshCommandPanel, this, &CustomCommandOptDlg::slotRefreshData); +} diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandoptdlg.h deepin-terminal-5.4.13/src/customcommand/customcommandoptdlg.h --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandoptdlg.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandoptdlg.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: CustomCommandOptDlg + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-07-31 + 4. @说明: 自定义命令操作窗口,进行删除和修改操作 +*******************************************************************************/ + +#ifndef CUSTOMCOMMANDOPTDLG_H +#define CUSTOMCOMMANDOPTDLG_H + +#include "termbasedialog.h" +#include "shortcutmanager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +Q_DECLARE_METATYPE(CustomCommandData) + +class CustomCommandOptDlg : public DAbstractDialog +{ + Q_OBJECT +public: + enum CustomCmdOptType { + CCT_ADD, // the add type of custom command operation + CCT_MODIFY, // the modify type of custom command operation + }; + + explicit CustomCommandOptDlg(CustomCmdOptType type = CCT_ADD, + CustomCommandData *currItemData = nullptr, + QWidget *parent = nullptr); + ~CustomCommandOptDlg()override; + + /** + * @brief 增加内容布局 + * @author sunchengxi + * @param content 内容布局 + */ + void addContent(QWidget *content); + /** + * @brief 操作界面增加取消和确认按钮布局 + * @author sunchengxi + */ + void addCancelConfirmButtons(); + + /** + * @brief 设置标题图标 + * @author sunchengxi + * @param iconPixmap 标题图标 + */ + void setIconPixmap(const QPixmap &iconPixmap); + /** + * @brief 设置取消按钮的内容文本 + * @author sunchengxi + * @param strCancel 取消按钮的内容文本 + */ + void setCancelBtnText(const QString &strCancel); + /** + * @brief 设置确认按钮的内容文本 + * @author sunchengxi + * @param strConfirm 确认按钮的内容文本 + */ + void setConfirmBtnText(const QString &strConfirm); + /** + * @brief 显示快捷键冲突弹窗 + * @author ut000610 戴正文 + * @param txt + */ + void showShortcutConflictMsgbox(QString txt); + /** + * @brief 关闭信号槽关联 + * @author sunchengxi + */ + void closeRefreshDataConnection(); + /** + * @brief 快捷键冲突判断 + * @author sunchengxi + * @param sequence + * @return + */ + bool checkSequence(const QKeySequence &sequence); + /** + * @brief 设置模型索引 + * @author sunchengxi + * @param mi + */ + void setModelIndex(const QModelIndex &mi); + + /** + * @brief 获取返回结果 + * @author sunchengxi + * @return + */ + QDialog::DialogCode getConfirmResult(); + /** + * @brief 获取主布局 + * @author sunchengxi + * @return + */ + QVBoxLayout *getMainLayout(); + + /** + * @brief 获取当前快捷键 + * @author sunchengxi + * @return + */ + QAction *getCurCustomCmd(); + /** + * @brief 判断是否是删除操作 + * @author sunchengxi + * @return + */ + bool isDelCurCommand(); + CustomCommandData *m_currItemData = nullptr; //当前自定义列表项数据指针 + QModelIndex modelIndex; //模型索引 + DDialog *m_dlgDelete = nullptr; //删除确认窗口指针 + unsigned int m_iTabModifyTime = 0; //键盘操作进行修改的时间戳 + +protected: + /** + * @brief 初始化操作界面的标题布局 + * @author sunchengxi + */ + void initUITitle(); + /** + * @brief 字体颜色跟随主题变化响应槽初始化 + * @author sunchengxi + */ + void initTitleConnections(); + //此接口暂时注释保留不删除,2020.12.23 + //void setLogoVisable(bool visible = true); + /** + * @brief 设置自定义命令操作窗口的标题 + * @author sunchengxi + * @param title 标题 + */ + void setTitle(const QString &title); + /** + * @brief 获取自定义命令操作窗口的内容布局 + * @author sunchengxi + * @return + */ + QLayout *getContentLayout(); + + //Overrides + /** + * @brief 自定义命令操作关闭事件 + * @author sunchengxi + * @param event 关闭事件 + */ + void closeEvent(QCloseEvent *event) override; +signals: + void closed(); + void confirmBtnClicked(); + +private slots: + /** + * @brief 自定义命令操作确认按钮响应槽 + * @author sunchengxi + */ + void slotAddSaveButtonClicked(); + /** + * @brief 删除按钮触发响应槽 + * @author sunchengxi + */ + void slotDelCurCustomCommand(); + /** + * @brief 刷新数据槽 + * @author sunchengxi + * @param oldCmdName 旧的自定义命令的名称 + * @param newCmdName 新的自定义命令的名称 + */ + void slotRefreshData(QString oldCmdName, QString newCmdName); + + void slotNameLineEditingFinished(); + void slotCommandLineEditingFinished(); + void slotShortCutLineEditingFinished(const QKeySequence &sequence); + + void slotCloseButtonClicked(); + void slotThemeTypeChanged(DGuiApplicationHelper::ColorType themeType); + + void slotCancelBtnClicked(); + void slotConfirmBtnClicked(); + void slotShortCutLineEditFinished(); + void slotShortcutConflictDialogFinished(); + + void slotSetShortCutLineEditFocus(); + +private: + /** + * @brief 初始化自定义命令操作窗口界面布局 + * @author sunchengxi + */ + void initUI(); + /** + * @brief 终端中选中内容,创建自定义命令,选中内容没有自动粘贴到命令输入框 + * @author sunchengxi + */ + void initCommandFromClipBoardText(); + + CustomCmdOptType m_type; + QAction *m_newAction = nullptr; + DLineEdit *m_nameLineEdit = nullptr; + DLineEdit *m_commandLineEdit = nullptr; + DKeySequenceEdit *m_shortCutLineEdit = nullptr; + QString m_lastCmdShortcut; + bool m_bDelOpt = false; + + QWidget *m_titleBar = nullptr; + DLabel *m_logoIcon = nullptr; + DLabel *m_titleText = nullptr; + DWindowCloseButton *m_closeButton = nullptr; + + QWidget *m_content = nullptr; + QVBoxLayout *m_contentLayout = nullptr; + QVBoxLayout *m_mainLayout = nullptr; + + DPushButton *m_cancelBtn = nullptr; + DSuggestButton *m_confirmBtn = nullptr; + + QDialog::DialogCode m_confirmResultCode; + // 快捷键冲突弹窗 + DDialog *m_shortcutConflictDialog = nullptr; + bool m_bRefreshCheck = false; + + + //数字常量 + const int m_iLayoutSizeZero = 0; + const int m_iLayoutLeftSize = 28; + const int m_iLayoutRightSize = 30; + + const int m_iFixedWidth = 459; + const int m_iFixedHeight = 54; + + const int m_iFixedHeightAddSize = 262; + const int m_iFixedHeightEditSize = 296; + + const int m_iLineEditWidth = 285; + + const int m_iSpaceSizeZero = 0; + const int m_iSpaceSizeTen = 10; + const int m_iSpaceSizeEighteen = 18; + + const int m_iSingleShotTime = 30; + +}; + +#endif // CUSTOMCOMMANDOPTDLG_H diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandpanel.cpp deepin-terminal-5.4.13/src/customcommand/customcommandpanel.cpp --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandpanel.h" +#include "customcommandoptdlg.h" +#include "shortcutmanager.h" +#include "service.h" + +#include +#include +#include +#include + +#include +#include +#include +#include + +CustomCommandPanel::CustomCommandPanel(QWidget *parent) : CommonPanel(parent) +{ + Utils::set_Object_Name(this); + initUI(); +} +CustomCommandPanel::~CustomCommandPanel() +{ + if (m_pdlg) { + delete m_pdlg; + m_pdlg = nullptr; + } +} + +void CustomCommandPanel::showCurSearchResult() +{ + QString strTxt = m_searchEdit->text(); + if (strTxt.isEmpty()) + return; + + emit showSearchResult(strTxt); +} + +void CustomCommandPanel::showAddCustomCommandDlg() +{ + if (m_pushButton->hasFocus()) { + qInfo() << "------------------------hasFocus"; + m_bpushButtonHaveFocus = true; + } else { + qInfo() << "------------------------ not hasFocus"; + m_bpushButtonHaveFocus = false; + } + + if (m_pdlg) { + delete m_pdlg; + m_pdlg = nullptr; + } + + // 弹窗显示 + Service::instance()->setIsDialogShow(window(), true); + + m_pdlg = new CustomCommandOptDlg(CustomCommandOptDlg::CCT_ADD, nullptr, this); + m_pdlg->setObjectName("CustomAddCommandDialog");//Add by ut001000 renfeixiang 2020-08-14 + connect(m_pdlg, &CustomCommandOptDlg::finished, this, &CustomCommandPanel::onAddCommandResponse); + m_pdlg->show(); +} + +void CustomCommandPanel::doCustomCommand(const QString &key) +{ + QAction *item = ShortcutManager::instance()->findActionByKey(key); + if(!item) + return; + + QString strCommand = item->data().toString(); + if (!strCommand.endsWith('\n')) + strCommand.append('\n'); + + emit handleCustomCurCommand(strCommand); +} + +void CustomCommandPanel::onFocusOut(Qt::FocusReason type) +{ + if ((Qt::TabFocusReason == type) || (Qt::NoFocusReason == type)) { + // 下一个 或 列表为空, 焦点定位到添加按钮上 + m_pushButton->setFocus(); + m_cmdListWidget->clearIndex(); + qInfo() << "set focus on add pushButton"; + } else if (Qt::BacktabFocusReason == type) { + // 判断是否可见,可见设置焦点 + if (m_searchEdit->isVisible()) { + m_searchEdit->lineEdit()->setFocus(); + m_cmdListWidget->clearIndex(); + qInfo() << "set focus on add search edit"; + } + } +} + +void CustomCommandPanel::onAddCommandResponse(int result) +{ + // 弹窗隐藏或消失 + Service::instance()->setIsDialogShow(window(), false); + if (QDialog::Accepted == result) { + QAction *newAction = m_pdlg->getCurCustomCmd(); + //m_cmdListWidget->addItem(ItemFuncType_Item, newAction->text(), newAction->shortcut().toString()); + // 新增快捷键 => 显示在列表中使用大写 down2up dzw 20201215 + m_cmdListWidget->addItem(ItemFuncType_Item, newAction->text(), Utils::converDownToUp(newAction->shortcut().toString())); + /************************ Add by m000743 sunchengxi 2020-04-20:解决自定义命令无法添加 Begin************************/ + ShortcutManager::instance()->addCustomCommand(*newAction); + /************************ Add by m000743 sunchengxi 2020-04-20:解决自定义命令无法添加 End ************************/ + + emit Service::instance()->refreshCommandPanel("", ""); + + refreshCmdSearchState(); + /******** Modify by m000714 daizhengwen 2020-04-10: 滚动条滑至最底端****************/ + int index = m_cmdListWidget->indexFromString(newAction->text()); + m_cmdListWidget->setScroll(index); + /********************* Modify by m000714 daizhengwen End ************************/ + + } + + if (m_bpushButtonHaveFocus) + m_pushButton->setFocus(Qt::TabFocusReason); +} + +void CustomCommandPanel::refreshCmdPanel() +{ + clearSearchInfo(); + ShortcutManager::instance()->fillCommandListData(m_cmdListWidget); + refreshCmdSearchState(); +} + +void CustomCommandPanel::refreshCmdSearchState() +{ + if (m_cmdListWidget->count() >= 2) { + /************************ Add by m000743 sunchengxi 2020-04-22:自定义命令搜索显示异常 Begin************************/ + m_searchEdit->clearEdit(); + /************************ Add by m000743 sunchengxi 2020-04-22:自定义命令搜索显示异常 End ************************/ + m_searchEdit->show(); + } else { + m_searchEdit->hide(); + } +} + +void CustomCommandPanel::setFocusInPanel() +{ + if (m_searchEdit->isVisible()) { + // 搜索框在 + m_searchEdit->lineEdit()->setFocus(); + } else if (m_cmdListWidget->isVisible() && m_cmdListWidget->count() != 0) { + // 列表数据不为0 + m_cmdListWidget->setFocus(); + } else if (m_pushButton->isVisible()) { + // 添加按钮下 + m_pushButton->setFocus(); + } else { + qInfo() << "focus error unkown reason"; + } +} + +void CustomCommandPanel::initUI() +{ + setBackgroundRole(QPalette::Base); + setAutoFillBackground(true); + + m_searchEdit = new DSearchEdit(this); + //fix bug#64976 按tab键循环切换到右上角X按钮时继续按tab键,焦点不能切换到搜索框 + m_searchEdit->setFocusPolicy(Qt::StrongFocus); + m_searchEdit->setFocusProxy(m_searchEdit->lineEdit()); + m_searchEdit->setObjectName("CustomSearchEdit");//Add by ut001000 renfeixiang 2020-08-13 + m_searchEdit->setClearButtonEnabled(true); + DFontSizeManager::instance()->bind(m_searchEdit, DFontSizeManager::T6); + + m_cmdListWidget = new ListView(ListType_Custom, this); + m_cmdListWidget->setObjectName("CustomCommandListWidget");//Add by ut001000 renfeixiang 2020-08-13 + + m_pushButton = new DPushButton(this); + m_pushButton->setObjectName("CustomAddCommandButton");//Add by ut001000 renfeixiang 2020-08-13 + m_pushButton->setFixedHeight(36); + m_pushButton->setText(tr("Add Command")); + + QHBoxLayout *btnLayout = new QHBoxLayout(); + btnLayout->addSpacing(10); + btnLayout->addWidget(m_pushButton); + btnLayout->addSpacing(10); + + QHBoxLayout *hLayout = new QHBoxLayout(); + hLayout->setSpacing(0); + hLayout->setMargin(0); + hLayout->setContentsMargins(0, 0, 0, 0); + hLayout->addSpacing(10); + hLayout->addWidget(m_searchEdit); + hLayout->addSpacing(10); + + QVBoxLayout *vLayout = new QVBoxLayout(this); + m_vlayout = vLayout; + vLayout->setContentsMargins(0, 0, 0, 0); + vLayout->setSpacing(10); + vLayout->addSpacing(10); + vLayout->addLayout(hLayout); + vLayout->addWidget(m_cmdListWidget); + vLayout->addLayout(btnLayout); + vLayout->addSpacing(10); + setLayout(vLayout); + + connect(m_searchEdit, &DSearchEdit::returnPressed, this, &CustomCommandPanel::showCurSearchResult); + connect(m_pushButton, &DPushButton::clicked, this, &CustomCommandPanel::showAddCustomCommandDlg); + connect(m_cmdListWidget, &ListView::itemClicked, this, &CustomCommandPanel::doCustomCommand); + connect(m_cmdListWidget, &ListView::listItemCountChange, this, &CustomCommandPanel::refreshCmdSearchState); + connect(m_cmdListWidget, &ListView::focusOut, this, &CustomCommandPanel::onFocusOut); +} diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandpanel.h deepin-terminal-5.4.13/src/customcommand/customcommandpanel.h --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: CustomCommandPanel + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-08-05 + 4. @说明: 自定义命令面板类 +*******************************************************************************/ + +#ifndef CUSTOMCOMMANDPANEL_H +#define CUSTOMCOMMANDPANEL_H + +#include "rightpanel.h" +#include "customcommandsearchrstpanel.h" +#include "commonpanel.h" +#include "listview.h" + +#include +#include +#include +#include +#include + +#include + +DWIDGET_USE_NAMESPACE + +class CustomCommandOptDlg; + +class CustomCommandPanel : public CommonPanel +{ + Q_OBJECT +public: + explicit CustomCommandPanel(QWidget *parent = nullptr); + ~CustomCommandPanel(); + /** + * @brief 自定义命令页面刷新 + * @author sunchengxi + */ + void refreshCmdPanel(); + /** + * @brief 自定义命令面板搜索框显示布局控制 + * @author sunchengxi + */ + void refreshCmdSearchState(); + /** + * @brief 将焦点设置到平面:若有搜索框,焦点进搜索框;若没搜索框,焦点进列表;若没列表,焦点进添加按钮 + * @author ut000610 戴正文 + */ + void setFocusInPanel(); +signals: + void handleCustomCurCommand(const QString &strCommand); + void focusOut(); + void showSearchResult(const QString &strCommand); +public slots: + /** + * @brief 处理显示搜索结果的槽函数 + * @author sunchengxi + */ + void showCurSearchResult(); + /** + * @brief 增加自定义命令操作的槽函数 + * @author sunchengxi + */ + void showAddCustomCommandDlg(); + /** + * @brief 处理点击执行自定义命令 + * @author sunchengxi + * @param key 自定义命令 + */ + void doCustomCommand(const QString &key); + /** + * @brief 处理焦点出列表的事件 + * @author ut000610 戴正文 + * @param type + */ + void onFocusOut(Qt::FocusReason type); + /** + * @brief 添加自定义命令的响应 + * @param result:accept or reject + */ + void onAddCommandResponse(int result); +private: + /** + * @brief 自定义命令面板界面初始化 + * @author sunchengxi + */ + void initUI(); + +public://private: + ListView *m_cmdListWidget = nullptr; + CustomCommandOptDlg *m_pdlg = nullptr; + QVBoxLayout *m_vlayout = nullptr; + bool m_bpushButtonHaveFocus = false; +}; + +#endif // CUSTOMCOMMANDPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandplugin.cpp deepin-terminal-5.4.13/src/customcommand/customcommandplugin.cpp --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandplugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandplugin.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandplugin.h" +#include "customcommandpanel.h" +#include "customcommandtoppanel.h" +#include "mainwindow.h" +#include "termwidgetpage.h" +#include "settings.h" +#include "shortcutmanager.h" +#include "utils.h" + +//qt +#include + +CustomCommandPlugin::CustomCommandPlugin(QObject *parent) : MainWindowPluginInterface(parent) +{ + Utils::set_Object_Name(this); + m_pluginName = "Custom Command"; +} + +void CustomCommandPlugin::initPlugin(MainWindow *mainWindow) +{ + m_mainWindow = mainWindow; + //initCustomCommandTopPanel(); + connect(m_mainWindow, &MainWindow::showPluginChanged, this, [ = ](const QString name, bool bSetFocus) { + if (MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND != name) { + // 若插件已经显示,则隐藏 + if (m_isShow) { + qInfo() << "Command top panel hide"; + getCustomCommandTopPanel()->hideAnim(); + m_isShow = false; + } + } else { + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,自定义界面使用不方便,将雷神窗口变大适应正常的自定义界面 Begin***************/ + if (m_mainWindow->isQuakeMode() && m_mainWindow->height() < LISTMINHEIGHT) { + //因为拉伸函数设置了FixSize,导致自定义界面弹出时死循环,然后崩溃的问题 + QuakeWindow *quakeWindow = qobject_cast(m_mainWindow); + if(!quakeWindow) + return; + quakeWindow->switchEnableResize(true); + m_mainWindow->resize(m_mainWindow->width(), LISTMINHEIGHT); //首先设置雷神界面的大小 + m_mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND);//重新打开自定义界面,当前流程结束 + //窗口弹出后,重新判断雷神窗口是否需要有拉伸属性 + quakeWindow->switchEnableResize(); + return; + } + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,自定义界面使用不方便,将雷神窗口变大适应正常的自定义界面 End***************/ + getCustomCommandTopPanel()->show(bSetFocus); + m_isShow = true; + //getCustomCommandTopPanel()->setFocus(); + } + }); + connect(m_mainWindow, &MainWindow::quakeHidePlugin, this, [ = ]() { + getCustomCommandTopPanel()->hide(); + }); +} + +QAction *CustomCommandPlugin::titlebarMenu(MainWindow *mainWindow) +{ + QAction *customCommandAction(new QAction(tr("Custom commands"), mainWindow)); + + connect(customCommandAction, &QAction::triggered, mainWindow, [mainWindow]() { + mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND); + }); + + return customCommandAction; +} + +void CustomCommandPlugin::initCustomCommandTopPanel() +{ + m_customCommandTopPanel = new CustomCommandTopPanel(m_mainWindow->centralWidget()); + m_customCommandTopPanel->setObjectName("CustomCustomCommandTopPanel");//Add by ut001000 renfeixiang 2020-08-14 + connect(m_customCommandTopPanel, + &CustomCommandTopPanel::handleCustomCurCommand, + this, + &CustomCommandPlugin::doCustomCommand); +} + +CustomCommandTopPanel *CustomCommandPlugin::getCustomCommandTopPanel() +{ + if (!m_customCommandTopPanel) + initCustomCommandTopPanel(); + + return m_customCommandTopPanel; +} + +void CustomCommandPlugin::doCustomCommand(const QString &strTxt) +{ + if (!strTxt.isEmpty()) { + m_mainWindow->currentPage()->sendTextToCurrentTerm(strTxt); + m_mainWindow->focusCurrentPage(); + /******** Add by nt001000 renfeixiang 2020-05-28:增加 使用mainwindow的hideplugin函数隐藏自定义窗口bug#21992 Begin***************/ + m_mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_NONE); + /******** Add by nt001000 renfeixiang 2020-05-28:增加 使用mainwindow的hideplugin函数隐藏自定义窗口bug#21992 End***************/ + } + emit doHide(); +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandplugin.h deepin-terminal-5.4.13/src/customcommand/customcommandplugin.h --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandplugin.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandplugin.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: CustomCommandPlugin + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-08-05 + 4. @说明: 自定义插件的具体实现类 +*******************************************************************************/ +#ifndef CUSTOMCOMMANDPLUGIN_H +#define CUSTOMCOMMANDPLUGIN_H + +#include "customcommandtoppanel.h" +#include "mainwindowplugininterface.h" + +#include +#include + +class CustomCommandSearchRstPanel; +class CustomCommandPanel; +class MainWindow; +class CustomCommandPlugin : public MainWindowPluginInterface +{ + Q_OBJECT +public: + explicit CustomCommandPlugin(QObject *parent = nullptr); + + /** + * @brief 初始化自定义命令插件 + * @author sunchengxi + * @param mainWindow 主窗口 + */ + void initPlugin(MainWindow *mainWindow) override; + /** + * @brief 初始化窗口菜单栏里的自定义命令快捷键 + * @author sunchengxi + * @param mainWindow 主窗口 + * @return + */ + QAction *titlebarMenu(MainWindow *mainWindow) override; + + /** + * @brief 获取当前插件的自定义命令面板指针 + * @author sunchengxi + * @return + */ + CustomCommandTopPanel *getCustomCommandTopPanel(); + /** + * @brief 初始化自定义命令面板 + * @author sunchengxi + */ + void initCustomCommandTopPanel(); +signals: + void doHide(); + +public slots: + /** + * @brief 执行自定义命令,并隐藏右侧插件面板 + * @author sunchengxi + * @param strTxt 自定义命令 + */ + void doCustomCommand(const QString &strTxt); + +private: + MainWindow *m_mainWindow = nullptr; + CustomCommandTopPanel *m_customCommandTopPanel = nullptr; +}; + +#endif // CUSTOMCOMMANDPLUGIN_H diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandsearchrstpanel.cpp deepin-terminal-5.4.13/src/customcommand/customcommandsearchrstpanel.cpp --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandsearchrstpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandsearchrstpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandsearchrstpanel.h" +#include "customcommandoptdlg.h" +#include "shortcutmanager.h" +#include "iconbutton.h" +#include "listview.h" +#include "utils.h" +#include "mainwindow.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +CustomCommandSearchRstPanel::CustomCommandSearchRstPanel(QWidget *parent) + : CommonPanel(parent) +{ + Utils::set_Object_Name(this); + initUI(); +} + +void CustomCommandSearchRstPanel::initUI() +{ + setBackgroundRole(QPalette::Base); + setAutoFillBackground(true); + + m_rebackButton = new IconButton(this); + m_rebackButton->setObjectName("CustomRebackButton"); + m_backButton = m_rebackButton; + m_backButton->setIcon(DStyle::StandardPixmap::SP_ArrowLeave); + m_backButton->setFixedSize(QSize(36, 36)); + m_backButton->setFocusPolicy(Qt::TabFocus); + + m_label = new DLabel(this); + m_label->setObjectName("CustomSearchFilterlabel");//Add by ut001000 renfeixiang 2020-08-13 + m_label->setAlignment(Qt::AlignCenter); + // 字体颜色随主题变化变化 + DPalette palette = m_label->palette(); + QColor color; + if (DApplicationHelper::DarkType == DApplicationHelper::instance()->themeType()) + color = QColor::fromRgb(192, 198, 212, 102); + else + color = QColor::fromRgb(85, 85, 85, 102); + + palette.setBrush(QPalette::Text, color); + m_label->setPalette(palette); + + m_cmdListWidget = new ListView(ListType_Custom, this); + m_cmdListWidget->setObjectName("CustomcmdSearchListWidget");//Add by ut001000 renfeixiang 2020-08-14 + + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->addSpacing(10); + hlayout->addWidget(m_backButton); + // 搜索框居中显示 + hlayout->addWidget(m_label, 0, Qt::AlignCenter); + hlayout->setSpacing(0); + hlayout->setMargin(0); + + QVBoxLayout *vlayout = new QVBoxLayout(); + vlayout->addSpacing(10); + vlayout->addLayout(hlayout); + vlayout->addWidget(m_cmdListWidget); + vlayout->setMargin(0); + vlayout->setSpacing(10); + setLayout(vlayout); + + connect(m_cmdListWidget, &ListView::itemClicked, this, &CustomCommandSearchRstPanel::doCustomCommand); + connect(m_backButton, &DIconButton::clicked, this, &CustomCommandSearchRstPanel::showCustomCommandPanel); + // 字体颜色随主题变化变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CustomCommandSearchRstPanel::handleThemeTypeChanged); + + connect(m_rebackButton, &IconButton::focusOut, this, &CustomCommandSearchRstPanel::handleIconButtonFocusOut); + + connect(m_cmdListWidget, &ListView::focusOut, this, &CustomCommandSearchRstPanel::handleListViewFocusOut); +} + +inline void CustomCommandSearchRstPanel::handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType) +{ + DPalette palette = m_label->palette(); + QColor color; + if (DApplicationHelper::DarkType == themeType) + color = QColor::fromRgb(192, 198, 212, 102); + else + color = QColor::fromRgb(85, 85, 85, 102); + + palette.setBrush(QPalette::Text, color); + m_label->setPalette(palette); +} + +inline void CustomCommandSearchRstPanel::handleIconButtonFocusOut(Qt::FocusReason type) +{ + // 焦点切出,没值的时候 + if (Qt::TabFocusReason == type && 0 == m_cmdListWidget->count()) { + // tab 进入 + + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Tab, Qt::MetaModifier); + QApplication::sendEvent(Utils::getMainWindow(this), &keyPress); + qInfo() << "search panel focus to '+'"; + } +} + +inline void CustomCommandSearchRstPanel::handleListViewFocusOut(Qt::FocusReason type) +{ + Q_UNUSED(type); + if (Qt::TabFocusReason == type) { + // tab 进入 + + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Tab, Qt::MetaModifier); + QApplication::sendEvent(Utils::getMainWindow(this), &keyPress); + qInfo() << "search panel focus on '+'"; + m_cmdListWidget->clearIndex(); + } else if (Qt::BacktabFocusReason == type || Qt::NoFocusReason == type) { + // shift + tab 返回 返回键 // 列表为空,也返回到返回键上 + m_rebackButton->setFocus(); + m_cmdListWidget->clearIndex(); + qInfo() << "search panel type" << type; + } +} + +void CustomCommandSearchRstPanel::setSearchFilter(const QString &filter) +{ + m_strFilter = filter; + QString showText = Utils::getElidedText(m_label->font(), filter, ITEMMAXWIDTH, Qt::ElideMiddle); + m_label->setText(QString("%1:%2").arg(tr("Search"), showText)); +} + +void CustomCommandSearchRstPanel::refreshData() +{ + ShortcutManager::instance()->fillCommandListData(m_cmdListWidget, m_strFilter); +} + +void CustomCommandSearchRstPanel::refreshData(const QString &strFilter) +{ + setSearchFilter(strFilter); + ShortcutManager::instance()->fillCommandListData(m_cmdListWidget, strFilter); +} + +void CustomCommandSearchRstPanel::doCustomCommand(const QString &strKey) +{ + qInfo() << "doCustomCommand,key=" << strKey; + QAction *item = ShortcutManager::instance()->findActionByKey(strKey); + QString strCommand = item ? item->data().toString() : ""; + if (!strCommand.endsWith('\n')) + strCommand.append('\n'); + + emit handleCustomCurCommand(strCommand); + emit focusOut(); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandsearchrstpanel.h deepin-terminal-5.4.13/src/customcommand/customcommandsearchrstpanel.h --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandsearchrstpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandsearchrstpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: CustomCommandSearchRstPanel + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-08-05 + 4. @说明: 自定义明星搜索显示面板类 +*******************************************************************************/ + +#ifndef CUSTOMCOMMANDSEARCHRSTPANEL_H +#define CUSTOMCOMMANDSEARCHRSTPANEL_H + +#include "rightpanel.h" +#include "commonpanel.h" + +#include +#include +#include + +#include + +DGUI_USE_NAMESPACE +DWIDGET_USE_NAMESPACE + +class CustomCommandItem; +class ListView; +class CustomCommandSearchRstPanel : public CommonPanel +{ + Q_OBJECT +public: + explicit CustomCommandSearchRstPanel(QWidget *parent = nullptr); + /** + * @brief 根据 strFilter 刷新搜索面板自定义列表 + * @author sunchengxi + * @param strFilter + */ + void refreshData(const QString &strFilter); + /** + * @brief 根据 m_strFilter 刷新搜索面板自定义列表 + * @author sunchengxi + */ + void refreshData(); +signals: + void handleCustomCurCommand(const QString &strCommand); + void showCustomCommandPanel(); + +public slots: + /** + * @brief 执行当前搜索面板自定义命令列表中itemData 中的自定义命令 + * @author sunchengxi + * @param strKey 自定义命令 + */ + void doCustomCommand(const QString &strKey); + void handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType); + void handleListViewFocusOut(Qt::FocusReason type); + void handleIconButtonFocusOut(Qt::FocusReason type); + +private: + /** + * @brief 初始化自定义搜索面板界面 + * @author sunchengxi + */ + void initUI(); + /** + * @brief 设置搜索过滤条件及显示文本 + * @author sunchengxi + * @param filter 搜索过滤条件 + */ + void setSearchFilter(const QString &filter); + void showPreviousPanel(); + + ListView *m_cmdListWidget = nullptr; + QString m_strFilter; +}; + +#endif // CUSTOMCOMMANDSEARCHRSTPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandtoppanel.cpp deepin-terminal-5.4.13/src/customcommand/customcommandtoppanel.cpp --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandtoppanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandtoppanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandtoppanel.h" +#include "service.h" + +#include +#include + +#include +#include +#include +#include + +const int iAnimationDuration = 300; + +CustomCommandTopPanel::CustomCommandTopPanel(QWidget *parent) + : RightPanel(parent), + m_customCommandPanel(new CustomCommandPanel(this)), + m_customCommandSearchPanel(new CustomCommandSearchRstPanel(this)) +{ + /******** Add by ut001000 renfeixiang 2020-08-14:增加 Begin***************/ + Utils::set_Object_Name(this); + m_customCommandPanel->setObjectName("CustomCommandPanel"); + m_customCommandSearchPanel->setObjectName("CustomSearchPanel"); + /******** Add by ut001000 renfeixiang 2020-08-14:增加 End***************/ + setAttribute(Qt::WA_TranslucentBackground); + connect(m_customCommandPanel, + &CustomCommandPanel::showSearchResult, + this, + &CustomCommandTopPanel::showCustomCommandSearchPanel); + connect(m_customCommandPanel, + &CustomCommandPanel::handleCustomCurCommand, + this, + &CustomCommandTopPanel::handleCustomCurCommand); + connect(m_customCommandSearchPanel, + &CustomCommandSearchRstPanel::showCustomCommandPanel, + this, + &CustomCommandTopPanel::showCustomCommandPanel); + connect(m_customCommandSearchPanel, + &CustomCommandSearchRstPanel::handleCustomCurCommand, + this, + &CustomCommandTopPanel::handleCustomCurCommand); + m_customCommandPanel->hide(); + m_customCommandSearchPanel->hide(); + connect(Service::instance(), &Service::refreshCommandPanel, this, &CustomCommandTopPanel::slotsRefreshCommandPanel); +} + +void CustomCommandTopPanel::showCustomCommandPanel() +{ + m_customCommandPanel->resize(size()); + m_customCommandPanel->refreshCmdPanel(); + m_customCommandPanel->show(); + m_customCommandPanel->m_isShow = true; + m_customCommandSearchPanel->m_isShow = false; + + //从自定义搜索面板返回到自定义列表面板时,如果搜索面板存在焦点,则切换后光标焦点依然在自定义列表面板上 + MainWindow *main = Utils::getMainWindow(this); + if (main != nullptr) { + if (main->isFocusOnList()) { + m_customCommandPanel->setFocusInPanel(); + qInfo() << "custom command panel has focus"; + } + } + + QPropertyAnimation *animationCommandSearchPanel = new QPropertyAnimation(m_customCommandSearchPanel, "geometry"); + animationCommandSearchPanel->setDuration(iAnimationDuration); + animationCommandSearchPanel->setEasingCurve(QEasingCurve::OutQuad); + + QRect rect = geometry(); + animationCommandSearchPanel->setStartValue(QRect(0, rect.y(), rect.width(), rect.height())); + animationCommandSearchPanel->setEndValue(QRect(rect.width(), rect.y(), rect.width(), rect.height())); + connect(animationCommandSearchPanel, &QPropertyAnimation::finished, m_customCommandSearchPanel, &QWidget::hide); + connect(animationCommandSearchPanel, &QPropertyAnimation::finished, animationCommandSearchPanel, &QPropertyAnimation::deleteLater); + + QPropertyAnimation *animationCommandPanel = new QPropertyAnimation(m_customCommandPanel, "geometry"); + animationCommandPanel->setDuration(iAnimationDuration); + animationCommandPanel->setEasingCurve(QEasingCurve::OutQuad); + animationCommandPanel->setStartValue(QRect(-rect.width(), rect.y(), rect.width(), rect.height())); + animationCommandPanel->setEndValue(QRect(0, rect.y(), rect.width(), rect.height())); + connect(animationCommandPanel, &QPropertyAnimation::finished, animationCommandPanel, &QPropertyAnimation::deleteLater); + + QParallelAnimationGroup *group = new QParallelAnimationGroup(this); + group->addAnimation(animationCommandSearchPanel); + group->addAnimation(animationCommandPanel); + // 已验证:这个设定,会释放group以及所有组内动画。 + group->start(QAbstractAnimation::DeleteWhenStopped); +} + +void CustomCommandTopPanel::showCustomCommandSearchPanel(const QString &strFilter) +{ + m_customCommandSearchPanel->refreshData(strFilter); + m_customCommandSearchPanel->show(); + m_customCommandSearchPanel->m_backButton->setFocus();//m_customCommandSearchPanel->setFocus(); + + QPropertyAnimation *animationCommandSearchPanel = new QPropertyAnimation(m_customCommandSearchPanel, "geometry"); + animationCommandSearchPanel->setDuration(iAnimationDuration); + animationCommandSearchPanel->setEasingCurve(QEasingCurve::OutQuad); + + QRect rect = geometry(); + animationCommandSearchPanel->setStartValue(QRect(rect.width(), rect.y(), rect.width(), rect.height())); + animationCommandSearchPanel->setEndValue(QRect(0, rect.y(), rect.width(), rect.height())); + connect(animationCommandSearchPanel, &QPropertyAnimation::finished, animationCommandSearchPanel, &QPropertyAnimation::deleteLater); + + QPropertyAnimation *animationCommandPanel = new QPropertyAnimation(m_customCommandPanel, "geometry"); + animationCommandPanel->setDuration(iAnimationDuration); + animationCommandSearchPanel->setEasingCurve(QEasingCurve::OutQuad); + animationCommandPanel->setStartValue(QRect(0, rect.y(), rect.width(), rect.height())); + animationCommandPanel->setEndValue(QRect(-rect.width(), rect.y(), rect.width(), rect.height())); + connect(animationCommandPanel, &QPropertyAnimation::finished, m_customCommandPanel, &QWidget::hide); + connect(animationCommandPanel, &QPropertyAnimation::finished, animationCommandPanel, &QPropertyAnimation::deleteLater); + + QParallelAnimationGroup *group = new QParallelAnimationGroup(this); + group->addAnimation(animationCommandPanel); + group->addAnimation(animationCommandSearchPanel); + // 已验证:这个设定,会释放group以及所有组内动画。 + group->start(QAbstractAnimation::DeleteWhenStopped); +} + +void CustomCommandTopPanel::show(bool bSetFocus) +{ + this->showAnim(); + m_customCommandPanel->resize(size()); + m_customCommandPanel->move(0, 0); + m_customCommandPanel->show(); + m_customCommandPanel->refreshCmdPanel(); + m_customCommandSearchPanel->resize(size()); + m_customCommandSearchPanel->hide(); + m_bSetFocus = bSetFocus; + if (m_bSetFocus) { + qInfo() << "Focus is in Custom panel"; + // 将焦点设置在平面上 + m_customCommandPanel->setFocusInPanel(); + } else { + qInfo() << "Focus is in Current page"; + // 将焦点落回终端 + MainWindow *w = Utils::getMainWindow(this); + if(w) + w->focusCurrentPage(); + } + +} + +void CustomCommandTopPanel::slotsRefreshCommandPanel() +{ + m_customCommandPanel->resize(size()); + //m_customCommandPanel->show(); + m_customCommandPanel->refreshCmdPanel(); + m_customCommandSearchPanel->refreshData(); + +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/customcommand/customcommandtoppanel.h deepin-terminal-5.4.13/src/customcommand/customcommandtoppanel.h --- deepin-terminal-5.0.0+ds1/src/customcommand/customcommandtoppanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/customcommand/customcommandtoppanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: CustomCommandTopPanel + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-08-05 + 4. @说明: 自定义命令显示管理类,控制显示面板和搜索面板的显示 +*******************************************************************************/ + +#ifndef CUSTOMCOMMANDTOPPANEL_H +#define CUSTOMCOMMANDTOPPANEL_H + +#include "rightpanel.h" +#include "customcommandpanel.h" +#include "customcommandsearchrstpanel.h" + +#include + +class CustomCommandTopPanel : public RightPanel +{ + Q_OBJECT +public: + explicit CustomCommandTopPanel(QWidget *parent = nullptr); + /** + * @brief 显示自定义列表面板,隐藏搜索面板 + * @author sunchengxi + * @param bSetFocus 自定义面板是否显示时是否带有焦点 + */ + void show(bool bSetFocus = false); + +signals: + void focusOut(); + void handleCustomCurCommand(const QString &strCommand); + +public slots: + /** + * @brief 显示自定义命令面板的槽函数,从自定义搜索面板切换到自定义命令面板 + * @author sunchengxi + */ + void showCustomCommandPanel(); + /** + * @brief 根据搜索条件显示搜索面板的槽函数 + * @author sunchengxi + * @param strFilter 搜索条件 + */ + void showCustomCommandSearchPanel(const QString &strFilter); + /** + * @brief 刷新自定义列表数据的槽函数 + * @author sunchengxi + */ + void slotsRefreshCommandPanel(); + +private: + CustomCommandPanel *m_customCommandPanel = nullptr; + CustomCommandSearchRstPanel *m_customCommandSearchPanel = nullptr; + bool m_bSetFocus; //打开自定义命令插件时,是否获得焦点 +}; + +#endif // CUSTOMCOMMANDTOPPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/deepin-terminal.desktop deepin-terminal-5.4.13/src/deepin-terminal.desktop --- deepin-terminal-5.0.0+ds1/src/deepin-terminal.desktop 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/deepin-terminal.desktop 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,318 @@ +[Desktop Entry] +Categories=DDE;Utility;System;TerminalEmulator; +Comment=Use the command line +Exec=deepin-terminal +GenericName=Terminal +Icon=deepin-terminal +Keywords=shell;prompt;command;commandline; +Name=Deepin Terminal +StartupNotify=false +TryExec=deepin-terminal +Type=Application +X-Deepin-Vendor=deepin + +# Translations: +# Do not manually modify! +Comment[am_ET]=የ ትእዛዝ መስመር ይጠቀሙ +Comment[ar]=استخدام سطر الأوامر +Comment[ast]=Usa la llinia de comandos +Comment[az]=Əmr sətirindən istifadə et +Comment[bg]=Използване на команден ред +Comment[bo]=བཀའི་ཕྲེང་སྤྱོད་པ། +Comment[br]=Implijout ul linenn urzhiad +Comment[ca]=Useu la línia d'ordres +Comment[cs]=Použít příkazový řádek +Comment[da]=Brug kommandolinjen +Comment[de]=Kommandozeile benutzen +Comment[el]=Χρήση της γραμμής εντολών +Comment[en_AU]=Use the command line +Comment[eo]=Uzi la komandlinio +Comment[es]=Usar la línea de comando +Comment[es_419]=Usar la línea de comandos +Comment[fa]=استفاده از خط فرمان +Comment[fi]=Käytä komentoriviä +Comment[fr]=Utiliser la ligne de commande +Comment[gl_ES]=Empregar a liña de comandos +Comment[he]=השתמש בשורת פקודה +Comment[hi_IN]=आदेश रेखा का उपयोग करें +Comment[hr]=Koristi naredbeni redak +Comment[hu]=Parancssor használata +Comment[hy]=Օգտագործել հրամանների տողը +Comment[id]=Gunakan baris perintah +Comment[it]=Usa linea di comando +Comment[ja]=コマンドラインを使用する +Comment[ko]=명령 행 사용 +Comment[lt]=Naudoti komandų eilutę +Comment[ml]=കമാൻഡ് ലൈൻ ഉപയോഗിക്കുക +Comment[mn]=Комманд мѳр ашиглах +Comment[ms]=guna baris perintah +Comment[nb]=Bruk kommandolinjen +Comment[nl]=Gebruik de opdrachtregel +Comment[pam]=Gamitan ing command line +Comment[pl]=Użyj wiersza poleceń +Comment[pt]=Utilize a linha de comandos +Comment[pt_BR]=Usar a linha de comando +Comment[ro]=Folosește linia de comandă +Comment[ru]=Использовать командную строку +Comment[sk]=Použiť príkazový riadok +Comment[sl]=Uporabi ukazno vrstico +Comment[sq]=Përdorni rresht urdhrash +Comment[sr]=Користите командну линију +Comment[sv]=Använd kommandoraden +Comment[tr]=Komut satırını kullan +Comment[ug]=بۇيرۇق ئىشلىتىش +Comment[uk]=Використовувати командний рядок +Comment[vi]=Sử dụng lệnh +Comment[zh_CN]=使用命令行 +Comment[zh_HK]=使用命令列 +Comment[zh_TW]=使用命令列介面 +GenericName[af]=Terminaal +GenericName[am_ET]=ተርሚናል +GenericName[ar]=الطرفية +GenericName[ast]=Terminal +GenericName[az]=Terminal +GenericName[bg]=Терминал +GenericName[bn]=প্রান্তিক +GenericName[bo]=མཐའ་སྣེ། +GenericName[br]=Terminal +GenericName[ca]=Terminal +GenericName[cs]=Terminál +GenericName[da]=Terminal +GenericName[de]=Terminal +GenericName[el]=Τερματικό +GenericName[en_AU]=Terminal +GenericName[eo]=Terminalo +GenericName[es]=Terminal +GenericName[es_419]=Terminal +GenericName[fa]=ترمینال +GenericName[fi]=Pääte +GenericName[fr]=Terminal +GenericName[gl_ES]=Terminal +GenericName[he]=מסוף +GenericName[hi_IN]=टर्मिनल +GenericName[hr]=Terminal +GenericName[hu]=Terminál +GenericName[id]=Terminal +GenericName[it]=Terminale +GenericName[ja]=ターミナル +GenericName[ko]=터미널 +GenericName[lt]=Terminalas +GenericName[ml]=ടെർമിനൽ +GenericName[mn]=Терминал +GenericName[ms]=Terminal +GenericName[nb]=Terminal +GenericName[ne]=टर्मिनल +GenericName[nl]=Terminal +GenericName[pl]=Terminal +GenericName[pt]=Terminal +GenericName[pt_BR]=Terminal +GenericName[ro]=Terminal +GenericName[ru]=Терминал +GenericName[sk]=Terminál +GenericName[sl]=Terminal +GenericName[sq]=Terminal +GenericName[sr]=Терминал +GenericName[sv]=Terminal +GenericName[ta]=முனையம் +GenericName[tr]=Uçbirim +GenericName[ug]=تېرمىنال +GenericName[uk]=Термінал +GenericName[vi]=Đầu cuối +GenericName[zh_CN]=终端 +GenericName[zh_HK]=終端 +GenericName[zh_TW]=終端機 +Keywords[ar]=shell;prompt;command;commandline; +Keywords[ast]=shell;comandu;llinia;llinia de comandos;comandos; +Keywords[az]=shell;prompt;command;commandline;üz qabığı;dəvət;əmr;əmrsətri; +Keywords[bg]=shell;prompt;command;commandline; +Keywords[bo]=shell;prompt;command;commandline; +Keywords[br]=shell;prompt;command;commandline; +Keywords[ca]=shell;intèrpret;intèrpret d'ordres;ordres;ordre;línia d'ordres; +Keywords[cs]=shell;prompt;příkaz;příkazový řádek; +Keywords[da]=skal;prompt;kommando;kommandolinje; +Keywords[de]=shell;prompt;command;commandline; +Keywords[el]=κέλυφος;προτροπή;εντολή;γραμμή-εντολών; +Keywords[es]=shell;prompt;command;comando;commandline;lineadecomandos; +Keywords[es_419]=shell;prompt;command;commandline; +Keywords[fa]=پوسته ؛ سریع ؛ فرمان ؛ خط فرمان ؛ +Keywords[fi]=shell;kehote;komento;komentorivi;pääte;terminaali; +Keywords[fr]=shell;prompt;command;commandline; +Keywords[gl_ES]=shell;prompt;command;commandline; +Keywords[hu]=shell;prompt;parancs;parancssor +Keywords[id]=shell;prompt;perintah;barisperintah; +Keywords[it]=shell;prompt;command;commandline;terminale;cmd;script;bash; +Keywords[ko]=shell;prompt;command;commandline;쉘;프롬프트;명령;명령행; +Keywords[lt]=apvalkalas;užklausa;komanda;komandų eilutė;eilutė;komandos; +Keywords[ms]=shell;prom;perintah;barisperintah; +Keywords[nl]=shell;prompt;opdracht;opdrachtregel; +Keywords[pl]=powłoka;zapytanie;polecenie;wiersz;poleceń; +Keywords[pt]=shell;prompt;comando;commandline; +Keywords[pt_BR]=shell;prompt;command;commandline; +Keywords[ro]=shell;prompt;comandă;liniecomandă; +Keywords[ru]=shell;prompt;command;commandline; +Keywords[sk]=shell;prompt;command;commandline; +Keywords[sq]=shell;prompt;urdhër;rreshturdhrash; +Keywords[sr]=shell;prompt;команда;командна линија; +Keywords[sv]=shell;prompt;command;commandline; +Keywords[tr]=kabuk;komut;komutsatırı; +Keywords[ug]=shell;prompt;command;commandline; +Keywords[uk]=shell;prompt;command;commandline;оболонка;запит;команда;командна;рядок; +Keywords[vi]=shell;prompt;command;commandline; +Keywords[zh_CN]=shell;prompt;command;commandline; +Keywords[zh_HK]=shell;prompt;command;commandline; +Keywords[zh_TW]=shell;prompt;command;commandline;提示;指令;指令列; +Name[am_ET]=የ ዲፕኢን ተርሚናል +Name[ar]=طرفية ديبين +Name[ast]=Deepin Terminal +Name[az]=Deepin Terminal +Name[bg]=Deepin терминал +Name[bo]=གཏིང་ཟབ་མཐའ་སྣེ། +Name[br]=Terminal Deepin +Name[ca]=Terminal del Deepin +Name[cs]=Terminál +Name[da]=Deepin terminal +Name[de]=Deepin Terminal +Name[el]=Deepin Tερματικό +Name[en_AU]=Deepin Terminal +Name[eo]=Deepin terminalo +Name[es]=Terminal +Name[es_419]=Terminal Deepin +Name[fa]=ترمینال دیپین +Name[fi]=Deepin pääte +Name[fil]=Deepin Terminal +Name[fr]=Terminal Deepin +Name[gl_ES]=Terminal +Name[he]=מסוף Deepin +Name[hi_IN]=डीपइन छोर +Name[hr]=Deepin terminal +Name[hu]=Deepin® Terminál +Name[hy]=Deepin Տերմինալ +Name[id]=Terminal Deepin +Name[it]=Terminale di Deepin +Name[ja]=Deepin ターミナル +Name[ko]=Deepin 터미널 +Name[lt]=Deepin terminalas +Name[ml]=ഡീപിൻ ടെർമിനൽ +Name[mn]=Дээпин Терминал +Name[ms]=Terminal Deepin +Name[nb]=Deepin terminal +Name[nl]=Deepin Terminal +Name[pam]=Deepin Terminal +Name[pl]=Terminal Deepin +Name[pt]=Terminal Deepin +Name[pt_BR]=deepin Terminal +Name[ro]=Terminalul Deepin +Name[ru]= Терминал Deepin +Name[sk]=Deepin Terminál +Name[sl]=Terminal Deepin +Name[sq]=Terminali Deepin +Name[sr]=Дипин Терминал +Name[sv]=Deepin-terminal +Name[tr]=Deepin Uçbirim +Name[ug]=Deepin تېرمىنالى +Name[uk]=Термінал Deepin +Name[vi]=Deepin Terminal +Name[zh_CN]=深度终端 +Name[zh_HK]=Deepin 終端 +Name[zh_TW]=Deepin 終端機 + +[NewWindow Shortcut Group] +Exec=deepin-terminal +Name=New Window + +# Translations: +# Do not manually modify! +Name[ar]=نافذة جديدة +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[bg]=Нов прозорец +Name[bo]=སྒེའུ་ཁུང་གསར་བཟོ། +Name[br]=Prenestr nevez +Name[ca]=Finestra nova +Name[cs]=Nové okno +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[el]=Νέο παράθυρο +Name[es]=Nueva ventana +Name[es_419]=Nueva ventana +Name[fa]=پنجره جدید +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[gl_ES]=Nova xanela +Name[hr]=Novi prozor +Name[hu]=Új ablak +Name[id]=Jendela Baru +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ko]=새 창 +Name[lt]=Naujas langas +Name[mn]=Шинэ Цонх +Name[ms]=Terminal Baharu +Name[nl]=Nieuw venster +Name[pl]=Nowe okno +Name[pt]=Nova janela +Name[pt_BR]=Nova Janela +Name[ro]=Fereastră Nouă +Name[ru]=Новое Окно +Name[sk]=Nové okno +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv]=Nytt fönster +Name[tr]=Yeni Pencere +Name[ug]=يېڭىدىن كۆزنەك قۇرۇش +Name[uk]=Нове вікно +Name[vi]=Cửa sổ mới +Name[zh_CN]=新建窗口 +Name[zh_HK]=新建視窗 +Name[zh_TW]=新增視窗 + +[Quake Shortcut Group] +Exec=deepin-terminal --quake-mode +Name=Quake Terminal + +# Translations: +# Do not manually modify! +Name[ar]=طرفية كواك +Name[ast]=Terminal Quake +Name[az]=Quake Terminal +Name[bg]=Quake терминал +Name[bo]=ཐོག་ལྷའི་མཐའ་སྣེ། +Name[br]=Terminal Quake +Name[ca]=Terminal Quake +Name[cs]=Vysouvací terminál (quake) +Name[da]=Quake-terminal +Name[de]=Quake Terminal +Name[el]=Τερματικό "Quake" +Name[es]=Terminal Quake +Name[es_419]=Terminal en modo Quake +Name[fa]=ترمینال Quake +Name[fi]=Quake pääte +Name[fr]=Terminal Quake +Name[gl_ES]=Terminal Quake +Name[hr]=Quake terminal +Name[hu]=Lebegő Terminál +Name[id]=Terminal Quake +Name[it]=Terminale in primo piano +Name[ja]=ターミナルを振動させる +Name[ko]=퀘이크 터미널 +Name[lt]=Quake terminalas +Name[mn]=Куаке Терминал +Name[ms]=Terminal Quake +Name[nl]=Quake-terminal +Name[pl]=Terminal Quake +Name[pt]=Terminal deslizante +Name[pt_BR]=Terminal Quake +Name[ro]=Terminal Quake +Name[ru]=Выпадающий Терминал +Name[sk]=Quake terminál +Name[sq]=Terminal Quake +Name[sr]=Спуштајући терминал +Name[sv]=Quake Terminal +Name[tr]=Quake Uçbirim +Name[ug]=Quake تېرمىنالى +Name[uk]=Термінал Quake +Name[vi]=Quake Terminal +Name[zh_CN]=雷神终端 +Name[zh_HK]=雷神終端 +Name[zh_TW]=雷神模式終端器 + diff -Nru deepin-terminal-5.0.0+ds1/src/DtkSettingsToolsMacros.cmake deepin-terminal-5.4.13/src/DtkSettingsToolsMacros.cmake --- deepin-terminal-5.0.0+ds1/src/DtkSettingsToolsMacros.cmake 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/DtkSettingsToolsMacros.cmake 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +#============================================================================= +# Copyright 2019 Gary Wang +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Gary Wang nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#============================================================================= + +function(DTK_CREATE_I18N_FROM_JSON _generated_file_list _input_json_file _output_cpp_file_name) + set (DTK_SETTINGS_TOOLS_EXECUTABLE ${DTKCORE_TOOL_DIR}/dtk-settings) + set (generated_file_list) # 0(failed) or 1(successed) files in the list. + + get_filename_component(_input_json_abs_path ${_input_json_file} ABSOLUTE) + get_filename_component(_input_json_abs_dir ${_input_json_abs_path} DIRECTORY) + set (_output_cpp_abs_path ${_input_json_abs_dir}/${_output_cpp_file_name}) + + if (EXISTS ${DTK_SETTINGS_TOOLS_EXECUTABLE}) + add_custom_command(OUTPUT ${_output_cpp_abs_path} + COMMAND ${DTK_SETTINGS_TOOLS_EXECUTABLE} + ARGS ${_input_json_abs_path} -o ${_output_cpp_abs_path} + DEPENDS ${_input_json_abs_path} VERBATIM) + list(APPEND generated_file_list ${_output_cpp_abs_path}) + else () + message ("dtk-settings-tools could not be found at ${DTK_SETTINGS_TOOLS_EXECUTABLE}") + endif () + + set(${_generated_file_list} ${generated_file_list} PARENT_SCOPE) +endfunction() diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistmodel.cpp deepin-terminal-5.4.13/src/encodeplugin/encodelistmodel.cpp --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistmodel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodelistmodel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "encodelistmodel.h" +#include "utils.h" + +#include +#include + +#include +#include + +DWIDGET_USE_NAMESPACE + +EncodeListModel::EncodeListModel(QObject *parent) : QStandardItemModel(parent) +{ + Utils::set_Object_Name(this); + initEncodeData(); +} + +int EncodeListModel::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + // + return m_encodeData.count(); +} + +QVariant EncodeListModel::data(const QModelIndex &index, int role) const +{ + Q_UNUSED(role); + const int row = index.row(); + return m_encodeData[row]; +} + +QList EncodeListModel::listData() +{ + return m_encodeData; +} + +void EncodeListModel::initEncodeData() +{ + QList showEncodeList; + showEncodeList << "UTF-8" << "GB18030" << "GB2312" << "GBK" /*简体中文*/ + << "BIG5" << "BIG5-HKSCS" //<< "EUC-TW" /*繁体中文*/ + << "EUC-JP" << "SHIFT_JIS" //<< "ISO-2022-JP"/*日语*/ + << "EUC-KR" //<< "ISO-2022-KR" //<< "UHC" /*韩语*/ + << "IBM864" << "ISO-8859-6" << "ARABIC" << "WINDOWS-1256" /*阿拉伯语*/ + //<< "ARMSCII-8" /*美国语*/ + << "ISO-8859-13" << "ISO-8859-4" << "WINDOWS-1257" /*波罗的海各国语*/ + << "ISO-8859-14" /*凯尔特语*/ + << "IBM-852" << "ISO-8859-2" << "x-mac-CE" << "WINDOWS-1250" /*中欧*/ + //<< "x-mac-CROATIAN" /*克罗地亚*/ + << "IBM855" << "ISO-8859-5" << "KOI8-R" << "MAC-CYRILLIC" << "WINDOWS-1251" //<< "ISO-IR-111" /*西里尔语*/ + << "CP866" /*西里尔语或俄语*/ + << "KOI8-U" << "x-MacUkraine" /*西里尔语或乌克兰语*/ + //<< "GEORGIAN-PS" + << "ISO-8859-7" << "x-mac-GREEK" << "WINDOWS-1253" /*希腊语*/ + //<< "x-mac-GUJARATI" + //<< "x-mac-GURMUKHI" + << "IBM862" << "ISO-8859-8-I" << "WINDOWS-1255"//<< "x-mac-HEBREW" /*希伯来语*/ + << "ISO-8859-8" /*希伯来语*/ + //<< "x-mac-DEVANAGARI" + //<< "x-mac-ICELANDIC" /*冰岛语*/ + << "ISO-8859-10" /*北欧语*/ + //<< "x-mac-FARSI" /*波斯语*/ + //<< "x-mac-ROMANIAN" //<< "ISO-8859-16" /*罗马尼亚语*/ + << "ISO-8859-3" /*西欧语*/ + << "TIS-620" /*泰语*/ + << "IBM857" << "ISO-8859-9" << "x-mac-TURKISH" << "WINDOWS-1254" /*土耳其语*/ + << "WINDOWS-1258" //<< "TCVN" << "VISCII" /*越南语*/ + << "IBM850" << "ISO-8859-1" << "ISO-8859-15" << "x-ROMAN8" << "WINDOWS-1252"; /*西方国家*/ + + // 自定义的名称,系统里不一定大小写完全一样,再同步一下。 + QList all = QTextCodec::availableCodecs(); + for (const QByteArray &name : showEncodeList) { + QString strname1 = name; + bool bFind = false; + QByteArray encodename; + for (const QByteArray &name2 : all) { + QString strname2 = name2; + if (0 == strname1.compare(strname2, Qt::CaseInsensitive)) { + bFind = true; + encodename = name2; + break; + } + } + if (!bFind) + qInfo() << "encode name :" << name << "not find!"; + else + m_encodeData << encodename; + } + + qInfo() << "QTextCodec::availableCodecs" << m_encodeData.count(); +} diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistmodel.h deepin-terminal-5.4.13/src/encodeplugin/encodelistmodel.h --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistmodel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodelistmodel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ENCODELISTMODEL_H +#define ENCODELISTMODEL_H + +#include + +/******************************************************************************* + 1. @类名: EncodeListModel + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class EncodeListModel : public QStandardItemModel +{ + Q_OBJECT +public: + explicit EncodeListModel(QObject *parent = nullptr); + + /** + * @brief 获取行数 + * @author ut001121 zhangmeng + * @param parent + * @return + */ + int rowCount(const QModelIndex &parent) const override; + /** + * @brief 根据行信息获取当前编码内容 + * @author ut001121 zhangmeng + * @param index 行 + * @param role + * @return + */ + QVariant data(const QModelIndex &index, int role) const override; + /** + * @brief 返回编码数据列表 + * @author ut001121 zhangmeng + * @return + */ + QList listData(); + +private: + /** + * @brief 初始化编码数据 + * @author ut001121 zhangmeng + */ + void initEncodeData(); + + QList m_encodeData; +}; + +#endif // THEMELISTMODEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistview.cpp deepin-terminal-5.4.13/src/encodeplugin/encodelistview.cpp --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistview.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodelistview.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,369 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "encodelistview.h" +#include "encodelistmodel.h" +#include "settings.h" +#include "service.h" +#include "termwidget.h" +#include "dbusmanager.h" + +#include +#include +#include +#include +#include +#include + +EncodeListView::EncodeListView(QWidget *parent) : DListView(parent), m_encodeModel(new EncodeListModel(this)) +{ + /******** Add by ut001000 renfeixiang 2020-08-14:增加 Begin***************/ + Utils::set_Object_Name(this); + m_encodeModel->setObjectName("EncodeListModel"); + m_standardModel = new QStandardItemModel(this); + m_standardModel->setObjectName("EncodeStandardModel"); + /******** Add by ut001000 renfeixiang 2020-08-14:增加 End***************/ + m_Mainwindow = qobject_cast(parentWidget()->parentWidget()->parentWidget()); + // init view. + this->setModel(m_standardModel); + setBackgroundRole(QPalette::NoRole); + setAutoFillBackground(false); + + /** add by ut001121 zhangmeng 20200722 for sp3 keyboard interaction */ + setFocusPolicy(Qt::TabFocus); + /** mod by ut001121 zhangmeng 20200718 for sp3 keyboard interaction */ + setSelectionMode(QListView::SingleSelection); + + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + + //add by ameng 设置属性,修复BUG#20074 + setItemSize(QSize(ENCODE_ITEM_WIDTH, ENCODE_ITEM_HEIGHT)); + + /***add by ut001121 zhangmeng 20200628 设置视图边距,留出空间给滚动条显示 修复BUG35378***/ + setViewportMargins(MARGINS_LEFT, MARGINS_TOP, MARGINS_RIGHT, MARGINS_BOTTOM); + + /***add by ut001121 zhangmeng 20200521 设置非编辑模式 修复BUG27443***/ + setEditTriggers(QAbstractItemView::NoEditTriggers); + + initEncodeItems(); + update(); + + connect(this, &DListView::clicked, this, &EncodeListView::onListViewClicked); + connect(this, &DListView::activated, this, &QListView::clicked); + connect(Service::instance(), &Service::checkEncode, this, &EncodeListView::checkEncode); + + /** add by ut001121 zhangmeng 20200718 for sp3 keyboard interaction */ + setItemDelegate(new EncodeDelegate(this)); + + /** add by ut001121 zhangmeng 20200811 for sp3 Touch screen interaction */ + Service::instance()->setScrollerTouchGesture(this); +} + +void EncodeListView::initEncodeItems() +{ + QList encodeDataList = m_encodeModel->listData(); + // 遍历编码 + for (int i = 0; i < encodeDataList.size(); i++) { + QByteArray encodeData = encodeDataList.at(i); + QString strEncode = QString(encodeData); + // 构造子项 + DStandardItem *item = new DStandardItem; + item->setText(strEncode); + item->setCheckable(true); + // 插入子项 + m_standardModel->appendRow(item); + } + // 默认起动选择第一个。 + m_standardModel->item(0)->setCheckState(Qt::Checked); + m_modelIndexChecked = m_standardModel->index(0, 0); +} + +void EncodeListView::focusInEvent(QFocusEvent *event) +{ + /** add begin by ut001121 zhangmeng 20200718 for sp3 keyboard interaction*/ + // 记录焦点 + m_foucusReason = event->reason(); + + // 判断焦点 + if (Qt::TabFocusReason == m_foucusReason || Qt::BacktabFocusReason == m_foucusReason) { + qInfo() << __FUNCTION__ << m_foucusReason << "Current Encode:" << m_modelIndexChecked.data().toString(); + setCurrentIndex(m_modelIndexChecked); + } + /** add end by ut001121 zhangmeng 20200718 */ + DListView::focusInEvent(event); +} + +void EncodeListView::focusOutEvent(QFocusEvent *event) +{ + /** add by ut001121 zhangmeng 20200718 for sp3 keyboard interaction*/ + // mod by ut001121 zhangmeng 20200731 设置无效焦点原因 修复BUG40390 + m_foucusReason = INVALID_FOCUS_REASON; + + DListView::focusOutEvent(event); +} + +void EncodeListView::resizeEvent(QResizeEvent *event) +{ + /***add by ut001121 zhangmeng 20200701 修改滚动条高度,解决滚动条被窗口特效圆角切割的问题***/ + verticalScrollBar()->setFixedHeight(height() - 10); + + return DListView::resizeEvent(event); +} + +void EncodeListView::keyPressEvent(QKeyEvent *event) +{ + /** add begin ut001121 zhangmeng 20200718 for sp3 keyboard interaction */ + switch (event->key()) { + case Qt::Key_Space: + //空格键选中子项 + onListViewClicked(currentIndex()); + return; + case Qt::Key_Escape: + //ESC键退出插件 + emit focusOut(); + break; + case Qt::Key_Up: + //上键到顶发出提示音 + if (0 == currentIndex().row()) { + DBusManager::callSystemSound(); + } + break; + case Qt::Key_Down: + //下键到底发出提示音 + if (m_encodeModel->listData().size() - 1 == currentIndex().row()) { + DBusManager::callSystemSound(); + } + break; + default: + break; + } + /** add end ut001121 zhangmeng 20200718 */ + return DListView::keyPressEvent(event); +} + +void EncodeListView::mousePressEvent(QMouseEvent *event) +{ + /** add by ut001121 zhangmeng 20200811 for sp3 Touch screen interaction */ + if (Qt::MouseEventSynthesizedByQt == event->source()) { + m_touchPressPosY = event->y(); + m_touchSlideMaxY = -1; + } + /** add end by ut001121 */ + + return DListView::mousePressEvent(event); +} + +void EncodeListView::mouseReleaseEvent(QMouseEvent *event) +{ + /** add begin by ut001121 zhangmeng 20200811 for sp3 Touch screen interaction */ + /***mod by ut001121 zhangmeng 20200813 触摸屏下移动距离超过COORDINATE_ERROR_Y则认为是滑动事件 修复BUG42261***/ + if (Qt::MouseEventSynthesizedByQt == event->source() + && m_touchSlideMaxY > ENCODE_COORDINATE_ERROR_Y) { + event->accept(); + return; + } + /***mod by ut001121***/ + /** add end by ut001121 */ + + return DListView::mouseReleaseEvent(event); +} + +void EncodeListView::mouseMoveEvent(QMouseEvent *event) +{ + /***add begin by ut001121 zhangmeng 20200813 记录触摸屏下移动最大距离 修复BUG42261***/ + if (Qt::MouseEventSynthesizedByQt == event->source()) + m_touchSlideMaxY = qMax(m_touchSlideMaxY, qAbs(event->y() - m_touchPressPosY)); + /***add end by ut001121***/ + + return DListView::mouseMoveEvent(event); +} + +void EncodeListView::onListViewClicked(const QModelIndex &index) +{ + if (!index.isValid()) { + qInfo() << __FUNCTION__ << "Error:" << index; + return; + } + + qInfo() << __FUNCTION__ << "Old:" << m_modelIndexChecked.data().toString() << "New:" << index.data().toString(); + + //当前Checked子项改为Unchecked状态 + QStandardItemModel *model = qobject_cast(this->model()); + DStandardItem *modelItem = dynamic_cast(model->item(m_modelIndexChecked.row())); + modelItem->setCheckState(Qt::Unchecked); + + //当前激活的子项改为Checked状态 + m_modelIndexChecked = model->index(index.row(), 0); + modelItem = dynamic_cast(model->item(m_modelIndexChecked.row())); + modelItem->setCheckState(Qt::Checked); + + /***add by ut001121 zhangmeng 20200727 修改编码配置后使其生效 修复BUG39694***/ + m_Mainwindow->currentPage()->currentTerminal()->selectEncode(index.data().toString()); +} + +void EncodeListView::checkEncode(QString encode) +{ + // 判断是否是当前窗口 + if (this->isActiveWindow()) { + QStandardItemModel *model = qobject_cast(this->model()); + if (nullptr == model) + return; + // 遍历编码 + for (int row = 0; row < model->rowCount(); row++) { + QModelIndex modelindex = model->index(row, 0); + DStandardItem *modelItem = dynamic_cast(model->item(row)); + // 判断编码是否一致 + if (modelindex.data().toString() == encode) { + //设置Checked状态 + modelItem->setCheckState(Qt::Checked); + m_modelIndexChecked = modelindex; + scrollTo(modelindex); + } else { + //设置Unchecked状态 + modelItem->setCheckState(Qt::Unchecked); + } + } + } +} + +void EncodeDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const +{ + if (index.isValid()) { + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, true); + + //用来在视图中画一个item + QStyleOptionViewItem viewOption(option); + initStyleOption(&viewOption, index); + + // 背景区域 + QRect bgRect; + bgRect.setX(option.rect.x() + 1/* + 10*/); + bgRect.setY(option.rect.y() + 1/* + 10*/); + bgRect.setWidth(option.rect.width() - 1); + bgRect.setHeight(option.rect.height() - 10); + + // 绘画路径 + QPainterPath path; + int cornerSize = 16; + int arcRadius = 8; + + // 构造路径 + path.moveTo(bgRect.left() + arcRadius, bgRect.top()); + path.arcTo(bgRect.left(), bgRect.top(), cornerSize, cornerSize, 90.0, 90.0); + path.lineTo(bgRect.left(), bgRect.bottom() - arcRadius); + path.arcTo(bgRect.left(), bgRect.bottom() - cornerSize, cornerSize, cornerSize, 180.0, 90.0); + path.lineTo(bgRect.right() - arcRadius, bgRect.bottom()); + path.arcTo(bgRect.right() - cornerSize, bgRect.bottom() - cornerSize, cornerSize, cornerSize, 270.0, 90.0); + path.lineTo(bgRect.right(), bgRect.top() + arcRadius); + path.arcTo(bgRect.right() - cornerSize, bgRect.top(), cornerSize, cornerSize, 0.0, 90.0); + path.lineTo(bgRect.left() + arcRadius, bgRect.top()); + + // 悬浮状态 + if (option.state & QStyle::State_MouseOver) { + /*** mod begin by ut001121 zhangmeng 20200729 鼠标悬浮在编码插件时使用突出背景处理 修复BUG40078***/ + DPalette pa = DApplicationHelper::instance()->palette(m_parentView); + DStyleHelper styleHelper; + QColor fillColor = styleHelper.getColor(static_cast(&option), pa, DPalette::ObviousBackground); + //fillColor.setAlphaF(0.1); + /*** mod end by ut001121 zhangmeng 20200729***/ + painter->setBrush(QBrush(fillColor)); + painter->fillPath(path, fillColor); + } else { + DPalette pa = DApplicationHelper::instance()->palette(m_parentView); + DStyleHelper styleHelper; + QColor fillColor = styleHelper.getColor(static_cast(&option), pa, DPalette::ItemBackground); + painter->setBrush(QBrush(fillColor)); + painter->fillPath(path, fillColor); + } + + // 设置字体 + QFont textFont = painter->font(); + int cmdNameFontSize = DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T6); + textFont.setPixelSize(cmdNameFontSize); + painter->setFont(textFont); + + // 设置画笔 + DGuiApplicationHelper *appHelper = DGuiApplicationHelper::instance(); + DPalette pa = appHelper->standardPalette(appHelper->themeType()); + painter->setPen(pa.color(DPalette::Text)); + + // 绘画文本 + int checkIconSize = 16; + QString strCmdName = index.data().toString(); + QRect cmdNameRect = QRect(10, bgRect.top(), bgRect.width() - checkIconSize, 50); + painter->drawText(cmdNameRect, Qt::AlignLeft | Qt::AlignVCenter, strCmdName); + + // 绘画边框 + Qt::FocusReason focusReason = qobject_cast(m_parentView)->getFocusReason(); + // mod by ut001121 zhangmeng 20200731 有效效焦点原因下绘制边框 修复BUG40390 + if ((option.state & QStyle::State_Selected) && (focusReason != INVALID_FOCUS_REASON)) { + QPen framePen; + DPalette pax = DApplicationHelper::instance()->palette(m_parentView); + if (option.state & QStyle::State_Selected) { + painter->setOpacity(1); + framePen = QPen(pax.color(DPalette::Highlight), 2); + } + + painter->setPen(framePen); + painter->drawPath(path); + } + + // 判断状态 + const QStandardItemModel *model = qobject_cast(index.model()); + DStandardItem *modelItem = dynamic_cast(model->item(index.row())); + if (modelItem->checkState() & Qt::CheckState::Checked) { + // 计算区域 + QRect editIconRect = QRect(bgRect.right() - checkIconSize - 6, bgRect.top() + (bgRect.height() - checkIconSize) / 2, + checkIconSize, checkIconSize); + //QIcon icon(":/icons/deepin/builtin/ok.svg"); + //QIcon icon = QIcon::fromTheme("emblem-checked"); + //painter->drawPixmap(editIconRect, icon.pixmap(QSize(checkIconSize, checkIconSize))); + + // 设置模式 + QStyleOptionViewItem opt(option); + const QWidget *widget = option.widget; + QStyle *style = widget ? widget->style() : QApplication::style(); + + opt.rect = editIconRect; + opt.state = opt.state & ~QStyle::State_HasFocus; + opt.state |= QStyle::State_On; + + // 绘画对勾 + style->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &opt, painter, widget); + } + + painter->restore(); + } else { + DStyledItemDelegate::paint(painter, option, index); + } +} + +QSize EncodeDelegate::sizeHint(const QStyleOptionViewItem &option, + const QModelIndex &index) const +{ + Q_UNUSED(index) + + return QSize(option.rect.width() - 100, 60); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistview.h deepin-terminal-5.4.13/src/encodeplugin/encodelistview.h --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodelistview.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodelistview.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ENCODELISTVIEW_H +#define ENCODELISTVIEW_H + +#include "mainwindow.h" +#include +#include + +DWIDGET_USE_NAMESPACE + +// add by ut001121 zhangmeng 20200731 定义无效焦点原因 修复BUG40390 +#define INVALID_FOCUS_REASON Qt::MouseFocusReason + +#define ENCODE_COORDINATE_ERROR_Y 10 + +/******************************************************************************* + 1. @类名: EncodeListView + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class EncodeListModel; +class EncodeListView : public DListView +{ + Q_OBJECT + +public: + explicit EncodeListView(QWidget *parent = nullptr); + +protected: + /** + * @brief 处理焦点事件 + * @author ut001121 张猛 + * @param event 焦点事件 + */ + void focusInEvent(QFocusEvent *event) override; + /** + * @brief 处理焦点离开事件 + * @author ut001121 zhangmeng + * @param event 焦点离开事件 + */ + void focusOutEvent(QFocusEvent *event) override; + /** + * @brief 处理尺寸变化事件 + * @author ut001121 张猛 + * @param event 尺寸变化事件 + */ + void resizeEvent(QResizeEvent *event) override; + /** + * @brief 处理键盘事件 + * @author ut001121 张猛 + * @param 键盘事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 处理鼠标按下事件 + * @author ut001121 张猛 + */ + void mousePressEvent(QMouseEvent *) override; + /** + * @brief 处理鼠标抬起事件 + * @author ut001121 张猛 + */ + void mouseReleaseEvent(QMouseEvent *) override; + /** + * @brief 处理鼠标移动事件 + * @author ut001121 张猛 + */ + void mouseMoveEvent(QMouseEvent *) override; + +signals: + void focusOut(); + +public slots: + /** + * @brief 列表视图上单击响应函数 + * @author ut001121 zhangmeng + * @param index + */ + void onListViewClicked(const QModelIndex &index); + /** + * @brief 查询编码 + * @author ut001121 zhangmeng + * @param encode 编码 + */ + void checkEncode(QString encode); + /** add by ut001121 zhangmeng 20200718 for sp3 keyboard interaction*/ + inline Qt::FocusReason getFocusReason() {return m_foucusReason;} + +private: + /** + * @brief 初始化编码项 + * @author ut001121 zhangmeng + */ + void initEncodeItems(); + + MainWindow *m_Mainwindow = nullptr; + + EncodeListModel *m_encodeModel = nullptr; + + QStandardItemModel *m_standardModel = nullptr; + const int m_Space = 10; + const int m_ContentWidth = 240; + const int m_ItemWidth = 220; + const int m_ItemHeight = 60; + const int m_ListLenth = 1500; + + Qt::FocusReason m_foucusReason = INVALID_FOCUS_REASON; + QModelIndex m_modelIndexChecked; + + //记录触摸屏下点击时Y轴坐标 + int m_touchPressPosY = 0; + //记录触摸屏下滑动时Y轴移动最大距离 + int m_touchSlideMaxY = 0; +}; + +/******************************************************************************* + 1. @类名: EncodeDelegate + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class EncodeDelegate : public DStyledItemDelegate +{ +public: + explicit EncodeDelegate(QAbstractItemView *parent = nullptr) + : DStyledItemDelegate(parent), m_parentView(parent) {} + + /** + * @brief 自绘事件 + * @author ut001121 张猛 + * @param painter + * @param option + * @param index + */ + void paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index) const Q_DECL_OVERRIDE; + + /** + * @brief 尺寸提示 + * @author ut001121 zhangmeng + * @param option + * @param index + * @return + */ + QSize sizeHint(const QStyleOptionViewItem &option, + const QModelIndex &index) const Q_DECL_OVERRIDE; + +private: + QAbstractItemView *m_parentView = nullptr; +}; + +#endif // THEMELISTVIEW_H diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanel.cpp deepin-terminal-5.4.13/src/encodeplugin/encodepanel.cpp --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodepanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "encodepanel.h" + +#include "encodelistview.h" +#include "encodelistmodel.h" +#include "settings.h" + +#include +#include +#include + +EncodePanel::EncodePanel(QWidget *parent) + : RightPanel(parent), m_encodeView(new EncodeListView(this)) +{ + /******** Add by ut001000 renfeixiang 2020-08-14:增加 Begin***************/ + Utils::set_Object_Name(this); + m_encodeView->setObjectName("EncodeListView"); + /******** Add by ut001000 renfeixiang 2020-08-14:增加 End***************/ + setBackgroundRole(QPalette::Base); + setAutoFillBackground(true); + setFocusProxy(m_encodeView); + + QHBoxLayout *hLayout = new QHBoxLayout(); + hLayout->addWidget(m_encodeView); + + // init layout. + QVBoxLayout *layout = new QVBoxLayout(this); + /******** Modify by nt001000 renfeixiang 2020-05-16:解决Alt+F2显示Encode时,高度变长的问题 Begin***************/ + /*layout->addSpacing(10);增加的spacing会影响m_encodeView的高度*/ + layout->addLayout(hLayout); + layout->addStretch(); + layout->setMargin(0);//增加的Margin会影响m_encodeView的高度 + layout->setSpacing(0); + /******** Modify by nt001000 renfeixiang 2020-05-16:解决Alt+F2显示Encode时,高度变长的问题 Begin***************/ + + connect(m_encodeView, &EncodeListView::focusOut, this, &RightPanel::hideAnim); +} + +void EncodePanel::show() +{ + this->showAnim(); + + //解决Alt+F2显示Encode时,高度变长的问题 每次显示时,设置固定高度 Begin + m_encodeView->setFixedHeight(size().height()); + //解决Alt+F2显示Encode时,高度变长的问题 End +} + +void EncodePanel::updateEncode(QString encode) +{ + m_encodeView->checkEncode(encode); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanel.h deepin-terminal-5.4.13/src/encodeplugin/encodepanel.h --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodepanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ENCODEPANEL_H +#define ENCODEPANEL_H + +#include "rightpanel.h" + +/******************************************************************************* + 1. @类名: EncodePanel + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class EncodeListView; +class EncodePanel : public RightPanel +{ + Q_OBJECT +public: + explicit EncodePanel(QWidget *parent = nullptr); + /******** Add by nt001000 renfeixiang 2020-05-16:解决Alt+F2显示Encode时,高度变长的问题 Begin***************/ + /** + * @brief 处理显示(设置m_encodeView的大小) + * @author nt001000 renfeixiang + */ + void show(); + /******** Add by nt001000 renfeixiang 2020-05-16:解决Alt+F2显示Encode时,高度变长的问题 End***************/ + /******** Modify by ut000610 daizhengwen 2020-05-29: 根据焦点变换更新编码****************/ + /** + * @brief 更新编码 + * @author ut001121 zhangmeng + * @param encode 编码 + */ + void updateEncode(QString encode); + /********************* Modify by ut000610 daizhengwen End ************************/ + +signals: +private: + EncodeListView *m_encodeView = nullptr; +}; + +#endif // THEMEPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanelplugin.cpp deepin-terminal-5.4.13/src/encodeplugin/encodepanelplugin.cpp --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanelplugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodepanelplugin.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "encodepanelplugin.h" +#include "mainwindow.h" +#include "encodepanel.h" +#include "termwidgetpage.h" +#include "termwidget.h" +#include "settings.h" +#include "service.h" +#include "utils.h" + +#include + +#include + +EncodePanelPlugin::EncodePanelPlugin(QObject *parent) : MainWindowPluginInterface(parent) +{ + Utils::set_Object_Name(this); + m_pluginName = "Encoding"; +} + +void EncodePanelPlugin::initPlugin(MainWindow *mainWindow) +{ + m_mainWindow = mainWindow; +// initEncodePanel(); + connect(m_mainWindow, &MainWindow::showPluginChanged, this, &EncodePanelPlugin::slotShowPluginChanged); + connect(m_mainWindow, &MainWindow::quakeHidePlugin, this, &EncodePanelPlugin::slotQuakeHidePlugin); +} + +inline void EncodePanelPlugin::slotShowPluginChanged(const QString name) +{ + if (MainWindow::PLUGIN_TYPE_ENCODING != name) { + // 判断插件是否显示 + if (m_isShow) { + // 插件显示,则隐藏 + getEncodePanel()->hideAnim(); + m_isShow = false; + } + } else { + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,编码界面使用不方便,将雷神窗口变大适应正常的编码界面 Begin***************/ + if (m_mainWindow->isQuakeMode() && m_mainWindow->height() < LISTMINHEIGHT) { + //因为拉伸函数设置了FixSize,导致自定义界面弹出时死循环,然后崩溃的问题 + QuakeWindow *quakeWindow = qobject_cast(m_mainWindow); + if (nullptr == quakeWindow) + return; + quakeWindow->switchEnableResize(true); + m_mainWindow->resize(m_mainWindow->width(), LISTMINHEIGHT); //首先设置雷神界面的大小 + m_mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING);//重新打开编码界面,当前流程结束 + //窗口弹出后,重新判断雷神窗口是否需要有拉伸属性 + quakeWindow->switchEnableResize(); + return; + } + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,编码界面使用不方便,将雷神窗口变大适应正常的编码界面 End***************/ + getEncodePanel()->show(); + m_isShow = true; + // 先初始化列表后,才能设置焦点 + TermWidget *term = m_mainWindow->currentPage()->currentTerminal(); + setCurrentTermEncode(term); + } +} + +inline void EncodePanelPlugin::slotQuakeHidePlugin() +{ + getEncodePanel()->hide(); +} + +QAction *EncodePanelPlugin::titlebarMenu(MainWindow *mainWindow) +{ + QAction *switchThemeAction(new QAction("Switch Encoding", mainWindow)); + + connect(switchThemeAction, &QAction::triggered, mainWindow, [mainWindow]() { + mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + }); + + return switchThemeAction; +} + +EncodePanel *EncodePanelPlugin::getEncodePanel() +{ + if (nullptr == m_encodePanel) + initEncodePanel(); + return m_encodePanel; +} + +void EncodePanelPlugin::initEncodePanel() +{ + m_encodePanel = new EncodePanel(m_mainWindow->centralWidget()); + connect(Service::instance(), &Service::currentTermChange, m_encodePanel, [ = ](QWidget * term) { + TermWidget *pterm = m_mainWindow->currentPage()->currentTerminal(); + // 列表显示时,切换了当前终端 + // 判断是否是当前页的term + if (!m_encodePanel->isHidden() && pterm == term) { + TermWidget *curterm = qobject_cast(term); + setCurrentTermEncode(curterm); + } + }); +} + +void EncodePanelPlugin::setCurrentTermEncode(TermWidget *term) +{ + QString encode; + // 是否连接远程 + if (term->isConnectRemote()) { + // 远程编码 + encode = term->RemoteEncode(); + } else { + // 终端编码 + encode = term->encode(); + } + + //更新编码 + qInfo() << __FUNCTION__ << term->isConnectRemote() << encode; + m_encodePanel->updateEncode(encode); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanelplugin.h deepin-terminal-5.4.13/src/encodeplugin/encodepanelplugin.h --- deepin-terminal-5.0.0+ds1/src/encodeplugin/encodepanelplugin.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/encodeplugin/encodepanelplugin.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef ENCODEPANELPLUGIN_H +#define ENCODEPANELPLUGIN_H + +#include "mainwindowplugininterface.h" +#include "encodepanel.h" +#include "termwidget.h" + +#include + +/******************************************************************************* + 1. @类名: EncodePanelPlugin + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class MainWindow; +class TermWidget; +class EncodePanelPlugin : public MainWindowPluginInterface +{ + Q_OBJECT +public: + explicit EncodePanelPlugin(QObject *parent = nullptr); + + /** + * @brief 初始化编码插件 + * @author ut001121 zhangmeng + * @param mainWindow + */ + void initPlugin(MainWindow *mainWindow) override; + /** + * @brief 标题菜单 + * @author ut001121 zhangmeng + * @param mainWindow + * @return + */ + QAction *titlebarMenu(MainWindow *mainWindow) override; + + /** + * @brief 获取编码面板 + * @author ut001121 zhangmeng + * @return + */ + EncodePanel *getEncodePanel(); + /** + * @brief 初始化编码面板 + * @author ut001121 zhangmeng + */ + void initEncodePanel(); + /** + * @brief 设置当前终端的编码 + * @author ut001121 zhangmeng + * @param term + */ + inline void setCurrentTermEncode(TermWidget *term); + +private slots: + void slotShowPluginChanged(const QString name); + void slotQuakeHidePlugin(); + +private: + MainWindow *m_mainWindow = nullptr; + EncodePanel *m_encodePanel = nullptr; +}; + +#endif // THEMEPANELPLUGIN_H diff -Nru deepin-terminal-5.0.0+ds1/src/environments.h.in deepin-terminal-5.4.13/src/environments.h.in --- deepin-terminal-5.0.0+ds1/src/environments.h.in 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/environments.h.in 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef __ENVIRONMENTS_H_ +#define __ENVIRONMENTS_H_ + +#define VERSION "@VERSION@" + +#endif // __ENVIRONMENTS_H_ diff -Nru deepin-terminal-5.0.0+ds1/src/main/dbusmanager.cpp deepin-terminal-5.4.13/src/main/dbusmanager.cpp --- deepin-terminal-5.0.0+ds1/src/main/dbusmanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/dbusmanager.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer:daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "dbusmanager.h" +#include "utils.h" + +#include +#include +#include +#include +#include +#include +#include + +DBusManager::DBusManager() +{ + Utils::set_Object_Name(this); +} + +DBusManager::~DBusManager() +{ + // 注销时结束连接dbus + QDBusConnection conn = QDBusConnection::sessionBus(); + if (conn.registerService(TERMINALSERVER)) { + conn.unregisterService(TERMINALSERVER); + qInfo() << "Terminal DBus disconnected!"; + } +} + +bool DBusManager::initDBus() +{ + //用于雷神窗口通信的DBus + QDBusConnection conn = QDBusConnection::sessionBus(); + + if (!conn.registerService(TERMINALSERVER)) { + qInfo() << "Terminal DBus has connected!"; + return false; + } + + if (!conn.registerObject(TERMINALINTERFACE, this, QDBusConnection::ExportAllSlots)) { + qInfo() << "Terminal DBus creates Object failed!"; + return false; + } + + return true; +} + +int DBusManager::callKDECurrentDesktop() +{ + QDBusMessage msg = + QDBusMessage::createMethodCall(KWINDBUSSERVICE, KWINDBUSPATH, KWINDBUSSERVICE, "currentDesktop"); + + QDBusMessage response = QDBusConnection::sessionBus().call(msg); + if (response.type() == QDBusMessage::ReplyMessage) { + qInfo() << "call currentDesktop Success!"; + QList list = response.arguments(); + return list.value(0).toInt(); + } + + qInfo() << "call currentDesktop Fail!" << response.errorMessage(); + return -1; +} + +void DBusManager::callKDESetCurrentDesktop(int index) +{ + QDBusMessage msg = + QDBusMessage::createMethodCall(KWINDBUSSERVICE, KWINDBUSPATH, KWINDBUSSERVICE, "setCurrentDesktop"); + + msg << index; + + QDBusMessage response = QDBusConnection::sessionBus().call(msg); + if (response.type() == QDBusMessage::ReplyMessage) + qInfo() << "call setCurrentDesktop Success!"; + else + qInfo() << "call setCurrentDesktop Fail!" << response.errorMessage(); +} + +QStringList DBusManager::callAppearanceFont(QString fontType) +{ + QStringList fontList; + QDBusMessage msg = + QDBusMessage::createMethodCall(APPEARANCESERVICE, APPEARANCEPATH, APPEARANCESERVICE, "List"); + + msg << fontType; + + QDBusMessage response = QDBusConnection::sessionBus().call(msg); + if (QDBusMessage::ReplyMessage == response.type()) { + qInfo() << "call List Success!"; + QList list = response.arguments(); + QString fonts = list.value(list.count() - 1).toString(); + // 原本的返回值为QDBusPendingReply => QString + fonts.replace("[", ""); + fonts.replace("]", ""); + fonts.replace("\"", ""); + // 用逗号分隔 + fontList = fonts.split(","); + fontList = callAppearanceShowFont(fontList, fontType); + } else { + qInfo() << "call List Fail!" << response.errorMessage(); + } + return fontList; +} + +/******** Add by ut001000 renfeixiang 2020-06-16:增加 调用DBUS的show获取的等宽字体,并转换成QStringList Begin***************/ +QStringList DBusManager::converToList(const QString &type, const QJsonArray &array) +{ + QStringList list; + for (int i = 0; i != array.size(); i++) { + QJsonObject object = array.at(i).toObject(); + object.insert("type", QJsonValue(type)); + list.append(object["Name"].toString()); + } + return list; +} + +QStringList DBusManager::callAppearanceShowFont(QStringList fontList, QString fontType) +{ + QStringList List; + QDBusMessage msg = + QDBusMessage::createMethodCall(APPEARANCESERVICE, APPEARANCEPATH, APPEARANCESERVICE, "Show"); + + msg << fontType << fontList; + QDBusMessage response = QDBusConnection::sessionBus().call(msg); + if (response.type() == QDBusMessage::ReplyMessage) { + qInfo() << "call Show Success!"; + QList list = response.arguments(); + QString fonts = list.takeFirst().toString(); + QJsonArray array = QJsonDocument::fromJson(fonts.toLocal8Bit().data()).array(); + + List = converToList(fontType, array); + qInfo() << "Show value" << List; + } else { + qInfo() << "call Show Fail!" << response.errorMessage(); + } + return List; +} +/******** Add by ut001000 renfeixiang 2020-06-16:增加 调用DBUS的show获取的等宽字体,并转换成QStringList End***************/ +void DBusManager::callTerminalEntry(QStringList args) +{ + QDBusMessage msg = + QDBusMessage::createMethodCall(TERMINALSERVER, TERMINALINTERFACE, TERMINALSERVER, "entry"); + + msg << args; + + QDBusMessage response = QDBusConnection::sessionBus().call(msg, QDBus::NoBlock); + if (response.type() == QDBusMessage::ReplyMessage) + qInfo() << "call callTerminalEntry Success!"; + else + qInfo() << "call callTerminalEntry!" << response.errorMessage(); +} + +void DBusManager::entry(QStringList args) +{ + emit entryArgs(args); +} + +void DBusManager::callSystemSound(const QString &sound) +{ + QDBusMessage response = dbusPlaySound(sound); + if (response.type() == QDBusMessage::ReplyMessage) + qInfo() << "call dbusPlaySound Success!"; + else + qInfo() << "call dbusPlaySound!" << response.errorMessage(); +} + +void DBusManager::listenTouchPadSignal() +{ + // 注册监听触控板事件 + bool isConnect = QDBusConnection::systemBus().connect(GESTURE_SERVICE, GESTURE_PATH, GESTURE_INTERFACE, GESTURE_SIGNAL, Service::instance(), SIGNAL(touchPadEventSignal(QString, QString, int))); + if (isConnect) + qInfo() << "connect to Guest, listen touchPad!"; + else + qInfo() << "disconnect to Guest, cannot listen touchPad!"; +} + +void DBusManager::listenDesktopSwitched() +{ + // 注册监听桌面工作区切换 + bool isConnect = QDBusConnection::sessionBus().connect(WM_SERVICE, WM_PATH, WM_INTERFACE, WM_WORKSPACESWITCHED, Service::instance(), SLOT(onDesktopWorkspaceSwitched(int, int))); + if (isConnect) + qInfo() << "connect to wm, listen workspaceswitched"; + else + qInfo() << "disconnect to wm,cannot listen workspaceswitched"; +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/dbusmanager.h deepin-terminal-5.4.13/src/main/dbusmanager.h --- deepin-terminal-5.0.0+ds1/src/main/dbusmanager.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/dbusmanager.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer:daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DBUSMANAGER_H +#define DBUSMANAGER_H +#include "service.h" + +#include +#include +#include + +// deepin-terminal +#define TERMINALSERVER "com.deepin.terminal.reborn" +#define TERMINALINTERFACE "/window" + +// kwin dbus +#define KWINDBUSSERVICE "org.kde.KWin" +#define KWINDBUSPATH "/KWin" + +// deepin Appearance +#define APPEARANCESERVICE "com.deepin.daemon.Appearance" +#define APPEARANCEPATH "/com/deepin/daemon/Appearance" + +// sound effect 音效服务 +#define SOUND_EFFECT_SERVICE "com.deepin.daemon.SoundEffect" +#define SOUND_EFFECT_PATH "/com/deepin/daemon/SoundEffect" +#define SOUND_EFFECT_INTERFACE "com.deepin.daemon.SoundEffect" +#define SOUND_EFFECT_METHOD(method) QDBusMessage::createMethodCall(SOUND_EFFECT_SERVICE, SOUND_EFFECT_PATH, SOUND_EFFECT_INTERFACE, (method)) + +// gesture 触控板手势 +#define GESTURE_SERVICE "com.deepin.daemon.Gesture" +#define GESTURE_PATH "/com/deepin/daemon/Gesture" +#define GESTURE_INTERFACE "com.deepin.daemon.Gesture" +#define GESTURE_SIGNAL "Event" + +// deepin wm 窗管 +#define WM_SERVICE "com.deepin.wm" +#define WM_PATH "/com/deepin/wm" +#define WM_INTERFACE "com.deepin.wm" +#define WM_WORKSPACESWITCHED "WorkspaceSwitched" + +#define dbusPlaySound(sound) QDBusConnection::sessionBus().call(SOUND_EFFECT_METHOD("PlaySound")<<(sound)) +#define dbusIsSoundEnabled(sound) QDBusConnection::sessionBus().call(SOUND_EFFECT_METHOD("IsSoundEnabled")<<(sound)) +#define dbusEnableSound(sound, enable) QDBusConnection::sessionBus().call(SOUND_EFFECT_METHOD("EnableSound")<<(sound)<<(enable)) + +/******************************************************************************* + 1. @类名: DBusManager + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class DBusManager : public QObject +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", TERMINALSERVER) +public: + DBusManager(); + ~DBusManager(); + /** + * @brief 初始化terminal相关dbus + * @author ut000610 戴正文 + * @return + */ + bool initDBus(); + + // kwin dbus + /** + * @brief 获取当前桌面index + * @author ut000610 戴正文 + * @return + */ + static int callKDECurrentDesktop(); + /** + * @brief 将桌面跳转到index所指桌面 + * @author ut000610 戴正文 + * @param index + */ + static void callKDESetCurrentDesktop(int index); + + // Appearance + /** + * @brief 获取字体列表,输入参数后获取得到的参数列表 + * @author ut000610 戴正文 + * @param fontType 字体类型 + * @return + */ + static QStringList callAppearanceFont(QString fontType); + + /******** Add by ut001000 renfeixiang 2020-06-16:增加 调用DBUS的show获取的等宽字体,并转换成QStringList Begin***************/ + //将QJsonArray文件转换成QStringList + /** + * @brief 将QJsonArray文件转换成QStringList + * @author ut001000 任飞翔 + * @param type + * @param array + * @return + */\ + static QStringList converToList(const QString &type, const QJsonArray &array); + //调用DBUS的SHow方法 + /** + * @brief 调用DBUS的SHow方法 + * @author ut001000 任飞翔 + * @param fontList 字体列表 + * @param fontType 字体类型 + * @return + */ + static QStringList callAppearanceShowFont(QStringList fontList, QString fontType); + /******** Add by ut001000 renfeixiang 2020-06-16:增加 调用DBUS的show获取的等宽字体,并转换成QStringList End***************/ + + // deepin terminal + // 创建窗口 + /** + * @brief 调用主进程的创建或显示窗口入口 + * @author ut000610 戴正文 + * @param args + */ + static void callTerminalEntry(QStringList args); + + + /** add by ut001121 zhangmeng 20200720 用于 sp3 键盘交互功能*/ + /** + * @brief 调用系统音效 + * @author ut001121 张猛 + * @param sound 音效名称 + 错误提示:dialog-error + 通 知:message + 唤 醒:suspend-resume + 音量调节:audio-volume-change + 设备接入:device-added + 设备拔出:device-removed + */ + static void callSystemSound(const QString &sound = "dialog-error"); + + /** + * @brief 监听触控板事件 + * @author ut000610 戴正文 + */ + void listenTouchPadSignal(); + /** + * @brief 监听桌面(工作区切换) + * @author ut000610 戴正文 + */ + void listenDesktopSwitched(); + +public slots: + /** + * @brief dbus上开放的槽函数,用于调用service的Entry接口 + * @author ut000610 戴正文 + * @param args + */ + void entry(QStringList args); + +signals: + // 该信号由Service在main入口中使用 + void entryArgs(QStringList args); +}; + +#endif // DBUSMANAGER_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/main.cpp deepin-terminal-5.4.13/src/main/main.cpp --- deepin-terminal-5.0.0+ds1/src/main/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/main.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mainwindow.h" +#include "environments.h" +#include "dbusmanager.h" +#include "service.h" +#include "utils.h" +#include "terminalapplication.h" +#include "define.h" + + +#include +#include +#include + +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +DCORE_USE_NAMESPACE + +int main(int argc, char *argv[]) +{ + if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) { + setenv("XDG_CURRENT_DESKTOP", "Deepin", 1); + } + // 应用计时 + QTime useTime; + useTime.start(); + //为了更精准,起动就度量时间 + qint64 startTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + + // 启动应用 + TerminalApplication app(argc, argv); + app.setStartTime(startTime); + DApplicationSettings set(&app); + + // 系统日志 + DLogManager::registerConsoleAppender(); + DLogManager::registerFileAppender(); + + // 参数解析 + TermProperties properties; + Utils::parseCommandLine(app.arguments(), properties, true); + + DBusManager manager; + if (!manager.initDBus()) { + // 非第一次启动 + QStringList args = app.arguments(); + if(args.contains("-w") || args.contains("--work-directory")) { + + } else { + args += "-w"; + args += QDir::currentPath(); + } + DBusManager::callTerminalEntry(args); + return 0; + } + // 第一次启动 + // 这行不要删除 + qputenv("TERM", "xterm-256color"); + // 首次启动 + QObject::connect(&manager, &DBusManager::entryArgs, Service::instance(), &Service::Entry); + Service::instance()->EntryTerminal(app.arguments()); + // 监听触控板事件 + manager.listenTouchPadSignal(); + + return app.exec(); +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/mainwindow.cpp deepin-terminal-5.4.13/src/main/mainwindow.cpp --- deepin-terminal-5.0.0+ds1/src/main/mainwindow.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/mainwindow.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,3168 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mainwindow.h" +#include "mainwindowplugininterface.h" +#include "settings.h" +#include "shortcutmanager.h" +#include "tabbar.h" +#include "termproperties.h" +#include "termwidgetpage.h" +#include "termwidget.h" +#include "titlebar.h" +#include "encodepanelplugin.h" +#include "customcommandplugin.h" +#include "serverconfigmanager.h" +#include "utils.h" +#include "dbusmanager.h" +#include "windowsmanager.h" +#include "service.h" +#include "terminalapplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using std::ifstream; +using std::ofstream; + +/******** Add by ut001000 renfeixiang 2020-08-07:将最小宽度和高度设置成全局变量***************/ +const int MainWindow::m_MinWidth = 450; +const int MainWindow::m_MinHeight = 250; + +DWIDGET_USE_NAMESPACE + +// 定义雷神窗口边缘,接近边缘光标变化图标 +#define QUAKE_EDGE 5 + +SwitchThemeMenu::SwitchThemeMenu(const QString &title, QWidget *parent): QMenu(title, parent) +{ +} + +void SwitchThemeMenu::leaveEvent(QEvent *) +{ + //鼠标停靠悬浮判断 + bool ishover = this->property("hover").toBool(); + if (!ishover) + emit mainWindowCheckThemeItemSignal(); +} + +void SwitchThemeMenu::hideEvent(QHideEvent *) +{ + hoveredThemeStr = ""; + emit menuHideSetThemeSignal(); +} + +void SwitchThemeMenu::enterEvent(QEvent *event) +{ + hoveredThemeStr = ""; + return QMenu::enterEvent(event); +} + +void SwitchThemeMenu::keyPressEvent(QKeyEvent *event) +{ + //fix bug#64969主题中点击tab键不可以切换主题 + //内置主题屏蔽 除了 上下左右回车键的其他按键响应 处理bug#53439 + if (event->key() != Qt::Key_Space) { + emit mainWindowCheckThemeItemSignal(); + return QMenu::keyPressEvent(event); + } +} + +MainWindow::MainWindow(TermProperties properties, QWidget *parent) + : DMainWindow(parent) + , m_menu(new QMenu(this)) + , m_tabbar(nullptr) + , m_centralWidget(new QWidget(this)) + , m_centralLayout(new QVBoxLayout(m_centralWidget)) + , m_termStackWidget(new QStackedWidget) + , m_properties(properties) + , m_isQuakeWindow(properties[QuakeMode].toBool()) + , m_winInfoConfig(new QSettings(getWinInfoConfigPath(), QSettings::IniFormat, this)) +{ + /******** Add by ut001000 renfeixiang 2020-08-13:增加 Begin***************/ + m_menu->setObjectName("MainWindowQMenu"); + m_centralWidget->setObjectName("MainWindowCentralQWidget"); + m_centralLayout->setObjectName("MainWindowCentralLayout"); + m_termStackWidget->setObjectName("MainWindowTermQStackedWidget"); + m_winInfoConfig->setObjectName("MainWindowWindowQSettings"); + /******** Add by ut001000 renfeixiang 2020-08-13:增加 End***************/ + static int id = 0; + m_MainWindowID = ++id; + if (0 == m_ReferedAppStartTime) { + // 主进程的启动时间存在APP中 + TerminalApplication *app = static_cast(qApp); + m_ReferedAppStartTime = app->getStartTime(); + qInfo() << "[main app] Start Time = " + << QDateTime::fromMSecsSinceEpoch(m_ReferedAppStartTime).toString("yyyy-MM-dd hh:mm:ss:zzz"); + } else { + qInfo() << "[sub app] Start Time = " + << QDateTime::fromMSecsSinceEpoch(m_ReferedAppStartTime).toString("yyyy-MM-dd hh:mm:ss:zzz"); + } + m_CreateWindowTime = Service::instance()->getEntryTime(); + qInfo() << "MainWindow Create Time = " + << QDateTime::fromMSecsSinceEpoch(m_CreateWindowTime).toString("yyyy-MM-dd hh:mm:ss:zzz"); +} + +void MainWindow::initUI() +{ + initWindow(); + // Plugin may need centralWidget() to work so make sure initPlugin() is after setCentralWidget() + // Other place (eg. create titlebar menu) will call plugin method so we should create plugins before init other + // parts. + initPlugins(); + initTabBar(); + initTitleBar(); + initWindowAttribute(); + initFileWatcher(); + + qApp->installEventFilter(this); +} + +void MainWindow::initWindow() +{ +//开启特效后,拉长到17114会有窗口变黑的情况,非终端问题,故注释相关代码 +// QDesktopWidget *desktopWidget = QApplication::desktop(); +// QRect screenRect = desktopWidget->screenGeometry(); //获取设备屏幕大小 +// + setAttribute(Qt::WA_TranslucentBackground); + setMinimumSize(m_MinWidth, m_MinHeight); +// //设置一个最大的窗口宽度,防止窗口可以被无限拉长 +// setMaximumWidth(screenRect.width()); + setEnableBlurWindow(Settings::instance()->backgroundBlur()); + setWindowIcon(QIcon::fromTheme("deepin-terminal")); + + // Init layout + m_centralLayout->setMargin(0); + m_centralLayout->setSpacing(0); + m_centralLayout->addWidget(m_termStackWidget); + setCentralWidget(m_centralWidget); +} + +inline void MainWindow::slotTabBarClicked(int index, QString tabIdentifier) +{ + //DTabBar在左右移动时右侧会出现空白,点击会导致crash,这里加个判断防止index出现非法的情况 + if (index < 0) + return; + + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(index)); + TermWidget *term = tabPage->currentTerminal(); + bool bIdle = !(term->hasRunningProcess()); + + if (bIdle && isTabChangeColor(tabIdentifier)) { + m_tabVisitMap.insert(tabIdentifier, true); + m_tabChangeColorMap.insert(tabIdentifier, false); + m_tabbar->removeNeedChangeTextColor(tabIdentifier); + } +} + +inline void MainWindow::slotTabCurrentChanged(int index) +{ + focusPage(m_tabbar->identifier(index)); +} + +inline void MainWindow::slotTabAddRequested() +{ + createNewTab(); +} + +inline void MainWindow::slotTabCloseRequested(int index) +{ + + closeTab(m_tabbar->identifier(index)); +} + +inline void MainWindow::slotMenuCloseTab(QString Identifier) +{ + closeTab(Identifier); +} + +// TAB菜单发来的关闭其它窗口请求,需要逐一关闭 +inline void MainWindow::slotMenuCloseOtherTab(QString Identifier) +{ + closeOtherTab(Identifier); +} + +inline void MainWindow::slotShowRenameTabDialog(QString Identifier) +{ + // 获取标签选中的tab对应的标签标题 + getPageByIdentifier(Identifier)->showRenameTitleDialog(); +} + +void MainWindow::initTabBar() +{ + m_tabbar = new TabBar(this); + m_tabbar->setFocusPolicy(Qt::NoFocus); + + connect(m_tabbar, &TabBar::tabBarClicked, this, &MainWindow::slotTabBarClicked); + + // 点击TAB上页触发 + connect(m_tabbar, &DTabBar::currentChanged, this, &MainWindow::slotTabCurrentChanged, Qt::QueuedConnection); + + // 点击TAB上的"+"触发 + connect(m_tabbar, &DTabBar::tabAddRequested, this, &MainWindow::slotTabAddRequested, Qt::QueuedConnection); + + // 点击TAB上的"X"触发 + connect(m_tabbar, &DTabBar::tabCloseRequested, this, &MainWindow::slotTabCloseRequested, Qt::QueuedConnection); + + // TAB菜单发来的关闭请求 + connect(m_tabbar, &TabBar::menuCloseTab, this, &MainWindow::slotMenuCloseTab); + + // TAB菜单发来的关闭其它窗口请求,需要逐一关闭 + connect(m_tabbar, &TabBar::menuCloseOtherTab, this, &MainWindow::slotMenuCloseOtherTab); + + connect(m_tabbar, &TabBar::showRenameTabDialog, this, &MainWindow::slotShowRenameTabDialog); + + // 如果此时是拖拽的窗口,暂时先不添加tab(默认添加tab后会新建工作区) + // 需要使用拖入/拖出标签对应的那个TermWidgetPage控件 + if (m_properties[DragDropTerminal].toBool()) + return; + + addTab(m_properties); +} + +inline void MainWindow::slotOptionButtonPressed() +{ + showPlugin(PLUGIN_TYPE_NONE); + // 判断是否超过最大数量限制 + QList actionList = m_menu->actions(); + for (auto item : actionList) { + if (tr("New window") == item->text()) { + // 菜单根据数量自动设置true or false + item->setEnabled(Service::instance()->isCountEnable()); + } + } + + //选中当前的主题项 + checkThemeItem(); +} + +inline void MainWindow::slotClickNewWindowTimeout() +{ + // 创建新的窗口 + qInfo() << "menu click new window"; + + TermWidgetPage *tabPage = currentPage(); + TermWidget *term = tabPage->currentTerminal(); + QString currWorkingDir = term->workingDirectory(); + emit newWindowRequest(currWorkingDir); +} + +inline void MainWindow::slotNewWindowActionTriggered() +{ + // 等待菜单消失 此处影响菜单创建窗口的性能 + m_createTimer->start(50); +} + +void MainWindow::initOptionButton() +{ + // 全屏退出按钮 + // DTK的全屏按钮不能满足UI要求,隐去DTK最右侧的全屏 + QWidget *dtkbutton = titlebar()->findChild("DTitlebarDWindowQuitFullscreenButton"); + if (dtkbutton != nullptr) + dtkbutton->hide(); + else + qInfo() << "can not found DTitlebarDWindowQuitFullscreenButton in DTitlebar"; + + // option button + DIconButton *optionBtn = titlebar()->findChild("DTitlebarDWindowOptionButton"); + if (optionBtn != nullptr) { + // mainwindow的设置按钮触发 + connect(titlebar()->findChild("DTitlebarDWindowOptionButton"), &DIconButton::pressed, this, &MainWindow::slotOptionButtonPressed); + } else { + qInfo() << "can not found DTitlebarDWindowOptionButton in DTitlebar"; + } +} + +void MainWindow::initOptionMenu() +{ + titlebar()->setMenu(m_menu); + /******** Modify by m000714 daizhengwen 2020-04-03: 新建窗口****************/ + // 防止创建新窗口的action被多次触发 + m_createTimer = new QTimer(this); + // 设置定时器,等待菜单消失,触发一次,防止多次被触发 + m_createTimer->setSingleShot(true); + QAction *newWindowAction(new QAction(tr("New window"), this)); + connect(m_createTimer, &QTimer::timeout, this, &MainWindow::slotClickNewWindowTimeout); + connect(newWindowAction, &QAction::triggered, this, &MainWindow::slotNewWindowActionTriggered); + m_menu->addAction(newWindowAction); + /********************* Modify by m000714 daizhengwen End ************************/ + for (auto &plugin : m_plugins) { + QAction *pluginMenu = plugin->titlebarMenu(this); + // 取消Encoding插件的菜单展示 + if (plugin->getPluginName() == PLUGIN_TYPE_ENCODING) + continue; + + if (pluginMenu) + m_menu->addAction(pluginMenu); + } + + QAction *settingAction(new QAction(tr("Settings"), this)); + m_menu->addAction(settingAction); + m_menu->addSeparator(); + + //禁掉dtk主题菜单 + titlebar()->setSwitchThemeMenuVisible(false); + //增加主题菜单 + addThemeMenuItems(); + + connect(settingAction, &QAction::triggered, Service::instance(), &Service::slotShowSettingsDialog); +} + +inline void MainWindow::slotFileChanged() +{ + QFileSystemWatcher *fileWatcher = qobject_cast(sender()); + if (nullptr == fileWatcher) + return; + emit Service::instance()->hostnameChanged(); + //这句话去了之后filechanged信号只能触发一次 + fileWatcher->addPath(HOSTNAME_PATH); +} + +void MainWindow::initFileWatcher() +{ + QFileSystemWatcher *fileWatcher = new QFileSystemWatcher(this); + fileWatcher->addPath(HOSTNAME_PATH); + //bug 53565 ut000442 hostname被修改后,全部窗口触发一次修改标题 + connect(fileWatcher, &QFileSystemWatcher::fileChanged, this, &MainWindow::slotFileChanged); +} + +void MainWindow::initPlugins() +{ + // Todo: real plugin loader and plugin support. + // ThemePanelPlugin *testPlugin = new ThemePanelPlugin(this); + // testPlugin->initPlugin(this); + EncodePanelPlugin *encodePlugin = new EncodePanelPlugin(this); + encodePlugin->initPlugin(this); + + customCommandPlugin = new CustomCommandPlugin(this); + customCommandPlugin->initPlugin(this); + + remoteManagPlugin = new RemoteManagementPlugin(this); + remoteManagPlugin->initPlugin(this); + + m_plugins.append(encodePlugin); + m_plugins.append(customCommandPlugin); + m_plugins.append(remoteManagPlugin); +} + +MainWindow::~MainWindow() +{ +} + +void MainWindow::setDefaultLocation() +{ + resize(WINDOW_DEFAULT_SIZE); + singleFlagMove(); +} + +void MainWindow::singleFlagMove() +{ + if (m_properties[SingleFlag].toBool()) { + Dtk::Widget::moveToCenter(this); + qInfo() << "SingleFlag move" ; + } +} + +bool MainWindow::isTabVisited(const QString &tabIdentifier) +{ + return m_tabVisitMap.value(tabIdentifier); +} + +bool MainWindow::isTabChangeColor(const QString &tabIdentifier) +{ + return m_tabChangeColorMap.value(tabIdentifier); +} + +void MainWindow::addTab(TermProperties properties, bool activeTab) +{ + qint64 startTime = QDateTime::currentMSecsSinceEpoch(); + //如果不允许新建标签,则返回 + if (!beginAddTab()) + return; + + TermWidgetPage *termPage = new TermWidgetPage(properties, this); + + // pageID存在 tab中,所以page增删改操作都要由tab发起。 + int index = m_tabbar->addTab(termPage->identifier(), termPage->getCurrentTerminalTitle()); + qInfo() << "addTab index" << index; + endAddTab(termPage, activeTab, index, startTime); +} + +void MainWindow::addTabWithTermPage(const QString &tabName, bool activeTab, bool isVirtualAdd, TermWidgetPage *page, int insertIndex) +{ + qint64 startTime = QDateTime::currentMSecsSinceEpoch(); + //如果不允许新建标签,则返回 + if (!beginAddTab()) + return; + + TermWidgetPage *termPage = page; + + if (-1 == insertIndex) + insertIndex = m_tabbar->currentIndex() + 1; + + // pageID存在 tab中,所以page增删改操作都要由tab发起。 + int index = m_tabbar->insertTab(insertIndex, page->identifier(), tabName); + m_tabbar->setTabText(termPage->identifier(), tabName); + qInfo() << "insertTab index" << index; + + //拖拽过程中存在一种标签预览模式,此时不需要真实添加 + if (!isVirtualAdd) { + termPage->setParentMainWindow(this); + endAddTab(termPage, activeTab, index, startTime); + } +} + +bool MainWindow::beginAddTab() +{ + /***add by ut001121 zhangmeng 修复BUG#24452 点击“+”按钮新建工作区,自定义命令/编码/远程管理插件未消失***/ + showPlugin(PLUGIN_TYPE_NONE); + + if (WindowsManager::instance()->widgetCount() >= MAXWIDGETCOUNT) { + // 没有雷神,且是雷神让通过,不然不让通过 + if (!(nullptr == WindowsManager::instance()->getQuakeWindow() && m_isQuakeWindow)) { + // 非雷神窗口不得超过MAXWIDGETCOUNT + qInfo() << "addTab failed, can't create number more than " << MAXWIDGETCOUNT; + return false; + } + } + + return true; +} + +inline void MainWindow::slotLastTermClosed(const QString &identifier) +{ + closeTab(identifier); +} + +void MainWindow::endAddTab(TermWidgetPage *termPage, bool activeTab, int index, qint64 startTime) +{ + setNewTermPage(termPage, activeTab); + + if (activeTab) + m_tabbar->setCurrentIndex(index); + + TermWidget *term = termPage->currentTerminal(); + m_tabbar->saveSessionIdWithTabIndex(term->getSessionId(), index); + m_tabbar->saveSessionIdWithTabId(term->getSessionId(), termPage->identifier()); + connect(termPage, &TermWidgetPage::termTitleChanged, this, &MainWindow::onTermTitleChanged); + connect(termPage, &TermWidgetPage::lastTermClosed, this, &MainWindow::slotLastTermClosed); + + connect(this, &MainWindow::showPluginChanged, termPage, &TermWidgetPage::slotShowPluginChanged); + + // 快速隐藏搜索框 + connect(this, &MainWindow::quakeHidePlugin, termPage, &TermWidgetPage::slotQuakeHidePlugin); + + connect(termPage->currentTerminal(), &TermWidget::termIsIdle, this, &MainWindow::onTermIsIdle); + qint64 endTime = QDateTime::currentMSecsSinceEpoch(); + QString strNewTabTime = GRAB_POINT + LOGO_TYPE + CREATE_NEW_TAB_TIME + QString::number(endTime - startTime); + qInfo() << qPrintable(strNewTabTime); + + QString expandThemeStr = ""; + expandThemeStr = Settings::instance()->extendColorScheme(); + if (!expandThemeStr.isEmpty()) + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); +} + +bool MainWindow::hasRunningProcesses() +{ + for (int i = 0, count = m_termStackWidget->count(); i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + if(!tabPage) + continue; + /******** Modify by nt001000 renfeixiang 2020-05-28:修改 判断当前tab中是否有其它分屏正在执行 bug#28910 Begin***************/ + //没有校验当前tab中是否有其它正在执行的分屏 + if (tabPage->runningTerminalCount() != 0) { + /******** Modify by nt001000 renfeixiang 2020-05-28:修改 判断当前tab中是否有其它分屏正在执行 End***************/ + qInfo() << "here are processes running in this terminal tab... " << tabPage->identifier() << endl; + return true; + } else { + qInfo() << "no processes running in this terminal tab... " << tabPage->identifier() << endl; + } + } + + return false; +} + +void MainWindow::closeTab(const QString &identifier, bool hasConfirmed) +{ + /***add by ut001121 zhangmeng 20200508 修复BUG#24457 点击标签栏“x”按钮,右键菜单关闭工作区,关闭其它工作区,自定义命令/编码/远程管理插件未消失***/ + showPlugin(PLUGIN_TYPE_NONE); + + TermWidgetPage *tabPage = getPageByIdentifier(identifier); + if (nullptr == tabPage) + return; + + // 关闭前必须要切换过去先 + if (m_tabbar->currentIndex() != m_tabbar->getIndexByIdentifier(identifier)) + m_tabbar->setCurrentIndex(m_tabbar->getIndexByIdentifier(identifier)); + + // 默认每个窗口关闭都提示一次. + if (!hasConfirmed && tabPage->runningTerminalCount() != 0) { + showExitConfirmDialog(Utils::CloseType_Tab, tabPage->runningTerminalCount(), this); + return; + } + qInfo() << "Tab closed" << identifier; + m_tabVisitMap.remove(identifier); + m_tabChangeColorMap.remove(identifier); + m_tabbar->removeTab(identifier); + m_termStackWidget->removeWidget(tabPage); + tabPage->deleteLater(); + + /******** Add by ut001000 renfeixiang 2020-08-07:关闭tab时改变大小,bug#41436***************/ + updateMinHeight(); + + if (m_tabbar->count() != 0) { + updateTabStatus(); + focusCurrentPage(); + return; + } + qInfo() << "mainwindow close"; + close(); +} + +TermWidgetPage *MainWindow::getTermPage(const QString &identifier) +{ + return m_termWidgetPageMap.value(identifier); +} + +void MainWindow::removeTermWidgetPage(const QString &identifier, bool isDelete) +{ + if (m_termWidgetPageMap.contains(identifier)) { + TermWidgetPage *termPage = m_termWidgetPageMap.value(identifier); + m_termStackWidget->removeWidget(termPage); + m_termWidgetPageMap.remove(identifier); + if (isDelete) + delete termPage; + } + + // 当所有tab标签页都关闭时,关闭整个MainWindow窗口 + if (m_termWidgetPageMap.isEmpty()) { + qInfo() << "removeTermWidgetPage mainwindow close"; + /******** Modify by ut000438 王亮 2020-11-23:fix bug 55552:拖动标签页移动窗口过程中异常最大化 ***************/ + //当拖动标签过程中销毁窗口时,不保存销毁的窗口大小 + m_IfUseLastSize = false; + close(); + } +} + +void MainWindow::updateTabStatus() +{ + for (int i = 0; i < m_tabbar->count(); i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + TermWidget *term = tabPage->currentTerminal(); + bool bIdle = !(term->hasRunningProcess()); + QString tabIdentifier = tabPage->identifier(); + + if (bIdle) { + if (isTabVisited(tabIdentifier)) { + m_tabVisitMap.insert(tabIdentifier, false); + m_tabChangeColorMap.insert(tabIdentifier, false); + m_tabbar->removeNeedChangeTextColor(tabIdentifier); + } else if (isTabChangeColor(tabIdentifier)) { + m_tabbar->setChangeTextColor(tabIdentifier); + } else { + m_tabbar->removeNeedChangeTextColor(tabIdentifier); + } + } else { + m_tabbar->removeNeedChangeTextColor(tabIdentifier); + } + } +} + +QString MainWindow::getCurrTabTitle() +{ + return m_tabbar->tabText(m_tabbar->currentIndex()); +} + +void MainWindow::remoteUploadFile(QString strFileNames) +{ + pressCtrlAt(); + sleep(100); + currentPage()->sendTextToCurrentTerm(strFileNames); + currentPage()->sendTextToCurrentTerm("\n"); +} + +bool MainWindow::isFocusOnList() +{ + bool isFocus = true; + DIconButton *addButton = m_tabbar->findChild("AddButton"); + // 判断是否找到 + if (addButton != nullptr) { + // 判断按钮是否有焦点 + if (addButton->hasFocus()) { + isFocus = false; + qInfo() << "focus on AddButton"; + } + } else { + qInfo() << "can not found AddButton in DIconButton"; + } + + QList buttonList = {"DTitlebarDWindowOptionButton", "DTitlebarDWindowMinButton", "DTitlebarDWindowMaxButton", "DTitlebarDWindowCloseButton"}; + for (const QString &objectName : buttonList) { + DIconButton *button = titlebar()->findChild(objectName); + // 判断是否找到 + if (button != nullptr) { + // 判断按钮是否有焦点 + if (button->hasFocus()) { + isFocus = false; + qInfo() << "focus on " << objectName; + } + } else { + qInfo() << "can not found objectName in DIconButton"; + } + } + qInfo() << "focus on list : " << isFocus; + return isFocus; + +} + +void MainWindow::closeOtherTab(const QString &identifier, bool hasConfirmed) +{ + int runningCount = 0; + QList closeTabIdList; + for (int i = 0, count = m_termStackWidget->count(); i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + if (tabPage && tabPage->identifier() != identifier) { + closeTabIdList.append(tabPage->identifier()); + runningCount += tabPage->runningTerminalCount(); + } + } + + if ((!hasConfirmed) && (runningCount != 0)) { + // 全部关闭时,仅提示一次. + showExitConfirmDialog(Utils::CloseType_OtherTab, runningCount, this); + return; + } + + // 关闭其它窗口,需要检测 + for (QString &id : closeTabIdList) { + closeTab(id, true); + qInfo() << " close" << id; + } + + //如果是不关闭当前页的,最后回到当前页来. + m_tabbar->setCurrentIndex(m_tabbar->getIndexByIdentifier(identifier)); + + return; +} + +void MainWindow::closeAllTab() +{ + QList closeTabIdList; + for (int i = 0, count = m_termStackWidget->count(); i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + closeTabIdList.append(tabPage->identifier()); + } + + // 全部关闭时,不再检测了, + for (QString &id : closeTabIdList) { + closeTab(id, true); + qInfo() << " close" << id; + } + + return; +} + +inline void MainWindow::slotDDialogFinished(int result) +{ + OnHandleCloseType(result, Utils::CloseType(qobject_cast(sender())->property("type").toInt())); + /******** Modify by ut000439 wangpeili 2020-07-27: bug 39643 ****************/ + if (result != 1 && qobject_cast(sender())->property("focusCloseBtn").toBool()) { + DIconButton *closeBtn = titlebar()->findChild("DTitlebarDWindowCloseButton"); + if (closeBtn != nullptr) { + closeBtn->setFocus(); + qInfo() << "close button setFocus"; + } else { + qInfo() << "can not found DTitlebarDWindowCloseButton in DTitlebar"; + } + } + /********************* Modify by n014361 wangpeili End ************************/ +} + +void MainWindow::showExitConfirmDialog(Utils::CloseType type, int count, QWidget *parent) +{ + // count < 1 不提示 + if (count < 1) + return; + + QString title; + QString txt; + Utils::CloseType temtype = type; + // 关闭窗口的时候,如果只有一个tab,提示的内容要为终端. + if (Utils::CloseType_Window == type && 1 == m_tabbar->count()) + temtype = Utils::CloseType_Terminal; + + Utils::getExitDialogText(temtype, title, txt, count); + + /******** Modify by ut000439 wangpeili 2020-07-27: bug 39643 ****************/ + // 关闭确认窗口前确认焦点位置是否在close button上,并且发起了关闭窗口 + bool closeBtnHasfocus = false; + DIconButton *closeBtn = titlebar()->findChild("DTitlebarDWindowCloseButton"); + if ((closeBtn != nullptr) && closeBtn->hasFocus() && (Utils::CloseType_Window == type)) { + closeBtnHasfocus = true; + qInfo() << "before close window, focus widget is close button. "; + } + + if (nullptr == closeBtn) + qInfo() << "can not found DTitlebarDWindowCloseButton in DTitlebar"; + + /********************* Modify by n014361 wangpeili End ************************/ + + + // 有弹窗显示 + Service::instance()->setIsDialogShow(this, true); + + DDialog *dlg = new DDialog(title, txt, parent); + dlg->setIcon(QIcon::fromTheme("deepin-terminal")); + dlg->addButton(QString(tr("Cancel", "button")), false, DDialog::ButtonNormal); + /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close Begin***************/ + dlg->addButton(QString(tr("Close", "button")), true, DDialog::ButtonWarning); + /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close End***************/ + dlg->setWindowModality(Qt::WindowModal); + dlg->setAttribute(Qt::WA_DeleteOnClose); + dlg->show(); + dlg->setProperty("type", type); + + /******** Modify by ut000439 wangpeili 2020-07-27: bug 39643 ****************/ + if (closeBtnHasfocus) + dlg->setProperty("focusCloseBtn", true); + else + dlg->setProperty("focusCloseBtn", false); + + /********************* Modify by n014361 wangpeili End ************************/ + + /******** Modify by ut001000 renfeixiang 2020-06-03:修改 将dlg的槽函数修改为OnHandleCloseType,处理全部在OnHandleCloseType函数中 Begin***************/ + connect(dlg, &DDialog::finished, this, &MainWindow::slotDDialogFinished); + + return ; +} + +void MainWindow::focusPage(const QString &identifier) +{ + TermWidgetPage *tabPage = getPageByIdentifier(identifier); + if (tabPage) { + //当切换焦点到PAGE页后,移除标签文字颜色 + m_tabbar->removeNeedChangeTextColor(identifier); + m_termStackWidget->setCurrentWidget(tabPage); + tabPage->focusCurrentTerm(); + return; + } + qInfo() << "focusTab nullptr identifier" << identifier; +} + +void MainWindow::focusCurrentPage() +{ + focusPage(m_tabbar->identifier(m_tabbar->currentIndex())); +} + +TermWidgetPage *MainWindow::currentPage() +{ + return qobject_cast(m_termStackWidget->currentWidget()); +} + +TermWidgetPage *MainWindow::getPageByIdentifier(const QString &identifier) +{ + for (int i = 0, count = m_termStackWidget->count(); i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + if (tabPage && tabPage->identifier() == identifier) + return tabPage; + } + qInfo() << "getPageByIdentifier nullptr identifier" << identifier; + return nullptr; +} + +void MainWindow::onTermIsIdle(QString tabIdentifier, bool bIdle) +{ + //如果标签被点过,移除标签颜色 + if (isTabVisited(tabIdentifier) && bIdle) { + m_tabVisitMap.insert(tabIdentifier, false); + m_tabChangeColorMap.insert(tabIdentifier, false); + m_tabbar->removeNeedChangeTextColor(tabIdentifier); + return; + } + + if (bIdle) { + //空闲状态如果标签被标记变色,则改变标签颜色 + if (m_tabbar->isNeedChangeTextColor(tabIdentifier)) { + m_tabChangeColorMap.insert(tabIdentifier, true); + m_tabbar->setChangeTextColor(tabIdentifier); + } + } else { + + //如果当前标签是活动标签,移除变色请求 + int activeTabIndex = m_tabbar->currentIndex(); + qInfo() << "activeTabIndex: " << activeTabIndex; + QString activeTabIdentifier = m_tabbar->tabData(activeTabIndex).toString(); + if (activeTabIdentifier == tabIdentifier) { + m_tabVisitMap.insert(activeTabIdentifier, false); + m_tabChangeColorMap.insert(activeTabIdentifier, false); + m_tabbar->removeNeedChangeTextColor(activeTabIdentifier); + return; + } + + //标记变色,发起请求,稍后等空闲状态变色 + m_tabChangeColorMap.insert(tabIdentifier, false); + DGuiApplicationHelper *appHelper = DGuiApplicationHelper::instance(); + DPalette pa = appHelper->standardPalette(appHelper->themeType()); + m_tabbar->setNeedChangeTextColor(tabIdentifier, pa.color(DPalette::Highlight)); + } +} + +void MainWindow::resizeEvent(QResizeEvent *event) +{ + //Add by ut001000 renfeixiang 2020-11-16 雷神动画效果时,不进行resize操作,直接return + if (!isNotAnimation) + return; + + // 保存窗口位置 + saveWindowSize(); + // 通知隐藏插件 + hidePlugin(); + + DMainWindow::resizeEvent(event); +} + +void MainWindow::closeEvent(QCloseEvent *event) +{ + saveWindowSize(); + + //fix bug: 64134 新建两个窗口,打开A窗口关于后关闭应用,B窗口打开关于,应用出现闪退 + TerminalApplication *app = static_cast(qApp); + DAboutDialog *aboutDialog = app->aboutDialog(); + + if (aboutDialog != nullptr) { + disconnect(aboutDialog, &DAboutDialog::aboutToClose, nullptr, nullptr); + + //目前的关于对话框是非模态的,这里的处理是防止关于对话框可以打开多个的情况 + // 不能使用aboutToClose信号 应用能够打开多个的情况下 打开关于后直接关闭程序 + // 此时aboutToColose信号不会触发 再次打开程序并打开关于会出现访问野指针 程序崩溃的情况 + connect(aboutDialog, &DAboutDialog::destroyed, this, [ = ] { + app->setAboutDialog(nullptr); + }); + } + //fix bug: 64134 end + + // 注销和关机时不需要确认了 + if (qApp->isSavingSession()) + DMainWindow::closeEvent(event); + + // 一页一页退出,当全部退出以后,mainwindow自然关闭. + event->ignore(); + + int runningCount = 0; + QList closeTabIdList; + int count = m_termStackWidget->count(); + for (int i = 0 ; i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + closeTabIdList.append(tabPage->identifier()); + runningCount += tabPage->runningTerminalCount(); + } + + if ((!m_hasConfirmedClose) && (runningCount != 0)) { + // 如果不能马上关闭,并且还在没有最小化. + if ((runningCount != 0) && isMinimized()) { + qInfo() << "isMinimized........... " << endl; + setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); + } + + // 全部关闭时,仅提示一次. + showExitConfirmDialog(Utils::CloseType_Window, runningCount, this); + return; + } + closeAllTab(); + + + if (0 == m_tabbar->count()) { + DMainWindow::closeEvent(event); + emit mainwindowClosed(this); + } +} + +bool MainWindow::isQuakeMode() +{ + return m_isQuakeWindow; +} + +void MainWindow::setIsQuakeWindowTab(bool isQuakeWindowTab) +{ + m_tabbar->setIsQuakeWindowTab(isQuakeWindowTab); +} + +void MainWindow::onTermTitleChanged(QString title) +{ + TermWidgetPage *tabPage = qobject_cast(sender()); + const bool customName = tabPage->property("TAB_CUSTOM_NAME_PROPERTY").toBool(); + if (!customName) + m_tabbar->setTabText(tabPage->identifier(), title); + + // 判定第一次修改标题的时候,认为终端已经创建成功 + // 以此认为第一次打开终端窗口结束,记录时间 + if (!hasCreateFirstTermialComplete) { + Service::instance()->setMainTerminalIsStarted(true); + firstTerminalComplete(); + hasCreateFirstTermialComplete = true; + } +} + +QString MainWindow::getConfigWindowState() +{ + QString windowState = + Settings::instance()->settings->option("advanced.window.use_on_starting")->value().toString(); + + // 启动参数配置的状态值优先于 内部配置的状态值 + if (m_properties.contains(StartWindowState)) { + QString state = m_properties[StartWindowState].toString(); + qInfo() << "use line state set:" << state; + if ("maximum" == state) + windowState = "window_maximum"; + else if (state == "splitscreen") + windowState = "split_screen"; + else if (state == "normal") + windowState = "window_normal"; + else if (state == "fullscreen") + windowState = state; + else + qInfo() << "error line state set:" << state << "ignore it!"; + } + return windowState; +} + +QSize MainWindow::halfScreenSize() +{ + int w = qApp->desktop()->availableGeometry().width(); + int h = qApp->desktop()->availableGeometry().height(); + + QSize size; + //开启窗管特效时会有1px的border + if(!DWindowManagerHelper::instance()->hasComposite()) + size = QSize(w / 2 - 2, h - 2 - 1); + else + size = QSize(w / 2, h - 1); + return size; +} + +QString MainWindow::getWinInfoConfigPath() +{ + QDir winInfoPath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!winInfoPath.exists()) + winInfoPath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString winInfoFilePath(winInfoPath.filePath("wininfo-config.conf")); + return winInfoFilePath; +} + +void MainWindow::initShortcuts() +{ + ShortcutManager::instance()->initConnect(this); + connect(ShortcutManager::instance(), &ShortcutManager::addCustomCommandSignal, this, &MainWindow::addCustomCommandSlot); + connect(ShortcutManager::instance(), &ShortcutManager::removeCustomCommandSignal, this, &MainWindow::removeCustomCommandSlot); + + /******** Modify by n014361 wangpeili 2020-01-10: 增加设置的各种快捷键修改关联***********×****/ + // new_tab 新建标签页 + connect(createNewShotcut("shortcuts.tab.new_tab", false), &QShortcut::activated, this, &MainWindow::slotShortcutNewTab); + + // close_tab 关闭标签页 + connect(createNewShotcut("shortcuts.tab.close_tab"), &QShortcut::activated, this, &MainWindow::slotShortcutCloseTab); + + // Close_other_tabs + connect(createNewShotcut("shortcuts.tab.close_other_tabs"), &QShortcut::activated, this, &MainWindow::slotShortcutCloseOtherTabs); + + // previous_tab + connect(createNewShotcut("shortcuts.tab.previous_tab"), &QShortcut::activated, this, &MainWindow::slotShortcutPreviousTab); + + // next_tab + connect(createNewShotcut("shortcuts.tab.next_tab"), &QShortcut::activated, this, &MainWindow::slotShortcutNextTab); + + // horionzal_split + connect(createNewShotcut("shortcuts.tab.horionzal_split", false), &QShortcut::activated, this, &MainWindow::slotShortcutHorizonzalSplit); + + // vertical_split + connect(createNewShotcut("shortcuts.tab.vertical_split", false), &QShortcut::activated, this, &MainWindow::slotShortcutVerticalSplit); + + // select_upper_workspace + connect(createNewShotcut("shortcuts.tab.select_upper_workspace"), &QShortcut::activated, this, &MainWindow::slotShortcutSelectUpperWorkspace); + + // select_lower_workspace + connect(createNewShotcut("shortcuts.tab.select_lower_workspace"), &QShortcut::activated, this, &MainWindow::slotShortcutSelectLowerWorkspace); + + // select_left_workspace + connect(createNewShotcut("shortcuts.tab.select_left_workspace"), &QShortcut::activated, this, &MainWindow::slotShortcutSelectLeftWorkspace); + + // select_right_workspace + connect(createNewShotcut("shortcuts.tab.select_right_workspace"), &QShortcut::activated, this, &MainWindow::slotShortcutSelectRightWorkspace); + + // close_workspace + connect(createNewShotcut("shortcuts.tab.close_workspace"), &QShortcut::activated, this, &MainWindow::slotShortcutCloseWorkspace); + + // close_other_workspaces + connect(createNewShotcut("shortcuts.tab.close_other_workspaces"), &QShortcut::activated, this, &MainWindow::slotShortcutCloseOtherWorkspaces); + + // copy + connect(createNewShotcut("shortcuts.terminal.copy"), &QShortcut::activated, this, &MainWindow::slotShortcutCopy); + + // paste + connect(createNewShotcut("shortcuts.terminal.paste"), &QShortcut::activated, this, &MainWindow::slotShortcutPaste); + + // search + connect(createNewShotcut("shortcuts.terminal.find"), &QShortcut::activated, this, &MainWindow::slotShortcutFind); + + // zoom_in + connect(createNewShotcut("shortcuts.terminal.zoom_in"), &QShortcut::activated, this, &MainWindow::slotShortcutZoomIn); + + // zoom_out + connect(createNewShotcut("shortcuts.terminal.zoom_out"), &QShortcut::activated, this, &MainWindow::slotShortcutZoomOut); + + // default_size + connect(createNewShotcut("shortcuts.terminal.default_size"), &QShortcut::activated, this, &MainWindow::slotShortcutDefaultSize); + + // select_all + connect(createNewShotcut("shortcuts.terminal.select_all"), &QShortcut::activated, this, &MainWindow::slotShortcutSelectAll); + + // switch_fullscreen + connect(createNewShotcut("shortcuts.advanced.switch_fullscreen"), &QShortcut::activated, this, &MainWindow::slotShortcutSwitchFullScreen); + + // rename_tab + connect(createNewShotcut("shortcuts.advanced.rename_title"), &QShortcut::activated, this, &MainWindow::slotShortcutRenameTitle); + + // display_shortcuts + connect(createNewShotcut("shortcuts.advanced.display_shortcuts"), &QShortcut::activated, this, &MainWindow::slotShortcutDisplayShortcuts); + + // custom_command + connect(createNewShotcut("shortcuts.advanced.custom_command"), &QShortcut::activated, this, &MainWindow::slotShortcutCustomCommand); + + // remote_management + connect(createNewShotcut("shortcuts.advanced.remote_management"), &QShortcut::activated, this, &MainWindow::slotShortcutRemoteManage); + /********************* Modify by n014361 wangpeili End ************************/ + + /******** Modify by ut000439 wangpeili 2020-07-17: Super+Tab快捷键 ****************/ + QShortcut *shortcutFoucusOut = new QShortcut(QKeySequence(QKEYSEQUENCE_FOCUSOUT_TIMINAL), this); + connect(shortcutFoucusOut, &QShortcut::activated, this, &MainWindow::slotShortcutFocusOut); + /********************* Modify by n014361 wangpeili End ************************/ + /******** Modify by ut000439 wangpeili 2020-07-27: bug 39494 ****************/ + QShortcut *shortcutBuiltinPaste = new QShortcut(QKeySequence(QKEYSEQUENCE_PASTE_BUILTIN), this); + connect(shortcutBuiltinPaste, &QShortcut::activated, this, &MainWindow::slotShortcutBuiltinPaste); + + /******** Modify by ut001000 renfeixiang 2020-08-28:修改 bug 44477***************/ + QShortcut *shortcutBuiltinCopy = new QShortcut(QKeySequence(QKEYSEQUENCE_COPY_BUILTIN), this); + connect(shortcutBuiltinCopy, &QShortcut::activated, this, &MainWindow::slotShortcutBuiltinCopy); + /********************* Modify by n014361 wangpeili End ************************/ + + for (int i = 1 ; i <= 9; i++) { + QString strSwitchLabel = QString("shortcuts.tab.switch_label_win_%1").arg(i); + QShortcut *switchShortcut = createNewShotcut(strSwitchLabel); + switchShortcut->setProperty("index", QVariant(i)); + connect(switchShortcut, &QShortcut::activated, this, &MainWindow::slotShortcutSwitchActivated); + + } +} + +inline void MainWindow::slotShortcutSwitchActivated() +{ + QShortcut *switchShortcut = qobject_cast(sender()); + int i = switchShortcut->property("index").toInt(); + TermWidgetPage *page = currentPage(); + if (page) { + assert(m_tabbar); + if ((9 == i) && (m_tabbar->count() > 9)) { + m_tabbar->setCurrentIndex(m_tabbar->count() - 1); + return; + } + + if (i - 1 >= m_tabbar->count()) { + qInfo() << "i - 1 > tabcount" << i - 1 << m_tabbar->count() << endl; + return; + } + + qInfo() << "index" << i - 1 << endl; + m_tabbar->setCurrentIndex(i - 1); + return; + } + qInfo() << "currentPage nullptr ??"; +} + +inline void MainWindow::slotShortcutNewTab() +{ + this->addTab(currentPage()->createCurrentTerminalProperties(), true); +} + +inline void MainWindow::slotShortcutCloseTab() +{ + TermWidgetPage *page = currentPage(); + if (page) + closeTab(page->identifier()); +} + +inline void MainWindow::slotShortcutCloseOtherTabs() +{ + TermWidgetPage *page = currentPage(); + if (page) + closeOtherTab(page->identifier()); +} + +inline void MainWindow::slotShortcutPreviousTab() +{ + TermWidgetPage *page = currentPage(); + if (page) { + int index = m_tabbar->currentIndex(); + index -= 1; + if (index < 0) + index = m_tabbar->count() - 1; + + m_tabbar->setCurrentIndex(index); + } +} + +inline void MainWindow::slotShortcutNextTab() +{ + TermWidgetPage *page = currentPage(); + if (page) { + int index = m_tabbar->currentIndex(); + index += 1; + if (index == m_tabbar->count()) + index = 0; + + m_tabbar->setCurrentIndex(index); + } +} + +inline void MainWindow::slotShortcutHorizonzalSplit() +{ + // 判读数量是否允许分屏 + if (Service::instance()->isCountEnable()) { + TermWidgetPage *page = currentPage(); + if (page) { + if (page->currentTerminal()) { + int layer = page->currentTerminal()->getTermLayer(); + DSplitter *splitter = qobject_cast(page->currentTerminal()->parentWidget()); + if (1 == layer || (2 == layer && splitter && Qt::Horizontal == splitter->orientation())) { + page->split(Qt::Horizontal); + return ; + } + } + } + } + qInfo() << "can't split vertical again"; +} + +inline void MainWindow::slotShortcutVerticalSplit() +{ + // 判读数量是否允许分屏 + if (Service::instance()->isCountEnable()) { + TermWidgetPage *page = currentPage(); + if (page) { + if (page->currentTerminal()) { + int layer = page->currentTerminal()->getTermLayer(); + DSplitter *splitter = qobject_cast(page->currentTerminal()->parentWidget()); + if (1 == layer || (2 == layer && splitter && Qt::Vertical == splitter->orientation())) { + page->split(Qt::Vertical); + return ; + } + } + } + } + qInfo() << "can't split vertical again"; +} + +inline void MainWindow::slotShortcutSelectUpperWorkspace() +{ + qInfo() << "Alt+k"; + TermWidgetPage *page = currentPage(); + if (page) + page->focusNavigation(Qt::TopEdge); +} + +inline void MainWindow::slotShortcutSelectLowerWorkspace() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->focusNavigation(Qt::BottomEdge); +} + +inline void MainWindow::slotShortcutSelectLeftWorkspace() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->focusNavigation(Qt::LeftEdge); +} + +inline void MainWindow::slotShortcutSelectRightWorkspace() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->focusNavigation(Qt::RightEdge); +} + +inline void MainWindow::slotShortcutCloseWorkspace() +{ + TermWidgetPage *page = currentPage(); + if (page) { + qInfo() << "CloseWorkspace"; + page->closeSplit(page->currentTerminal()); + } +} + +inline void MainWindow::slotShortcutCloseOtherWorkspaces() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->closeOtherTerminal(); +} + +inline void MainWindow::slotShortcutCopy() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->copyClipboard(); +} + +inline void MainWindow::slotShortcutPaste() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->pasteClipboard(); +} + +inline void MainWindow::slotShortcutFind() +{ + showPlugin(PLUGIN_TYPE_SEARCHBAR); +} + +inline void MainWindow::slotShortcutZoomIn() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->zoomInCurrentTierminal(); + + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 Begin***************/ + setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:zoom_in时改变大小,bug#41436***************/ + updateMinHeight(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 End***************/ +} + +inline void MainWindow::slotShortcutZoomOut() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->zoomOutCurrentTerminal(); + + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 Begin***************/ + setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:zoom_out时改变大小,bug#41436***************/ + updateMinHeight(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 End***************/ +} + +inline void MainWindow::slotShortcutDefaultSize() +{ + TermWidgetPage *page = currentPage(); + if (page) + page->setFontSize(Settings::instance()->fontSize()); + + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 Begin***************/ + setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:default_size时改变大小,bug#41436***************/ + updateMinHeight(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加 雷神窗口根据字体大小设置最小高度函数 End***************/ +} + +inline void MainWindow::slotShortcutSelectAll() +{ + TermWidgetPage *page = currentPage(); + if (page) { + qInfo() << "selectAll"; + page->selectAll(); + } +} + +inline void MainWindow::slotShortcutSwitchFullScreen() +{ + switchFullscreen(); +} + +inline void MainWindow::slotShortcutRenameTitle() +{ + showPlugin(PLUGIN_TYPE_NONE); + TermWidgetPage *page = currentPage(); + if (page) + page->showRenameTitleDialog(); +} + +inline void MainWindow::slotShortcutDisplayShortcuts() +{ + displayShortcuts(); +} + +inline void MainWindow::slotShortcutCustomCommand() +{ + if (PLUGIN_TYPE_CUSTOMCOMMAND == m_CurrentShowPlugin) + showPlugin(PLUGIN_TYPE_NONE); + else + showPlugin(PLUGIN_TYPE_CUSTOMCOMMAND); +} + +inline void MainWindow::slotShortcutRemoteManage() +{ + if (PLUGIN_TYPE_REMOTEMANAGEMENT == m_CurrentShowPlugin) + showPlugin(PLUGIN_TYPE_NONE); + else + showPlugin(PLUGIN_TYPE_REMOTEMANAGEMENT); +} + +inline void MainWindow::slotShortcutFocusOut() +{ + qInfo() << "focusout timinal is activated!" << QKEYSEQUENCE_FOCUSOUT_TIMINAL; + DIconButton *addButton = m_tabbar->findChild("AddButton"); + if (addButton != nullptr) + addButton->setFocus(); + else + qInfo() << "can not found AddButton in DIconButton"; +} + +inline void MainWindow::slotShortcutBuiltinPaste() +{ + qInfo() << "built in paste shortcut is activated!" << QKEYSEQUENCE_PASTE_BUILTIN; + TermWidgetPage *page = currentPage(); + if (page) + page->pasteClipboard(); +} + +inline void MainWindow::slotShortcutBuiltinCopy() +{ + qInfo() << "built in copy shortcut is activated!" << QKEYSEQUENCE_COPY_BUILTIN; + TermWidgetPage *page = currentPage(); + if (page) + page->copyClipboard(); +} + +void MainWindow::initConnections() +{ + connect(this, &MainWindow::mainwindowClosed, WindowsManager::instance(), &WindowsManager::onMainwindowClosed); + connect(Settings::instance(), &Settings::windowSettingChanged, this, &MainWindow::onWindowSettingChanged); + connect(Settings::instance(), &Settings::shortcutSettingChanged, this, &MainWindow::onShortcutSettingChanged); + connect(this, &MainWindow::newWindowRequest, this, &MainWindow::onCreateNewWindow); + connect(qApp, &QGuiApplication::applicationStateChanged, this, &MainWindow::onApplicationStateChanged); +} + +void MainWindow::showPlugin(const QString &name) +{ + bool bSetFocus = false; + // 当焦点不在终端时,调用插件,并直接进入焦点 + if (qApp->focusWidget() != nullptr) { + if (QString(qApp->focusWidget()->metaObject()->className()) != TERM_WIDGET_NAME) + bSetFocus = true; + } + + if (m_CurrentShowPlugin.isEmpty()) + return; + + if ((name == m_CurrentShowPlugin) && (PLUGIN_TYPE_NONE == m_CurrentShowPlugin)) { + // 目前没有列表显示,直接返回 + qInfo() << "no plugin show!"; + return; + } + + m_CurrentShowPlugin = name; + if (name != PLUGIN_TYPE_NONE) + qInfo() << "show Plugin" << name << bSetFocus; + + emit showPluginChanged(name, bSetFocus); +} + +void MainWindow::hidePlugin() +{ + if (PLUGIN_TYPE_NONE == m_CurrentShowPlugin) + return; + + qInfo() << "hide Plugin" << m_CurrentShowPlugin; + m_CurrentShowPlugin = PLUGIN_TYPE_NONE; + emit quakeHidePlugin(); +} + +QString MainWindow::selectedText() +{ + TermWidgetPage *page = currentPage(); + if (page) { + if (page->currentTerminal()) + return page->currentTerminal()->selectedText(); + } + qInfo() << "not point terminal??"; + return ""; +} + +void MainWindow::onCreateNewWindow(QString workingDir) +{ + Q_UNUSED(workingDir); + // 调用一个新的进程,开启终端 + QProcess process; + process.startDetached(QCoreApplication::applicationFilePath()); +} + +bool MainWindow::eventFilter(QObject *watched, QEvent *event) +{ + if (QEvent::KeyPress == event->type()) { + // 当前的终端进行操作 + TermWidget *term = currentPage()->currentTerminal(); + QKeyEvent *keyEvent = static_cast(event); + // 键盘事件 按下回车 + if (Qt::Key_Return == keyEvent->key() || Qt::Key_Enter == keyEvent->key()) { + // 判断是否进行下载输入完要下载的文件后按下回车且当前窗口是激活窗口 + if (term->enterSzCommand() && term->isActiveWindow()) { + //--added by qinyaning(nyq) to slove Unable to download file from server, time: 2020.4.13 18:21--// + // 先用sz获取输入的文件 + pressEnterKey("\nsz \"${files[@]}\""); + //------------------------------------- + // 执行下载操作 + executeDownloadFile(); + // 下载完成,将是否进行下载的标志位设置为false + term->setEnterSzCommand(false); + } + } + if ((Qt::ControlModifier == keyEvent->modifiers()) && (Qt::Key_C == keyEvent->key() || Qt::Key_D == keyEvent->key())) { + // 当点击ctrl+c或者ctrl+d时判断,当前窗口是否正在等待下载输入 + if (term->enterSzCommand()) { + // 若是则将是否进行下载的标志位设置为false + term->setEnterSzCommand(false); + } + } + /******** Modify by ut000610 daizhengwen 2020-09-07:焦点在推出全屏上,点击Enter或Space Begin***************/ + // fix#bug 46680 + if ((QStringLiteral("Dtk::Widget::DWindowQuitFullButton") == watched->metaObject()->className()) + && (Qt::Key_Return == keyEvent->key() || Qt::Key_Enter == keyEvent->key() || Qt::Key_Space == keyEvent->key())) { + // 退出全屏 + switchFullscreen(false); + return true; + } + /********************* Modify by ut000610 daizhengwen End ************************/ + if ((Qt::ControlModifier == keyEvent->modifiers()) && (Qt::Key_S == keyEvent->key())) { + if (!Settings::instance()->enableControlFlow()) + return true; + + assert(term); + if (term->isActiveWindow()) + term->showFlowMessage(true); + } + + if ((Qt::ControlModifier == keyEvent->modifiers()) && (Qt::Key_Q == keyEvent->key())) { + assert(term); + if (term->isActiveWindow()) + term->showFlowMessage(false); + } + } + + //if (watched == this) { + if (QEvent::KeyPress == event->type()) { + //将事件转化为键盘事件 + QKeyEvent *key_event = static_cast(event); + //按下Tab键执行焦点切换事件,如果个别控件需要特殊处理TAB的话,在这里加代码 +#if 0 + if (key_event->key() == Qt::Key_Tab) { + bool realm_edit_focus = false; //= realm_line_edit->hasFocus(); + bool user_edit_focus = false; // user_line_edit->hasFocus(); + focusNextChild(); + if (realm_edit_focus) { + // user_line_edit->setFocus(); + } else { + // password_line_edit->setFocus(); + } + + return true; + } +#endif + // 全局按下ESC键返回终端,过滤掉个别情况 + if (Qt::Key_Escape == key_event->key()) { + QString filterReason; // 过滤原因 + do { + // 不干扰其它对话框使用ESC(一般框会遮盖enable false) + if (!this->isEnabled()) { + filterReason = "mainwidow is disable"; + break; + } + // 未激活不生效 + if (!this->isActiveWindow()) { + filterReason = "mainwidow is not active"; + break; + } + // 不干扰终端使用ESC + if (TERM_WIDGET_NAME == QString(qApp->focusWidget()->metaObject()->className())) { + filterReason = "focusWidget is terminnal"; + /***add by ut001121 zhangmeng 20200922 修复BUG48960***/ + showPlugin(PLUGIN_TYPE_NONE); + break; + } + // 如果有菜单出现的时候,ESC无效 + for (QWidget *top : qApp->topLevelWidgets()) { + if ("QMenu" == QString(top->metaObject()->className()) && top->isVisible()) { + filterReason = QString(top->metaObject()->className()) + " is display"; + break; + } + } + } while (false); + + if (!filterReason.isEmpty()) { + qInfo() << "Esc is not effect, reason:" << filterReason; + } else { + focusCurrentPage(); + showPlugin(PLUGIN_TYPE_NONE); + return true; + } + } + } + + return DMainWindow::eventFilter(watched, event); +} + + +void MainWindow::onWindowSettingChanged(const QString &keyName) +{ + if (QStringLiteral("advanced.window.blurred_background") == keyName) { + setEnableBlurWindow(Settings::instance()->backgroundBlur()); + return; + } + + // use_on_starting重启生效 + if (keyName == QStringLiteral("advanced.window.use_on_starting")) { + QString state = Settings::instance()->settings->option("advanced.window.use_on_starting")->value().toString(); + if ("window_normal" == state) { + m_IfUseLastSize = true; + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换window_width,window_height Begin***************/ + m_winInfoConfig->setValue(CONFIG_WINDOW_WIDTH, WINDOW_DEFAULT_WIDTH); + m_winInfoConfig->setValue(CONFIG_WINDOW_HEIGHT, WINDOW_DEFAULT_HEIGHT); + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换window_width,window_height End***************/ + qInfo() << "change value change value change value"; + } else { + m_IfUseLastSize = false; + } + qInfo() << "settingValue[" << keyName << "] changed to " << state + << ", auto effective when next start!"; + return; + } + // auto_hide_raytheon_window在使用中自动读取生效 + if ((QStringLiteral("advanced.window.auto_hide_raytheon_window") == keyName) || (QStringLiteral("advanced.window.use_on_starting") == keyName)) { + qInfo() << "settingValue[" << keyName << "] changed to " << Settings::instance()->OutputtingScroll() + << ", auto effective when happen"; + /***mod begin by ut001121 zhangmeng 20200528 修复BUG28920***/ + //onApplicationStateChanged(QApplication::applicationState()); + onAppFocusChangeForQuake(); + /***mod end by ut001121***/ + return; + } + + qInfo() << "settingValue[" << keyName << "] changed is not effective"; +} + +void MainWindow::onShortcutSettingChanged(const QString &keyName) +{ + qInfo() << "Shortcut[" << keyName << "] changed"; + if (m_builtInShortcut.contains(keyName)) { + QString value = Settings::instance()->settings->option(keyName)->value().toString(); + //m_builtInShortcut[keyName]->setKey(QKeySequence(value)); + // 设置中快捷键变化,重新注册快捷键,使用小写 up2down + m_builtInShortcut[keyName]->setKey(Utils::converUpToDown(value)); + return; + } + + qInfo() << "Shortcut[" << keyName << "] changed is unknown!"; +} + +void MainWindow::setNewTermPage(TermWidgetPage *termPage, bool activePage) +{ + if (nullptr == termPage) { + qInfo() << "termPage is nullptr!"; + return; + } + + m_termWidgetPageMap.insert(termPage->identifier(), termPage); + + m_termStackWidget->addWidget(termPage); + if (activePage) + m_termStackWidget->setCurrentWidget(termPage); +} + +void MainWindow::createNewTab() +{ + addTab(currentPage()->createCurrentTerminalProperties(), true); +} + +void MainWindow::displayShortcuts() +{ + QPoint pos = calculateShortcutsPreviewPoint(); + + QJsonArray jsonGroups; + createJsonGroup("terminal", jsonGroups); + createJsonGroup("tab", jsonGroups); + createJsonGroup("advanced", jsonGroups); + QJsonObject shortcutObj; + shortcutObj.insert("shortcut", jsonGroups); + + QJsonDocument doc(shortcutObj); + + QStringList shortcutString; + QByteArray array = doc.toJson(); + QString param1 = "-j=" + QString(array.data()); + QString param2 = "-p=" + QString::number(pos.x()) + "," + QString::number(pos.y()); + shortcutString << param1 << param2; + + QScopedPointer shortcutViewProcess(new QProcess()); + shortcutViewProcess->startDetached("deepin-shortcut-viewer", shortcutString); +} + +void MainWindow::createJsonGroup(const QString &keyCategory, QJsonArray &jsonGroups) +{ + qInfo() << keyCategory; + + QString strGroupName = ""; + if ("tab" == keyCategory) + strGroupName = QObject::tr("Tabs"); + else if ("terminal" == keyCategory) + strGroupName = QObject::tr("Terminal"); + else if ("advanced" == keyCategory) + strGroupName = QObject::tr("Others"); + else + return; + + QString groupname = "shortcuts." + keyCategory; + + QJsonArray JsonArry; + for (auto &opt : + Settings::instance()->settings->group(groupname)->options()) { // Settings::instance()->settings->keys()) + QJsonObject jsonItem; + QString name = QObject::tr(opt->name().toUtf8().data()); + jsonItem.insert("name", name); + jsonItem.insert("value", opt->value().toString()); + JsonArry.append(jsonItem); + } + + QString swithFocusToIcon = QObject::tr("Switch focus to \"+\" icon"); + if ("advanced" == keyCategory) { + QJsonObject jsonItem; + jsonItem.insert("name", swithFocusToIcon); + jsonItem.insert("value", "Super+Tab"); + JsonArry.append(jsonItem); + } + + /************************ Add by sunchengxi 2020-06-08:json重新排序,快捷键显示顺序调整 Begin************************/ + //default-config.json 文件增加的跟此处相关字段,此处相应添加,保证显示。 + //用三个条件分开,清晰,方便后续调整扩展维护,代码稍微多点。 + if ("terminal" == keyCategory) { + QStringList strList; + strList << QObject::tr("Copy") << QObject::tr("Paste") << QObject::tr("Find") << QObject::tr("Zoom in") << QObject::tr("Zoom out") << QObject::tr("Default size") << QObject::tr("Select all"); + QJsonArray newJsonArry; + for (int i = 0; i < strList.size(); i++) { + for (int j = 0; j < JsonArry.size(); j++) { + QJsonObject jsonItem = JsonArry[j].toObject(); + if (jsonItem.value("name") == strList[i]) { + newJsonArry.append(jsonItem); + break; + } + } + } + JsonArry = newJsonArry; + } + if ("tab" == keyCategory) { + QStringList strList; + strList << QObject::tr("New tab") << QObject::tr("Close tab") << QObject::tr("Close other tabs") << QObject::tr("Previous tab") << QObject::tr("Next tab") + << QObject::tr("Select tab") << QObject::tr("Vertical split") << QObject::tr("Horizontal split") << QObject::tr("Select upper workspace") << QObject::tr("Select lower workspace") + << QObject::tr("Select left workspace") << QObject::tr("Select right workspace") << QObject::tr("Close workspace") << QObject::tr("Close other workspaces") + << QObject::tr("Go to tab 1") << QObject::tr("Go to tab 2") << QObject::tr("Go to tab 3") + << QObject::tr("Go to tab 4") << QObject::tr("Go to tab 5") << QObject::tr("Go to tab 6") + << QObject::tr("Go to tab 7") << QObject::tr("Go to tab 8") << QObject::tr("Go to tab 9"); + QJsonArray newJsonArry; + for (int i = 0; i < strList.size(); i++) { + for (int j = 0; j < JsonArry.size(); j++) { + QJsonObject jsonItem = JsonArry[j].toObject(); + if (jsonItem.value("name") == strList[i]) { + newJsonArry.append(jsonItem); + break; + } + } + } + JsonArry = newJsonArry; + } + if ("advanced" == keyCategory) { + QStringList strList; + strList << QObject::tr("Fullscreen") << QObject::tr("Rename title") << QObject::tr("Display shortcuts") << QObject::tr("Custom commands") << QObject::tr("Remote management") + << swithFocusToIcon; + QJsonArray newJsonArry; + for (int i = 0; i < strList.size(); i++) { + for (int j = 0; j < JsonArry.size(); j++) { + QJsonObject jsonItem = JsonArry[j].toObject(); + if (jsonItem.value("name") == strList[i]) { + newJsonArry.append(jsonItem); + break; + } + } + } + JsonArry = newJsonArry; + } + /************************ Add by sunchengxi 2020-06-08:json重新排序,快捷键显示顺序调整 End************************/ + + QJsonObject JsonGroup; + JsonGroup.insert("groupName", strGroupName); + JsonGroup.insert("groupItems", JsonArry); + jsonGroups.append(JsonGroup); +} + +QShortcut *MainWindow::createNewShotcut(const QString &key, bool AutoRepeat) +{ + QString value = Settings::instance()->settings->option(key)->value().toString(); + // 初始化设置中的快捷键,使用小写 up2down dzw 20201215 + QShortcut *shortcut = new QShortcut(Utils::converUpToDown(value), this); + m_builtInShortcut[key] = shortcut; + shortcut->setAutoRepeat(AutoRepeat); + return shortcut; +} + + +void MainWindow::remoteUploadFile() +{ + //下载弹窗加载 + QString curPath = QDir::currentPath(); + QString dlgTitle = QObject::tr("Select file to upload"); + + // 设置弹窗 + DFileDialog *dialog = new DFileDialog(this, dlgTitle, curPath); + connect(dialog, &DFileDialog::finished, this, &MainWindow::onUploadFileDialogFinished); + dialog->setAcceptMode(QFileDialog::AcceptOpen); + dialog->setFileMode(QFileDialog::ExistingFiles); + dialog->setLabelText(QFileDialog::Accept, QObject::tr("Upload")); + dialog->open(); +} + +inline void MainWindow::onUploadFileDialogFinished(int code) +{ + DFileDialog *dialog = qobject_cast(sender()); + if (nullptr == dialog) + return; + + QStringList fileName; + + if (QDialog::Accepted == code) + fileName = dialog->selectedFiles(); + else + // 选择文件,却点击了叉号 + fileName = QStringList(); + + if (!fileName.isEmpty()) { + QString strTxt = "sz "; + for (QString &str : fileName) { + strTxt += str + " "; + } + remoteUploadFile(strTxt); + } else { + qInfo() << "remoteUploadFile file name is Null"; + } +} + +void MainWindow::slotDialogSelectFinished(int code) +{ + DFileDialog *dialog = qobject_cast(sender()); + if (QDialog::Accepted == code && !dialog->selectedFiles().isEmpty()) { + QStringList list = dialog->selectedFiles(); + const QString dirName = list.first(); + downloadFilePath = dirName; + } else { + downloadFilePath = ""; + } + + TermWidget *term = currentPage()->currentTerminal(); + + if (!downloadFilePath.isNull() && !downloadFilePath.isEmpty()) { + //QString strTxt = "read -e -a files -p \"" + tr("Type path to download file") + ": \"; sz \"${files[@]}\"\n"; + //currentTab()->sendTextToCurrentTerm(strTxt); + //--added by qinyaning(nyq) to slove Unable to download file from server, time: 2020.4.13 18:21--// + QString strTxt = QString("read -e -a files -p \"%1: \"").arg(tr("Type path to download file")); + pressEnterKey(strTxt); + currentPage()->sendTextToCurrentTerm("\n"); + //------------------- + term->setEnterSzCommand(true); + //sleep(100);// + } +} + +/** + * Download file from remote server + */ + +void MainWindow::remoteDownloadFile() +{ + QString curPath = QDir::currentPath(); + QString dlgTitle = QObject::tr("Select a directory to save the file"); + + DFileDialog *dialog = new DFileDialog(this, dlgTitle, curPath); + dialog->setAcceptMode(QFileDialog::AcceptOpen); + dialog->setFileMode(QFileDialog::Directory); + dialog->setOption(DFileDialog::DontConfirmOverwrite); + dialog->setLabelText(QFileDialog::Accept, QObject::tr("Select")); + connect(dialog, &DFileDialog::finished, this, &MainWindow::slotDialogSelectFinished); + dialog->open(); +} + +void MainWindow::onApplicationStateChanged(Qt::ApplicationState state) +{ + Q_UNUSED(state) + return; +} + +inline void MainWindow::slotCustomCommandActionTriggered() +{ + QAction *action = qobject_cast(sender()); + if (!this->isActiveWindow()) + return; + + QString command = action->data().toString(); + if (!command.endsWith('\n')) + command.append('\n'); + + currentPage()->sendTextToCurrentTerm(command); +} + +void MainWindow::addCustomCommandSlot(QAction *newAction) +{ + QAction *action = newAction; + // 注册自定义快捷键,使用小写 up2down dzw 20201215 + action->setShortcut(Utils::converUpToDown(action->shortcut())); + addAction(action); + + connect(action, &QAction::triggered, this, &MainWindow::slotCustomCommandActionTriggered); + +} + +void MainWindow::removeCustomCommandSlot(QAction *newAction) +{ + removeAction(newAction); +} + +void MainWindow::OnHandleCloseType(int result, Utils::CloseType type) +{ + // 弹窗隐藏或消失 + Service::instance()->setIsDialogShow(this, false); + if (result != 1) { + qInfo() << "user cancle close"; + return; + } + + TermWidgetPage *page = currentPage(); + if (nullptr == page) { + qInfo() << "null pointer of currentPage ???"; + return; + } + + //以下所有接口二次重入 + switch (type) { + case Utils::CloseType_Window: + m_hasConfirmedClose = true; + close(); + break; + case Utils::CloseType_Tab: + closeTab(page->identifier(), true); + break; + case Utils::CloseType_OtherTab: + closeOtherTab(page->identifier(), true); + break; + case Utils::CloseType_Terminal://Terminal相关的关闭弹框操作 + page->closeSplit(page->currentTerminal(), true); + break; + case Utils::CloseType_OtherTerminals: + page->closeOtherTerminal(true); + break; + default: + break; + } +} + +void MainWindow::keyPressEvent(QKeyEvent *event) +{ + Q_UNUSED(event); +} + +void MainWindow::executeDownloadFile() +{ + //--modified by qinyaning(nyq) to slove Unable to download file from server, time: 2020.4.13 18:21--// + // 前一条命令执行 + currentPage()->sendTextToCurrentTerm("\r\n"); + // 执行玩等待1s直到文件传输结束 + sleep(1000); + // ctrl+@ 进入当前机器 + pressCtrlAt(); + // cd 到当前机器的制定文件夹下 + sleep(100); + QString strCd = "cd " + downloadFilePath; + currentPage()->sendTextToCurrentTerm(strCd); + // 将文件下载下来 + QString strRz = "\r\nrz -be"; + // 执行下载命令 + currentPage()->sendTextToCurrentTerm(strRz); + // 将下载路径置空 + downloadFilePath = ""; + //------------------------------------------- +} + +void MainWindow::pressCtrlAt() +{ + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_At, Qt::ControlModifier); + if(focusWidget()) + QApplication::sendEvent(focusWidget(), &keyPress); +} + +void MainWindow::pressCtrlU() +{ + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_U, Qt::ControlModifier); + if(focusWidget()) + QApplication::sendEvent(focusWidget(), &keyPress); +} + +void MainWindow::sleep(int msec) +{ + QTime dieTime = QTime::currentTime().addMSecs(msec); + while (QTime::currentTime() < dieTime) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } +} + +//--added by qinyaning(nyq) to slove Unable to download file from server, time: 2020.4.13 18:21--// + +void MainWindow::pressEnterKey(const QString &text) +{ + QKeyEvent event(QEvent::KeyPress, 0, Qt::NoModifier, text); + if(focusWidget()) + QApplication::sendEvent(focusWidget(), &event); // expose as a big fat keypress event +} + +void MainWindow::createWindowComplete() +{ + m_WindowCompleteTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); +} + +void MainWindow::firstTerminalComplete() +{ + m_FirstTerminalCompleteTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + qInfo() << "app create all complete," << "MainWindowID = " << m_MainWindowID << ",all time use" << m_FirstTerminalCompleteTime - m_ReferedAppStartTime << "ms"; + qInfo() << "before entry use" << m_CreateWindowTime - m_ReferedAppStartTime << "ms"; + // 创建mainwidow时间,这个时候terminal并没有创建好,不能代表什么。 + qInfo() << "cretae first Terminal use" << m_FirstTerminalCompleteTime - m_CreateWindowTime << "ms"; +} + +QObjectList MainWindow::getNamedChildren(QObject *obj) +{ + QObjectList list; + if(nullptr == obj) + return list; + + foreach(QObject *o, obj->children()) { + if(!o->objectName().isEmpty()) { + list << o; + } + list << getNamedChildren(o); + } + return list; +} + +void MainWindow::setTitlebarNoFocus(QWidget *titlebar) +{ + foreach(QObject *obj, getNamedChildren(titlebar)) { + QWidget *w = qobject_cast(obj); + if(w) + w->setFocusPolicy(Qt::NoFocus); + } +} + +qint64 MainWindow::createNewMainWindowTime() +{ + // 当前时间减去创建时间 + return (QDateTime::currentDateTime().toMSecsSinceEpoch() - m_ReferedAppStartTime); +} + +int MainWindow::getDesktopIndex() const +{ + return m_desktopIndex; +} + +void MainWindow::checkExtendThemeItem(const QString &expandThemeStr, QAction *&action) +{ + if (THEME_ONE == expandThemeStr) + action = themeOneAction; + else if (THEME_TWO == expandThemeStr) + action = themeTwoAction; + else if (THEME_THREE == expandThemeStr) + action = themeThreeAction; + else if (THEME_FOUR == expandThemeStr) + action = themeFourAction; + else if (THEME_FIVE == expandThemeStr) + action = themeFiveAction; + else if (THEME_SIX == expandThemeStr) + action = themeSixAction; + else if (THEME_SEVEN == expandThemeStr) + action = themeSevenAction; + else if (THEME_EIGHT == expandThemeStr) + action = themeEightAction; + else if (THEME_NINE == expandThemeStr) + action = themeNineAction; + else if (THEME_TEN == expandThemeStr) + action = themeTenAction; + else if (Settings::instance()->m_configCustomThemePath == expandThemeStr) + action = themeCustomAction; +} + +void MainWindow::checkThemeItem() +{ + bool disableDtkSwitchThemeMenu = qEnvironmentVariableIsSet("KLU_DISABLE_MENU_THEME"); + //disableDtkSwitchThemeMenu = true; //主题显示开关控制 + //观察dtk中klu不支持主题功能。不显示主题相关部分。 + if (disableDtkSwitchThemeMenu) + return; + + QAction *action; + QString expandThemeStr = THEME_NO; + expandThemeStr = Settings::instance()->extendColorScheme(); + + Settings::instance()->themeStr = THEME_NO; + Settings::instance()->extendThemeStr = expandThemeStr; + + + switch (DGuiApplicationHelper::instance()->paletteType()) { + case DGuiApplicationHelper::LightType: { + action = lightThemeAction; + Settings::instance()->themeStr = THEME_LIGHT; + checkExtendThemeItem(expandThemeStr, action); + break; + + } + case DGuiApplicationHelper::DarkType: { + action = darkThemeAction; + Settings::instance()->themeStr = THEME_DARK; + checkExtendThemeItem(expandThemeStr, action); + break; + } + + default: { + //默认是跟随系统 + action = autoThemeAction; + checkExtendThemeItem(expandThemeStr, action); + break; + } + + } + + //勾选主题项 + action->setChecked(true); + currCheckThemeAction = action; +} + +void MainWindow::addThemeMenuItems() +{ + QMenu *menu = m_menu; + QAction *themeSeparator = nullptr; + + //下面代码参考dtk编写 + bool disableDtkSwitchThemeMenu = qEnvironmentVariableIsSet("KLU_DISABLE_MENU_THEME"); + //disableDtkSwitchThemeMenu = true;//主题显示开关控制 + //观察dtk中klu不支持主题功能。不显示主题相关部分。 + if (!disableDtkSwitchThemeMenu) { + //浅色 深色 跟随系统 的 翻译 不需要终端自己翻译,这里直接用dtk的翻译即可 + switchThemeMenu = new SwitchThemeMenu(qApp->translate("TitleBarMenu", THEME), menu); + lightThemeAction = switchThemeMenu->addAction(qApp->translate("TitleBarMenu", THEME_SYSTEN_LIGHT)); + darkThemeAction = switchThemeMenu->addAction(qApp->translate("TitleBarMenu", THEME_SYSTEN_DARK)); + autoThemeAction = switchThemeMenu->addAction(qApp->translate("TitleBarMenu", THEME_SYSTEN)); + switchThemeMenu->addSeparator(); + + //添加内置主题项列表 + themeOneAction = switchThemeMenu->addAction(tr(THEME_ONE_NAME)); + themeTwoAction = switchThemeMenu->addAction(tr(THEME_TWO_NAME)); + themeThreeAction = switchThemeMenu->addAction(tr(THEME_THREE_NAME)); + themeFourAction = switchThemeMenu->addAction(tr(THEME_FOUR_NAME)); + themeFiveAction = switchThemeMenu->addAction(tr(THEME_FIVE_NAME)); + themeSixAction = switchThemeMenu->addAction(tr(THEME_SIX_NAME)); + themeSevenAction = switchThemeMenu->addAction(tr(THEME_SEVEN_NAME)); + themeEightAction = switchThemeMenu->addAction(tr(THEME_EIGHT_NAME)); + themeNineAction = switchThemeMenu->addAction(tr(THEME_NINE_NAME)); + themeTenAction = switchThemeMenu->addAction(tr(THEME_TEN_NAME)); + themeCustomAction = switchThemeMenu->addAction(tr("Custom Theme")); + + + //设置主题项可选 + autoThemeAction->setCheckable(true); + lightThemeAction->setCheckable(true); + darkThemeAction->setCheckable(true); + + themeOneAction->setCheckable(true); + themeTwoAction->setCheckable(true); + themeThreeAction->setCheckable(true); + themeFourAction->setCheckable(true); + themeFiveAction->setCheckable(true); + themeSixAction->setCheckable(true); + themeSevenAction->setCheckable(true); + themeEightAction->setCheckable(true); + themeNineAction->setCheckable(true); + themeTenAction->setCheckable(true); + themeCustomAction->setCheckable(true); + + + //创建主题项快捷键组 + group = new QActionGroup(switchThemeMenu); + group->addAction(autoThemeAction); + group->addAction(lightThemeAction); + group->addAction(darkThemeAction); + + group->addAction(themeOneAction); + group->addAction(themeTwoAction); + group->addAction(themeThreeAction); + group->addAction(themeFourAction); + group->addAction(themeFiveAction); + group->addAction(themeSixAction); + group->addAction(themeSevenAction); + group->addAction(themeEightAction); + group->addAction(themeNineAction); + group->addAction(themeTenAction); + group->addAction(themeCustomAction); + + menu->addMenu(switchThemeMenu); + themeSeparator = menu->addSeparator(); + + switchThemeMenu->menuAction()->setVisible(true); + themeSeparator->setVisible(true); + + QObject::connect(group, SIGNAL(triggered(QAction *)), + this, SLOT(themeActionTriggeredSlot(QAction *))); + QObject::connect(group, SIGNAL(hovered(QAction *)), + this, SLOT(themeActionHoveredSlot(QAction *))); + + checkThemeItem(); + + connect(switchThemeMenu, SIGNAL(mainWindowCheckThemeItemSignal()), this, SLOT(setThemeCheckItemSlot())); + connect(switchThemeMenu, SIGNAL(menuHideSetThemeSignal()), this, SLOT(menuHideSetThemeSlot())); + } +} + +void MainWindow::setThemeCheckItemSlot() +{ + //如果是手动选中了主题项,直接返回 + if (true == Settings::instance()->bSwitchTheme) + return; + + //以下都是鼠标离开主题项时,还原到之前勾选的主题的处理 + + //选中了浅色主题项 + if (THEME_LIGHT == Settings::instance()->themeStr && THEME_NO == Settings::instance()->extendThemeStr) { + Settings::instance()->setColorScheme(THEME_LIGHT); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } + + //选中了深色主题项 + if (THEME_DARK == Settings::instance()->themeStr && THEME_NO == Settings::instance()->extendThemeStr) { + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } + + //选中了跟随系统主题项 + if (autoThemeAction->isChecked()) { + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::ColorType type = DGuiApplicationHelper::UnknownType; + DGuiApplicationHelper::instance()->setPaletteType(type); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); + return; + } + + //选中了内置主题在1-8项之间 // 深色方案系列 + if (THEME_ONE == Settings::instance()->extendThemeStr || THEME_TWO == Settings::instance()->extendThemeStr || THEME_THREE == Settings::instance()->extendThemeStr + || THEME_FOUR == Settings::instance()->extendThemeStr || THEME_FIVE == Settings::instance()->extendThemeStr + || THEME_SIX == Settings::instance()->extendThemeStr || THEME_SEVEN == Settings::instance()->extendThemeStr || THEME_EIGHT == Settings::instance()->extendThemeStr) { + + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(Settings::instance()->extendThemeStr); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } + + //选中了内置主题在9-10项之间 // 浅色方案系列 + if (THEME_NINE == Settings::instance()->extendThemeStr || THEME_TEN == Settings::instance()->extendThemeStr) { + + Settings::instance()->setColorScheme(THEME_LIGHT); + Settings::instance()->setExtendColorScheme(Settings::instance()->extendThemeStr); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } + + if (Settings::instance()->extendThemeStr == Settings::instance()->m_configCustomThemePath) { + + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(Settings::instance()->extendThemeStr); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } + +} + +void MainWindow::menuHideSetThemeSlot() +{ + if (currCheckThemeAction == lightThemeAction) { + Settings::instance()->setColorScheme(THEME_LIGHT); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } else if (currCheckThemeAction == darkThemeAction) { + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } else if (currCheckThemeAction == autoThemeAction) { + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::ColorType type = DGuiApplicationHelper::UnknownType; + DGuiApplicationHelper::instance()->setPaletteType(type); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); + return; + } + + else if (currCheckThemeAction == themeOneAction || currCheckThemeAction == themeTwoAction || currCheckThemeAction == themeThreeAction || currCheckThemeAction == themeFourAction + || currCheckThemeAction == themeFiveAction || currCheckThemeAction == themeSixAction || currCheckThemeAction == themeSevenAction || currCheckThemeAction == themeEightAction + ) { + Settings::instance()->setColorScheme(THEME_DARK); + + if (currCheckThemeAction == themeOneAction) + Settings::instance()->setExtendColorScheme(THEME_ONE); + else if (currCheckThemeAction == themeTwoAction) + Settings::instance()->setExtendColorScheme(THEME_TWO); + else if (currCheckThemeAction == themeThreeAction) + Settings::instance()->setExtendColorScheme(THEME_THREE); + else if (currCheckThemeAction == themeFourAction) + Settings::instance()->setExtendColorScheme(THEME_FOUR); + else if (currCheckThemeAction == themeFiveAction) + Settings::instance()->setExtendColorScheme(THEME_FIVE); + else if (currCheckThemeAction == themeSixAction) + Settings::instance()->setExtendColorScheme(THEME_SIX); + else if (currCheckThemeAction == themeSevenAction) + Settings::instance()->setExtendColorScheme(THEME_SEVEN); + else if (currCheckThemeAction == themeEightAction) + Settings::instance()->setExtendColorScheme(THEME_EIGHT); + + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } else if (currCheckThemeAction == themeNineAction || currCheckThemeAction == themeTenAction) { + Settings::instance()->setColorScheme(THEME_LIGHT); + if (currCheckThemeAction == themeNineAction) + Settings::instance()->setExtendColorScheme(THEME_NINE); + else + Settings::instance()->setExtendColorScheme(THEME_TEN); + + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } else if (currCheckThemeAction == themeCustomAction) { + Settings::instance()->setExtendColorScheme(Settings::instance()->m_configCustomThemePath); + if (THEME_LIGHT == Settings::instance()->themeSetting->value("CustomTheme/TitleStyle")) { + Settings::instance()->setColorScheme(THEME_LIGHT); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + } else { + Settings::instance()->setColorScheme(THEME_DARK); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + } + + return; + } +} + +void MainWindow::switchThemeAction(QAction *action) +{ + //浅色主题 + if (action == lightThemeAction) { + + if (Settings::instance()->bSwitchTheme) { + Settings::instance()->themeStr = THEME_LIGHT; + Settings::instance()->extendThemeStr = THEME_NO; + } + + Settings::instance()->setColorScheme(THEME_LIGHT); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } + //深色主题 + if (action == darkThemeAction) { + + if (Settings::instance()->bSwitchTheme) { + Settings::instance()->themeStr = THEME_DARK; + Settings::instance()->extendThemeStr = THEME_NO; + } + + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + + } + //跟随系统 + if (action == autoThemeAction) { + Settings::instance()->setExtendColorScheme(THEME_NO); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::UnknownType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); + return; + } + //内置主题1 + if (action == themeOneAction) { + switchThemeAction(action, THEME_ONE); + return; + } + //内置主题2 + if (action == themeTwoAction) { + switchThemeAction(action, THEME_TWO); + return; + } + //内置主题3 + if (action == themeThreeAction) { + switchThemeAction(action, THEME_THREE); + return; + } + //内置主题4 + if (action == themeFourAction) { + switchThemeAction(action, THEME_FOUR); + return; + } + //内置主题5 + if (action == themeFiveAction) { + switchThemeAction(action, THEME_FIVE); + return; + } + //内置主题6 + if (action == themeSixAction) { + switchThemeAction(action, THEME_SIX); + return; + } + //内置主题7 + if (action == themeSevenAction) { + switchThemeAction(action, THEME_SEVEN); + return; + } + //内置主题8 + if (action == themeEightAction) { + switchThemeAction(action, THEME_EIGHT); + return; + } + //内置主题9 + if (action == themeNineAction) { + switchThemeAction(action, THEME_NINE); + return; + } + //内置主题10 + if (action == themeTenAction) { + switchThemeAction(action, THEME_TEN); + return; + } + + //自定义主题 + if (action == themeCustomAction) { + if (Settings::instance()->bSwitchTheme) { + Service::instance()->showCustomThemeSettingDialog(this); + } else { + switchThemeAction(action, Settings::instance()->m_configCustomThemePath); + } + return; + } +} + +void MainWindow::switchThemeAction(QAction *&action, const QString &themeNameStr) +{ + //内置深色主题 1-8 之间 + if (action == themeOneAction || action == themeTwoAction || action == themeThreeAction + || action == themeFourAction || action == themeFiveAction || action == themeSixAction + || action == themeSevenAction || action == themeEightAction) { + + if (Settings::instance()->bSwitchTheme) { + Settings::instance()->themeStr = THEME_DARK; + Settings::instance()->extendThemeStr = themeNameStr; + } + + Settings::instance()->setColorScheme(THEME_DARK); + Settings::instance()->setExtendColorScheme(themeNameStr); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + return; + } + //内置浅色主题 9-10 之间 + if (action == themeNineAction || action == themeTenAction) { + + if (Settings::instance()->bSwitchTheme) { + Settings::instance()->themeStr = THEME_LIGHT; + Settings::instance()->extendThemeStr = themeNameStr; + } + + Settings::instance()->setColorScheme(THEME_LIGHT); + Settings::instance()->setExtendColorScheme(themeNameStr); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + return; + } + + if (action == themeCustomAction) { + if (Settings::instance()->bSwitchTheme) { + if (THEME_LIGHT == Settings::instance()->themeSetting->value("CustomTheme/TitleStyle")) + Settings::instance()->themeStr = THEME_LIGHT; + else + Settings::instance()->themeStr = THEME_DARK; + + Settings::instance()->extendThemeStr = themeNameStr; + } + + Settings::instance()->setExtendColorScheme(themeNameStr); + if (THEME_LIGHT == Settings::instance()->themeSetting->value("CustomTheme/TitleStyle")) { + Settings::instance()->setColorScheme(THEME_LIGHT); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::LightType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::LightType); + } else { + Settings::instance()->setColorScheme(THEME_DARK); + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::DarkType); + } + + return; + } +} + +void MainWindow::themeActionTriggeredSlot(QAction *action) +{ + Settings::instance()->bSwitchTheme = true; + switchThemeAction(action); +} + +void MainWindow::themeActionHoveredSlot(QAction *action) +{ + if (switchThemeMenu->hoveredThemeStr != action->text()) { + switchThemeMenu->hoveredThemeStr = action->text(); + Settings::instance()->bSwitchTheme = false; + switchThemeAction(action); + } +} + +void MainWindow::onCommandActionTriggered() +{ + QAction *commandAction = qobject_cast(sender()); + + qInfo() << "commandAction->data().toString() is triggered" << this; + if (!this->isActiveWindow()) + return ; + + QString command = commandAction->data().toString(); + if (!command.endsWith('\n')) + command.append('\n'); + + this->currentPage()->sendTextToCurrentTerm(command); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////// +/** + 普通终端窗口 +*/ +NormalWindow::NormalWindow(TermProperties properties, QWidget *parent): MainWindow(properties, parent) +{ + Q_ASSERT(m_isQuakeWindow == false); + setObjectName("NormalWindow"); + initUI(); + initConnections(); + initShortcuts(); + createWindowComplete(); + setIsQuakeWindowTab(false); +} + +NormalWindow::~NormalWindow() +{ + +} + +void NormalWindow::initTitleBar() +{ + // titleba在普通模式和雷神模型不一样的功能 + m_titleBar = new TitleBar(this, false); + m_titleBar->setObjectName("NormalWindowTitleBar");//Add by ut001000 renfeixiang 2020-08-14 + m_titleBar->setTabBar(m_tabbar); + + titlebar()->setCustomWidget(m_titleBar); + titlebar()->setTitle(""); + + //设置titlebar焦点策略为不抢占焦点策略,防止点击titlebar后终端失去输入焦点 + titlebar()->setFocusPolicy(Qt::NoFocus); + initOptionButton(); + initOptionMenu(); + + /******** Modify by ut000439 wangpeili 2020-07-22: SP3.1 DTK TAB控件 ****************/ + // 清理titlebar、titlebar所有控件不可获取焦点 + Utils::clearChildrenFocus(titlebar()); + Utils::clearChildrenFocus(m_tabbar); + // 重新设置可见控件焦点 + DIconButton *addButton = m_tabbar->findChild("AddButton"); + if (addButton != nullptr) + addButton->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found AddButton in DIconButton"; + + DIconButton *optionBtn = titlebar()->findChild("DTitlebarDWindowOptionButton"); + if (optionBtn != nullptr) + optionBtn->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found DTitlebarDWindowOptionButton in DTitlebar"; + + QWidget *quitFullscreenBtn = titlebar()->findChild("DTitlebarDWindowQuitFullscreenButton"); + if (quitFullscreenBtn != nullptr) + quitFullscreenBtn->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found DTitlebarDWindowQuitFullscreenButton in DTitlebar"; + + DIconButton *minBtn = titlebar()->findChild("DTitlebarDWindowMinButton"); + if (minBtn != nullptr) + minBtn->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found DTitlebarDWindowMinButton in DTitlebar"; + + DIconButton *maxBtn = titlebar()->findChild("DTitlebarDWindowMaxButton"); + if (maxBtn != nullptr) + maxBtn->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found DTitlebarDWindowMaxButton in DTitlebar"; + + DIconButton *closeBtn = titlebar()->findChild("DTitlebarDWindowCloseButton"); + if (closeBtn != nullptr) + closeBtn->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found DTitlebarDWindowCloseButton in DTitlebar"; + + if (addButton != nullptr && optionBtn != nullptr && quitFullscreenBtn != nullptr && minBtn != nullptr && maxBtn != nullptr && closeBtn != nullptr) { + QWidget::setTabOrder(addButton, optionBtn); + QWidget::setTabOrder(optionBtn, quitFullscreenBtn); + QWidget::setTabOrder(quitFullscreenBtn, minBtn); + QWidget::setTabOrder(minBtn, maxBtn); + QWidget::setTabOrder(maxBtn, closeBtn); + } + + /********************* Modify by n014361 wangpeili End ************************/ +} + +void NormalWindow::initWindowAttribute() +{ + // init window state. + QString windowState = getConfigWindowState(); + if ("window_maximum" == windowState) { + show(); + setDefaultLocation(); + showMaximized(); + } else if ("fullscreen" == windowState) { + setDefaultLocation(); + switchFullscreen(true); + } else if ("split_screen" == windowState) { + setWindowRadius(0); + resize(halfScreenSize()); + } else { + m_IfUseLastSize = true; + int saveWidth = m_winInfoConfig->value(CONFIG_WINDOW_WIDTH).toInt(); + int saveHeight = m_winInfoConfig->value(CONFIG_WINDOW_HEIGHT).toInt(); + qInfo() << "load window_width: " << saveWidth; + qInfo() << "load window_height: " << saveHeight; + // 如果配置文件没有数据 + if (0 == saveWidth || 0 == saveHeight) { + saveWidth = WINDOW_DEFAULT_WIDTH; + saveHeight = WINDOW_DEFAULT_HEIGHT; + } + resize(QSize(saveWidth, saveHeight)); + singleFlagMove(); + } +} + +void NormalWindow::saveWindowSize() +{ + // 过滤普通模式的特殊窗口 + if (!m_IfUseLastSize) + return; + + // (真.假)半屏窗口大小时就不记录了 + /******** Modify by ut001000 renfeixiang 2020-07-03:fix# 36482 ***************/ + // 1.高度-1,如果不-1, 半屏启动-》最大化-》后无法正常还原 + // 2.+ QSize(0, 1),拖动终端到半屏时触发 + if ((size() == halfScreenSize()) || size() == (halfScreenSize() + QSize(0, 1))) + return; + + if (Qt::WindowNoState == windowState()) { + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换window_width,window_height Begin***************/ + // 记录最后一个正常窗口的大小 + m_winInfoConfig->setValue(CONFIG_WINDOW_WIDTH, width()); + m_winInfoConfig->setValue(CONFIG_WINDOW_HEIGHT, height()); + qInfo() << "save windows size:" << width() << height(); + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换window_width,window_height End***************/ + } +} + +void NormalWindow::switchFullscreen(bool forceFullscreen) +{ + if (forceFullscreen || !window()->windowState().testFlag(Qt::WindowFullScreen)) + window()->setWindowState(windowState() | Qt::WindowFullScreen); + else + window()->setWindowState(windowState() & ~Qt::WindowFullScreen); + + // 全屏和取消全屏后,都将焦点设置回终端 + focusCurrentPage(); +} + +QPoint NormalWindow::calculateShortcutsPreviewPoint() +{ + QRect rect = window()->geometry(); + return QPoint(rect.x() + rect.width() / 2, rect.y() + rect.height() / 2); +} + +void NormalWindow::onAppFocusChangeForQuake() +{ + return; +} + +void NormalWindow::changeEvent(QEvent *event) +{ + QMainWindow::changeEvent(event); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////// +/** + 雷神终端窗口 +*/ +QuakeWindow::QuakeWindow(TermProperties properties, QWidget *parent): MainWindow(properties, parent), + // 初始化雷神resize的定时器 + m_resizeTimer(new QTimer(this)) +{ + Q_ASSERT(m_isQuakeWindow == true); + setObjectName("QuakeWindow"); + initUI(); + initConnections(); + initShortcuts(); + createWindowComplete(); + setIsQuakeWindowTab(true); + // 设置雷神resize定时器属性 + m_resizeTimer->setSingleShot(true); + // 绑定信号槽 + connect(m_resizeTimer, &QTimer::timeout, this, &QuakeWindow::onResizeWindow); + + //设置窗口属性 不可移动 + sendWindowForhibitMove(true); +} + +QuakeWindow::~QuakeWindow() +{ + // 析构resize定时器 + if (nullptr != m_resizeTimer) { + delete m_resizeTimer; + } +} + +void QuakeWindow::initTitleBar() +{ + // titleba在普通模式和雷神模型不一样的功能 + m_titleBar = new TitleBar(this, true); + m_titleBar->setObjectName("QuakeWindowTitleBar");//Add by ut001000 renfeixiang 2020-08-14 + m_titleBar->setTabBar(m_tabbar); + + /** add by ut001121 zhangmeng 20200723 for sp3 keyboard interaction */ + //雷神终端设置系统标题栏为禁用状态,使其不获取焦点,不影响键盘交互操作. + setTitlebarNoFocus(titlebar()); + titlebar()->setFixedHeight(0); + m_centralLayout->addWidget(m_titleBar); + + /** del by ut001121 zhangmeng 20200723 for sp3 keyboard interaction*/ +#if 0 + //设置titlebar焦点策略为不抢占焦点策略 + titlebar()->setFocusPolicy(Qt::NoFocus); + + // titlebar所有控件不可获取焦点 + Utils::clearChildrenFocus(titlebar()); + Utils::clearChildrenFocus(m_tabbar); + + /******** Modify by ut000439 wangpeili 2020-07-22: SP3.1 DTK TAB控件 ****************/ + DIconButton *addButton = m_tabbar->findChild("AddButton"); + if (addButton != nullptr) + addButton->setFocusPolicy(Qt::TabFocus); + else + qInfo() << "can not found AddButton in DIconButton"; + + // 雷神下其它控件一律没有焦点 + DIconButton *optionBtn = titlebar()->findChild("DTitlebarDWindowOptionButton"); + if (optionBtn != nullptr) + optionBtn->setFocusPolicy(Qt::NoFocus); + else + qInfo() << "can not found DTitlebarDWindowOptionButton in DTitlebar"; + + DIconButton *minBtn = titlebar()->findChild("DTitlebarDWindowMinButton"); + if (minBtn != nullptr) + minBtn->setFocusPolicy(Qt::NoFocus); + else + qInfo() << "can not found DTitlebarDWindowMinButton in DTitlebar"; + + DIconButton *maxBtn = titlebar()->findChild("DTitlebarDWindowMaxButton"); + if (maxBtn != nullptr) + maxBtn->setFocusPolicy(Qt::NoFocus); + else + qInfo() << "can not found DTitlebarDWindowMaxButton in DTitlebar"; + + DIconButton *closeBtn = titlebar()->findChild("DTitlebarDWindowCloseButton"); + if (closeBtn != nullptr) + closeBtn->setFocusPolicy(Qt::NoFocus); + else + qInfo() << "can not found DTitlebarDWindowCloseButton in DTitlebar"; + + /*QWidget::setTabOrder(addButton, optionBtn); + QWidget::setTabOrder(optionBtn, minBtn); + QWidget::setTabOrder(minBtn, maxBtn); + QWidget::setTabOrder(maxBtn, closeBtn);*/ + /********************* Modify by n014361 wangpeili End ************************/ +#endif +} + +void QuakeWindow::slotWorkAreaResized() +{ + qInfo() << "workAreaResized" << QApplication::desktop()->availableGeometry(); + /******** Modify by nt001000 renfeixiang 2020-05-20:修改成只需要设置雷神窗口宽度,根据字体高度设置雷神最小高度 Begin***************/ + setMinimumWidth(QApplication::desktop()->availableGeometry().width()); + setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:workAreaResized时改变大小,bug#41436***************/ + updateMinHeight(); + /******** Modify by nt001000 renfeixiang 2020-05-20:修改成只需要设置雷神窗口宽度,根据字体高度设置雷神最小高度 End***************/ + move(QApplication::desktop()->availableGeometry().x(), QApplication::desktop()->availableGeometry().y()); + qInfo() << "size" << size(); + setFixedWidth(QApplication::desktop()->availableGeometry().width()); + return ; +} + +void QuakeWindow::initWindowAttribute() +{ + /************************ Add by m000743 sunchengxi 2020-04-27:雷神窗口任务栏移动后位置异常问题 Begin************************/ + setWindowRadius(0); + //QRect deskRect = QApplication::desktop()->availableGeometry();//获取可用桌面大小 + QDesktopWidget *desktopWidget = QApplication::desktop(); + QRect screenRect = desktopWidget->screenGeometry(); //获取设备屏幕大小 + Qt::WindowFlags windowFlags = this->windowFlags(); + setWindowFlags(windowFlags | Qt::WindowStaysOnTopHint/* | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint*/ /*| Qt::Dialog*/); + + //add a line by ut001121 zhangmeng 2020-04-27雷神窗口禁用移动(修复bug#22975) + setEnableSystemMove(false);// setAttribute(Qt::WA_Disabled, true); + + /******** Modify by m000714 daizhengwen 2020-03-26: 窗口高度超过2/3****************/ + setMinimumSize(screenRect.size().width(), 60); + setMaximumHeight(screenRect.size().height() * 2 / 3); + /********************* Modify by m000714 daizhengwen End ************************/ + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + setFixedWidth(QApplication::desktop()->availableGeometry().width()); + connect(desktopWidget, &QDesktopWidget::workAreaResized, this, &QuakeWindow::slotWorkAreaResized); + + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换quake_window_Height Begin***************/ + int saveHeight = m_winInfoConfig->value(CONFIG_QUAKE_WINDOW_HEIGHT).toInt(); + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换quake_window_Height End***************/ + qInfo() << "quake_window_Height: " << saveHeight; + qInfo() << "quake_window_Height: " << minimumSize(); + // 如果配置文件没有数据 + if (saveHeight == 0) + saveHeight = screenRect.size().height() / 3; + + int saveWidth = screenRect.size().width(); + resize(QSize(saveWidth, saveHeight)); + // 记录雷神高度 + m_quakeWindowHeight = saveHeight; + move(0, 0); + /************************ Add by m000743 sunchengxi 2020-04-27:雷神窗口任务栏移动后位置异常问题 End ************************/ + + /******** Add by nt001000 renfeixiang 2020-05-20:增加setQuakeWindowMinHeight函数,设置雷神最小高度 Begin***************/ + setWindowMinHeightForFont(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加setQuakeWindowMinHeight函数,设置雷神最小高度 End***************/ +} + +void QuakeWindow::saveWindowSize() +{ + // 记录最后一个正常窗口的大小 + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换quake_window_Height Begin***************/ + //Modify by ut001000 renfeixiang 2020-11-16 非雷神动画时,在保存雷神窗口的高度到配置文件 + if (isNotAnimation) { + m_winInfoConfig->setValue(CONFIG_QUAKE_WINDOW_HEIGHT, height()); + qInfo() << "save quake_window_Height:" << height() << m_desktopMap[m_desktopIndex] << m_desktopIndex; + } + /******** Modify by nt001000 renfeixiang 2020-05-25: 文件wininfo-config.conf中参数,使用定义更换quake_window_Height End***************/ +} + +void QuakeWindow::switchFullscreen(bool forceFullscreen) +{ + Q_UNUSED(forceFullscreen) + return; +} + +QPoint QuakeWindow::calculateShortcutsPreviewPoint() +{ + //--added by qinyaning(nyq) to solve the problem of can't show center--// + QRect rect = QApplication::desktop()->availableGeometry(); + //---------------------------------------------------------------------// + return QPoint(rect.x() + rect.width() / 2, rect.y() + rect.height() / 2); +} + +void QuakeWindow::onAppFocusChangeForQuake() +{ + // 开关关闭,不处理 + if (!Settings::instance()->settings->option("advanced.window.auto_hide_raytheon_window")->value().toBool()) + return; + + // 雷神窗口隐藏,不处理 + if (!isVisible()) + return; + + // 雷神的普通对话框,不处理 + if (Service::instance()->getIsDialogShow()) + return; + + // 雷神设置框显示,不处理 + if (Service::instance()->isSettingDialogVisible() && Service::instance()->getSettingOwner() == this) + return; + + // 处于激活状态,不处理 + if (isActiveWindow()) + return; + + hideQuakeWindow(); +} + +/******** Add by nt001000 renfeixiang 2020-05-20:增加雷神窗口根据字体和字体大小设置最小高度函数 Begin***************/ +void QuakeWindow::setWindowMinHeightForFont() +{ + int height = 0; + //根据内部term的最小高度设置雷神终端的最小高度, (m_MinHeight-50)/2是内部term的最小高度,50是雷神窗口的标题栏高度 + //add by ut001000 renfeixiang 2020-08-07 + height = (m_MinHeight - WIN_TITLE_BAR_HEIGHT) / 2 + 60; + setMinimumHeight(height); +} + +/******** Add by nt001000 renfeixiang 2020-05-20:增加雷神窗口根据字体和字体大小设置最小高度函数 End***************/ +void QuakeWindow::updateMinHeight() +{ + qInfo() << "start updateMinHeight"; + bool hasHorizontalSplit = false; + int count = m_termStackWidget->count(); + for (int i = 0; i < count; i++) { + TermWidgetPage *tabPage = qobject_cast(m_termStackWidget->widget(i)); + if (tabPage->hasHasHorizontalSplit()) { + hasHorizontalSplit = true; + break; + } + } + if (hasHorizontalSplit) { + //Modify by ut001000 renfeixiang 2020-11-16 因为switchEnableResize函数使用setFixedHeight会改变最小高度值,所以将判断条件删除 + setMinimumHeight(m_MinHeight + 10); + } else { + //Modify by ut001000 renfeixiang 2020-11-16 将判断条件删除 + setWindowMinHeightForFont(); + } +} + +bool QuakeWindow::isShowOnCurrentDesktop() +{ + return m_desktopMap[m_desktopIndex]; +} + +void QuakeWindow::hideQuakeWindow() +{ + // 隐藏雷神 + // 记录雷神在当前窗口的状态 + m_desktopMap[m_desktopIndex] = false; + //Add by ut001000 renfeixiang 2020-11-16 添加雷神动画函数, 雷神窗口隐藏已经放在动画效果结束后 + bottomToTopAnimation(); +} + +void QuakeWindow::onResizeWindow() +{ + resize(width(), m_quakeWindowHeight); +} + +void QuakeWindow::topToBottomAnimation() +{ + if (nullptr == currentPage()) + return; + + isNotAnimation = false; + this->setMinimumHeight(0);//设置最小高度为0,让动画效果流畅 + currentPage()->setMinimumHeight(currentPage()->height());//设置page的最小高度,让动画效果时,page上信息不因为外框的变小而变小 + + //动画代码 + QPropertyAnimation *m_heightAni = new QPropertyAnimation(this, "height"); + m_heightAni->setEasingCurve(QEasingCurve::Linear); + int durationTime = getQuakeAnimationTime(); + m_heightAni->setDuration(durationTime); + m_heightAni->setStartValue(1); + m_heightAni->setEndValue(getQuakeHeight()); + m_heightAni->start(QAbstractAnimation::DeleteWhenStopped); + + connect(m_heightAni, &QPropertyAnimation::finished, this, &QuakeWindow::onTopToBottomAnimationFinished); +} + +inline void QuakeWindow::onTopToBottomAnimationFinished() +{ + updateMinHeight();//恢复外框的原有最小高度值 + // 保证currentPage有值,不然ut多线程下可能会崩溃 + if (currentPage()) + currentPage()->setMinimumHeight(this->minimumHeight() - tabbarHeight);//恢复page的原有最小高度值 tabbarHeight是tabbar的高度 + + isNotAnimation = true; + /***add by ut001121 zhangmeng 20200606 切换窗口拉伸属性 修复BUG24430***/ + switchEnableResize(); +} + +void QuakeWindow::bottomToTopAnimation() +{ + if (!isNotAnimation || nullptr == currentPage()) { + qInfo() << "bottomToTopAnimation no need to execute."; + return; + } + + isNotAnimation = false; + this->setMinimumHeight(0);//设置最小高度为0,让动画效果流畅 + currentPage()->setMinimumHeight(currentPage()->height());//设置page的最小高度,让动画效果时,page上信息不因为外框的变小而变小 + + //动画代码 + QPropertyAnimation *m_heightAni = new QPropertyAnimation(this, "height"); + m_heightAni->setEasingCurve(QEasingCurve::Linear); + int durationTime = getQuakeAnimationTime(); + m_heightAni->setDuration(durationTime); + m_heightAni->setStartValue(getQuakeHeight()); + m_heightAni->setEndValue(0); + m_heightAni->start(QAbstractAnimation::DeleteWhenStopped); + + connect(m_heightAni, &QPropertyAnimation::finished, this, &QuakeWindow::onBottomToTopAnimationFinished); +} + +inline void QuakeWindow::onBottomToTopAnimationFinished() +{ + this->hide(); + isNotAnimation = true; +} + +void QuakeWindow::setHeight(int h) +{ + this->resize(this->width(), h); +} + +int QuakeWindow::getQuakeAnimationTime() +{ + QDesktopWidget *desktopWidget = QApplication::desktop(); + QRect screenRect = desktopWidget->screenGeometry(); //获取设备屏幕大小 + //quakeAnimationBaseTime+quakeAnimationHighDistributionTotalTime的时间是雷神窗口最大高度时动画效果时间 + //动画时间计算方法:3quakeAnimationBaseTime加上(quakeAnimationHighDistributionTotalTime乘以当前雷神高度除以雷神最大高度)所得时间,为各个高度时动画时间 + int durationTime = quakeAnimationBaseTime + quakeAnimationHighDistributionTotalTime * this->getQuakeHeight() / (screenRect.height() * 2 / 3); + return durationTime; +} + +xcb_atom_t QuakeWindow::internAtom(xcb_connection_t *connection, const char *name, bool only_if_exists) +{ + if (!name || *name == 0) + return XCB_NONE; + + xcb_intern_atom_cookie_t cookie = xcb_intern_atom(connection, only_if_exists, strlen(name), name); + xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookie, 0); + + if (!reply) + return XCB_NONE; + + xcb_atom_t atom = reply->atom; + free(reply); + + return atom; +} + +xcb_atom_t QuakeWindow::internAtom(const char *name, bool only_if_exists) +{ + return internAtom(QX11Info::connection(), name, only_if_exists); +} + +/* + * 雷神窗口不允许移动,但是会响应 窗管的 窗口移动功能,彼此冲突 + * 和 窗管沟通后 定义_DEEPIN_FORHIBIT_MOVE 属性(1:禁止移动,0:可以移动,默认:可以移动) + * sendWindowForhibitMove(true),通过调用xcb相关函数,设置_DEEPIN_FORHIBIT_MOVE属性值为1,禁止窗口移动 + */ +void QuakeWindow::sendWindowForhibitMove(bool forhibit) +{ + if(!QX11Info::connection()){ + qWarning() << "QX11Info::connection() is " << QX11Info::connection(); + return ; + } + + auto reply = internAtom("_DEEPIN_FORHIBIT_MOVE"); + int32_t ldata = forhibit; + xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE, this->winId(), + reply, reply, 32, 1, &ldata); +} + +void QuakeWindow::changeEvent(QEvent *event) +{ + // 不是激活事件,不处理 + if (QEvent::ActivationChange == event->type()) { + onAppFocusChangeForQuake(); + } + + return QMainWindow::changeEvent(event); +} + +void QuakeWindow::showEvent(QShowEvent *event) +{ + /***add begin by ut001121 zhangmeng 20200528 重新获取桌面索引 修复BUG29082***/ + m_desktopIndex = DBusManager::callKDECurrentDesktop(); + /***add end by ut001121***/ + // 记录当前桌面的index为显示状态 + m_desktopMap[m_desktopIndex] = true; + + DMainWindow::showEvent(event); +} + +bool QuakeWindow::event(QEvent *event) +{ + /***add begin by ut001121 zhangmeng 20200606 切换窗口拉伸属性 修复BUG24430***/ + //Add by ut001000 renfeixiang 2020-11-16 增加雷神动画的标志isNotAnimation, 雷神动画效果时,不进行窗口拉伸属性 + if (QEvent::HoverMove == event->type() && isNotAnimation) + switchEnableResize(); + + /***add end by ut001121***/ + + return MainWindow::event(event); +} + +bool QuakeWindow::eventFilter(QObject *watched, QEvent *event) +{ + //fix bug: 64490 勾选“丢失焦点后隐藏雷神窗口”,最小化雷神终端后不能再次调出雷神终端 + // 丢失焦点后隐藏雷神窗口开关打开的情况下 + if (watched == this && + Settings::instance()->settings->option("advanced.window.auto_hide_raytheon_window")->value().toBool()) { + //此处通过该操作禁止雷神终端窗口最小化 + if (event->type() == QEvent::WindowStateChange) { + event->ignore(); + this->activateWindow(); + return true; + } + } +#if 0 + // 由于MainWindow是qApp注册的时间过滤器,所以这里需要判断 + // 只处理雷神的事件 QuakeWindowWindow是Qt内置用来管理QuakeWindow的Mouse事件的object + if (watched->objectName() != "QuakeWindowWindow") + return MainWindow::eventFilter(watched, event); + + + // 鼠标点击事件 + if (event->type() == QEvent::MouseButtonPress) { + // 鼠标点击窗口后激活窗口,因为不走窗管 + activateWindow(); + // 判断是否可以resize + if (Quake_Prepare_Resize == m_resizeState) { + // 若可以设置状态为resize,等待用户move鼠标 + m_resizeState = Quake_Resize; + } + } + + // 鼠标释放事件 + if (event->type() == QEvent::MouseButtonRelease) { + // 松开鼠标 将状态值恢复默认 + m_resizeState = Quake_NoResize; + } + // 鼠标移动事件 + if (event->type() == QEvent::MouseMove) { + // 将事件装换为鼠标事件 + QMouseEvent *mouseEvent = static_cast(event) ; + int mousePosY = mouseEvent->screenPos().y(); + int margin = mousePosY - height(); + switch (m_resizeState) { + // 若此时已经准备好resize + case Quake_Resize: + // 记录当前的雷神窗口高度 + m_quakeWindowHeight = height() + margin; + // 延时发送,避免resize过于频繁,导致titlebar抖动 + m_resizeTimer->start(5); + break; + // 若没到边缘或者到边缘还没点击 + default: + // 判断鼠标位置 + if (qAbs(margin) < QUAKE_EDGE) { + // 若小于定义的边缘大小,将光标变化为指定形状 + setCursor(Qt::SizeVerCursor); + m_resizeState = Quake_Prepare_Resize; + } else { + // 若大于,则还原 + setCursor(Qt::ArrowCursor); + m_resizeState = Quake_NoResize; + } + break; + } + } +#endif + return MainWindow::eventFilter(watched, event); + +} + +void QuakeWindow::switchEnableResize() +{ + // 如果(桌面光标Y坐标)>(雷神窗口Y坐标+雷神高度的1/2),则启用拉伸属性.否则禁用拉伸属性 + // 此方法dtk已经标记废弃 + switchEnableResize(QCursor::pos().y() > pos().y() + height() / 2); +} + +void QuakeWindow::switchEnableResize(bool isEnable) +{ + if (isEnable) { + // 设置最小高度和最大高度,解放fixSize设置的不允许拉伸 + QDesktopWidget *desktopWidget = QApplication::desktop(); + QRect screenRect = desktopWidget->screenGeometry(); //获取设备屏幕大小 + //Add by ut001000 renfeixiang 2020-11-16 修改成使用写好的设置最小值的函数 + updateMinHeight(); + setMaximumHeight(screenRect.height() * 2 / 3); + } else { + // 窗管和DTK让用fixSize来替代,禁止resize + setFixedHeight(height()); + } +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/mainwindow.h deepin-terminal-5.4.13/src/main/mainwindow.h --- deepin-terminal-5.0.0+ds1/src/main/mainwindow.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/mainwindow.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1193 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "termproperties.h" +#include "titlebar.h" +#include "termwidgetpage.h" +#include "remotemanagementplugn.h" +#include "utils.h" +#include "define.h" +#include "customthemesettingdialog.h" + +// dtk +#include +#include +#include +#include +#include + +// qt +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +DWIDGET_USE_NAMESPACE + +class TabBar; +class TermWidgetPage; +class TermProperties; +class ShortcutManager; +class MainWindowPluginInterface; +class CustomCommandPlugin; + + +/******************************************************************************* + 1. @类名: SwitchThemeMenu + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-10-28 + 4. @说明: 主题菜单的快捷键项在鼠标离开悬浮时,触发主题还原 +*******************************************************************************/ +class SwitchThemeMenu : public QMenu +{ + Q_OBJECT +public: + SwitchThemeMenu(const QString &title, QWidget *parent = nullptr); + /** + * @brief 捕获鼠标离开主题项事件 + * @author ut000125 sunchengxi + */ + void leaveEvent(QEvent *) override; + /** + * @brief 主题菜单栏隐藏时触发 + * @author ut000125 sunchengxi + */ + void hideEvent(QHideEvent *) override; + /** + * @brief 捕获鼠标进入主题项事件 + * @author ut000125 sunchengxi + * @param event 鼠标进入主题项事件 + */ + void enterEvent(QEvent *event) override; + /** + * @brief 处理键盘主题项左键按下离开事件 + * @author ut000125 sunchengxi + * @param event 键盘主题项左键按下离开事件 + */ + void keyPressEvent(QKeyEvent *event) override; + +signals: + //主题项在鼠标停靠离开时触发的信号 + void mainWindowCheckThemeItemSignal(); + //主题菜单隐藏时设置主题信号 + void menuHideSetThemeSignal(); +public: + //鼠标悬殊主题记录,防止频繁刷新,鼠标再次进入主题列表负责刷新预览 + QString hoveredThemeStr = ""; +}; + + +/******************************************************************************* + 1. @类名: MainWindow + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 主窗口 + 基类,不可直接生成对象,派生普测窗口和雷神窗口 + 分发插件显隐信号 + 控制TAB-PAGE增减 + 捆绑全局快捷键 +*******************************************************************************/ +class MainWindow : public DMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(TermProperties properties, QWidget *parent = nullptr); + ~MainWindow() override; + + /** + * @brief 基类增加标签 + * @author ut000439 wangpeili + * @param properties 标签页属性 + * @param activeTab + */ + void addTab(TermProperties properties, bool activeTab = false); + /** + * @brief 拖拽成功后,将之前窗口的标签插入当前MainWindow窗口 + * @author ut000438 王亮 + * @param tabName 标签名称 + * @param activeTab 活动标签 + * @param isVirtualAdd 拖拽过程中存在一种标签预览模式,此时不需要真实添加 + * @param page 终端工作区 + * @param insertIndex 插入标签索引 + */ + void addTabWithTermPage(const QString &tabName, bool activeTab, bool isVirtualAdd, TermWidgetPage *page, int insertIndex = -1); + /** + * @brief 判断是否超出最大允许控件数量,如果超出则不允许新建标签 + * @author ut000438 王亮 + * @return + */ + bool beginAddTab(); + /** + * @brief 结束添加标签 + * @author ut000438 王亮 + * @param termPage 终端工作区 + * @param activeTab 是否拖拽过程中 + * @param index 索引 + * @param startTime 开始时间 + */ + void endAddTab(TermWidgetPage *termPage, bool activeTab, int index, qint64 startTime); + + /******** Modify by n014361 wangpeili 2020-01-07: 关闭其它标签页功能 ************/ + // 点击,右键,快捷键以及被调用. + /** + * @brief closeTab 关闭标签页 + * @author n014361 王培利 + * @param identifier 标签标识符 + * @param hasConfirmed 是否提示 + */ + void closeTab(const QString &identifier, bool hasConfirmed = false); + /** + * @brief 根据identifier获取对应的TermWidgetPage + * @author ut000438 王亮 + * @param identifier 标识符 + * @return + */ + TermWidgetPage *getTermPage(const QString &identifier); + /** + * @brief 根据identifier移除对应的TermPage + * @author ut000438 王亮 + * @param identifier 标识符 + * @param isDelete + */ + void removeTermWidgetPage(const QString &identifier, bool isDelete); + // Tab右键或者快捷键 + /** + * @brief 关闭其它窗口 + * @author n014361 王培利 + * @param identifier 标识符 + * @param hasConfirmed 是否确认 + */ + void closeOtherTab(const QString &identifier, bool hasConfirmed = false); + /** + * @brief 关闭所有标签页功能 + * @author n014361 王培利 + */ + void closeAllTab(); + /********************* Modify by n014361 wangpeili End ************************/ + /** + * @brief showExitConfirmDialog 关闭窗口、终端时,显示确认提示框 + * @author ut000439 王培利 + * @param type 类型 + * @param count 数量 + * @param parent + */ + void showExitConfirmDialog(Utils::CloseType type, int count = 1, QWidget *parent = nullptr); + + /************************ Mod by sunchengxi 2020-04-30:分屏修改标题异常问题 Begin************************/ + /** + * @brief 获取当前标签的标题 + * @author ut000439 wangpeili + * @return + */ + QString getCurrTabTitle(); + /************************ Mod by sunchengxi 2020-04-30:分屏修改标题异常问题 End ************************/ + /** + * @brief 焦点是否在列表上 + * @author ut000610 戴正文 + * @return + */ + bool isFocusOnList(); + + /** + * @brief 远程连接执行上传文件:1) 支持远程时拖拽文件自动上传2) 支持上传指定的文件 + * @author ut000610 戴正文 + * @param strFileNames 文件名称 + */ + void remoteUploadFile(QString strFileNames); + /** + * @brief 焦点切换到某个PAGE页 + * @author ut000439 王培利 + * @param identifier 标识符 + */ + void focusPage(const QString &identifier); + /** + * @brief 基类聚焦到当前页面 + * @author ut000439 wangpeili + */ + void focusCurrentPage(); + /** + * @brief 基类获取当前页面 + * @author ut000439 wangpeili + * @return + */ + TermWidgetPage *currentPage(); + void setCurrentPage(TermWidgetPage *page); + /** + * @brief 基类通过标识符获取页面 + * @author ut000439 wangpeili + * @param identifier 标识符 + * @return + */ + TermWidgetPage *getPageByIdentifier(const QString &identifier); + + /** + * @brief 基类终端是否闲置响应函数(闲置即没有程序运行) + * @author ut000439 wangpeili + * @param tabIdentifier 标签标识符 + * @param bIdle + */ + void onTermIsIdle(QString tabIdentifier, bool bIdle); + + /** + * @brief sz命令之后,等待输入文件信息,并下载文件 + * @author ut000439 王培利 + */ + void executeDownloadFile(); + + /** + * @brief 基类按下Ctrl+@函数 + * @author ut000439 wangpeili + */ + void pressCtrlAt(); + /** + * @brief 基类按下Ctrl+U函数 + * @author ut000439 wangpeili + */ + void pressCtrlU(); + /** + * @brief 基类睡眠函数 + * @author ut000439 wangpeili + * @param msec + */ + void sleep(int msec); + + /** + * @brief 由mainwindow统一指令当前显示哪个插件 + * @author n014361 王培利 + * @param name 插件名称 + */ + void showPlugin(const QString &name); + /** + * @brief 快速隐藏所有插件,resize专用的。 + * @author n014361 王培利 + */ + void hidePlugin(); + /** + * @brief 基类创建新工作区域 + * @author ut000439 wangpeili + */ + void createNewTab(); + /** + * @brief 由mainwindow统一获取当前选择的文本。 + * @author ut000439 wangpeili + * @return + */ + QString selectedText(); + + /** + * @brief 创建新窗口需要的时间 + * @author ut000610 戴正文 + * @return + */ + qint64 createNewMainWindowTime(); + + /** + * @brief 是否有正在执行的进程 + * @author ut000439 wangpeili + * @return + */ + bool hasRunningProcesses(); + /** + * @brief 基类判断是否是雷神窗口 + * @author ut000439 wangpeili + * @return + */ + bool isQuakeMode(); + /** + * @brief 用于标记当前tab是否为雷神窗口的tab + * @author ut000438 王亮 + * @param isQuakeWindowTab 当前tab是否为雷神窗口的tab + */ + void setIsQuakeWindowTab(bool isQuakeWindowTab); + + static constexpr const char *PLUGIN_TYPE_SEARCHBAR = "Search Bar"; + static constexpr const char *PLUGIN_TYPE_THEME = "Theme"; + static constexpr const char *PLUGIN_TYPE_CUSTOMCOMMAND = "Custom Command"; + static constexpr const char *PLUGIN_TYPE_REMOTEMANAGEMENT = "Remote Management"; + static constexpr const char *PLUGIN_TYPE_ENCODING = "Encoding"; + static constexpr const char *PLUGIN_TYPE_NONE = "None"; + /******** Add by nt001000 renfeixiang 2020-05-25:增加 定义 Begin***************/ + static constexpr const char *CONFIG_WINDOW_WIDTH = "window_width"; + static constexpr const char *CONFIG_WINDOW_HEIGHT = "window_height"; + //Modify by ut001000 renfeixiang 2020-06-18:修改quake_window_Height为quake_window_height bug#33779 + static constexpr const char *CONFIG_QUAKE_WINDOW_HEIGHT = "quake_window_height"; + /******** Add by nt001000 renfeixiang 2020-05-25:增加 定义 End***************/ + static constexpr const char *QKEYSEQUENCE_FOCUSOUT_TIMINAL = "Meta+Tab"; + static constexpr const char *QKEYSEQUENCE_PASTE_BUILTIN = "Shift+Ins"; + static constexpr const char *QKEYSEQUENCE_COPY_BUILTIN = "Ctrl+Ins"; + + /******** Add by ut001000 renfeixiang 2020-08-07:将m_MinWidth和m_MinHeight设置成全局变量***************/ + // 窗口最小宽度 + static const int m_MinWidth; + // 窗口最小高度 + static const int m_MinHeight; + + //主题菜单 + static constexpr const char *THEME = "Theme"; + //浅色主题 + static constexpr const char *THEME_SYSTEN_LIGHT = "Light Theme"; + //深色主题 + static constexpr const char *THEME_SYSTEN_DARK = "Dark Theme"; + //跟随系统 + static constexpr const char *THEME_SYSTEN = "System Theme"; + + //浅色主题 + static constexpr const char *THEME_LIGHT = "Light"; + //深色主题 + static constexpr const char *THEME_DARK = "Dark"; + //无内置主题 + static constexpr const char *THEME_NO = ""; + //内置主题1 + static constexpr const char *THEME_ONE = "Theme1"; + static constexpr const char *THEME_ONE_NAME = "Elementary"; + //内置主题2 + static constexpr const char *THEME_TWO = "Theme2"; + static constexpr const char *THEME_TWO_NAME = "Empathy"; + //内置主题3 + static constexpr const char *THEME_THREE = "Theme3"; + static constexpr const char *THEME_THREE_NAME = "Tomorrow night blue"; + //内置主题4 + static constexpr const char *THEME_FOUR = "Theme4"; + static constexpr const char *THEME_FOUR_NAME = "Bim"; + //内置主题5 + static constexpr const char *THEME_FIVE = "Theme5"; + static constexpr const char *THEME_FIVE_NAME = "Freya"; + //内置主题6 + static constexpr const char *THEME_SIX = "Theme6"; + static constexpr const char *THEME_SIX_NAME = "Hybrid"; + //内置主题7 + static constexpr const char *THEME_SEVEN = "Theme7"; + static constexpr const char *THEME_SEVEN_NAME = "Ocean dark"; + //内置主题8 + static constexpr const char *THEME_EIGHT = "Theme8"; + static constexpr const char *THEME_EIGHT_NAME = "Deepin"; + //内置主题9 + static constexpr const char *THEME_NINE = "Theme9"; + static constexpr const char *THEME_NINE_NAME = "Ura"; + //内置主题10 + static constexpr const char *THEME_TEN = "Theme10"; + static constexpr const char *THEME_TEN_NAME = "One light"; + //自定义主题 + static constexpr const char *THEME_CUSTOM = "Custom Theme"; + + + // /etc/hostname 文件路径 + static constexpr const char *HOSTNAME_PATH = "/etc/hostname"; + + /** + * @brief 基类获取桌面索引 + * @author ut000439 wangpeili + * @return + */ + int getDesktopIndex() const; + + //Add by ut001000 renfeixiang 2020-11-16 标记是否动画效果,true : 不动画 false : 动画 + bool isNotAnimation = true; + //雷神窗口动画时间计算公式:quakeAnimationBaseTime加上(quakeAnimationHighDistributionTotalTime乘以当前雷神高度除以雷神最大高度)所得时间 + //雷神窗口动画的基础时间 + static constexpr const int quakeAnimationBaseTime = 300; + //雷神窗口动画按高度分配的总时间 + static constexpr const int quakeAnimationHighDistributionTotalTime = 150; + //雷神窗口的tabbar高度,用于计算page的最小高度值 + static constexpr const int tabbarHeight = 60; + +signals: + void newWindowRequest(const QString &directory); + // !这两个信号被封装了,请不要单独调用! + void showPluginChanged(const QString &name, bool bSetFocus = false); + void quakeHidePlugin(); + void mainwindowClosed(MainWindow *); + // 编码方式,仅当前mainwindow有效. + void changeEncodeSig(const QString &name); + +public slots: + /** + * @brief 参数修改统一接口 + * @author n014361 王培利 + * @param keyName 参数名 + */ + void onWindowSettingChanged(const QString &keyName); + /** + * @brief 基类快捷键设置变化响应函数 + * @author ut000439 wangpeili + * @param keyName 快捷键名称 + */ + void onShortcutSettingChanged(const QString &keyName); + + /** + * @brief (远程)上传文件到服务器端 + * @author ut000439 王培利 + */ + void remoteUploadFile(); + /** + * @brief 基类从远程服务下载文 + * @author ut000610 daizhengwen + */ + void remoteDownloadFile(); + /** + * @brief 处理雷神窗口自动隐藏功能以及window+D一起显示的问题 + * @author n014361 王培利 + * @param state 状态 + */ + void onApplicationStateChanged(Qt::ApplicationState state); + /** + * @brief 基类增加自定义命令响应函数 + * @author ut000125 sunchengxi + * @param 新的自定义名命令 + */ + void addCustomCommandSlot(QAction *newAction); + /** + * @brief 基类删除自定义命令响应函数 + * @author ut000125 sunchengxi + * @param 自定义命令 + */ + void removeCustomCommandSlot(QAction *newAction); + + /******** Add by ut001000 renfeixiang 2020-06-03:增加 Begin***************/ + /** + * @brief 处理关闭类型的参数 + * @author ut001000 任飞翔 + * @param result + * @param type 关闭类型 + */ + void OnHandleCloseType(int result, Utils::CloseType type); + /******** Add by ut001000 renfeixiang 2020-06-03:增加 End***************/ + + /** + * @brief QAction触发对应的自定义命令槽函数 + * @author ut000438 王亮 + */ + void onCommandActionTriggered(); + + /** + * @brief 上传文件对话框关闭处理 + * @author ut000438 王亮 + * @param code + */ + void onUploadFileDialogFinished(int code); + +protected: + /** + * @brief 按键响应事件,是空函数 + * @author ut000439 wangpeili + * @param event + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 基类关闭事件 + * @author ut000439 wangpeili + * @param event + */ + void closeEvent(QCloseEvent *event) override; + /** + * @brief 基类调整大小事件 + * @author ut000439 wangpeili + * @param event + */ + void resizeEvent(QResizeEvent *event) override; + /** + * @brief 基类事件过滤器 + * @author ut000439 wangpeili + * @param watched + * @param event + * @return + */ + bool eventFilter(QObject *watched, QEvent *event) override; + + //------------------------------------------------------------ + + /** + * @brief 选中当前的内置主题项 + * @author ut000125 sunchengxi + * @param expandThemeStr 内置主题项 + * @param action + */ + void checkExtendThemeItem(const QString &expandThemeStr, QAction *&action); + /** + * @brief 选中当前的主题项 + * @author ut000125 sunchengxi + */ + void checkThemeItem(); + /** + * @brief 增加主题菜单 + * @author ut000125 sunchengxi + */ + void addThemeMenuItems(); +public: + /** + * @brief 选择主题项 + * @author ut000125 sunchengxi + */ + void switchThemeAction(QAction *); + /** + * @brief 选择内置主题项 + * @author ut000125 sunchengxi + * @param action + * @param themeNameStr 主题项 + */ + void switchThemeAction(QAction *&action, const QString &themeNameStr); + + +protected slots: + /** + * @brief 基类终端标题变化响应函数 + * @author ut000439 wangpeili + * @param title 标题 + */ + void onTermTitleChanged(QString title); + /** + * @brief 基类创建新窗口响应函数 + * @author ut000439 wangpeili + * @param 工作路径 + */ + void onCreateNewWindow(QString workingDir); + + /** + * @brief 鼠标选择时主题切换触发的槽函数 + * @author ut000125 sunchengxi + */ + void themeActionTriggeredSlot(QAction *); + /** + * @brief 鼠标悬浮主题项时切换触发的槽函数 + * @author ut000125 sunchengxi + */ + void themeActionHoveredSlot(QAction *); + /** + * @brief 设置选中的主题项的槽函数 + * @author ut000125 sunchengxi + */ + void setThemeCheckItemSlot(); + /** + * @brief 主题菜单隐藏时设置主题槽函数 + * @author ut000125 sunchengxi + */ + void menuHideSetThemeSlot(); + + void slotShowRenameTabDialog(QString Identifier); + void slotMenuCloseOtherTab(QString Identifier); + void slotMenuCloseTab(QString Identifier); + void slotTabBarClicked(int index, QString tabIdentifier); + void slotTabCloseRequested(int index); + void slotTabAddRequested(); + void slotTabCurrentChanged(int index); + + void slotNewWindowActionTriggered(); + void slotClickNewWindowTimeout(); + void slotOptionButtonPressed(); + + void slotFileChanged(); + void slotLastTermClosed(const QString &identifier); + void slotDDialogFinished(int result); + + void slotShortcutBuiltinCopy(); + void slotShortcutBuiltinPaste(); + void slotShortcutFocusOut(); + void slotShortcutRemoteManage(); + void slotShortcutCustomCommand(); + void slotShortcutDisplayShortcuts(); + void slotShortcutRenameTitle(); + void slotShortcutSwitchFullScreen(); + void slotShortcutSelectAll(); + void slotShortcutDefaultSize(); + void slotShortcutZoomOut(); + void slotShortcutZoomIn(); + void slotShortcutFind(); + void slotShortcutPaste(); + void slotShortcutCopy(); + void slotShortcutCloseOtherWorkspaces(); + void slotShortcutCloseWorkspace(); + void slotShortcutSelectRightWorkspace(); + void slotShortcutSelectLeftWorkspace(); + void slotShortcutSelectLowerWorkspace(); + void slotShortcutSelectUpperWorkspace(); + void slotShortcutVerticalSplit(); + void slotShortcutHorizonzalSplit(); + void slotShortcutNextTab(); + void slotShortcutPreviousTab(); + void slotShortcutCloseOtherTabs(); + void slotShortcutCloseTab(); + void slotShortcutNewTab(); + void slotShortcutSwitchActivated(); + + void slotDialogSelectFinished(int code); + void slotCustomCommandActionTriggered(); + +protected: + /** + * @brief 基类初始化UI界面 + * @author ut000439 wangpeili + */ + void initUI(); + /** + * @brief 基类初始化窗口 + * @author ut000439 wangpeili + */ + void initWindow(); + /** + * @brief 设置默认位置,最大化,全屏还原使用 + * @author n014361 王培利 + */ + void setDefaultLocation(); + /** + * @brief 首个普通窗口,需要居中显示 + * @author ut000439 王培利 + */ + void singleFlagMove(); + /** + * @brief 基类获取配置窗口状态 + * @author ut000439 wangpeili + * @return + */ + QString getConfigWindowState(); + /** + * @brief 获取半屏大小(高度-1,如果不-1,最大后无法正常还原) + * @author n014361 王培利 + * @return + */ + QSize halfScreenSize(); + /** + * @brief 基类初始化插件 + * @author ut000439 wangpeili + */ + void initPlugins(); + /** + * @brief 基类初始化快捷键 + * @author ut000439 wangpeili + */ + void initShortcuts(); + /** + * @brief 基类初始化连接 + * @author ut000439 wangpeili + */ + void initConnections(); + /** + * @brief 基类初始化标签栏 + * @author ut000439 wangpeili + */ + void initTabBar(); + /** + * @brief 普通模式下,option button需要在全屏时切换控件 + * @author n014361 王培利 + */ + void initOptionButton(); + /** + * @brief option menu初始化 + * @author n014361 王培利 + */ + void initOptionMenu(); + /** + * @brief 初始化文件检测 + * @author ut000442 zhaogongqiang + */ + void initFileWatcher(); + + /** + * @brief 基类设置新终端页面 + * @author ut000439 wangpeili + * @param termPage 终端页面 + * @param activePage + */ + void setNewTermPage(TermWidgetPage *termPage, bool activePage = true); + + /** + * @brief 基类获取窗口信息配置路径 + * @author ut000439 wangpeili + * @return + */ + QString getWinInfoConfigPath(); + void handleTitleBarMenuFocusPolicy(); + + /** + * @brief 基类判断标签是否访问了 + * @author ut000439 wangpeili + * @param tabIdentifier 标签识别码 + * @return + */ + bool isTabVisited(const QString &tabIdentifier); + /** + * @brief 基类判断是否是标签更改颜色 + * @author ut000439 wangpeili + * @param tabIdentifier 标签识别码 + * @return + */ + bool isTabChangeColor(const QString &tabIdentifier); + /** + * @brief 更新标签页状态 + * @author ut000439 wangpeili + */ + void updateTabStatus(); + + // 终端退出保护 + bool closeConfirm(); + + /** + * @brief 显示快捷键列表信息 + * @author n014361 王培利 + */ + void displayShortcuts(); + /** + * @brief 创建Json组信息 + * @author n014361 王培利 + * @param keyCategory 类别 + * @param jsonGroups Json组信息 + */ + void createJsonGroup(const QString &keyCategory, QJsonArray &jsonGroups); + /** + * @brief 创建内置快捷键管理 + * @author n014361 王培利 + * @param key 快捷键 + * @param AutoRepeat 是否可以连续触发快捷键, 默认可以 + * @return + */ + QShortcut *createNewShotcut(const QString &key, bool AutoRepeat = true); + //--added by qinyaning(nyq) 2020.4.13 18:21 解决无法从服务器下载文件的问题// + /** + * @brief 基类按下Enter键函数 + * @author ut000439 wangpeili + * @param text + */ + void pressEnterKey(const QString &text); + + /** + * @brief mainwindow创建结束记录 + * @author ut000439 王培利 + */ + void createWindowComplete(); + /** + * @brief 首个终端创建成功结束, 统计各个时间 + * @author ut000439 王培利 + */ + void firstTerminalComplete(); + + /** + * @brief 递归遍历,获取obj下ObjectName不为空的children + * @param obj + * @return + */ + QObjectList getNamedChildren(QObject *obj); + + /** + * @brief 设置titlebar的子控件为NoFocus + * @param titlebar + */ + void setTitlebarNoFocus(QWidget * titlebar); + +protected: + // 初始化标题栏 + virtual void initTitleBar() = 0; + // 初始化窗口属性 + virtual void initWindowAttribute() = 0; + +public: + // 保存窗口尺寸 + virtual void saveWindowSize() = 0; + // 切换全屏 + virtual void switchFullscreen(bool forceFullscreen = false) = 0; + // 显示快捷键功能 + virtual QPoint calculateShortcutsPreviewPoint() = 0; + // 处理雷神窗口丢失焦点自动隐藏功能 + virtual void onAppFocusChangeForQuake() = 0; + // 根据字体和字体大小设置最小高度 + virtual void setWindowMinHeightForFont() = 0; + /******** Add by ut001000 renfeixiang 2020-08-07:基类中定义更新最小高度函数的纯虚函数***************/ + virtual void updateMinHeight() = 0; + +protected: + QMenu *m_menu = nullptr; + TabBar *m_tabbar = nullptr; + QWidget *m_centralWidget = nullptr; + QVBoxLayout *m_centralLayout = nullptr; + QStackedWidget *m_termStackWidget = nullptr; + QList m_plugins; + TermProperties m_properties; + TitleBar *m_titleBar = nullptr; + bool m_isQuakeWindow = false; + QMap m_tabVisitMap; + QMap m_tabChangeColorMap; + + /******** Modify by n014361 wangpeili 2020-02-20: 内置快捷键集中管理 ****************/ + QMap m_builtInShortcut; + /********************* Modify by n014361 wangpeili End ************************/ + QString downloadFilePath = ""; + RemoteManagementPlugin *remoteManagPlugin = nullptr; + CustomCommandPlugin *customCommandPlugin = nullptr; + QString m_strWindowId; + const char *cmd = "ps -elf|grep deepin-terminal$ |wc -l"; + + /******** Modify by m000714 daizhengwen 2020-03-29: 终端窗口配置 ****************/ + QSettings *m_winInfoConfig = nullptr; + /********************* Modify by m000714 daizhengwen End ************************/ + QString m_CurrentShowPlugin = PLUGIN_TYPE_NONE; + +protected: + // 是否需要保存位置开关,雷神窗口不关心这个参数 + bool m_IfUseLastSize = false; + // 雷神终端所在桌面 + int m_desktopIndex = 0; + bool m_hasConfirmedClose = false; + + // 对应的程序启动时间,主进程或子进程 + qint64 m_ReferedAppStartTime = 0; + // MainWindow开始创建的时间 + qint64 m_CreateWindowTime = 0; + // MainWindow创建结束的时间 + qint64 m_WindowCompleteTime = 0; + // 第一个Terminal创建完成时间 + qint64 m_FirstTerminalCompleteTime = 0; + + // ID + int m_MainWindowID = 0; + // 创建第一个终端完成时,需要记录 + bool hasCreateFirstTermialComplete = false; + +public: + //主题菜单 + SwitchThemeMenu *switchThemeMenu = nullptr; + //浅色主题快捷键 + QAction *lightThemeAction = nullptr; + //深色主题快捷键 + QAction *darkThemeAction = nullptr; + //跟随系统主题快捷键 + QAction *autoThemeAction = nullptr; + + //内置主题1快捷键 + QAction *themeOneAction = nullptr; + //内置主题2快捷键 + QAction *themeTwoAction = nullptr; + //内置主题3快捷键 + QAction *themeThreeAction = nullptr; + //内置主题4快捷键 + QAction *themeFourAction = nullptr; + //内置主题5快捷键 + QAction *themeFiveAction = nullptr; + //内置主题6快捷键 + QAction *themeSixAction = nullptr; + //内置主题7快捷键 + QAction *themeSevenAction = nullptr; + //内置主题8快捷键 + QAction *themeEightAction = nullptr; + //内置主题9快捷键 + QAction *themeNineAction = nullptr; + //内置主题10快捷键 + QAction *themeTenAction = nullptr; + //自定义主题快捷键 + QAction *themeCustomAction = nullptr; + + //主题快捷键组 + QActionGroup *group = nullptr; + + //当前勾选的菜单主题快捷键 + QAction *currCheckThemeAction = nullptr; + + //用于保存identifier/TermWidgetPage键值对的map + QMap m_termWidgetPageMap; + + bool m_isInitialized = false; + + QTimer *m_createTimer = nullptr; +}; + +/******************************************************************************* + 1. @类名: NormalWindow + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 普通终端窗口 +*******************************************************************************/ +class NormalWindow : public MainWindow +{ + Q_OBJECT + +public: + explicit NormalWindow(TermProperties properties, QWidget *parent = nullptr); + ~NormalWindow() override; + /******** Add by ut001000 renfeixiang 2020-08-07:普通窗口不做处理***************/ + virtual void updateMinHeight() override {return;} + +protected: + /** + * @brief 普通终端窗口初始化标题栏 + * @author ut001121 zhangmeng + */ + virtual void initTitleBar() override; + /** + * @brief 初始化窗口属性,标准模式的窗口设置 + * @author n014361 王培利 + */ + virtual void initWindowAttribute() override; + /** + * @brief 普通窗口保存窗口大小 + * @author ut001121 zhangmeng + */ + virtual void saveWindowSize() override; + /** + * @brief 普通窗口全屏切换 + * @author ut001121 zhangmeng + * @param forceFullscreen + */ + virtual void switchFullscreen(bool forceFullscreen = false) override; + /** + * @brief 普通窗口计算快捷预览显示坐标 + * @author ut000439 wangpeili + * @return + */ + virtual QPoint calculateShortcutsPreviewPoint() override; + /** + * @brief 普通窗口处理雷神窗口丢失焦点自动隐藏功能,普通窗口不用该函数 + * @author ut001121 zhangmeng + */ + virtual void onAppFocusChangeForQuake() override; + // 根据字体和字体大小设置最小高度 + virtual void setWindowMinHeightForFont() override {return;} + +protected: + /** + * @brief 普通窗口变化事件 + * @author ut001121 zhangmeng + * @param event 窗口变化事件 + */ + void changeEvent(QEvent *event) override; +}; + +/******************************************************************************* + 1. @类名: QuakeWindow + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 雷神终端窗口 +*******************************************************************************/ +class QuakeWindow : public MainWindow +{ + Q_OBJECT + //之前修改代码误删了这个属性,导致雷神动画失效,而且会导致雷神窗口属性异常(第一次雷神不可关闭,隐藏/显示后可关闭) + //fix bug:63057 dock栏雷神终端缩略图右上角无关闭x按钮 + Q_PROPERTY(int height READ height WRITE setHeight) + // 雷神resize是否拖拽的状态 + enum Quake_Resize_State { + // 不进行resize + Quake_NoResize = 0, + // 正在resize + Quake_Resize = 1, + // 准备resize + Quake_Prepare_Resize = 2 + }; + +public: + explicit QuakeWindow(TermProperties properties, QWidget *parent = nullptr); + ~QuakeWindow() override; + + /******** Add by ut001000 renfeixiang 2020-08-07:用于雷神窗口增加和减少横向分屏时,对雷神窗口的自小高进行修改,bug#41436***************/ + /** + * @brief 用于雷神窗口增加和减少横向分屏时,对雷神窗口的自小高进行修改,bug#41436 + * @author ut001000 任飞翔 + */ + virtual void updateMinHeight() override; + + /** + * @brief 给出当前桌面雷神是否显示 + * @author ut000610 戴正文 + * @return + */ + bool isShowOnCurrentDesktop(); + /** + * @brief 隐藏雷神终端 + * @author ut000610 戴正文 + */ + void hideQuakeWindow(); + /** + * @brief 切换窗口拉伸属性 + * @author ut001121 张猛 + */ + void switchEnableResize(); + /** + * @brief 是否开放窗口拉伸属性 + * @author ut001121 张猛 + * @param isEnable true 可以拉伸;false 不可以拉伸 + */ + void switchEnableResize(bool isEnable); + + /******** Add by ut001000 renfeixiang 2020-11-16:增加 雷神窗口动画效果函数 Begin***************/ + //设置雷神动画效果是否正在执行 + void setAnimationFlag(bool flag) {isNotAnimation = flag;} + /** + * @brief 雷神窗口从上而下的动画效果函数 + * @author ut001000 任飞翔 + */ + void topToBottomAnimation(); + /** + * @brief 雷神窗口从下而上的动画效果函数 + * @author ut001000 任飞翔 + */ + void bottomToTopAnimation(); + /******** Add by ut001000 renfeixiang 2020-11-16 End***************/ + +public slots: + /** + * @brief 处理resize信号,延迟一段时间处理,避免处理过快,界面显示有延迟 + * @author ut000610 戴正文 + */ + void onResizeWindow(); + + void slotWorkAreaResized(); + + /** + * @brief 雷神窗口从上而下的动画结束的处理 + * @author ut000438 王亮 + */ + void onTopToBottomAnimationFinished(); + + /** + * @brief 雷神窗口从下而上的动画结束的处理 + * @author ut000438 王亮 + */ + void onBottomToTopAnimationFinished(); + +protected: + /** + * @brief 雷神窗口初始化标题栏 + * @author ut001121 zhangmeng + */ + virtual void initTitleBar() override; + /** + * @brief 初始化窗口属性,雷神窗口的特殊设置 + * @author n014361 王培利 + */ + virtual void initWindowAttribute() override; + /** + * @brief 雷神窗口保存雷神窗口大小 + * @author ut001121 zhangmeng + */ + virtual void saveWindowSize() override; + // 切换全屏 + /** + * @brief 全屏切换,雷神窗口不用 + * @author ut001121 zhangmeng + * @param forceFullscreen + */ + virtual void switchFullscreen(bool forceFullscreen = false) override; + /** + * @brief 雷神窗口计算快捷键预览位置 + * @author ut001121 zhangmeng + * @return + */ + virtual QPoint calculateShortcutsPreviewPoint() override; + /** + * @brief 处理雷神窗口丢失焦点自动隐藏功能 + * @author ut001121 张猛 + */ + virtual void onAppFocusChangeForQuake() override; + /** + * @brief 雷神窗口根据字体和字体大小设置最小高度 + * @author ut001000 任飞翔 + */ + virtual void setWindowMinHeightForFont() override; + +protected: + /** + * @brief 雷神窗口变化事件 + * @author ut001121 zhangmeng + * @param event 雷神窗口变化事件 + */ + void changeEvent(QEvent *event) override; + /** + * @brief 窗口显示事件 + * @author ut001121 张猛 + * @param event 窗口显示事件 + */ + void showEvent(QShowEvent *event) override; + /** + * @brief 窗口事件 + * @author ut001121 张猛 + * @param event 窗口事件 + * @return + */ + bool event(QEvent *event) override; + /** + * @brief 事件过滤器,处理雷神相关的事件resize + * @author ut000610 戴正文 + * @param watched + * @param event + * @return + */ + bool eventFilter(QObject *watched, QEvent *event) override; + +private: + // 雷神窗口resize状态 默认noresize + Quake_Resize_State m_resizeState = Quake_NoResize; + // 雷神窗口的高度 + int m_quakeWindowHeight; + // 雷神resize的定时器 + QTimer *m_resizeTimer = nullptr; + // 记录雷神是否当前桌面显示 + QMap m_desktopMap; + + //Add by ut001000 renfeixiang 2020-11-16 + //获取配置文件中保存的雷神窗口高度 + int getQuakeHeight() {return m_winInfoConfig->value(CONFIG_QUAKE_WINDOW_HEIGHT).toInt();} + /** + * @brief 动画效果使用的设置雷神窗口高度的函数 + * @author ut001000 任飞翔 + * @param h 雷神窗口高度 + */ + void setHeight(int h); + /** + * @brief 计算雷神动画时间函数 + * @author ut001000 任飞翔 + * @return + */ + int getQuakeAnimationTime(); + + //函数的名称和实现都是按照dtk中复制,dtk项目生成的窗口可直接调用此函数 + /** + * @brief Get atom identifier by name + * @param connection The connection + * @param name The name of the atom. + * @param only_if_exists Return a valid atom id only if the atom already exists. + * @return A cookie + */ + xcb_atom_t internAtom(xcb_connection_t *connection, const char *name, bool only_if_exists); + + /** + * @brief internAtom + * @param name + * @param only_if_exists + * @return + */ + xcb_atom_t internAtom(const char *name, bool only_if_exists = true); + + /** + * @brief 设置窗口属性 不可移动 + * @param forhibit + */ + void sendWindowForhibitMove(bool forhibit); +}; + +#endif // MAINWINDOW_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/mainwindowplugininterface.h deepin-terminal-5.4.13/src/main/mainwindowplugininterface.h --- deepin-terminal-5.0.0+ds1/src/main/mainwindowplugininterface.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/mainwindowplugininterface.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef MAINWINDOWPLUGININTERFACE_H +#define MAINWINDOWPLUGININTERFACE_H + +#include + +/******************************************************************************* + 1. @函数: MainWindowPluginInterface + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class MainWindow; +class MainWindowPluginInterface : public QObject +{ + Q_OBJECT +public: + explicit MainWindowPluginInterface(QObject *parent = nullptr) : QObject(parent) + { + } + + // 初始化插件 + virtual void initPlugin(MainWindow *mainWindow) = 0; + // 设置标题上的菜单 + virtual QAction *titlebarMenu(MainWindow *mainWindow) = 0; + + // 获取标题名称 + QString getPluginName() + { + return m_pluginName; + } + + // 插件名称 + QString m_pluginName; + // 当前插件状态 + bool m_isShow = false; +}; + +#endif // MAINWINDOWPLUGININTERFACE_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/service.cpp deepin-terminal-5.4.13/src/main/service.cpp --- deepin-terminal-5.0.0+ds1/src/main/service.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/service.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,504 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "service.h" +#include "utils.h" +#include "define.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +Service *Service::g_pService = nullptr; + +Service *Service::instance() +{ + if(nullptr == g_pService) { + g_pService = new Service(); + } + return g_pService; +} + +Service::~Service() +{ + if (nullptr != m_settingDialog) { + delete m_settingDialog; + m_settingDialog = nullptr; + } + if (nullptr != m_settingOwner) { + delete m_settingOwner; + m_settingOwner = nullptr; + } + if (nullptr != m_settingShortcutConflictDialog) { + delete m_settingShortcutConflictDialog; + m_settingShortcutConflictDialog = nullptr; + } + if (nullptr != m_customThemeSettingDialog) { + delete m_customThemeSettingDialog; + m_customThemeSettingDialog = nullptr; + } +} + +void Service::init() +{ + // 初始化自定义快捷键 + ShortcutManager::instance()->initShortcuts(); + // 初始化远程管理数据 + ServerConfigManager::instance()->initServerConfig(); + // 主进程:首次赋值m_pShareMemoryInfo + listenWindowEffectSwitcher(); +} + +void Service::releaseInstance() +{ + if (nullptr != g_pService) { + delete g_pService; + g_pService = nullptr; + } +} + +void Service::initSetting() +{ + if (nullptr != m_settingDialog) + return; + + QDateTime startTime = QDateTime::currentDateTime(); + m_settingDialog = new DSettingsDialog(); + m_settingDialog->setObjectName("SettingDialog"); + // 关闭后将指针置空,下次重新new + connect(m_settingDialog, &DSettingsDialog::finished, this, &Service::slotSettingsDialogFinished); + // 关闭时delete + m_settingDialog->widgetFactory()->registerWidget("fontcombobox", Settings::createFontComBoBoxHandle); + m_settingDialog->widgetFactory()->registerWidget("slider", Settings::createCustomSliderHandle); + m_settingDialog->widgetFactory()->registerWidget("spinbutton", Settings::createSpinButtonHandle); + m_settingDialog->widgetFactory()->registerWidget("shortcut", Settings::createShortcutEditOptionHandle); + m_settingDialog->widgetFactory()->registerWidget("tabformatedit", Settings::createTabTitleFormatOptionHandle); + m_settingDialog->widgetFactory()->registerWidget("remotetabformatedit", Settings::createRemoteTabTitleFormatOptionHandle); + m_settingDialog->widgetFactory()->registerWidget("shellconfigcombox", Settings::createShellConfigComboxOptionHandle); + // 将数据重新读入 + m_settingDialog->updateSettings(Settings::instance()->settings); + // 设置窗口模态为没有模态,不阻塞窗口和进程 + m_settingDialog->setWindowModality(Qt::NonModal); + // 让设置与窗口等效,隐藏后显示就不会被遮挡 + m_settingDialog->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint); + moveToCenter(m_settingDialog); + QDateTime endTime = QDateTime::currentDateTime(); + + //判断未开启窗口特效时,隐藏透明度/背景模糊选项 + if (!DWindowManagerHelper::instance()->hasComposite()) { + showHideOpacityAndBlurOptions(false); + return; + } + + showHideOpacityAndBlurOptions(isWindowEffectEnabled()); +} + +void Service::slotSettingsDialogFinished(int result) +{ + Q_UNUSED(result) + //激活设置框的有拥者 + if (m_settingOwner) { + m_settingOwner->activateWindow(); + m_settingOwner->focusCurrentPage(); + } +} + +void Service::showHideOpacityAndBlurOptions(bool isShow) +{ + QWidget *rightFrame = m_settingDialog->findChild("RightFrame"); + if (nullptr == rightFrame) { + qInfo() << "can not found RightFrame in QWidget"; + return; + } + + QList rightWidgetList = rightFrame->findChildren(); + for (int i = 0; i < rightWidgetList.size(); i++) { + QWidget *widget = rightWidgetList.at(i); + if (nullptr == widget) + continue; + + if (strcmp(widget->metaObject()->className(), "QCheckBox") == 0) { + QString checkText = (qobject_cast(widget))->text(); + if (QObject::tr("Blur background") == checkText) { + QWidget *optionWidget = widget; + QWidget *parentWidget = widget->parentWidget(); + if (parentWidget && strcmp(parentWidget->metaObject()->className(), "Dtk::Widget::DFrame") == 0) + optionWidget = parentWidget; + + if (isShow) + optionWidget->show(); + else + optionWidget->hide(); + } + } else if (strcmp(widget->metaObject()->className(), "Dtk::Widget::DSlider") == 0) { + QWidget *optionWidget = widget; + QWidget *parentWidget = widget->parentWidget(); + if (parentWidget && strcmp(parentWidget->metaObject()->className(), "Dtk::Widget::DFrame") == 0) + optionWidget = parentWidget; + + if (isShow) + optionWidget->show(); + else + optionWidget->hide(); + } else if (strcmp(widget->metaObject()->className(), "QLabel") == 0) { + QString lblText = (qobject_cast(widget))->text(); + if (lblText == QObject::tr("Opacity")) { + QWidget *optionWidget = widget; + QWidget *parentWidget = widget->parentWidget(); + if (parentWidget && strcmp(parentWidget->metaObject()->className(), "Dtk::Widget::DFrame") == 0) + optionWidget = parentWidget; + + if (isShow) + optionWidget->show(); + else + optionWidget->hide(); + } + } else { + //do nothing + } + } +} + +void Service::listenWindowEffectSwitcher() +{ + if (nullptr == m_wmSwitcher) { + m_wmSwitcher = new WMSwitcher(WMSwitcherService, WMSwitcherPath, QDBusConnection::sessionBus(), this); + m_wmSwitcher->setObjectName("WMSwitcher");//Add by ut001000 renfeixiang 2020-08-13 + connect(m_wmSwitcher, &WMSwitcher::WMChanged, this, &Service::slotWMChanged, Qt::QueuedConnection); + } +} + +void Service::slotWMChanged(const QString &wmName) +{ + bool isWinEffectEnabled = false; + if (wmName == "deepin wm") + isWinEffectEnabled = true; + + showHideOpacityAndBlurOptions(isWinEffectEnabled); + emit onWindowEffectEnabled(isWinEffectEnabled); +} + +bool Service::isWindowEffectEnabled() +{ + QDBusMessage msg = QDBusMessage::createMethodCall(WMSwitcherService, WMSwitcherPath, WMSwitcherService, "CurrentWM"); + + QDBusMessage response = QDBusConnection::sessionBus().call(msg); + if (response.type() == QDBusMessage::ReplyMessage) { + QList list = response.arguments(); + QString wmName = list.first().toString(); + if (wmName == "deepin wm") { + qInfo() << "The window effects is on"; + return true; + } + } else { + qInfo() << "call CurrentWM Fail!" << response.errorMessage(); + } + + qInfo() << "The window effects is off"; + return false; +} + +qint64 Service::getEntryTime() +{ + return m_entryTime; +} + +void Service::setScrollerTouchGesture(QAbstractScrollArea *widget) +{ + QScroller::grabGesture(widget->viewport(), QScroller::TouchGesture); + + connect(QScroller::scroller(widget->viewport()), &QScroller::stateChanged, widget, [widget](QScroller::State newstate) { + // fix bug#66335 触摸屏上滑动远程管理/自定义命令滚动条,列表滑动动画显示异常 + // 防止滑动时的鼠标事件导致viewport位置发生偏移。 + bool isDragging = (newstate == QScroller::Dragging); + widget->viewport()->setAttribute(Qt::WA_TransparentForMouseEvents, isDragging); + }); +} + + +QMap Service::getShells() +{ + // 清空原有数据 + m_shellsMap.clear(); + // 需要读取/etc/shells + QFile shellsInfo(QStringLiteral("/etc/shells")); + if (shellsInfo.open(QIODevice::ReadOnly)) { + // 只读 + QTextStream stream(&shellsInfo); + QString shellLine; + // 循环读取 + do { + QString shellPath; + shellLine = stream.readLine(); + // 忽略注释 + if (!shellLine.startsWith(QLatin1String("#")) && !shellLine.isNull() && !shellLine.isEmpty()) { + // 获取shell所在目录 + shellPath = shellLine; + // 获取shell进程名称 + QStringList shellPaths = shellPath.split(QLatin1String("/")); + QString shellProgram = shellPaths.back(); + // 添加数据入map + m_shellsMap.insert(shellProgram, shellPath); + } + } while (!shellLine.isNull()); + } else { + qInfo() << "read /etc/shells fail! error : " << shellsInfo.error(); + } + // 关闭文件 + shellsInfo.close(); + return m_shellsMap; +} + +QMap Service::shellsMap() +{ + return m_shellsMap; +} + +void Service::setMainTerminalIsStarted(bool started) +{ + m_mainTerminalIsStarted = started; +} + +bool Service::mainTerminalIsStarted() +{ + return m_mainTerminalIsStarted; +} + +void Service::showSettingDialog(MainWindow *pOwner) +{ + // 第一次初始化dialog + initSetting(); + //保存设置框的有拥者 + m_settingOwner = pOwner; + if (nullptr != m_settingDialog) { + //雷神需要让窗口置顶,可是普通窗口不要 + if (m_settingOwner == WindowsManager::instance()->getQuakeWindow()) { + m_settingDialog->setWindowFlag(Qt::WindowStaysOnTopHint); + } else { + // 雷神窗口失去焦点自动隐藏 + if (WindowsManager::instance()->getQuakeWindow()) + WindowsManager::instance()->getQuakeWindow()->onAppFocusChangeForQuake(); + + m_settingDialog->setWindowFlag(Qt::WindowStaysOnTopHint, false); + } + //更新设置的等宽字体 + Settings::instance()->handleWidthFont(); + FontFilter::instance()->handleWidthFont(); + + // 重新加载shell配置数据 + Settings::instance()->reloadShellOptions(); + m_settingDialog->show(); + } else { + qInfo() << "No setting dialog."; + return; + } + // 激活窗口 + m_settingDialog->activateWindow(); +} + +void Service::hideSettingDialog() +{ + if (m_settingDialog) + m_settingDialog->hide(); +} + +void Service::showCustomThemeSettingDialog(MainWindow *pOwner) +{ + //保存设置框的有拥者 + m_settingOwner = pOwner; + if (nullptr != m_customThemeSettingDialog) { + //雷神需要让窗口置顶,可是普通窗口不要 + if (m_settingOwner == WindowsManager::instance()->getQuakeWindow()) { + m_customThemeSettingDialog->setWindowFlag(Qt::WindowStaysOnTopHint); + } else { + // 雷神窗口失去焦点自动隐藏 + if (WindowsManager::instance()->getQuakeWindow()) + WindowsManager::instance()->getQuakeWindow()->onAppFocusChangeForQuake(); + + m_customThemeSettingDialog->setWindowFlag(Qt::WindowStaysOnTopHint, false); + } + } else { + m_customThemeSettingDialog = new CustomThemeSettingDialog(); + + connect(m_customThemeSettingDialog, &CustomThemeSettingDialog::finished, this, &Service::slotCustomThemeSettingDialogFinished); + // 设置窗口模态为没有模态,不阻塞窗口和进程 + m_customThemeSettingDialog->setWindowModality(Qt::NonModal); + // 让设置与窗口等效,隐藏后显示就不会被遮挡 + m_customThemeSettingDialog->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint); + moveToCenter(m_customThemeSettingDialog); + } + + m_customThemeSettingDialog->show(); + + // 激活窗口 + m_customThemeSettingDialog->activateWindow(); +} + +void Service::slotCustomThemeSettingDialogFinished(int result) +{ + if (CustomThemeSettingDialog::Accepted == result) { + m_settingOwner->switchThemeAction(m_settingOwner->themeCustomAction, Settings::instance()->m_configCustomThemePath); + return; + } +} + +void Service::showShortcutConflictMsgbox(QString txt) +{ + // 同步提示和快捷键 + for (QString key : ShortcutManager::instance()->m_mapReplaceText.keys()) { + if (txt.contains(key)) + txt.replace(key, ShortcutManager::instance()->m_mapReplaceText[key]); + } + // 若没有设置弹框则退出,谈不上显示设置的快捷键冲突 + if (nullptr == m_settingDialog) + return; + + // 若没有弹窗,初始化 + if (nullptr == m_settingShortcutConflictDialog) { + m_settingShortcutConflictDialog = new DDialog(m_settingDialog); + m_settingShortcutConflictDialog->setObjectName("ServiceSettingShortcutConflictDialog"); + m_settingShortcutConflictDialog->setIcon(QIcon::fromTheme("dialog-warning")); + //将确认按钮设置为默认按钮 + m_settingShortcutConflictDialog->addButton(tr("OK", "button"), true, DDialog::ButtonNormal); + + connect(m_settingShortcutConflictDialog, &DDialog::finished, this, &Service::slotSettingShortcutConflictDialogFinished); + } + m_settingShortcutConflictDialog->setTitle(txt + QObject::tr("please set another one.")); + m_settingShortcutConflictDialog->show(); + // 将冲突窗口移到窗口中央 + moveToCenter(m_settingShortcutConflictDialog); +} + +void Service::slotSettingShortcutConflictDialogFinished() +{ + delete m_settingShortcutConflictDialog; + m_settingShortcutConflictDialog = nullptr; +} + +bool Service::isCountEnable() +{ + return WindowsManager::instance()->widgetCount() < MAXWIDGETCOUNT; +} + +void Service::Entry(QStringList arguments) +{ + EntryTerminal(arguments, false); +} + +void Service::EntryTerminal(QStringList arguments, bool isMain) +{ + m_entryTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + TermProperties properties; + Utils::parseCommandLine(arguments, properties); + // 雷神处理入口 + if (properties[QuakeMode].toBool()) { + WindowsManager::instance()->runQuakeWindow(properties); + return; + } + + //首次启动的终端未启动 + if(!isMain && !mainTerminalIsStarted()) + return; + // 超出最大窗口数量 + if(WindowsManager::instance()->widgetCount() >= MAXWIDGETCOUNT) { + qInfo() << QString("terminal cannot be created: %1/%2 ") + .arg(WindowsManager::instance()->widgetCount()) + .arg(MAXWIDGETCOUNT) + ; + return; + } + WindowsManager::instance()->createNormalWindow(properties); +} + +void Service::onDesktopWorkspaceSwitched(int curDesktop, int nextDesktop) +{ + Q_UNUSED(curDesktop) + + // 获取雷神窗口 + QuakeWindow *window = static_cast(WindowsManager::instance()->getQuakeWindow()); + // 没有雷神,直接返回 + if (nullptr == window) + return; + // 雷神在所在桌面是否显示 + bool isQuakeVisible = window->isShowOnCurrentDesktop(); + // 判断下一个窗口是否是雷神所在的窗口 + if (nextDesktop != window->getDesktopIndex()) { + // 下一个桌面不是当前桌面,隐藏 + if (isQuakeVisible) { + // 根据雷神显隐,判断此时雷神的显隐,若已经隐了,不用再隐 + window->hide(); + } + window->hide(); + } else { + // 下一个是雷神的窗口 + if (isQuakeVisible) { + // 根据雷神显隐,判断此时雷神的显隐 + window->show(); + window->activateWindow(); + } + // 另一种情况,雷神已经是隐藏状态不用再影藏 + } +} + +Service::Service(QObject *parent) : QObject(parent) +{ + Utils::set_Object_Name(this); + init(); +} + +bool Service::getIsDialogShow() const +{ + return m_isDialogShow; +} + +void Service::setIsDialogShow(QWidget *parent, bool isDialogShow) +{ + MainWindow *window = qobject_cast(parent); + if(nullptr == window) + return; + if (window == WindowsManager::instance()->getQuakeWindow()) { + qInfo() << "QuakeWindow show or hide dialog " << isDialogShow; + m_isDialogShow = isDialogShow; + } + + if (true == isDialogShow) { + // 对话框显示,终端窗口禁用 + window->setEnabled(false); + } else { + // 对话框隐藏或关闭,终端窗口启用,焦点重回终端 + window->setEnabled(true); + window->focusCurrentPage(); + } +} + +void Service::slotShowSettingsDialog() +{ + MainWindow *mainWindow = qobject_cast(sender()->parent()); + Service::instance()->showSettingDialog(mainWindow); +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/service.h deepin-terminal-5.4.13/src/main/service.h --- deepin-terminal-5.0.0+ds1/src/main/service.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/service.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,295 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef SERVICE_H +#define SERVICE_H + +#include "termproperties.h" +#include "windowsmanager.h" +#include "shortcutmanager.h" +#include "settings.h" +#include "customthemesettingdialog.h" + +#include +#include + +#include +#include +#include + +#include + +DWIDGET_USE_NAMESPACE + +using WMSwitcher = com::deepin::WMSwitcher; +#define WMSwitcherService "com.deepin.WMSwitcher" +#define WMSwitcherPath "/com/deepin/WMSwitcher" + +/** + * @brief 全局的后台服务类 + * 管理所有底层数据的加载 + * 管理所有特殊的通知信号 + * 管理所有程序入口 + */ +class Service : public QObject +{ + Q_OBJECT +public: + /** + * @brief Service的单例 + * @return + */ + static Service *instance(); + + /** + * @brief 释放 + */ + static void releaseInstance(); + + /** + * @brief 初始化设置框,在窗口现实后初始化,使第一次出现设置框不至于卡顿 + */ + void initSetting(); + + /** + * @brief 显示设置框 + */ + void showSettingDialog(MainWindow *pOwner); + + /** + * @brief 隐藏设置框 + */ + void hideSettingDialog(); + + /** + * @brief 显示自定义主题设置框 + */ + void showCustomThemeSettingDialog(MainWindow *pOwner); + + /** + * @brief 显示设置快捷键冲突弹窗 + */ + void showShortcutConflictMsgbox(QString txt); + + /** + * @brief 设置框是否显示 + */ + inline bool isSettingDialogVisible() + { + return m_settingDialog ? m_settingDialog->isVisible() : false; + } + + /** + * @brief 获取设置框的所有者 + */ + inline MainWindow *getSettingOwner() + { + return m_settingOwner; + } + + /** + * @brief 重置设置框的所有者 + */ + inline void resetSettingOwner() + { + m_settingOwner = nullptr; + } + + /** + * @brief i从term数量的角度判断是否允许继续创建 + * @return + */ + bool isCountEnable(); + + /** + * @brief 获取是否是对话框显示 + * @return + */ + bool getIsDialogShow() const; + + /** + * @brief 设置是否对话框显示 + * @param parent + * @param isDialogShow + */ + void setIsDialogShow(QWidget *parent, bool isDialogShow); + + /** + * @brief 判断当前是否开启窗口特效, 开启-true 关闭-false + * @return + */ + bool isWindowEffectEnabled(); + + /** + * @brief 获取主程序初始进入的时间 + */ + qint64 getEntryTime(); + + /** + * @brief 设置scroll的滚动模式 + * @param widget Scroll + */ + void setScrollerTouchGesture(QAbstractScrollArea *widget); + + /** + * @brief 从/etc/shells获取shell列表 + */ + QMap getShells(); + + /** + * @brief 获取shells的map,不读取/etc/shells + */ + QMap shellsMap(); + + /** + * @brief 设置主程序是否启动 + * @param started 是否启动 + */ + void setMainTerminalIsStarted(bool started); + + /** + * @brief 主程序是否启动 + */ + bool mainTerminalIsStarted(); + +signals: + /** + * @brief 刷新面板 + * @param oldCmdName:旧的名称 + * @param newCmdName:新的名称 + */ + void refreshCommandPanel(QString oldCmdName, QString newCmdName); + + /** + * @brief 切换编码列表的编码 + * @param encode:编码 + */ + void checkEncode(QString encode); + + /** + * @brief 当前终端切换 + * @param term:当前终端 + */ + void currentTermChange(QWidget *term); + + /** + * @brief 窗口特效是否开启 + * @param isEnabled + */ + void onWindowEffectEnabled(bool isEnabled); + + /** + * @brief 触控板事件 + * @param name:事件名称 + * @param direction:手势方向 + * @param fingers:手指个数 + */ + void touchPadEventSignal(QString name, QString direction, int fingers); + + /** + * @brief hostnameChanged + */ + void hostnameChanged(); + +public slots: + /** + * @brief 创建窗口的入口,Service进入接口 + * @param arguments + */ + void Entry(QStringList arguments); + + /** + * @brief 创建窗口的入口 + * @param arguments 参数 + * @param isMain 是否主程序 + */ + void EntryTerminal(QStringList arguments, bool isMain = true); + + /** + * @brief 对桌面工作区切换事件的处理 + * @param curDesktop 当前工作区 + * @param nextDesktop 下一个工作区 + */ + void onDesktopWorkspaceSwitched(int curDesktop, int nextDesktop); + + /** + * @brief slotShowSettingsDialog + */ + void slotShowSettingsDialog(); + + /** + * @brief DSettingsDialog对话框关闭后的处理 + * @param result + */ + void slotSettingsDialogFinished(int result); + + /** + * @brief 处理窗口特效打开/关闭时,相关设置项目的显示/隐藏 + * @param wmName + */ + void slotWMChanged(const QString &wmName); + + /** + * @brief 自定义主题对话框关闭后的处理 + * @param result:DialogCode { Rejected, Accepted } + */ + void slotCustomThemeSettingDialogFinished(int result); + + /** + * @brief 快捷键冲突弹窗的完成信号 + */ + void slotSettingShortcutConflictDialogFinished(); + +private: + explicit Service(QObject *parent = nullptr); + + ~Service() override; + + /** + * @brief 显示/隐藏设置的透明度和背景模糊选项-- 仅UOS服务器版本使用 + * @param isShow:显示 + */ + void showHideOpacityAndBlurOptions(bool isShow); + + /** + * @brief 监听窗口特效开关对应DBus信号,并实时显示/隐藏设置的透明度和背景模糊选项 + */ + void listenWindowEffectSwitcher(); + + /** + * @brief 初始化 + */ + void init(); + +private: + static Service *g_pService; + DSettingsDialog *m_settingDialog = nullptr;// 设置框 全局唯一显示 + CustomThemeSettingDialog *m_customThemeSettingDialog = nullptr;// 自定义主题设置对话框 全局唯一 + WMSwitcher *m_wmSwitcher = nullptr; + MainWindow *m_settingOwner = nullptr;// 设置框的所有者 + DDialog *m_settingShortcutConflictDialog = nullptr;// 设置框,快捷键冲突弹窗 + bool m_isDialogShow = false; // 雷神用来判断是否有弹窗显示 + bool m_enable = false; // 是否允许创建新的窗口 + QMap m_shellsMap; + qint64 m_entryTime = 0; // 记录进入的时间,只有创建窗口时,才会来取用这个时间 + bool m_mainTerminalIsStarted = false; +}; + +#endif // SERVICE_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/terminalapplication.cpp deepin-terminal-5.4.13/src/main/terminalapplication.cpp --- deepin-terminal-5.0.0+ds1/src/main/terminalapplication.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/terminalapplication.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,241 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "terminalapplication.h" +#include "mainwindow.h" +#include "service.h" +#include "settings.h" + +// qt +#include + +TerminalApplication::TerminalApplication(int &argc, char *argv[]) : DApplication(argc, argv) +{ + Utils::set_Object_Name(this); + loadTranslator(); + setOrganizationName("deepin"); + setOrganizationDomain("deepin.org"); + setApplicationVersion(VERSION); + setApplicationName("deepin-terminal"); + setApplicationDisplayName(QObject::tr("Terminal")); + setAttribute(Qt::AA_UseHighDpiPixmaps, true); + setProductIcon(QIcon::fromTheme("deepin-terminal")); + QString appDesc = QObject::tr("Terminal is an advanced terminal emulator with workspace" + ", multiple windows, remote management, quake mode and other features."); + setApplicationDescription(appDesc); + + /***add by ut001121 zhangmeng 20200617 禁用应用程序自动退出 修复BUG33541***/ + setQuitOnLastWindowClosed(false); + +#ifdef QT_DEBUG + QTranslator translator; + translator.load(QString("deepin-terminal_%1").arg(QLocale::system().name())); + installTranslator(&translator); +#endif // QT_DEBUG +} + +TerminalApplication::~TerminalApplication() +{ + Service::releaseInstance(); + Settings::releaseInstance(); +} + +void TerminalApplication::setStartTime(qint64 time) +{ + m_AppStartTime = time; +} + +qint64 TerminalApplication::getStartTime() +{ + return m_AppStartTime; +} + +void TerminalApplication::handleQuitAction() +{ + qInfo() << "handleQuitAction"; + activeWindow()->close(); +} + + +bool TerminalApplication::notify(QObject *object, QEvent *event) +{ + // 针对DTK做的特殊处理,等DTK自己完成后,需要删除 + if (QStringLiteral("Dtk::Widget::DKeySequenceEdit") == object->metaObject()->className()) { + // 焦点移除,移除edit + if (QEvent::FocusOut == event->type()) { + DKeySequenceEdit *edit = static_cast(object); + // 包含edit + if (m_keySequenceList.contains(edit)) { + m_keySequenceList.removeOne(edit); + qInfo() << "remove editing when foucs out"; + } + } + if (QEvent::KeyPress == event->type()) { + QKeyEvent *keyevent = static_cast(event); + // 获取DKeySequenceEdit + DKeySequenceEdit *edit = static_cast(object); + // 在dtk的自定义快捷键输入框上按Enter + if (Qt::Key_Enter == keyevent->key() + || Qt::Key_Return == keyevent->key() + || Qt::Key_Space == keyevent->key() + ) { + // 当快捷键输入框内容不为空 + // 设置里的快捷键输入框 + if (!edit->keySequence().isEmpty() + && ("OptionShortcutEdit" == object->objectName() || ("CustomShortCutLineEdit" == object->objectName() && Qt::Key_Space == keyevent->key())) + && !m_keySequenceList.contains(edit)) { + // 找到其中的QLabel + QList childern = edit->findChildren(); + // 发送QMouseEvent + QMouseEvent mouseEvent(QEvent::MouseButtonPress, QPoint(0, 0), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + DApplication::sendEvent(childern[0], &mouseEvent); + // 记录当前KeySequence已经进入编辑状态 + qInfo() << "KeySequence in Editing"; + m_keySequenceList.append(edit); + return true; + } + } + // 不是Enter和space操作,或者没进入记录流程,就删除 + if (m_keySequenceList.contains(edit)) { + // 其他情况的按键,移除edit + m_keySequenceList.removeOne(edit); + qInfo() << "remove editing when others"; + } + } + } + + // ALT+M = 右键 + if (QEvent::KeyPress == event->type()) { + QKeyEvent *keyevent = static_cast(event); + /***add begin by ut001121 zhangmeng 20200801 截获DPushButton控件回车按键事件并模拟空格键点击事件,用以解决回车键不响应的问题***/ + // 回车键 + // 恢复默认 添健按钮 + if ((QStringLiteral("QPushButton") == object->metaObject()->className() + // 远程和自定义列表的返回按钮,编辑按钮 + || QStringLiteral("IconButton") == object->metaObject()->className() + // 搜索框的上下搜索 + || QStringLiteral("Dtk::Widget::DIconButton") == object->metaObject()->className() + // 设置里面的单选框 + || QStringLiteral("QCheckBox") == object->metaObject()->className() + // 设置字体组合框 + || QStringLiteral("QComboBox") == object->metaObject()->className() + // 设置窗口组合框 + || QStringLiteral("ComboBox") == object->metaObject()->className()) + && (Qt::Key_Return == keyevent->key() || Qt::Key_Enter == keyevent->key())) { + DPushButton *pushButton = static_cast(object); + // 模拟空格键按下事件 + pressSpace(pushButton); + return true; + } + /***add end by ut001121***/ + // 左键 + // 远程和自定义列表的返回按钮 Key_Left + if ((QStringLiteral("CustomRebackButton") == object->objectName() + || QStringLiteral("RemoteSearchRebackButton") == object->objectName() + || QStringLiteral("RemoteGroupRebackButton") == object->objectName()) + && Qt::Key_Left == keyevent->key()) { + DPushButton *pushButton = static_cast(object); + // 模拟空格键按下事件 + pressSpace(pushButton); + return true; + } + + if ((Qt::AltModifier == keyevent->modifiers()) && Qt::Key_M == keyevent->key()) { + /***add begin by ut001121 zhangmeng 20200825 模拟发送ContextMenu事件 修复BUG44282***/ + QPoint pos; + QContextMenuEvent menuEvent(QContextMenuEvent::Keyboard, pos); + qInfo() << "------------" << menuEvent.type(); + QApplication::sendEvent(object, &menuEvent); + /***add end by ut001121***/ + + return true; + } + + return QApplication::notify(object, event); + } + +#if 0 + // 快捷键检测 + bool spont = event->spontaneous(); + //qInfo() <type()<< spont<metaObject()->className(); + if ((event->type() == QEvent::KeyPress || event->type() == QEvent::Shortcut) + /*&& QString(object->metaObject()->className()) == "MainWindow"*/) { + + QKeyEvent *keyevent = static_cast(event); + QString keyString; + if (!keyevent->spontaneous() && n == "QWidgetWindow") + // return true; + + if (event->type() == QEvent::Shortcut) { + QShortcutEvent *sevent = static_cast(event); + keyString = QKeySequence(sevent->key()).toString(QKeySequence::PortableText); + // qInfo()<<"Shortcut"<key(); + } + + int uKey = keyevent->key(); + Qt::Key key = static_cast(uKey); + if (key == Qt::Key_unknown) + // nothing {unknown key} + + + if (key == Qt::Key_Control || key == Qt::Key_Shift || key == Qt::Key_Alt) + return false; + + //获取修饰键(Ctrl,Alt,Shift)的状态 + Qt::KeyboardModifiers modifiers = keyevent->modifiers(); + //判断某个修饰键是否被按下化 + if (modifiers & Qt::ShiftModifier) + uKey += Qt::SHIFT; + if (modifiers & Qt::ControlModifier) + uKey += Qt::CTRL; + if (modifiers & Qt::AltModifier) + uKey += Qt::ALT; + + QString keyString2 = QKeySequence(uKey).toString(QKeySequence::PortableText); + qInfo() << keyevent->type() << keyString2 << keyString << object << keyevent->spontaneous() << classname << keyevent->key() + << keyevent->nativeScanCode() << keyevent->nativeVirtualKey() << keyevent->nativeModifiers(); + + } +#endif + + +#if 0 + // 焦点检测 + if (event->type() == QEvent::FocusIn) + qInfo() << "FocusIn:" << object; + +#endif + + return QApplication::notify(object, event); +} + +void TerminalApplication::pressSpace(DPushButton *pushButton) +{ + // 模拟空格键按下事件 + QKeyEvent pressSpace(QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier, " "); + QApplication::sendEvent(pushButton, &pressSpace); + // 设置定时 + QTimer::singleShot(80, this, [pushButton]() { + // 模拟空格键松开事件 + QKeyEvent releaseSpace(QEvent::KeyRelease, Qt::Key_Space, Qt::NoModifier, " "); + QApplication::sendEvent(pushButton, &releaseSpace); + }); +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/terminalapplication.h deepin-terminal-5.4.13/src/main/terminalapplication.h --- deepin-terminal-5.0.0+ds1/src/main/terminalapplication.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/terminalapplication.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TERMINALAPPLICATION_H +#define TERMINALAPPLICATION_H + +#include "environments.h" + +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: TerminalApplication + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 主要是为了拦截信号,调试部分功能使用 +*******************************************************************************/ +class TerminalApplication : public DApplication +{ + Q_OBJECT +public: + TerminalApplication(int &argc, char *argv[]); + ~TerminalApplication(); + // 为了更精确的测算时间,单独设置 + /** + * @brief 把main初始的时间,设置为应用启动时间 + * @author ut000439 王培利 + * @param time 时间 + */ + void setStartTime(qint64 time); + /** + * @brief 只有主进程在创建mainwindow的时候会用到。 + * @author ut000439 王培利 + * @return + */ + qint64 getStartTime(); +protected: + // 重写了app.quit为当前窗口close. + /** + * @brief 重写了app.quit为当前窗口close. + * @author ut000439 wangpeili + */ + void handleQuitAction() override; + /** + * @brief 该部分代码,大都 用于调试,待整理 + * @author ut000439 wangpeili + * @param object + * @param event + * @return + */ + bool notify(QObject *object, QEvent *event); +private: + /** + * @brief 模拟键盘space按压效果 + * @author ut000610 戴正文 + * @param pushButton + */ + void pressSpace(DPushButton *pushButton); + + // APP启动时间 + // 子进程该数据时间会通过共享内存传给对应的maindow + qint64 m_AppStartTime = 0; + // 记录已经进入编辑状态的DKeySequenceEdit + QList m_keySequenceList; +}; + +#endif // TERMINALAPPLICATION_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/termproperties.cpp deepin-terminal-5.4.13/src/main/termproperties.cpp --- deepin-terminal-5.0.0+ds1/src/main/termproperties.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/termproperties.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "termproperties.h" + +TermProperties::TermProperties(QString workingDir) +{ + m_properties.insert(WorkingDir, workingDir); +} + +TermProperties::TermProperties(QString workingDir, QString colorScheme) +{ + m_properties.insert(WorkingDir, workingDir); + m_properties.insert(ColorScheme, colorScheme); +} + +TermProperties::TermProperties(QMap list) : m_properties(list) +{ +} + +void TermProperties::setWorkingDir(QString workingDir) +{ + m_properties.insert(WorkingDir, workingDir); +} + +void TermProperties::setTermPropertyMap(QMap list) +{ + m_properties = list; +} + +bool TermProperties::contains(TermProperty propertyType) const +{ + return m_properties.contains(propertyType); +} + +QVariant &TermProperties::operator[](const TermProperty &key) +{ + return m_properties[key]; +} + +const QVariant TermProperties::operator[](const TermProperty &key) const +{ + return m_properties[key]; +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/termproperties.h deepin-terminal-5.4.13/src/main/termproperties.h --- deepin-terminal-5.0.0+ds1/src/main/termproperties.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/termproperties.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TERMPROPERTIES_H +#define TERMPROPERTIES_H + +#include + +enum TermProperty { + SingleFlag, // mainwindow使用, 默认为false + QuakeMode, // mainwindow使用, 右键菜单要用到. + WorkingDir, // 每个terminal单独使用 + ColorScheme, // 未使用 + ShellProgram, // 仅供第一个terminal使用 + Execute, // 仅供第一个terminal使用,任意长,任意位置,QStringList + StartWindowState, // mainwindow使用 + KeepOpen, // 仅供第一个terminal使用 + Script, // 仅供第一个terminal使用 + DragDropTerminal // 窗口标签拖拽时使用 +}; + +/******************************************************************************* + 1. @类名: TermProperties + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 终端属性集 + 支持任意格式属性 +*******************************************************************************/ +class TermProperties +{ + Q_GADGET +public: + explicit TermProperties() = default; + explicit TermProperties(QString workingDir); + explicit TermProperties(QString workingDir, QString colorScheme); + explicit TermProperties(QMap list); + + /** + * @brief 判断终端属性中是否包含参数属性 + * @author ut000439 wangpeili + * @param propertyType 参数属性 + * @return + */ + bool contains(TermProperty propertyType) const; + + /** + * @brief 设置终端属性图 + * @author ut000439 wangpeili + * @param list + */ + void setTermPropertyMap(QMap list); + /** + * @brief 设置工作目录 + * @author ut000439 wangpeili + * @param workingDir 工作目录 + */ + void setWorkingDir(QString workingDir); + + /** + * @brief 重载[]操作符 + * @author ut000439 wangpeili + * @param key + * @return + */ + QVariant &operator[](const TermProperty &key); + /** + * @brief 重载[]操作符 + * @author ut000439 wangpeili + * @param key + * @return + */ + const QVariant operator[](const TermProperty &key) const; + +private: + QMap m_properties; +}; + +#endif // TERMPROPERTIES_H diff -Nru deepin-terminal-5.0.0+ds1/src/main/windowsmanager.cpp deepin-terminal-5.4.13/src/main/windowsmanager.cpp --- deepin-terminal-5.0.0+ds1/src/main/windowsmanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/windowsmanager.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "windowsmanager.h" +#include "dbusmanager.h" +#include "utils.h" +#include "service.h" +#include "define.h" + +#include + +WindowsManager *WindowsManager::pManager = new WindowsManager(); +WindowsManager *WindowsManager::instance() +{ + return pManager; +} + +void WindowsManager::runQuakeWindow(TermProperties properties) +{ + if (nullptr == m_quakeWindow) { + qInfo() << "runQuakeWindow :create"; + m_quakeWindow = new QuakeWindow(properties); + //Add by ut001000 renfeixiang 2020-11-16 设置开始雷神动画效果标志 + m_quakeWindow->setAnimationFlag(false); + m_quakeWindow->show(); + //Add by ut001000 renfeixiang 2020-11-16 开始从上到下的动画 + m_quakeWindow->topToBottomAnimation(); + m_quakeWindow->activateWindow(); + return; + } + // Alt+F2的显隐功能实现点 + quakeWindowShowOrHide(); +} + +void WindowsManager::quakeWindowShowOrHide() +{ + //隐藏 则 显示终端 + if (!m_quakeWindow->isVisible()) { + m_quakeWindow->setAnimationFlag(false); + m_quakeWindow->show(); + m_quakeWindow->topToBottomAnimation(); + m_quakeWindow->activateWindow(); + return; + } + + //不在当前桌面显示时,切换到终端所在桌面 + int curDesktopIndex = DBusManager::callKDECurrentDesktop(); + if (curDesktopIndex != -1 && curDesktopIndex != m_quakeWindow->getDesktopIndex()) { + //切换 桌面 + DBusManager::callKDESetCurrentDesktop(m_quakeWindow->getDesktopIndex()); + //选择拉伸方式,因为此时不知道鼠标位置 + m_quakeWindow->switchEnableResize(); + m_quakeWindow->activateWindow(); + m_quakeWindow->focusCurrentPage(); + return; + } + // 终端的普通对话框,不处理 + if (Service::instance()->getIsDialogShow()) + return; + + //若终端和设置界面同时存在,则隐藏终端和设置界面 + if (Service::instance()->isSettingDialogVisible() && Service::instance()->getSettingOwner() == m_quakeWindow) { + Service::instance()->hideSettingDialog(); + m_quakeWindow->hideQuakeWindow(); + return; + } + //终端未激活则激活 + if (!m_quakeWindow->isActiveWindow()) { + m_quakeWindow->activateWindow(); + m_quakeWindow->focusCurrentPage(); + return; + } + //隐藏终端 + m_quakeWindow->hideQuakeWindow(); +} + +void WindowsManager::createNormalWindow(TermProperties properties, bool isShow) +{ + TermProperties newProperties = properties; + if (0 == m_normalWindowList.count()) + newProperties[SingleFlag] = true; + + MainWindow *newWindow = new NormalWindow(newProperties); + m_normalWindowList << newWindow; + qInfo() << "create NormalWindow, current count =" << m_normalWindowList.count() + << ", SingleFlag" << newProperties[SingleFlag].toBool(); + if(isShow) + newWindow->show(); + qint64 newMainWindowTime = newWindow->createNewMainWindowTime(); + QString strNewMainWindowTime = GRAB_POINT + LOGO_TYPE + CREATE_NEW_MAINWINDOE + QString::number(newMainWindowTime); + qInfo() << qPrintable(strNewMainWindowTime); +} + +void WindowsManager::onMainwindowClosed(MainWindow *window) +{ + /***add begin by ut001121 zhangmeng 20200527 关闭终端窗口时重置设置框所有者 修复BUG28636***/ + if (Service::instance()->getSettingOwner() == window) + Service::instance()->resetSettingOwner(); + + /***add end by ut001121 zhangmeng***/ + + /***mod begin by ut001121 zhangmeng 20200617 应用程序主动控制退出 修复BUG33541***/ + if (window == m_quakeWindow) { + Q_ASSERT(true == window->isQuakeMode()); + m_quakeWindow = nullptr; + } else if (m_normalWindowList.contains(window)) { + Q_ASSERT(false == window->isQuakeMode()); + m_normalWindowList.removeOne(window); + } else { + //Q_ASSERT(false); + qInfo() << "unkown windows closed " << window; + } + + window->deleteLater(); + + // 程序退出判断 add by ut001121 + if (0 == m_normalWindowList.size() && nullptr == m_quakeWindow) + qApp->quit(); + /***mod end by ut001121***/ +} + +WindowsManager::WindowsManager(QObject *parent) : QObject(parent) +{ + Utils::set_Object_Name(this); +} + +int WindowsManager::widgetCount() const +{ + if (nullptr == WindowsManager::instance()->getQuakeWindow()) { + return m_widgetCount; + } else { + // 不将雷神统计在内 + return m_widgetCount - 1; + } + +} + +void WindowsManager::terminalCountIncrease() +{ + ++m_widgetCount; +} + +void WindowsManager::terminalCountReduce() +{ + --m_widgetCount; +} diff -Nru deepin-terminal-5.0.0+ds1/src/main/windowsmanager.h deepin-terminal-5.4.13/src/main/windowsmanager.h --- deepin-terminal-5.0.0+ds1/src/main/windowsmanager.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/main/windowsmanager.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer:wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef WINDOWSMANAGER_H +#define WINDOWSMANAGER_H +/******************************************************************************* + 1. @类名: WindowsManager + 2. @作者: ut000439 王培利 + 3. @日期: 2020-05-19 + 4. @说明: 全局窗口管理,维护mainwindow列表. +        普通窗口的创建,关闭. +        雷神窗口的创建,关闭,显与隐 +*******************************************************************************/ + +#include "termproperties.h" +#include "mainwindow.h" + +#include + +// 窗口最大数量 +#define MAXWIDGETCOUNT 190 + +class WindowsManager : public QObject +{ + Q_OBJECT +public: + static WindowsManager *instance(); + /** + * @brief 运行雷神窗口 + * @author ut000439 wangpeili + * @param properties 属性 + */ + void runQuakeWindow(TermProperties properties); + /** + * @brief 雷神窗口显示或者隐藏 + * @author ut000439 wangpeili + */ + void quakeWindowShowOrHide(); + /** + * @brief 创建普通窗口 + * @author ut000439 wangpeili + * @param properties 属性 + * @param isShow 是否显示 + */ + void createNormalWindow(TermProperties properties, bool isShow = true); + + /** + * @brief 终端界面计数增加 + * @author ut000439 wangpeili + */ + void terminalCountIncrease(); + /** + * @brief 终端界面计数减少 + * @author ut000439 wangpeili + */ + void terminalCountReduce(); + /** + * @brief 终端界面计数 + * @author ut000439 wangpeili + * @return + */ + int widgetCount() const; + // 获取雷神窗口 + MainWindow *getQuakeWindow() + { + return m_quakeWindow; + } + // 获取普通窗口列表 + QList getNormalWindowList() + { + return m_normalWindowList; + } + +signals: + +public slots: + /** + * @brief 主窗口关闭响应函数 + * @author ut000439 wangpeili + */ + void onMainwindowClosed(MainWindow *); +private: + QList m_normalWindowList; + QuakeWindow *m_quakeWindow = nullptr; + TermWidgetPage *m_currentPage = nullptr; +private: + /** + * @brief 窗口管理,空函数 + * @author ut000439 wangpeili + * @param parent + */ + explicit WindowsManager(QObject *parent = nullptr); + static WindowsManager *pManager; + // 窗口数量 + int m_widgetCount = 0; +}; + +#endif // WINDOWSMANAGER_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementpanel.cpp deepin-terminal-5.4.13/src/remotemanage/remotemanagementpanel.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,235 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "remotemanagementpanel.h" +#include "service.h" +#include "utils.h" + +#include + +RemoteManagementPanel::RemoteManagementPanel(QWidget *parent) : CommonPanel(parent) +{ + Utils::set_Object_Name(this); + initUI(); +} + +void RemoteManagementPanel::refreshPanel() +{ + // 清空搜索框 + clearSearchInfo(); + // 初始化列表 + ServerConfigManager::instance()->refreshServerList(ServerConfigManager::PanelType_Manage, m_listWidget); + // 刷新搜索框状态 + refreshSearchState(); +} + +void RemoteManagementPanel::setFocusInPanel() +{ + qInfo() << "RemoteManagementPanel focus in Panel."; + if (m_searchEdit->isVisible()) { + // 搜索框显示 + // 设置焦点 + m_searchEdit->lineEdit()->setFocus(); + } else if (m_listWidget->isVisible()) { + // 列表显示 + /******** Modify by ut000610 daizhengwen 2020-07-27:bug#39775 Begin***************/ + // 将焦点设置在列表里的第一项 + m_listWidget->setCurrentIndex(0); + /********************* Modify by ut000610 daizhengwen End ************************/ + } else { + // 将焦点显示在添加按钮上 + m_pushButton->setFocus(); + } +} + +void RemoteManagementPanel::setFocusBack(const QString &strGroup) +{ + qInfo() << "RemoteManagementPanel return from RemoteManageGroup"; + // 返回前判断之前是否要有焦点 + if (m_listWidget->getFocusState()) { + // 要有焦点 + // 找到分组的新位置 + int index = m_listWidget->indexFromString(strGroup, ItemFuncType_Group); + if (index < 0) { + // 小于0代表没找到 获取下一个 + index = m_listWidget->getNextIndex(m_listWidget->currentIndex()); + } + + if (index >= 0) { + // 找得到, 设置焦点 + m_listWidget->setCurrentIndex(index); + } else { + // 没找到焦点设置到添加按钮 + m_pushButton->setFocus(); + } + } + // 不要焦点 + else { + MainWindow *w = Utils::getMainWindow(this); + if(w) + w->focusCurrentPage(); + } +} + +void RemoteManagementPanel::clearListFocus() +{ + m_pushButton->clearFocus(); + m_listWidget->clearFocus(); + m_searchEdit->clearFocus(); + m_listWidget->clearIndex(); +} + +int RemoteManagementPanel::getListIndex() +{ + return m_listWidget->currentIndex(); +} + +void RemoteManagementPanel::refreshSearchState() +{ + if (m_listWidget->count() >= 2) { + /************************ Add by m000743 sunchengxi 2020-04-22:搜索显示异常 Begin************************/ + m_searchEdit->clearEdit(); + /************************ Add by m000743 sunchengxi 2020-04-22:搜索显示异常 End ************************/ + m_searchEdit->show(); + } else { + m_searchEdit->hide(); + } +} + +void RemoteManagementPanel::onItemClicked(const QString &key) +{ + // 获取远程信息 + ServerConfig *remote = ServerConfigManager::instance()->getServerConfig(key); + if (nullptr != remote) + emit doConnectServer(remote); + else + qInfo() << "can't connect to remote" << key; +} + +void RemoteManagementPanel::showCurSearchResult() +{ + QString strTxt = m_searchEdit->text(); + if (strTxt.isEmpty()) + return; + + emit showSearchPanel(strTxt); +} + +void RemoteManagementPanel::showAddServerConfigDlg() +{ + qInfo() << "RemoteManagementPanel show add server config dialog."; + // 判断控件是否有焦点 + bool focusState = m_pushButton->hasFocus(); + // 弹窗显示 + Service::instance()->setIsDialogShow(window(), true); + + ServerConfigOptDlg *dlg = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_ADD, nullptr, this); + connect(dlg, &ServerConfigOptDlg::finished, this, [ = ](int result) { + // 弹窗隐藏或消失 + Service::instance()->setIsDialogShow(window(), false); + // 先判断是否要焦点 + if (focusState) { + // 让焦点在平面上 + setFocus(); + // 添加完,将焦点设置在添加按钮上 + m_pushButton->setFocus(); + } + if (QDialog::Accepted == result) { + int index = m_listWidget->indexFromString(dlg->getServerName()); + m_listWidget->setScroll(index); + } + }); + dlg->show(); +} + +void RemoteManagementPanel::initUI() +{ + this->setBackgroundRole(QPalette::Base); + this->setAutoFillBackground(true); + + m_searchEdit = new DSearchEdit(this); + //fix bug#64976 按tab键循环切换到右上角X按钮时继续按tab键,焦点不能切换到搜索框 + m_searchEdit->setFocusPolicy(Qt::StrongFocus); + m_searchEdit->setFocusProxy(m_searchEdit->lineEdit()); + m_searchEdit->setObjectName("RemoteSearchEdit"); + m_listWidget = new ListView(ListType_Remote, this); + m_listWidget->setObjectName("RemoteManageListWidget"); + m_pushButton = new DPushButton(this); + m_pushButton->setObjectName("RemoteAddPushButton"); + + m_searchEdit->setFixedHeight(COMMONHEIGHT); + m_searchEdit->setClearButtonEnabled(true); + + m_pushButton->setFixedHeight(COMMONHEIGHT); + m_pushButton->setText(tr("Add Server")); + + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->setContentsMargins(0, 0, 0, 0); + hlayout->addSpacing(SPACEWIDTH); + hlayout->addWidget(m_searchEdit); + hlayout->addSpacing(SPACEWIDTH); + hlayout->setSpacing(0); + hlayout->setMargin(0); + + QHBoxLayout *btnLayout = new QHBoxLayout(); + btnLayout->setContentsMargins(0, 0, 0, 0); + btnLayout->addSpacing(SPACEWIDTH); + btnLayout->addWidget(m_pushButton); + btnLayout->addSpacing(SPACEWIDTH); + btnLayout->setSpacing(0); + btnLayout->setMargin(0); + + QVBoxLayout *vlayout = new QVBoxLayout(); + vlayout->setContentsMargins(0, 0, 0, 0); + vlayout->addSpacing(SPACEHEIGHT); + vlayout->addLayout(hlayout); + vlayout->addWidget(m_listWidget); + vlayout->addLayout(btnLayout); + vlayout->addSpacing(SPACEHEIGHT); + vlayout->setMargin(0); + vlayout->setSpacing(SPACEHEIGHT); + setLayout(vlayout); + + connect(m_searchEdit, &DSearchEdit::returnPressed, this, &RemoteManagementPanel::showCurSearchResult); + connect(m_pushButton, &DPushButton::clicked, this, &RemoteManagementPanel::showAddServerConfigDlg); + connect(m_listWidget, &ListView::itemClicked, this, &RemoteManagementPanel::onItemClicked); + connect(m_listWidget, &ListView::groupClicked, this, &RemoteManagementPanel::showGroupPanel); + connect(m_listWidget, &ListView::listItemCountChange, this, &RemoteManagementPanel::refreshSearchState); + connect(ServerConfigManager::instance(), &ServerConfigManager::refreshList, this, [ = ]() { + if (m_isShow) + refreshPanel(); + }); + connect(m_listWidget, &ListView::focusOut, this, [ = ](Qt::FocusReason type) { + if (Qt::TabFocusReason == type || Qt::NoFocusReason == type) { + // 下一个 或 列表为空, 焦点定位到添加按钮上 + m_pushButton->setFocus(); + m_listWidget->clearIndex(); + qInfo() << "set focus on add pushButton"; + } else if (Qt::BacktabFocusReason == type) { + // 判断是否可见,可见设置焦点 + if (m_searchEdit->isVisible()) { + m_searchEdit->lineEdit()->setFocus(); + m_listWidget->clearIndex(); + qInfo() << "set focus on add search edit"; + } + } + + }); +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementpanel.h deepin-terminal-5.4.13/src/remotemanage/remotemanagementpanel.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: RemoteManagementPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理初始界面,依次显示搜索框,远程列表,添加服务器按钮 + 搜索框只有远程列表里的项超过两个才显示 + 远程列表里的项分两类: + 1)分组项:该项内有同一分组的所有远程项 + 2)远程项:该项内可以点击连接远程服务器 +*******************************************************************************/ +#ifndef REMOTEMANAGEMENTPANEL_H +#define REMOTEMANAGEMENTPANEL_H + +#include "commonpanel.h" +#include "serverconfigoptdlg.h" +#include "listview.h" + +#include + +class RemoteManagementPanel : public CommonPanel +{ + Q_OBJECT +public: + explicit RemoteManagementPanel(QWidget *parent = nullptr); + /** + * @brief 刷新远程管理面板 + * @author ut000610 daizhengwen + */ + void refreshPanel(); + /** + * @brief 将焦点设置进入panel,有搜索框焦点进搜索框,没搜索框,焦点进入列表,没列表,焦点进添加按钮 + * @author ut000610 戴正文 + */ + void setFocusInPanel(); + /** + * @brief 设置焦点从分组界面返回时的位置 + * @author ut000610 戴正文 + * @param strGroup 组名 + */ + void setFocusBack(const QString &strGroup); + /** + * @brief 清空列表的选中状态 + * @author ut000610 戴正文 + */ + void clearListFocus(); + /** + * @brief 获取列表中当前焦点的位置 + * @author ut000610 戴正文 + * @return + */ + int getListIndex(); + +signals: + // 显示搜索界面 + void showSearchPanel(const QString &strFilter); + // 显示分组,根据布尔值判断是否有焦点 + void showGroupPanel(const QString &strGroup, bool isFocusOn); + // 连接远程 + void doConnectServer(ServerConfig *curItemServer); + +public slots: + /** + * @brief 显示远程管理当前搜索结果 + * @author ut000610 daizhengwen + */ + void showCurSearchResult(); + /** + * @brief 显示远程管理添加服务器配置界面 + * @author ut000610 daizhengwen + */ + void showAddServerConfigDlg(); + /** + * @brief 刷新远程管理搜索状态 + * @author ut000610 daizhengwen + */ + void refreshSearchState(); + /** + * @brief 远程项被点击,连接远程管理 + * @author ut000610 戴正文 + * @param key 远程项 + */ + void onItemClicked(const QString &key); + +private: + /** + * @brief 初始化远程管理UI界面 + * @author ut000610 daizhengwen + */ + void initUI(); + +private: + ListView *m_listWidget = nullptr; +}; + +#endif // REMOTEMANAGEMENTPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementplugn.cpp deepin-terminal-5.4.13/src/remotemanage/remotemanagementplugn.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementplugn.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementplugn.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,280 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "remotemanagementplugn.h" +#include "mainwindow.h" +#include "utils.h" +#include "service.h" +#include "termwidget.h" + +#include +#include + +RemoteManagementPlugin::RemoteManagementPlugin(QObject *parent) : MainWindowPluginInterface(parent) +{ + Utils::set_Object_Name(this); + m_pluginName = "Remote Management"; +} + +void RemoteManagementPlugin::initPlugin(MainWindow *mainWindow) +{ + qInfo() << "RemoteManagementPlugin init Plugin."; + m_mainWindow = mainWindow; + //initRemoteManagementTopPanel(); + connect(m_mainWindow, &MainWindow::showPluginChanged, this, [ = ](const QString name, bool bSetFocus) { + if (MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT != name) { + // 判断窗口是否已经显示 + if (m_isShow) { + // 若显示,则隐藏 + RemoteManagementTopPanel * panel = getRemoteManagementTopPanel(); + if(panel) + panel->hideAnim(); + m_isShow = false; + } + + } else { + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,远程连接界面使用不方便,将雷神窗口变大适应正常的远程连接界面 Begin***************/ + if (m_mainWindow->isQuakeMode() && m_mainWindow->height() < LISTMINHEIGHT) { + //因为拉伸函数设置了FixSize,导致自定义界面弹出时死循环,然后崩溃的问题 + QuakeWindow *quakeWindow = qobject_cast(m_mainWindow); + if (nullptr == quakeWindow) + return; + quakeWindow->switchEnableResize(true); + m_mainWindow->resize(m_mainWindow->width(), LISTMINHEIGHT); //首先设置雷神界面的大小 + m_mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT);//重新打开远程连接界面,当前流程结束 + //窗口弹出后,重新判断雷神窗口是否需要有拉伸属性 + quakeWindow->switchEnableResize(); + return; + } + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,远程连接界面使用不方便,将雷神窗口变大适应正常的远程连接界面 End***************/ + getRemoteManagementTopPanel()->show(); + m_isShow = true; + if (bSetFocus) { + // 若焦点不在终端上,焦点落入平面 + getRemoteManagementTopPanel()->setFocusInPanel(); + } else { + // 若焦点在终端上,焦点落回终端 + m_mainWindow->focusCurrentPage(); + } + } + }); + connect(m_mainWindow, &MainWindow::quakeHidePlugin, this, [ = ]() { + // 焦点在列表上,隐藏时,焦点现在当前窗口上 + if (m_mainWindow->isFocusOnList()) { + m_mainWindow->focusCurrentPage(); + qInfo() << "focus on remote list, hide remote list and set foucs on terminal"; + } + getRemoteManagementTopPanel()->hide(); + }); +} + +QAction *RemoteManagementPlugin::titlebarMenu(MainWindow *mainWindow) +{ + QAction *remoteManagementAction(new QAction(tr("Remote management"), mainWindow)); + + connect(remoteManagementAction, &QAction::triggered, mainWindow, [mainWindow]() { + mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + }); + return remoteManagementAction; +} + +RemoteManagementTopPanel *RemoteManagementPlugin::getRemoteManagementTopPanel() +{ + if (nullptr == m_remoteManagementTopPanel) + initRemoteManagementTopPanel(); + return m_remoteManagementTopPanel; +} + +void RemoteManagementPlugin::initRemoteManagementTopPanel() +{ + m_remoteManagementTopPanel = new RemoteManagementTopPanel(m_mainWindow->centralWidget()); + m_remoteManagementTopPanel->setObjectName("RemoteManagementTopPanel"); + connect(m_remoteManagementTopPanel, + &RemoteManagementTopPanel::doConnectServer, + this, + &RemoteManagementPlugin::doCennectServer, Qt::QueuedConnection); +} + +void RemoteManagementPlugin::doCennectServer(ServerConfig *curServer) +{ + qInfo() << "RemoteManagementPlugin do connect server."; + if (nullptr != curServer) { + + QString shellFile = createShellFile(curServer); + QString strTxt = "expect -f " + shellFile + "\n"; + //--added by qinyaning(nyq) to solve the probelm which Connecting to the remote server + /*does not connect to the remote server directly in the new TAB. time: 2020.4.13 18:15 + * */ + if (m_mainWindow->currentPage()->currentTerminal()->hasRunningProcess()) + m_mainWindow->addTab(m_mainWindow->currentPage()->createCurrentTerminalProperties(), true); + + //--------------------------------// + /******** Modify by m000714 daizhengwen 2020-04-30: 将当前还没执行的命令清空****************/ + m_mainWindow->focusCurrentPage(); + m_mainWindow->pressCtrlU(); + m_mainWindow->sleep(100); + /********************* Modify by m000714 daizhengwen End ************************/ + m_mainWindow->currentPage()->sendTextToCurrentTerm(strTxt, true); + // 等待连接 100ms等待命令发过去正常立即执行,100ms足够,一下的信号槽只是判断是否开启另一个程序去连接 + // 若有程序去连接,则判断已连接,若连接失败,则判断为断开连接 + QTimer::singleShot(100, this, [ = ]() { + TermWidget *term = m_mainWindow->currentPage()->currentTerminal(); + if (!term) { + // 若term为空 + qInfo() << "current terminal is null"; + } + // 判断是否连接服务器 + if (!term->isInRemoteServer()) { + // 没有连接上 + qInfo() << "disconnect to server"; + return; + } + // 标记此term连接远程 + term->setIsConnectRemote(true); + // 设置远程主机 + term->modifyRemoteTabTitle(*curServer); + qInfo() << "connect to server"; + // 编码 + setRemoteEncode(curServer->m_encoding); + // 退格键 + setBackspaceKey(term, curServer->m_backspaceKey); + // 删除键 + setDeleteKey(term, curServer->m_deleteKey); + }); + + } + /******** Modify by ut000610 daizhengwen 2020-06-04: 点击连接服务器后,隐藏列表,焦点回到主窗口****************/ + m_mainWindow->showPlugin(MainWindow::PLUGIN_TYPE_NONE); + // 隐藏列表后,将焦点设置到主窗口 100ms足够 + QTimer::singleShot(100, this, [&]() { + if (m_mainWindow->isActiveWindow()) + m_mainWindow->focusCurrentPage(); + }); + /********************* Modify by ut000610 daizhengwen End ************************/ +} + +inline QString RemoteManagementPlugin::convertStringToAscii(const QString &strSrc) +{ + QByteArray byte = strSrc.toLatin1(); + + return QString(byte.toHex()); +} + +QString RemoteManagementPlugin::createShellFile(ServerConfig *curServer) +{ + qInfo() << "RemoteManagementPlugin create temporary shell file."; + // 首先读取通用模板 + QFile sourceFile(":/other/ssh_login.sh"); + QString fileString; + // 打开文件 + if (sourceFile.open(QIODevice::ReadOnly)) { + //读取文件 + fileString = sourceFile.readAll(); + // 关闭文件 + sourceFile.close(); + } + + QString strArgs = QString(" '<>' <> <> '<>' '<>'"); + // 用远程管理数据替换文件内的关键字 + strArgs.replace("<>", curServer->m_userName); + strArgs.replace("<>", curServer->m_address.trimmed()); + strArgs.replace("<>", curServer->m_port); + // 根据是否有证书,替换关键字 // pass_way仅仅是占位 + if (curServer->m_privateKey.isNull() || curServer->m_privateKey.isEmpty()) { + fileString.replace("<>", "no"); + strArgs.replace("<>", "NoPrivateKeyPath"); + // fix bug#64758 修改服务器密码,点击连接没有密码错误提示语,且可以成功连接 + // 由于密码中可能存在各种特殊符号如!、#、$等,不处理的话shell命令运行会报错,需要转成ASCII编码处理下 + QString asciiPassword = convertStringToAscii(curServer->m_password); + strArgs.replace("<>", asciiPassword); + } else { + fileString.replace("<>", "yes"); + strArgs.replace("<>", curServer->m_privateKey); + strArgs.replace("<>", ""); + } + + QString path = curServer->m_path; + QString command = curServer->m_command; + // 添加远程提示 + QString remote_command = "echo " + tr("Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files.") + " && "; + if (!path.isNull() && !path.isEmpty()) + remote_command = remote_command + "cd " + path + " && "; + + if (!command.isNull() && !command.isEmpty()) + remote_command = remote_command + command + " && "; + + fileString.replace("<>", remote_command); + + // 创建临时文件和执行脚本所需要的参数 + QString toFileStr = "/tmp/terminal-" + Utils::getRandString(); + QFile toFile(toFileStr); + toFile.open(QIODevice::WriteOnly | QIODevice::Text); + // 写文件 + toFile.write(fileString.toUtf8()); + // 退出文件 + toFile.close(); + return QString(toFileStr + strArgs); +} + +void RemoteManagementPlugin::setRemoteEncode(QString encode) +{ + TermWidget *term = m_mainWindow->currentPage()->currentTerminal(); + if (!encode.isNull() && !encode.isEmpty()) { + // 设置当前窗口的编码 + term->setTextCodec(QTextCodec::codecForName(encode.toLocal8Bit())); + qInfo() << "Remote encode " << encode; + } + // 记录远程编码 + term->setRemoteEncode(encode); + // 切换编码列表的编码 + emit Service::instance()->checkEncode(encode); +} + +void RemoteManagementPlugin::setBackspaceKey(TermWidget *term, QString backspaceKey) +{ + if ("control-h" == backspaceKey) + term->setBackspaceMode(EraseMode_Control_H); + else if ("auto" == backspaceKey) + term->setBackspaceMode(EraseMode_Auto); + else if ("escape-sequence" == backspaceKey) + term->setBackspaceMode(EraseMode_Escape_Sequeue); + else if ("ascii-del" == backspaceKey) + term->setBackspaceMode(EraseMode_Ascii_Delete); + else if ("tty" == backspaceKey) + term->setBackspaceMode(EraseMode_TTY); + + qInfo() << "backspace mode " << backspaceKey; +} + +void RemoteManagementPlugin::setDeleteKey(TermWidget *term, QString deleteKey) +{ + if ("control-h" == deleteKey) + term->setDeleteMode(EraseMode_Control_H); + else if ("auto" == deleteKey) + term->setDeleteMode(EraseMode_Auto); + else if ("escape-sequence" == deleteKey) + term->setDeleteMode(EraseMode_Escape_Sequeue); + else if ("ascii-del" == deleteKey) + term->setDeleteMode(EraseMode_Ascii_Delete); + else if ("tty" == deleteKey) + term->setDeleteMode(EraseMode_TTY); + + qInfo() << "delete mode " << deleteKey; +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementplugn.h deepin-terminal-5.4.13/src/remotemanage/remotemanagementplugn.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementplugn.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementplugn.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: RemoteManagementPlugn + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理插件管理类 + 该类负责和主窗口交互,初始化远程管理的界面管理类 + 初始化菜单按钮 + 隐藏和显示窗口 + 设置编码,退格键,删除键格式 +*******************************************************************************/ +#ifndef REMOTEMANAGEMENTPLUGN_H +#define REMOTEMANAGEMENTPLUGN_H + +#include "mainwindowplugininterface.h" +#include "remotemanagementtoppanel.h" + +#include +#include + +class TermWidget; +class MainWindow; +class RemoteManagementPlugin : public MainWindowPluginInterface +{ + Q_OBJECT +public: + explicit RemoteManagementPlugin(QObject *parent = nullptr); + /** + * @brief 远程管理初始化插件 + * @author ut000610 daizhengwen + * @param mainWindow 主窗口 + */ + void initPlugin(MainWindow *mainWindow) override; + /** + * @brief 远程管理标题栏菜单 + * @author ut000610 daizhengwen + * @param mainWindow 主窗口 + * @return + */ + QAction *titlebarMenu(MainWindow *mainWindow) override; + + /** + * @brief 获取远程管理顶部面板 + * @author ut000610 daizhengwen + * @return + */ + RemoteManagementTopPanel *getRemoteManagementTopPanel(); + /** + * @brief 初始化远程管理顶部面板 + * @author ut000610 daizhengwen + */ + void initRemoteManagementTopPanel(); + /** + * @brief 创建连接远程的临时shell文件 + * @author ut000610 戴正文 + * @param curServer + * @return + */ + QString createShellFile(ServerConfig *curServer); + + /** + * @brief 设置远程管理编码 + * @author ut000610 daizhengwen + * @param encode 编码 + */ + void setRemoteEncode(QString encode); + /** + * @brief 设置退格键的模式 + * @author ut000610 戴正文 + * @param term + * @param backspaceKey + */ + void setBackspaceKey(TermWidget *term, QString backspaceKey); + /** + * @brief 设置删除键的模式 + * @author ut000610 戴正文 + * @param term + * @param deleteKey + */ + void setDeleteKey(TermWidget *term, QString deleteKey); +signals: + void doHide(); + +public slots: + /** + * @brief 远程管理做连接服务器 + * @author ut000610 daizhengwen + * @param curServer + */ + void doCennectServer(ServerConfig *curServer); + +private: + /** + * @brief 把字符串123转成形如313233的ASCII编码字符串 + * @author ut000438 王亮 + * @param strSrc 把字符串 + * @return + */ + QString convertStringToAscii(const QString &strSrc); + + MainWindow *m_mainWindow = nullptr; + RemoteManagementTopPanel *m_remoteManagementTopPanel = nullptr; +}; + +#endif // REMOTEMANAGEMENTPLUGN_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementsearchpanel.cpp deepin-terminal-5.4.13/src/remotemanage/remotemanagementsearchpanel.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementsearchpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementsearchpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,226 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "remotemanagementsearchpanel.h" +#include "utils.h" +#include "listview.h" +#include "iconbutton.h" +#include "mainwindow.h" + +#include + +#include +#include +#include +#include + +RemoteManagementSearchPanel::RemoteManagementSearchPanel(QWidget *parent) : CommonPanel(parent) +{ + Utils::set_Object_Name(this); + initUI(); +} + +void RemoteManagementSearchPanel::initUI() +{ + this->setBackgroundRole(QPalette::Base); + this->setAutoFillBackground(true); + + m_rebackButton = new IconButton(this); + m_rebackButton->setObjectName("RemoteSearchRebackButton"); + m_rebackButton->setIcon(DStyle::StandardPixmap::SP_ArrowLeave); + m_rebackButton->setFixedSize(QSize(ICONSIZE_36, ICONSIZE_36)); + m_rebackButton->setFocusPolicy(Qt::TabFocus); + + m_listWidget = new ListView(ListType_Remote, this); + m_listWidget->setObjectName("RemoteSearchListWidget"); + m_label = new DLabel(this); + m_label->setObjectName("RemoteSearchFilterLabel");//Add by ut001000 renfeixiang 2020-08-13; + m_label->setAlignment(Qt::AlignCenter); + // 字体颜色随主题变化而变化 + DPalette palette = m_label->palette(); + QColor color; + if (DApplicationHelper::DarkType == DApplicationHelper::instance()->themeType()) + color = QColor::fromRgb(192, 198, 212, 102); + else + color = QColor::fromRgb(85, 85, 85, 102); + + palette.setBrush(QPalette::Text, color); + m_label->setPalette(palette); + + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->addSpacing(SPACEWIDTH); + hlayout->addWidget(m_rebackButton); + hlayout->addWidget(m_label, 0, Qt::AlignCenter); + hlayout->setSpacing(0); + hlayout->setMargin(0); + + QVBoxLayout *vlayout = new QVBoxLayout(); + vlayout->addSpacing(SPACEHEIGHT); + vlayout->addLayout(hlayout); + vlayout->addWidget(m_listWidget); + vlayout->setMargin(0); + vlayout->setSpacing(SPACEHEIGHT); + setLayout(vlayout); + + // 返回键被点击 搜索界面,返回焦点返回搜索框 + connect(m_rebackButton, &DIconButton::clicked, this, &RemoteManagementSearchPanel::rebackPrevPanel); + connect(m_rebackButton, &IconButton::preFocus, this, &RemoteManagementSearchPanel::rebackPrevPanel); + connect(m_rebackButton, &IconButton::focusOut, this, &RemoteManagementSearchPanel::onFocusOutList); + connect(m_listWidget, &ListView::itemClicked, this, &RemoteManagementSearchPanel::onItemClicked); + connect(m_listWidget, &ListView::groupClicked, this, &RemoteManagementSearchPanel::showGroupPanel); + connect(ServerConfigManager::instance(), &ServerConfigManager::refreshList, this, &RemoteManagementSearchPanel::onRefreshList); + connect(m_listWidget, &ListView::focusOut, this, &RemoteManagementSearchPanel::handleListViewFocusOut); + // 字体颜色随主题变化变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &RemoteManagementSearchPanel::handleThemeTypeChanged); +} + +inline void RemoteManagementSearchPanel::handleListViewFocusOut(Qt::FocusReason type) +{ + if (Qt::TabFocusReason == type) { + // tab 进入 + + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Tab, Qt::MetaModifier); + QApplication::sendEvent(Utils::getMainWindow(this), &keyPress); + qInfo() << "search panel focus on '+'"; + m_listWidget->clearIndex(); + } else if (Qt::BacktabFocusReason == type || Qt::NoFocusReason == type) { + // shift + tab 返回 返回键 // 列表为空,也返回到返回键上 + m_rebackButton->setFocus(); + m_listWidget->clearIndex(); + qInfo() << "search panel type" << type; + } +} + +inline void RemoteManagementSearchPanel::handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType) +{ + DPalette palette = m_label->palette(); + QColor color; + if (DApplicationHelper::DarkType == themeType) + color = QColor::fromRgb(192, 198, 212, 102); + else + color = QColor::fromRgb(85, 85, 85, 102); + + palette.setBrush(QPalette::Text, color); + m_label->setPalette(palette); +} + +void RemoteManagementSearchPanel::refreshDataByGroupAndFilter(const QString &strGroup, const QString &strFilter) +{ + setSearchFilter(strFilter); + m_isGroupOrNot = true; + m_strGroupName = strGroup; + m_strFilter = strFilter; + m_listWidget->clearData(); + ServerConfigManager::instance()->refreshServerList(ServerConfigManager::PanelType_Search, m_listWidget, strFilter, strGroup); +} + +void RemoteManagementSearchPanel::refreshDataByFilter(const QString &strFilter) +{ + setSearchFilter(strFilter); + m_isGroupOrNot = false; + m_strFilter = strFilter; + m_listWidget->clearData(); + ServerConfigManager::instance()->refreshServerList(ServerConfigManager::PanelType_Search, m_listWidget, strFilter); +} + +void RemoteManagementSearchPanel::onItemClicked(const QString &key) +{ + // 获取远程信息 + ServerConfig *remote = ServerConfigManager::instance()->getServerConfig(key); + if (nullptr != remote) + emit doConnectServer(remote); + else + qInfo() << "can't connect to remote" << key; + +} + +void RemoteManagementSearchPanel::onFocusOutList(Qt::FocusReason type) +{ + // 焦点切出,没值的时候 + if (Qt::TabFocusReason == type && 0 == m_listWidget->count()) { + // tab 进入 + + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Tab, Qt::MetaModifier); + QApplication::sendEvent(Utils::getMainWindow(this), &keyPress); + qInfo() << "search panel focus to '+'"; + } +} + +void RemoteManagementSearchPanel::onRefreshList() +{ + // 判断是否显示 + if (m_isShow) { + if (m_isGroupOrNot) { + // 刷新分组下搜索列表 + refreshDataByGroupAndFilter(m_strGroupName, m_strFilter); + } else { + // 刷新搜索列表 + refreshDataByFilter(m_strFilter); + } + } +} + + +void RemoteManagementSearchPanel::clearAllFocus() +{ + m_rebackButton->clearFocus(); + m_listWidget->clearFocus(); + m_label->clearFocus(); +} + +void RemoteManagementSearchPanel::setFocusBack(const QString &strGroup, bool isFocusOn, int prevIndex) +{ + qInfo() << "RemoteManagementSearchPanel return from RemoteManagementGroup."; + // 返回前判断之前是否要有焦点 + if (isFocusOn) { + // 要有焦点 + // 找到分组的新位置 + int index = m_listWidget->indexFromString(strGroup, ItemFuncType_Group); + if (index < 0) { + // 小于0代表没找到 获取下一个 + index = m_listWidget->getNextIndex(prevIndex); + } + + if (index >= 0) { + // 找得到, 设置焦点 + m_listWidget->setCurrentIndex(index); + } else { + // 没找到焦点设置到添加按钮 + m_rebackButton->setFocus(); + } + } + // 不要焦点 + else { + MainWindow *w = Utils::getMainWindow(this); + if(w) + w->focusCurrentPage(); + } +} + +int RemoteManagementSearchPanel::getListIndex() +{ + return m_listWidget->currentIndex(); +} + +void RemoteManagementSearchPanel::setSearchFilter(const QString &filter) +{ + m_strFilter = filter; + QString showText = filter; + showText = Utils::getElidedText(m_label->font(), showText, ITEMMAXWIDTH, Qt::ElideMiddle); + m_label->setText(QString("%1:%2").arg(tr("Search"), showText)); +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementsearchpanel.h deepin-terminal-5.4.13/src/remotemanage/remotemanagementsearchpanel.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementsearchpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementsearchpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: RemoteManagementSearchPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理搜索界面 + 主要由返回按钮, 搜索条件显示框和搜索结果列表构成 +*******************************************************************************/ +#ifndef REMOTEMANAGEMENTSEARCHPANEL_H +#define REMOTEMANAGEMENTSEARCHPANEL_H + +#include "commonpanel.h" +#include "serverconfigmanager.h" + +#include + +#include + +DGUI_USE_NAMESPACE + +class ListView; +class RemoteManagementSearchPanel : public CommonPanel +{ + Q_OBJECT +public: + + explicit RemoteManagementSearchPanel(QWidget *parent = nullptr); + /** + * @brief 远程管理搜索面板按组和过滤器刷新数据 + * @author ut000610 daizhengwen + * @param strGroup 组 + * @param strFilter 过滤器 + */ + void refreshDataByGroupAndFilter(const QString &strGroup, const QString &strFilter); + /** + * @brief 远程管理搜索面板按过滤器刷新数据 + * @author ut000610 daizhengwen + * @param strFilter 过滤器 + */ + void refreshDataByFilter(const QString &strFilter); + /** + * @brief 清除界面所有的焦点 + * @author ut000610 戴正文 + */ + void clearAllFocus(); + /** + * @brief 设置焦点返回,从分组返回 + * @author ut000610 戴正文 + * @param strGroup 组 + * @param isFocusOn + * @param prevIndex + */ + void setFocusBack(const QString &strGroup, bool isFocusOn, int prevIndex); + /** + * @brief 获取列表当前的焦点 + * @author ut000610 戴正文 + * @return + */ + int getListIndex(); + +signals: + // 连接远程 + void doConnectServer(ServerConfig *curItemServer); + // 显示远程分组界面 + void showGroupPanel(const QString &strGroup, bool isFocusOn); + // 返回前一个页面 + void rebackPrevPanel(); + +public slots: + /** + * @brief 远程项被点击,连接远程 + * @author ut000610 戴正文 + * @param key + */ + void onItemClicked(const QString &key); + /** + * @brief 焦点从列表中出的事件 + * @author ut000610 戴正文 + * @param type 类型 + */ + void onFocusOutList(Qt::FocusReason type); + /** + * @brief 处理刷新列表信号 + * @author ut000610 戴正文 + */ + void onRefreshList(); + + void handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType); + void handleListViewFocusOut(Qt::FocusReason type); + +private: + /** + * @brief 远程管理搜索面板初始化UI界面 + * @author ut000610 daizhengwen + */ + void initUI(); + /** + * @brief 设置远程管理搜索的过滤器 + * @author ut000610 daizhengwen + * @param filter 过滤器 + */ + void setSearchFilter(const QString &filter); + +private: + ListView *m_listWidget = nullptr; + QString m_strGroupName; + QString m_strFilter; + // 判断是组内搜索还是组外搜索 + bool m_isGroupOrNot = false; +}; + +#endif // REMOTEMANAGEMENTSEARCHPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementtoppanel.cpp deepin-terminal-5.4.13/src/remotemanage/remotemanagementtoppanel.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementtoppanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementtoppanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,386 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "remotemanagementtoppanel.h" +#include "utils.h" +#include "mainwindow.h" + +#include +#include + +const int animationDuration = 300; + +RemoteManagementTopPanel::RemoteManagementTopPanel(QWidget *parent) : RightPanel(parent) +{ + Utils::set_Object_Name(this); + // 远程主界面 + m_remoteManagementPanel = new RemoteManagementPanel(this); + m_remoteManagementPanel->setObjectName("RemoteManagePanel");//Add by ut001000 renfeixiang 2020-08-14 + connect(m_remoteManagementPanel, &RemoteManagementPanel::showSearchPanel, this, &RemoteManagementTopPanel::showSearchPanel); + connect(m_remoteManagementPanel, &RemoteManagementPanel::showGroupPanel, this, &RemoteManagementTopPanel::showGroupPanel); + connect(m_remoteManagementPanel, &RemoteManagementPanel::doConnectServer, this, &RemoteManagementTopPanel::doConnectServer, Qt::QueuedConnection); + // 远程分组界面 + m_serverConfigGroupPanel = new ServerConfigGroupPanel(this); + m_serverConfigGroupPanel->setObjectName("RemoteGroupPanel");//Add by ut001000 renfeixiang 2020-08-14 + connect(m_serverConfigGroupPanel, &ServerConfigGroupPanel::showSearchPanel, this, &RemoteManagementTopPanel::showSearchPanel); + connect(m_serverConfigGroupPanel, &ServerConfigGroupPanel::rebackPrevPanel, this, &RemoteManagementTopPanel::showPrevPanel); + connect(m_serverConfigGroupPanel, &ServerConfigGroupPanel::doConnectServer, this, &RemoteManagementTopPanel::doConnectServer, Qt::QueuedConnection); + // 远程搜索界面 + m_remoteManagementSearchPanel = new RemoteManagementSearchPanel(this); + m_remoteManagementSearchPanel->setObjectName("RemoteSearchPanel");//Add by ut001000 renfeixiang 2020-08-14 + connect(m_remoteManagementSearchPanel, &RemoteManagementSearchPanel::showGroupPanel, this, &RemoteManagementTopPanel::showGroupPanel); + connect(m_remoteManagementSearchPanel, &RemoteManagementSearchPanel::rebackPrevPanel, this, &RemoteManagementTopPanel::showPrevPanel); + connect(m_remoteManagementSearchPanel, &RemoteManagementSearchPanel::doConnectServer, this, &RemoteManagementTopPanel::doConnectServer, Qt::QueuedConnection); + // 界面先隐藏 + m_serverConfigGroupPanel->hide(); + m_remoteManagementSearchPanel->hide(); + m_remoteManagementPanel->hide(); +} + +void RemoteManagementTopPanel::show() +{ + this->showAnim(); + m_remoteManagementPanel->resize(size()); + m_remoteManagementPanel->move(0, 0); + // 每次显示前清空之前的记录 + m_remoteManagementPanel->clearListFocus(); + // 记录界面状态 + m_remoteManagementPanel->m_isShow = true; + m_serverConfigGroupPanel->m_isShow = false; + m_remoteManagementSearchPanel->m_isShow = false; + // 显示远程主界面 + m_remoteManagementPanel->show(); + // 其他界面影藏 + m_serverConfigGroupPanel->hide(); + m_remoteManagementSearchPanel->hide(); + // 刷新列表 + m_remoteManagementPanel->refreshPanel(); + // 记录当前窗口 + m_currentPanelType = ServerConfigManager::PanelType_Manage; + // 清空栈 + m_filterStack.clear(); + m_prevPanelStack.clear(); + qInfo() << "show remote panel! stack clear"; +} + +void RemoteManagementTopPanel::setFocusInPanel() +{ + m_remoteManagementPanel->setFocusInPanel(); +} + +void RemoteManagementTopPanel::showSearchPanel(const QString &strFilter) +{ + qInfo() << "RemoteManagementTopPanel show search panel."; + // 记录搜索界面的搜索条件 + m_filterStack.push_back(strFilter); + // 设置搜索界面大小 + m_remoteManagementSearchPanel->resize(size()); + // 显示搜索界面 + m_remoteManagementSearchPanel->show(); + + // 动画效果 + QPropertyAnimation *animation; + QPropertyAnimation *animation1 = new QPropertyAnimation(m_remoteManagementSearchPanel, "geometry"); + connect(animation1, &QPropertyAnimation::finished, animation1, &QPropertyAnimation::deleteLater); + // 判读当前窗口是主界面还是分组界面 + // 刷新搜索界面的列表 + if (m_currentPanelType == ServerConfigManager::PanelType_Group) { + // 组内搜索 + m_remoteManagementSearchPanel->refreshDataByGroupAndFilter(m_group, strFilter); + + // 动画效果的设置 + animation = new QPropertyAnimation(m_serverConfigGroupPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_serverConfigGroupPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else if (m_currentPanelType == ServerConfigManager::PanelType_Manage) { + // 全局搜索 + m_remoteManagementSearchPanel->refreshDataByFilter(strFilter); + + // 动画效果的设置 + animation = new QPropertyAnimation(m_remoteManagementPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_remoteManagementPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else { + animation1->deleteLater(); + qInfo() << "unknow current panel!"; + return; + } + // 执行动画 + panelRightToLeft(animation, animation1); + + // 搜索界面设置焦点 + m_remoteManagementSearchPanel->onFocusInBackButton(); + // 记录当前窗口为前一个窗口 + PanelState panelState; + panelState.m_type = m_currentPanelType; + m_prevPanelStack.push_back(panelState); + // 修改当前窗口 + m_currentPanelType = ServerConfigManager::PanelType_Search; + // 设置平面状态 + setPanelShowState(m_currentPanelType); +} + +void RemoteManagementTopPanel::showGroupPanel(const QString &strGroupName, bool isFocusOn) +{ + qInfo() << "RemoteManagementTopPanel show group panel."; + // 记录当前分组 + m_group = strGroupName; + // 设置分组界面大小 + m_serverConfigGroupPanel->resize(size()); + // 刷新分组界面 + m_serverConfigGroupPanel->refreshData(strGroupName); + // 显示分组界面 + m_serverConfigGroupPanel->show(); + + // 动画效果 + QPropertyAnimation *animation; + QPropertyAnimation *animation1 = new QPropertyAnimation(m_serverConfigGroupPanel, "geometry"); + connect(animation1, &QPropertyAnimation::finished, animation1, &QPropertyAnimation::deleteLater); + if (ServerConfigManager::PanelType_Search == m_currentPanelType) { + // 动画效果的设置 + animation = new QPropertyAnimation(m_remoteManagementSearchPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_remoteManagementSearchPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else if (ServerConfigManager::PanelType_Manage == m_currentPanelType) { + // 动画效果的设置 + animation = new QPropertyAnimation(m_remoteManagementPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_remoteManagementPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else { + qInfo() << "unknow current panel!"; + animation1->deleteLater(); + return; + } + // 执行动画 + panelRightToLeft(animation, animation1); + + + // 分组界面设置焦点 + if (isFocusOn) { + // 1)不是鼠标点击,焦点落在返回键上 + // 2)是鼠标点击,但是焦点在组上,焦点也要落在返回键上 + m_serverConfigGroupPanel->onFocusInBackButton(); + } else { + // 是鼠标点击,当前项没有焦点 + MainWindow *w = Utils::getMainWindow(this); + if(w) + w->focusCurrentPage(); + qInfo() << "show group but not focus in group"; + } + + // 记录当前窗口为前一个窗口 + PanelState panelState; + panelState.m_type = m_currentPanelType; + panelState.m_isFocusOn = isFocusOn; + // 若有焦点,记录焦点位置 + if (isFocusOn) { + if (ServerConfigManager::PanelType_Search == m_currentPanelType) + panelState.m_currentListIndex = m_remoteManagementSearchPanel->getListIndex(); + else + panelState.m_currentListIndex = m_remoteManagementPanel->getListIndex(); + } + m_prevPanelStack.push_back(panelState); + // 修改当前窗口 + m_currentPanelType = ServerConfigManager::PanelType_Group; + // 设置平面状态 + setPanelShowState(m_currentPanelType); +} + +void RemoteManagementTopPanel::showPrevPanel() +{ + qInfo() << "RemoteManagementTopPanel show previous panel."; + PanelState state; + ServerConfigManager::PanelType prevType; + // 栈为空 + if (m_prevPanelStack.isEmpty()) { + // 返回 + qInfo() << "stack is empty! return to remote first panel"; + // 栈为空,返回主界面 + prevType = ServerConfigManager::PanelType_Manage; + } else { + // 获取前一个界面的类型,此界面为现在要显示的界面 + state = m_prevPanelStack.pop(); + prevType = state.m_type; + qInfo() << "prevType" << prevType; + } + + // 动画效果 要隐藏的界面 + QPropertyAnimation *animation = nullptr; + if (ServerConfigManager::PanelType_Search == m_currentPanelType) { + // 动画效果的设置 + animation = new QPropertyAnimation(m_remoteManagementSearchPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_remoteManagementSearchPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else if (ServerConfigManager::PanelType_Group == m_currentPanelType) { + // 动画效果的设置 + animation = new QPropertyAnimation(m_serverConfigGroupPanel, "geometry"); + connect(animation, &QPropertyAnimation::finished, m_serverConfigGroupPanel, &QWidget::hide); + connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater); + } else { + qInfo() << "unknow panel to hide!" << m_currentPanelType; + } + + // 动画效果 要显示的界面 + QPropertyAnimation *animation1 = nullptr; + switch (prevType) { + case ServerConfigManager::PanelType_Manage: + // 刷新主界面 + m_remoteManagementPanel->refreshPanel(); + // 显示主界面 + m_remoteManagementPanel->show(); + // 清空栈 + m_prevPanelStack.clear(); + m_filterStack.clear(); + qInfo() << "remote clear stack"; + // 动画效果的设置 + animation1 = new QPropertyAnimation(m_remoteManagementPanel, "geometry"); + connect(animation1, &QPropertyAnimation::finished, animation1, &QPropertyAnimation::deleteLater); + break; + case ServerConfigManager::PanelType_Group: + // 刷新分组列表 + m_serverConfigGroupPanel->refreshData(m_group); + // 显示分组 + m_serverConfigGroupPanel->show(); + // 动画效果的设置 + animation1 = new QPropertyAnimation(m_serverConfigGroupPanel, "geometry"); + connect(animation1, &QPropertyAnimation::finished, animation1, &QPropertyAnimation::deleteLater); + break; + case ServerConfigManager::PanelType_Search: { + // 刷新列表 => 搜索框能被返回,只能是全局搜索 + if (m_filterStack.isEmpty()) { + qInfo() << "error: filter stack is empty!"; + return; + } + // 取最上一个 + const QString &strFilter = m_filterStack.at(0); + // 清空栈 + m_filterStack.clear(); + // 刷新列表 + m_remoteManagementSearchPanel->refreshDataByFilter(strFilter); + // 显示搜索框 + m_remoteManagementSearchPanel->show(); + // 动画效果的设置 + animation1 = new QPropertyAnimation(m_remoteManagementSearchPanel, "geometry"); + connect(animation1, &QPropertyAnimation::finished, animation1, &QPropertyAnimation::deleteLater); + } + break; + } + if (nullptr == animation || nullptr == animation1) { + qInfo() << "do not has animation"; + if (nullptr != animation1) + animation1->deleteLater(); + + return; + } + + // 执行动画 + panelLeftToRight(animation, animation1); + + // 焦点在列表上 + MainWindow *w = Utils::getMainWindow(this); + if (w && w->isFocusOnList()) { + // 焦点返回 + if (ServerConfigManager::PanelType_Search == m_currentPanelType) { + // 搜索返回 + if (prevType == ServerConfigManager::PanelType_Manage) { + // 返回主界面 + m_remoteManagementPanel->setFocusInPanel(); + } else if (ServerConfigManager::PanelType_Group == prevType) { + // 返回分组 + m_serverConfigGroupPanel->setFocusBack(); + } + } else if (ServerConfigManager::PanelType_Group == m_currentPanelType) { + // 分组返回 + if (prevType == ServerConfigManager::PanelType_Manage) { + // 返回主界面 + m_remoteManagementPanel->setFocusBack(m_group); + } else if (ServerConfigManager::PanelType_Search == prevType) { + // 返回搜索界面 + m_remoteManagementSearchPanel->setFocusBack(m_group, state.m_isFocusOn, state.m_currentListIndex); + } + } else { + qInfo() << "unknow panel"; + } + } + + // 修改当前窗口 + m_currentPanelType = prevType; + // 设置平面状态 + setPanelShowState(m_currentPanelType); +} + +void RemoteManagementTopPanel::setPanelShowState(ServerConfigManager::PanelType panelType) +{ + // 设置平面状态 + m_remoteManagementPanel->m_isShow = false; + m_serverConfigGroupPanel->m_isShow = false; + m_remoteManagementSearchPanel->m_isShow = false; + + switch (panelType) { + case ServerConfigManager::PanelType_Manage: + m_remoteManagementPanel->m_isShow = true; + break; + case ServerConfigManager::PanelType_Group: + m_serverConfigGroupPanel->m_isShow = true; + break; + case ServerConfigManager::PanelType_Search: + m_remoteManagementSearchPanel->m_isShow = true; + break; + } +} + +void RemoteManagementTopPanel::panelLeftToRight(QPropertyAnimation *animation, QPropertyAnimation *animation1) +{ + animation->setDuration(animationDuration); + animation->setEasingCurve(QEasingCurve::OutQuad); + QRect rect = geometry(); + animation->setStartValue(QRect(0, rect.y(), rect.width(), rect.height())); + animation->setEndValue(QRect(rect.width(), rect.y(), rect.width(), rect.height())); + + animation1->setDuration(animationDuration); + animation1->setEasingCurve(QEasingCurve::OutQuad); + animation1->setStartValue(QRect(-rect.width(), rect.y(), rect.width(), rect.height())); + animation1->setEndValue(QRect(0, rect.y(), rect.width(), rect.height())); + QParallelAnimationGroup *group = new QParallelAnimationGroup(this); + group->addAnimation(animation); + group->addAnimation(animation1); + // 已验证:这个设定,会释放group以及所有组内动画。 + group->start(QAbstractAnimation::DeleteWhenStopped); + connect(group, &QParallelAnimationGroup::finished, group, &QParallelAnimationGroup::deleteLater); +} + +void RemoteManagementTopPanel::panelRightToLeft(QPropertyAnimation *animation, QPropertyAnimation *animation1) +{ + animation->setDuration(animationDuration); + animation->setEasingCurve(QEasingCurve::OutQuad); + QRect rect = geometry(); + animation->setStartValue(QRect(0, rect.y(), rect.width(), rect.height())); + animation->setEndValue(QRect(-rect.width(), rect.y(), rect.width(), rect.height())); + + animation1->setDuration(animationDuration); + animation1->setEasingCurve(QEasingCurve::OutQuad); + animation1->setStartValue(QRect(rect.width(), rect.y(), rect.width(), rect.height())); + animation1->setEndValue(QRect(0, rect.y(), rect.width(), rect.height())); + QParallelAnimationGroup *group = new QParallelAnimationGroup(this); + group->addAnimation(animation); + group->addAnimation(animation1); + // 已验证:这个设定,会释放group以及所有组内动画。 + group->start(QAbstractAnimation::DeleteWhenStopped); +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementtoppanel.h deepin-terminal-5.4.13/src/remotemanage/remotemanagementtoppanel.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/remotemanagementtoppanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/remotemanagementtoppanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: RemoteManagementTopPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理界面管理类 + 主要负责界面切换和动画效果 +*******************************************************************************/ +#ifndef REMOTEMANAGEMENTTOPPANEL_H +#define REMOTEMANAGEMENTTOPPANEL_H + +#include "rightpanel.h" +#include "commonpanel.h" +#include "remotemanagementpanel.h" +#include "serverconfiggrouppanel.h" +#include "remotemanagementsearchpanel.h" +#include "serverconfigmanager.h" + +#include +#include +#include + +// 记录平面的状态 +struct PanelState { + // 平面的类型 + ServerConfigManager::PanelType m_type; + // 平面的返回是否需要有焦点 + bool m_isFocusOn = false; + // 若返回需要有焦点,则记录index + int m_currentListIndex = -1; +}; + +class RemoteManagementTopPanel : public RightPanel +{ + Q_OBJECT +public: + explicit RemoteManagementTopPanel(QWidget *parent = nullptr); + /** + * @brief 远程管理顶部面板显示 + * @author ut000610 daizhengwen + */ + void show(); + /** + * @brief 根据插件给的条件值设置焦点,键盘进入设置焦点 + * @author ut000610 戴正文 + */ + void setFocusInPanel(); + +public slots: + /** + * @brief 显示搜索界面:若当前界面为主界面 => 全局搜索;若当前界面为分组界面 => 组内搜索 + * @author ut000610 戴正文 + * @param strFilter + */ + void showSearchPanel(const QString &strFilter); + /** + * @brief 显示分组界面 + * @author ut000610 戴正文 + * @param strGroupName 组名 + * @param isFocusOn 是否有焦点 + */ + void showGroupPanel(const QString &strGroupName, bool isFocusOn); + /** + * @brief 显示前一个界面(返回) + * @author ut000610 戴正文 + */ + void showPrevPanel(); + +signals: + void focusOut(); + void doConnectServer(ServerConfig *curServer); + +private: + // 远程主界面 + RemoteManagementPanel *m_remoteManagementPanel = nullptr; + // 远程分组界面 + ServerConfigGroupPanel *m_serverConfigGroupPanel = nullptr; + // 远程搜索界面 + RemoteManagementSearchPanel *m_remoteManagementSearchPanel = nullptr; + // 搜索条件 + QStack m_filterStack; + // 分组条件 + QString m_group; + // 当前界面 + ServerConfigManager::PanelType m_currentPanelType; + // 记录前一个界面 + QStack m_prevPanelStack; + + /** + * @brief 设置平面显示状态 + * @author ut000610 戴正文 + * @param panelType + */ + void setPanelShowState(ServerConfigManager::PanelType panelType); + /** + * @brief 远程管理顶部面板从左到右动画 + * @author ut000610 daizhengwen + * @param animation + * @param animation1 + */ + void panelLeftToRight(QPropertyAnimation *animation, QPropertyAnimation *animation1); + /** + * @brief 远程管理顶部面板从右到左动画 + * @author ut000610 daizhengwen + * @param animation + * @param animation1 + */ + void panelRightToLeft(QPropertyAnimation *animation, QPropertyAnimation *animation1); +}; + +#endif // REMOTEMANAGEMENTTOPPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfiggrouppanel.cpp deepin-terminal-5.4.13/src/remotemanage/serverconfiggrouppanel.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfiggrouppanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfiggrouppanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,207 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "serverconfiggrouppanel.h" +#include "listview.h" +#include "serverconfigmanager.h" +#include "iconbutton.h" +#include "utils.h" +#include "mainwindow.h" + +#include +#include +#include +#include + +#define GROUPSEARCHWIDTH 172 + +ServerConfigGroupPanel::ServerConfigGroupPanel(QWidget *parent) : CommonPanel(parent) +{ + Utils::set_Object_Name(this); + initUI(); +} + +void ServerConfigGroupPanel::initUI() +{ + this->setBackgroundRole(QPalette::Base); + this->setAutoFillBackground(true); + + m_rebackButton = new IconButton(this); + m_searchEdit = new DSearchEdit(this); + //fix bug#64976 按tab键循环切换到右上角X按钮时继续按tab键,焦点不能切换到搜索框 + m_searchEdit->setFocusPolicy(Qt::StrongFocus); + m_searchEdit->setFocusProxy(m_searchEdit->lineEdit()); + m_searchEdit->setObjectName("RemoteGroupSearchEdit");//Add by ut001000 renfeixiang 2020-08-14 + m_listWidget = new ListView(ListType_Remote, this); + m_listWidget->setObjectName("RemoteGroupListWidget");//Add by ut001000 renfeixiang 2020-08-14 + + m_rebackButton->setIcon(DStyle::StandardPixmap::SP_ArrowLeave); + m_rebackButton->setFixedSize(QSize(ICONSIZE_36, ICONSIZE_36)); + m_rebackButton->setObjectName("RemoteGroupRebackButton"); + + m_searchEdit->setFixedWidth(GROUPSEARCHWIDTH); + m_searchEdit->setClearButtonEnabled(true); + + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->setContentsMargins(0, 0, 0, 0); + hlayout->addSpacing(SPACEWIDTH); + hlayout->addWidget(m_rebackButton); + hlayout->addSpacing(SPACEWIDTH); + hlayout->addWidget(m_searchEdit); + hlayout->addSpacing(SPACEWIDTH); + // 没有搜索框,返回按钮仍显示在左边 + hlayout->addStretch(); + hlayout->setSpacing(0); + hlayout->setMargin(0); + + QVBoxLayout *vlayout = new QVBoxLayout(); + vlayout->setContentsMargins(0, 0, 0, 0); + vlayout->addSpacing(SPACEHEIGHT); + vlayout->addLayout(hlayout); + vlayout->addWidget(m_listWidget); + vlayout->setMargin(0); + vlayout->setSpacing(SPACEHEIGHT); + setLayout(vlayout); + + connect(m_searchEdit, &DSearchEdit::returnPressed, this, &ServerConfigGroupPanel::handleShowSearchResult); // + connect(m_listWidget, &ListView::itemClicked, this, &ServerConfigGroupPanel::onItemClicked); + connect(m_listWidget, &ListView::listItemCountChange, this, &ServerConfigGroupPanel::refreshSearchState); + connect(m_listWidget, &ListView::focusOut, this, &ServerConfigGroupPanel::onListViewFocusOut); + connect(m_rebackButton, &DIconButton::clicked, this, &ServerConfigGroupPanel::rebackPrevPanel); + connect(m_rebackButton, &IconButton::preFocus, this, &ServerConfigGroupPanel::rebackPrevPanel); + connect(ServerConfigManager::instance(), &ServerConfigManager::refreshList, this, &ServerConfigGroupPanel::onRefreshList); +} + +inline void ServerConfigGroupPanel::onListViewFocusOut(Qt::FocusReason type) +{ + if (!m_isShow) { + // 不显示,不处理焦点 + return; + } + if (Qt::TabFocusReason == type) { + qInfo() << "group focus out!"; + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Tab, Qt::MetaModifier); + QApplication::sendEvent(Utils::getMainWindow(this), &keyPress); + m_listWidget->clearIndex(); + } else if (Qt::BacktabFocusReason == type) { + // 判断是否可见,可见设置焦点 + if (m_searchEdit->isVisible()) + m_searchEdit->lineEdit()->setFocus(); + else + m_rebackButton->setFocus(); + + m_listWidget->clearIndex(); + } else if (Qt::NoFocusReason == type) { + qInfo() << "group NoFocusReason"; + int isFocus = false; + // 列表没有内容,焦点返回到返回键上 + if (m_listWidget->hasFocus() || m_rebackButton->hasFocus()) + isFocus = true; + + int count = ServerConfigManager::instance()->getServerCount(m_groupName); + if (0 == count) { + emit rebackPrevPanel(); + qInfo() << "showRemoteManagementPanel" << isFocus << count; + m_isShow = false; + return; + } + m_listWidget->clearIndex(); + } +} + +inline void ServerConfigGroupPanel::onRefreshList() +{ + qInfo() << "group refresh list"; + if (m_isShow) { + refreshData(m_groupName); + QMap> &configMap = ServerConfigManager::instance()->getServerConfigs(); + if (!configMap.contains(m_groupName)) { + // 没有这个组 ==> 组内没成员,则返回 + emit rebackPrevPanel(); + m_isShow = false; + } + } +} + +void ServerConfigGroupPanel::refreshData(const QString &groupName) +{ + qInfo() << __FUNCTION__; + m_groupName = groupName; + m_listWidget->clearData(); + ServerConfigManager::instance()->refreshServerList(ServerConfigManager::PanelType_Group, m_listWidget, "", groupName); + refreshSearchState(); +} + +void ServerConfigGroupPanel::setFocusBack() +{ + qInfo() << __FUNCTION__; + // 设置焦点到搜索框 + if (m_searchEdit->isVisible()) { + // 显示搜索框 + m_searchEdit->lineEdit()->setFocus(); + } else { + // 没有搜索框 + if (ServerConfigManager::instance()->getServerCount(m_groupName)) { + setFocus(); + // 没有搜索框,焦点落到列表中 + m_listWidget->setCurrentIndex(0); + } else { + // 没有列表,直接显示远程主界面 + emit rebackPrevPanel(); + // 不接受刷新信号的操作 + m_isShow = false; + } + } +} + +void ServerConfigGroupPanel::clearAllFocus() +{ + m_rebackButton->clearFocus(); + m_searchEdit->clearFocus(); + m_listWidget->clearFocus(); +} + +void ServerConfigGroupPanel::handleShowSearchResult() +{ + QString strFilter = m_searchEdit->text(); + emit showSearchPanel(strFilter); +} + +void ServerConfigGroupPanel::refreshSearchState() +{ + if (m_listWidget->count() >= 2) { + /************************ Add by m000743 sunchengxi 2020-04-22:搜索显示异常 Begin************************/ + m_searchEdit->clearEdit(); + /************************ Add by m000743 sunchengxi 2020-04-22:搜索显示异常 End ************************/ + m_searchEdit->show(); + } else { + m_searchEdit->hide(); + } +} + +void ServerConfigGroupPanel::onItemClicked(const QString &key) +{ + // 获取远程信息 + ServerConfig *remote = ServerConfigManager::instance()->getServerConfig(key); + if (nullptr != remote) + emit doConnectServer(remote); + else + qInfo() << "can't connect to remote" << key; +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfiggrouppanel.h deepin-terminal-5.4.13/src/remotemanage/serverconfiggrouppanel.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfiggrouppanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfiggrouppanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: ServerConfigGroupPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理分组界面 + 主要有返回按钮,搜索框和分组列表构成 + 搜索框只有两个以上的选项时才显示 + 搜索结果为组内搜索 +*******************************************************************************/ +#ifndef SERVERCONFIGGROUPPANEL_H +#define SERVERCONFIGGROUPPANEL_H + +#include "commonpanel.h" +#include "serverconfigmanager.h" + +#include + +class ListView; +class ServerConfigGroupPanel : public CommonPanel +{ + Q_OBJECT +public: + explicit ServerConfigGroupPanel(QWidget *parent = nullptr); + /** + * @brief 服务器配置组面板刷新数据 + * @author ut000610 daizhengwen + * @param groupName 分组名 + */ + void refreshData(const QString &groupName); + /** + * @brief 设置焦点返回的位置:position -1 搜索框;其他列表位置;返回键按键不是这边设置 + * @author ut000610 戴正文 + */ + void setFocusBack(); + /** + * @brief 清除所有焦点 + * @author ut000610 戴正文 + */ + void clearAllFocus(); + +signals: + // 显示搜索结果,搜索框有焦点 + void showSearchPanel(const QString &strFilter); + void doConnectServer(ServerConfig *curServer); + // 返回前一个界面 + void rebackPrevPanel(); + +public slots: + /** + * @brief 服务器配置组面板处理显示搜索到的结果 + * @author ut000610 daizhengwen + */ + void handleShowSearchResult(); + /** + * @brief 服务器配置组面板刷新搜索状态 + * @author ut000610 daizhengwen + */ + void refreshSearchState(); + /** + * @brief 列表项被点击, 连接远程 + * @author ut000610 戴正文 + * @param key 列表项 + */ + void onItemClicked(const QString &key); + + void onRefreshList(); + void onListViewFocusOut(Qt::FocusReason type); + +private: + /** + * @brief 服务器配置组面板初始化UI界面 + * @author ut000610 daizhengwen + */ + void initUI(); + +private: + ListView *m_listWidget = nullptr; + QString m_groupName; +}; + +#endif // SERVERCONFIGGROUPPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigmanager.cpp deepin-terminal-5.4.13/src/remotemanage/serverconfigmanager.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigmanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfigmanager.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,658 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "serverconfigmanager.h" +#include "serverconfigoptdlg.h" +#include "listview.h" +#include "utils.h" + +#include +#include + +#undef signals +#include + +// 密码回调 +struct PasswordReBack { + QString key; + ServerConfigManager *manager = nullptr; +}; + + +ServerConfigManager *ServerConfigManager::m_instance = nullptr; + +ServerConfigManager::ServerConfigManager(QObject *parent) : QObject(parent) +{ + Utils::set_Object_Name(this); + QSettings::registerFormat("conf", SettingIO::readIniFunc, SettingIO::writeIniFunc); + // 查找结果,写入map + connect(this, &ServerConfigManager::lookupSerceats, this, &ServerConfigManager::onLookupFinish); +} + +void ServerConfigManager::settServerConfig(USettings &commandsSettings, const QString &strGroupName, ServerConfig *config) +{ + commandsSettings.beginGroup(strGroupName); + commandsSettings.setValue("userName", config->m_userName); + commandsSettings.setValue("address", config->m_address); + commandsSettings.setValue("port", config->m_port); + commandsSettings.setValue("Name", config->m_serverName); + // 不将密码写入配置文件中 + //commandsSettings.setValue("Password", config->m_password); + commandsSettings.setValue("GroupName", config->m_group); + commandsSettings.setValue("Command", config->m_command); + commandsSettings.setValue("Path", config->m_path); + commandsSettings.setValue("Encode", config->m_encoding); + commandsSettings.setValue("Backspace", config->m_backspaceKey); + commandsSettings.setValue("Del", config->m_deleteKey); + commandsSettings.setValue("PrivateKey", config->m_privateKey); + commandsSettings.endGroup(); +} + +void ServerConfigManager::fillManagePanel(ListView *listview) +{ + qInfo() << "ServerConfigManager fill data to manage panel."; + listview->clearData(); + for (QString key : m_serverConfigs.keys()) { + // key有效 + // 先后添加组和项对顺序没影响 + // 此处先后顺序只是符合界面显示顺序,方便阅读 判断key 是否为"",只是为了严格判断是否是没有分组的项 + if (!key.isEmpty() && !key.isNull()) { + // 添加组 + listview->addItem(ItemFuncType_Group, key); + } else if (key == "") { + // 添加项 + for (ServerConfig *item : m_serverConfigs[key]) { + listview->addItem(ItemFuncType_Item, item->m_serverName, QString("%1@%2").arg(item->m_userName).arg(item->m_address)); + } + } + } +} + +void ServerConfigManager::fillSearchPanel(ListView *listview, const QString &filter, const QString &group) +{ + qInfo() << "ServerConfigManager fill data to search panel."; + listview->clearData(); + // 判断是否是组内搜索 + if (group.isEmpty() || group.isNull()) { + // 没有组,全局搜索 + for (QString key : m_serverConfigs.keys()) { + // key有效 + if (!key.isEmpty() && !key.isNull()) { + // 组匹配 + if (key.contains(filter, Qt::CaseSensitivity::CaseInsensitive)) { + // 添加组 + listview->addItem(ItemFuncType_Group, key); + } + } + // 组内匹配 + for (ServerConfig *item : m_serverConfigs[key]) { + if (item->m_serverName.contains(filter, Qt::CaseSensitivity::CaseInsensitive) + || item->m_userName.contains(filter, Qt::CaseSensitivity::CaseInsensitive) + || item->m_address.contains(filter, Qt::CaseSensitivity::CaseInsensitive)) + // 添加项 + listview->addItem(ItemFuncType_Item, item->m_serverName, QString("%1@%2").arg(item->m_userName).arg(item->m_address)); + } + } + } else { + // 组内搜索 + for (QString key : m_serverConfigs.keys()) { + // 找到分组 + if (key != group) + continue; + // 组内匹配 + for (ServerConfig *item : m_serverConfigs[key]) { + if (item->m_serverName.contains(filter, Qt::CaseSensitivity::CaseInsensitive) + || item->m_userName.contains(filter, Qt::CaseSensitivity::CaseInsensitive) + || item->m_address.contains(filter, Qt::CaseSensitivity::CaseInsensitive)) + // 添加项 + listview->addItem(ItemFuncType_Item, item->m_serverName, QString("%1@%2").arg(item->m_userName).arg(item->m_address)); + } + } + } + +} + +void ServerConfigManager::fillGroupPanel(ListView *listview, const QString &group) +{ + listview->clearData(); + // 遍历 + for (QString key : m_serverConfigs.keys()) { + // 找到分组 + if (key != group) + continue; + // 组内匹配 + for (ServerConfig *item : m_serverConfigs[key]) { + // 添加项 + listview->addItem(ItemFuncType_Item, item->m_serverName, QString("%1@%2").arg(item->m_userName).arg(item->m_address)); + } + } +} + +ServerConfigManager *ServerConfigManager::instance() +{ + if (nullptr == m_instance) + m_instance = new ServerConfigManager(); + return m_instance; +} + +void ServerConfigManager::initServerConfig() +{ + bool isConvertData = false; + m_serverConfigs.clear(); + //---------------------------------------------------------------------------// + QDir serverConfigBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!serverConfigBasePath.exists()) + return; + + QString serverConfigFilePath(serverConfigBasePath.filePath("server-config.conf")); + qInfo() << "load Server Config: " << serverConfigFilePath; + if (!QFile::exists(serverConfigFilePath)) + return; + + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* del + QSettings serversSettings(serverConfigFilePath, QSettings::CustomFormat1); + serversSettings.setIniCodec(QTextCodec::codecForName("UTF-8"));*/ + /* add */ + USettings serversSettings(serverConfigFilePath); + /***modify end by ut001121***/ + + QStringList serverGroups = serversSettings.childGroups(); + for (QString &serverName : serverGroups) { + serversSettings.beginGroup(serverName); + QStringList strList = serverName.split("@"); + ServerConfig *pServerConfig = new ServerConfig(); + if (strList.count() < 3) { + qInfo() << __FUNCTION__ << serverName << strList.count() << "error"; + continue; + } + // 新版数据的读取方式 + // 读取方式优化,原本保存到groupName的值,改为保存到value里 + // 若配置文件没有包含userName、address、port,则读取groupName的,反之读取key-value + if(!serversSettings.contains("userName")) + serversSettings.setValue("userName", strList.at(0)); + if(!serversSettings.contains("address")) + serversSettings.setValue("address", strList.at(1)); + if(!serversSettings.contains("port")) + serversSettings.setValue("port", strList.at(2)); + + pServerConfig->m_userName = serversSettings.value("userName").toString(); + pServerConfig->m_address = serversSettings.value("address").toString(); + pServerConfig->m_port = serversSettings.value("port").toString(); + pServerConfig->m_serverName = serversSettings.value("Name").toString(); + pServerConfig->m_password = serversSettings.value("Password").toString(); + pServerConfig->m_group = serversSettings.value("GroupName").toString(); + pServerConfig->m_command = serversSettings.value("Command").toString(); + pServerConfig->m_path = serversSettings.value("Path").toString(); + pServerConfig->m_encoding = serversSettings.value("Encode").toString(); + pServerConfig->m_backspaceKey = serversSettings.value("Backspace").toString(); + pServerConfig->m_deleteKey = serversSettings.value("Del").toString(); + pServerConfig->m_privateKey = serversSettings.value("PrivateKey").toString(); + serversSettings.endGroup(); + + // 兼容旧版本的操作 1) 旧版配置文件需要重写 2) 密码明文需要重写 + if (OLD_VERTIONCOUNT == strList.count() || !pServerConfig->m_password.isEmpty()) + isConvertData = true; + + // 旧终端的唯一值 + QString strKey = + QString("%1@%2@%3@%4").arg(strList.at(0)).arg(strList.at(1)).arg(strList.at(2)).arg(pServerConfig->m_serverName); + if (m_remoteConfigs.contains(strKey)) { + if (OLD_VERTIONCOUNT == strList.count()) { + // 现在是旧的 + delete pServerConfig; + break; + } else { + // 现在是新的 + ServerConfig *config = m_remoteConfigs[strKey]; + m_remoteConfigs.remove(strKey); + delete config; + } + + } + + m_remoteConfigs.insert(strKey, pServerConfig); + + } + + for (ServerConfig *pServerConfig : m_remoteConfigs) { + // 避免出现ServerName相同的情况相同情况下给他加(i) + if (m_remoteName.contains(pServerConfig->m_serverName)) { + int i = ++m_remoteName[pServerConfig->m_serverName]; + QString strServerName = QString("%1(%2)").arg(pServerConfig->m_serverName).arg(QString::number(i)); + pServerConfig->m_serverName = strServerName; + } else { + m_remoteName[pServerConfig->m_serverName] = 1; + } + } + + + // 新数据写入map + for (ServerConfig *config : m_remoteConfigs) { + // 没有密码的情况都要去DBus中获取一下 + if (config->m_password.isEmpty()) { + remoteGetSecreats(config->m_userName, config->m_address, config->m_port, config->m_serverName); + ++m_lookupCount; + } + // 将数据写入map + m_serverConfigs[config->m_group].append(config); + } + + + // 若rewrite为true删除原数据,将内存的数据写入原文件 + m_rewriteConfig = (SettingIO::rewrite || isConvertData); + // 没有需要查找的数据,直接判断是否重写配置文件 + if (m_rewriteConfig && 0 == m_lookupCount) + ConvertData(); + + return; +} + +void ServerConfigManager::saveServerConfig(ServerConfig *config) +{ + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + customCommandBasePath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString customCommandConfigFilePath(customCommandBasePath.filePath("server-config.conf")); + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + + //--modified by qinyaning to solve probel(bug 19338) when added ftp--// + QString strConfigGroupName = QString("%1@%2@%3@%4").arg( + config->m_userName, config->m_address, config->m_port, config->m_serverName); + //------------------------------ + settServerConfig(commandsSettings, strConfigGroupName, config); + m_serverConfigs[config->m_group].append(config); + // 添加密码 + remoteStoreSecreats(config); + + qInfo() << "append success!" << config->m_group << config->m_serverName; + +} + +void ServerConfigManager::delServerConfig(ServerConfig *config) +{ + // 防止重复删除 + if (nullptr == config) { + return; + } + // 读写配置文件 + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + customCommandBasePath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString customCommandConfigFilePath(customCommandBasePath.filePath("server-config.conf")); + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* del + QSettings commandsSettings(customCommandConfigFilePath, QSettings::CustomFormat1);*/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + + //--modified by qinyaning to solve probel(bug 19338) when added ftp--// + QString strConfigGroupName = QString("%1@%2@%3@%4").arg( + config->m_userName, config->m_address, config->m_port, config->m_serverName); + + // 配置中清除数据 + commandsSettings.remove(strConfigGroupName); + + // 清除原本的密码 + remoteClearSecreats(config->m_userName, config->m_address, config->m_port); + // 删除DBus中的密码 + //将map中数据清除 + // 删除数据 + m_serverConfigs[config->m_group].removeOne(config); + // 判断组成员 + if (0 == m_serverConfigs[config->m_group].count()) { + // 若组内无成员 + m_serverConfigs.remove(config->m_group); + } + // 所有弹窗都消失才能delete config + delete config; +} + +void ServerConfigManager::modifyServerConfig(ServerConfig *newConfig, ServerConfig *oldConfig) +{ + SyncData(oldConfig->m_serverName, newConfig); + // 刷新已有数据 + delServerConfig(oldConfig); + saveServerConfig(newConfig); +} + +QMap> &ServerConfigManager::getServerConfigs() +{ + return m_serverConfigs; +} + +void ServerConfigManager::refreshServerList(PanelType type, ListView *listview, const QString &filter, const QString &group) +{ + switch (type) { + case PanelType_Manage: + fillManagePanel(listview); + break; + case PanelType_Group: + fillGroupPanel(listview, group); + break; + case PanelType_Search: + fillSearchPanel(listview, filter, group); + break; + } +} + +void ServerConfigManager::setModifyDialog(QString key, ServerConfigOptDlg *dlg) +{ + // 添加编辑弹窗 + m_serverConfigDialogMap[key].append(dlg); + qInfo() << "show edit dialog" << key << m_serverConfigDialogMap[key].count() << dlg; +} + +void ServerConfigManager::removeDialog(ServerConfigOptDlg *dlg) +{ + QString key; + ServerConfigOptDlg *removeOne = nullptr; + // 1.查找dlg指针 + // 遍历map + for (serverConfigDialogMapIterator item = m_serverConfigDialogMap.begin(); item != m_serverConfigDialogMap.end(); ++item) { + //遍历列表 + for (ServerConfigOptDlg *dlgItem : item.value()) { + if (dlgItem == dlg) { + key = item.key(); + removeOne = dlgItem; + } + } + } + // 2.删除数据 + if (nullptr != removeOne) { + qInfo() << "delete dialog from remote name : " << key; + m_serverConfigDialogMap[key].removeOne(removeOne); + } + + if (0 == m_serverConfigDialogMap[key].count()) { + qInfo() << "remote dialog is 0, remove remote name : " << key; + m_serverConfigDialogMap.remove(key); + } + + if (nullptr != removeOne) { + qInfo() << "delete remote dialog" << removeOne; + removeOne->deleteLater(); + } + removeOne = nullptr; +} + +void ServerConfigManager::SyncData(QString key, ServerConfig *newConfig) +{ + qInfo() << key << newConfig->m_serverName; + //前提是key唯一 + // serverName被修改 + if (key != newConfig->m_serverName) { + // 将数据放入新的键值对 + QList serverConfigOptDlgList; + for (auto &item : m_serverConfigDialogMap[key]) { + serverConfigOptDlgList.append(item); + } + m_serverConfigDialogMap[newConfig->m_serverName] = serverConfigOptDlgList; + m_serverConfigDialogMap.remove(key); + } + + for (auto &dlg : m_serverConfigDialogMap[newConfig->m_serverName]) { + dlg->updataData(newConfig); + } + +} + +void ServerConfigManager::closeAllDialog(QString key) +{ + qInfo() << __FUNCTION__ << "remote name : " << key << m_serverConfigDialogMap.count(); + // 判读此时这个key是否存在 + if (!m_serverConfigDialogMap.contains(key)) { + // 不存在退出 + qInfo() << __FUNCTION__ << "not contains " << key; + return; + } + + for (auto &item : m_serverConfigDialogMap[key]) { + if (item != nullptr) { + qInfo() << __FUNCTION__ << "reject : " << item; + // reject就会把当前的窗口删除 + item->reject(); + } + } +} + +int ServerConfigManager::getServerCount(const QString &strGroupName) +{ + if (strGroupName.isEmpty() || strGroupName.isNull()) { + qInfo() << "enter error group name:" << strGroupName << "! please confirm again!"; + return -1; + } + if (m_serverConfigs.contains(strGroupName)) { + // 返回组个数 + return m_serverConfigs[strGroupName].count(); + } + // 不包含 + return 0; +} + +ServerConfig *ServerConfigManager::getServerConfig(const QString &key) +{ + // 遍历查找 + for (const QString &groupName : m_serverConfigs.keys()) { + for (ServerConfig *item : m_serverConfigs[groupName]) { + if (key == item->m_serverName) { + // 找到返回值 + return item; + } + } + } + // 没找到返回空 + qInfo() << "can't find remote key : " << key; + return nullptr; +} + +/******************************************************************************* + 1. @函数: on_password_lookup + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-01 + 4. @说明: 异步获取密码的回调事件 +*******************************************************************************/ +static void on_password_lookup(GObject *source, GAsyncResult *result, gpointer unused) +{ + Q_UNUSED(source); + GError *error = NULL; + + PasswordReBack *reback = static_cast(unused); + Q_ASSERT(reback); + if (NULL == unused) { + emit reback->manager->lookupSerceats(reback->key, ""); + return; + } + + gchar *password = secret_password_lookup_finish(result, &error); + + if (error != NULL) { + /* ... handle the failure here */ + qInfo() << error->message; + g_error_free(error); + emit reback->manager->lookupSerceats(reback->key, ""); + } else if (password == NULL) { + /* password will be null, if no matching password found */ + // 密码回调 + qInfo() << "password is Null server name : " << reback->key; + emit reback->manager->lookupSerceats(reback->key, ""); + + } else { + /* ... do something with the password */ + // 将密码写入 + emit reback->manager->lookupSerceats(reback->key, QString(password)); + secret_password_free(password); + } + + delete reback; +} + +void ServerConfigManager::remoteGetSecreats(const QString &userName, const QString &address, const QString &port, const QString &key) +{ + QString strSchemaName = QString("com.deepin.terminal.password.%1.%2.%3").arg(userName).arg(address).arg(port); + const SecretSchema *scheme = + secret_schema_new(strSchemaName.toUtf8().data(), SECRET_SCHEMA_NONE, "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER, "string", SECRET_SCHEMA_ATTRIBUTE_STRING, "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN, NULL); + + PasswordReBack *reback = new PasswordReBack; + reback->key = key; + reback->manager = this; + // 获取密码 + secret_password_lookup(scheme, NULL, on_password_lookup, reback, + "number", 8, + "string", "eight", + "even", TRUE, + NULL); +} + + +/******************************************************************************* + 1. @函数: on_password_stored + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-01 + 4. @说明: secret_password_store的回调函数 +*******************************************************************************/ +static void on_password_stored(GObject *source, GAsyncResult *result, gpointer unused) +{ + Q_UNUSED(source); + Q_UNUSED(unused); + GError *error = NULL; + + secret_password_store_finish(result, &error); + if (error != NULL) { + /* ... handle the failure here */ + qInfo() << error->message; + g_error_free(error); + } else { + /* ... do something now that the password has been stored */ + } +} + +void ServerConfigManager::remoteStoreSecreats(ServerConfig *config) +{ + QString strLabel = QString("com.deepin.terminal.password.%1.%2").arg(config->m_userName).arg(config->m_address); + QString strSchemaName = QString("com.deepin.terminal.password.%1.%2.%3").arg(config->m_userName).arg(config->m_address).arg(config->m_port); + const SecretSchema *scheme = + secret_schema_new(strSchemaName.toUtf8().data(), SECRET_SCHEMA_NONE, "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER, "string", SECRET_SCHEMA_ATTRIBUTE_STRING, "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN, NULL); + // 存储密码 + secret_password_store(scheme, SECRET_COLLECTION_DEFAULT, strLabel.toUtf8().data(), + config->m_password.toUtf8().data(), NULL, on_password_stored, NULL, + "number", 8, + "string", "eight", + "even", TRUE, + NULL); +} + +/******************************************************************************* + 1. @函数: on_password_cleared + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-09-01 + 4. @说明: secret_password_clear的回调函数 +*******************************************************************************/ +static void on_password_cleared(GObject *source, GAsyncResult *result, gpointer unused) +{ + Q_UNUSED(source); + Q_UNUSED(unused); + GError *error = NULL; + + gboolean removed = secret_password_clear_finish(result, &error); + + if (error != NULL) { + /* ... handle the failure here */ + qInfo() << __FUNCTION__ << error->message; + g_error_free(error); + + } else { + /* removed will be TRUE if a password was removed */ + qInfo() << "remove result " << removed; + } +} + +void ServerConfigManager::remoteClearSecreats(const QString &userName, const QString &address, const QString &port) +{ + QString strSchemaName = QString("com.deepin.terminal.password.%1.%2.%3").arg(userName).arg(address).arg(port); + const SecretSchema *scheme = + secret_schema_new(strSchemaName.toUtf8().data(), SECRET_SCHEMA_NONE, "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER, "string", SECRET_SCHEMA_ATTRIBUTE_STRING, "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN, NULL); + // 清除密码 + secret_password_clear(scheme, NULL, on_password_cleared, NULL, "number", 8, "string", "eight", "even", true, NULL); +// secret_password_clear_sync(&scheme, nullptr, nullptr, "number", 8, "string", "eight", "even", true, nullptr); +} + +void ServerConfigManager::ConvertData() +{ + // 读写配置文件 + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + customCommandBasePath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString customCommandConfigFilePath(customCommandBasePath.filePath("server-config.conf")); + // 旧数据删除 + QFile fileTemp(customCommandConfigFilePath); + fileTemp.remove(); + + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* del + QSettings commandsSettings(customCommandConfigFilePath, QSettings::CustomFormat1);*/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + + // 新数据写入 + for (QList list : m_serverConfigs) { + for (ServerConfig *config : list) { + QString strUnique = QString("%1@%2@%3@%4").arg(config->m_userName).arg(config->m_address).arg(config->m_port).arg(config->m_serverName); + // 重新写入 + settServerConfig(commandsSettings, strUnique, config); + // 密码写入DBus + remoteStoreSecreats(config); + } + } +} + +void ServerConfigManager::onLookupFinish(const QString &key, const QString &password) +{ + --m_lookupCount; + // 遍历 + for (QList &list : m_serverConfigs) { + for (ServerConfig *config : list) { + if (key == config->m_serverName) { + // 将密码存入map + config->m_password = password; + break; + } + } + } + // 判断所有密码是否都读取完成 且 是否需要重写 + if (0 == m_lookupCount && m_rewriteConfig) { + m_rewriteConfig = false; + // 重写数据 + ConvertData(); + } + +} + +ServerConfigManager::~ServerConfigManager() +{ +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigmanager.h deepin-terminal-5.4.13/src/remotemanage/serverconfigmanager.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigmanager.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfigmanager.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,262 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: ServerConfigManager + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理的数据管理类 + 负责初始化配置文件的数据 + 负责对配置文件数据的增删改操作 + 负责管理对数据操作的对话框,负责同步对话框的数据 +*******************************************************************************/ +#ifndef SERVERCONFIGMANAGER_H +#define SERVERCONFIGMANAGER_H + +#include "settingio.h" + +#include +#include +#include +#include +#include +#include +#include + +struct ServerConfig { + QString m_serverName; + QString m_address; + QString m_userName; + QString m_password; + QString m_privateKey; + QString m_port; + QString m_group; + QString m_path; + QString m_command; + QString m_encoding; + QString m_backspaceKey; + QString m_deleteKey; +}; + +// 旧版本groupName的count +#define OLD_VERTIONCOUNT 3 +// 新版本groupName的count +#define NEW_VERTIONCOUNT 4 + + +class ServerConfigOptDlg; +class ListView; +class ServerConfigManager : public QObject +{ + Q_OBJECT +public: + + // 面板类型 + enum PanelType { + // 初始界面 + PanelType_Manage = 0, + // 分组界面 + PanelType_Group, + // 搜索界面 + PanelType_Search + }; + + static ServerConfigManager *instance(); + ~ServerConfigManager(); + /** + * @brief 初始化服务器配置 + * @author ut000610 daizhengwen + */ + void initServerConfig(); + /** + * @brief 保存服务器配置 + * @author ut000610 daizhengwen + * @param config 服务器配置 + */ + void saveServerConfig(ServerConfig *config); + /** + * @brief 删除服务器配置 + * @author ut000610 daizhengwen + * @param config 服务器配置 + */ + void delServerConfig(ServerConfig *config); + /** + * @brief 修改服务器配置 + * @author ut000610 daizhengwen + * @param newConfig 新配置 + * @param oldConfig 老配置 + */ + void modifyServerConfig(ServerConfig *newConfig, ServerConfig *oldConfig); + /** + * @brief 获取服务器配置 + * @author ut000610 daizhengwen + * @return + */ + QMap> &getServerConfigs(); + + /** + * @brief refreshServerList + * @author ut000610 戴正文 + * @param type 初始界面 PanelType_Manage 分组界面;PanelType_Group 搜索界 PanelType_Search + * @param listview 所需填充的列表 + * @param filter 搜索界面的搜索条件 + * @param group 分组界面的组名 + */ + void refreshServerList(PanelType type, ListView *listview, const QString &filter = "", const QString &group = ""); + /** + * @brief 服务器设置修改对话框 + * @author ut000610 daizhengwen + * @param key + * @param dlg 服务器设置修改对话框 + */ + void setModifyDialog(QString key, ServerConfigOptDlg *dlg); + /** + * @brief 从m_serverConfigDialogMap中将dlg数据删除 + * @author ut000610 戴正文 + * @param dlg + */ + void removeDialog(ServerConfigOptDlg *dlg); + /** + * @brief 同步弹窗数据 + * @author ut000610 daizhengwen + * @param key + * @param newConfig 新配置 + */ + void SyncData(QString key, ServerConfig *newConfig); + /** + * @brief 删除数据,关闭所有同类弹窗 + * @author ut000610 daizhengwen + * @param key + */ + void closeAllDialog(QString key); + /** + * @brief 根据组名获得组内服务器个数 + * @author ut000610 戴正文 + * @param strGroupName 组名 + * @return + */ + int getServerCount(const QString &strGroupName); + /** + * @brief 根据关键值获取远程配置信息 + * @author ut000610 戴正文 + * @param key 关键值 + * @return + */ + ServerConfig *getServerConfig(const QString &key); + + // 获取密码 => 查找密码 + /** + * @brief 远程管理获得密码(异步方法) + * @author ut000610 戴正文 + * @param userName 用户名 + * @param address 地址 + * @param port 端口 + * @param key + */ + void remoteGetSecreats(const QString &userName, const QString &address, const QString &port, const QString &key); + /** + * @brief 保存密码 + * @author ut000610 戴正文 + * @param config + */ + void remoteStoreSecreats(ServerConfig *config); + /** + * @brief 删除密码 + * @author ut000610 戴正文 + * @param userName 用户名 + * @param address 地址 + * @param port 端口 + */ + void remoteClearSecreats(const QString &userName, const QString &address, const QString &port); + + /** + * @brief 转换数据 + * @author ut000610 戴正文 + */ + void ConvertData(); + +public slots: + /** + * @brief 处理查询密码操作的结果写入map + * @author ut000610 戴正文 + * @param key + * @param password 密码 + */ + void onLookupFinish(const QString &key, const QString &password); + +Q_SIGNALS: + // 刷新列表 + void refreshList(); + // 获取查询到的密码 + void lookupSerceats(const QString &key, const QString &password); + +private: + explicit ServerConfigManager(QObject *parent = nullptr); + + static ServerConfigManager *m_instance; + + // 避免重复数据用的数据结构,兼容旧版本 + QMap m_remoteConfigs; + // 避免名称重复用的数据结构 + QMap m_remoteName; + // 配置文件数据 + QMap> m_serverConfigs; + // 展示的弹窗的键值及弹窗的指针 <服务器名,同类服务器弹窗列表> 弹窗只需存储修改弹窗 + QMap> m_serverConfigDialogMap; + // 添加服务器弹窗 + /** + * @brief 写服务器配置文件 + * @author m000714 戴正文 + * @param commandsSettings + * @param strGroupName 组名 + * @param config 服务器配置 + */ + inline void settServerConfig(USettings &commandsSettings, const QString &strGroupName, ServerConfig *config); + /** + * @brief 初始化主界面,将数据填充进去 + * @author ut000610 戴正文 + * @param listview 需要填充的列表 + */ + void fillManagePanel(ListView *listview); + /** + * @brief 填充搜索界面 + * @author ut000610 戴正文 + * @param listview 需要填充的列表 + * @param filter 需要过滤的条件 + * @param group 需要过滤的组:有组,组内搜索;没组,全局搜索 + */ + void fillSearchPanel(ListView *listview, const QString &filter, const QString &group = ""); + /** + * @brief 根据分组填充列表 + * @author ut000610 戴正文 + * @param listview 列表 + * @param group 组名 + */ + void fillGroupPanel(ListView *listview, const QString &group); + // 查找密码的个数 + int m_lookupCount = 0; + // 是否重写配置文件 + bool m_rewriteConfig = false; +}; + +typedef QMap>::Iterator serverConfigDialogMapIterator; + +#endif // SERVERCONFIGMANAGER_H diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigoptdlg.cpp deepin-terminal-5.4.13/src/remotemanage/serverconfigoptdlg.cpp --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigoptdlg.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfigoptdlg.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,588 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "serverconfigoptdlg.h" +#include "serverconfigmanager.h" +#include "termcommandlinkbutton.h" +#include "utils.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include //added byq qinyaning +#include +#include + +DGUI_USE_NAMESPACE + +ServerConfigOptDlg::ServerConfigOptDlg(ServerConfigOptType type, ServerConfig *curServer, QWidget *parent) + : DAbstractDialog(parent), + m_type(type), + m_curServer(curServer), + m_titleLabel(new DLabel), + m_iconLabel(new DLabel), + m_closeButton(new DWindowCloseButton(this)), + m_serverName(new DLineEdit(this)), + m_address(new DLineEdit(this)), + m_port(new DSpinBox(this)), + m_port_tip(new DAlertControl(m_port, this)), + m_userName(new DLineEdit(this)), + m_password(new DPasswordEdit(this)), + m_privateKey(new DLineEdit(this)), + m_fileDialog(new DSuggestButton(this)), + m_group(new DLineEdit(this)), + m_path(new DLineEdit(this)), + m_command(new DLineEdit(this)), + m_coding(new DComboBox(this)), + m_backSapceKey(new DComboBox(this)), + m_deleteKey(new DComboBox(this)), + m_advancedOptions(new DPushButton(tr("Advanced options"), this)), + m_delServer(new TermCommandLinkButton(this)) + +{ + /******** Add by ut001000 renfeixiang 2020-08-13:增加 Begin***************/ + Utils::set_Object_Name(this); + m_titleLabel->setObjectName("RemoteTitleLabel"); + m_iconLabel->setObjectName("RemoteIconLabel"); + m_closeButton->setObjectName("RemoteCloseButton"); + m_serverName->setObjectName("RemoteServerNameLineEdit"); + m_address->setObjectName("RemoteAddressLineEdit"); + m_port->setObjectName("RemotePortDSpinBox"); + m_userName->setObjectName("RemoteUserNameLineEdit"); + m_password->setObjectName("RemoteDPasswordEdit"); + m_privateKey->setObjectName("RemotePrivateKeyLineEdit"); + m_fileDialog->setObjectName("RemoteFileDialogDSuggestButton"); + m_group->setObjectName("RemoteGroupLineEdit"); + m_path->setObjectName("RemotePathLineEdit"); + m_command->setObjectName("RemoteCommandLineEdit"); + m_coding->setObjectName("RemoteEncodeComboBox"); + m_backSapceKey->setObjectName("RemoteBackSapceKeyComboBox"); + m_deleteKey->setObjectName("RemoteDeleteKeyComboBox"); + m_advancedOptions->setObjectName("RemoteAdvancedOptionsQPushButton"); + /******** Add by ut001000 renfeixiang 2020-08-13:增加 End***************/ + setWindowModality(Qt::WindowModal); + setFixedWidth(459); + setAutoFillBackground(true); + initUI(); + initData(); +} + +void ServerConfigOptDlg::initUI() +{ + //all layout + QVBoxLayout *m_VBoxLayout = new QVBoxLayout(); + m_VBoxLayout->setSpacing(SPACEHEIGHT); + m_VBoxLayout->setContentsMargins(0, 0, 0, SPACEHEIGHT); + this->setFixedHeight(392); + //head layout + m_iconLabel->setFixedSize(ICONSIZE_50, ICONSIZE_50); + m_titleLabel->setText(tr("Add Server")); + m_titleLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + + m_closeButton->setFocusPolicy(Qt::TabFocus); + m_closeButton->setFixedWidth(ICONSIZE_50); + m_closeButton->setIconSize(QSize(ICONSIZE_50, ICONSIZE_50)); + + // 字体 + DFontSizeManager::instance()->bind(m_titleLabel, DFontSizeManager::T5, QFont::DemiBold); + // 字色 + DPalette palette = m_titleLabel->palette(); + QColor color; + if (DApplicationHelper::DarkType == DApplicationHelper::instance()->themeType()) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleLabel->setPalette(palette); + + QHBoxLayout *headLayout = new QHBoxLayout(); + headLayout->setSpacing(0); + headLayout->setContentsMargins(0, 0, 0, 0); + // 为了和closebutton对应是标题居中 + headLayout->addWidget(m_iconLabel, 0, Qt::AlignLeft | Qt::AlignVCenter); + headLayout->addWidget(m_titleLabel, 0, Qt::AlignHCenter); + headLayout->addWidget(m_closeButton, 0, Qt::AlignRight | Qt::AlignTop); + connect(m_closeButton, &DDialogCloseButton::clicked, this, [ = ]() { + reject(); + }); + m_VBoxLayout->addLayout(headLayout, Qt::AlignTop); + m_VBoxLayout->addStretch(SPACEHEIGHT); + //main layout + QGridLayout *pGridLayout = new QGridLayout(); + pGridLayout->setColumnStretch(1, 1); + pGridLayout->setContentsMargins(28, 0, 30, 0); + pGridLayout->setSpacing(SPACEHEIGHT); + DLabel *pServerNameLabel = new DLabel(tr("Server name:")); + setLabelStyle(pServerNameLabel); + + m_serverName->lineEdit()->setPlaceholderText(tr("Required")); + QTimer::singleShot(30, this, [&]() { + m_serverName->lineEdit()->selectAll(); + }); + pGridLayout->addWidget(pServerNameLabel); + pGridLayout->addWidget(m_serverName); + + DLabel *pAddressLabel = new DLabel(tr("Address:")); + setLabelStyle(pAddressLabel); + m_address->lineEdit()->setPlaceholderText(tr("Required")); + m_address->setFixedWidth(150); + pGridLayout->addWidget(pAddressLabel); + pGridLayout->addWidget(m_address); + + QHBoxLayout *portLayout = new QHBoxLayout(); + DLabel *pPortLabel = new DLabel(tr("Port:")); + pPortLabel->setAlignment(Qt::AlignLeft); + pPortLabel->setAlignment(Qt::AlignVCenter); + pPortLabel->setFixedWidth(40); + DFontSizeManager::instance()->bind(pPortLabel, DFontSizeManager::T6); + m_port->setRange(0, 65535); + m_port->setValue(DEFAULTPORT); + m_port->setSingleStep(1); + m_port->setFixedWidth(70); + //comment code for old version dtk build +#if (DTK_VERSION_MAJOR > 5 || (DTK_VERSION_MAJOR >= 5 && (DTK_VERSION_MINOR > 1 || (DTK_VERSION_MINOR >= 1 && DTK_VERSION_BUILD >= 2)))) + m_port->lineEdit()->setClearButtonEnabled(false); +#endif + // 去除上下按钮 + m_port->setButtonSymbols(DSpinBox::NoButtons); + // 禁用输入法 + m_port->setAttribute(Qt::WA_InputMethodEnabled, false); + portLayout->addWidget(pPortLabel); + portLayout->addWidget(m_port); + pGridLayout->addLayout(portLayout, 1, 1, Qt::AlignRight); + + DLabel *pUsernameLabel = new DLabel(tr("Username:")); + setLabelStyle(pUsernameLabel); + m_userName->lineEdit()->setPlaceholderText(tr("Required")); + pGridLayout->addWidget(pUsernameLabel); + pGridLayout->addWidget(m_userName); + + DLabel *pPasswordLabel = new DLabel(tr("Password:")); + setLabelStyle(pPasswordLabel); + + m_password->lineEdit()->setAttribute(Qt::WA_InputMethodEnabled, false); + pGridLayout->addWidget(pPasswordLabel); + pGridLayout->addWidget(m_password); + + DLabel *pPrivateKeyLabel = new DLabel(tr("Certificate:")); + setLabelStyle(pPrivateKeyLabel); + + + /******** Modify by m000714 daizhengwen 2020-04-20: 添加DFileChooseEditDialog****************/ + pGridLayout->addWidget(pPrivateKeyLabel); + QHBoxLayout *privateKeyLayout = new QHBoxLayout(); + privateKeyLayout->setSpacing(5); + privateKeyLayout->setContentsMargins(0, 0, 0, 0); + privateKeyLayout->addWidget(m_privateKey); + privateKeyLayout->addWidget(m_fileDialog); + m_fileDialog->setIcon(DStyleHelper(m_fileDialog->style()).standardIcon(DStyle::SP_SelectElement, nullptr)); + m_fileDialog->setIconSize(QSize(24, 24)); + connect(m_fileDialog, &DSuggestButton::clicked, this, &ServerConfigOptDlg::slotFileChooseDialog); + pGridLayout->addLayout(privateKeyLayout, 4, 1); + /********************* Modify by m000714 daizhengwen End ************************/ + + //senior layout + DWidget *seniorWidget = new DWidget; + seniorWidget->setFixedWidth(459); + seniorWidget->setContentsMargins(0, 0, 0, 0); + QGridLayout *seniorLayout = new QGridLayout(); + seniorLayout->setAlignment(Qt::AlignTop); + seniorLayout->setSpacing(10); + seniorLayout->setContentsMargins(28, 0, 30, 0); + seniorLayout->setColumnStretch(1, 1); + DLabel *pGroupLabel = new DLabel(tr("Group:")); + setLabelStyle(pGroupLabel); + seniorLayout->addWidget(pGroupLabel); + seniorLayout->addWidget(m_group); + m_group->setFixedWidth(DEFAULTHEIGHT); + + DLabel *pPathLabel = new DLabel(tr("Path:")); + setLabelStyle(pPathLabel); + seniorLayout->addWidget(pPathLabel); + seniorLayout->addWidget(m_path); + m_path->setFixedWidth(DEFAULTHEIGHT); + + DLabel *pCommandLabel = new DLabel(tr("Command:")); + setLabelStyle(pCommandLabel); + seniorLayout->addWidget(pCommandLabel); + seniorLayout->addWidget(m_command); + m_command->setFixedWidth(DEFAULTHEIGHT); + + DLabel *pCodingLabel = new DLabel(tr("Encoding:")); + setLabelStyle(pCodingLabel); + seniorLayout->addWidget(pCodingLabel); + seniorLayout->addWidget(m_coding); + m_coding->setFixedWidth(DEFAULTHEIGHT); + + DLabel *pBackspaceKeyLabel = new DLabel(tr("Backspace key:")); + setLabelStyle(pBackspaceKeyLabel); + seniorLayout->addWidget(pBackspaceKeyLabel); + seniorLayout->addWidget(m_backSapceKey); + m_backSapceKey->setFixedWidth(DEFAULTHEIGHT); + + DLabel *pDeleteKeyLabel = new DLabel(tr("Delete key:")); + setLabelStyle(pDeleteKeyLabel); + seniorLayout->addWidget(pDeleteKeyLabel); + seniorLayout->addWidget(m_deleteKey); + m_deleteKey->setFixedWidth(DEFAULTHEIGHT); + seniorWidget->setLayout(seniorLayout); + + m_VBoxLayout->addLayout(pGridLayout, Qt::AlignHCenter); + QSpacerItem *upItem = new QSpacerItem(this->width(), 10); + m_VBoxLayout->addSpacerItem(upItem); + + palette = DApplicationHelper::instance()->palette(m_advancedOptions); + palette.setColor(DPalette::ButtonText, palette.color(DPalette::Highlight)); + m_advancedOptions->setPalette(palette); + + m_advancedOptions->setFlat(true); + m_advancedOptions->setFocusPolicy(Qt::TabFocus); + + m_VBoxLayout->addWidget(m_advancedOptions, 0, Qt::AlignHCenter); + QSpacerItem *downItem = new QSpacerItem(this->width(), 10); + m_VBoxLayout->addSpacerItem(downItem); + m_VBoxLayout->addWidget(seniorWidget, 0, Qt::AlignHCenter); + m_delServer->setText(tr("Delete server")); + m_VBoxLayout->addWidget(m_delServer, 0, Qt::AlignHCenter); + m_delServer->hide(); + seniorWidget->hide(); + + DFontSizeManager::instance()->bind(m_advancedOptions, DFontSizeManager::T8, QFont::Normal); + connect(m_advancedOptions, &DCommandLinkButton::clicked, this, [ = ]() { + seniorWidget->show(); + setTabOrder(m_advancedOptions, m_group); + m_advancedOptions->hide(); + upItem->changeSize(this->width(), 0); + downItem->changeSize(this->width(), 0); + if (SCT_MODIFY == m_type) { + m_delServer->show(); + this->setFixedHeight(670); + qInfo() << "remote dialog show advance options"; + } else { + this->setFixedHeight(630); + } + }); + + DPushButton *pCancelButton = new DPushButton(tr("Cancel", "button")); + DSuggestButton *pAddSaveButton = new DSuggestButton(tr("Add", "button")); + //Add a line by m000750 zhangmeng 2020-04-22设置回车触发默认按钮 + pAddSaveButton->setDefault(true); + if (SCT_MODIFY == m_type) { + m_titleLabel->setText(tr("Edit Server")); + pAddSaveButton->setText(tr("Save", "button")); + } + Utils::setSpaceInWord(pCancelButton); + Utils::setSpaceInWord(pAddSaveButton); + DPalette pa = DApplicationHelper::instance()->palette(pAddSaveButton); + QBrush brush = pa.textLively().color(); + pa.setBrush(DPalette::ButtonText, brush); + pAddSaveButton->setPalette(pa); + QHBoxLayout *pBtHbLayout = new QHBoxLayout(); + DVerticalLine *line = new DVerticalLine(); + pBtHbLayout->setContentsMargins(10, 0, 10, 0); + pBtHbLayout->setSpacing(9); + pBtHbLayout->addWidget(pCancelButton); + pBtHbLayout->addWidget(line); + pBtHbLayout->addWidget(pAddSaveButton); + m_VBoxLayout->addStretch(10); + m_VBoxLayout->addLayout(pBtHbLayout, Qt::AlignBottom); + setLayout(m_VBoxLayout); + + connect(pCancelButton, &DPushButton::clicked, this, [ = ]() { + reject(); + }); + connect(pAddSaveButton, &DPushButton::clicked, this, &ServerConfigOptDlg::slotAddSaveButtonClicked); + connect(m_delServer, &TermCommandLinkButton::clicked, this, [ = ]() { + setDelServer(true); + accept(); + }); + // 字体颜色随主题变化变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &ServerConfigOptDlg::handleThemeTypeChanged); + + // 设置焦点顺序 + setTabOrder(pAddSaveButton, m_closeButton); +} + +inline void ServerConfigOptDlg::handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType) +{ + DPalette palette = m_titleLabel->palette(); + //palette.setBrush(QPalette::WindowText, palette.color(DPalette::TextTitle)); + QColor color; + if (DApplicationHelper::DarkType == themeType) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleLabel->setPalette(palette); + + palette = DApplicationHelper::instance()->palette(m_delServer); + palette.setColor(DPalette::ButtonText, palette.color(DPalette::TextWarning)); + m_delServer->setPalette(palette); +} + +void ServerConfigOptDlg::initData() +{ + QList textCodeList = getTextCodec(); + m_coding->addItems(textCodeList); + QList backSpaceKeyList = getBackSpaceKey(); + m_backSapceKey->addItems(backSpaceKeyList); + QList deleteKeyList = getDeleteKey(); + m_deleteKey->addItems(deleteKeyList); + if (SCT_MODIFY == m_type && m_curServer != nullptr) { + m_serverName->setText(m_curServer->m_serverName); + m_currentServerName = m_serverName->text(); + m_address->setText(m_curServer->m_address); + m_port->setValue(m_curServer->m_port.toInt()); + m_userName->setText(m_curServer->m_userName); + m_password->setText(m_curServer->m_password); + m_privateKey->setText(m_curServer->m_privateKey); + m_group->setText(m_curServer->m_group); + m_path->setText(m_curServer->m_path); + m_command->setText(m_curServer->m_command); + if (!m_curServer->m_encoding.isEmpty()) { + int textCodeIndex = textCodeList.indexOf(m_curServer->m_encoding); + m_coding->setCurrentIndex(textCodeIndex); + } + if (!m_curServer->m_backspaceKey.isEmpty()) { + int backSpaceKeyIndex = backSpaceKeyList.indexOf(m_curServer->m_backspaceKey); + m_backSapceKey->setCurrentIndex(backSpaceKeyIndex); + } + if (!m_curServer->m_deleteKey.isEmpty()) { + int deleteKeyIndex = deleteKeyList.indexOf(m_curServer->m_deleteKey); + m_deleteKey->setCurrentIndex(deleteKeyIndex); + } + } +} + +QList ServerConfigOptDlg::getTextCodec() +{ + /******** Modify by ut000610 daizhengwen 2020-05-28: 编码列表和编码插件一致****************/ + // QList list = QTextCodec::availableCodecs(); + QList list = Utils::encodeList(); + /********************* Modify by ut000610 daizhengwen End ************************/ + QList textCodecList; + for (QByteArray &byteArr : list) { + QString str = QString(byteArr); + if (!textCodecList.contains(str)) + textCodecList.append(str); + } + return textCodecList; +} + +QList ServerConfigOptDlg::getBackSpaceKey() +{ + QList eraseKeyList; + eraseKeyList.append(("ascii-del")); + eraseKeyList.append(("auto")); + eraseKeyList.append(("control-h")); + eraseKeyList.append(("escape-sequence")); + eraseKeyList.append(("tty")); + return eraseKeyList; +} + +QList ServerConfigOptDlg::getDeleteKey() +{ + QList eraseKeyList; + eraseKeyList.append(("escape-sequence")); + eraseKeyList.append(("ascii-del")); + eraseKeyList.append(("auto")); + eraseKeyList.append(("control-h")); + eraseKeyList.append(("tty")); + return eraseKeyList; +} + +void ServerConfigOptDlg::setLabelStyle(DLabel *label) +{ + label->setAlignment(Qt::AlignLeft); + label->setAlignment(Qt::AlignVCenter); + label->setFixedWidth(100); + label->setMinimumHeight(36); + + DFontSizeManager::instance()->bind(label, DFontSizeManager::T6); +} + +ServerConfigOptDlg::~ServerConfigOptDlg() +{ +} + +void ServerConfigOptDlg::updataData(ServerConfig *curServer) +{ + qInfo() << "ServerConfigOptDlg server configuration options updata data."; + // 读取配置 + QList textCodeList = getTextCodec(); + QList backSpaceKeyList = getBackSpaceKey(); + QList deleteKeyList = getDeleteKey(); + // 重置m_curServer +// resetCurServer(curServer); + m_curServer = curServer; + // 设置数据 + m_serverName->setText(curServer->m_serverName); + m_address->setText(curServer->m_address); + m_port->setValue(curServer->m_port.toInt()); + m_userName->setText(curServer->m_userName); + m_password->setText(curServer->m_password); + m_privateKey->setText(curServer->m_privateKey); + m_group->setText(curServer->m_group); + m_path->setText(curServer->m_path); + m_command->setText(curServer->m_command); + if (!curServer->m_encoding.isEmpty()) { + int textCodeIndex = textCodeList.indexOf(curServer->m_encoding); + m_coding->setCurrentIndex(textCodeIndex); + } + if (!curServer->m_backspaceKey.isEmpty()) { + int backSpaceKeyIndex = backSpaceKeyList.indexOf(curServer->m_backspaceKey); + m_backSapceKey->setCurrentIndex(backSpaceKeyIndex); + } + if (!curServer->m_deleteKey.isEmpty()) { + int deleteKeyIndex = deleteKeyList.indexOf(curServer->m_deleteKey); + m_deleteKey->setCurrentIndex(deleteKeyIndex); + } + + m_currentServerName = m_serverName->text(); +} + +ServerConfig ServerConfigOptDlg::getData() +{ + ServerConfig config; + config.m_serverName = m_serverName->text(); + config.m_address = m_address->text(); + config.m_userName = m_userName->text(); + config.m_password = m_password->text(); + config.m_privateKey = m_privateKey->text(); + config.m_port = m_port->text(); + config.m_group = m_group->text(); + config.m_path = m_path->text(); + config.m_command = m_command->text(); + config.m_encoding = m_coding->currentText(); + config.m_backspaceKey = m_backSapceKey->currentText(); + config.m_deleteKey = m_deleteKey->currentText(); + return config; +} + +void ServerConfigOptDlg::resetCurServer(ServerConfig config) +{ + m_curServer = &config; +} + +void ServerConfigOptDlg::slotAddSaveButtonClicked() +{ + qInfo() << "ServerConfigOptDlg add and save button clicled slot function."; + // 服务器名为空 + if (m_serverName->text().trimmed().isEmpty()) { + m_serverName->showAlertMessage(tr("Please enter a server name"), m_serverName); + return; + } + + /***add begin by ut001121 zhangmeng 20200615 限制名称字符长度 修复BUG31286***/ + if (m_serverName->text().length() > MAX_NAME_LEN) { + m_serverName->showAlertMessage(QObject::tr("The name should be no more than 32 characters"), m_serverName); + return; + } + /***add end by ut001121***/ + + // 地址为空 + if (m_address->text().trimmed().isEmpty()) { + m_address->showAlertMessage(tr("Please enter an IP address"), m_address); + return; + } + // 端口为空 + if (m_port->text().trimmed().isEmpty()) { + m_port_tip->showAlertMessage(tr("Please enter a port")); + return; + } + + //---added by qinyaning(nyq) to show the tip when username is empty---// + if (m_userName->text().trimmed().isEmpty()) { //如果用户名为空, 提示用户名为空, 添加失败 + m_userName->showAlertMessage(tr("Please enter a username"), m_userName); + return; + } + m_currentServerName = m_serverName->text(); + //------------------------------------------------------------------// + //--added by qinyaning(nyq) to solve the bug 19116: You can create a new remote server with the same name--// + if ((SCT_ADD == m_type) + || ((SCT_MODIFY == m_type && m_curServer != nullptr) + && (m_curServer->m_serverName.trimmed() != m_serverName->text().trimmed()))) { /*此时用户已经在修改模式下修改了服务器名称*/ + QMap> severConfigs = ServerConfigManager::instance()->getServerConfigs(); + for (QMap>::iterator iter = severConfigs.begin(); iter != severConfigs.end(); ++iter) { + QList value = iter.value(); + for (int i = 0; i < value.size(); i++) { + if (value[i]->m_serverName.trimmed() == m_serverName->text().trimmed()) { //服务器名相同 + QString strFirstLine = tr("The server name already exists,"); + QString strSecondeLine = tr("please input another one. "); + Utils::showSameNameDialog(this, strFirstLine, strSecondeLine); + return; + } + } + } + } + //-------------------------------------------------------------------// + ServerConfig *config = new ServerConfig(); + config->m_serverName = m_serverName->text().trimmed(); + config->m_address = m_address->text().trimmed(); + config->m_userName = m_userName->text().trimmed(); + config->m_password = m_password->text(); + config->m_privateKey = m_privateKey->text(); + config->m_port = m_port->text(); + config->m_group = m_group->text().trimmed(); + config->m_path = m_path->text(); + config->m_command = m_command->text(); + config->m_encoding = m_coding->currentText(); + config->m_backspaceKey = m_backSapceKey->currentText(); + config->m_deleteKey = m_deleteKey->currentText(); + if (SCT_ADD == m_type) { + ServerConfigManager::instance()->saveServerConfig(config); + ServerConfigManager::instance()->refreshList(); + } else if (SCT_MODIFY == m_type && m_curServer != nullptr) { + ServerConfigManager::instance()->modifyServerConfig(config, m_curServer); + } + accept(); + qInfo() << __FUNCTION__ << "add or save remote config finish"; +} + +void ServerConfigOptDlg::slotFileChooseDialog() +{ + DFileDialog dialog(this, QObject::tr("Select the private key file")); + dialog.setAcceptMode(QFileDialog::AcceptOpen); + dialog.setFileMode(QFileDialog::ExistingFile); + dialog.setFilter(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden); + dialog.setLabelText(QFileDialog::Accept, QObject::tr("Select")); + + int code = dialog.exec(); + + if (QDialog::Accepted == code && !dialog.selectedFiles().isEmpty()) { + QStringList list = dialog.selectedFiles(); + const QString fileName = list.first(); + + m_privateKey->setText(fileName); + } +} diff -Nru deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigoptdlg.h deepin-terminal-5.4.13/src/remotemanage/serverconfigoptdlg.h --- deepin-terminal-5.0.0+ds1/src/remotemanage/serverconfigoptdlg.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/remotemanage/serverconfigoptdlg.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: ServerConfigOptDlg + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 远程管理对话框(弹窗) + 负责添加和修改时给用户提供界面操作的对话框 +*******************************************************************************/ +#ifndef SERVERCONFIGOPTDLG_H +#define SERVERCONFIGOPTDLG_H + +#include "serverconfigmanager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +DWIDGET_USE_NAMESPACE + +// 默认端口 +#define DEFAULTPORT 22 +// 控件默认高度 +#define DEFAULTHEIGHT 290 + +class TermCommandLinkButton; + +class ServerConfigOptDlg : public DAbstractDialog +{ + Q_OBJECT +public: + enum ServerConfigOptType { + SCT_ADD, // the add type of server config operation + SCT_MODIFY, // the modify type of server config operation + }; + + explicit ServerConfigOptDlg(ServerConfigOptType type = SCT_ADD, ServerConfig *curServer = nullptr, + QWidget *parent = nullptr); + ~ServerConfigOptDlg(); + + ServerConfig *getCurServer() + { + return m_curServer; + } + + bool isDelServer() + { + return m_bDelOpt; + } + + void setDelServer(bool isDel) + { + m_bDelOpt = isDel; + } + + const QString &getServerName() + { + return m_currentServerName; + } + + /** + * @brief 服务器配置选项更新数据 + * @author ut000610 daizhengwen + * @param curServer 当前服务器 + */ + void updataData(ServerConfig *curServer); + /** + * @brief 服务器配置选项获取数据 + * @author ut000610 daizhengwen + * @return + */ + ServerConfig getData(); + /** + * @brief 服务器配置选项重置当前服务器 + * @author ut000610 daizhengwen + * @param curServer 当前服务器 + */ + void resetCurServer(ServerConfig config); + +private slots: + /** + * @brief 服务器配置选项增加和保存按钮点击响应函数 + * @author ut000610 daizhengwen + */ + void slotAddSaveButtonClicked(); + /** + * @brief 获取FileName + * @author m000714 戴正文 + */ + void slotFileChooseDialog(); + void handleThemeTypeChanged(DGuiApplicationHelper::ColorType themeType); + +private: + ServerConfigOptType m_type; + ServerConfig *m_curServer = nullptr; + DLabel *m_titleLabel = nullptr; + DLabel *m_iconLabel = nullptr; + DLineEdit *m_serverName = nullptr; + DWindowCloseButton *m_closeButton = nullptr; + DLineEdit *m_address = nullptr; + DSpinBox *m_port = nullptr; + DAlertControl *m_port_tip = nullptr; + DLineEdit *m_userName = nullptr; + DPasswordEdit *m_password = nullptr; + DLineEdit *m_privateKey = nullptr; + DSuggestButton *m_fileDialog = nullptr; + DLineEdit *m_group = nullptr; + DLineEdit *m_path = nullptr; + DLineEdit *m_command = nullptr; + DComboBox *m_coding = nullptr; + DComboBox *m_backSapceKey = nullptr; + DComboBox *m_deleteKey = nullptr; + DPushButton *m_advancedOptions = nullptr; + TermCommandLinkButton *m_delServer = nullptr; + bool m_bDelOpt = false; + + /** + * @brief 服务器配置选项初始化UI界面 + * @author ut000610 daizhengwen + */ + void initUI(); + /** + * @brief 服务器配置选项初始化数据 + * @author ut000610 daizhengwen + */ + void initData(); + /** + * @brief 服务器配置选项获取文本的编码 + * @author ut000610 daizhengwen + * @return + */ + QList getTextCodec(); + /** + * @brief 服务器配置选项获取退格键 + * @author ut000610 daizhengwen + * @return + */ + QList getBackSpaceKey(); + /** + * @brief 服务器配置选项获取删除键 + * @author ut000610 daizhengwen + * @return + */ + QList getDeleteKey(); + + QString m_currentServerName; + + /** + * @brief 设置label格式 + * @author m000714 戴正文 + */ + inline void setLabelStyle(DLabel *); + +}; + +#endif // SERVERCONFIGOPTDLG_H diff -Nru deepin-terminal-5.0.0+ds1/src/settings/newdspinbox.cpp deepin-terminal-5.4.13/src/settings/newdspinbox.cpp --- deepin-terminal-5.0.0+ds1/src/settings/newdspinbox.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/newdspinbox.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: zhukewei +* +* Maintainer: zhukewei +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "newdspinbox.h" +#include "utils.h" + +NewDspinBox::NewDspinBox(QWidget *parent) : DSpinBox(parent) +{ + Utils::set_Object_Name(this); + + setFocusPolicy(Qt::FocusPolicy::StrongFocus); + setButtonSymbols(QAbstractSpinBox::PlusMinus); + /******** Add by nt001000 renfeixiang 2020-05-26:增加正则表达式限制00000现象 Begin***************/ + QRegExp regExp("(^[1-4][0-9]$)|(^[5][0]$)|(^[1-9]$)"); + lineEdit()->setValidator(new QRegExpValidator(regExp, this)); + this->setMinimum(5); + this->setMaximum(50); + /******** Add by nt001000 renfeixiang 2020-05-26:增加正则表达式限制00000现象 End***************/ +} + +void NewDspinBox::wheelEvent(QWheelEvent *event) +{ + if (lineEdit()->hasFocus()) + DSpinBox::wheelEvent(event); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/settings/newdspinbox.h deepin-terminal-5.4.13/src/settings/newdspinbox.h --- deepin-terminal-5.0.0+ds1/src/settings/newdspinbox.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/newdspinbox.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifndef NEWDSPINBOX_H +#define NEWDSPINBOX_H + +#include + +#include +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: NewDspinBox + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 设置里面重新写的spinBox 2020-11-06 renfeixiang 修改成继承DSpinBox 修改bug#53551 +*******************************************************************************/ +class NewDspinBox : public DSpinBox +{ + Q_OBJECT +public: + explicit NewDspinBox(QWidget *parent = nullptr); + +protected: + /** + * @brief 重写wheelEvent函数,只有有焦点的情况,才进行字体大小变化 + * @author ut001000 任飞翔 + * @param event + */ + void wheelEvent(QWheelEvent *event) override; +}; + + + +#endif diff -Nru deepin-terminal-5.0.0+ds1/src/settings/settings.cpp deepin-terminal-5.4.13/src/settings/settings.cpp --- deepin-terminal-5.0.0+ds1/src/settings/settings.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/settings.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,785 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "settings.h" +#include "newdspinbox.h" +//#include "utils.h" +#include "shortcutmanager.h" +#include "service.h" +#include "dbusmanager.h" +#include "tabrenamewidget.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE +#define PRIVATE_PROPERTY_translateContext "_d_DSettingsWidgetFactory_translateContext" +Settings *Settings::m_settings_instance = nullptr; +DComboBox *Settings::comboBox = nullptr; +DComboBox *Settings::g_shellConfigCombox = nullptr; + +// 全局变量 变量定义的位置可以变,目前只有这边用,所以定义到这儿 +const QString DEFAULT_SHELL = "$SHELL"; + +Settings::Settings() : QObject(qApp) +{ + Utils::set_Object_Name(this); +} + +Settings *Settings::instance() +{ + if(nullptr == m_settings_instance) { + m_settings_instance = new Settings(); + m_settings_instance->init(); + } + return m_settings_instance; +} + +Settings::~Settings() +{ + if (nullptr != m_Watcher) + m_Watcher->deleteLater(); + + if (nullptr != m_backend) + m_backend->deleteLater(); + + if (nullptr != settings) + settings->deleteLater(); +} + +// 统一初始化以后方可使用。 +void Settings::init() +{ + m_configPath = QString("%1/%2/%3/config.conf") + .arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation), qApp->organizationName(), qApp->applicationName()); + m_backend = new QSettingBackend(m_configPath); + m_backend->setObjectName("SettingsQSettingBackend");//Add by ut001000 renfeixiang 2020-08-13 + + // 默认配置 + settings = DSettings::fromJsonFile(":/other/default-config.json"); + + // 加载自定义配置 + settings->setBackend(m_backend); + + /************************ Add by sunchengxi 2020-09-15:Bug#47880 终端默认主题色应改为深色,当配置文件不存在或者配置项不是Light Begin************************/ + QFile file(m_configPath); + if (!file.exists() || "Light" != m_backend->getOption("basic.interface.theme").toString()) { + /************************ Mod by sunchengxi 2020-09-17:Bug#48349 主题色选择跟随系统异常 Begin************************/ + //DGuiApplicationHelper::instance()->setThemeType(DGuiApplicationHelper::DarkType); + //DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + //setColorScheme("Dark"); + /************************ Mod by sunchengxi 2020-09-17:Bug#48349 主题色选择跟随系统异常 End ************************/ + if (m_backend->getOption("basic.interface.expand_theme").toString().isEmpty()) { + DGuiApplicationHelper::instance()->setPaletteType(DGuiApplicationHelper::DarkType); + setColorScheme("Dark"); + } + + } + /************************ Add by sunchengxi 2020-09-15:Bug#47880 终端默认主题色应改为深色,当配置文件不存在或者配置项不是Light End ************************/ + + /******** Modify by n014361 wangpeili 2020-01-10: 增加窗口状态选项 ************/ + auto windowState = settings->option("advanced.window.use_on_starting"); + QMap windowStateMap; + + windowStateMap.insert("keys", + QStringList() << "window_normal" + << "split_screen" + << "window_maximum" + << "fullscreen"); + windowStateMap.insert("values", + QStringList() << tr("Normal window") << tr("Split screen") << tr("Maximum") << tr("Fullscreen")); + windowState->setData("items", windowStateMap); + + for (QString &key : settings->keys()) + qInfo() << key << settings->value(key); + /********************* Modify by n014361 wangpeili End ************************/ + + initConnection(); + loadDefaultsWhenReinstall(); + /******** Modify by ut000439 wangpeili 2020-06-12: 多进程模式,暂时取消使用*********/ +# if 0 + //增加文件昨监视,以便多进程共享配置文件 + m_Watcher = new QFileSystemWatcher(); + m_Watcher->addPath(m_configPath); + connect(m_Watcher, &QFileSystemWatcher::fileChanged, this, [this](QString file) { + qInfo() << "fileChanged" << file; + reload(); + //监控完一次就不再监控了,所以要再添加 + m_Watcher->addPath(m_configPath); + }); +#endif + + /***add begin by ut001121 zhangmeng 20200912 设置字号限制 修复42250***/ + auto option = settings->option("basic.interface.font_size"); + Konsole::__minFontSize = option->data("min").isValid() ? option->data("min").toInt() : DEFAULT_MIN_FONT_SZIE; + Konsole::__maxFontSize = option->data("max").isValid() ? option->data("max").toInt() : DEFAULT_MAX_FONT_SZIE; + + // 校验正确 + if (Konsole::__minFontSize > Konsole::__maxFontSize) + qSwap(Konsole::__minFontSize, Konsole::__maxFontSize); + + /***add end by ut001121***/ + + //自定义主题配置初始化处理 + m_configCustomThemePath = QString("%1/%2/%3/customTheme.colorscheme") + .arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation), qApp->organizationName(), qApp->applicationName()); + themeSetting = new QSettings(m_configCustomThemePath, QSettings::IniFormat, this); + + QFile customThemeFile(m_configCustomThemePath); + if (!customThemeFile.exists()) { + //标题栏风格 // custom_theme_title_style + themeSetting->setValue("CustomTheme/TitleStyle", "Dark"); + + //背景颜色 “黑色” (0x252525) + QColor backgroundColor(37, 37, 37); + themeSetting->setValue("Background/Color", color2str(backgroundColor)); + //前景色 “绿色” (0x00FF00) + QColor foregroundColor(0, 255, 0); + themeSetting->setValue("Foreground/Color", color2str(foregroundColor)); + + //自定义主题中实际修改的PS1参数只是一个"Color2Intense/Color" ,而配置"Color2/Color" 是为了保证python脚本取色RGB正常显示使用的固定不变,跟终端的所有主题都保持一致 //Green + QColor color2Color(24, 178, 24); + //提示符 PS1 “土黄色” (0x859900) + QColor pS1Color(133, 153, 0); + + themeSetting->setValue("Color2/Color", color2str(color2Color)); + themeSetting->setValue("Color2Intense/Color", color2str(pS1Color)); + + //自定义主题中实际修改的参数PS2只是一个"Color4Intense/Color" ,而配置"Color4/Color" 是为了保证python脚本取色RGB正常显示使用的固定不变,跟终端的所有主题都保持一致 //Blue + QColor color4Color(24, 24, 178); + //提示符 PS2 “蓝色” (0x3465A4) + QColor pS2Color(52, 101, 164); + themeSetting->setValue("Color4/Color", color2str(color4Color)); + themeSetting->setValue("Color4Intense/Color", color2str(pS2Color)); + + //配置"Color1/Color"与"Color1Intense/Color" 是为了保证python脚本取色RGB正常显示使用的固定不变,跟终端的所有主题都保持一致 //Red + QColor color1Color(178, 24, 24); + QColor color1IntenseColor(255, 84, 84); + themeSetting->setValue("Color1/Color", color2str(color1Color)); + themeSetting->setValue("Color1Intense/Color", color2str(color1IntenseColor)); + + + //参考深色主题与浅色主题的配置文件,增加默认参数,保证python脚本取色在自定义主题下可以取到相应参数的配色,begin + //Color3 + themeSetting->setValue("Color3/Color", color2str(QColor(255, 192, 5))); + //Color3Intense + themeSetting->setValue("Color3Intense/Color", color2str(QColor(255, 192, 5))); + + //Color5 + themeSetting->setValue("Color5/Color", color2str(QColor(236, 0, 72))); + //Color5Intense + themeSetting->setValue("Color5Intense/Color", color2str(QColor(236, 0, 72))); + + //Color6 + themeSetting->setValue("Color6/Color", color2str(QColor(42, 167, 231))); + //Color6Intense + themeSetting->setValue("Color6Intense/Color", color2str(QColor(42, 167, 231))); + + //Color7 + themeSetting->setValue("Color7/Color", color2str(QColor(242, 242, 242))); + //Color7Intense + themeSetting->setValue("Color7Intense/Color", color2str(QColor(242, 242, 242))); + + //参考深色主题与浅色主题的配置文件,增加默认参数,保证python脚本取色在自定义主题下可以取到相应参数的配色,end + } + +} + +QStringList Settings::color2str(QColor color) +{ + QStringList ret; + ret << QString::number(color.red()); + ret << QString::number(color.green()); + ret << QString::number(color.blue()); + return ret; +} + +//重新安装终端后在这里重置状态 +void Settings::loadDefaultsWhenReinstall() +{ + QDir installFlagPath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!installFlagPath.exists()) + installFlagPath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); +} + +void Settings::addShellOption() +{ + g_shellConfigCombox->clear(); + // 获取shells + QMap shellsMap = Service::instance()->getShells(); + // item列表 + QStringList keysList; + // 初始值 + keysList << DEFAULT_SHELL; + // 数据转换 + for (const QString key : shellsMap.keys()) + keysList << key; + g_shellConfigCombox->addItems(keysList); +} + +QPair Settings::createTabTitleFormatWidget(QObject *opt, bool isRemote) +{ + DTK_CORE_NAMESPACE::DSettingsOption *option = qobject_cast(opt); + // tabrenaemewidget 第一个false表示标签重命名 第二个true表示不加标签提示 + TabRenameWidget *tabTitleFormat = new TabRenameWidget(isRemote, true); + + tabTitleFormat->getInputedit()->setText(option->value().toString()); + + QPair optionWidget = + DSettingsWidgetFactory::createStandardItem(QByteArray(), option, tabTitleFormat); + // 别的窗口修改了设置,这里需要同步设置显示 + connect(option, &DSettingsOption::valueChanged, tabTitleFormat, [ = ](QVariant var) { + tabTitleFormat->getInputedit()->setText(var.toString()); + }); + + // 点击按钮,改变输入框内容后给输入框设置焦点 + option->connect(tabTitleFormat->getInputedit(), &DLineEdit::textChanged, option, [ = ]() { + tabTitleFormat->getInputedit()->lineEdit()->setFocus(); + }); + // 编辑结束才修改标签 + option->connect(tabTitleFormat->getInputedit(), &DLineEdit::editingFinished, option, [ = ]() { + option->setValue(tabTitleFormat->getInputedit()->text()); + }); + + return optionWidget; +} + +void Settings::initConnection() +{ + connect(settings, &Dtk::Core::DSettings::valueChanged, this, [ = ](const QString & key, const QVariant & value) { + Q_UNUSED(value) + if (key.contains("basic.interface.") || key.contains("advanced.cursor.") || key.contains("advanced.scroll.")) + emit terminalSettingChanged(key); + else if (key.contains("shortcuts.")) + emit shortcutSettingChanged(key); + else + emit windowSettingChanged(key); + }); + + QPointer opacity = settings->option("basic.interface.opacity"); + connect(opacity, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit opacityChanged(value.toInt() / 100.0); + }); + + QPointer cursorShape = settings->option("advanced.cursor.cursor_shape"); + connect(cursorShape, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit cursorShapeChanged(value.toInt()); + }); + + QPointer cursorBlink = settings->option("advanced.cursor.cursor_blink"); + connect(cursorBlink, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit cursorBlinkChanged(value.toBool()); + }); + + QPointer backgroundBlur = settings->option("advanced.window.blurred_background"); + connect(backgroundBlur, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit backgroundBlurChanged(value.toBool()); + }); + + /******** Modify by n014361 wangpeili 2020-01-06: 字体,字体大小实时生效 ****************/ + QPointer fontSize = settings->option("basic.interface.font_size"); + connect(fontSize, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit fontSizeChanged(value.toInt()); + }); + + QPointer family = settings->option("basic.interface.font"); + connect(family, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit fontChanged(value.toString()); + }); + + QPointer PressingScroll = settings->option("advanced.scroll.scroll_on_key"); + connect(PressingScroll, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit pressingScrollChanged(value.toBool()); + }); + /********************* Modify by n014361 wangpeili End ************************/ + + // 标签标题格式变化 + QPointer tabFormat = settings->option("basic.tab_title.tab_title_format"); + connect(tabFormat, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit tabFormatChanged(value.toString()); + }); + + // 远程标签标题格式变化 + QPointer remoteTabFormat = settings->option("basic.tab_title.remote_tab_title_format"); + connect(remoteTabFormat, &Dtk::Core::DSettingsOption::valueChanged, this, [ = ](QVariant value) { + emit remoteTabFormatChanged(value.toString()); + }); +} + +void Settings::releaseInstance() +{ + if(nullptr != m_settings_instance) { + delete m_settings_instance; + m_settings_instance = nullptr; + } +} + +qreal Settings::opacity() const +{ + return settings->option("basic.interface.opacity")->value().toInt() / 100.0; +} + +QString Settings::colorScheme() const +{ + return settings->option("basic.interface.theme")->value().toString(); +} + +QString Settings::encoding() const +{ + return m_EncodeName; +} + +QString Settings::fontName() +{ + return settings->option("basic.interface.font")->value().toString(); +} + +int Settings::fontSize() +{ + return settings->option("basic.interface.font_size")->value().toInt(); +} + +bool Settings::PressingScroll() +{ + return settings->option("advanced.scroll.scroll_on_key")->value().toBool(); +} + +bool Settings::OutputtingScroll() +{ + return settings->option("advanced.scroll.scroll_on_output")->value().toBool(); +} + +/******************************************************************************* + 1. @函数: reload + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 设置界面重新加载设置的键值 +*******************************************************************************/ +//void Settings::reload() +//{ +// QSettings newSettings(m_configPath, QSettings::IniFormat); +// for (QString &key : newSettings.childGroups()) { +// // 当系统变更键值的时候,配置文件中会有一些"垃圾"配置,删除他 +// if (!settings->keys().contains(key)) { +// qInfo() << "reload failed: system not found " << key << "now remove it"; +// newSettings.remove(key); +// continue; +// } +// if (settings->value(key) != newSettings.value(key + "/value")) { +// qInfo() << "reload update:" << key << settings->value(key); +// settings->option(key)->setValue(newSettings.value(key + "/value")); +// } +// } +//} + +QString Settings::tabTitleFormat() const +{ + return settings->option("basic.tab_title.tab_title_format")->value().toString(); +} + +QString Settings::remoteTabTitleFormat() const +{ + return settings->option("basic.tab_title.remote_tab_title_format")->value().toString(); +} + +QString Settings::shellPath() const +{ + QString strShellProgram = settings->option("advanced.shell.default_shell")->value().toString(); + // $SHELL无法写入配置文件中 + if (DEFAULT_SHELL == strShellProgram || strShellProgram.isEmpty()) { + QString shell{ getenv("SHELL") }; + return shell; + } + + return strShellProgram; +} + +void Settings::reloadShellOptions() +{ + // 记录设置当前值 + QString strShellProgram = settings->option("advanced.shell.default_shell")->value().toString(); + // 更新shell选项 + addShellOption(); + QMap shellMap = Service::instance()->shellsMap(); + // 设置之前的项 若strShellProgram不存在会自动选取第一项 + g_shellConfigCombox->setCurrentText(shellMap.key(strShellProgram)); +} + +int Settings::cursorShape() const +{ + return settings->option("advanced.cursor.cursor_shape")->value().toInt(); +} + +bool Settings::cursorBlink() const +{ + return settings->option("advanced.cursor.cursor_blink")->value().toBool(); +} + +bool Settings::backgroundBlur() const +{ + return settings->option("advanced.window.blurred_background")->value().toBool(); +} + +void Settings::setColorScheme(const QString &name) +{ + return settings->option("basic.interface.theme")->setValue(name); +} + +QString Settings::extendColorScheme() const +{ + return settings->option("basic.interface.expand_theme")->value().toString(); +} + +void Settings::setExtendColorScheme(const QString &name) +{ + return settings->option("basic.interface.expand_theme")->setValue(name); +} + +/******************************************************************************* + 1. @函数: setEncoding + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 设置界面设置编码 +*******************************************************************************/ +//void Settings::setEncoding(const QString &name) +//{ +// if (name != m_EncodeName) { +// m_EncodeName = name; +// emit encodeSettingChanged(name); +// qInfo() << "encode changed to" << name; +// } +//} + +/******************************************************************************* + 1. @函数: setKeyValue + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 设置界面设置键值 +*******************************************************************************/ +//void Settings::setKeyValue(const QString &name, const QString &value) +//{ +// settings->option(name)->setValue(value); +//} + +bool Settings::IsPasteSelection() +{ + return settings->option("advanced.cursor.auto_copy_selection")->value().toBool(); +} + +bool Settings::isShortcutConflict(const QString &Name, const QString &Key) +{ + for (QString &tmpKey : settings->keys()) { + // 获取设置里面的快捷键键值 + QString strKey = settings->value(tmpKey).toString(); + // 比较前将快捷键都设置为同一级别的键值,然后比较 + // 例ctlr+shift+? => ctrl+shift+/ + if (Utils::converUpToDown(strKey) == Utils::converUpToDown(Key)) { + if (Name != tmpKey) { + qInfo() << Name << Key << "is conflict with Settings!" << tmpKey << settings->value(tmpKey); + return true; + } + } + } + return false; +} + +/******** Add by ut001000 renfeixiang 2020-06-15:增加 每次显示设置界面时,更新设置的等宽字体 Begin***************/ +void Settings::handleWidthFont() +{ + QStringList Whitelist; + Whitelist = DBusManager::callAppearanceFont("monospacefont"); + + //将新安装的字体,加载到字体库中 + QFontDatabase base; + for (int i = 0; i < Whitelist.count(); ++i) { + QString name = Whitelist.at(i); + if (-1 == comboBox->findText(name)) { + QString fontpath = QDir::homePath() + "/.local/share/fonts/" + name + "/";// + name + ".ttf"; + QDir dir(fontpath); + if (dir.count() > 2) + fontpath = fontpath + dir[2]; + + int ret = base.addApplicationFont(fontpath); + if (-1 == ret) + qInfo() << "load " << name << " font faild"; + + } + } + std::sort(Whitelist.begin(), Whitelist.end(), [ = ](const QString & str1, const QString & str2) { + QCollator qc; + return qc.compare(str1, str2) < 0; + }); + + QString fontname = comboBox->currentText(); + comboBox->clear(); + comboBox->addItems(Whitelist); + qInfo() << "handleWidthFont has update"; + if (Whitelist.contains(fontname)) { + comboBox->setCurrentText(fontname); + } +} + + +bool Settings::enableControlFlow(void) +{ + return !settings->option("advanced.shell.enable_ctrl_flow")->value().toBool(); +} + +/******** Add by ut001000 renfeixiang 2020-06-15:增加 每次显示设置界面时,更新设置的等宽字体 End***************/ + +/******************************************************************************* + 1. @函数: getKeyshortcutFromKeymap + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-11 + 4. @说明: 设置界面从键盘映射获取密钥快捷方式 +*******************************************************************************/ +//QString Settings::getKeyshortcutFromKeymap(const QString &keyCategory, const QString &keyName) +//{ +// return settings->option(QString("shortcuts.%1.%2").arg(keyCategory, keyName))->value().toString(); +//} + +/******** Modify by n014361 wangpeili 2020-01-04: 创建Combox控件 ***********×****/ + +QPair Settings::createFontComBoBoxHandle(QObject *obj) +{ + auto option = qobject_cast(obj); + + /******** Modify by ut001000 renfeixiang 2020-06-15:修改 comboBox修改成成员变量,修改DBUS获取失败场景,设置成系统默认等宽字体 Begin***************/ + comboBox = new DComboBox; + comboBox->setObjectName("SettingsFontFamilyComboBox");//Add by ut001000 renfeixiang 2020-08-14 + + QPair optionWidget = + DSettingsWidgetFactory::createStandardItem(QByteArray(), option, comboBox); + + QStringList Whitelist; + Whitelist = DBusManager::callAppearanceFont("monospacefont"); + + std::sort(Whitelist.begin(), Whitelist.end(), [ = ](const QString & str1, const QString & str2) { + QCollator qc; + return qc.compare(str1, str2) < 0; + }); + + qInfo() << "createFontComBoBoxHandle get system monospacefont"; + if (Whitelist.size() <= 0) { + //一般不会走这个分支,除非DBUS出现问题 + qInfo() << "DBusManager::callAppearanceFont failed, get control font failed."; + //DBUS获取字体失败后,设置系统默认的等宽字体 + Whitelist << "Courier 10 Pitch" << "DejaVu Sans Mono" << "Liberation Mono" + << "Noto Mono" << "Noto Sans Mono" << "Noto Sans Mono CJK JP" + << "Noto Sans Mono CJK KR" << "Noto Sans Mono CJK SC" + << "Noto Sans Mono CJK TC"; + } + comboBox->addItems(Whitelist); + /******** Modify by ut001000 renfeixiang 2020-06-15:修改 comboBox修改成成员变量,修改DBUS获取失败场景,设置成系统默认等宽字体 End***************/ + + if (option->value().toString().isEmpty()) + option->setValue(QFontDatabase::systemFont(QFontDatabase::FixedFont).family()); + + // init. + comboBox->setCurrentText(option->value().toString()); + + connect(option, &DSettingsOption::valueChanged, comboBox, [ = ](QVariant var) { + comboBox->setCurrentText(var.toString()); + }); + + option->connect( + comboBox, &QComboBox::currentTextChanged, option, [ = ](const QString & text) { + option->setValue(text); + }); + + return optionWidget; +} + +QPair Settings::createCustomSliderHandle(QObject *obj) +{ + auto option = qobject_cast(obj); + + DSlider *slider = new DSlider; + slider->setIconSize(QSize(20, 20)); + slider->setLeftIcon(QIcon::fromTheme("dt_opacity_left")); + slider->setRightIcon(QIcon::fromTheme("dt_opacity_right")); + slider->setMaximum(option->data("max").toInt()); + slider->setMinimum(option->data("min").toInt()); + slider->setValue(static_cast(instance()->opacity() * 100)); + //fix bug 65140 焦点在透明度,点击Page up/ down,点击8次即可调节到最前/后,和控制中心不一致 + slider->setPageStep(1); + slider->slider()->setTickInterval(1); + QPair optionWidget = DSettingsWidgetFactory::createStandardItem(QByteArray(), option, slider); + + connect(option, &DSettingsOption::valueChanged, slider, [ = ](QVariant var) { + slider->setValue(var.toInt()); + }); + + option->connect(slider, &DSlider::valueChanged, option, [ = ](QVariant var) { + option->setValue(var.toInt()); + }); + + return optionWidget; +} + +QPair Settings::createSpinButtonHandle(QObject *obj) +{ + auto option = qobject_cast(obj); + auto rightWidget = new NewDspinBox(); + + rightWidget->setValue(option->value().toInt()); + + QPair optionWidget = + DSettingsWidgetFactory::createStandardItem(QByteArray(), option, rightWidget); + connect( + option, &DSettingsOption::valueChanged, rightWidget, [ = ](QVariant var) { + rightWidget->setValue(var.toInt()); + }); + //Add by ut001000 renfeixiang 2020-11-06 使用QSpinBox自带的valueChanged信号 + option->connect(rightWidget, static_cast(&QSpinBox::valueChanged), + option, [ = ](int value) { + option->setValue(value); + }); + + return optionWidget; +} /********************* Modify by n014361 wangpeili End ************************/ + +QPair Settings::createShortcutEditOptionHandle(/*DSettingsWidgetFactoryPrivate *p,*/ QObject *opt) +{ + auto option = qobject_cast(opt); + auto rightWidget = new KeySequenceEdit(option); + + rightWidget->setObjectName("OptionShortcutEdit"); + rightWidget->ShortcutDirection(Qt::AlignLeft); + + auto optionValue = option->value(); + auto translateContext = opt->property(PRIVATE_PROPERTY_translateContext).toByteArray(); + + // 控件初始加载配置文件的值 + auto updateWidgetValue = [ = ](const QVariant & optionValue, DTK_CORE_NAMESPACE::DSettingsOption * opt) { + Q_UNUSED(opt) + QKeySequence sequence(optionValue.toString()); + QString keyseq = sequence.toString(); + if (keyseq == SHORTCUT_VALUE) + return; + + rightWidget->setKeySequence(sequence); + }; + updateWidgetValue(optionValue, option); + + // 控件输入 + option->connect(rightWidget, &KeySequenceEdit::editingFinished, rightWidget, [ = ](const QKeySequence & sequence) { + // 删除 + if ("Backspace" == sequence.toString()) { + rightWidget->clear(); + option->setValue(SHORTCUT_VALUE); + return ; + } + // 取消 + if ("Esc" == sequence.toString()) { + rightWidget->clear(); + rightWidget->setKeySequence(QKeySequence(rightWidget->option()->value().toString())); + return ; + } + + QString reason; + // 有效查询 + if (!ShortcutManager::instance()->checkShortcutValid(rightWidget->option()->key(), sequence.toString(), reason)) { + if (sequence.toString() != "Esc") + Service::instance()->showShortcutConflictMsgbox(reason); + + // 界面数据还原 + rightWidget->clear(); + rightWidget->setKeySequence(QKeySequence(rightWidget->option()->value().toString())); + return ; + } + option->setValue(sequence.toString()); + }); + + // 配置修改 + option->connect(option, &DTK_CORE_NAMESPACE::DSettingsOption::valueChanged, rightWidget, [ = ](const QVariant & value) { + QString keyseq = value.toString(); + qInfo() << "valueChanged" << rightWidget->option()->key() << keyseq; + if (SHORTCUT_VALUE == keyseq || keyseq.isEmpty()) { + rightWidget->clear(); + return; + } + + rightWidget->setKeySequence(QKeySequence(keyseq)); + }); + + return DSettingsWidgetFactory::createStandardItem(translateContext, option, rightWidget); +} + +QPair Settings::createTabTitleFormatOptionHandle(QObject *opt) +{ + return createTabTitleFormatWidget(opt, false); +} + +QPair Settings::createRemoteTabTitleFormatOptionHandle(QObject *opt) +{ + return createTabTitleFormatWidget(opt, true); +} + +QPair Settings::createShellConfigComboxOptionHandle(QObject *obj) +{ + DSettingsOption *option = qobject_cast(obj); + // shell配置框 + g_shellConfigCombox = new DComboBox; + QPair optionWidget = DSettingsWidgetFactory::createStandardItem(QByteArray(), option, g_shellConfigCombox); + // 添加shell配置选项 + addShellOption(); + + connect(option, &DSettingsOption::valueChanged, g_shellConfigCombox, [ = ](QVariant var) { + // 恢复默认值 + if (DEFAULT_SHELL == var.toString()) { + g_shellConfigCombox->setCurrentText(DEFAULT_SHELL); + return; + } + // 不是默认值的其他情况 + QMap shellMap = Service::instance()->shellsMap(); + g_shellConfigCombox->setCurrentText(shellMap.key(var.toString())); + }); + + option->connect(g_shellConfigCombox, &DComboBox::currentTextChanged, option, [ = ](const QString & strShell) { + QMap shellMap = Service::instance()->shellsMap(); + option->setValue(shellMap[strShell]); + //fix: bug#68644 shell切换为zsh,再次连接远程管理,跳转到新标签页时远程管理未连接 + if (strShell == "zsh") { + QString path = QProcessEnvironment::systemEnvironment().value("HOME"); + QFile fi(path + "/" + ".zshrc"); + if (!fi.exists()) { + fi.open(QIODevice::ReadWrite | QIODevice::Text); //不存在的情况下,打开包含了新建文件的操作 + fi.close(); + } + } + }); + + QMap shellMap = Service::instance()->shellsMap(); + // 设置默认值 + g_shellConfigCombox->setCurrentText(shellMap.key(option->value().toString())); + + return optionWidget; +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/settings/settings.h deepin-terminal-5.4.13/src/settings/settings.h --- deepin-terminal-5.0.0+ds1/src/settings/settings.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/settings.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,358 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef SETTINGS_H +#define SETTINGS_H + +#include +#include +#include + +#include +#include +#include + +DCORE_USE_NAMESPACE +DWIDGET_USE_NAMESPACE + +class DSettingsWidgetFactoryPrivate; +/******************************************************************************* + 1. @类名: Settings + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 系统设置 + 配置文件:.config/deepin/deepin-terminal/config.conf +*******************************************************************************/ +class Settings : public QObject +{ + Q_OBJECT +public: + static Settings *instance(); + ~Settings(); + + /** + * @brief 设置界面初始化连接 + * @author ut001121 zhangmeng + */ + void initConnection(); + + /** + * @brief 释放settings实例 + */ + static void releaseInstance(); + + /** + * @brief 设置界面获取透明度的值 + * @author ut001121 zhangmeng + * @return + */ + qreal opacity() const; + /** + * @brief 设置界面获取光标形状 + * @author ut001121 zhangmeng + * @return + */ + int cursorShape() const; + /** + * @brief 设置界面获取光标闪烁属性 + * @author ut001121 zhangmeng + * @return + */ + bool cursorBlink() const; + /** + * @brief 设置界面获取背景模糊属性 + * @author ut001121 zhangmeng + * @return + */ + bool backgroundBlur() const; + /** + * @brief 设置界面获取主题颜色 + * @author ut001121 zhangmeng + * @return + */ + QString colorScheme() const; + /** + * @brief 设置界面获取编码 + * @author ut001121 zhangmeng + * @return + */ + QString encoding() const; + /** + * @brief 设置界面获取字体名称 + * @author ut001121 zhangmeng + * @return + */ + QString fontName(); + /** + * @brief 设置界面获取字体大小 + * @author ut001121 zhangmeng + * @return + */ + int fontSize(); + /** + * @brief 设置界面获取按键时是否是滚动 + * @author ut001121 zhangmeng + * @return + */ + bool PressingScroll(); + /** + * @brief 设置界面获取输出时是否是滚动 + * @author ut001121 zhangmeng + * @return + */ + bool OutputtingScroll(); +// void reload(); + /** + * @brief 标签标题 + * @author ut000610 戴正文 + * @return + */ + QString tabTitleFormat() const; + /** + * @brief 远程标签标题 + * @author ut000610 戴正文 + * @return + */ + QString remoteTabTitleFormat() const; + /** + * @brief 获取当前设置选中的shell路径 + * @author ut000610 戴正文 + * @return + */ + QString shellPath() const; + /** + * @brief 重新加载shell配置,并设置当前项 + * @author ut000610 戴正文 + */ + void reloadShellOptions(); + /** + * @brief 添加默认shell的配置项 + * @author ut000610 戴正文 + */ + static void addShellOption(); + + /** + * @brief 设置界面设置主题颜色 + * @author ut001121 zhangmeng + * @param name + */ + void setColorScheme(const QString &name); + // 设置编码格式, 这个现在限定当前mainwindow生效,不再使用这个全局接口了 +// void setEncoding(const QString &name); + // 通用设置 +// void setKeyValue(const QString &name, const QString &value); + + /** + * @brief 获取内置主题 + * @author ut000125 sunchengxi + * @return + */ + QString extendColorScheme() const; + /** + * @brief 设置内置主题 + * @author ut000125 sunchengxi + * @param name + */ + void setExtendColorScheme(const QString &name); + /** + * @brief 颜色转字符串 + * @author ut000125 sunchengxi + * @return + */ + QStringList color2str(QColor); + + DSettings *settings; + + // 字体下拉列表 + static DComboBox *comboBox; + // shell配置下拉列表 + static DComboBox *g_shellConfigCombox; + + /** + * @brief 获取当前配置粘贴是否为选择内容 + * @author n014361 王培利 + * @return + */ + bool IsPasteSelection(); + + /** + * @brief 与设置里的快捷键冲突检测 + * @author n014361 王培利 + * @param Name 快捷键名称 + * @param Key 快捷键键值 + * @return + */ + bool isShortcutConflict(const QString &Name, const QString &Key); + /** + * @brief 每次显示设置界面时,更新设置的等宽字体 + * @author ut001000 任飞翔 + */ + void handleWidthFont(); + /** + * @brief 是否禁用Ctrl+S和Ctrl+Q流控制 + * @author 朱科伟 + * @return + */ + bool enableControlFlow(void); + + //是否选择了主题 + bool bSwitchTheme = false; + //主题名称 + QString themeStr = ""; + //内置主题名称 + QString extendThemeStr = ""; + + //自定义主题配置文件路径 + QString m_configCustomThemePath; + //自定义主题配置设置 + QSettings *themeSetting = nullptr; + //自定义主题配置是否修改 + bool m_customThemeModify = false; + + +public: +// QString getKeyshortcutFromKeymap(const QString &keyCategory, const QString &keyName); + /** + * @brief 创建Combox控件 + * @author ut000439 wangpeili + * @param obj 对象 + * @return + */ + static QPair createFontComBoBoxHandle(QObject *obj); + /** + * @brief 自定义slider控件样式 + * @author n014361 王培利 + * @param obj 对象 + * @return + */ + static QPair createCustomSliderHandle(QObject *obj); + /** + * @brief 自定义SpinButton控件样式 + * @author ut000439 wangpeili + * @param obj 对象 + * @return + */ + static QPair createSpinButtonHandle(QObject *obj); + /** + * @brief 自定义ShortcutEdit控件样式 + * @author ut000439 wangpeili + * @param opt + * @return + */ + static QPair createShortcutEditOptionHandle(QObject *opt); + /** + * @brief 新增自定义修改标签格式的控件 + * @author ut000610 戴正文 + * @param opt + * @return + */ + static QPair createTabTitleFormatOptionHandle(QObject *opt); + /** + * @brief 新增自定义修改远程标签格式的控件 + * @author ut000610 戴正文 + * @param opt + * @return + */ + static QPair createRemoteTabTitleFormatOptionHandle(QObject *opt); + /** + * @brief 新增自定义shell配置下拉列表控件 + * @author ut000610 戴正文 + * @param opt + * @return + */ + static QPair createShellConfigComboxOptionHandle(QObject *obj); + +signals: + void windowSettingChanged(const QString &key); + void terminalSettingChanged(const QString &key); + void shortcutSettingChanged(const QString &key); + void encodeSettingChanged(const QString &Name); + + void opacityChanged(qreal opacity); + void cursorShapeChanged(int shape); + void cursorBlinkChanged(bool blink); + void backgroundBlurChanged(bool enabled); + void pressingScrollChanged(bool enabled); + void OutputScrollChanged(bool enabled); + void fontSizeChanged(int fontSize); + void fontChanged(QString fontName); + + // 设置中的标签标题格式变化 + void tabFormatChanged(const QString &tabFormat); + // 设置中的远程标签标题格式变化 + void remoteTabFormatChanged(const QString &remoteTabFormat); + +private: + /** + * @brief 设置界面初始化 + * @author ut001121 zhangmeng + */ + void init(); + +private: + Settings(); + /** + * @brief 重新安装终端后在这里重置状态 + * @author ut001121 zhangmeng + */ + void loadDefaultsWhenReinstall(); + /** + * @brief 创建标签标题修改界面 + * @author ut000610 戴正文 + * @param opt + * @param isRemote 是否是远程标签标题 + * @return + */ + static QPair createTabTitleFormatWidget(QObject *opt, bool isRemote); + + static Settings *m_settings_instance; + + Dtk::Core::QSettingBackend *m_backend; + QString m_configPath; + // 配置文件监视 + QFileSystemWatcher *m_Watcher = nullptr; + // 编码格式为当前mainwindow有效参数,不记录在文件中. + QString m_EncodeName = "UTF-8"; +}; + +/******************************************************************************* + 1. @类名: KeySequenceEdit + 2. @作者: ut001121 zhangmeng + 3. @日期: 2020-08-12 + 4. @说明: +*******************************************************************************/ +class KeySequenceEdit : public DKeySequenceEdit +{ +public: + KeySequenceEdit(DTK_CORE_NAMESPACE::DSettingsOption *opt, QWidget *parent = nullptr): DKeySequenceEdit(parent) + { + m_poption = opt; + } + DTK_CORE_NAMESPACE::DSettingsOption *option() + { + return m_poption; + } +private: + DTK_CORE_NAMESPACE::DSettingsOption *m_poption = nullptr; +}; + +QPair createShortcutEditOptionHandle(DSettingsWidgetFactoryPrivate *p, QObject *opt); +#define SHORTCUT_VALUE "shortcut_null" +#endif // SETTINGS_H diff -Nru deepin-terminal-5.0.0+ds1/src/settings/settings_translation.cpp deepin-terminal-5.4.13/src/settings/settings_translation.cpp --- deepin-terminal-5.0.0+ds1/src/settings/settings_translation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/settings_translation.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhangmeng + * + * Maintainer: zhangmeng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// This file was generated by dtk-settings-tools version 0.1.2 + +#include + +/******************************************************************************* + 1. @函数: GenerateSettingTranslate + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 生成设置翻译 +*******************************************************************************/ +void GenerateSettingTranslate() +{ + auto advanced_cursor_auto_copy_selectionText = QObject::tr("Copy on select"); + Q_UNUSED(advanced_cursor_auto_copy_selectionText); + auto advanced_cursor_cursor_blinkText = QObject::tr("Cursor blink"); + Q_UNUSED(advanced_cursor_cursor_blinkText); + auto advanced_cursor_cursor_shapeName = QObject::tr("Cursor style"); + Q_UNUSED(advanced_cursor_cursor_shapeName); + auto advanced_scroll_scroll_on_keyText = QObject::tr("Scroll on keystroke"); + Q_UNUSED(advanced_scroll_scroll_on_keyText); + auto advanced_scroll_scroll_on_outputText = QObject::tr("Scroll on output"); + Q_UNUSED(advanced_scroll_scroll_on_outputText); + auto advanced_window_auto_hide_raytheon_windowText = QObject::tr("Hide Quake window after losing focus"); + Q_UNUSED(advanced_window_auto_hide_raytheon_windowText); + auto advanced_window_blurred_backgroundText = QObject::tr("Blur background"); + Q_UNUSED(advanced_window_blurred_backgroundText); + auto advanced_window_use_on_startingName = QObject::tr("Use on starting"); + Q_UNUSED(advanced_window_use_on_startingName); + auto basic_interface_fontName = QObject::tr("Font"); + Q_UNUSED(basic_interface_fontName); + auto basic_interface_font_sizeName = QObject::tr("Font size"); + Q_UNUSED(basic_interface_font_sizeName); + auto basic_interface_opacityName = QObject::tr("Opacity"); + Q_UNUSED(basic_interface_opacityName); + auto group_advancedName = QObject::tr("Advanced"); + Q_UNUSED(group_advancedName); + auto group_advanced_cursorName = QObject::tr("Cursor"); + Q_UNUSED(group_advanced_cursorName); + auto group_advanced_scrollName = QObject::tr("Scroll"); + Q_UNUSED(group_advanced_scrollName); + auto group_advanced_windowName = QObject::tr("Window"); + Q_UNUSED(group_advanced_windowName); + auto group_basicName = QObject::tr("Basic"); + Q_UNUSED(group_basicName); + auto group_basic_interfaceName = QObject::tr("Interface"); + Q_UNUSED(group_basic_interfaceName); + auto group_shortcutsName = QObject::tr("Shortcuts"); + Q_UNUSED(group_shortcutsName); + auto group_shortcuts_advancedName = QObject::tr("Others"); + Q_UNUSED(group_shortcuts_advancedName); + auto group_shortcuts_terminalName = QObject::tr("Terminal"); + Q_UNUSED(group_shortcuts_terminalName); + auto group_shortcuts_workspaceName = QObject::tr("Workspace"); + Q_UNUSED(group_shortcuts_workspaceName); + auto shortcuts_advanced_custom_commandName = QObject::tr("Custom commands"); + Q_UNUSED(shortcuts_advanced_custom_commandName); + auto shortcuts_advanced_display_shortcutsName = QObject::tr("Display shortcuts"); + Q_UNUSED(shortcuts_advanced_display_shortcutsName); + auto shortcuts_advanced_remote_managementName = QObject::tr("Remote management"); + Q_UNUSED(shortcuts_advanced_remote_managementName); + auto shortcuts_advanced_rename_tabName = QObject::tr("Rename title"); + Q_UNUSED(shortcuts_advanced_rename_tabName); + auto shortcuts_advanced_switch_fullscreenName = QObject::tr("Fullscreen"); + Q_UNUSED(shortcuts_advanced_switch_fullscreenName); + auto shortcuts_terminal_copyName = QObject::tr("Copy"); + Q_UNUSED(shortcuts_terminal_copyName); + auto shortcuts_terminal_default_sizeName = QObject::tr("Default size"); + Q_UNUSED(shortcuts_terminal_default_sizeName); + auto shortcuts_terminal_pasteName = QObject::tr("Paste"); + Q_UNUSED(shortcuts_terminal_pasteName); + auto shortcuts_terminal_searchName = QObject::tr("Search"); + Q_UNUSED(shortcuts_terminal_searchName); + auto shortcuts_terminal_select_allName = QObject::tr("Select all"); + Q_UNUSED(shortcuts_terminal_select_allName); + auto shortcuts_terminal_skip_to_next_commandName = QObject::tr("Jump to next command"); + Q_UNUSED(shortcuts_terminal_skip_to_next_commandName); + auto shortcuts_terminal_skip_to_previous_commandName = QObject::tr("Jump to previous command"); + Q_UNUSED(shortcuts_terminal_skip_to_previous_commandName); + auto shortcuts_terminal_zoom_inName = QObject::tr("Zoom in"); + Q_UNUSED(shortcuts_terminal_zoom_inName); + auto shortcuts_terminal_zoom_outName = QObject::tr("Zoom out"); + Q_UNUSED(shortcuts_terminal_zoom_outName); + auto shortcuts_workspace_close_other_windowsName = QObject::tr("Close other windows"); + Q_UNUSED(shortcuts_workspace_close_other_windowsName); + auto shortcuts_workspace_close_other_workspace = QObject::tr("Close other workspaces"); + Q_UNUSED(shortcuts_workspace_close_other_workspace); + auto shortcuts_workspace_close_windowName = QObject::tr("Close window"); + Q_UNUSED(shortcuts_workspace_close_windowName); + auto shortcuts_workspace_close_workspaceName = QObject::tr("Close workspace"); + Q_UNUSED(shortcuts_workspace_close_workspaceName); + auto shortcuts_workspace_horionzal_splitName = QObject::tr("Horizontal split"); + Q_UNUSED(shortcuts_workspace_horionzal_splitName); + auto shortcuts_tab_new_tabName = QObject::tr("New tab"); + Q_UNUSED(shortcuts_tab_new_tabName); + auto shortcuts_workspace_next_tabName = QObject::tr("Next tab"); + Q_UNUSED(shortcuts_workspace_next_tabName); + auto shortcuts_workspace_previous_tabName = QObject::tr("Previous tab"); + Q_UNUSED(shortcuts_workspace_previous_tabName); + auto shortcuts_workspace_select_left_workspaceName = QObject::tr("Select left workspace"); + Q_UNUSED(shortcuts_workspace_select_left_workspaceName); + auto shortcuts_workspace_select_lower_workspaceName = QObject::tr("Select lower workspace"); + Q_UNUSED(shortcuts_workspace_select_lower_workspaceName); + auto shortcuts_workspace_select_right_workspaceName = QObject::tr("Select right workspace"); + Q_UNUSED(shortcuts_workspace_select_right_workspaceName); + auto shortcuts_workspace_select_upper_workspaceName = QObject::tr("Select upper workspace"); + Q_UNUSED(shortcuts_workspace_select_upper_workspaceName); + auto shortcuts_workspace_vertical_splitName = QObject::tr("Vertical split"); + Q_UNUSED(shortcuts_workspace_vertical_splitName); + auto shortcuts_terminal_FindName = QObject::tr("Find"); + Q_UNUSED(shortcuts_terminal_FindName); + auto tab_titles = QObject::tr("Tab titles"); + Q_UNUSED(tab_titles); + auto tab_title_format = QObject::tr("Tab title format"); + Q_UNUSED(tab_title_format); + auto remote_tab_title_format = QObject::tr("Remote tab title format"); + Q_UNUSED(remote_tab_title_format); + auto go_to_tab_1 = QObject::tr("Go to tab 1"); + Q_UNUSED(go_to_tab_1); + auto go_to_tab_2 = QObject::tr("Go to tab 2"); + Q_UNUSED(go_to_tab_2); + auto go_to_tab_3 = QObject::tr("Go to tab 3"); + Q_UNUSED(go_to_tab_3); + auto go_to_tab_4 = QObject::tr("Go to tab 4"); + Q_UNUSED(go_to_tab_4); + auto go_to_tab_5 = QObject::tr("Go to tab 5"); + Q_UNUSED(go_to_tab_5); + auto go_to_tab_6 = QObject::tr("Go to tab 6"); + Q_UNUSED(go_to_tab_6); + auto go_to_tab_7 = QObject::tr("Go to tab 7"); + Q_UNUSED(go_to_tab_7); + auto go_to_tab_8 = QObject::tr("Go to tab 8"); + Q_UNUSED(go_to_tab_8); + auto go_to_tab_9 = QObject::tr("Go to tab 9"); + Q_UNUSED(go_to_tab_9); + auto disable_flow_control_using_ctrl_s_ctrl_q = QObject::tr("Disable flow control using Ctrl+S, Ctrl+Q"); + Q_UNUSED(disable_flow_control_using_ctrl_s_ctrl_q); + auto shell_profile = QObject::tr("Shell profile"); + Q_UNUSED(shell_profile); +} diff -Nru deepin-terminal-5.0.0+ds1/src/settings/shortcutmanager.cpp deepin-terminal-5.4.13/src/settings/shortcutmanager.cpp --- deepin-terminal-5.0.0+ds1/src/settings/shortcutmanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/shortcutmanager.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,386 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "shortcutmanager.h" +#include "termwidgetpage.h" +#include "mainwindow.h" +#include "settings.h" +#include "listview.h" +#include "settingio.h" + +#include +#include +#include +#include +#include + +/* del by ut001121 zhangmeng 20201221 修复BUG58747 +#define INI_FILE_CODEC QTextCodec::codecForName("UTF-8")*/ + +// this class only provided for convenience, do not do anything in the construct function, +// let the caller decided when to create the shortcuts. +ShortcutManager *ShortcutManager::m_instance = nullptr; + +ShortcutManager::ShortcutManager(QObject *parent) : QObject(parent) +{ + Utils::set_Object_Name(this); +} + +ShortcutManager *ShortcutManager::instance() +{ + if (nullptr == m_instance) + m_instance = new ShortcutManager(); + + return m_instance; +} + +void ShortcutManager::initShortcuts() +{ + m_builtinShortcuts << "F1"; + m_builtinShortcuts << "Ctrl+C"; + m_builtinShortcuts << "Ctrl+D"; + + /******** Modify by ut000439 wangpeili 2020-07-27: bug 39494 ****************/ + m_builtinShortcuts << QString(MainWindow::QKEYSEQUENCE_PASTE_BUILTIN); + + /******** Modify by ut001000 renfeixiang 2020-08-28:修改 bug 44477***************/ + m_builtinShortcuts << QString(MainWindow::QKEYSEQUENCE_COPY_BUILTIN); + /********************* Modify by n014361 wangpeili End ************************/ + + /******** Modify by ut000439 wangpeili 2020-07-20: SP3 右键快捷键被内置 ****************/ + m_builtinShortcuts << "Alt+M"; + /********************* Modify by n014361 wangpeili End ************************/ + // 切换标签页,防止和ctrl+shift+1等冲突(无法识别) + + createCustomCommandsFromConfig(); + m_mapReplaceText.insert("Ctrl+Shift+!", "Ctrl+Shift+1"); + m_mapReplaceText.insert("Ctrl+Shift+@", "Ctrl+Shift+2"); + m_mapReplaceText.insert("Ctrl+Shift+#", "Ctrl+Shift+3"); + m_mapReplaceText.insert("Ctrl+Shift+$", "Ctrl+Shift+4"); + m_mapReplaceText.insert("Ctrl+Shift+%", "Ctrl+Shift+5"); + m_mapReplaceText.insert("Ctrl+Shift+^", "Ctrl+Shift+6"); + m_mapReplaceText.insert("Ctrl+Shift+&", "Ctrl+Shift+7"); + m_mapReplaceText.insert("Ctrl+Shift+*", "Ctrl+Shift+8"); + m_mapReplaceText.insert("Ctrl+Shift+(", "Ctrl+Shift+9"); + m_mapReplaceText.insert("Return", "Enter"); +} +ShortcutManager::~ShortcutManager() +{ + qDeleteAll(m_customCommandActionList.begin(), m_customCommandActionList.end()); + m_customCommandActionList.clear(); +} + + +void ShortcutManager::initConnect(MainWindow *mainWindow) +{ + for (auto &commandAction : m_customCommandActionList) { + connect(commandAction, &QAction::triggered, mainWindow, &MainWindow::onCommandActionTriggered); + } + mainWindow->addActions(m_customCommandActionList); +} + +void ShortcutManager::createCustomCommandsFromConfig() +{ + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + return ; + + QString customCommandConfigFilePath(customCommandBasePath.filePath("command-config.conf")); + qInfo() << "load Custom Commands Config: " << customCommandConfigFilePath; + if (!QFile::exists(customCommandConfigFilePath)) + return ; + + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + QStringList commandGroups = commandsSettings.childGroups(); + for (const QString &commandName : commandGroups) { + commandsSettings.beginGroup(commandName); + if (!commandsSettings.contains("Command")) + continue; + + QAction *action = new QAction(commandName, this); + action->setData(commandsSettings.value("Command").toString()); // make sure it is a QString + if (commandsSettings.contains("Shortcut")) { + QVariant shortcutVariant = commandsSettings.value("Shortcut"); + if (QVariant::KeySequence == shortcutVariant.type()) { + action->setShortcut(shortcutVariant.convert(QMetaType::QKeySequence)); + } else if (QVariant::String == shortcutVariant.type()) { + //兼容deepin-terminal 旧的command-config.conf配置文件 + QString shortcutStr = shortcutVariant.toString().remove(QChar(' ')); + action->setShortcut(QKeySequence(shortcutStr)); + } + } + commandsSettings.endGroup(); + m_customCommandActionList.append(action); + } + + if (SettingIO::rewrite) { + //删除自定义命令文件 + QFile fileTemp(customCommandConfigFilePath); + if(!fileTemp.remove()) + qWarning() << " remove file error" << customCommandConfigFilePath << fileTemp.errorString(); + + //将内存数据写入配置文件 + for (QAction *action : m_customCommandActionList) { + saveCustomCommandToConfig(action, -1); + } + } +} + +QList ShortcutManager::createBuiltinShortcutsFromConfig() +{ + QList actionList; + return actionList; +} + +QList &ShortcutManager::getCustomCommandActionList() +{ + return m_customCommandActionList; +} + +QAction *ShortcutManager::addCustomCommand(const QAction &action) +{ + QAction *addAction = new QAction(action.text(), this); + addAction->setData(action.data()); + addAction->setShortcut(action.shortcut()); + m_customCommandActionList.append(addAction); + saveCustomCommandToConfig(addAction, -1); + emit addCustomCommandSignal(addAction); + + return addAction; +} + +QAction *ShortcutManager::checkActionIsExist(QAction &action) +{ + QString strNewActionName = action.text(); + for (int i = 0; i < m_customCommandActionList.size(); i++) { + QAction *currAction = m_customCommandActionList[i]; + if (currAction->text() == strNewActionName) + return currAction; + } + return nullptr; +} +/************************ Mod by m000743 sunchengxi 2020-04-21:自定义命令修改的异常问题 Begin************************/ +QAction *ShortcutManager::checkActionIsExistForModify(QAction &action) +{ + QString strNewActionName = action.text(); + for (int i = 0; i < m_customCommandActionList.size(); i++) { + QAction *currAction = m_customCommandActionList[i]; + if (currAction->text() == strNewActionName && action.data() == currAction->data() && action.shortcut() == currAction->shortcut()) + return currAction; + } + return nullptr; +} + +QAction *ShortcutManager::findActionByKey(const QString &strKey) +{ + for (QAction *action : m_customCommandActionList) { + if (action->text() == strKey) { + qInfo() << "find action " << action; + return action; + } + } + + qInfo() << "not find action name " << strKey; + return nullptr; +} + +void ShortcutManager::fillCommandListData(ListView *listview, const QString &strFilter) +{ + listview->clearData(); + QList &customCommandActionList = ShortcutManager::instance()->getCustomCommandActionList(); + //根据条件进行刷新,strFilter 为空时 全部刷新,根据名称或者命令模糊匹配到strFilter的条件进行刷新 + if (strFilter.isEmpty()) { + for (int i = 0; i < customCommandActionList.size(); i++) { + QAction *curAction = customCommandActionList[i]; + QString strCmdName = curAction->text(); + QString strCmdShortcut = curAction->shortcut().toString(); + + //listview->addItem(ItemFuncType_Item, strCmdName, strCmdShortcut); + // 刷新列表,列表项中的值显示大写 down2up dzw 20201215 + listview->addItem(ItemFuncType_Item, strCmdName, Utils::converDownToUp(strCmdShortcut)); + } + } else { + for (int i = 0; i < customCommandActionList.size(); i++) { + QAction *curAction = customCommandActionList[i]; + QString strCmdName = curAction->text(); + QString strCmdText = curAction->data().toString(); + QKeySequence keySeq = curAction->shortcut(); + QString strKeySeq = keySeq.toString(); + if (strCmdName.contains(strFilter, Qt::CaseSensitivity::CaseInsensitive) + || strCmdText.contains(strFilter, Qt::CaseSensitivity::CaseInsensitive) + || strKeySeq.contains(strFilter, Qt::CaseSensitivity::CaseInsensitive)) { + //listview->addItem(ItemFuncType_Item, strCmdName, strKeySeq); + // 刷新列表,列表项中的值显示大写 down2up dzw 20201215 + listview->addItem(ItemFuncType_Item, strCmdName, Utils::converDownToUp(strKeySeq)); + } + } + } +} + +/************************ Mod by m000743 sunchengxi 2020-04-21:自定义命令修改的异常问题 End ************************/ +bool ShortcutManager::isShortcutConflictInCustom(const QString &Name, const QString &Key) +{ + for (auto &currAction : m_customCommandActionList) { + if (currAction->shortcut().toString() == Key) { + if (Name != currAction->text()) { + qInfo() << Name << Key << "is conflict with custom shortcut!"; + return true; + } + } + } + return false; +} + +bool ShortcutManager::isValidShortcut(const QString &Name, const QString &Key) +{ + QString reason; + if (!checkShortcutValid(Name, Key, reason)) { + if (Key != "Esc") + Utils::showShortcutConflictMsgbox(reason); + return false; + } + return true; +} + +bool ShortcutManager::checkShortcutValid(const QString &Name, const QString &Key, QString &Reason) +{ + /******** Modify by ut000610 daizhengwen 2020-07-10:给'<'做兼容 html中'<'的转译为 < Begin***************/ + QString key = Key; + if (key.contains("<")) { + // 用<>断开 < 与+号 +< 会显示错误 + key.replace("<", "<><"); + } + /********************* Modify by ut000610 daizhengwen End ************************/ + QString style = QString("%1").arg(key); + qInfo() << style; + + // 单键 + if (0 == Key.count("+")) { + //F1-F12是允许的,这个正则不够精确,但是没关系。 + QRegExp regexp("^F[0-9]{1,2}$"); + if (!Key.contains(regexp)) { + qInfo() << Key << "is invalid!"; + Reason = tr("The shortcut %1 is invalid, ") + .arg(style); + return false; + } + } + // 小键盘单键都不允许 + QRegExp regexpNum("^Num+.*"); + if (Key.contains(regexpNum)) { + qInfo() << Key << "is invalid!"; + Reason = tr("The shortcut %1 is invalid, ") + .arg(style); + return false; + } + // 内置快捷键都不允许 + if (m_builtinShortcuts.contains(Key)) { + qInfo() << Key << "is conflict with builtin shortcut!"; + Reason = tr("The shortcut %1 was already in use, ") + .arg(style); + return false; + } + + // 与设置里的快捷键冲突检测 + if (Settings::instance()->isShortcutConflict(Name, Key)) { + Reason = tr("The shortcut %1 was already in use, ") + .arg(style); + return false; + } + // 与自定义快捷键冲突检测 + if (isShortcutConflictInCustom(Name, Key)) { + Reason = tr("The shortcut %1 was already in use, ") + .arg(style); + return false; + } + return true; +} + +void ShortcutManager::delCustomCommand(CustomCommandData itemData) +{ + delCustomCommandToConfig(itemData); + + QString actionCmdName = itemData.m_cmdName; + + for (int i = 0; i < m_customCommandActionList.size(); i++) { + QAction *currAction = m_customCommandActionList.at(i); + QString currCmdName = currAction->text(); + if (actionCmdName == currCmdName) { + emit removeCustomCommandSignal(m_customCommandActionList.at(i)); + m_customCommandActionList.at(i)->deleteLater(); + m_customCommandActionList.removeAt(i); + break; + } + } + +} + +void ShortcutManager::saveCustomCommandToConfig(QAction *action, int saveIndex) +{ + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + customCommandBasePath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString customCommandConfigFilePath(customCommandBasePath.filePath("command-config.conf")); + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + commandsSettings.beginGroup(action->text()); + commandsSettings.setValue("Command", action->data()); + commandsSettings.setValue("Shortcut", action->shortcut().toString()); + commandsSettings.endGroup(); + + if (saveIndex >= 0) { + QAction *saveAction = new QAction; + saveAction->setText(action->text()); + saveAction->setData(action->data()); + saveAction->setShortcut(action->shortcut()); + m_customCommandActionList[saveIndex] = saveAction; + } +} + +int ShortcutManager::delCustomCommandToConfig(CustomCommandData itemData) +{ + QDir customCommandBasePath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + if (!customCommandBasePath.exists()) + customCommandBasePath.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); + + QString customCommandConfigFilePath(customCommandBasePath.filePath("command-config.conf")); + /***modify begin by ut001121 zhangmeng 20201221 修复BUG58747 远程管理和自定义命令名称中带/重启后会出现命令丢失***/ + /* add */ + USettings commandsSettings(customCommandConfigFilePath); + /***modify end by ut001121***/ + commandsSettings.remove(itemData.m_cmdName); + + int removeIndex = -1; + for (int i = 0; i < m_customCommandActionList.size(); i++) { + QAction *currAction = m_customCommandActionList[i]; + if (currAction->text() == itemData.m_cmdName) { + removeIndex = i; + break; + } + } + return removeIndex; +} + diff -Nru deepin-terminal-5.0.0+ds1/src/settings/shortcutmanager.h deepin-terminal-5.4.13/src/settings/shortcutmanager.h --- deepin-terminal-5.0.0+ds1/src/settings/shortcutmanager.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/settings/shortcutmanager.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef SHORTCUTMANAGER_H +#define SHORTCUTMANAGER_H + +#include "define.h" +#include "utils.h" + +#include +#include + +struct CustomCommandData { + QString m_cmdName; + QString m_cmdText; + QString m_cmdShortcut; +}; + +class MainWindow; +class ListView; +/******************************************************************************* + 1. @类名: ShortcutManager + 2. @作者: ut000439 王培利 + 3. @日期: 2020-07-31 + 4. @说明: 全局快捷键管理 + +*******************************************************************************/ +class ShortcutManager : public QObject +{ + Q_OBJECT +public: + explicit ShortcutManager(QObject *parent = nullptr); + static ShortcutManager *instance(); + ~ShortcutManager(); + /** + * @brief 初始化快捷键 + * @author ut001121 zhangmeng + */ + void initShortcuts(); + /** + * @brief 快捷键初始化链接 + * @author ut001121 zhangmeng + * @param mainWindow + */ + void initConnect(MainWindow *mainWindow); + + /** + * @brief 从配置创建自定义命令 + * @author ut001121 zhangmeng + */ + void createCustomCommandsFromConfig(); + /** + * @brief 从配置创建内置快捷方式 + * @author ut001121 zhangmeng + * @return + */ + QList createBuiltinShortcutsFromConfig(); + /** + * @brief 获取自定义命令操作列表 + * @author ut001121 zhangmeng + * @return + */ + QList &getCustomCommandActionList(); + + /** + * @brief 增加自定义命令 + * @author ut001121 zhangmeng + * @param action 增加操作 + * @return + */ + QAction *addCustomCommand(const QAction &action); + /** + * @brief 删除自定义命令 + * @author ut000125 sunchengxi + * @param itemData 删除项数据 + */ + void delCustomCommand(CustomCommandData itemData); + /** + * @brief 保存自定义命令到配置 + * @author ut000125 sunchengxi + * @param action 操作 + * @param saveIndex + */ + void saveCustomCommandToConfig(QAction *action, int saveIndex); + /** + * @brief 从配置中删除自定义命令 + * @author ut000125 sunchengxi + * @param itemData 删除项数据 + * @return + */ + int delCustomCommandToConfig(CustomCommandData itemData); + /** + * @brief 检查操作是否存在 + * @author ut001121 zhangmeng + * @param action 操作 + * @return + */ + QAction *checkActionIsExist(QAction &action); + /** + * @brief 检查是否存在修改操作 + * @author ut000125 sunchengxi + * @param action 修改操作 + * @return + */ + QAction *checkActionIsExistForModify(QAction &action); + /** + * @brief f通过key值找到快捷键 + * @author ut000610 戴正文 + * @param strKey key值 + * @return + */ + QAction *findActionByKey(const QString &strKey); + /** + * @brief 填充列表项 + * @author ut000610 戴正文 + * @param listview 列表 + * @param strFilter + */ + void fillCommandListData(ListView *listview, const QString &strFilter = ""); + + /** + * @brief 判断快捷键是否合法可用,并进行界面处理 + * @author n014361 王培利 + * @param Name 快捷键名称 + * @param Key + * @return + */ + bool isValidShortcut(const QString &Name, const QString &Key); + /** + * @brief 检测快捷键是否合法可用,无界面;目前单键除了F1-F12, 其它单键均不可以设置,内置,自定义,设置分别检测冲突 + * @author n014361 王培利 + * @param Name 快捷键名称 + * @param Key 快捷键 + * @param Reason + * @return + */ + bool checkShortcutValid(const QString &Name, const QString &Key, QString &Reason); + /** + * @brief 快捷键是否已被自定义设置 + * @author n014361 王培利 + * @param Name 快捷键名称 + * @param Key 快捷键 + * @return + */ + bool isShortcutConflictInCustom(const QString &Name, const QString &Key); + + // 快捷键显示映射 如:Return 显示成 Enter + QMap m_mapReplaceText; + +signals: + void addCustomCommandSignal(QAction *newAction); + void removeCustomCommandSignal(QAction *newAction); + +private: + QList m_customCommandActionList; + QStringList m_builtinShortcuts; + static ShortcutManager *m_instance; +}; + +#endif // SHORTCUTMANAGER_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/commonpanel.cpp deepin-terminal-5.4.13/src/views/commonpanel.cpp --- deepin-terminal-5.0.0+ds1/src/views/commonpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/commonpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "commonpanel.h" + +#include + +#include +#include + +CommonPanel::CommonPanel(QWidget *parent) : QFrame(parent) +{ +} + +void CommonPanel::clearSearchInfo() +{ + if (m_searchEdit) { + m_searchEdit->blockSignals(true); + m_searchEdit->clear(); + m_searchEdit->blockSignals(false); + } +} + +void CommonPanel::onFocusInBackButton() +{ + if (m_rebackButton) { + // 焦点进入后,选择到返回键上 + m_rebackButton->setFocus(); + } +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/commonpanel.h deepin-terminal-5.4.13/src/views/commonpanel.h --- deepin-terminal-5.0.0+ds1/src/views/commonpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/commonpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef COMMONPANEL_H +#define COMMONPANEL_H + +#include "rightpanel.h" +#include "iconbutton.h" + +#include +#include +#include +#include +#include + +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: CommonPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class CommonPanel : public QFrame +{ + Q_OBJECT +public: + explicit CommonPanel(QWidget *parent = nullptr); + /** + * @brief 清除搜索信息 + * @author ut000610 daizhengwen + */ + void clearSearchInfo(); + +public slots: + /** + * @brief 回车后,焦点进入返回键 + * @author ut000610 戴正文 + */ + void onFocusInBackButton(); + +signals: + void focusOut(); + +public: + DIconButton *m_backButton = nullptr; + IconButton *m_rebackButton = nullptr; + DSearchEdit *m_searchEdit = nullptr; + DPushButton *m_pushButton = nullptr; + DLabel *m_label = nullptr; + bool m_isShow = false; +}; + +#endif // COMMONPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/customthemesettingdialog.cpp deepin-terminal-5.4.13/src/views/customthemesettingdialog.cpp --- deepin-terminal-5.0.0+ds1/src/views/customthemesettingdialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/customthemesettingdialog.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,621 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#include "customthemesettingdialog.h" +#include "utils.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +TitleStyleRadioButton::TitleStyleRadioButton(const QString &text, QWidget *parent): DRadioButton(text, parent) +{ + +} + +void TitleStyleRadioButton::mousePressEvent(QMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + m_mouseClick = true; + + DRadioButton::mousePressEvent(event); +} + +void TitleStyleRadioButton::keyPressEvent(QKeyEvent *event) +{ + //增加设置按键捕获,让单选按钮在键盘操作下同样支持enter键盘控制作为选中操作,原生已经支持空格键作为选中操作 + if ((Qt::Key_Return == event->key()) || (Qt::Key_Enter == event->key())) + setChecked(true); + + DRadioButton::keyPressEvent(event); +} + + +ColorPushButton::ColorPushButton(QWidget *parent): DPushButton(parent) +{ + setFocusPolicy(Qt::TabFocus); +} + +void ColorPushButton::setBackGroundColor(const QColor &color) +{ + m_color = color; + update(); +} + +QColor ColorPushButton::getBackGroundColor() +{ + return m_color; +} + +void ColorPushButton::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + + QPainter painter(this); + //去锯齿 + painter.setRenderHint(QPainter::Antialiasing, true); + painter.setOpacity(1); + + QColor borderColor; + if (DApplicationHelper::LightType == DApplicationHelper::instance()->themeType()) + borderColor = QColor::fromRgb(0, 0, 0, static_cast(255 * 0.05)); + else + borderColor = QColor::fromRgb(255, 255, 255, static_cast(255 * 0.2)); + + //绘制背景色,边框 + { + QPainterPath path; + path.addRoundedRect(QRectF(3, 3, 28, 28), 8, 8); + painter.fillPath(path, QColor(m_color)); + painter.fillPath(path, borderColor); + } + { + QPainterPath path; + path.addRoundedRect(QRectF(4, 4, 26, 26), 7, 7); + painter.fillPath(path, QColor(m_color)); + } + + //tab焦点存在,绘制边框 + if (m_isFocus) { + //边框绘制路径 + QPainterPath pathFrame; + pathFrame.addRoundedRect(QRectF(1, 1, 32, 32), 8, 8); + + //绘画边框 + QPen framePen; + DPalette pax = DApplicationHelper::instance()->palette(this); + //获取活动色 + framePen = QPen(pax.color(DPalette::Highlight), 2); + painter.setPen(framePen); + painter.drawPath(pathFrame); + } +} + +void ColorPushButton::focusInEvent(QFocusEvent *event) +{ + // 焦点入 + if ((Qt::TabFocusReason == event->reason()) || (Qt::BacktabFocusReason == event->reason())) { + m_isFocus = true; + } else if ((Qt::ActiveWindowFocusReason == event->reason()) && m_isFocus) { + //取色面板退出时,是否仍然保留选中焦点,如果是键盘控制的情况,仍然保持保持焦点的状态 + m_isFocus = true; + } else { + //除了键盘操作的其他情况,都不保持焦点状态 + m_isFocus = false; + } + DPushButton::focusInEvent(event); +} + +void ColorPushButton::focusOutEvent(QFocusEvent *event) +{ + // 焦点Tab出 + if ((Qt::TabFocusReason == event->reason()) || (Qt::BacktabFocusReason == event->reason())) { + qInfo() << "ColorPushButton::focusOutEvent-------163" ; + m_isFocus = false; + } + DPushButton::focusOutEvent(event); +} + +void ColorPushButton::keyPressEvent(QKeyEvent *event) +{ + if ((Qt::Key_Return == event->key()) || (Qt::Key_Enter == event->key())) + m_isFocus = true; + + DPushButton::keyPressEvent(event); +} + +void ColorPushButton::mousePressEvent(QMouseEvent *event) +{ + emit clearFocussSignal(); + DPushButton::mousePressEvent(event); +} + +CustomThemeSettingDialog::CustomThemeSettingDialog(QWidget *parent) : DAbstractDialog(parent) + , m_themePreviewArea(new ThemePreviewArea) + , m_titleStyleButtonGroup(new QButtonGroup(this)) + , m_foregroundButton(new ColorPushButton(this)) + , m_backgroundButton(new ColorPushButton(this)) + , m_ps1Button(new ColorPushButton(this)) + , m_ps2Button(new ColorPushButton(this)) +{ + this->setWindowFlags(Qt::FramelessWindowHint); + this->setAttribute(Qt::WA_TranslucentBackground); + initUITitle(); + initUI(); + initTitleConnections(); + setFixedSize(459, 378); +} + +void CustomThemeSettingDialog::initUITitle() +{ + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->setSpacing(0); + mainLayout->setContentsMargins(0, 0, 0, 11); + + QHBoxLayout *titleLayout = new QHBoxLayout(); + titleLayout->setSpacing(0); + titleLayout->setContentsMargins(0, 0, 0, 0); + + m_titleBar = new QWidget(this); + m_titleBar->setFixedHeight(50); + m_titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + m_titleBar->setLayout(titleLayout); + + m_logoIcon = new DLabel(this); + m_logoIcon->setFixedSize(QSize(50, 50)); + m_logoIcon->setFocusPolicy(Qt::NoFocus); + m_logoIcon->setAttribute(Qt::WA_TransparentForMouseEvents); + + m_closeButton = new DWindowCloseButton(this); + m_closeButton->setFocusPolicy(Qt::TabFocus); + m_closeButton->setIconSize(QSize(50, 50)); + + m_titleText = new DLabel(this); + m_titleText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + m_titleText->setAlignment(Qt::AlignCenter); + DFontSizeManager::instance()->bind(m_titleText, DFontSizeManager::T6, QFont::Medium); + // 字色 + DPalette palette = m_titleText->palette(); + QColor color; + if (DApplicationHelper::DarkType == DApplicationHelper::instance()->themeType()) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleText->setPalette(palette); + + titleLayout->addWidget(m_logoIcon, 0, Qt::AlignLeft | Qt::AlignVCenter); + titleLayout->addWidget(m_titleText, 0, Qt::AlignHCenter | Qt::AlignVCenter); + titleLayout->addWidget(m_closeButton, 0, Qt::AlignRight | Qt::AlignTop); + + //Dialog content + m_contentLayout = new QVBoxLayout(); + m_contentLayout->setSpacing(0); + m_contentLayout->setContentsMargins(0, 0, 0, 0); + + m_content = new QWidget(this); + m_content->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_content->setLayout(m_contentLayout); + + mainLayout->addWidget(m_titleBar, 0, Qt::AlignTop); + mainLayout->addWidget(m_content); + setLayout(mainLayout); + + m_titleText->setText(tr("Custom Theme")); + + m_mainLayout = mainLayout; +} + +void CustomThemeSettingDialog::initUI() +{ + QWidget *contentFrame = new QWidget; + + QVBoxLayout *contentLayout = new QVBoxLayout; + contentLayout->setSpacing(0); + contentLayout->setContentsMargins(10, 0, 10, 0); + + QHBoxLayout *themePreviewAreatLayout = new QHBoxLayout; + themePreviewAreatLayout->setSpacing(0); + themePreviewAreatLayout->setContentsMargins(0, 0, 0, 0); + m_themePreviewArea->setLayout(themePreviewAreatLayout); + + QWidget *titleStyleFrame = new QWidget; + QHBoxLayout *titleStyleLayout = new QHBoxLayout; + titleStyleLayout->setSpacing(0); + titleStyleLayout->setContentsMargins(0, 0, 0, 0); + titleStyleFrame->setLayout(titleStyleLayout); + + DLabel *titleStyleLabel = new DLabel(tr("Style:")); + DFontSizeManager::instance()->bind(titleStyleLabel, DFontSizeManager::T6, QFont::Normal); + titleStyleLabel->setFixedWidth(90); + + m_lightRadioButton = new TitleStyleRadioButton(tr("Light")); + DFontSizeManager::instance()->bind(m_lightRadioButton, DFontSizeManager::T6, QFont::Normal); + //单选框只设置长度限制,不做高度限制,否则最新dtk选中框容易出现截断 + m_lightRadioButton->setFixedWidth(74); + + m_darkRadioButton = new TitleStyleRadioButton(tr("Dark")); + DFontSizeManager::instance()->bind(m_darkRadioButton, DFontSizeManager::T6, QFont::Normal); + //单选框只设置长度限制,不做高度限制,否则最新dtk选中框容易出现截断 + m_darkRadioButton->setFixedWidth(74); + + m_darkRadioButton->setFocusPolicy(Qt::TabFocus); + m_lightRadioButton->setFocusPolicy(Qt::TabFocus); + m_foregroundButton->setFocusPolicy(Qt::TabFocus); + m_backgroundButton->setFocusPolicy(Qt::TabFocus); + + //将浅色标题风格单选按钮放入单选按钮分组中 + m_titleStyleButtonGroup->addButton(m_lightRadioButton); + //将深色标题风格单选按钮放入单选按钮分组中 + m_titleStyleButtonGroup->addButton(m_darkRadioButton); + + + connect(m_darkRadioButton, &DRadioButton::toggled, this, [ = ]() { + if (m_darkRadioButton->isChecked()) + m_themePreviewArea->setTitleStyle("Dark"); + }); + connect(m_lightRadioButton, &DRadioButton::toggled, this, [ = ]() { + if (m_lightRadioButton->isChecked()) + m_themePreviewArea->setTitleStyle("Light"); + }); + //鼠标点击单选按钮时清除tab键盘控制的焦点 + connect(m_darkRadioButton, &DRadioButton::clicked, this, [ = ]() { + TitleStyleRadioButton *radioButton = qobject_cast(sender()); + if (radioButton && radioButton->m_mouseClick) { + clearFocussSlot(); + radioButton->m_mouseClick = false; + } + }); + //鼠标点击单选按钮时清除tab键盘控制的焦点 + connect(m_lightRadioButton, &DRadioButton::clicked, this, [ = ]() { + TitleStyleRadioButton *radioButton = qobject_cast(sender()); + if (radioButton && radioButton->m_mouseClick) { + clearFocussSlot(); + radioButton->m_mouseClick = false; + } + }); + + titleStyleLayout->addWidget(titleStyleLabel); + titleStyleLayout->addSpacing(30); + titleStyleLayout->addWidget(m_lightRadioButton); + titleStyleLayout->addSpacing(24); + titleStyleLayout->addWidget(m_darkRadioButton); + titleStyleLayout->addStretch(); + + // + QWidget *foregroundAndBackgroundFrame = new QWidget; + QHBoxLayout *foregroundAndBackgroundLayout = new QHBoxLayout; + foregroundAndBackgroundLayout->setContentsMargins(0, 0, 0, 0); + foregroundAndBackgroundFrame->setLayout(foregroundAndBackgroundLayout); + + m_foregroundColorLabel = new DLabel(tr("Fore color:")); + DFontSizeManager::instance()->bind(m_foregroundColorLabel, DFontSizeManager::T6, QFont::Normal); + m_foregroundColorLabel->setFixedWidth(114); + + m_foregroundButton->setFixedSize(34, 34); + + + m_backgroundColorLabel = new DLabel(tr("Back color:")); + DFontSizeManager::instance()->bind(m_backgroundColorLabel, DFontSizeManager::T6, QFont::Normal); + m_backgroundColorLabel->setFixedWidth(114); + m_backgroundButton->setFixedSize(34, 34); + + foregroundAndBackgroundLayout->addWidget(m_foregroundColorLabel); + foregroundAndBackgroundLayout->addWidget(m_foregroundButton); + foregroundAndBackgroundLayout->addSpacing(62); + foregroundAndBackgroundLayout->addWidget(m_backgroundColorLabel); + foregroundAndBackgroundLayout->addWidget(m_backgroundButton); + foregroundAndBackgroundLayout->addStretch(); + + // + QWidget *ps1AndPs2Frame = new QWidget; + QHBoxLayout *ps1AndPs2Layout = new QHBoxLayout; + ps1AndPs2Layout->setContentsMargins(0, 0, 0, 0); + ps1AndPs2Frame->setLayout(ps1AndPs2Layout); + + m_ps1ColorLabel = new DLabel(tr("Prompt PS1:")); + DFontSizeManager::instance()->bind(m_ps1ColorLabel, DFontSizeManager::T6, QFont::Normal); + m_ps1ColorLabel->setFixedWidth(114); + m_ps1Button->setFixedSize(34, 34); + m_ps2ColorLabel = new DLabel(tr("Prompt PS2:")); + DFontSizeManager::instance()->bind(m_ps2ColorLabel, DFontSizeManager::T6, QFont::Normal); + m_ps2ColorLabel->setFixedWidth(114); + m_ps2Button->setFixedSize(34, 34); + + ps1AndPs2Layout->addWidget(m_ps1ColorLabel); + ps1AndPs2Layout->addWidget(m_ps1Button); + ps1AndPs2Layout->addSpacing(62); + ps1AndPs2Layout->addWidget(m_ps2ColorLabel); + ps1AndPs2Layout->addWidget(m_ps2Button); + ps1AndPs2Layout->addStretch(); + + contentLayout->addSpacing(14); + contentLayout->addWidget(m_themePreviewArea); + contentLayout->addSpacing(28); + contentLayout->addWidget(titleStyleFrame); + contentLayout->addSpacing(12); + contentLayout->addWidget(foregroundAndBackgroundFrame); + contentLayout->addSpacing(14); + contentLayout->addWidget(ps1AndPs2Frame); + contentLayout->addSpacing(18); + + contentFrame->setLayout(contentLayout); + m_contentLayout->addWidget(contentFrame); + addCancelConfirmButtons(); + + connect(m_foregroundButton, &DPushButton::clicked, this, &CustomThemeSettingDialog::onSelectColor); + connect(m_backgroundButton, &DPushButton::clicked, this, &CustomThemeSettingDialog::onSelectColor); + connect(m_ps1Button, &DPushButton::clicked, this, &CustomThemeSettingDialog::onSelectColor); + connect(m_ps2Button, &DPushButton::clicked, this, &CustomThemeSettingDialog::onSelectColor); + + connect(m_foregroundButton, &ColorPushButton::clearFocussSignal, this, &CustomThemeSettingDialog::clearFocussSlot); + connect(m_backgroundButton, &ColorPushButton::clearFocussSignal, this, &CustomThemeSettingDialog::clearFocussSlot); + connect(m_ps1Button, &ColorPushButton::clearFocussSignal, this, &CustomThemeSettingDialog::clearFocussSlot); + connect(m_ps2Button, &ColorPushButton::clearFocussSignal, this, &CustomThemeSettingDialog::clearFocussSlot); + + loadConfiguration(); +} + +void CustomThemeSettingDialog::initTitleConnections() +{ + connect(m_closeButton, &DWindowCloseButton::clicked, this, [this]() { + loadConfiguration(); + reject(); + }); + // 字体颜色随主题变化变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, m_titleText, [ = ](DGuiApplicationHelper::ColorType themeType) { + DPalette palette = m_titleText->palette(); + QColor color; + if (DApplicationHelper::DarkType == themeType) + color = QColor::fromRgb(192, 198, 212, 255); + else + color = QColor::fromRgb(0, 26, 46, 255); + + palette.setBrush(QPalette::WindowText, color); + m_titleText->setPalette(palette); + }); +} + +void CustomThemeSettingDialog::addCancelConfirmButtons() +{ + QHBoxLayout *buttonsLayout = new QHBoxLayout(); + buttonsLayout->setSpacing(9); + buttonsLayout->setContentsMargins(10, 0, 10, 0); + + QFont btnFont; + m_cancelBtn = new DPushButton(this); + m_cancelBtn->setFixedWidth(209); + m_cancelBtn->setFixedHeight(36); + m_cancelBtn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_cancelBtn->setFont(btnFont); + m_cancelBtn->setText(tr("Cancel", "button")); + Utils::setSpaceInWord(m_cancelBtn); + + m_confirmBtn = new DSuggestButton(this); + m_confirmBtn->setFixedWidth(209); + m_confirmBtn->setFixedHeight(36); + m_confirmBtn->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_confirmBtn->setFont(btnFont); + m_confirmBtn->setText(tr("Confirm", "button")); + Utils::setSpaceInWord(m_confirmBtn); + + m_cancelBtn->setFocusPolicy(Qt::TabFocus); + m_confirmBtn->setFocusPolicy(Qt::TabFocus); + + //设置回车键默认响应的按钮 + m_confirmBtn->setDefault(true); + + setTabOrder(m_confirmBtn, m_closeButton);//设置右上角关闭按钮的tab键控制顺序 + + DVerticalLine *verticalLine = new DVerticalLine(this); + DPalette pa = DApplicationHelper::instance()->palette(verticalLine); + QColor splitColor = pa.color(DPalette::ItemBackground); + pa.setBrush(DPalette::Background, splitColor); + verticalLine->setPalette(pa); + verticalLine->setBackgroundRole(QPalette::Background); + verticalLine->setAutoFillBackground(true); + verticalLine->setFixedSize(3, 28); + + buttonsLayout->addWidget(m_cancelBtn); + buttonsLayout->addWidget(verticalLine); + buttonsLayout->addWidget(m_confirmBtn); + m_confirmBtn->setDefault(true); + + m_mainLayout->addLayout(buttonsLayout); + + connect(m_cancelBtn, &DPushButton::clicked, this, [ = ]() { + m_confirmBtn->setFocus(); + qInfo() << "------------reject()-------------"; + loadConfiguration(); + reject(); + }); + connect(m_confirmBtn, &DSuggestButton::clicked, this, [ = ]() { + //重置单选按钮的tab焦点状态 + resetFocusState(); + + m_confirmBtn->setFocus(); + + if (m_darkRadioButton->isChecked()) + Settings::instance()->themeSetting->setValue("CustomTheme/TitleStyle", "Dark"); + else + Settings::instance()->themeSetting->setValue("CustomTheme/TitleStyle", "Light"); + + Settings::instance()->themeSetting->setValue("Foreground/Color", Settings::instance()->color2str(m_foregroundButton->getBackGroundColor())); + Settings::instance()->themeSetting->setValue("Background/Color", Settings::instance()->color2str(m_backgroundButton->getBackGroundColor())); + //仅仅修改参数 "Color2Intense/Color"与"Color4Intense/Color"为了保证python脚本取色RGB正常显示使用的固定不变,跟终端的所有主题都保持一致。此处代码暂时保留 + //Settings::instance()->themeSetting->setValue("Color2/Color", Settings::instance()->color2str(m_ps1Button->getBackGroundColor())); + Settings::instance()->themeSetting->setValue("Color2Intense/Color", Settings::instance()->color2str(m_ps1Button->getBackGroundColor())); + //Settings::instance()->themeSetting->setValue("Color4/Color", Settings::instance()->color2str(m_ps2Button->getBackGroundColor())); + Settings::instance()->themeSetting->setValue("Color4Intense/Color", Settings::instance()->color2str(m_ps2Button->getBackGroundColor())); + + Settings::instance()->m_customThemeModify = true; + accept(); + }); + +} + +void CustomThemeSettingDialog::onSelectColor() +{ + ColorPushButton *pushButton = qobject_cast(sender()); + if (pushButton) { + QColor newColor = DColorDialog::getColor(pushButton->getBackGroundColor(), this); + if (newColor.isValid()) { + pushButton->setBackGroundColor(newColor); + if (pushButton == m_foregroundButton) + m_themePreviewArea->setForegroundgroundColor(newColor); + + if (pushButton == m_backgroundButton) + m_themePreviewArea->setBackgroundColor(newColor); + + if (pushButton == m_ps1Button) + m_themePreviewArea->setPs1Color(newColor); + + if (pushButton == m_ps2Button) + m_themePreviewArea->setPs2Color(newColor); + } + } +} + +void CustomThemeSettingDialog::clearFocussSlot() +{ + m_closeButton->clearFocus(); + m_darkRadioButton->clearFocus(); + m_lightRadioButton->clearFocus(); + m_foregroundButton->clearFocus(); + m_backgroundButton->clearFocus(); + m_ps1Button->clearFocus(); + m_ps2Button->clearFocus(); + m_cancelBtn->clearFocus(); + m_confirmBtn->clearFocus(); + + m_foregroundButton->m_isFocus = false; + m_backgroundButton->m_isFocus = false; + m_ps1Button->m_isFocus = false; + m_ps2Button->m_isFocus = false; + + m_logoIcon->setFocus(); +} + +void CustomThemeSettingDialog::loadConfiguration() +{ + //重置单选按钮的tab焦点状态 + resetFocusState(); + + if ("Light" == Settings::instance()->themeSetting->value("CustomTheme/TitleStyle")) + m_lightRadioButton->setChecked(true); + else + m_darkRadioButton->setChecked(true); + + QColor foregroundColorParameter; + QSettings themeSetting(Settings::instance()->m_configCustomThemePath, QSettings::IniFormat); + QPalette palette; + QStringList strList = Settings::instance()->themeSetting->value("Foreground/Color").toStringList(); + + if (strList.size() != 3) { + qInfo() << "strList.size()!=3"; + palette.setColor(QPalette::Background, QColor(0, 255, 0)); + foregroundColorParameter = QColor(0, 255, 0); + } else { + palette.setColor(QPalette::Background, QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt())); + qInfo() << strList[0] << strList[1] << strList[2]; + foregroundColorParameter = QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt()); + } + m_foregroundButton->setBackGroundColor(foregroundColorParameter); + + QColor backgroundColorParameter; + strList.clear(); + strList = Settings::instance()->themeSetting->value("Background/Color").toStringList(); + if (strList.size() != 3) { + qInfo() << "strList.size()!=3"; + palette.setColor(QPalette::Background, QColor(37, 37, 37)); + backgroundColorParameter = QColor(37, 37, 37); + } else { + palette.setColor(QPalette::Background, QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt())); + backgroundColorParameter = QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt()); + } + m_backgroundButton->setBackGroundColor(backgroundColorParameter); + + QColor ps1ColorParameter; + strList.clear(); + strList = Settings::instance()->themeSetting->value("Color2Intense/Color").toStringList(); + if (strList.size() != 3) { + qInfo() << "strList.size()!=3"; + palette.setColor(QPalette::Background, QColor(133, 153, 0)); + ps1ColorParameter = QColor(133, 153, 0); + } else { + palette.setColor(QPalette::Background, QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt())); + ps1ColorParameter = QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt()); + } + m_ps1Button->setBackGroundColor(ps1ColorParameter); + + QColor ps2ColorParameter; + strList.clear(); + strList = Settings::instance()->themeSetting->value("Color4Intense/Color").toStringList(); + if (strList.size() != 3) { + qInfo() << "strList.size()!=3"; + palette.setColor(QPalette::Background, QColor(52, 101, 164)); + ps2ColorParameter = QColor(52, 101, 164); + } else { + palette.setColor(QPalette::Background, QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt())); + ps2ColorParameter = QColor(strList[0].toInt(), strList[1].toInt(), strList[2].toInt()); + } + m_ps2Button->setBackGroundColor(ps2ColorParameter); + + m_themePreviewArea->setAllColorParameter(foregroundColorParameter, backgroundColorParameter, ps1ColorParameter, ps2ColorParameter); +} + +void CustomThemeSettingDialog::keyPressEvent(QKeyEvent *event) +{ + if (Qt::Key_Escape == event->key()) { + loadConfiguration(); + reject(); + } +} + +void CustomThemeSettingDialog::showEvent(QShowEvent *event) +{ + clearFocussSlot(); + DAbstractDialog::showEvent(event); +} + +void CustomThemeSettingDialog::resetFocusState() +{ + m_darkRadioButton->setFocusPolicy(Qt::NoFocus); + m_darkRadioButton->setFocusPolicy(Qt::TabFocus); + m_lightRadioButton->setFocus(); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/views/customthemesettingdialog.h deepin-terminal-5.4.13/src/views/customthemesettingdialog.h --- deepin-terminal-5.0.0+ds1/src/views/customthemesettingdialog.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/customthemesettingdialog.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,271 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#ifndef CUSTOMTHEMESETTINGDIALOG_H +#define CUSTOMTHEMESETTINGDIALOG_H + +#include "themepreviewarea.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: TitleStyleRadioButton + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 主题风格单选按钮类 +*******************************************************************************/ +class TitleStyleRadioButton: public DRadioButton +{ + Q_OBJECT +public: + explicit TitleStyleRadioButton(const QString &text, QWidget *parent = nullptr); +protected: + /** + * @brief 设置背景色 + * @author ut000125 sunchengxi + * @param event 鼠标按下事件 + */ + void mousePressEvent(QMouseEvent *event) override; + /** + * @brief 按键按下事件 + * @author ut000125 sunchengxi + * @param event 按键按下事件 + */ + void keyPressEvent(QKeyEvent *event) override; +public: + //鼠标操作标志位 + bool m_mouseClick = false; +}; + +/******************************************************************************* + 1. @类名: ColorPushButton + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 带背景色按钮类 +*******************************************************************************/ +class ColorPushButton: public DPushButton +{ + Q_OBJECT +public: + /** + * @brief 构造函数初始化 + * @author ut000125 sunchengxi + * @param parent + */ + explicit ColorPushButton(QWidget *parent = nullptr); + /** + * @brief 设置背景色 + * @author ut000125 sunchengxi + * @param color 颜色 + */ + void setBackGroundColor(const QColor &color); + /** + * @brief 获取背景色 + * @author ut000125 sunchengxi + * @return + */ + QColor getBackGroundColor(); + +signals: + //清理按钮焦点信号 + void clearFocussSignal(); + +protected: + /** + * @brief 处理重绘事件 + * @anchor ut000125 sunchengxi + * @param event 重绘事件 + */ + void paintEvent(QPaintEvent *event) override; + /** + * @brief 焦点进入事件 + * @author ut000125 sunchengxi + * @param event 事件 + */ + void focusInEvent(QFocusEvent *event) override; + //焦点离开事件 + /******************************************************************************* + 1. @函数: focusOutEvent + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 焦点离开事件 + *******************************************************************************/ + /** + * @brief 焦点离开事件 + * @author ut000125 sunchengxi + * @param event 事件 + */ + void focusOutEvent(QFocusEvent *event) override; + /** + * @brief 按键按下事件 + * @author ut000125 sunchengxi + * @param event 事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 鼠标按下事件 + * @author ut000125 sunchengxi + * @param event 事件 + */ + void mousePressEvent(QMouseEvent *event) override; +public: + //背景色 + QColor m_color; + //焦点是否在 用于背景和边框 + bool m_isFocus = false; + +}; + +/******************************************************************************* + 1. @类名: CustomThemeSettingDialog + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 自定义主题设置对话框类 +*******************************************************************************/ +class CustomThemeSettingDialog : public DAbstractDialog +{ + Q_OBJECT +public: + explicit CustomThemeSettingDialog(QWidget *parent = nullptr); + /** + * @brief 重置单选按钮的tab焦点状态,保证每次打开时,第一个单选按钮是tab键盘控制的选中按钮 + * @author ut000125 sunchengxi + */ + void resetFocusState(); + +protected: + /** + * @brief 标题栏初始化 + * @author ut000125 sunchengxi + */ + void initUITitle(); + /** + * @brief 工作区初始化 + * @author ut000125 sunchengxi + */ + void initUI(); + /** + * @brief 标题栏初始化信号槽 + * @author ut000125 sunchengxi + */ + void initTitleConnections(); + /** + * @brief 增加确认取消按钮 + * @author ut000125 sunchengxi + */ + void addCancelConfirmButtons(); + /** + * @brief 加载主题配置 + * @author ut000125 sunchengxi + */ + void loadConfiguration(); + /** + * @brief 键盘事件 + * @author ut000125 sunchengxi + * @param 事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 显示事件 + * @author ut000125 sunchengxi + * @param 事件 + */ + void showEvent(QShowEvent *event) override; + +public slots: + /** + * @brief 选择配色槽 + * @author ut000125 sunchengxi + */ + void onSelectColor(); + /** + * @brief 清理按钮焦点槽 + * @author ut000125 sunchengxi + */ + void clearFocussSlot(); + +private: + //标题栏 + QWidget *m_titleBar = nullptr; + //用于标题布局占位的label + DLabel *m_logoIcon = nullptr; + //标题的文本label + DLabel *m_titleText = nullptr; + //标题栏里的关闭按钮 + DWindowCloseButton *m_closeButton = nullptr; + //自定义配色框的工作区 + QWidget *m_content = nullptr; + //自定义配色框的工作区布局 + QVBoxLayout *m_contentLayout = nullptr; + //自定义配色框整体布局 + QVBoxLayout *m_mainLayout = nullptr; + //取消按钮 + DPushButton *m_cancelBtn = nullptr; + //确认按钮 + DSuggestButton *m_confirmBtn = nullptr; + //预览区域 + ThemePreviewArea *m_themePreviewArea = nullptr; + //深色主题风格单选按钮 + TitleStyleRadioButton *m_darkRadioButton = nullptr; + //浅色主题风格单选按钮 + TitleStyleRadioButton *m_lightRadioButton = nullptr; + //单选按钮组 + QButtonGroup *m_titleStyleButtonGroup = nullptr; + //前景色标签 + DLabel *m_foregroundColorLabel = nullptr; + //前景色按钮 + ColorPushButton *m_foregroundButton = nullptr; + //背景色标签 + DLabel *m_backgroundColorLabel = nullptr; + //背景色按钮 + ColorPushButton *m_backgroundButton = nullptr; + //提示符PS1标签 + DLabel *m_ps1ColorLabel = nullptr; + //提示符PS1按钮 + ColorPushButton *m_ps1Button = nullptr; + //提示符PS2标签 + DLabel *m_ps2ColorLabel = nullptr; + //提示符PS2按钮 + ColorPushButton *m_ps2Button = nullptr; + +}; + +#endif // CUSTOMTHEMESETTINGDIALOG_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/focusframe.cpp deepin-terminal-5.4.13/src/views/focusframe.cpp --- deepin-terminal-5.0.0+ds1/src/views/focusframe.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/focusframe.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "focusframe.h" + +//dtk +#include +#include + +// qt +#include +#include +#include +#include + +FocusFrame::FocusFrame(QWidget *parent) + : DFrame(parent) +{ + // 先用Tab做上下键的替代,走流程 + setFocusPolicy(Qt::TabFocus); +} + + +void FocusFrame::paintEvent(QPaintEvent *event) +{ + QPainter painter(this); + DPalette pa = DApplicationHelper::instance()->palette(this); + DPalette::ColorType backgroundType = static_cast(getBackgroudColorRole()); + // 去锯齿 + painter.setRenderHint(QPainter::SmoothPixmapTransform, true); + painter.setRenderHint(QPainter::Antialiasing); + // 焦点若在,则画边框 + if (m_isFocus) { + // 边框 + QPainterPath FramePath; + paintRoundedRect(FramePath, QRect(2, 2, 218, 58)); + // 获取活动色 + QPen pen(pa.color(DPalette::Highlight), 2); + painter.setPen(pen); + // 绘制边框 + painter.drawPath(FramePath); + + // 绘制背景 + QPainterPath itemBackgroudPath; + paintRoundedRect(itemBackgroudPath, QRect(4, 4, 214, 54)); + // 产品要有悬浮效果的 + // painter.fillPath(itemBackgroudPath, QBrush(pa.color(DPalette::ObviousBackground))); + // ui要有框,背景不变 + painter.fillPath(itemBackgroudPath, QBrush(pa.color(backgroundType))); + } else { + // 焦点不在,不绘制 + // 绘制背景 + QPainterPath itemBackgroudPath; + paintRoundedRect(itemBackgroudPath, QRect(0, 0, 220, 60)); + // 产品要有悬浮效果的 + // painter.fillPath(itemBackgroudPath, QBrush(pa.color(DPalette::ObviousBackground))); + // ui要有框,背景不变 + painter.fillPath(itemBackgroudPath, QBrush(pa.color(backgroundType))); + } + painter.end(); + event->ignore(); +} + +void FocusFrame::enterEvent(QEvent *event) +{ + // 鼠标进入 + m_isHover = true; + // 背景色 0.1 + setBackgroundRole(DPalette::ObviousBackground); + setAutoFillBackground(false); + + DFrame::enterEvent(event); +} + +void FocusFrame::leaveEvent(QEvent *event) +{ + // 鼠标出 + m_isHover = false; + // 背景色 0.02 + setBackgroundRole(DPalette::ItemBackground); + setAutoFillBackground(false); + + DFrame::leaveEvent(event); +} + +void FocusFrame::focusInEvent(QFocusEvent *event) +{ + // 焦点入 + m_isFocus = true; + DFrame::focusInEvent(event); +} + +void FocusFrame::focusOutEvent(QFocusEvent *event) +{ + // 焦点Tab出 + m_isFocus = false; + DFrame::focusOutEvent(event); +} + +void FocusFrame::paintRoundedRect(QPainterPath &path, const QRect &background) +{ + // 这两个参数调整可以调整圆角 + int cornerSize = 16; + int arcRadius = 8; + // 圆角矩形画边 + path.moveTo(background.left() + arcRadius, background.top()); + path.arcTo(background.left(), background.top(), cornerSize, cornerSize, 90.0, 90.0); + path.lineTo(background.left(), background.bottom() - arcRadius); + path.arcTo(background.left(), background.bottom() - cornerSize, cornerSize, cornerSize, 180.0, 90.0); + path.lineTo(background.right() - arcRadius, background.bottom()); + path.arcTo(background.right() - cornerSize, background.bottom() - cornerSize, cornerSize, cornerSize, 270.0, 90.0); + path.lineTo(background.right(), background.top() + arcRadius); + path.arcTo(background.right() - cornerSize, background.top(), cornerSize, cornerSize, 0.0, 90.0); + path.lineTo(background.left() + arcRadius, background.top()); +} + +int FocusFrame::getBackgroudColorRole() +{ + if (m_isHover) { + // 鼠标悬浮 返回背景色 0.1 + return DPalette::ObviousBackground; + } + + // 鼠标不悬浮 返回背景色 0.02 + return DPalette::ItemBackground; +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/focusframe.h deepin-terminal-5.4.13/src/views/focusframe.h --- deepin-terminal-5.0.0+ds1/src/views/focusframe.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/focusframe.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: FocusFrame + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 有选中效果的Frame + 提供带边框的Frame,圆角效果比DFrame好一点 + 主要处理焦点和悬浮时Frame的边框和背景色 +*******************************************************************************/ +#ifndef FOCUSFRAME_H +#define FOCUSFRAME_H +// dtk +#include +#include + +// qt +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +class FocusFrame : public DFrame +{ + Q_OBJECT +public: + explicit FocusFrame(QWidget *parent = nullptr); + // 鼠标是否悬浮 + bool m_isHover = false; + +protected: + /** + * @brief 处理重绘事件,绘制圆角和边框 + * @author ut000610 戴正文 + * @param event + */ + void paintEvent(QPaintEvent *event) override; + /** + * @brief 鼠标进入,显示DPalette::ObviousBackground背景色 + * @author ut000610 戴正文 + * @param event 事件 + */ + void enterEvent(QEvent *event) override; + + /** + * @brief 鼠标移除,显示DPalette::ItemBackground背景色 + * @author ut000610 戴正文 + * @param event 事件 + */ + void leaveEvent(QEvent *event) override; + /** + * @brief 焦点进入 + * @author ut000610 戴正文 + * @param event 事件 + */ + void focusInEvent(QFocusEvent *event) override; + /** + * @brief 焦点移除 + * @author ut000610 戴正文 + * @param event 事件 + */ + void focusOutEvent(QFocusEvent *event) override; + +private: + // 焦点是否在 用于背景和边框 + bool m_isFocus = false; + /** + * @brief 画一个圆角矩形,根据矩形大小 => 获取圆角矩形 + * @author ut000610 戴正文 + * @param path 路径 + * @param background 背景 + */ + void paintRoundedRect(QPainterPath &path, const QRect &background); + /** + * @brief 根据是否悬浮和是否被选中,判断界面的背景色 + * @author ut000610 戴正文 + * @return + */ + int getBackgroudColorRole(); +}; + +#endif // FOCUSFRAME_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/iconbutton.cpp deepin-terminal-5.4.13/src/views/iconbutton.cpp --- deepin-terminal-5.0.0+ds1/src/views/iconbutton.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/iconbutton.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "iconbutton.h" +#include "utils.h" + +//qt +#include + +IconButton::IconButton(QWidget *parent) + : DIconButton(parent) +{ + Utils::set_Object_Name(this); +} + +void IconButton::keyPressEvent(QKeyEvent *event) +{ + // 不处理向右的事件 + switch (event->key()) { + case Qt::Key_Right: + case Qt::Key_Up: + case Qt::Key_Down: + event->ignore(); + break; + case Qt::Key_Left: + emit preFocus(); + break; + default: + DIconButton::keyPressEvent(event); + break; + } +} + +void IconButton::focusOutEvent(QFocusEvent *event) +{ + qInfo() << event->reason() << "IconButton" << this; + emit focusOut(event->reason()); + DIconButton::focusOutEvent(event); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/iconbutton.h deepin-terminal-5.4.13/src/views/iconbutton.h --- deepin-terminal-5.0.0+ds1/src/views/iconbutton.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/iconbutton.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: IconButton + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 图标控件 + 对DIconButton的键盘事件进行重写 + 1)支持上下左右功能键点击事件的信号传出 + 2)支持回车键的点击事件信号传出 + 这些信号可供别的控件进行相应的事件处理 +*******************************************************************************/ +#ifndef ICONBUTTON_H +#define ICONBUTTON_H +// dtk +#include + +// qt +#include +#include + +DWIDGET_USE_NAMESPACE + +class IconButton : public DIconButton +{ + Q_OBJECT +public: + explicit IconButton(QWidget *parent = nullptr); + +signals: + // 焦点交给前一个 + void preFocus(); + // 焦点出 + void focusOut(Qt::FocusReason type); + // 被键盘点击 + void keyPressClicked(); + +protected: + /** + * @brief 键盘事件处理右键点击事件 + * @author ut000610 戴正文 + * @param event 右键点击事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 焦点切出 + * @author ut000610 戴正文 + * @param event 焦点移出事件 + */ + void focusOutEvent(QFocusEvent *event) override; +}; + +#endif // ICONBUTTON_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/itemwidget.cpp deepin-terminal-5.4.13/src/views/itemwidget.cpp --- deepin-terminal-5.0.0+ds1/src/views/itemwidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/itemwidget.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,561 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "itemwidget.h" +#include "serverconfigmanager.h" +#include "utils.h" +#include "iconbutton.h" + +// dtk + +// qt +#include +#include + +// 需要选择Item类型 +ItemWidget::ItemWidget(ItemFuncType itemType, QWidget *parent) + : FocusFrame(parent) + , m_mainLayout(new QHBoxLayout(this)) + , m_iconLayout(new QVBoxLayout) + , m_textLayout(new QVBoxLayout) + , m_funcLayout(new QVBoxLayout) + , m_iconButton(new DIconButton(this)) + , m_firstline(new DLabel(this)) + , m_secondline(new DLabel(this)) + , m_funcButton(new IconButton(this)) + , m_functType(itemType) +{ + /******** Add by ut001000 renfeixiang 2020-08-13:增加 Begin***************/ + Utils::set_Object_Name(this); + m_mainLayout->setObjectName("ItemWidgetMainLayout"); + m_iconLayout->setObjectName("ItemWidgetIconLayout"); + m_textLayout->setObjectName("ItemWidgetTextLayout"); + m_funcLayout->setObjectName("ItemWidgetFuncLayout"); + m_iconButton->setObjectName("ItemWidgetIconButton"); + m_firstline->setObjectName("ItemWidgetFirstLineLabel"); + m_secondline->setObjectName("ItemWidgetSecondLineLabel"); + /******** Add by ut001000 renfeixiang 2020-08-13:增加 End***************/ + // 界面初始化 + initUI(); + // 信号槽初始化 + initConnections(); + + /***add begin by ut001121 zhangmeng 20200924 安装过滤器 修复BUG48618***/ + m_iconButton->installEventFilter(this); + m_funcButton->installEventFilter(this); + installEventFilter(this); + /***add end by ut001121***/ +} + +ItemWidget::~ItemWidget() +{ + if (nullptr != m_moveSource) { + delete m_moveSource; + m_moveSource = nullptr; + } +} + +void ItemWidget::setIcon(const QString &icon) +{ + m_iconButton->setIcon(QIcon::fromTheme(icon)); + m_iconButton->setIconSize(QSize(44, 44)); +} + +void ItemWidget::setFuncIcon(ItemFuncType iconType) +{ + // 统一设置大小 + m_funcButton->setIconSize(QSize(20, 20)); + switch (iconType) { + case ItemFuncType_Item: + m_funcButton->setIcon(QIcon::fromTheme("dt_edit")); + m_funcButton->hide(); + break; + case ItemFuncType_Group: + m_funcButton->setIcon(QIcon::fromTheme("dt_arrow_right")); + m_funcButton->show(); + break; + } + +} + +ItemFuncType ItemWidget::getFuncType() +{ + return m_functType; +} + +void ItemWidget::setText(const QString &firstline, const QString &secondline) +{ + // 第一行信息 唯一值 + m_firstText = firstline; + m_firstline->setText(firstline); + + // 第二行信息 + switch (m_functType) { + case ItemFuncType_Item: + // 输入的第二行信息 + m_secondText = secondline; + break; + case ItemFuncType_Group: + // 第二行 组内服务器个数 + int serverCount = ServerConfigManager::instance()->getServerCount(firstline); + if (serverCount <= 0) { + qInfo() << "get error count " << serverCount; + serverCount = 0; + } + m_secondText = QString("%1 server").arg(serverCount); + break; + } + // 设置第二行信息 + m_secondline->setText(m_secondText); +} + +const QString ItemWidget::getFirstText() +{ + return m_firstText; +} + +bool ItemWidget::isEqual(ItemFuncType type, const QString &key) +{ + // fistText是唯一值 + return ((type == m_functType) && (key == m_firstText)); +} + +void ItemWidget::getFocus() +{ + m_isFocus = true; + // 项显示功能键 + if (ItemFuncType_Item == m_functType) { + m_funcButton->show(); + m_funcButton->setFocus(); + qInfo() << "edit button show"; + } +} + +void ItemWidget::lostFocus() +{ + m_isFocus = false; + // 项影藏功能键 + if ((ItemFuncType_Item == m_functType) && (!m_isHover)) + m_funcButton->hide(); +} + +bool operator >(const ItemWidget &item1, const ItemWidget &item2) +{ + // item1 item2都是组 或 item1 item2 都不是组 + if (item1.m_functType == item2.m_functType) { + // 比较文字 + if (QString::compare(item1.m_firstText, item2.m_firstText) < 0) { + // 小于 0 例:ab bc + return true; + } else { + // 其他情况 + return false; + } + } else if (item1.m_functType > item2.m_functType) { + // item1 是组 1 item2不是 0 + return true; + } else { + // item1 不是组 0 item2是 1 + return false; + } +} + +bool operator <(const ItemWidget &item1, const ItemWidget &item2) +{ + return !(item1 > item2); +} + +void ItemWidget::onFuncButtonClicked() +{ + /***add begin by ut001121 zhangmeng 20200924 判断移动事件来源 修复BUG48618***/ + if (m_moveSource) { + m_moveSource = nullptr; + return ; + } + /***add end by ut001121***/ + + // 判断类型执行操作 + switch (m_functType) { + case ItemFuncType_Group: + // 显示分组 + qInfo() << "group show" << m_firstText; + // 第一个参数是分组名,第二个参数是当前是否有焦点 + emit groupClicked(m_firstText, m_isFocus); + break; + case ItemFuncType_Item: { + // 修改项 + qInfo() << "modify item" << m_firstText; + bool isFocusOn = false; + if (m_funcButton->hasFocus() || m_isFocus) { + // 焦点在大框或者编辑按钮上 + isFocusOn = true; + } + itemModify(m_firstText, isFocusOn); + } + break; + default: + break; + } +} + + +void ItemWidget::onIconButtonClicked() +{ + /***add begin by ut001121 zhangmeng 20200924 判断移动事件来源 修复BUG48618***/ + if (m_moveSource) { + m_moveSource = nullptr; + return ; + } + /***add end by ut001121***/ + + // 判断类型执行操作 + switch (m_functType) { + case ItemFuncType_Group: + // 显示分组 + qInfo() << "group show" << m_firstText; + // 第一个参数是分组名,第二个参数是当前是否有焦点 + emit groupClicked(m_firstText, m_isFocus); + break; + case ItemFuncType_Item: + // 项被点击 + qInfo() << "item clicked" << m_firstText; + emit itemClicked(m_firstText); + break; + } +} + +void ItemWidget::onFocusReback() +{ + setFocus(); +} + +void ItemWidget::onFocusOut(Qt::FocusReason type) +{ + // Tab切出 + if ((Qt::TabFocusReason == type) || (Qt::BacktabFocusReason == type)) + emit focusOut(type); + + if (Qt::ActiveWindowFocusReason == type) { + // 例如:super后返回都需要将焦点返回项 + setFocus(); + qInfo() << "set focus back itemwidget"; + } + // 项 + if (ItemFuncType_Item == m_functType) { + if (type != Qt::OtherFocusReason && !m_isHover) + m_funcButton->hide(); + } +} + +void ItemWidget::initUI() +{ + // 初始化控件大小 + setGeometry(0, 0, 220, 60); + setFixedSize(220, 60); + setContentsMargins(0, 0, 0, 0); + // 圆角 + setFrameRounded(true); + // 设置焦点策略 + setFocusPolicy(Qt::NoFocus); + + // 图标布局 + // 图标起始大小 + m_iconButton->setGeometry(0, 0, 44, 44); + m_iconButton->setFlat(true); + m_iconLayout->setContentsMargins(8, 8, 8, 8); + m_iconLayout->addWidget(m_iconButton, 0, Qt::AlignHCenter); + m_iconButton->setFocusPolicy(Qt::NoFocus); + + // 文字布局 + // 设置文字格式(字体大小和颜色) + setFont(m_firstline, DFontSizeManager::T7, ItemTextColor_Text); + setFont(m_secondline, DFontSizeManager::T8, ItemTextColor_TextTips); + m_firstline->setContentsMargins(0, 0, 0, 0); + m_secondline->setContentsMargins(0, 0, 0, 0); + m_firstline->setFixedWidth(138); + m_secondline->setFixedWidth(138); + m_textLayout->setContentsMargins(0, 0, 0, 0); + m_textLayout->setSpacing(0); + m_textLayout->addStretch(13); + m_textLayout->addWidget(m_firstline, 13); + m_textLayout->addStretch(9); + m_textLayout->addWidget(m_secondline, 13); + m_textLayout->addStretch(13); + + // 功能键布局 + setFuncIcon(ItemFuncType(m_functType)); + m_funcButton->setFlat(true); + m_funcButton->setFocusPolicy(Qt::NoFocus); + m_funcLayout->addStretch(); + m_funcLayout->setContentsMargins(5, 0, 5, 0); + m_funcLayout->addWidget(m_funcButton); + m_funcLayout->addStretch(); + + // 整体布局 + m_mainLayout->setContentsMargins(0, 0, 0, 0); + m_mainLayout->setSpacing(0); + m_mainLayout->addLayout(m_iconLayout); + m_mainLayout->addLayout(m_textLayout); + m_mainLayout->addLayout(m_funcLayout); + m_mainLayout->addStretch(); + setLayout(m_mainLayout); +} + +void ItemWidget::initConnections() +{ + // 颜色随主题变化 + connect(DApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &ItemWidget::slotThemeChange); + // 功能键被点击 + connect(m_funcButton, &DIconButton::clicked, this, &ItemWidget::onFuncButtonClicked); + // 焦点从小图标切出,但在控件上 + connect(m_funcButton, &IconButton::preFocus, this, &ItemWidget::onFocusReback); + // 焦点从小图标切出,不在控件上 + connect(m_funcButton, &IconButton::focusOut, this, &ItemWidget::onFocusOut); + // 图标被点击 + connect(m_iconButton, &DIconButton::clicked, this, &ItemWidget::onIconButtonClicked); + +} + +void ItemWidget::paintEvent(QPaintEvent *event) +{ + // 绘制文字长短 + QFont firstFont = m_firstline->font(); + QFont secondFont = m_secondline->font(); + // 限制文字长度,防止超出 + QString firstText = Utils::getElidedText(firstFont, m_firstText, ITEMMAXWIDTH); + QString secondText = Utils::getElidedText(secondFont, m_secondText, ITEMMAXWIDTH); + // 设置显示的文字 + m_firstline->setText(firstText); + m_secondline->setText(secondText); + + FocusFrame::paintEvent(event); +} + +void ItemWidget::enterEvent(QEvent *event) +{ + // 编辑按钮现 + if (ItemFuncType_Item == m_functType) + m_funcButton->show(); + + FocusFrame::enterEvent(event); +} + +void ItemWidget::leaveEvent(QEvent *event) +{ + // 判断焦点是否是选中状态,不是的话,清除选中效果 + if (!m_isFocus && !m_funcButton->hasFocus()) { + // 编辑按钮出 + if (ItemFuncType_Item == m_functType) + m_funcButton->hide(); + } + + FocusFrame::leaveEvent(event); +} + +void ItemWidget::mousePressEvent(QMouseEvent *event) +{ + FocusFrame::mousePressEvent(event); +} + +void ItemWidget::mouseReleaseEvent(QMouseEvent *event) +{ + // 判断类型执行操作 + onItemClicked(); + // 捕获事件 + event->accept(); + + FocusFrame::mouseReleaseEvent(event); +} + +bool ItemWidget::eventFilter(QObject *watched, QEvent *event) +{ + /***add begin by ut001121 zhangmeng 20200924 过滤并处理鼠标事件 修复BUG48618***/ + + if (QEvent::MouseButtonPress == event->type() + && Qt::MouseEventSynthesizedByQt == static_cast(event)->source()) { + QMouseEvent *mouse = static_cast(event); + //记录移动事件来源 + m_moveSource = watched; + //记录移动事件起点 + m_touchPressPosY = mouse->globalPos().y(); + //重置滑动最大距离 + m_touchSlideMaxY = 0; + } + if (QEvent::MouseButtonRelease == event->type() + && Qt::MouseEventSynthesizedByQt == static_cast(event)->source()) { + //判断最大移动距离 + if (m_touchSlideMaxY <= COORDINATE_ERROR_Y) { + //移动事件源为空,表示未曾移动过 + m_moveSource = nullptr; + } + } + if (QEvent::MouseMove == event->type() + && Qt::MouseEventSynthesizedByQt == static_cast(event)->source()) { + QMouseEvent *mouse = static_cast(event); + //记录滑动最大距离 + m_touchSlideMaxY = qMax(m_touchSlideMaxY, qAbs(m_touchPressPosY - mouse->globalPos().y())); + } + /***add end by ut001121***/ + return FocusFrame::eventFilter(watched, event); +} + +void ItemWidget::keyPressEvent(QKeyEvent *event) +{ + switch (event->key()) { + case Qt::Key_Right: + // 点击键盘右键 + qInfo() << "right key press"; + rightKeyPress(); + break; + case Qt::Key_Enter: + case Qt::Key_Return: + case Qt::Key_Space: + // 项被点击执行 + onItemClicked(); + break; + default: + FocusFrame::keyPressEvent(event); + break; + } + +} + +void ItemWidget::focusInEvent(QFocusEvent *event) +{ + m_isFocus = true; + if (ItemFuncType_Item == m_functType) + m_funcButton->show(); + + FocusFrame::focusInEvent(event); +} + +void ItemWidget::focusOutEvent(QFocusEvent *event) +{ + m_isFocus = false; + // Tab切出 + Qt::FocusReason type = event->reason(); + if (Qt::TabFocusReason == type || Qt::BacktabFocusReason == type) + emit focusOut(type); + + if (ItemFuncType_Item == m_functType) { + // 编辑按钮也没焦点,则隐藏编辑按钮 + if (!m_funcButton->hasFocus() && !m_isHover) + m_funcButton->hide(); + } + FocusFrame::focusOutEvent(event); +} + +void ItemWidget::setFont(DLabel *label, DFontSizeManager::SizeType fontSize, ItemTextColor colorType) +{ + setFontSize(label, fontSize); + setFontColor(label, colorType); +} + +void ItemWidget::setFontSize(DLabel *label, DFontSizeManager::SizeType fontSize) +{ + // 设置字体大小随系统变化 + DFontSizeManager::instance()->bind(label, fontSize); +} + +void ItemWidget::setFontColor(DLabel *label, ItemTextColor colorType) +{ + DPalette fontPalette = DApplicationHelper::instance()->palette(label); + QColor color = getColor(colorType); + if (color.isValid()) { + fontPalette.setBrush(DPalette::Text, color); + label->setPalette(fontPalette); + } else { + qInfo() << __FUNCTION__ << "can't get text color"; + } +} + +QColor ItemWidget::getColor(ItemTextColor colorType) +{ + // 获取标准颜色 + DGuiApplicationHelper *appHelper = DGuiApplicationHelper::instance(); + DPalette textPalette = appHelper->standardPalette(appHelper->themeType()); + // 获取对应主题下的颜色 + QColor color; + switch (colorType) { + case ItemTextColor_Text: { + color = textPalette.color(DPalette::Text); + } + break; + case ItemTextColor_TextTips: { + color = textPalette.color(DPalette::TextTips); + } + break; + default: + qInfo() << "item widget text unknow color type!" << colorType; + break; + } + return color; +} + +void ItemWidget::rightKeyPress() +{ + switch (m_functType) { + case ItemFuncType_Group: { + // 显示分组 + qInfo() << "group show" << m_firstText; + emit groupClicked(m_firstText, true); + } + break; + case ItemFuncType_Item: + // 编辑按钮获得焦点 + qInfo() << "item get focus" << m_firstText; + m_funcButton->show(); + m_funcButton->setFocus(); + break; + default: + break; + } +} + +void ItemWidget::onItemClicked() +{ + /***add begin by ut001121 zhangmeng 20200924 判断移动事件来源 修复BUG48618***/ + if (m_moveSource) { + m_moveSource = nullptr; + return ; + } + /***add end by ut001121***/ + + switch (m_functType) { + case ItemFuncType_Group: + // 显示分组 + qInfo() << "group show" << m_firstText; + // 第一个参数是分组名,第二个参数是当前是否有焦点 + emit groupClicked(m_firstText, m_isFocus); + break; + case ItemFuncType_Item: + // 项被点击 + qInfo() << "item clicked" << m_firstText; + emit itemClicked(m_firstText); + break; + } +} + +void ItemWidget::slotThemeChange(DGuiApplicationHelper::ColorType themeType) +{ + Q_UNUSED(themeType); + setFontColor(m_firstline, ItemTextColor_Text); + setFontColor(m_secondline, ItemTextColor_TextTips); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/itemwidget.h deepin-terminal-5.4.13/src/views/itemwidget.h --- deepin-terminal-5.0.0+ds1/src/views/itemwidget.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/itemwidget.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,334 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: ItemWidget + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 项控件 + 可以通过类型选择选择项控件的展示内容 + 1)分组项 + 2)普通项 +*******************************************************************************/ +#ifndef ITEMWIDGET_H +#define ITEMWIDGET_H +// custom +#include "focusframe.h" + +// dtk +//#include +#include +#include +#include +#include +#include +#include +// qt +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE +#define COORDINATE_ERROR_Y 5 + +// 功能键类型 +enum ItemFuncType { + // 项按钮(编辑按钮) + ItemFuncType_Item = 0, + // 分组按钮(用于远程管理显示分组) + ItemFuncType_Group = 1 +}; + +// 文字颜色 +enum ItemTextColor { + // Text // 第一行颜色 + ItemTextColor_Text = 0, + // TextTips // 第二行颜色 + ItemTextColor_TextTips +}; + +class IconButton; +// 远程管理项的通用view类 +class ItemWidget : public FocusFrame +{ + Q_OBJECT +public: + ItemWidget(ItemFuncType itemType, QWidget *parent = nullptr); + ~ItemWidget(); + + /** + * @brief 根据名称设置图标(远程组图标 dt_server_group 远程服务器图标 dt_server 自定义图标 dt_command) + * @author ut000610 戴正文 + * @param 图标名称 + */ + void setIcon(const QString &icon); + /** + * @brief 根据类型设置功能图标 (编辑 dt_edit 显示分组 dt_arrow_right) + * @author ut000610 戴正文 + * @param 图标类型 + */ + void setFuncIcon(ItemFuncType iconType); + /** + * @brief 获取功能键类型 + * @author ut000610 戴正文 + * @return + */ + ItemFuncType getFuncType(); + + /** + * @brief 设置文字内容 + * @author ut000610 戴正文 + * @param firstline 第一行信息 + * @param secondline 第二行信息 + */ + void setText(const QString &firstline, const QString &secondline = ""); + /** + * @brief 获取第一行信息 + * @author ut000438 王亮 + * @return + */ + const QString getFirstText(); + + /** + * @brief 是否匹配,判断是否是此widget + * @author ut000610 戴正文 + * @param type 功能键类型 + * @param key 值 + * @return + */ + bool isEqual(ItemFuncType type, const QString &key); + /** + * @brief 获取焦点,显示编辑按钮, 这是键盘获取焦点 + * @author ut000610 戴正文 + */ + void getFocus(); + /** + * @brief 丢失焦点,显示编辑按钮 + * @author ut000610 戴正文 + */ + void lostFocus(); + /** + * @brief 重载比较 > 根据类型,文字比较大小 + * @author ut000610 戴正文 + * @param item1 + * @param item2 + * @return + */ + friend bool operator >(const ItemWidget &item1, const ItemWidget &item2); + /** + * @brief 重载比较 < 根据类型,文字比较大小 + * @author ut000610 戴正文 + * @param item1 + * @param item2 + * @return + */ + friend bool operator <(const ItemWidget &item1, const ItemWidget &item2); + +public slots: + /** + * @brief 处理功能键点击事件: 1) 分组=>显示分组所有的项 2) 项=>修改项 + * @author ut000610 戴正文 + */ + void onFuncButtonClicked(); + /** + * @brief 处理图标点击的事件: 1) 分组=>显示分组所有的项 2) 项=>修改项 + * @author ut000610 戴正文 + */ + void onIconButtonClicked(); + /** + * @brief 功能键丢失焦点,当前窗口获得焦点 + * @author ut000610 戴正文 + */ + void onFocusReback(); + + /** + * @brief 焦点从功能键切出,且不在当前控件上 + * @author ut000610 戴正文 + * @param type 类型 + */ + void onFocusOut(Qt::FocusReason type); + +signals: + // 功能按钮被点击 + // 参数: item的名称 (数据的唯一值) + // 执行项 + void itemClicked(const QString &strName); + // 显示分组 + void groupClicked(const QString &strName, bool isFocus = false); + // 修改项 + void itemModify(const QString &strName, bool isFocus = false); + // 焦点从控件中出 + void focusOut(Qt::FocusReason type); + +protected: + /** + * @brief 初始化UI界面,初始化单个窗口组件的布局和空间大小 + * @author ut000610 戴正文 + */ + void initUI(); + /** + * @brief 初始化信号槽,关联信号槽 + * @author ut000610 戴正文 + */ + void initConnections(); + /** + * @brief 处理重绘事件:1.字体变长便短导致的问题 2. 悬浮的背景色 + * @author ut000610 戴正文 + * @param event 事件 + */ + void paintEvent(QPaintEvent *event) override; + /** + * @brief 进入,编辑按钮显示 + * @author ut000610 戴正文 + * @param event 事件 + */ + void enterEvent(QEvent *event) override; + /** + * @brief 移出,编辑按钮消失 + * @author ut000610 戴正文 + * @param event 事件 + */ + void leaveEvent(QEvent *event) override; + /** + * @brief 鼠标点击事件,处理item的点击事件 + * @author ut000610 戴正文 + * @param event 鼠标点击事件 + */ + void mousePressEvent(QMouseEvent *event) override; + /** + * @brief 处理item的点击事件 + * @author ut000610 戴正文 + * @param event 事件 + */ + void mouseReleaseEvent(QMouseEvent *event) override; + /** + * @brief 事件过滤 + * @author ut001121 张猛 + * @param watched + * @param event 事件 + * @return + */ + bool eventFilter(QObject *watched, QEvent *event) override; + /** + * @brief 键盘点击事件,处理右键操作 + * @author ut000610 戴正文 + * @param event 键盘点击事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 焦点进入事件 + * @author ut000610 戴正文 + * @param event 焦点进入事件 + */ + void focusInEvent(QFocusEvent *event) override; + /** + * @brief 焦点丢失事件 + * @author ut000610 戴正文 + * @param event 焦点丢失事件 + */ + void focusOutEvent(QFocusEvent *event) override; + +private: + // 主窗口布局 + QHBoxLayout *m_mainLayout = nullptr; + // 图表布局 + QVBoxLayout *m_iconLayout = nullptr; + // 文字布局 + QVBoxLayout *m_textLayout = nullptr; + // 功能键布局 + QVBoxLayout *m_funcLayout = nullptr; + + // 图表 + DIconButton *m_iconButton = nullptr; + // 文字 + DLabel *m_firstline = nullptr; + DLabel *m_secondline = nullptr; + // 功能键 + IconButton *m_funcButton = nullptr; + + // 文字内容 + QString m_firstText = ""; + QString m_secondText = ""; + // 功能按键默认是编辑按钮 + ItemFuncType m_functType; + // 焦点是否在窗口上 用于编辑按钮是否显示 + bool m_isFocus = false; + + /***add begin by ut001121 zhangmeng 20200924 修复BUG48618***/ + //记录触摸屏下点击时Y轴坐标 + int m_touchPressPosY = 0; + //记录触摸屏下滑动时Y轴移动最大距离 + int m_touchSlideMaxY = 0; + // 移动事件来源 + QObject *m_moveSource = nullptr; + /***add end by ut001121***/ + + /** + * @brief 设置文字大小和颜色:给指定label设置初始化字体和颜色 + * @param label 标签 + * @param fontSize 字体大小 + * @param colorType 颜色 + */ + void setFont(DLabel *label, DFontSizeManager::SizeType fontSize, ItemTextColor colorType); + /** + * @brief 设置字体大小 + * @author ut000610 戴正文 + * @param label 标签 + * @param fontSize 字体大小 + */ + void setFontSize(DLabel *label, DFontSizeManager::SizeType fontSize); + /** + * @brief 设置字体颜色 + * @author ut000610 戴正文 + * @param label 标签 + * @param colorType 颜色 + */ + void setFontColor(DLabel *label, ItemTextColor colorType); + /** + * @brief 根据指定值,返回颜色 + * @author ut000610 戴正文 + * @param colorType 颜色 + * @return + */ + QColor getColor(ItemTextColor colorType); + /** + * @brief 处理键盘事件: 右键操作,组 => 显示分组 项 => 设置焦点 + * @author ut000610 戴正文 + */ + void rightKeyPress(); + /** + * @brief 项被点击事件:根据类型发送不同的点击信号 + * @author ut000610 戴正文 + */ + void onItemClicked(); +private slots: + /** + * @brief 部分组件随主题颜色变化而变化 + * @param themeType 主题 + */ + void slotThemeChange(DGuiApplicationHelper::ColorType themeType); +}; + +#endif // ITEMWIDGET_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/listview.cpp deepin-terminal-5.4.13/src/views/listview.cpp --- deepin-terminal-5.0.0+ds1/src/views/listview.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/listview.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,846 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "listview.h" +#include "service.h" +#include "serverconfigmanager.h" +#include "dbusmanager.h" +#include "customcommandoptdlg.h" +#include "serverconfigoptdlg.h" + +// qt +#include +#include + +ListView::ListView(ListType type, QWidget *parent) + : QScrollArea(parent), + m_type(type), + m_mainWidget(new DWidget(this)), + m_mainLayout(new QVBoxLayout(m_mainWidget)) +{ + /******** Add by ut001000 renfeixiang 2020-08-13:增加 Begin***************/ + Utils::set_Object_Name(this); + m_mainWidget->setObjectName("ListViewMainWidget"); + m_mainLayout->setObjectName("ListViewMainLayout"); + /******** Add by ut001000 renfeixiang 2020-08-13:增加 End***************/ + // 初始化界面 + initUI(); + + Service::instance()->setScrollerTouchGesture(this); +} + +ListView::~ListView() +{ + clearData(); +} + +void ListView::addItem(ItemFuncType type, const QString &key, const QString &strDescription) +{ + // 初始化项 + ItemWidget *itemWidget = new ItemWidget(type, this); + // 设置文字 + itemWidget->setText(key, strDescription); + // 设置图标 + setItemIcon(type, itemWidget); + // 添加到布局 + // 远程管理的分组和项需要排序 + // 首先获得位置 + // 添加到列表 + m_itemList.append(itemWidget); + int index = getWidgetIndex(itemWidget); + // 添加进去 + m_mainLayout->insertWidget(index, itemWidget); + // 列表数量变化 + emit listItemCountChange(); + + // 分组项被点击 + connect(itemWidget, &ItemWidget::groupClicked, this, &ListView::onGroupClicked); + // 列表项被点击 + connect(itemWidget, &ItemWidget::itemClicked, this, &ListView::itemClicked); + // 修改列表 + // connect(itemWidget, &ItemWidget::itemModify, this, &ListView::itemModify); + connect(itemWidget, &ItemWidget::itemModify, this, &ListView::onItemModify); + // 焦点切出 Tab切出不返回 + connect(itemWidget, &ItemWidget::focusOut, this, &ListView::onFocusOut); + // 列表被点击,编辑按钮隐藏 + connect(itemWidget, &ItemWidget::itemClicked, this, &ListView::onItemClicked); + +} + +inline void ListView::onItemClicked() +{ + lostFocus(m_currentIndex); +} + +inline void ListView::onFocusOut(Qt::FocusReason type) +{ + emit focusOut(type); + lostFocus(m_currentIndex); + m_focusState = false; +} + +inline void ListView::onGroupClicked(const QString &strName, bool isFocus) +{ + emit groupClicked(strName, isFocus); + // 若焦点不在项上 + if (!isFocus) { + // 清空index记录 + clearIndex(); + // 焦点状态为false + m_focusState = false; + } +} + +bool ListView::removeItem(ItemFuncType type, const QString &key) +{ + bool isFind = false; + for (ItemWidget *item : m_itemList) { + // 匹配选项 + if (item->isEqual(type, key)) { + // 删除此项 + m_itemList.removeOne(item); + m_mainLayout->removeWidget(item); + delete item; + // 找到设为true + isFind = true; + // 列表数量变化 + emit listItemCountChange(); + } + } + return isFind; +} + +bool ListView::updateItem(ItemFuncType type, const QString &key, const QString &newKey, const QString &strDescription) +{ + bool isFind = false; + // 遍历,找到需要修改的项,修改 + // 组的修改是,更新数量 + // 项的修改是修改内容 + for (ItemWidget *item : m_itemList) { + // 匹配选项 + if (item->isEqual(type, key)) { + //更新 + item->setText(newKey, strDescription); + // 找到设为true + isFind = true; + } + } + // 返回更新结果 + return isFind; +} + +int ListView::count() +{ + return m_itemList.count(); +} + +void ListView::clearData() +{ + for (ItemWidget *item : m_itemList) { + // 从列表中移除 + m_itemList.removeOne(item); + // 删除项!! + delete item; + } +} + +int ListView::indexFromString(const QString &key, ItemFuncType type) +{ + // 遍历布局 + for (int i = 0; i < m_mainLayout->count(); ++i) { + // 获取每个窗口 + QLayoutItem *item = m_mainLayout->itemAt(i); + ItemWidget *widget = item ? qobject_cast(item->widget()) : nullptr; + // 比较是否相等 + if (widget && widget->isEqual(type, key)) { + // 相等 返回index + return i; + } + } + // 没找到,返回-1 + return -1; +} + +int ListView::currentIndex() +{ + return m_currentIndex; +} + +int ListView::getNextIndex(int index) +{ + if (index < 0) { + // 输入错误的index + qInfo() << __FUNCTION__ << "input wrong index" << index; + return -1; + } + int count = m_itemList.count(); + // index小于列表最大数量 + if (index < count) + return index; + + // index大于最大数量,且列表数量不为0 + if (index >= count && m_itemList.count() != 0) { + index = count - 1; + return index; + } else { + // 列表没有项 + return -2; + } +} + +void ListView::setCurrentIndex(int currentIndex) +{ + // 首先判断currentIndex的有效性 + if (!indexIsValid(currentIndex)) { + // 无效,返回 + qInfo() << "index : " << currentIndex << " is wrong"; + emit focusOut(Qt::NoFocusReason); + m_focusState = false; + return; + } + qInfo() << __FUNCTION__ << currentIndex; + // 之前的焦点丢失 + if (currentIndex != m_currentIndex) + lostFocus(m_currentIndex); + + // 设置焦点 + QLayoutItem *item = m_mainLayout->itemAt(currentIndex); + ItemWidget *widget = item ? qobject_cast(item->widget()) : nullptr; + if (widget != nullptr) { + // 设置焦点 + qInfo() << widget << "get focus" << "current index" << currentIndex; + // Todo 让焦点不要进入主窗口 + widget->setFocus(); + m_focusState = true; + } + // 设置滚动条 + setScroll(currentIndex); + m_currentIndex = currentIndex; +} + +void ListView::clearIndex() +{ + m_currentIndex = -1; + qInfo() << __FUNCTION__ << "clear index to -1"; +} + +void ListView::onItemModify(const QString &key, bool isFocusOn) +{ + switch (m_type) { + case ListType_Remote: + onRemoteItemModify(key, isFocusOn); + break; + case ListType_Custom: + onCustomItemModify(key, isFocusOn); + break; + } +} + +void ListView::onRemoteItemModify(const QString &key, bool isFocusOn) +{ + int curIndex = m_currentIndex; + // 弹窗出,丢失焦点 + lostFocus(m_currentIndex); + m_currentIndex = curIndex; + // 弹窗显示 + ServerConfig *curItemServer = ServerConfigManager::instance()->getServerConfig(key); + qInfo() << __FUNCTION__ << "modify remote " << curItemServer->m_serverName; + // 弹窗显示 + Service::instance()->setIsDialogShow(window(), true); + // 根据点击事件还是键盘事件设置焦点状态 + if (isFocusOn) { + // 键盘 + m_focusState = true; + qInfo() << "keyboard clicked"; + } else { + // 鼠标 + qInfo() << "mouse press"; + m_focusState = false; + m_currentIndex = -1; + } + + // 1.显示弹窗 + m_configDialog = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_MODIFY, curItemServer, this); + connect(m_configDialog, &ServerConfigOptDlg::finished, this, &ListView::onServerConfigOptDlgFinished); + // 2. 记录弹窗 + ServerConfigManager::instance()->setModifyDialog(curItemServer->m_serverName, m_configDialog); + m_configDialog->show(); +} + +inline void ListView::onServerConfigOptDlgFinished(int result) +{ + // 弹窗隐藏或消失 + qInfo() << "focus state " << m_focusState; + // 3. 对弹窗操作进行分析 + // 判断是否删除 + if (ServerConfigOptDlg::Accepted == result) { + // 判断是否需要删除 + if (m_configDialog->isDelServer()) { + // 弹出删除弹窗 + qInfo() << "delete " << m_configDialog->getCurServer()->m_serverName << m_configDialog; + DDialog *deleteDialog = new DDialog(tr("Delete Server"), tr("Are you sure you want to delete %1?").arg(m_configDialog->getServerName()), m_configDialog); + deleteDialog->setObjectName("RemoteDeleteDialog"); + deleteDialog->setAttribute(Qt::WA_DeleteOnClose); + connect(deleteDialog, &DDialog::finished, this, &ListView::onDeleteServerDialogFinished); + deleteDialog->setWindowModality(Qt::WindowModal); + deleteDialog->setIcon(QIcon::fromTheme("deepin-terminal")); + deleteDialog->addButton(QObject::tr("Cancel", "button"), false, DDialog::ButtonNormal); + deleteDialog->addButton(QObject::tr("Delete", "button"), true, DDialog::ButtonWarning); + deleteDialog->show(); + // 释放窗口 + Service::instance()->setIsDialogShow(window(), false); + } else { + // 不删除,修改 + // 释放窗口 + Service::instance()->setIsDialogShow(window(), false); + // 修改后会有信号刷新列表 + // 不需要删除,修改了转到这条修改的记录 + // 设置滚轮 + // 关闭后及时将弹窗删除 + // 记住修改前的位置 m_currentIndex + qInfo() << "index before modify " << m_currentIndex; + ServerConfigManager::instance()->removeDialog(m_configDialog); + // 刷新列表 + emit ServerConfigManager::instance()->refreshList(); + // 获取index + int index = indexFromString(m_configDialog->getCurServer()->m_serverName); + // 若找不到 + if (index < 0) { + // 旧位置的下一个 + index = getNextIndex(m_currentIndex); + } + // 依旧没有找到啦 + if (index < 0) { + qInfo() << "no next item"; + if (m_focusState) { + // 有焦点,焦点出 + emit focusOut(Qt::NoFocusReason); + } + } + // 找的到 + else { + if (m_focusState) { + // 设置焦点 + setFocus(); + // 有焦点,设置焦点 + setCurrentIndex(index); + } else { + // 没焦点,设置滚轮 + setScroll(index); + } + } + } + } + // 不接受,reject 修改弹窗 + else { + // 释放窗口 + Service::instance()->setIsDialogShow(window(), false); + if (m_focusState) { + int index = indexFromString(m_configDialog->getCurServer()->m_serverName); + setCurrentIndex(index); + + // fix bug#65109焦点在自定义编辑按钮上,enter键进入后按esc退出,焦点不在编辑按钮上 + ItemWidget *itemWidget = m_itemList.at(m_currentIndex); + itemWidget->getFocus(); + } + // 取消后及时将弹窗删除 + ServerConfigManager::instance()->removeDialog(m_configDialog); + } +} + +inline void ListView::onDeleteServerDialogFinished(int result) +{ + // 获取index + int index = indexFromString(m_configDialog->getCurServer()->m_serverName); + // 删除 + if (DDialog::Accepted == result) { + // 关闭所有相关弹窗 + ServerConfigManager::instance()->closeAllDialog(m_configDialog->getCurServer()->m_serverName); + ServerConfigManager::instance()->delServerConfig(m_configDialog->getCurServer()); + emit ServerConfigManager::instance()->refreshList(); + emit listItemCountChange(); + } else { + // 关闭后及时将弹窗删除 + ServerConfigManager::instance()->removeDialog(m_configDialog); + } + // Todo : 焦点返回下一个 + index = getNextIndex(index); + if (m_focusState) { + // 根据返回值判断焦点位置 + if (index >= 0) { + // 回到列表,仅回到大的列表,没有回到具体的哪个点 + setFocus(); + // 列表不为空 + setCurrentIndex(index); + } else { + // 列表为空焦点自动往下 + m_focusState = false; + emit focusOut(Qt::NoFocusReason); + } + } +} + +void ListView::onCustomItemModify(const QString &key, bool isFocusOn) +{ + if (m_pdlg) { + delete m_pdlg; + m_pdlg = nullptr; + } + + int curIndex = m_currentIndex; + // 弹窗出,丢失焦点 + lostFocus(m_currentIndex); + m_currentIndex = curIndex; + + // 弹窗显示 + Service::instance()->setIsDialogShow(window(), true); + + qInfo() << "this->count()=" << this->count(); + // 根据点击事件还是键盘事件设置焦点状态 + if (isFocusOn) { + // 键盘 + m_focusState = true; + } else { + // 鼠标 + m_focusState = false; + m_currentIndex = -1; + } + + // 获取数据 + QAction *itemAction = ShortcutManager::instance()->findActionByKey(key); + CustomCommandData itemData; + itemData.m_cmdName = itemAction->text(); + itemData.m_cmdText = itemAction->data().toString(); + itemData.m_cmdShortcut = itemAction->shortcut().toString(); + + m_pdlg = new CustomCommandOptDlg(CustomCommandOptDlg::CCT_MODIFY, &itemData, this); + connect(m_pdlg, &CustomCommandOptDlg::finished, this, &ListView::onCustomCommandOptDlgFinished); + m_pdlg->show(); +} + +inline void ListView::onCustomCommandOptDlgFinished(int result) +{ + int tempResult = result; + + // 弹窗隐藏或消失 + //Service::instance()->setIsDialogShow(window(), false);//暂时保留 + + if (QDialog::Accepted == result) { + //确认修改处理 + qInfo() << __FUNCTION__ << __LINE__ << ":mod Custom Command"; + QAction *newAction = m_pdlg->getCurCustomCmd(); + CustomCommandData itemData = *(m_pdlg->m_currItemData); + CustomCommandData itemDel = itemData; + + itemData.m_cmdName = newAction->text(); + itemData.m_cmdText = newAction->data().toString(); + itemData.m_cmdShortcut = newAction->shortcut().toString(); + + //newAction->setData(newAction->data()); + //newAction->setShortcut(newAction->shortcut()); + + ShortcutManager::instance()->delCustomCommand(itemDel); + ShortcutManager::instance()->addCustomCommand(*newAction); + // 更新列表项 + //updateItem(ItemFuncType_Item, itemData.m_cmdName, itemData.m_cmdShortcut); + updateItem(ItemFuncType_Item, itemDel.m_cmdName, itemData.m_cmdName); + // 找到值 + m_pdlg->closeRefreshDataConnection(); + emit Service::instance()->refreshCommandPanel(itemDel.m_cmdName, itemData.m_cmdName); + + int index = indexFromString(itemData.m_cmdName); + qInfo() << "-------------------------------------------index=" << index << ",itemData.m_cmdName=" << itemData.m_cmdName; + if (m_focusState) { + // 将焦点落回 + m_currentIndex = index; + setCurrentIndex(index); + + // 滚轮滚动到最新的位置 + setScroll(index); + setFocus(); + } + + } else if (QDialog::Rejected == result) { + + //Delete custom command 删除自定义命令处理 + if (m_pdlg->isDelCurCommand()) { + qInfo() << __FUNCTION__ << __LINE__ << ":del Custom Command"; + DDialog *dlgDelete = new DDialog(this); + dlgDelete->setObjectName("CustomDeleteDialog"); + dlgDelete->setAttribute(Qt::WA_DeleteOnClose); + dlgDelete->setWindowModality(Qt::WindowModal); + m_pdlg->m_dlgDelete = dlgDelete; + + dlgDelete->setIcon(QIcon::fromTheme("deepin-terminal")); + dlgDelete->setTitle(tr("Are you sure you want to delete %1?").arg(m_pdlg->m_currItemData->m_cmdName)); + dlgDelete->addButton(QObject::tr("Cancel", "button"), false, DDialog::ButtonNormal); + dlgDelete->addButton(QObject::tr("Confirm", "button"), true, DDialog::ButtonWarning); + connect(dlgDelete, &DDialog::finished, this, &ListView::onDeleteCustomCommandFinished); + dlgDelete->show(); + } + } + + Service::instance()->setIsDialogShow(window(), false); + + if (m_focusState) { + // 将焦点落回 + setCurrentIndex(m_currentIndex); + + // 滚轮滚动到最新的位置 + setScroll(m_currentIndex); + + // fix bug#65109焦点在自定义编辑按钮上,enter键进入后按esc退出,焦点不在编辑按钮上 + if (QDialog::Rejected == result) { + qInfo() << "QDialog::Rejected"; + ItemWidget *itemWidget = m_itemList.at(m_currentIndex); + itemWidget->getFocus(); + } else { + qInfo() << "QDialog::Accepted result is:" << result; + if (-1 != result) { + setFocus(); + } else { + qInfo() << "QDialog::Rejected"; + ItemWidget *itemWidget = m_itemList.at(m_currentIndex); + itemWidget->getFocus(); + } + } + } + + qInfo() << "================================tempResult=" << tempResult; +} + +inline void ListView::onDeleteCustomCommandFinished(int result) +{ + //是否删除自定义命令再次确认操作 + if (QDialog::Accepted == result) { + // 删除前获取位置 + int index = indexFromString(m_pdlg->m_currItemData->m_cmdName); + ShortcutManager::instance()->delCustomCommand(*(m_pdlg->m_currItemData)); + // 删除项 + removeItem(ItemFuncType_Item, m_pdlg->m_currItemData->m_cmdName); + emit listItemCountChange(); + // 删除后焦点位置 + if (m_focusState) { + // 获取下一个的位置 + index = getNextIndex(index); + if (index >= 0) { + // 找的到 + setCurrentIndex(index); + setScroll(index); + setFocus(); + } else { + // 找不到 + qInfo() << "can't find index" << index; + if (m_itemList.count() == 0) { + emit focusOut(Qt::NoFocusReason); + } + } + } + m_pdlg->closeRefreshDataConnection(); + emit Service::instance()->refreshCommandPanel(m_pdlg->m_currItemData->m_cmdName, m_pdlg->m_currItemData->m_cmdName); + } +} + +void ListView::keyPressEvent(QKeyEvent *event) +{ + switch (event->key()) { + case Qt::Key_Up: + setFocusFromeIndex(m_currentIndex, ListFocusUp); + break; + case Qt::Key_Down: + setFocusFromeIndex(m_currentIndex, ListFocusDown); + break; + case Qt::Key_Home: + setFocusFromeIndex(m_currentIndex, ListFocusHome); + break; + case Qt::Key_End: + setFocusFromeIndex(m_currentIndex, ListFocusEnd); + break; + default: + QScrollArea::keyPressEvent(event); + break; + } +} + +void ListView::focusInEvent(QFocusEvent *event) +{ + qInfo() << __FUNCTION__ << event->reason(); + if (m_currentIndex == -1) + m_currentIndex = 0; + + if (event->reason() == Qt::TabFocusReason) + setCurrentIndex(0); + else + setCurrentIndex(m_currentIndex); + + qInfo() << "ListView current index : " << m_currentIndex << event->reason(); + m_focusState = true; + QScrollArea::focusInEvent(event); +} + +void ListView::setFocusState(bool focusState) +{ + m_focusState = focusState; +} + +bool ListView::getFocusState() const +{ + return m_focusState; +} + +void ListView::initUI() +{ + // 间隔 + setContentsMargins(0, 0, 0, 0); + //布局 + m_mainLayout->setContentsMargins(10, 0, 10, 0); + m_mainLayout->setSpacing(10); + m_mainLayout->addStretch(); + // 焦点策略 + setFocusPolicy(Qt::TabFocus); + + setFrameShape(QFrame::NoFrame); + setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setSizeAdjustPolicy(QScrollArea::AdjustIgnored); + setWidgetResizable(true); + verticalScrollBar()->setValue(0); + + m_mainWidget->setLayout(m_mainLayout); + setWidget(m_mainWidget); + +} + +void ListView::setItemIcon(ItemFuncType type, ItemWidget *item) +{ + switch (type) { + // 项图标 + case ItemFuncType_Item: + if (ListType_Custom == m_type) { + // 自定义项 + item->setIcon("dt_command"); + } else if (ListType_Remote == m_type) { + // 远程项 + item->setIcon("dt_server"); + } + break; + // 远程图标 + case ItemFuncType_Group: + item->setIcon("dt_server_group"); + break; + } +} + +/******************************************************************************* + 1. @函数: 用于getWidgetIndex中qSort排序的比较函数 + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-07-20 + 4. @说明: 根据类型,文字比较大小 +*******************************************************************************/ +static inline bool comparator(ItemWidget *item1, ItemWidget *item2) +{ + // item1 item2都是组 或 item1 item2 都不是组 + if (item1->getFuncType() == item2->getFuncType()) { + // 比较文字 + if (QString::compare(item1->getFirstText(), item2->getFirstText()) < 0) { + // 小于 0 例:ab bc + return true; + } else { + // 其他情况 + return false; + } + } else if (item1->getFuncType() > item2->getFuncType()) { + // item1 是组 1 item2不是 0 + return true; + } else { + // item1 不是组 0 item2是 1 + return false; + } +} + +int ListView::getWidgetIndex(ItemWidget *itemWidget) +{ + qSort(m_itemList.begin(), m_itemList.end(), comparator); + // 从0开始 + int index = 0; + int currentIndex = 0; + // 遍历列表 + for (ItemWidget *item : m_itemList) { + // 判断是否小于,是就将index++ + if (itemWidget->isEqual((item->getFuncType()), item->getFirstText())) { + currentIndex = index; + break; + } + ++index; + } + return currentIndex; +} + +void ListView::setFocusFromeIndex(int currentIndex, ListFocusType focusType) +{ + int count = m_itemList.count(); + + int index = currentIndex; + if (ListFocusUp == focusType) + --index; + else if (ListFocusDown == focusType) + ++index; + else if (ListFocusHome == focusType) + index = 0; + else if (ListFocusEnd == focusType) + index = this->count() - 1; + else + qInfo() << "index:" << index << endl; + + qInfo() << "focus index:" << index << endl; + + // index >= 0 < 最大数量 + // 最上 + if (index < 0) { + index = 0; + m_scrollPostion = 0; + // 提示音 + DBusManager::callSystemSound(); + } + // 之前焦点所在位置丢失焦点 + if (index != currentIndex && index != count && index >= 0) { + // 不是到头的情况下,前一个丢失焦点 + lostFocus(currentIndex); + } + // 最下 + if (index == count) { + // 让index恢复正常 + --index; + m_scrollPostion = verticalScrollBar()->value(); + // 提示音 + DBusManager::callSystemSound(); + } else { + QLayoutItem *item = m_mainLayout->itemAt(index); + ItemWidget *widget = item ? qobject_cast(item->widget()) : nullptr; + if (widget != nullptr) { + // 设置焦点 + widget->setFocus(); + int widget_y1 = widget->y(); + int widget_y2 = widget->y() + widget->height(); + qInfo() << "y1" << widget_y1; + qInfo() << "y2" << widget_y2; + qInfo() << "height" << height(); + // 设置滚动条 上下移动 + if (widget->y() + widget->height() < height()) { + verticalScrollBar()->setValue(0); + } else { + const int listItemHeight = 70; + if (ListFocusUp == focusType) { + m_scrollPostion -= listItemHeight; + } else if (ListFocusDown == focusType && currentIndex < count/* - 1*/) { + m_scrollPostion += listItemHeight; + } else if (ListFocusHome == focusType) { + m_scrollPostion = 0; + } else if (ListFocusEnd == focusType) { + m_scrollPostion += (count - 1) * listItemHeight; + } else { + m_scrollPostion = verticalScrollBar()->value(); + qInfo() << "m_scrollPostion" << m_scrollPostion << endl; + } + } + } + } + // 计算range + int range = calculateRange(height()); + verticalScrollBar()->setRange(0, range); + if (0 == index) + m_scrollPostion = 0; + + verticalScrollBar()->setValue(m_scrollPostion); + qInfo() << "up down scrollPostion : " << m_scrollPostion << verticalScrollBar()->value(); + + // 需要让m_currentIndex于焦点所在位置同步 + m_currentIndex = index; + qInfo() << "current index : " << m_currentIndex; +} + +void ListView::lostFocus(int preIndex) +{ + // 没有前一个 + if (-1 == preIndex) + return; + + QLayoutItem *item = m_mainLayout->itemAt(preIndex); + ItemWidget *widget = item ? qobject_cast(item->widget()) : nullptr; + if (widget != nullptr) { + // 丢失焦点 + widget->lostFocus(); + qInfo() << widget << "lost focus"; + } +} + +void ListView::setScroll(int currentIndex) +{ + // 计算range + int range = calculateRange(height()); + verticalScrollBar()->setRange(0, range); + QLayoutItem *item = m_mainLayout->itemAt(currentIndex); + if (item != nullptr) { + int postion = currentIndex * 70; + qInfo() << "postion : " << postion; + if ((postion + 60) < height()) { + verticalScrollBar()->setValue(0); + m_scrollPostion = 0; + } else { + m_scrollPostion = 0; + // 差的距离 + int distance = postion - height(); + if (distance >= 0) { + // 倍率 + int magn = distance / 10 + 1; + m_scrollPostion = 0 + magn * 70; + } + verticalScrollBar()->setValue(m_scrollPostion); + } + qInfo() << "scrollPostion " << m_scrollPostion; + } +} + +bool ListView::indexIsValid(int index) +{ + qInfo() << index << m_itemList.count(); + return ((index >= 0) && (index < m_itemList.count())); +} + +int ListView::calculateRange(int height) +{ + int count = m_itemList.count(); + int range = count * 70 - 10 - height; + return range; +} + +void ListView::mousePressEvent(QMouseEvent *event) +{ + Q_UNUSED(event) + //return QScrollArea::mousePressEvent(event); +} + +void ListView::mouseMoveEvent(QMouseEvent *event) +{ + Q_UNUSED(event) + //return QScrollArea::mouseMoveEvent(event); +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/views/listview.h deepin-terminal-5.4.13/src/views/listview.h --- deepin-terminal-5.0.0+ds1/src/views/listview.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/listview.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,337 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/******************************************************************************* + 1. @类名: ListView + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 列表控件 + 提供添加、删除和更新列表项和选择列表项焦点的功能 + 根据自定义或远程设置不同的列表展示 +*******************************************************************************/ +#ifndef LISTVIEW_H +#define LISTVIEW_H +#include "itemwidget.h" + +// dtk +#include + +// qt +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +enum ListType { + // 自定义 + ListType_Custom, + // 远程 + ListType_Remote +}; + +enum ListFocusType { + ListFocusUp, + ListFocusDown, + ListFocusHome, + ListFocusEnd, + ListFocusPageUp, + ListFocusPageDown +}; + +class ServerConfigOptDlg; +class CustomCommandOptDlg; +class ListView : public QScrollArea +{ + Q_OBJECT +public: + ListView(ListType type, QWidget *parent = nullptr); + /** + * @brief 析构,用于释放列表中的数据 + * @author ut000610 戴正文 + */ + ~ListView() override; + + /** + * @brief 根据所给信息添加项 + * @author ut000610 戴正文 + * @param type 可执行的项 + * @param key + * @param strDescription + */ + void addItem(ItemFuncType type, const QString &key, const QString &strDescription = ""); + /** + * @brief 根据类型和key值移除项 + * @author ut000610 戴正文 + * @param type 类型 + * @param key key值 + * @return + */ + bool removeItem(ItemFuncType type, const QString &key); + /** + * @brief 针对列表中的一项进行更新 + * @author ut000610 戴正文 + * @param type + * @param key + * @param newKey + * @param strDescription 新key值 + * @return + */ + bool updateItem(ItemFuncType type, const QString &key, const QString &newKey, const QString &strDescription = ""); + /** + * @brief 获取列表中项的数量 + * @author ut000610 戴正文 + * @return + */ + int count(); + /** + * @brief 清空数据,刷新列表需要清空数据 + * @author ut000610 戴正文 + */ + void clearData(); + /** + * @brief 根据名称获取现有列表的index + * @author ut000610 戴正文 + * @param key + * @param type + * @return + */ + int indexFromString(const QString &key, ItemFuncType type = ItemFuncType_Item); + /** + * @brief 返回焦点选中的index + * @author ut000610 戴正文 + * @return + */ + int currentIndex(); + /** + * @brief 获取当前下一个的index 实质判断现在此index是否可用 + * @author ut000610 戴正文 + * @param index + * @return + */ + int getNextIndex(int index); + /** + * @brief 设置当前焦点 + * @author ut000610 戴正文 + * @param currentIndex 当前index + */ + void setCurrentIndex(int currentIndex); + /** + * @brief 清空焦点 清空index + * @author ut000610 戴正文 + */ + void clearIndex(); + /** + * @brief 根据index切换焦点 + * @author ut000610 戴正文 + * @param currentIndex 当前项的值 + * @param focusType:ListFocusUp,向上;ListFocusDown, 向下;ListFocusHome, 第一个;ListFocusEnd, 最后一个;ListFocusPageUp, 向上翻页;ListFocusPageDown 向下翻页 + */ + void setFocusFromeIndex(int currentIndex, ListFocusType focusType); + /** + * @brief 因为上下键或者Tab丢失焦点 + * @author ut000610 戴正文 + * @param preIndex 丢失焦点前的项 + */ + void lostFocus(int preIndex); + /** + * @brief 将滚轮设置到当前项 + * @author ut000610 戴正文 + * @param currentIndex 当前项的值 + */ + void setScroll(int currentIndex); + /** + * @brief 获得焦点状态 + * @author ut000610 戴正文 + * @return + */ + bool getFocusState() const; + /** + * @brief 设置焦点状态 + * @author ut000610 戴正文 + * @param focusState + */ + void setFocusState(bool focusState); + /** + * @brief 添加项到布局,根据类型进行数据的插入位置的选择,按type和key值,以及strDescription排序 + * @author ut000610 戴正文 + * @param itemWidget + * @return + */ + int getWidgetIndex(ItemWidget *itemWidget); + +public slots: + /** + * @brief 表项被修改,弹出弹窗给用户修改 + * @param key Item项 + * @param isFocusOn 是否有焦点 + */ + void onItemModify(const QString &key, bool isFocusOn); + +private slots: + /** + * @brief 焦点切出 + * @author ut000438 王亮 + * @param type + */ + void onFocusOut(Qt::FocusReason type); + /** + * @brief 列表项点击事件 + * @author ut000438 王亮 + */ + void onItemClicked(); + /** + * @brief 分组项被点击 + * @author + * @param strName 分组项名称 + * @param isFocus 是否有焦点 + */ + void onGroupClicked(const QString &strName, bool isFocus = false); + + /** + * @brief 编辑自定义命令弹窗finished + * @author ut000438 王亮 + * @param result + */ + void onCustomCommandOptDlgFinished(int result); + /** + * @brief 删除自定义命令弹窗finished + * @author ut000438 王亮 + * @param result + */ + void onDeleteCustomCommandFinished(int result); + + /** + * @brief 编辑远程服务器弹窗finished + * @author ut000438 王亮 + * @param result + */ + void onServerConfigOptDlgFinished(int result); + /** + * @brief 删除远程服务器弹窗finished + * @author ut000438 王亮 + * @param result + */ + void onDeleteServerDialogFinished(int result); + +signals: + // 列表数量变化 + void listItemCountChange(); + // 列表项被点击 + void itemClicked(const QString &key); + // 分组项被点击 + void groupClicked(const QString &key, bool isFocus); + // 列表项要被修改 + // void itemModify(const QString &key); + // 焦点Tab出 + void focusOut(Qt::FocusReason type); + +protected: + /** + * @brief 键盘事件 对Tab和上下键进行处理 + * @author ut000610 戴正文 + * @param event 键盘事件 + */ + void keyPressEvent(QKeyEvent *event) override; + /** + * @brief 焦点进入事件 + * @author ut000610 戴正文 + * @param event 焦点事件 + */ + void focusInEvent(QFocusEvent *event) override; + /** + * @brief 鼠标移动事件 + * @author ut000610 戴正文 + */ + void mouseMoveEvent(QMouseEvent *) override; + /** + * @brief 鼠标按下事件 + * @author ut000610 戴正文 + */ + void mousePressEvent(QMouseEvent *) override; + +private: + // 列表类型 + ListType m_type; + // 焦点切出还是进入 true 焦点在 false 焦点不在 + bool m_focusState = false; + // 当前焦点 + int m_currentIndex = -1; + // 当前滚轮位置 + int m_scrollPostion = 0; + // 幕布 + DWidget *m_mainWidget = nullptr; + // 远程弹窗 + ServerConfigOptDlg *m_configDialog = nullptr; + // 自定义弹窗 + CustomCommandOptDlg *m_pdlg = nullptr; + // 主布局 + QVBoxLayout *m_mainLayout = nullptr; + // 列表项数据 + QList m_itemList; + + /** + * @brief 初始化UI界面,初始化列表,设置列表内布局,垂直布局,控件间隔10px + * @author ut000610 戴正文 + */ + void initUI(); + /** + * @brief 根据列表类型设置项图标,远程组图标 dt_server_group 远程服务器图标 dt_server 自定义图标 dt_command + * @author ut000610 戴正文 + * @param type 列表类型 + * @param item 列表项 + */ + void setItemIcon(ItemFuncType type, ItemWidget *item); + /** + * @brief 判断index的有效性 + * @author ut000610 戴正文 + * @param index + * @return + */ + bool indexIsValid(int index); + /** + * @brief 计算滚动条的range + * @author ut000610 戴正文 + * @param height 高度 + * @return + */ + int calculateRange(int height); + /** + * @brief 理远程管理修改项的弹窗操作 + * @author ut000610 戴正文 + * @param key 修改项 + * @param isFocusOn 是否有焦点 + */ + void onRemoteItemModify(const QString &key, bool isFocusOn); + /** + * @brief 自定义修改项 修改自定义项处理弹窗的操作 + * @author ut000610 戴正文 + * @param key 修改项 + * @param isFocusOn 是否有焦点 + */ + void onCustomItemModify(const QString &key, bool isFocusOn); +}; + +#endif // LISTVIEW_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/pagesearchbar.cpp deepin-terminal-5.4.13/src/views/pagesearchbar.cpp --- deepin-terminal-5.0.0+ds1/src/views/pagesearchbar.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/pagesearchbar.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,245 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "pagesearchbar.h" +#include "utils.h" +#include "mainwindow.h" + +#include + +#include +#include +#include +#include +#include +#include + +PageSearchBar::PageSearchBar(QWidget *parent) : DFloatingWidget(parent) +{ + Utils::set_Object_Name(this); + // Init + hide(); + setFixedSize(barWidth, barHight + 12); + // 设置窗体透明度的,需求为100% + QGraphicsOpacityEffect *opacityEffect = new QGraphicsOpacityEffect; + setGraphicsEffect(opacityEffect); + opacityEffect->setOpacity(opacity); + + initSearchEdit(); + initFindNextButton(); + initFindPrevButton(); + + // Init layout and widgets. + QHBoxLayout *m_layout = new QHBoxLayout(); + m_layout->setSpacing(widgetSpace); + m_layout->setContentsMargins(layoutMargins, layoutMargins, layoutMargins, layoutMargins); + m_layout->addWidget(m_searchEdit); + m_layout->addWidget(m_findPrevButton); + m_layout->addWidget(m_findNextButton); + setLayout(m_layout); +} + +bool PageSearchBar::isFocus() +{ + MainWindow *minwindow = Utils::getMainWindow(this); + DIconButton *addButton = minwindow->findChild("AddButton"); + if (addButton != nullptr) + QWidget::setTabOrder(m_findNextButton, addButton); + + return m_searchEdit->lineEdit()->hasFocus(); +} + +void PageSearchBar::focus() +{ + m_searchEdit->lineEdit()->setFocus(); + m_searchEdit->lineEdit()->selectAll(); + // 焦点一进入以后,就设置文字和图标,用于失去焦点后显示 + recoveryHoldContent(); +} + +QString PageSearchBar::searchKeytxt() +{ + return m_searchEdit->text(); +} + +void PageSearchBar::saveOldHoldContent() +{ + m_originalPlaceHolder = m_searchEdit->placeHolder(); +} + +//查找DSearchEdit中的DIconButton +/******************************************************************************* + 1. @函数: findIconBtn + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-11 + 4. @说明: 查找DSearchEdit中的DIconButton +*******************************************************************************/ +DIconButton *findIconBtn(DSearchEdit *searchEdit) +{ + QWidget *iconWidget = searchEdit->findChild("iconWidget"); + if (iconWidget != nullptr) { + DIconButton *iconBtn = iconWidget->findChild(); + if (nullptr == iconBtn) + qInfo() << "can not found iconBtn in DIconButton"; + + return iconBtn; + } else { + qInfo() << "can not found iconWidget in QWidget"; + if (searchEdit->findChild() == nullptr) + qInfo() << "can not found searchEdit in DIconButton"; + + return searchEdit->findChild(); + } +} + +void PageSearchBar::clearHoldContent() +{ + // 置空内容 + m_searchEdit->setPlaceHolder(""); + DIconButton *iconBtn = findIconBtn(m_searchEdit); + if (iconBtn != nullptr) + iconBtn->setIcon(QIcon("")); +} + +void PageSearchBar::recoveryHoldContent() +{ + // 还原文本 + m_searchEdit->setPlaceHolder(m_originalPlaceHolder); + DIconButton *iconBtn = findIconBtn(m_searchEdit); + if (iconBtn != nullptr) { + // 还原图标 + iconBtn->setIcon(DStyle::SP_IndicatorSearch); + } +} + +qint64 PageSearchBar::searchCostTime() +{ + if (0 == m_searchStartTime) { + qInfo() << __FUNCTION__ << "search time error!"; + return -1; + } + qint64 costTime = QDateTime::currentMSecsSinceEpoch() - m_searchStartTime; + m_searchStartTime = 0; + return costTime; +} + +void PageSearchBar::keyPressEvent(QKeyEvent *event) +{ + switch (event->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: { + // 搜索框有焦点的情况下 + if (m_searchEdit->lineEdit()->hasFocus()) { + Qt::KeyboardModifiers modify = event->modifiers(); + // 有shift修饰, Qt::KeypadModifier 修饰是否是小键盘 + if (Qt::ShiftModifier == modify + || (Qt::ShiftModifier | Qt::KeypadModifier) == modify) { + // shift + enter 查找前一个 + m_findPrevButton->animateClick(80); + } + // 没有shift修饰 + else if (Qt::NoModifier == modify || Qt::KeypadModifier == modify) { + // 查找下一个 + m_findNextButton->animateClick(80); + } + } + } + break; + default: + DFloatingWidget::keyPressEvent(event); + break; + } +} + +void PageSearchBar::initFindPrevButton() +{ + m_findPrevButton = new DIconButton(QStyle::SP_ArrowUp); + m_findNextButton->setObjectName("PageSearchBarFindNextDIconButton");//Add by ut001000 renfeixiang 2020-08-13 + m_findPrevButton->setFixedSize(widgetHight, widgetHight); + m_findPrevButton->setFocusPolicy(Qt::TabFocus); + + connect(m_findPrevButton, &DIconButton::clicked, this, [this]() { + if (!m_searchEdit->lineEdit()->text().isEmpty()) { + m_searchStartTime = QDateTime::currentMSecsSinceEpoch(); + emit findPrev(); + } + }); +} + +void PageSearchBar::initFindNextButton() +{ + m_findNextButton = new DIconButton(QStyle::SP_ArrowDown); + m_findNextButton->setObjectName("PageSearchBarFindNextDIconButton");//Add by ut001000 renfeixiang 2020-08-13 + m_findNextButton->setFixedSize(widgetHight, widgetHight); + m_findNextButton->setFocusPolicy(Qt::TabFocus); + + connect(m_findNextButton, &DIconButton::clicked, this, [this]() { + if (!m_searchEdit->lineEdit()->text().isEmpty()) { + m_searchStartTime = QDateTime::currentMSecsSinceEpoch(); + emit findNext(); + } + }); +} + +void PageSearchBar::initSearchEdit() +{ + m_searchEdit = new DSearchEdit(this); + //fix bug#64976 按tab键循环切换到右上角X按钮时继续按tab键,焦点不能切换到搜索框 + //设置m_searchEdit->lineEdit()为m_searchEdit的focus代理 + m_searchEdit->setFocusPolicy(Qt::StrongFocus); + m_searchEdit->setFocusProxy(m_searchEdit->lineEdit()); + m_searchEdit->setObjectName("PageSearchBarSearchEdit");//Add by ut001000 renfeixiang 2020-08-13 + m_searchEdit->lineEdit()->setMinimumHeight(widgetHight); + + // 保留原文字,图标 + saveOldHoldContent(); + // 置空 + clearHoldContent(); + + // 把DTK好容易改造的功能,还原了........ + // 把那个"X"控件功能还原成仅为清空文本 + QList list = m_searchEdit->lineEdit()->findChildren(); + QAction *clearAction = m_searchEdit->lineEdit()->findChild(QLatin1String("_q_qlineeditclearaction")); + if (clearAction != nullptr) { + for (int i = 0; i < list.count(); i++) { + if (list.at(i)->defaultAction() == clearAction) { + QToolButton *clearBtn = list.at(i); + //屏蔽lineedit清除按钮的槽函数,_q_clearFocus()获得有效的判断条件 + clearBtn->disconnect(SIGNAL(clicked())); + connect(clearBtn, &QToolButton::clicked, this, [this]() { + m_searchEdit->lineEdit()->setText(""); + }); + } + } + } else { + qInfo() << "can not found _q_qlineeditclearaction in QAction"; + } + + // 需求不让自动查找,这个接口预留 + connect(m_searchEdit, &DSearchEdit::textChanged, this, [this]() { + emit keywordChanged(m_searchEdit->lineEdit()->text()); + }); +} + +void PageSearchBar::setNoMatchAlert(bool isAlert) +{ + m_searchEdit->setAlert(isAlert); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/pagesearchbar.h deepin-terminal-5.4.13/src/views/pagesearchbar.h --- deepin-terminal-5.0.0+ds1/src/views/pagesearchbar.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/pagesearchbar.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,150 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef PAGESEARCHBAR_H +#define PAGESEARCHBAR_H + +// dtk +#include +#include +#include +#include +#include +#include + +// qt +#include +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: PageSearchBar + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class PageSearchBar : public DFloatingWidget +{ + Q_OBJECT +public: + explicit PageSearchBar(QWidget *parent = nullptr); + + /** + * @brief 是否存在焦点 + * @author ut000439 wangpeili + * @return + */ + bool isFocus(); + /** + * @brief 焦点一进入以后,就设置文字和图标,用于失去焦点后显示 + * @author ut000439 wangpeili + */ + void focus(); + /** + * @brief 设置不匹配警报 + * @author ut000610 daizhengwen + * @param isAlert 是否警报 + */ + void setNoMatchAlert(bool isAlert); + /** + * @brief 获取搜索框内信息 + * @author ut000439 wangpeili + * @return + */ + QString searchKeytxt(); + /** + * @brief 保存旧保留内容 + * @author ut000439 wangpeili + */ + void saveOldHoldContent(); + /** + * @brief 清除保留内容 + * @author ut000439 wangpeili + */ + void clearHoldContent(); + /** + * @brief 恢复保留内容 + * @author ut000439 wangpeili + */ + void recoveryHoldContent(); + + /** + * @brief 获取查找消耗的时间 => 用于性能测试 + * @author ut000610 戴正文 + * @return + */ + qint64 searchCostTime(); + +signals: + void findNext(); + void findPrev(); + void keywordChanged(QString keyword); + void closeSearchBar(); + +protected: + /** + * @brief 键盘事件,处理Enter, shift Enter事件 + * @author ut000610 戴正文 + * @param event 键盘事件 + */ + void keyPressEvent(QKeyEvent *event) override; + +private: + /** + * @brief 初始化查找上一个按钮 + * @author ut000610 daizhengwen + */ + void initFindPrevButton(); + /** + * @brief 初始化查找下一个按钮 + * @author ut000610 daizhengwen + */ + void initFindNextButton(); + /** + * @brief 初始化搜索 + * @author ut000610 daizhengwen + */ + void initSearchEdit(); + + DIconButton *m_findNextButton = nullptr; + DIconButton *m_findPrevButton = nullptr; + DSearchEdit *m_searchEdit = nullptr; + + const int barHight = 50; + const int barWidth = 382; + const int layoutMargins = 7; + const int widgetHight = 36; + const int widgetSpace = 10; + + const int iconHight = 6; + const int iconWidth = 12; + + const qreal opacity = 0.9; + QString m_originalPlaceHolder; //原文字 + + + // 方便性能测试,记住查找开始时间 + qint64 m_searchStartTime = 0; +}; + +#endif diff -Nru deepin-terminal-5.0.0+ds1/src/views/rightpanel.cpp deepin-terminal-5.4.13/src/views/rightpanel.cpp --- deepin-terminal-5.0.0+ds1/src/views/rightpanel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/rightpanel.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rightpanel.h" +#include"utils.h" +#include"mainwindow.h" + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +RightPanel::RightPanel(QWidget *parent) : QWidget(parent) +{ + // hide by default. + QWidget::hide(); + + setFixedWidth(240 + 2); + + // Init theme panel. + // 插件不支持resize,下面代码不需要了 +// DAnchorsBase::setAnchor(this, Qt::AnchorTop, parent, Qt::AnchorTop); +// DAnchorsBase::setAnchor(this, Qt::AnchorBottom, parent, Qt::AnchorBottom); +// DAnchorsBase::setAnchor(this, Qt::AnchorRight, parent, Qt::AnchorRight); +} + +void RightPanel::showAnim() +{ + QWidget::show(); + QWidget::raise(); + + QRect rect = geometry(); + QRect windowRect = window()->geometry(); + QPropertyAnimation *animation = new QPropertyAnimation(this, "geometry",this); + animation->setDuration(250); + animation->setEasingCurve(QEasingCurve::OutQuad); + /***mod begin by ut001121 zhangmeng 20200918 修复BUG48374 全屏下插件被截断的问题***/ + int panelHeight = windowRect.height(); + MainWindow *w = Utils::getMainWindow(this); + if (w && w->titlebar()->isVisible()) + panelHeight -= WIN_TITLE_BAR_HEIGHT; + + animation->setStartValue(QRect(windowRect.width(), rect.y(), rect.width(), panelHeight)); + animation->setEndValue(QRect(windowRect.width() - rect.width(), rect.y(), rect.width(), panelHeight)); + /***mod end by ut001121***/ + animation->start(QAbstractAnimation::DeleteWhenStopped); +} + +void RightPanel::hideAnim() +{ + // 隐藏状态不处理 + if (!isVisible()) + return; + + QRect rect = geometry(); + QRect windowRect = window()->geometry(); + QPropertyAnimation *animation = new QPropertyAnimation(this, "geometry", this); + animation->setDuration(250); + animation->setEasingCurve(QEasingCurve::OutQuad); + /***mod begin by ut001121 zhangmeng 20200918 修复BUG48374 全屏下插件被截断的问题***/ + int panelHeight = windowRect.height(); + MainWindow *w = Utils::getMainWindow(this); + if (w && w->titlebar()->isVisible()) + panelHeight -= WIN_TITLE_BAR_HEIGHT; + + animation->setStartValue(QRect(windowRect.width() - rect.width(), rect.y(), rect.width(), panelHeight)); + animation->setEndValue(QRect(windowRect.width(), rect.y(), rect.width(), panelHeight)); + /***mod end by ut001121***/ + + /***mod begin by ut001121 zhangmeng 20200924 修复BUG49378***/ + //结束处理 + connect(animation, &QPropertyAnimation::finished, this, [ = ] { + //启用面板 + setEnabled(true); + //隐藏面板 + hide(); + }); + + //禁用面板 + setEnabled(false); + + //开始动画 + animation->start(QAbstractAnimation::DeleteWhenStopped); + /***mod end by ut001121***/ +} + +void RightPanel::hideEvent(QHideEvent *event) +{ + /***add begin by ut001121 zhangmeng 20200801 解决终端插件被隐藏时焦点回退到工作区的问题***/ + if (QApplication::focusWidget()) { + // 焦点控件的全局坐标 + QPoint focusPoint = QApplication::focusWidget()->mapToGlobal(QPoint(0, 0)); + // 焦点相对当前控件坐标 + focusPoint = mapFromGlobal(focusPoint); + + // 判断是否包含坐标 + if (rect().contains(focusPoint)) { + MainWindow *w = Utils::getMainWindow(this); + if(w) + w->focusCurrentPage(); + } + } + /***add end by ut001121***/ + + QWidget::hideEvent(event); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/rightpanel.h deepin-terminal-5.4.13/src/views/rightpanel.h --- deepin-terminal-5.0.0+ds1/src/views/rightpanel.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/rightpanel.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef RIGHTPANEL_H +#define RIGHTPANEL_H + +#include + +/******************************************************************************* + 1. @类名: RightPanel + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class RightPanel : public QWidget +{ + Q_OBJECT +public: + explicit RightPanel(QWidget *parent = nullptr); + + /** + * @brief 处理隐藏事件 + * @author ut001121 张猛 + * @param event 隐藏事件 + */ + void hideEvent(QHideEvent *event) override; +public slots: + /** + * @brief 动画显示 + * @author ut000610 daizhengwen + */ + void showAnim(); + /** + * @brief 动画隐藏 + * @author ut000610 daizhengwen + */ + void hideAnim(); + +}; + +#endif // RIGHTPANEL_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabbar.cpp deepin-terminal-5.4.13/src/views/tabbar.cpp --- deepin-terminal-5.0.0+ds1/src/views/tabbar.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabbar.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,960 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tabbar.h" +#include "utils.h" +#include "termwidget.h" +#include "termwidgetpage.h" +#include "windowsmanager.h" +#include "terminalapplication.h" +#include "private/qtabbar_p.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +//TermTabStyle类开始,该类用于设置tab标签样式 +TermTabStyle::TermTabStyle() : m_tabCount(0) +{ + Utils::set_Object_Name(this); +} + +TermTabStyle::~TermTabStyle() +{ +} + +void TermTabStyle::setTabTextColor(const QColor &color) +{ + m_tabTextColor = color; +} + +void TermTabStyle::setTabStatusMap(const QMap &tabStatusMap) +{ + m_tabStatusMap = tabStatusMap; +} + +QSize TermTabStyle::sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const +{ + return QProxyStyle::sizeFromContents(type, option, size, widget); +} + +int TermTabStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const +{ + return QProxyStyle::pixelMetric(metric, option, widget); +} + +void TermTabStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const +{ + if (CE_TabBarTabLabel == element) { + if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { + DGuiApplicationHelper *appHelper = DGuiApplicationHelper::instance(); + + QTextOption textOption; + textOption.setAlignment(Qt::AlignCenter); + + QFont textFont = QApplication::font(); + int fontSize = DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T6); + textFont.setPixelSize(fontSize); + textFont.setWeight(QFont::Medium); + painter->setFont(textFont); + QString content = tab->text; + QRect tabRect = tab->rect; + + QString strTabIndex = QString::number(tab->row); + QObject *styleObject = option->styleObject; + // 取出对应index的tab唯一标识identifier + QString strTabIdentifier = styleObject->property(strTabIndex.toLatin1()).toString(); + + // 由于标签现在可以左右移动切换,index会变化,改成使用唯一标识identifier进行判断 + if (TabTextColorStatus_Changed == m_tabStatusMap.value(strTabIdentifier)) { + if (tab->state & QStyle::State_Selected) { + DPalette pa = appHelper->standardPalette(appHelper->themeType()); + painter->setPen(pa.color(DPalette::HighlightedText)); + } else if (tab->state & QStyle::State_MouseOver) { + painter->setPen(m_tabTextColor); + } else { + painter->setPen(m_tabTextColor); + } + } else { + DPalette pa = appHelper->standardPalette(appHelper->themeType()); + if (tab->state & QStyle::State_Selected) + painter->setPen(pa.color(DPalette::HighlightedText)); + else if (tab->state & QStyle::State_MouseOver) + painter->setPen(pa.color(DPalette::TextTitle)); + else + painter->setPen(pa.color(DPalette::TextTitle)); + + } + + QFontMetrics fontMetric(textFont); + const int TAB_LEFTRIGHT_SPACE = 30; + QString elidedText = fontMetric.elidedText(content, Qt::ElideRight, tabRect.width() - TAB_LEFTRIGHT_SPACE, Qt::TextShowMnemonic); + painter->drawText(tabRect, elidedText, textOption); + } else { + QProxyStyle::drawControl(element, option, painter, widget); + } + } else { + QProxyStyle::drawControl(element, option, painter, widget); + } +} + +void TermTabStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const +{ + QProxyStyle::drawPrimitive(element, option, painter, widget); +} +//TermTabStyle 结束 + +/******************************************************************************* + 1. @函数: initStyleOption + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 初始化样式选项 +*******************************************************************************/ +void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const +{ + Q_D(const QTabBar); + d->initBasicStyleOption(option, tabIndex); + + QRect textRect = style()->subElementRect(QStyle::SE_TabBarTabText, option, this); + option->text = fontMetrics().elidedText(option->text, d->elideMode, textRect.width(), + Qt::TextShowMnemonic); + + /*********** Modify by ut000438 王亮 2020-11-25:fix bug 55813: 拖拽终端标签页终端闪退 ***********/ + if (tabIndex >= 0) { + // 保存对应index的tab唯一标识identifier + option->styleObject->setProperty(QString("%1").arg(tabIndex).toLatin1(), tabData(tabIndex)); + // 保存tab的索引值到row字段 + option->row = tabIndex; + } +} + +TabBar::TabBar(QWidget *parent) : DTabBar(parent), m_rightClickTab(-1) +{ + Utils::set_Object_Name(this); + m_termTabStyle = new TermTabStyle(); + setStyle(m_termTabStyle); + + m_sessionIdTabIndexMap.clear(); + m_sessionIdTabIdMap.clear(); + m_tabStatusMap.clear(); + + installEventFilter(this); + + //启用关闭tab动画效果 + setEnableCloseTabAnimation(true); + setTabsClosable(true); + setVisibleAddButton(true); + setElideMode(Qt::ElideRight); + setFocusPolicy(Qt::TabFocus); + setStartDragDistance(40); + + setTabHeight(36); + setTabItemMinWidth(110); + setTabItemMaxWidth(450); + + //统一设置Tab拖动/移动状态 + updateTabDragMoveStatus(); + + DIconButton *addButton = findChild("AddButton"); + if (nullptr != addButton) + addButton->setFocusPolicy(Qt::TabFocus); + + connect(this, &DTabBar::tabBarClicked, this, &TabBar::handleTabBarClicked); + + // 用于窗口tab拖拽 + connect(this, &DTabBar::tabMoved, this, &TabBar::handleTabMoved); + connect(this, &DTabBar::tabDroped, this, &TabBar::handleTabDroped); + connect(this, &DTabBar::tabIsRemoved, this, &TabBar::handleTabIsRemoved); + connect(this, &DTabBar::tabReleaseRequested, this, &TabBar::handleTabReleased); + connect(this, &DTabBar::dragActionChanged, this, &TabBar::handleDragActionChanged); +} + +TabBar::~TabBar() +{ + if (m_rightMenu != nullptr) + m_rightMenu->deleteLater(); + + if (m_termTabStyle != nullptr) + delete m_termTabStyle; +} + +void TabBar::setTabHeight(int tabHeight) +{ + m_tabHeight = tabHeight; + setFixedHeight(tabHeight); +} + +void TabBar::setTabItemMinWidth(int tabItemMinWidth) +{ + m_tabItemMinWidth = tabItemMinWidth; +} + +void TabBar::setTabItemMaxWidth(int tabItemMaxWidth) +{ + m_tabItemMaxWidth = tabItemMaxWidth; +} + +const QString TabBar::identifier(int index) const +{ + return tabData(index).toString(); +} + +int TabBar::addTab(const QString &tabIdentifier, const QString &tabName) +{ + int index = DTabBar::addTab(tabName); + setTabData(index, QVariant::fromValue(tabIdentifier)); + + updateTabDragMoveStatus(); + + m_tabIdentifierList << tabIdentifier; + + return index; +} + +int TabBar::insertTab(const int &index, const QString &tabIdentifier, const QString &tabName) +{ + qInfo() << "insertTab at index: " << index << " with id::" << tabIdentifier << endl; + int insertIndex = DTabBar::insertTab(index, tabName); + setTabData(insertIndex, QVariant::fromValue(tabIdentifier)); + + updateTabDragMoveStatus(); + + m_tabIdentifierList.insert(index, tabIdentifier); + + return insertIndex; +} + +void TabBar::saveSessionIdWithTabIndex(int sessionId, int index) +{ + m_sessionIdTabIndexMap.insert(sessionId, index); +} + +void TabBar::saveSessionIdWithTabId(int sessionId, const QString &tabIdentifier) +{ + m_sessionIdTabIdMap.insert(sessionId, tabIdentifier); +} + +QMap TabBar::getSessionIdTabIndexMap() +{ + return m_sessionIdTabIndexMap; +} + +int TabBar::queryIndexBySessionId(int sessionId) +{ + if (m_sessionIdTabIndexMap.isEmpty()) + return -1; + + QString tabIdentifier = m_sessionIdTabIdMap.value(sessionId); + + for (int i = 0; i < count(); i++) { + if (identifier(i) == tabIdentifier) { + return i; + } + } + + return -1; +} + +int TabBar::getIndexByIdentifier(QString id) +{ + for (int i = 0; i < count(); i++) { + if (identifier(i) == id) + return i; + } + return -1; +} + +/*! + Removes the tab at position \a index. + + \sa SelectionBehavior + */ +/******************************************************************************* + 1. @函数: removeTab + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 通过索引删除标签 +*******************************************************************************/ +void QTabBar::removeTab(int index) +{ + Q_D(QTabBar); + if (d->validIndex(index)) { + if (d->dragInProgress) + d->moveTabFinished(d->pressedIndex); + +#ifndef QT_NO_SHORTCUT + releaseShortcut(d->tabList.at(index).shortcutId); +#endif + if (d->tabList[index].leftWidget) { + d->tabList[index].leftWidget->hide(); + d->tabList[index].leftWidget->deleteLater(); + d->tabList[index].leftWidget = nullptr; + } + if (d->tabList[index].rightWidget) { + d->tabList[index].rightWidget->hide(); + d->tabList[index].rightWidget->deleteLater(); + d->tabList[index].rightWidget = nullptr; + } + + int newIndex = d->tabList[index].lastTab; + d->tabList.removeAt(index); + for (int i = 0; i < d->tabList.count(); ++i) { + if (d->tabList[i].lastTab == index) + d->tabList[i].lastTab = -1; + if (d->tabList[i].lastTab > index) + --d->tabList[i].lastTab; + } + if (index == d->currentIndex) { + // The current tab is going away, in order to make sure + // we emit that "current has changed", we need to reset this + // around. + d->currentIndex = -1; + if (d->tabList.size() > 0) { + switch (d->selectionBehaviorOnRemove) { + case SelectPreviousTab: + if (newIndex > index) + newIndex--; + if (d->validIndex(newIndex)) + break; + Q_FALLTHROUGH(); + case SelectRightTab: + newIndex = index; + if (newIndex >= d->tabList.size()) + newIndex = d->tabList.size() - 1; + break; + case SelectLeftTab: + newIndex = index - 1; + if (newIndex < 0) + newIndex = 0; + break; + } + + if (d->validIndex(newIndex)) { + // don't loose newIndex's old through setCurrentIndex + int bump = d->tabList[newIndex].lastTab; + setCurrentIndex(newIndex); + d->tabList[newIndex].lastTab = bump; + } + } else { + emit currentChanged(-1); + } + } else if (index < d->currentIndex) { + setCurrentIndex(d->currentIndex - 1); + } + d->refresh(); + d->autoHideTabs(); + if (!d->hoverRect.isEmpty()) { + for (int i = 0; i < d->tabList.count(); ++i) { + const QRect area = tabRect(i); + if (area.contains(mapFromGlobal(QCursor::pos()))) { + d->hoverIndex = i; + d->hoverRect = area; + break; + } + } + update(d->hoverRect); + } + tabRemoved(index); + } + + TabBar *tabBar = qobject_cast(this->parent()); + + if (tabBar && tabBar->isEnableCloseTabAnimation()) { + //tab关闭动画 + if (d->rightB->isVisible()) { + for (int i = 0; i < index; i++) { + QTabBarPrivate::Tab *tab = &d->tabList[i]; + + if (!tab->animation) + tab->animation = reinterpret_cast(new QTabBarPrivate::Tab::TabBarAnimation(tab, d)); + tab->animation->setStartValue(-100); + tab->animation->setEndValue(0); + tab->animation->setEasingCurve(QEasingCurve::OutCubic); + tab->animation->setDuration(300); + tab->animation->start(); + } + } + } +} + +void TabBar::removeTab(const QString &tabIdentifier) +{ + for (int i = 0; i < count(); i++) { + if (tabData(i).toString() == tabIdentifier) { + DTabBar::removeTab(i); + break; + } + } + + updateTabDragMoveStatus(); +} + +bool TabBar::setTabText(const QString &tabIdentifier, const QString &text) +{ + bool termFound = false; + + for (int i = 0; i < count(); i++) { + if (tabData(i).toString() == tabIdentifier) { + termFound = true; + DTabBar::setTabText(i, text); + break; + } + } + + return termFound; +} + +bool TabBar::eventFilter(QObject *watched, QEvent *event) +{ + Q_UNUSED(watched) + + if (QEvent::MouseButtonPress == event->type()) { + QMouseEvent *mouseEvent = static_cast(event); + + if (Qt::RightButton == mouseEvent->button()) { + bool isHandle = handleRightButtonClick(mouseEvent); + if (isHandle) + return isHandle; + } else if (Qt::MiddleButton == mouseEvent->button()) { + handleMiddleButtonClick(mouseEvent); + } + } else if (QEvent::DragEnter == event->type()) { + } else if (QEvent::DragLeave == event->type()) { + } else if (QEvent::Drop == event->type()) { + } else if (QEvent::DragMove == event->type()) { + event->accept(); + } + + return false; +} + +inline void TabBar::handleMiddleButtonClick(QMouseEvent *mouseEvent) +{ + //鼠标中键点击关闭标签页 + int index = -1; + QPoint position = mouseEvent->pos(); + + for (int i = 0; i < this->count(); i++) { + if (tabRect(i).contains(position)) { + index = i; + break; + } + } + if (index >= 0) + emit tabCloseRequested(index); +} + +inline bool TabBar::handleRightButtonClick(QMouseEvent *mouseEvent) +{ + QPoint position = mouseEvent->pos(); + m_rightClickTab = -1; + + for (int i = 0; i < this->count(); i++) { + if (tabRect(i).contains(position)) { + m_rightClickTab = i; + break; + } + } + qInfo() << "currIndex" << m_rightClickTab << endl; + + // 弹出tab标签的右键菜单 + if (m_rightClickTab >= 0) { + if (m_rightMenu == nullptr) { + m_rightMenu = new DMenu(this); + m_rightMenu->setObjectName("TabBarRightMenu");//Add by ut001000 renfeixiang 2020-08-13 + } else { + // clear时,对于绑在menu下面的action会自动释放,无需单独处理action释放 + m_rightMenu->clear(); + } + + m_closeTabAction = new QAction(QObject::tr("Close tab"), m_rightMenu); + m_closeTabAction->setObjectName("TabBarCloseTabAction");//Add by ut001000 renfeixiang 2020-08-13 + + m_closeOtherTabAction = new QAction(QObject::tr("Close other tabs"), m_rightMenu); + m_closeOtherTabAction->setObjectName("TabBarCloseOtherTabAction");//Add by ut001000 renfeixiang 2020-08-13 + + m_renameTabAction = new QAction(QObject::tr("Rename title"), m_rightMenu); + m_renameTabAction->setObjectName("TabTitleRenameAction");//Add by dzw 2020-11-02 + + connect(m_closeTabAction, &QAction::triggered, this, &TabBar::onCloseTabActionTriggered); + + connect(m_closeOtherTabAction, &QAction::triggered, this, &TabBar::onCloseOtherTabActionTriggered); + + connect(m_renameTabAction, &QAction::triggered, this, &TabBar::onRenameTabActionTriggered); + + m_rightMenu->addAction(m_closeTabAction); + m_rightMenu->addAction(m_closeOtherTabAction); + m_rightMenu->addAction(m_renameTabAction); + + m_closeOtherTabAction->setEnabled(true); + if (this->count() < 2) + m_closeOtherTabAction->setEnabled(false); + + m_rightMenu->exec(mapToGlobal(position)); + + return true; + } + + return false; +} + +inline void TabBar::onCloseTabActionTriggered() +{ + Q_EMIT tabCloseRequested(m_rightClickTab); +} + +inline void TabBar::onCloseOtherTabActionTriggered() +{ + emit menuCloseOtherTab(identifier(m_rightClickTab)); +} + +inline void TabBar::onRenameTabActionTriggered() +{ + emit showRenameTabDialog(identifier(m_rightClickTab)); +} + +/******************************************************************************* + 1. @函数: dropShadow + 2. @作者: ut000438 王亮 + 3. @日期: 2020-11-16 + 4. @说明: 根据原图像生成对应的阴影图像 +*******************************************************************************/ +QPixmap dropShadow(const QPixmap &source, qreal radius, const QColor &color, const QPoint &offset) +{ + QImage shadow = dropShadow(source, radius, color); + shadow.setDevicePixelRatio(source.devicePixelRatio()); + + QPainter pa(&shadow); + pa.setCompositionMode(QPainter::CompositionMode_SourceOver); + pa.drawPixmap(QPointF(radius - offset.x(), radius - offset.y()), source); + pa.end(); + + return QPixmap::fromImage(shadow); +} + +QPixmap TabBar::createDragPixmapFromTab(int index, const QStyleOptionTab &option, QPoint *hotspot) const +{ + Q_UNUSED(option) + + const qreal ratio = qApp->devicePixelRatio(); + + QString termIdentifer = identifier(index); + MainWindow *w = qobject_cast(this->window()); + if(!w) + return QPixmap(); + TermWidgetPage *termPage = w->getTermPage(termIdentifer); + /******** fix bug 70389:连接高分屏,合并/分开窗口动画显示异常 ***************/ + int width = termPage->width(); + int height = termPage->height(); + QImage screenshotImage(width, height, QImage::Format_ARGB32_Premultiplied); + screenshotImage.setDevicePixelRatio(ratio); + termPage->render(&screenshotImage, QPoint(), QRegion(0, 0, width, height)); + + // 根据对应的ration缩放图像 + int scaledWidth = static_cast((width * ratio) / 5); + int scaledHeight = static_cast((height * ratio) / 5); + auto scaledImage = screenshotImage.scaled(scaledWidth, scaledHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + + const int shadowRadius = 10; + QImage backgroundImage(scaledWidth + shadowRadius, scaledHeight + shadowRadius, QImage::Format_ARGB32_Premultiplied); + backgroundImage.fill(QColor(palette().color(QPalette::Base))); + //使用对应的window radius裁剪截图图像。 + QPainter painter(&backgroundImage); + painter.drawImage(5, 5, scaledImage); + painter.setRenderHint(QPainter::Antialiasing, true); + + if (1 == count()) + this->window()->hide(); + + //调整偏移量 + hotspot->setX(scaledWidth / 2); + hotspot->setY(scaledHeight / 2); + + QPainterPath rectPath; + + //当开启了窗口特效时 + if (DWindowManagerHelper::instance()->hasComposite()) { + QPainterPath roundedRectPath; + + const int cornerRadius = 6; + rectPath.addRect(0, 0, scaledWidth + shadowRadius, scaledHeight + shadowRadius); + roundedRectPath.addRoundedRect(QRectF(0, + 0, + (scaledWidth / ratio) + shadowRadius, + (scaledHeight) / ratio + shadowRadius), + cornerRadius, + cornerRadius); + + rectPath -= roundedRectPath; + + painter.setCompositionMode(QPainter::CompositionMode_Source); + painter.fillPath(rectPath, Qt::transparent); + + QColor shadowColor = QColor(palette().color(QPalette::BrightText)); + shadowColor.setAlpha(80); + + painter.end(); + + return dropShadow(QPixmap::fromImage(backgroundImage), 5, shadowColor, QPoint(0, 0)); + } else { + painter.end(); + + return QPixmap::fromImage(backgroundImage); + } +} + +QMimeData *TabBar::createMimeDataFromTab(int index, const QStyleOptionTab &option) const +{ + Q_UNUSED(option) + + const QString tabName = tabText(index); + + MainWindow *window = static_cast(this->window()); + TermWidgetPage *termPage = window->currentPage(); + if (!termPage) + return nullptr; + + QMimeData *mimeData = new QMimeData; + + //保存工作区页面TermWidgetPage、标签页名称数据到QMimeData + mimeData->setProperty("termpage", QVariant::fromValue(static_cast(termPage))); + mimeData->setData("deepin-terminal/tabbar", tabName.toUtf8()); + + return mimeData; +} + +void TabBar::insertFromMimeDataOnDragEnter(int index, const QMimeData *source) +{ + if (nullptr == source) + return; + + const QString tabName = QString::fromUtf8(source->data("deepin-terminal/tabbar")); + + QVariant pVar = source->property("termpage"); + TermWidgetPage *termPage = static_cast(pVar.value()); + + if (nullptr == termPage) + return; + + MainWindow *window = static_cast(this->window()); + window->addTabWithTermPage(tabName, true, true, termPage, index); + window->focusCurrentPage(); + + updateTabDragMoveStatus(); +} + +void TabBar::insertFromMimeData(int index, const QMimeData *source) +{ + if (nullptr == source) + return; + + const QString tabName = QString::fromUtf8(source->data("deepin-terminal/tabbar")); + + QVariant pVar = source->property("termpage"); + TermWidgetPage *termPage = static_cast(pVar.value()); + + if (nullptr == termPage) + return; + + MainWindow *window = static_cast(this->window()); + window->addTabWithTermPage(tabName, true, false, termPage, index); + window->focusCurrentPage(); + + updateTabDragMoveStatus(); +} + +bool TabBar::canInsertFromMimeData(int index, const QMimeData *source) const +{ + Q_UNUSED(index) + //根据标签的QMimeData的MIME类型(即format)判断是否可以将标签插入当前tab中 + return source->hasFormat("deepin-terminal/tabbar"); +} + +void TabBar::handleTabMoved(int fromIndex, int toIndex) +{ + if ((fromIndex < m_tabIdentifierList.count()) + && (toIndex < m_tabIdentifierList.count()) + && (fromIndex >= 0) + && (toIndex >= 0)) { + m_tabIdentifierList.swap(fromIndex, toIndex); + } +} + +void TabBar::handleTabReleased(int index) +{ + if (index < 0) + index = 0; + + qInfo() << "handleTabReleased: index: " << index; + const QString tabName = tabText(index); + + MainWindow *window = static_cast(this->window()); + + QString termIdentifer = identifier(index); + TermWidgetPage *termPage = window->getTermPage(termIdentifer); + + //使用拖拽出的TermWidgetPage页面新建窗口 + createWindowFromTermPage(tabName, termPage, true); + + //移除原窗口标签 + closeTab(index); + + //从原窗口中移除TermWidgetPage。 + window->removeTermWidgetPage(termIdentifer, false); + qInfo() << "removeTermWidgetPage: termIdentifer: " << termIdentifer; + + updateTabDragMoveStatus(); +} + +void TabBar::handleDragActionChanged(Qt::DropAction action) +{ + if (Qt::IgnoreAction == action) { + // 如果拖动标签页未成功,则将光标重置为Qt::ArrowCursor。 + if (dragIconWindow()) { + QGuiApplication::changeOverrideCursor(Qt::ArrowCursor); + DPlatformWindowHandle::setDisableWindowOverrideCursor(dragIconWindow(), true); + } + } else if (dragIconWindow()) { + DPlatformWindowHandle::setDisableWindowOverrideCursor(dragIconWindow(), false); + if (QGuiApplication::overrideCursor()) { + QGuiApplication::changeOverrideCursor(QGuiApplication::overrideCursor()->shape()); + } + } +} + +void TabBar::createWindowFromTermPage(const QString &tabName, TermWidgetPage *termPage, bool isActiveTab) +{ + //创建窗口 + TermProperties properties; + properties[DragDropTerminal] = true; + WindowsManager::instance()->createNormalWindow(properties, false); + + MainWindow *window = WindowsManager::instance()->getNormalWindowList().last(); + + //当关闭最后一个窗口时退出整个应用 + connect(window, &MainWindow::close, this, &TabBar::handleWindowClose); + + window->addTabWithTermPage(tabName, isActiveTab, false, termPage); + window->move(calculateDragDropWindowPosition(window)); + + window->show(); +} + +QPoint TabBar::calculateDragDropWindowPosition(MainWindow *window) +{ + QPoint pos(QCursor::pos() - window->topLevelWidget()->pos()); + + return pos; +} + +inline void TabBar::handleWindowClose() +{ + MainWindow *window = qobject_cast(sender()); + if (nullptr == window) + return; + + int windowIndex = WindowsManager::instance()->getNormalWindowList().indexOf(window); + qInfo() << "Close window at index: " << windowIndex; + + if (windowIndex >= 0) + WindowsManager::instance()->getNormalWindowList().takeAt(windowIndex); + + if (WindowsManager::instance()->getNormalWindowList().isEmpty()) + QApplication::quit(); +} + +void TabBar::handleTabIsRemoved(int index) +{ + if ((index < 0) || (index >= m_tabIdentifierList.size())) + return; + + QString removeId = m_tabIdentifierList.at(index); + m_tabIdentifierList.removeAt(index); + + MainWindow *window = static_cast(this->window()); + window->removeTermWidgetPage(removeId, false); + qInfo() << "handleTabIsRemoved: identifier: " << removeId; + + updateTabDragMoveStatus(); +} + +void TabBar::closeTab(const int &index) +{ + DTabBar::removeTab(index); + + updateTabDragMoveStatus(); +} + +void TabBar::handleTabDroped(int index, Qt::DropAction dropAction, QObject *target) +{ + Q_UNUSED(dropAction) + + qInfo() << "handleTabDroped index:" << index << ", target:" << target << endl; + TabBar *tabbar = qobject_cast(target); + + //拖出的标签--需要新建窗口 + if (nullptr == tabbar) { + qInfo() << "tabbar == nullptr " << index << endl; + MainWindow *window = static_cast(this->window()); + //窗口不为雷神模式才允许移动 + if (!window->isQuakeMode()) + window->move(calculateDragDropWindowPosition(window)); + + window->show(); + window->activateWindow(); + } else { + //拖入的标签--需要关闭拖入窗口的标签页 + qInfo() << "tabbar != nullptr " << index << endl; + closeTab(index); + } + + updateTabDragMoveStatus(); +} + +QSize TabBar::minimumTabSizeHint(int index) const +{ + Q_UNUSED(index) + return QSize(m_tabItemMinWidth, m_tabHeight); +} + +QSize TabBar::maximumTabSizeHint(int index) const +{ + Q_UNUSED(index) + return QSize(m_tabItemMaxWidth, m_tabHeight); +} + +void TabBar::setNeedChangeTextColor(const QString &tabIdentifier, const QColor &color) +{ + m_tabStatusMap.insert(tabIdentifier, TabTextColorStatus_NeedChange); + m_tabChangedTextColor = color; +} + +void TabBar::removeNeedChangeTextColor(const QString &tabIdentifier) +{ + m_tabStatusMap.remove(tabIdentifier); + + TermTabStyle *style = qobject_cast(this->style()); + if (style) { + style->setTabStatusMap(m_tabStatusMap); + style->polish(this); + } +} + +void TabBar::setChangeTextColor(const QString &tabIdentifier) +{ + m_tabStatusMap.insert(tabIdentifier, TabTextColorStatus_Changed); + QColor color = m_tabChangedTextColor; + + TermTabStyle *style = qobject_cast(this->style()); + if (style) { + style->setTabTextColor(color); + style->setTabStatusMap(m_tabStatusMap); + style->polish(this); + } + //fix bug 53782程序运行完后,标签页字体颜色未变色 + this->update(); +} + +bool TabBar::isNeedChangeTextColor(const QString &tabIdentifier) +{ + return (m_tabStatusMap.value(tabIdentifier) == TabTextColorStatus_NeedChange); +} + +void TabBar::setClearTabColor(const QString &tabIdentifier) +{ + m_tabStatusMap.insert(tabIdentifier, TabTextColorStatus_Default); + + TermTabStyle *style = qobject_cast(this->style()); + if (style) { + style->setTabStatusMap(m_tabStatusMap); + style->polish(this); + } +} + +void TabBar::setTabStatusMap(const QMap &tabStatusMap) +{ + m_tabStatusMap = tabStatusMap; +} + +void TabBar::setEnableCloseTabAnimation(bool isEnableCloseTabAnimation) +{ + m_isEnableCloseTabAnimation = isEnableCloseTabAnimation; +} + +bool TabBar::isEnableCloseTabAnimation() +{ + return m_isEnableCloseTabAnimation; +} + +void TabBar::setIsQuakeWindowTab(bool isQuakeWindowTab) +{ + m_isQuakeWindowTab = isQuakeWindowTab; + + //刚初始化窗口同时, 更新Tab拖动/移动状态 + updateTabDragMoveStatus(); +} + +void TabBar::updateTabDragMoveStatus() +{ + if (m_isQuakeWindowTab && 1 == this->count()) { + setMovable(false); + setDragable(false); + return; + } + + setMovable(true); + setDragable(true); + + //针对雷神窗口单独进行处理 + MainWindow *quakeWindow = WindowsManager::instance()->getQuakeWindow(); + if (nullptr != quakeWindow) { + TabBar *quakeWindowTabbar = quakeWindow->findChild(this->metaObject()->className()); + if (1 == quakeWindowTabbar->count()) { + quakeWindowTabbar->setMovable(false); + quakeWindowTabbar->setDragable(false); + return; + } + + quakeWindowTabbar->setMovable(true); + quakeWindowTabbar->setDragable(true); + } +} + +void TabBar::setCurrentIndex(int index) +{ + DTabBar::setCurrentIndex(index); + this->removeNeedChangeTextColor(identifier(index)); +} + +void TabBar::handleTabBarClicked(int index) +{ + emit tabBarClicked(index, tabData(index).toString()); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabbar.h deepin-terminal-5.4.13/src/views/tabbar.h --- deepin-terminal-5.0.0+ds1/src/views/tabbar.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabbar.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,490 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TABBAR_H +#define TABBAR_H + +#include +#include + +#include + +DWIDGET_USE_NAMESPACE + +class TermWidgetPage; +class MainWindow; + +/******************************************************************************* + 1. @类名: TermTabStyle + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +//Tab文字颜色状态 +enum TabTextColorStatus { + //tab文字默认颜色 + TabTextColorStatus_Default = 0, + //tab文字即将变色 + TabTextColorStatus_NeedChange = 1, + //tab文字已经变色 + TabTextColorStatus_Changed = 2 +}; + +class TermTabStyle : public QProxyStyle +{ + Q_OBJECT +public: + TermTabStyle(); + virtual ~TermTabStyle(); + + /** + * @brief 设置标签文本颜色 + * @author ut000610 daizhengwen + * @param color 颜色 + */ + void setTabTextColor(const QColor &color); + /** + * @brief 设置标签状态图 + * @author ut000610 daizhengwen + * @param tabStatusMap 标签状态图 + */ + void setTabStatusMap(const QMap &tabStatusMap); + + /** + * @brief 获取内容大小 + * @author ut000610 daizhengwen + * @param type + * @param option + * @param size + * @param widget + * @return + */ + QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const; + /** + * @brief 像素指标 + * @author ut000610 daizhengwen + * @param metric + * @param option + * @param widget + * @return + */ + int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const; + /** + * @brief 绘制控件 + * @author ut000610 daizhengwen + * @param element + * @param option + * @param painter + * @param widget + */ + void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const; + /** + * @brief 绘制原始 + * @author ut000610 daizhengwen + * @param element + * @param option + * @param painter + * @param widget + */ + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = Q_NULLPTR) const; +private: + int m_tabCount; + QColor m_tabTextColor; + QMap m_tabStatusMap; +}; + +/******************************************************************************* + 1. @类名: TabBar + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +class TabBar : public DTabBar +{ + Q_OBJECT +public: + explicit TabBar(QWidget *parent = nullptr); + ~TabBar(); + + /** + * @brief 获取识别码 + * @author ut000610 daizhengwen + * @param index + * @return + */ + const QString identifier(int index) const; + + /** + * @brief 设置标签高度 + * @author ut000610 daizhengwen + * @param tabHeight 标签高度 + */ + void setTabHeight(int tabHeight); + /** + * @brief 设置标签项最小宽度 + * @author ut000610 daizhengwen + * @param tabItemMinWidth 标签项最小宽度 + */ + void setTabItemMinWidth(int tabItemMinWidth); + /** + * @brief 设置标签项最大宽度 + * @author ut000610 daizhengwen + * @param tabItemMaxWidth 标签项最大宽度 + */ + void setTabItemMaxWidth(int tabItemMaxWidth); + + /** + * @brief 增加标签 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + * @param tabName 标签名称 + * @return + */ + int addTab(const QString &tabIdentifier, const QString &tabName); + /** + * @brief 增加标签 + * @author ut000610 wangliang + * @param index 标签索引 + * @param tabIdentifier 标签识别码 + * @param tabName 标签名称 + * @return + */ + int insertTab(const int &index, const QString &tabIdentifier, const QString &tabName); + /** + * @brief 通过标识码删除标签 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签标识码 + */ + void removeTab(const QString &tabIdentifier); + /** + * @brief 移除标签,同时设置标签拖拽状态 + * @author ut000438 王亮 + * @param index 标签索引 + */ + void closeTab(const int &index); + /** + * @brief 设置标签文本 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签标识码 + * @param text 标签文本 + * @return + */ + bool setTabText(const QString &tabIdentifier, const QString &text); + + /** + * @brief 使用标签索引保存会话ID + * @author ut000610 daizhengwen + * @param sessionId 会话ID + * @param index 标签索引 + */ + void saveSessionIdWithTabIndex(int sessionId, int index); + /** + * @brief 使用标签ID保存会话ID + * @author ut000610 daizhengwen + * @param sessionId 会话ID + * @param tabIdentifier 标签ID + */ + void saveSessionIdWithTabId(int sessionId, const QString &tabIdentifier); + /** + * @brief 获取会话ID和标签索引map + * @author ut000610 daizhengwen + * @return + */ + QMap getSessionIdTabIndexMap(); + + /** + * @brief 按会话ID查询索引 + * @author ut000610 daizhengwen + * @param sessionId 会话ID + * @return + */ + int queryIndexBySessionId(int sessionId); + /** + * @brief 通过标识符获取索引 + * @author ut000610 daizhengwen + * @param id 标识符 + * @return + */ + int getIndexByIdentifier(QString id); + + /** + * @brief 设置更改文字颜色 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + */ + void setChangeTextColor(const QString &tabIdentifier); + /** + * @brief 设置需要更改文本颜色 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + * @param color 颜色 + */ + void setNeedChangeTextColor(const QString &tabIdentifier, const QColor &color); + /** + * @brief 删除需要更改文本颜色 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + */ + void removeNeedChangeTextColor(const QString &tabIdentifier); + /** + * @brief 是否需要更改文字颜色 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + * @return + */ + bool isNeedChangeTextColor(const QString &tabIdentifier); + /** + * @brief 设置清除标签颜色 + * @author ut000610 daizhengwen + * @param tabIdentifier 标签识别码 + */ + void setClearTabColor(const QString &tabIdentifier); + /** + * @brief 设置标签状态图 + * @author ut000610 daizhengwen + * @param tabStatusMap 标签状态图 + */ + void setTabStatusMap(const QMap &tabStatusMap); + + /** + * @brief 设置是否启用关闭tab动画效果 + * @author ut000610 daizhengwen + * @param isEnableCloseTabAnimation 是否启用关闭tab动画效果 + */ + void setEnableCloseTabAnimation(bool isEnableCloseTabAnimation); + /** + * @brief 是启用关闭标签动画 + * @author ut000610 daizhengwen + * @return + */ + bool isEnableCloseTabAnimation(); + + /** + * @brief 用于标记当前tab是否为雷神窗口的tab + * @author ut000438 王亮 + * @param isQuakeWindowTab 是否为雷神窗口的tab + */ + void setIsQuakeWindowTab(bool isQuakeWindowTab); + /** + * @brief 用于设置tab拖拽状态,仅当窗口为雷神模式且标签页数量为1时不允许拖拽 + * @author ut000438 王亮 + */ + void updateTabDragMoveStatus(); + +public slots: + /** + * @brief 切换到对应index的标签,并移除标签文字颜色 + * @author ut000438 王亮 + * @param index 标签索引 + */ + void setCurrentIndex(int index); + +protected: + /** + * @brief 事件过滤器 + * @author ut000610 daizhengwen + * @param watched + * @param event 事件 + * @return + */ + bool eventFilter(QObject *watched, QEvent *event) override; + /** + * @brief 返回最小标签的大小 + * @author ut000610 daizhengwen + * @param index 标签索引 + * @return + */ + QSize minimumTabSizeHint(int index) const override; + /** + * @brief 返回最大标签的大小 + * @author ut000610 daizhengwen + * @param index 标签索引 + * @return + */ + QSize maximumTabSizeHint(int index) const override; + + /** + * @brief 将标签对应的TermWidgetPage控件转化为QPixmap图像,用于在拖拽过程中显示 + * @author ut000438 王亮 + * @param index 标签页索引 + * @param option + * @param hotspot + * @return + */ + QPixmap createDragPixmapFromTab(int index, const QStyleOptionTab &option, QPoint *hotspot) const override; + /** + * @brief 自定义QMimeData数据用于拖放数据的存储 + * @author ut000438 王亮 + * @param index 标签页索引 + * @param option + * @return + */ + QMimeData *createMimeDataFromTab(int index, const QStyleOptionTab &option) const override; + /** + * @brief 拖拽过程中将从QMimeData中取出拖拽的标签页相关数据,插入标签页到当前窗口,此时插入的标签为拖拽过程中的“虚拟标签” + * @author ut000438 王亮 + * @param index 标签页索引 + * @param source + */ + void insertFromMimeDataOnDragEnter(int index, const QMimeData *source) override; + /** + * @brief 拖拽结束后将从QMimeData中取出拖拽的标签页相关数据,插入标签页到当前窗口 + * @author ut000438 王亮 + * @param index 标签页索引 + * @param source + */ + void insertFromMimeData(int index, const QMimeData *source) override; + /** + * @brief 用于判断是否能插入标签 + * @author ut000438 王亮 + * @param index 标签页索引 + * @param source + * @return + */ + bool canInsertFromMimeData(int index, const QMimeData *source) const override; + + /** + * @brief 根据对应标签名称、标签对应的工作区创建新的MainWindow + * @author ut000438 王亮 + * @param tabName 标签名称 + * @param termPage 标签对应的工作区 + * @param isActiveTab + */ + void createWindowFromTermPage(const QString &tabName, TermWidgetPage *termPage, bool isActiveTab); + + /** + * @brief 用于计算拖拽窗口结束鼠标释放后的窗口位置 + * @author ut000438 王亮 + * @param window 窗口 + * @return + */ + QPoint calculateDragDropWindowPosition(MainWindow *window); + +signals: + void tabBarClicked(int index, QString Identifier); + void menuCloseTab(QString Identifier); + void menuCloseOtherTab(QString Identifier); + void showRenameTabDialog(QString Identifier); + +private slots: + /** + * @brief 点击某个标签触发,并发出tabBarClicked信号,传递index和标签identifier参数 + * @author ut000438 王亮 + * @param index + */ + void handleTabBarClicked(int index); + /** + * @brief 标签左右移动后,交换移动的两个标签对应的标签identifier + * @author ut000438 王亮 + * @param fromIndex 原标签索引 + * @param toIndex 目标标签索引 + */ + void handleTabMoved(int fromIndex, int toIndex); + /** + * @brief 标签拖拽释放后,使用拖拽出的TermWidgetPage页面新建窗口,关闭原窗口拖出的标签页并移除对应页面 + * @author ut000438 王亮 + * @param index 标签页索引 + */ + void handleTabReleased(int index); + /** + * @brief 移除标签操作,同时移除对应的工作区页面TermWidgetPage + * @author ut000438 王亮 + * @param index 标签索引 + */ + void handleTabIsRemoved(int index); + /** + * @brief 处理拖入/拖出标签drop后,关闭之前窗口标签/新建MainWindow窗口显示相关逻辑 + * @author ut000438 王亮 + * @param index 标签索引 + * @param dropAction 拖拽行为 + * @param target + */ + void handleTabDroped(int index, Qt::DropAction dropAction, QObject *target); + /** + * @brief 拖动过程中动态改变鼠标光标样式 + * @author ut000438 王亮 + * @param action + */ + void handleDragActionChanged(Qt::DropAction action); + + /** + * @brief 触发关闭标签页的Action + * @author ut000438 王亮 + */ + void onCloseTabActionTriggered(); + /** + * @brief 触发关闭其他标签页的Action + * @author ut000438 王亮 + */ + void onCloseOtherTabActionTriggered(); + /** + * @brief 触发重命名标签页的Action + * @author ut000438 王亮 + */ + void onRenameTabActionTriggered(); + + /** + * @brief 窗口关闭处理 + * @author ut000438 王亮 + */ + void handleWindowClose(); + +private: + /** + * @brief 处理标签鼠标中键点击 + * @author ut000438 王亮 + * @param mouseEvent 鼠标事件 + */ + void handleMiddleButtonClick(QMouseEvent *mouseEvent); + /** + * @brief 处理标签鼠标右键点击 + * @author ut000438 王亮 + * @param mouseEvent 鼠标事件 + * @return + */ + bool handleRightButtonClick(QMouseEvent *mouseEvent); + + QAction *m_closeOtherTabAction = nullptr; + QAction *m_closeTabAction = nullptr; + QAction *m_renameTabAction = nullptr; + + DMenu *m_rightMenu = nullptr; + int m_rightClickTab; + int m_tabHeight; + int m_tabItemMinWidth; + int m_tabItemMaxWidth; + + QStringList m_tabIdentifierList; + + QMap m_sessionIdTabIndexMap; // key--sessionId, value--tabIndex + QMap m_sessionIdTabIdMap; // key--sessionId, value--tabIdentifier + + QMap m_tabStatusMap; + QColor m_tabChangedTextColor; + + bool m_isEnableCloseTabAnimation = true;//是否关闭tab动画,默认关闭动画 + bool m_isQuakeWindowTab = false;//是否是雷神窗口的tab,默认不是雷神窗口 + + TermTabStyle *m_termTabStyle = nullptr; +}; + +#endif // TABBAR_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabrenamedlg.cpp deepin-terminal-5.4.13/src/views/tabrenamedlg.cpp --- deepin-terminal-5.0.0+ds1/src/views/tabrenamedlg.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabrenamedlg.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,254 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhaogongqiang + * + * Maintainer: zhaogongqiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tabrenamedlg.h" +#include "utils.h" + +#include +#include + +#include +#include +#include + +TabRenameDlg::TabRenameDlg(QWidget *parent) : DAbstractDialog(parent) +{ + initUi(); + initContentWidget(); + initConnections(); +} + +void TabRenameDlg::initUi() +{ + setWindowModality(Qt::ApplicationModal); + // 设置最小值 => 以免一开始挤在一起 + setMinimumSize(456, 226); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->setSpacing(0); + mainLayout->setContentsMargins(0, 0, 0, 0); + + QHBoxLayout *titleLayout = new QHBoxLayout(); + titleLayout->setSpacing(0); + titleLayout->setContentsMargins(10, 0, 0, 0); + + m_titleBar = new QWidget(this); + m_titleBar->setObjectName("titleBar");//Add by ut001000 renfeixiang 2020-08-13 + m_titleBar->setFixedHeight(50); + m_titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + m_titleBar->setLayout(titleLayout); + + m_logoIcon = new DLabel(this); + m_logoIcon->setObjectName("logoIcon");//Add by ut001000 renfeixiang 2020-08-13 + m_logoIcon->setFixedSize(QSize(32, 32)); + m_logoIcon->setFocusPolicy(Qt::NoFocus); + m_logoIcon->setAttribute(Qt::WA_TransparentForMouseEvents); + m_logoIcon->setPixmap(QIcon::fromTheme("deepin-terminal").pixmap(QSize(32, 32))); + + m_closeButton = new DWindowCloseButton(this); + m_closeButton->setObjectName("closeButton");//Add by ut001000 renfeixiang 2020-08-13 + m_closeButton->setFocusPolicy(Qt::TabFocus); + m_closeButton->setIconSize(QSize(50, 50)); + + m_titleText = new DLabel(this); + m_titleText->setObjectName("titleText");//Add by ut001000 renfeixiang 2020-08-13 + m_titleText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + m_titleText->setAlignment(Qt::AlignCenter); + DFontSizeManager::instance()->bind(m_titleText, DFontSizeManager::T6); + + titleLayout->addWidget(m_logoIcon, 0, Qt::AlignLeft | Qt::AlignVCenter); + titleLayout->addWidget(m_titleText); + titleLayout->addWidget(m_closeButton, 0, Qt::AlignRight | Qt::AlignVCenter); + + //Dialog content + m_contentLayout = new QVBoxLayout(); + m_contentLayout->setObjectName("contentLayout");//Add by ut001000 renfeixiang 2020-08-13 + m_contentLayout->setSpacing(0); + m_contentLayout->setContentsMargins(0, 0, 0, 0); + + m_content = new QWidget(this); + m_content->setObjectName("content");//Add by ut001000 renfeixiang 2020-08-13 + m_content->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_content->setLayout(m_contentLayout); + + mainLayout->addWidget(m_titleBar); + mainLayout->addWidget(m_content); + setLayout(mainLayout); +} + +void TabRenameDlg::addContent(QWidget *content) +{ + Q_ASSERT(nullptr != getContentLayout()); + + getContentLayout()->addWidget(content); +} + +QLayout *TabRenameDlg::getContentLayout() +{ + return m_contentLayout; +} + +void TabRenameDlg::setText(const QString &tabTitleFormat, const QString &remoteTabTitleFormat) +{ + setNormalLineEditText(tabTitleFormat); + setRemoteLineEditText(remoteTabTitleFormat); +} + +void TabRenameDlg::setNormalLineEditText(const QString &text) +{ + m_tabTitleEdit->getInputedit()->setText(text); +} + +void TabRenameDlg::setRemoteLineEditText(const QString &text) +{ + m_remoteTabTitleEdit->getInputedit()->setText(text); +} + + +QLineEdit *TabRenameDlg::getRemoteTabTitleEdit() const +{ + return m_remoteTabTitleEdit->getInputedit()->lineEdit(); +} + +void TabRenameDlg::setFocusOnEdit(bool isRemote) +{ + QLineEdit *lineEdit = nullptr; + if (isRemote) { + // 连接远程时,设置需要操作的输入框为远程输入框 + lineEdit = getRemoteTabTitleEdit(); + } else { + // 设置需要操作的输入框为非远程输入框 + lineEdit = getTabTitleEdit(); + } + + // 设置焦点,全选输入框的内容 + lineEdit->setFocus(); + lineEdit->selectAll(); +} + +QLineEdit *TabRenameDlg::getTabTitleEdit() const +{ + return m_tabTitleEdit->getInputedit()->lineEdit(); +} + +void TabRenameDlg::initContentWidget() +{ + m_mainLayout = new QVBoxLayout(); + m_mainLayout->setObjectName("mainLayout");//Add by ut001000 renfeixiang 2020-08-13 + m_mainLayout->setContentsMargins(10, 0, 10, 10); + + QWidget *contentwidget = new QWidget(this); + contentwidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + initTitleLabel(); + initRenameWidget(false); + initRenameWidget(true); + initButtonWidget(); + + // 添加控件 + m_mainLayout->setSpacing(10); + m_mainLayout->addWidget(m_titlelabel); + m_mainLayout->addWidget(m_normalWidget); + m_mainLayout->addWidget(m_remoteWidget); + m_mainLayout->addWidget(m_buttonWidget); + + contentwidget->setLayout(m_mainLayout); + addContent(contentwidget); + // 设置确认按钮为enter后响应的默认按钮 + // 放在布局后生效,放在布局完成前不生效 + m_confirmButton->setDefault(true); +} + +void TabRenameDlg::initConnections() +{ + connect(m_cancelButton, &DPushButton::clicked, this, [ = ] { + reject(); + close(); + }); + + connect(m_confirmButton, &DSuggestButton::clicked, this, [ = ] { + qInfo() << "confirm rename title"; + QString tabTitleFormat = getTabTitleEdit()->text(); + QString remoteTabTitleFormat = getRemoteTabTitleEdit()->text(); + emit tabTitleFormatRename(tabTitleFormat, remoteTabTitleFormat); + close(); + }); + + connect(m_closeButton, &DPushButton::clicked, this, [ = ] { + close(); + }); +} + +void TabRenameDlg::initTitleLabel() +{ + m_titlelabel = new DLabel(QObject::tr("Rename title"), this); + m_titlelabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + m_titlelabel->setAlignment(Qt::AlignCenter); + DFontSizeManager::instance()->bind(m_titlelabel, DFontSizeManager::T6); +} + +void TabRenameDlg::initRenameWidget(bool isRemote) +{ + QHBoxLayout *TAbLayout = new QHBoxLayout(); + TAbLayout->setContentsMargins(0, 0, 0, 0); + + TabRenameWidget *renameWidget = new TabRenameWidget(isRemote); + TAbLayout->addWidget(renameWidget); + + if (!isRemote) { + m_normalWidget = new QWidget; + m_normalWidget->setLayout(TAbLayout); + m_tabTitleEdit = renameWidget; + } else { + m_remoteWidget = new QWidget; + m_remoteWidget->setLayout(TAbLayout); + m_remoteTabTitleEdit = renameWidget; + } +} + +void TabRenameDlg::initButtonWidget() +{ + m_buttonWidget = new QWidget; + + QHBoxLayout *buttonTAbLayout = new QHBoxLayout; + buttonTAbLayout->setContentsMargins(0, 0, 0, 0); + buttonTAbLayout->setSpacing(10); + + m_cancelButton = new DPushButton(QObject::tr("Cancel", "button")); + Utils::setSpaceInWord(m_cancelButton); + m_cancelButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + DFontSizeManager::instance()->bind(m_cancelButton, DFontSizeManager::T6); + + m_confirmButton = new DSuggestButton(QObject::tr("Confirm", "button")); + Utils::setSpaceInWord(m_confirmButton); + m_confirmButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + DFontSizeManager::instance()->bind(m_confirmButton, DFontSizeManager::T6); + + DVerticalLine *verticalLine = new DVerticalLine; + verticalLine->setFixedSize(1, 28); + + buttonTAbLayout->addWidget(m_cancelButton); + buttonTAbLayout->addWidget(verticalLine); + buttonTAbLayout->addWidget(m_confirmButton); + + m_buttonWidget->setLayout(buttonTAbLayout); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabrenamedlg.h deepin-terminal-5.4.13/src/views/tabrenamedlg.h --- deepin-terminal-5.0.0+ds1/src/views/tabrenamedlg.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabrenamedlg.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhaogongqiang + * + * Maintainer: zhaogongqiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TABRENAMEDLG_H +#define TABRENAMEDLG_H + +#include "tabrenamewidget.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +class TabRenameWidget; +class TabRenameDlg : public DAbstractDialog +{ + Q_OBJECT +public: + /** + * @brief 标签重命名构造函数 + * @author ut000442 赵公强 + * @param parent + */ + explicit TabRenameDlg(QWidget *parent = nullptr); + + /** + * @brief 初始化主窗口的ui + * @author ut000442 赵公强 + */ + void initUi(); + /** + * @brief 初始化链接 + * @author ut000442 赵公强 + */ + void initConnections(); + /** + * @brief 初始化窗口包含的控件 + * @author ut000442 赵公强 + */ + void initContentWidget(); + /** + * @brief 初始化标题 + * @author ut000442 赵公强 + */ + void initTitleLabel(); + /** + * @brief 初始化窗口中第二,三行,参数 isRemote表示是否为远程 + * @author ut000442 赵公强 + * @param isRemote 是否为远程 + */ + void initRenameWidget(bool isRemote); + /** + * @brief 初始化按钮控件 + * @author ut000442 赵公强 + */ + void initButtonWidget(); + + /** + * @brief 向主窗口中添加控件 + * @author ut000442 赵公强 + * @param content + */ + void addContent(QWidget *content); + /** + * @brief 获取主窗口最外层布局接口 + * @author ut000442 赵公强 + * @return + */ + QLayout *getContentLayout(); + + /** + * @brief 设置lineedit显示的文字 + * @author ut000610 戴正文 + * @param tabTitleFormat + * @param remoteTabTitleFormat + */ + void setText(const QString &tabTitleFormat, const QString &remoteTabTitleFormat); + /** + * @brief 窗口普通输入条内容设置接口 + * @author ut000442 赵公强 + * @param text 文本 + */ + void setNormalLineEditText(const QString &text); + /** + * @brief 窗口远程输入条内容设置接口 + * @author ut000442 赵公强 + * @param text 文本 + */ + void setRemoteLineEditText(const QString &text); + + /** + * @brief 获取普通重命名控件接口 + * @author ut000442 赵公强 + * @return + */ + QLineEdit *getTabTitleEdit() const; + /** + * @brief 获取远程重命名控件接口 + * @author ut000442 赵公强 + * @return + */ + QLineEdit *getRemoteTabTitleEdit() const; + + /** + * @brief 将焦点设置在输入框内 + * @author ut000610 戴正文 + * @param isRemote 是否远程 + */ + void setFocusOnEdit(bool isRemote); + +Q_SIGNALS: + void tabTitleFormatRename(const QString &tabTitleFormat, const QString &remoteTabTitleFormat); + +private: + QWidget *m_titleBar = nullptr; + QWidget *m_content = nullptr; + QWidget *m_normalWidget = nullptr; + QWidget *m_remoteWidget = nullptr; + QWidget *m_buttonWidget = nullptr; + + // 标签标题格式 + TabRenameWidget *m_tabTitleEdit = nullptr; + // 远程标签标题格式 + TabRenameWidget *m_remoteTabTitleEdit = nullptr; + + QVBoxLayout *m_contentLayout = nullptr; + QVBoxLayout *m_mainLayout = nullptr; + + DLabel *m_logoIcon = nullptr; + DLabel *m_titleText = nullptr; + + DLabel *m_titlelabel = nullptr; + DPushButton *m_cancelButton = nullptr; + DSuggestButton *m_confirmButton = nullptr; + + DWindowCloseButton *m_closeButton = nullptr; + +}; + +#endif // TABRENAMEDLG_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabrenamewidget.cpp deepin-terminal-5.4.13/src/views/tabrenamewidget.cpp --- deepin-terminal-5.0.0+ds1/src/views/tabrenamewidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabrenamewidget.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhaogongqiang + * + * Maintainer: zhaogongqiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tabrenamewidget.h" +#include +#include + +#include + +TabRenameWidget::TabRenameWidget(bool isRemote, bool isSetting, QWidget *parent) + : QWidget(parent) + , m_isRemote(isRemote) + , m_isSetting(isSetting) +{ + initChoseMenu(); + initUi(); + initConnections(); +} + +void TabRenameWidget::initUi() +{ + m_layout = new QHBoxLayout(this); + m_layout->setContentsMargins(0, 0, 0, 0); + // 设置布局之间的宽度,之前的间距比较宽 + m_layout->setSpacing(10); + // widet 自己设置0 0 0 0 + this->setContentsMargins(0, 0, 0, 0); + this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + + // 内容输入框 + m_inputedit = new DLineEdit(this); + m_inputedit->setText("%n:%d"); + m_inputedit->setMaximumSize(172, 36); + m_inputedit->setMinimumSize(135, 36); + DFontSizeManager::instance()->bind(m_inputedit, DFontSizeManager::T6); + + // 插入按钮 + m_choseButton = new DPushButton(tr("Insert"), this); + m_choseButton->setMaximumHeight(36); + // 添加下拉菜单 + m_choseButton->setMenu(m_choseMenu); + DFontSizeManager::instance()->bind(m_choseButton, DFontSizeManager::T6); + m_choseButton->setAutoDefault(false); + m_choseButton->setDefault(false); + + // 设置界面隐藏clearbutton并且不需要初始化标题 重命名窗口不用隐藏clearbutton需要初始化标题 + if (!m_isSetting) + initLabel(); + else + m_inputedit->lineEdit()->setClearButtonEnabled(false); + + m_layout->addWidget(m_inputedit); + m_layout->addWidget(m_choseButton); +} + +void TabRenameWidget::initChoseMenu() +{ + m_choseMenu = new DMenu(this); + DFontSizeManager::instance()->bind(m_choseMenu, DFontSizeManager::T6); + if (m_isRemote) { + // 初始化远程菜单 + initRemoteChoseMenu(); + } else { + // 初始化正常菜单 + initNormalChoseMenu(); + } +} + +void TabRenameWidget::initRemoteChoseMenu() +{ + QStringList list; + list << tr("username: %u") << tr("username@: %U") << tr("remote host: %h") + << tr("session number: %#") << tr("title set by shell: %w"); + + foreach (auto it, list) { + QAction *ac = new QAction(it, m_choseMenu); + m_choseMenu->addAction(ac); + } +} + +void TabRenameWidget::initNormalChoseMenu() +{ + QStringList list; + list << tr("program name: %n") << tr("current directory (short): %d") + << tr("current directory (long): %D") << tr("session number: %#") + << tr("username: %u") << tr("local host: %h") + << tr("title set by shell: %w"); + + foreach (auto it, list) { + QAction *ac = new QAction(it, m_choseMenu); + m_choseMenu->addAction(ac); + } +} + +void TabRenameWidget::initConnections() +{ + connect(m_choseMenu, &DMenu::triggered, this, [ = ](QAction * ac) { + QStringList spiltlist = ac->text().split("%"); + m_inputedit->lineEdit()->insert("%" + spiltlist.at(1)); + //向输入条中输入内容后,焦点应该同步设置过去 + m_inputedit->lineEdit()->setFocus(Qt::MouseFocusReason); + }); +} + +void TabRenameWidget::initLabel() +{ + m_Label = new QLabel; + if (!m_isRemote) + m_Label->setText(QObject::tr("Tab title format")); + else + m_Label->setText(QObject::tr("Remote tab title format")); + + DFontSizeManager::instance()->bind(m_Label, DFontSizeManager::T6); + + // label要跟随字体扩展 => 所有控件都扩展效果不好 + m_Label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_layout->addWidget(m_Label); +} + +DLineEdit *TabRenameWidget::getInputedit() const +{ + return m_inputedit; +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/views/tabrenamewidget.h deepin-terminal-5.4.13/src/views/tabrenamewidget.h --- deepin-terminal-5.0.0+ds1/src/views/tabrenamewidget.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/tabrenamewidget.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: zhaogongqiang + * + * Maintainer: zhaogongqiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TABRENAMEWIDGET_H +#define TABRENAMEWIDGET_H + +#include +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +class TabRenameWidget : public QWidget +{ + Q_OBJECT +public: + /** + * @brief 标签重命名控件构造函数,由输入条与一个内置菜单的按钮组成 + * @author ut000442 赵公强 + * @param isRemote 是否为远程 + * @param isSetting 是否在设置中调用 + * @param parent + */ + explicit TabRenameWidget(bool isRemote, bool isSetting = false, QWidget *parent = nullptr); + + /** + * @brief 初始化标签重命名控件的ui + * @author ut000442 赵公强 + */ + void initUi(); + /** + * @brief 初始化按钮内置的菜单 + * @author ut000442 赵公强 + */ + void initChoseMenu(); + /** + * @brief 初始化远程标签按钮内置的菜单 + * @author ut000442 赵公强 + */ + void initRemoteChoseMenu(); + /** + * @brief 初始化普通标签按钮内置的菜单 + * @author ut000442 赵公强 + */ + void initNormalChoseMenu(); + /** + * @brief 初始化链接 + * @author ut000442 赵公强 + */ + void initConnections(); + + /** + * @brief 初始化小标题 + * @author ut000442 赵公强 + */ + void initLabel(); + void setLineEditText(); + + /** + * @brief 获取输入条接口 + * @author ut000442 赵公强 + * @return + */ + DLineEdit *getInputedit() const; + +private: + bool m_isRemote = false; + bool m_isSetting = false; + + QLabel *m_Label = nullptr; + QHBoxLayout *m_layout = nullptr; + + DPushButton *m_choseButton = nullptr; + DMenu *m_choseMenu = nullptr; + DLineEdit *m_inputedit = nullptr; +}; + +#endif // TABRENAMEWIDGET_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/termbasedialog.cpp deepin-terminal-5.4.13/src/views/termbasedialog.cpp --- deepin-terminal-5.0.0+ds1/src/views/termbasedialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termbasedialog.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "termbasedialog.h" + +#include +#include +#include + +/******************************************************************************* + 1. @函数: palrtteTransparency + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 调色板透明度 +*******************************************************************************/ +static void palrtteTransparency(QWidget *widget, qint8 alphaFloat) +{ + QPalette palette = widget->palette(); + QColor color = DGuiApplicationHelper::adjustColor(palette.color(QPalette::BrightText), 0, 0, 0, 0, 0, 0, alphaFloat); + palette.setColor(QPalette::WindowText, color); + widget->setPalette(palette); +} + +//fix bug 23481 主菜单切换主题,弹框字体颜色没有随主题及时变换 +/******************************************************************************* + 1. @函数: paintEvent + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 绘画事件 +*******************************************************************************/ +void QWidget::paintEvent(QPaintEvent *e) +{ + Q_UNUSED(e) + + + if (strcmp(this->metaObject()->className(), "Dtk::Widget::DDialog") != 0) + return; + + QLabel *titleLabel = this->findChild("TitleLabel"); + QLabel *messageLabel = this->findChild("MessageLabel"); + + if (titleLabel != nullptr) + palrtteTransparency(titleLabel, -10); + + if (messageLabel != nullptr) + palrtteTransparency(messageLabel, -30); + +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/termbasedialog.h deepin-terminal-5.4.13/src/views/termbasedialog.h --- deepin-terminal-5.0.0+ds1/src/views/termbasedialog.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termbasedialog.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TERMBASEDIALOG_H +#define TERMBASEDIALOG_H + +#endif // TERMBASEDIALOG_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/termcommandlinkbutton.cpp deepin-terminal-5.4.13/src/views/termcommandlinkbutton.cpp --- deepin-terminal-5.0.0+ds1/src/views/termcommandlinkbutton.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termcommandlinkbutton.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "termcommandlinkbutton.h" +#include "utils.h" + +#include + +#include + + +TermCommandLinkButton::TermCommandLinkButton(QWidget *parent) + : DPushButton(parent) +{ + Utils::set_Object_Name(this); + DPalette palette = DApplicationHelper::instance()->palette(this); + palette.setColor(DPalette::ButtonText, palette.color(DPalette::TextWarning)); + this->setPalette(palette); + + this->setFlat(true); + this->setFocusPolicy(Qt::TabFocus); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/termcommandlinkbutton.h deepin-terminal-5.4.13/src/views/termcommandlinkbutton.h --- deepin-terminal-5.0.0+ds1/src/views/termcommandlinkbutton.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termcommandlinkbutton.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TERMCOMMANDLINKBUTTON_H +#define TERMCOMMANDLINKBUTTON_H + +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: TermCommandLinkButton + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-11 + 4. @说明: 重写DPushButton +*******************************************************************************/ + +class TermCommandLinkButton : public DPushButton +{ + Q_OBJECT +public: + /** + * @brief 设置DPushButton属性,字体颜色,焦点, 提高边框 + * @author ut000610 daizhengwen + * @param parent + */ + explicit TermCommandLinkButton(QWidget *parent = nullptr); +}; + +#endif // TERMCOMMANDLINKBUTTON_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/termwidget.cpp deepin-terminal-5.4.13/src/views/termwidget.cpp --- deepin-terminal-5.0.0+ds1/src/views/termwidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termwidget.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1236 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "termwidget.h" +#include "define.h" +#include "settings.h" +#include "termproperties.h" +#include "mainwindow.h" +#include "shortcutmanager.h" +#include "utils.h" +#include "service.h" +#include "windowsmanager.h" +#include "serverconfigmanager.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE +using namespace Konsole; +TermWidget::TermWidget(const TermProperties &properties, QWidget *parent) : QTermWidget(0, parent), m_properties(properties) +{ + Utils::set_Object_Name(this); + // 窗口数量加1 + WindowsManager::instance()->terminalCountIncrease(); + initTabTitle(); + //qInfo() << " TermWidgetparent " << parentWidget(); + m_page = static_cast(parentWidget()); + setContextMenuPolicy(Qt::CustomContextMenu); + + setHistorySize(5000); + + QString strShellPath = Settings::instance()->shellPath(); + // set shell program + qInfo() << "set shell program : " << strShellPath; + setShellProgram(strShellPath); + /******** Modify by ut000610 daizhengwen 2020-07-08:初始化透明度 Begin***************/ + // 若没有窗口特效,则不生效 + // 若有窗口特效,生效 + + // 此方法会丢失焦点(show hide方法丢失焦点) + // setTermOpacity(Settings::instance()->opacity()); + + // 底层方法,设置当前窗口的透明度 + if (Service::instance()->isWindowEffectEnabled()) { + // 判断当前是否有窗口特效 + setTerminalOpacity(Settings::instance()->opacity()); + } + /********************* Modify by ut000610 daizhengwen End ************************/ + //setScrollBarPosition(QTermWidget::ScrollBarRight);//commend byq nyq + + /******** Modify by n014361 wangpeili 2020-01-13: ****************/ + // theme + QString theme = "Dark"; + /************************ Mod by sunchengxi 2020-09-16:Bug#48226#48230#48236#48241 终端默认主题色应改为深色修改引起的系列问题修复 Begin************************/ + theme = Settings::instance()->colorScheme(); + //if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) { + // theme = "Light"; + //} + /************************ Mod by sunchengxi 2020-09-16:Bug#48226#48230#48236#48241 终端默认主题色应改为深色修改引起的系列问题修复 End ************************/ + setColorScheme(theme); + Settings::instance()->setColorScheme(theme); + + // 这个参数启动为默认值UTF-8 + setTextCodec(QTextCodec::codecForName("UTF-8")); + + /******** Modify by n014361 wangpeili 2020-03-04: 增加保持打开参数控制,默认自动关闭**/ + /******* 2021-06-22 通过保持打开参数控制的值控制************/ + setAutoClose(!m_properties[KeepOpen].toBool()); + /********************* Modify by n014361 wangpeili End ************************/ + + // WorkingDir + if (m_properties.contains(WorkingDir)) + setWorkingDirectory(m_properties[WorkingDir].toString()); + + if (m_properties.contains(Execute)) { + //QString args = m_properties[Execute].toString(); + //QStringList argList = args.split(QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts); + QStringList argList = m_properties[Execute].toStringList(); + qInfo() << "Execute args:" << argList; + if (argList.count() > 0) { + setShellProgram(argList.at(0)); + argList.removeAt(0); + if (argList.count()) + setArgs(argList); + } + } + + // 字体和字体大小, 8#字体立即设置的时候会有BUG显示,做个延迟生效就好了。 + if (Settings::instance()->fontSize() == 8) { + QTimer::singleShot(10, this, &TermWidget::onSetTerminalFont); + } else { + QFont font = getTerminalFont(); + font.setFamily(Settings::instance()->fontName()); + font.setPointSize(Settings::instance()->fontSize()); + setTerminalFont(font); + } + + // 光标形状 + setKeyboardCursorShape(static_cast(Settings::instance()->cursorShape())); + // 光标闪烁 + setBlinkingCursor(Settings::instance()->cursorBlink()); + + // 按键滚动 + setPressingScroll(Settings::instance()->PressingScroll()); + + /******** Modify by ut000439 wangpeili 2020-07-27: fix bug 39371: 分屏线可以拉到边****/ + // 以最小mainwindow分4屏为标准的最小大小 + /******** Modify by ut001000 renfeixiang 2020-08-07:修改成根据全局变量m_MinWidth,m_MinHeight计算出term的最小高度和宽度***************/ + setMinimumSize(MainWindow::m_MinWidth / 2, (MainWindow::m_MinHeight - WIN_TITLE_BAR_HEIGHT) / 2); + /********************* Modify by n014361 wangpeili End ************************/ + + QString currentEnvLanguage = Utils::getCurrentEnvLanguage(); + // 判断是维吾尔语或者藏语时 + if (QStringLiteral("bo_CN") == currentEnvLanguage || QStringLiteral("ug_CN") == currentEnvLanguage) { + // 启用双向文本渲染支持 + setBidiEnabled(true); + } + + // fix bug#67979 Shell配置中设置无效shell程序名后,新增窗口无悬浮框提示 + initConnections(); + + // 启动shell + startShellProgram(); + + // 增加可以自动运行脚本的命令,不需要的话,可以删除 + if (m_properties.contains(Script)) { + QString args = m_properties[Script].toString(); + qInfo() << "run cmd:" << args; + args.append("\n"); + if (!m_properties.contains(KeepOpen)) + args.append("exit\n"); + + sendText(args); + } + + setFocusPolicy(Qt::NoFocus); + + TermWidgetPage *parentPage = qobject_cast(parent); + //qInfo() << parentPage << endl; + connect(this, &QTermWidget::uninstallTerminal, parentPage, &TermWidgetPage::uninstallTerminal); +} + +void TermWidget::initConnections() +{ + // 输出滚动,会在每个输出判断是否设置了滚动,即时设置 + connect(this, &QTermWidget::receivedData, this, &TermWidget::onQTermWidgetReceivedData); + + // 接收到输出 + connect(this, &TermWidget::receivedData, this, &TermWidget::onTermWidgetReceivedData); + + // 接收到拖拽文件的Urls数据 + connect(this, &QTermWidget::sendUrlsToTerm, this, &TermWidget::onDropInUrls); + + connect(this, &QTermWidget::urlActivated, this, &TermWidget::onUrlActivated); + + connect(this, &QWidget::customContextMenuRequested, this, &TermWidget::customContextMenuCall); + + connect(DApplicationHelper::instance(), + &DApplicationHelper::themeTypeChanged, + this, + &TermWidget::onThemeTypeChanged); + + // 未找到搜索的匹配结果 + connect(this, &QTermWidget::sig_noMatchFound, this, &TermWidget::onSig_noMatchFound); + // 找到搜索匹配的结果 => 记录查找时间 => 打印日志,方便性能测试 + connect(this, &QTermWidget::sig_matchFound, this, &TermWidget::onSig_matchFound); + /********************* Modify by n014361 wangpeili End ************************/ + + connect(this, &QTermWidget::isTermIdle, this, &TermWidget::onTermIsIdle); + + connect(this, &QTermWidget::shellWarningMessage, this, &TermWidget::onShellMessage); + + connect(this, &QTermWidget::titleChanged, this, &TermWidget::onTitleChanged); + + // 标题参数变化 + connect(this, &QTermWidget::titleArgsChange, this, &TermWidget::onTitleArgsChange); + connect(this, &TermWidget::copyAvailable, this, &TermWidget::onCopyAvailable); + + connect(Settings::instance(), &Settings::terminalSettingChanged, this, &TermWidget::onSettingValueChanged); + + //窗口特效开启则使用设置的透明度,窗口特效关闭时直接把窗口置为不透明 + connect(Service::instance(), &Service::onWindowEffectEnabled, this, &TermWidget::onWindowEffectEnabled); + + // 接收触控板事件 + connect(Service::instance(), &Service::touchPadEventSignal, this, &TermWidget::onTouchPadSignal); + + connect(Service::instance(), &Service::hostnameChanged, this, &TermWidget::onHostnameChanged); +} + +inline void TermWidget::onSetTerminalFont() +{ + QFont font = getTerminalFont(); + font.setFamily(Settings::instance()->fontName()); + font.setPointSize(Settings::instance()->fontSize()); + setTerminalFont(font); +} + +inline void TermWidget::onSig_matchFound() +{ + parentPage()->printSearchCostTime(); +} + +inline void TermWidget::onSig_noMatchFound() +{ + parentPage()->setMismatchAlert(true); +} + +inline void TermWidget::onQTermWidgetReceivedData(QString value) +{ + Q_UNUSED(value) + // 完善终端输出滚动相关功能,默认设置为"智能滚动"(即滚动条滑到最底下时自动滚动) + if (!Settings::instance()->OutputtingScroll()) { + setIsAllowScroll(true); + return; + } + + // 获取是否允许输出时滚动 + if (getIsAllowScroll()) { + // 允许,则滚动到最新位置 + setTrackOutput(Settings::instance()->OutputtingScroll()); + } else { + // 不允许,则不滚动 + // 将标志位置位 + setIsAllowScroll(true); + } +} + +inline void TermWidget::onTermWidgetReceivedData(QString value) +{ + /******** Modify by ut000610 daizhengwen 2020-05-25: quit download****************/ + if (value.contains("Transfer incomplete")) { + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_C, Qt::ControlModifier); + QApplication::sendEvent(focusWidget(), &keyPress); + } + if (value.endsWith("\b \b #")) { // 结束的时候有乱码的话,将它清除 + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_U, Qt::ControlModifier); + QApplication::sendEvent(focusWidget(), &keyPress); + } + /********************* Modify by ut000610 daizhengwen End ************************/ + // 退出远程后,设置成false + if ((value.contains("Connection to") && value.contains(" closed.")) || value.contains("Permission denied")) + QTimer::singleShot(100, this, &TermWidget::onExitRemoteServer); +} + +inline void TermWidget::onExitRemoteServer() +{ + // 判断是否此时退出远程 + if (!isInRemoteServer()) { + qInfo() << "exit remote"; + setIsConnectRemote(false); + // 还原编码 + setTextCodec(QTextCodec::codecForName(encode().toLocal8Bit())); + qInfo() << "current encode " << encode(); + setBackspaceMode(m_backspaceMode); + setDeleteMode(m_deleteMode); + emit Service::instance()->checkEncode(encode()); + } +} + +inline void TermWidget::onUrlActivated(const QUrl &url, bool fromContextMenu) +{ + if (QApplication::keyboardModifiers() & Qt::ControlModifier || fromContextMenu) + QDesktopServices::openUrl(url); +} + +inline void TermWidget::onThemeTypeChanged(DGuiApplicationHelper::ColorType builtInTheme) +{ + qInfo() << "themeChanged" << builtInTheme; + // ThemePanelPlugin *plugin = qobject_cast(getPluginByName("Theme")); + QString theme = "Dark"; + /************************ Mod by sunchengxi 2020-09-16:Bug#48226#48230#48236#48241 终端默认主题色应改为深色修改引起的系列问题修复 Begin************************/ + //Mod by sunchengxi 2020-09-17:Bug#48349 主题色选择跟随系统异常 + if (builtInTheme == DGuiApplicationHelper::LightType) + theme = "Light"; + + /************************ Mod by sunchengxi 2020-09-16:Bug#48226#48230#48236#48241 终端默认主题色应改为深色修改引起的系列问题修复 End ************************/ + //setColorScheme(theme); + //Settings::instance()->setColorScheme(theme); + QString expandThemeStr = ""; + expandThemeStr = Settings::instance()->extendColorScheme(); + if (expandThemeStr.isEmpty()) { + if (DGuiApplicationHelper::instance()->paletteType() == DGuiApplicationHelper::LightType) + theme = "Light"; + + setColorScheme(theme); + Settings::instance()->setColorScheme(theme); + } else { + setColorScheme(expandThemeStr, Settings::instance()->m_customThemeModify); + Settings::instance()->m_customThemeModify = false; + } +} + +inline void TermWidget::onTermIsIdle(bool bIdle) +{ + emit termIsIdle(m_page->identifier(), bIdle); +} + +inline void TermWidget::onTitleChanged() +{ + // 解析shell传来的title 用户名 主机名 地址/目录 + QString tabTitle = TermWidget::title(); + // %w shell设置的窗口标题 + m_tabArgs[SHELL_TITLE] = tabTitle; + m_remoteTabArgs[SHELL_TITLE] = tabTitle; + // 将标题参数变更信息传出 + emit termTitleChanged(getTabTitle()); +} + +inline void TermWidget::onCopyAvailable(bool enable) +{ + if (Settings::instance()->IsPasteSelection() && enable) { + qInfo() << "hasCopySelection"; + QString strSelected = selectedText(); + QApplication::clipboard()->setText(strSelected, QClipboard::Clipboard); + } +} + +inline void TermWidget::onWindowEffectEnabled(bool isWinEffectEnabled) +{ + if (isWinEffectEnabled) + this->setTermOpacity(Settings::instance()->opacity()); + else + this->setTermOpacity(1.0); +} + +TermWidget::~TermWidget() +{ + // 窗口减1 + WindowsManager::instance()->terminalCountReduce(); +} + +TermWidgetPage *TermWidget::parentPage() +{ + return m_page; +} + +void TermWidget::onTitleArgsChange(QString key, QString value) +{ + // tab获取参数 + m_tabArgs[key] = value; + // 获取当前目录短 由长到短 + if (DIR_L == key) { + QString dir = value; + // 当前目录短(若有优化方法请及时告知) + if ("~" == dir || dir.startsWith(QDir::homePath())) { + // 出现家目录~的情况 + QString homePath = QDir::homePath(); + QStringList pathList; + if("~" == dir) + pathList = homePath.split("/"); + else + pathList = dir.split("/"); + // 当前目录短,返回当前文件夹名 + m_tabArgs[DIR_S] = pathList.value(pathList.count() - 1); + // 当前目录长对于~的处理 => 传过来的不是~但要填进去~和提示符保持一致 + dir.replace(homePath, "~"); + m_tabArgs[DIR_L] = dir; + } else if ("/" == dir) { + // 出现根目录/的情况 + m_tabArgs[DIR_S] = "/"; + } else { + // 一般情况 + QStringList pathList = dir.split("/"); + m_tabArgs[DIR_S] = pathList.last(); + } + } + + // 更改标签标题 + emit termTitleChanged(getTabTitle()); +} + +void TermWidget::onHostnameChanged() +{ + // 主机名变化 + QString hostName = QHostInfo::localHostName(); + m_tabArgs[LOCAL_HOST_NAME] = hostName; + // 发送标签标题变化 + emit termTitleChanged(getTabTitle()); +} + +inline void TermWidget::onCopy() +{ + copyClipboard(); +} + +inline void TermWidget::onPaste() +{ + pasteClipboard(); +} + +inline void TermWidget::onOpenFileInFileManager() +{ + //DDesktopServices::showFolder(QUrl::fromLocalFile(workingDirectory())); + + //打开文件夹的方式 和 打开文件夹 并勾选文件的方式 如下 + //dde-file-manager -n /data/home/lx777/my-wjj/git/2020-08/18-zoudu/build-deepin-terminal-unknown-Debug + //dde-file-manager --show-item a.pdf + + QProcess process; + //未选择内容 + if (selectedText().isEmpty()) { + process.startDetached("dde-file-manager -n " + workingDirectory()); + return; + } + + QFileInfo fi(workingDirectory() + "/" + selectedText()); + //选择的内容是文件或者文件夹 + if (fi.isFile() || fi.isDir()) { + process.startDetached("dde-file-manager --show-item " + workingDirectory() + "/" + selectedText()); + return; + } + //选择的文本不是文件也不是文件夹 + process.startDetached("dde-file-manager -n " + workingDirectory()); +} + +/*** 修复 bug 28162 鼠标左右键一起按终端会退出 ***/ +void TermWidget::addMenuActions(const QPoint &pos) +{ + bool isRemoting = isConnectRemote(); + + QList termActions = filterActions(pos); + for (QAction *&action : termActions) + m_menu->addAction(action); + + if (!m_menu->isEmpty()) + m_menu->addSeparator(); + + // add other actions here. + if (!selectedText().isEmpty()) + m_menu->addAction(tr("Copy"), this, &TermWidget::onCopy); + + if (!QApplication::clipboard()->text(QClipboard::Clipboard).isEmpty()) + m_menu->addAction(tr("Paste"), this, &TermWidget::onPaste); + + /******** Modify by n014361 wangpeili 2020-02-26: 添加打开(文件)菜单功能 **********/ + if (!isRemoting && !selectedText().isEmpty()) { + QString fileName = getFormatFileName(selectedText()); + QString filePath = getFilePath(fileName); + QUrl fileUrl = QUrl::fromLocalFile(filePath); + QFileInfo tempfile(fileUrl.path()); + if (fileName.length() > 0 && tempfile.exists()) + m_menu->addAction(tr("Open"), this, &TermWidget::onOpenFile); + } + /********************* Modify by n014361 wangpeili End ************************/ + + m_menu->addAction(tr("Open in file manager"), this, &TermWidget::onOpenFileInFileManager); + + m_menu->addSeparator(); + + + DSplitter *splitter = qobject_cast(parentWidget()); + int layer = getTermLayer(); + + if (1 == layer || (2 == layer && splitter && Qt::Horizontal == splitter->orientation())) + m_menu->addAction(tr("Horizontal split"), this, &TermWidget::onHorizontalSplit); + + if (1 == layer || (2 == layer && splitter && Qt::Vertical == splitter->orientation())) + m_menu->addAction(tr("Vertical split"), this, &TermWidget::onVerticalSplit); + + /******** Modify by n014361 wangpeili 2020-02-21: 增加关闭窗口和关闭其它窗口菜单 ****************/ + m_menu->addAction(QObject::tr("Close workspace"), this, &TermWidget::onCloseCurrWorkSpace); + //m_menu->addAction(tr("Close Window"), this, [this] { ((TermWidgetPage *)m_Page)->close();}); + if (parentPage()->getTerminalCount() > 1) + m_menu->addAction(QObject::tr("Close other workspaces"), this, &TermWidget::onCloseOtherWorkSpaces); + + /********************* Modify by n014361 wangpeili End ************************/ + m_menu->addSeparator(); + m_menu->addAction(tr("New tab"), this, &TermWidget::onCreateNewTab); + + m_menu->addSeparator(); + + if (!parentPage()->parentMainWindow()->isQuakeMode()) { + bool isFullScreen = this->window()->windowState().testFlag(Qt::WindowFullScreen); + if (isFullScreen) + m_menu->addAction(tr("Exit fullscreen"), this, &TermWidget::onSwitchFullScreen); + else + m_menu->addAction(tr("Fullscreen"), this, &TermWidget::onSwitchFullScreen); + } + + m_menu->addAction(tr("Find"), this, &TermWidget::onShowSearchBar); + m_menu->addSeparator(); + + if (!selectedText().isEmpty()) { + DMenu *search = new DMenu(tr("Search"), this); + + search->addAction("Bing", this, &TermWidget::openBing); + search->addAction("Baidu", this, &TermWidget::openBaidu); + search->addAction("Github", this, &TermWidget::openGithub); + search->addAction("Stack Overflow", this, &TermWidget::openStackOverflow); + m_menu->addMenu(search); + m_menu->addSeparator(); + } + + m_menu->addAction(tr("Encoding"), this, &TermWidget::onShowEncoding); + + m_menu->addAction(tr("Custom commands"), this, &TermWidget::onShowCustomCommands); + + m_menu->addAction(tr("Remote management"), this, &TermWidget::onShowRemoteManagement); + + if (isConnectRemote()) { + m_menu->addSeparator(); + m_menu->addAction(tr("Upload file"), this, &TermWidget::onUploadFile); + m_menu->addAction(tr("Download file"), this, &TermWidget::onDownloadFile); + } + + m_menu->addSeparator(); + + m_menu->addAction(tr("Settings"), this, &TermWidget::onShowSettings); + + // 判断是否到达最大数量 + if (!Service::instance()->isCountEnable()) { + QList actionList = m_menu->actions(); + for (auto item : actionList) { + if (item->text() == tr("New tab") || item->text() == tr("Horizontal split") || item->text() == tr("Vertical split")) { + // 无法点击的菜单项置灰 + item->setEnabled(false); + } + } + } +} + +inline void TermWidget::onHorizontalSplit() +{ + getTermLayer(); + // menu关闭与分屏同时进行时,会导致QT计算光标位置异常。 + QTimer::singleShot(10, this, &TermWidget::splitHorizontal); +} + +inline void TermWidget::onVerticalSplit() +{ + getTermLayer(); + // menu关闭与分屏同时进行时,会导致QT计算光标位置异常。 + QTimer::singleShot(10, this, &TermWidget::splitVertical); +} + +inline void TermWidget::splitHorizontal() +{ + parentPage()->split(Qt::Horizontal); +} + +inline void TermWidget::splitVertical() +{ + parentPage()->split(Qt::Vertical); +} + +inline void TermWidget::onCloseCurrWorkSpace() +{ + parentPage()->closeSplit(parentPage()->currentTerminal()); +} + +inline void TermWidget::onCloseOtherWorkSpaces() +{ + parentPage()->closeOtherTerminal(); +} + +inline void TermWidget::onCreateNewTab() +{ + parentPage()->parentMainWindow()->createNewTab(); +} + +inline void TermWidget::onSwitchFullScreen() +{ + parentPage()->parentMainWindow()->switchFullscreen(); +} + +inline void TermWidget::openBing() +{ + QString strUrl = "https://cn.bing.com/search?q=" + selectedText(); + openUrl(strUrl); +} + +inline void TermWidget::openBaidu() +{ + QString strUrl = "https://www.baidu.com/s?wd=" + selectedText(); + openUrl(strUrl); +} + +inline void TermWidget::openGithub() +{ + QString strUrl = "https://github.com/search?q=" + selectedText(); + openUrl(strUrl); +} + +inline void TermWidget::openStackOverflow() +{ + QString strUrl = "https://stackoverflow.com/search?q=" + selectedText(); + openUrl(strUrl); +} + +inline void TermWidget::onShowSearchBar() +{ + parentPage()->parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_SEARCHBAR); +} + +inline void TermWidget::onShowEncoding() +{ + parentPage()->parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); +} + +inline void TermWidget::onShowCustomCommands() +{ + parentPage()->parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND); +} + +inline void TermWidget::onShowRemoteManagement() +{ + parentPage()->parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); +} + +inline void TermWidget::onUploadFile() +{ + parentPage()->parentMainWindow()->remoteUploadFile(); +} + +inline void TermWidget::onDownloadFile() +{ + parentPage()->parentMainWindow()->remoteDownloadFile(); +} + +inline void TermWidget::onShowSettings() +{ + Service::instance()->showSettingDialog(parentPage()->parentMainWindow()); +} + +inline void TermWidget::openUrl(QString strUrl) +{ + QDesktopServices::openUrl(QUrl(strUrl)); +} + +inline QString TermWidget::getFormatFileName(QString selectedText) +{ + QString fileName = selectedText.trimmed(); + if ((fileName.startsWith("'") && fileName.endsWith("'")) + || (fileName.startsWith("\"") && fileName.endsWith("\""))) { + fileName = fileName.remove(0, 1); + fileName = fileName.remove(fileName.length() - 1, 1); + qInfo() << "fileName is :" << fileName; + } + + return fileName; +} + +inline QString TermWidget::getFilePath(QString fileName) +{ + //如果fileName本身已经是一个文件路径 + if (fileName.startsWith("/")) + return fileName; + + return workingDirectory() + "/" + fileName; +} + +inline void TermWidget::onOpenFile() +{ + QString fileName = getFormatFileName(selectedText()); + QString filePath = getFilePath(fileName); + QUrl fileUrl = QUrl::fromLocalFile(filePath); + QDesktopServices::openUrl(fileUrl); +} + +QString TermWidget::RemoteEncode() const +{ + return m_remoteEncode; +} + +void TermWidget::setRemoteEncode(const QString &RemoteEncode) +{ + m_remoteEncode = RemoteEncode; +} + +void TermWidget::setBackspaceMode(const EraseMode &backspaceMode) +{ + char ch; + int length; + switch (backspaceMode) { + case EraseMode_Auto: + ch = getErase(); + if (ch == 0) + ch = '\010'; + length = 1; + break; + case EraseMode_Control_H: + ch = '\010'; + length = 1; + break; + case EraseMode_Ascii_Delete: + ch = '\177'; + length = 1; + break; + case EraseMode_TTY: + ch = getErase(); + length = 1; + qInfo() << "tty erase : " << QByteArray(&ch, length).toHex(); + break; + case EraseMode_Escape_Sequeue: + length = 4; + char sequeue[] = "\e[3~"; + QTermWidget::setBackspaceMode(sequeue, 4); + return; + } + QTermWidget::setBackspaceMode(&ch, length); +} + +void TermWidget::setDeleteMode(const EraseMode &deleteMode) +{ + char ch; + int length; + switch (deleteMode) { + case EraseMode_Control_H: + ch = '\010'; + length = 1; + break; + case EraseMode_Ascii_Delete: + ch = '\177'; + length = 1; + break; + case EraseMode_TTY: + ch = getErase(); + length = 1; + qInfo() << "tty erase : " << QByteArray(&ch, length).toHex(); + break; + case EraseMode_Auto: + case EraseMode_Escape_Sequeue: + length = 4; + char sequeue[] = "\e[3~"; + QTermWidget::setDeleteMode(sequeue, 4); + return; + } + QTermWidget::setDeleteMode(&ch, length); +} + +int TermWidget::getTermLayer() +{ + int layer = 1; + QWidget *currentW = this; + while (currentW->parentWidget() != parentPage()) { + layer++; + currentW = currentW->parentWidget(); + } + qInfo() << "getTermLayer = " << layer; + return layer; +} + +void TermWidget::setTabFormat(const QString &tabFormat) +{ + // 非全局设置优先级更高 + if (m_tabFormat.isGlobal != false && m_tabFormat.currentTabFormat != tabFormat) { + m_tabFormat.currentTabFormat = tabFormat; + // 有变化,就将变化发出,但此时可能显示的不是变化的项 + emit termTitleChanged(getTabTitle()); + } +} + +void TermWidget::setRemoteTabFormat(const QString &remoteTabFormat) +{ + // 非全局设置优先级更高 + if (m_tabFormat.isGlobal != false && m_tabFormat.remoteTabFormat != remoteTabFormat) { + m_tabFormat.remoteTabFormat = remoteTabFormat; + // 有变化,就将变化发出,但此时可能显示的不是变化的项 + emit termTitleChanged(getTabTitle()); + } +} + +void TermWidget::renameTabFormat(const QString &tabFormat, const QString &remoteTabFormat) +{ + // 重命名优先级高 + m_tabFormat.currentTabFormat = tabFormat; + m_tabFormat.remoteTabFormat = remoteTabFormat; + m_tabFormat.isGlobal = false; + emit termTitleChanged(getTabTitle()); +} + +QString TermWidget::getTabTitle() +{ + QString strTabName; + // 判断当前是否连接远程 + if (isConnectRemote() /*|| getForegroundProcessName() == "ssh"*/) { + // 连接远程 远程标签标题格式 + strTabName = getTabTitle(m_remoteTabArgs, m_tabFormat.remoteTabFormat); + } else { + // 当前标签标题格式 + strTabName = getTabTitle(m_tabArgs, m_tabFormat.currentTabFormat); + } + + // 没有内容则给Terminal作为默认标题 + if (strTabName.trimmed().isEmpty()) + strTabName = DEFAULT_TAB_TITLE; + + return strTabName; +} + +QString TermWidget::getTabTitle(QMap format, QString TabFormat) +{ + // 遍历参数列表 + for (QString key : format.keys()) { + // 判断是否包含改参数 + if (TabFormat.contains(key)) { + // 包含的话,把参数替换为参数对应的内容 + TabFormat.replace(key, format[key]); + } + } + return TabFormat; +} + +void TermWidget::initTabTitle() +{ + static ushort sessionNumber = 0; + // 初始化标签标题参数 + initTabTitleArgs(); + // 会话编号赋值 + m_sessionNumber = ++sessionNumber; + m_tabArgs[TAB_NUM] = QString::number(m_sessionNumber); + m_remoteTabArgs[TAB_NUM] = QString::number(m_sessionNumber); + // 初始化hostName + m_tabArgs[LOCAL_HOST_NAME] = QHostInfo::localHostName(); + // 设置标签标题格式 + setTabFormat(Settings::instance()->tabTitleFormat()); + setRemoteTabFormat(Settings::instance()->remoteTabTitleFormat()); + // 标签标题变化,则每个term变化 + connect(Settings::instance(), &Settings::tabFormatChanged, this, &TermWidget::setTabFormat); + connect(Settings::instance(), &Settings::remoteTabFormatChanged, this, &TermWidget::setRemoteTabFormat); +} + +void TermWidget::initTabTitleArgs() +{ + QStringList strTabArgs = TAB_ARGS.split(" "); + // 填充标签标题参数 + for (QString arg : strTabArgs) + m_tabArgs.insert(arg, " "); + + // 填充远程标题标签参数 + QStringList strRemoteTabArgs = REMOTE_ARGS.split(" "); + for (QString arg : strRemoteTabArgs) + m_remoteTabArgs.insert(arg, " "); + + qInfo() << "Tab args init! tab title count : " << m_tabArgs.count() << " remote title count : " << m_remoteTabArgs.count(); +} + +QString TermWidget::getTabTitleFormat() +{ + return m_tabFormat.currentTabFormat; +} + +QString TermWidget::getRemoteTabTitleFormat() +{ + return m_tabFormat.remoteTabFormat; +} + +QString TermWidget::getCurrentTabTitleFormat() +{ + // 连接远程 + if (isConnectRemote()) + return m_tabFormat.remoteTabFormat; + + // 未连接远程 + return m_tabFormat.currentTabFormat; +} + +QString TermWidget::encode() const +{ + return m_encode; +} + +void TermWidget::setEncode(const QString &encode) +{ + m_encode = encode; +} + +bool TermWidget::isConnectRemote() const +{ + return m_isConnectRemote; +} + +void TermWidget::setIsConnectRemote(bool isConnectRemote) +{ + m_isConnectRemote = isConnectRemote; +} + +void TermWidget::modifyRemoteTabTitle(ServerConfig remoteConfig) +{ + // 远程主机名 + m_remoteTabArgs[REMOTE_HOST_NAME] = remoteConfig.m_address; + // 用户名 %u + m_remoteTabArgs[USER_NAME] = remoteConfig.m_userName; + // 用户名@ %U + m_remoteTabArgs[USER_NAME_L] = remoteConfig.m_userName + QString("@"); + + // 标签标题变化 + emit termTitleChanged(getTabTitle()); +} + +bool TermWidget::enterSzCommand() const +{ + return m_enterSzCommand; +} + +void TermWidget::setEnterSzCommand(bool enterSzCommand) +{ + m_enterSzCommand = enterSzCommand; +} + +inline void TermWidget::customContextMenuCall(const QPoint &pos) +{ + /***add by ut001121 zhangmeng 20200514 右键获取焦点, 修复BUG#26003***/ + setFocus(); + + // 右键清理插件 + parentPage()->parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_NONE); + + /*** 修复 bug 28162 鼠标左右键一起按终端会退出 ***/ + if (nullptr == m_menu) { + m_menu = new DMenu(this); + m_menu->setObjectName("TermMenu");//Add by ut001000 renfeixiang 2020-08-13 + } + + m_menu->clear(); + addMenuActions(pos); + + // display the menu. + m_menu->exec(mapToGlobal(pos)); +} + +bool TermWidget::isInRemoteServer() +{ + int pid = getForegroundProcessId(); + if (pid <= 0) + return false; + + QString pidFilepath = "/proc/" + QString::number(pid) + "/comm"; + QFile pidFile(pidFilepath); + if (pidFile.exists()) { + pidFile.open(QIODevice::ReadOnly | QIODevice::Text); + QString commString(pidFile.readLine()); + pidFile.close(); + if ("expect" == commString.trimmed()) + return true; + } + return false; +} + +void TermWidget::setTermOpacity(qreal opacity) +{ + //这里再次判断一遍,因为刚启动时,还是需要判断一次当前是否开启了窗口特效 + qreal termOpacity = opacity; + if (!Service::instance()->isWindowEffectEnabled()) + termOpacity = 1.0; + + setTerminalOpacity(termOpacity); + /******* Modify by n014361 wangpeili 2020-01-04: 修正实时设置透明度问题************/ + hide(); + show(); + /********************* Modify by n014361 wangpeili End ************************/ +} + +void TermWidget::setTermFont(const QString &fontName) +{ + QFont font = getTerminalFont(); + font.setFamily(fontName); + setTerminalFont(font); +} + +void TermWidget::setTermFontSize(const int fontSize) +{ + QFont font = getTerminalFont(); + font.setFixedPitch(true); + font.setPointSize(fontSize); + setTerminalFont(font); +} + + +void TermWidget::skipToNextCommand() +{ +} + +void TermWidget::skipToPreCommand() +{ +} + +void TermWidget::setCursorShape(int shape) +{ + Konsole::Emulation::KeyboardCursorShape cursorShape = Konsole::Emulation::KeyboardCursorShape(shape); + setKeyboardCursorShape(cursorShape); +} + +void TermWidget::setPressingScroll(bool enable) +{ + if (enable) + setMotionAfterPasting(2); + else + setMotionAfterPasting(0); +} + +void TermWidget::selectEncode(QString encode) +{ + // 直接设置终端 + setTextCodec(QTextCodec::codecForName(encode.toUtf8())); + // 是否连接远程 + if (!isConnectRemote()) { + // 记录当前的encode + setEncode(encode); + qInfo() << "current encode " << encode; + } else { + // 记录远程的encode + setRemoteEncode(encode); + qInfo() << "Remote encode " << encode; + } +} + +void TermWidget::onSettingValueChanged(const QString &keyName) +{ + qInfo() << "onSettingValueChanged:" << keyName; + if ("basic.interface.opacity" == keyName) { + setTermOpacity(Settings::instance()->opacity()); + return; + } + + if ("basic.interface.font" == keyName) { + setTermFont(Settings::instance()->fontName()); + /******** Add by nt001000 renfeixiang 2020-05-20:增加字体变化时设置雷神窗口最小高度 Begin***************/ + m_page->parentMainWindow()->setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:字体改变时改变大小,bug#41436***************/ + m_page->parentMainWindow()->updateMinHeight(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加字体变化时设置雷神窗口最小高度 End***************/ + return; + } + + if ("basic.interface.font_size" == keyName) { + setTermFontSize(Settings::instance()->fontSize()); + /******** Add by nt001000 renfeixiang 2020-05-20:增加字体大小变化时设置雷神窗口最小高度 Begin***************/ + m_page->parentMainWindow()->setWindowMinHeightForFont(); + /******** Add by ut001000 renfeixiang 2020-08-07:字体大小改变时改变大小,bug#41436***************/ + m_page->parentMainWindow()->updateMinHeight(); + /******** Add by nt001000 renfeixiang 2020-05-20:增加字体大小变化时设置雷神窗口最小高度 End***************/ + return; + } + + if ("advanced.cursor.cursor_shape" == keyName) { + setCursorShape(Settings::instance()->cursorShape()); + return; + } + + if ("advanced.cursor.cursor_blink" == keyName) { + setBlinkingCursor(Settings::instance()->cursorBlink()); + return; + } + + if ("advanced.scroll.scroll_on_key" == keyName) { + setPressingScroll(Settings::instance()->PressingScroll()); + return; + } + + if ("basic.interface.theme" == keyName) { + return; + } + // 这里只是立即生效一次,真正生效起作用的地方在初始的connect中 + if ("advanced.cursor.auto_copy_selection" == keyName) { + if (Settings::instance()->IsPasteSelection()) + copyClipboard(); + else + QApplication::clipboard()->clear(QClipboard::Clipboard); + + return; + } + + if ("advanced.scroll.scroll_on_output" == keyName) { + qInfo() << "settingValue[" << keyName << "] changed to " << Settings::instance()->OutputtingScroll() + << ", auto effective when happen"; + return; + } + + qInfo() << "settingValue[" << keyName << "] changed is not effective"; +} + +void TermWidget::onDropInUrls(const char *urls) +{ + QString strUrls = QString::fromLocal8Bit(urls); + qInfo() << "recv urls:" << strUrls; + if (isConnectRemote()) { + // 远程管理连接中 + QString strTxt = "sz "; + strTxt += strUrls; + // 上传文件 + parentPage()->parentMainWindow()->remoteUploadFile(strTxt); + } else { + // 发送字符 + sendText(strUrls); + } +} + + +inline void TermWidget::onTouchPadSignal(QString name, QString direction, int fingers) +{ + qInfo() << name << direction << fingers; + // 当前窗口被激活,且有焦点 + if (isActiveWindow() && hasFocus()) { + if (name == "pinch" && fingers == 2) { + if (direction == "in") { + // 捏合 in是手指捏合的方向 向内缩小 + zoomOut(); // zoom out 缩小 + } else if (direction == "out") { + // 捏合 out是手指捏合的方向 向外放大 + zoomIn(); // zoom in 放大 + } + } + } +} + +void TermWidget::onShellMessage(QString currentShell, bool isSuccess) +{ + if (isSuccess) { + // 替换了shell提示 + QString strSetShell = Settings::instance()->shellPath(); + QString strShellWarning = QObject::tr("Could not find \"%1\", starting \"%2\" instead. Please check your shell profile.").arg(strSetShell).arg(currentShell); + showShellMessage(strShellWarning); + } else { + // 启动shell失败 + QString strShellNoFound; + if(QFile::exists(currentShell)) + strShellNoFound = QObject::tr("Could not open \"%1\", unable to run it").arg(currentShell); + else + strShellNoFound = QObject::tr("Could not find \"%1\", unable to run it").arg(currentShell); + + showShellMessage(strShellNoFound); + } +} + +void TermWidget::wheelEvent(QWheelEvent *event) +{ + // 当前窗口被激活,且有焦点 + if (isActiveWindow() && hasFocus()) { + if (Qt::ControlModifier == event->modifiers()) { + int directionY = event->angleDelta().y(); + if (directionY < 0) { + // 向下缩小 + zoomOut(); // zoom out 缩小 + } else { + // 向上放大 + zoomIn(); // zoom in 放大 + } + return; + } + } + QTermWidget::wheelEvent(event); +} + +bool TermWidget::eventFilter(QObject *o, QEvent *e) +{ + if (m_messageTextMap.contains(o) && QEvent::Resize == e->type()) { + QLabel *label = static_cast(o); + QString orgText = m_messageTextMap[o]; + QString elideText = Utils::getElidedText(label->font(), orgText, label->width(), Qt::ElideRight); + if (elideText != label->text()) + label->setText(elideText); + } + return QTermWidget::eventFilter(o, e); +} + +void TermWidget::showFlowMessage(bool show) +{ + if (nullptr == m_flowMessage) { + m_flowMessage = new DFloatingMessage(DFloatingMessage::ResidentType, this); + QList lst = m_flowMessage->findChildren(); + for (auto label : lst) { + label->setWordWrap(false); + } + m_flowMessage->setIcon(QIcon(":icons/deepin/builtin/warning.svg")); + QString strText = QObject::tr("Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume."); + installEventMessageText(m_flowMessage, strText); + DMessageManager::instance()->sendMessage(this, m_flowMessage); + } + m_flowMessage->setVisible(show); +} + +void TermWidget::showShellMessage(QString strWarnings) +{ + // 初始化悬浮框 + DFloatingMessage *shellWarningsMessage = new DFloatingMessage(DFloatingMessage::ResidentType, this); + QList lst = shellWarningsMessage->findChildren(); + for (auto label : lst) { + label->setWordWrap(false); + } + // 关闭悬浮框时销毁 + connect(shellWarningsMessage, &DFloatingMessage::closeButtonClicked, shellWarningsMessage, &DFloatingMessage::deleteLater); + // 设置icon和文字 + shellWarningsMessage->setIcon(QIcon(":icons/deepin/builtin/warning.svg")); + installEventMessageText(shellWarningsMessage, strWarnings); + // 调用DTK的方法关闭悬浮框 + DMessageManager::instance()->sendMessage(this, shellWarningsMessage); +} + +void TermWidget::installEventMessageText(DFloatingMessage *widget, const QString &text) +{ + widget->setMessage("the sentence for searching MessageLabel of DFloatingMessage"); + for (auto label : widget->findChildren()) { + if ("the sentence for searching MessageLabel of DFloatingMessage" == label->text()) { + label->installEventFilter(this); + m_messageTextMap[label] = text; + break; + } + } + widget->setMessage(text); +} + + diff -Nru deepin-terminal-5.0.0+ds1/src/views/termwidget.h deepin-terminal-5.4.13/src/views/termwidget.h --- deepin-terminal-5.0.0+ds1/src/views/termwidget.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termwidget.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,484 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TERMWIDGET_H +#define TERMWIDGET_H + +#include "qtermwidget.h" +#include "termwidgetpage.h" + +/******************************************************************************* + 1. @类名: TermWidget + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-11 + 4. @说明: +*******************************************************************************/ + +// 程序名 %n +const QString PROGRAM_NAME = "%n"; +// 当前目录长 %D +const QString DIR_L = "%D"; +// 当前目录短 %d +const QString DIR_S = "%d"; +// 会话编号 %# +const QString TAB_NUM = "%#"; +// 用户名 +const QString USER_NAME = "%u"; +// 用户名@ +const QString USER_NAME_L = "%U"; +// 本地主机 +const QString LOCAL_HOST_NAME = "%h"; +// 远程主机 +const QString REMOTE_HOST_NAME = "%h"; +// shell设置的窗口标题 +const QString SHELL_TITLE = "%w"; + +// 标签标题格式参数 +const QString TAB_ARGS = "%n %d %D %# %u %h %w"; +// 远程标签标题格式参数 +const QString REMOTE_ARGS = "%u %U %h %# %w"; + +// 删除和退格键可选模式 +enum EraseMode { + EraseMode_Auto, + EraseMode_Ascii_Delete, + EraseMode_Control_H, + EraseMode_TTY, + EraseMode_Escape_Sequeue +}; + +// 标签标题格式 +struct TabFormat { + // 当前标签标题格式 + QString currentTabFormat; + // 远程标签标题格式 + QString remoteTabFormat; + // 是否是全局设置 + bool isGlobal = true; +}; + +class TermProperties; +struct ServerConfig; +class TermWidget : public QTermWidget +{ + Q_OBJECT +public: + TermWidget(const TermProperties &properties, QWidget *parent = nullptr); + ~TermWidget(); + /** + * @brief 获取父页面 + * @author ut000610 daizhengwen + * @return + */ + TermWidgetPage *parentPage(); + /** + * @brief 是否在远程服务器中 + * @author ut000610 daizhengwen + * @return + */ + bool isInRemoteServer(); +public: + /** + * @brief 跳转到下一个命令(这个功能没找到库的接口,现在是暂时是以虚拟键形式实现) + * @author n014361 王培利 + */ + void skipToNextCommand(); + /** + * @brief 跳转到前一个命令(这个功能没找到库的接口,现在是暂时是以虚拟键形式实现) + * @author n014361 王培利 + */ + void skipToPreCommand(); + /** + * @brief 设置不透明度 + * @author ut000610 daizhengwen + * @param opacity 不透明度 + */ + void setTermOpacity(qreal opacity); + /** + * @brief 设置字体 + * @author n014361 王培利 + * @param fontName 字体名称 + */ + void setTermFont(const QString &fontName); + /** + * @brief 设置字体大小 + * @author n014361 王培利 + * @param fontSize 字体大小 + */ + void setTermFontSize(const int fontSize); + /** + * @brief 设置光标形状 + * @author n014361 王培利 + * @param shape 光标形状 + */ + void setCursorShape(int shape); + /** + * @brief 设置按键时是否滚动 + * @author ut001121 zhangmeng + * @param enable 是否滚动 + */ + void setPressingScroll(bool enable); + /** + * @brief 选择编码 + * @author ut000610 daizhengwen + * @param encode 编码 + */ + void selectEncode(QString encode); + + /** + * @brief 是否进行下载 + * @author ut000610 daizhengwen + * @return + */ + bool enterSzCommand() const; + /** + * @brief 设置进行下载 + * @author ut000610 daizhengwen + * @param enterSzCommand + */ + void setEnterSzCommand(bool enterSzCommand); + + /** + * @brief 是否连接远程管理 + * @author ut000610 daizhengwen + * @return + */ + bool isConnectRemote() const; + /** + * @brief 设置连接远程管理 + * @author ut000610 daizhengwen + * @param isConnectRemote 是否连接远程管理 + */ + void setIsConnectRemote(bool isConnectRemote); + /** + * @brief 连接远程后修改当前标签标题 + * @author ut000610 戴正文 + * @param remoteConfig 远程配置 + */ + void modifyRemoteTabTitle(ServerConfig remoteConfig); + + /** + * @brief 获取编码 + * @author ut000610 daizhengwen + * @return + */ + QString encode() const; + /** + * @brief 设置编码 + * @author ut000610 daizhengwen + * @param encode 编码 + */ + void setEncode(const QString &encode); + + /** + * @brief 获取远程管理的编码 + * @author ut000610 daizhengwen + * @return + */ + QString RemoteEncode() const; + /** + * @brief 设置远程管理的编码 + * @author ut000610 daizhengwen + * @param RemoteEncode + */ + void setRemoteEncode(const QString &RemoteEncode); + + /** + * @brief 根据设置的模式改变退格模式(用户选择接口) + * @author ut000610 戴正文 + * @param backspaceMode + */ + void setBackspaceMode(const EraseMode &backspaceMode); + + /** + * @brief 根据设置的模式改变删除模式(用户选择接口) + * @author ut000610 戴正文 + * @param deleteMode + */ + void setDeleteMode(const EraseMode &deleteMode); + + /** + * @brief 获取当前terminal距离page的层次.用于限定分屏 + * @author ut000439 王培利 + * @return + */ + int getTermLayer(); + + /** + * @brief 设置标签标题格式(全局设置) + * @author ut000610 戴正文 + * @param tabFormat + */ + void setTabFormat(const QString &tabFormat); + /** + * @brief 设置远程标签标题格式(全局设置) + * @author ut000610 戴正文 + * @param remoteTabFormat + */ + void setRemoteTabFormat(const QString &remoteTabFormat); + // 修改所有的标签标题格式 + /** + * @brief 重命名标签标题/远程标签标题格式 + * @author ut000610 戴正文 + * @param tabFormat 标签标题 + * @param remoteTabFormat 远程标签标题格式 + */ + void renameTabFormat(const QString &tabFormat, const QString &remoteTabFormat); + /** + * @brief 获取标签对应的标签标题 + * @author ut000610 戴正文 + * @return + */ + QString getTabTitle(); + /** + * @brief 初始化终端标签 + * @author ut000610 戴正文 + */ + void initTabTitle(); + /** + * @brief 初始化标签标题参数列表 + * @author ut000610 戴正文 + */ + void initTabTitleArgs(); + /** + * @brief 获取标签标题格式 + * @author ut000610 戴正文 + * @return + */ + QString getTabTitleFormat(); + /** + * @brief 获取远程标签标题格式 + * @author ut000610 戴正文 + * @return + */ + QString getRemoteTabTitleFormat(); + /** + * @brief 获取当前term显示的标签标题 + * @author ut000610 戴正文 + * @return + */ + QString getCurrentTabTitleFormat(); + /** + * @brief Ctrl+Q/Ctrl+S的悬浮提示框 + * @author 朱科伟 + * @param show 文案提示 + */ + void showFlowMessage(bool show); + /** + * @brief shell启动失败时的悬浮提示框 + * @author ut000610 戴正文 + * @param strWarnings 提示 + */ + void showShellMessage(QString strWarnings); + /** + * @brief 弹窗安装事件过滤器,更新DFloatingMessage的text + * @author ut003135 changze + * @param widget + * @param text + */ + void installEventMessageText(DFloatingMessage *widget, const QString &text); +public slots: + /** + * @brief Terminal的各项设置生效 + * @author n014361 王培利 + * @param keyName 设置项名称 + */ + void onSettingValueChanged(const QString &keyName); + /** + * @brief 处理拖拽进来的文件名,1) 正常模式下: 目前只显示,暂不处理 + * @author ut000610 戴正文 + * @param urls 拖拽进来的文件名 + */ + void onDropInUrls(const char *urls); + /** + * @brief 处理触控板事件 + * @author ut000610 戴正文 + * @param name 触控板事件类型(手势或者触摸类型) pinch 捏 tap 敲 swipe 右键单击 单键 + * @param direction 手势方向 触控板上 up 触控板下 down 左 left 右 right 无 none 向内 in 向外 out 触控屏上 top 触摸屏下 bot + * @param fingers 手指数量 (1,2,3,4,5) + */ + void onTouchPadSignal(QString name, QString direction, int fingers); + /** + * @brief 处理shell消息提示 + * @author ut000610 戴正文 + * @param currentShell 当前使用的shell + * @param isSuccess 启用shell是否成功 true 替换了shell false 替换shell但启动失败 + */ + void onShellMessage(QString currentShell, bool isSuccess); + +signals: + void termRequestRenameTab(QString newTabName); + void termIsIdle(QString tabIdentifier, bool bIdle); + void termTitleChanged(QString titleText); + +protected: + /** + * @brief 鼠标滚轮事件 支持Ctrl + 滚轮上下事件:Ctrl+滚轮上 放大;Ctrl+滚轮下 缩小 + * @author ut000610 戴正文 + * @param event 滚轮事件 + */ + void wheelEvent(QWheelEvent *event) override; + /** + * @brief 监控事件过滤,终端宽度缩小时,相关弹窗也同步变化 + * @author ut003135 changze + * @param o + * @param e + * @return + */ + bool eventFilter(QObject *o, QEvent *e) override; + +private slots: + /** + * @brief 自定义上下文菜单调用 + * @author ut000125 sunchengxi + * @param pos + */ + void customContextMenuCall(const QPoint &pos); + /** + * @brief 标签标题参数变化 + * @author ut000610 戴正文 + * @param key + * @param value + */ + void onTitleArgsChange(QString key, QString value); + /** + * @brief 主机名变化 + * @author ut000610 戴正文 + */ + void onHostnameChanged(); + + void onQTermWidgetReceivedData(QString value); + void onTermWidgetReceivedData(QString value); + void onExitRemoteServer(); + void onUrlActivated(const QUrl &url, bool fromContextMenu); + void onThemeTypeChanged(DGuiApplicationHelper::ColorType builtInTheme); + void onTermIsIdle(bool bIdle); + void onTitleChanged(); + void onWindowEffectEnabled(bool isWinEffectEnabled); + void onCopyAvailable(bool enable); + void onSetTerminalFont(); + void onSig_matchFound(); + void onSig_noMatchFound(); + + void onCopy(); + void onPaste(); + /** + * @brief 根据文件路径打开文件 + * @author ut000438 王亮 + */ + void onOpenFile(); + void onOpenFileInFileManager(); + void onUploadFile(); + void onDownloadFile(); + void onShowSettings(); + void onShowEncoding(); + void onShowCustomCommands(); + void onShowRemoteManagement(); + void onShowSearchBar(); + void onHorizontalSplit(); + void onVerticalSplit(); + void splitHorizontal(); + void splitVertical(); + void onCloseCurrWorkSpace(); + void onCloseOtherWorkSpaces(); + void onCreateNewTab(); + void onSwitchFullScreen(); + void openBing(); + void openBaidu(); + void openGithub(); + void openStackOverflow(); +private: + /** + * @brief 初始化信号槽连接 + * @author ut000438 王亮 + */ + void initConnections(); + /*** 修复 bug 28162 鼠标左右键一起按终端会退出 ***/ + /** + * @brief 添加菜单操作 + * @author ut000610 daizhengwen + * @param pos + */ + void addMenuActions(const QPoint &pos); + /** + * @brief 根据标签格式获取标签标题 + * @author ut000610 戴正文 + * @param format 格式 + * @param TabFormat 标签格式 + * @return + */ + QString getTabTitle(QMap format, QString TabFormat); + + /** + * @brief 浏览器打开对应的链接 + * @param strUrl 相关链接 + */ + void openUrl(QString strUrl); + + /** + * @brief 根据选择的文件名字符串得到合法的文件名,去除文件名开头/结尾的''或"" + * @author ut000438 王亮 + * @param selectedText 选择的文件名字符串 + * @return + */ + QString getFormatFileName(QString selectedText); + /** + * @brief 根据文件名拼接得到文件路径 + * @author ut000438 王亮 + * @param fileName 文件名 + * @return + */ + QString getFilePath(QString fileName); + + TermWidgetPage *m_page = nullptr; + TermProperties m_properties; + + DMenu *m_menu = nullptr; + /******** Modify by ut000610 daizhengwen 2020-05-27: 当前窗口是否要进行下载操作****************/ + bool m_enterSzCommand = false; + /********************* Modify by ut000610 daizhengwen End ************************/ + /******** Modify by ut000610 daizhengwen 2020-05-28: 当前窗口是否连接远程服务器****************/ + bool m_isConnectRemote = false; + /********************* Modify by ut000610 daizhengwen End ************************/ + // 当前编码 + QString m_encode = "UTF-8"; + // 远程编码 + QString m_remoteEncode = "UTF-8"; + // 当前终端退格信号 + EraseMode m_backspaceMode = EraseMode_Ascii_Delete; + // 当前终端删除信号 + EraseMode m_deleteMode = EraseMode_Escape_Sequeue; + + // 标签格式 + // 当前标签标题参数 + QMap m_tabArgs; + // 远程标签标题参数 + QMap m_remoteTabArgs; + // 标签标题格式 + TabFormat m_tabFormat; + // 会话编号 + int m_sessionNumber; + // Ctrl+Q/Ctrl+S的悬浮框 + DFloatingMessage *m_flowMessage = nullptr; + //记录弹窗的信息 + QMap m_messageTextMap; +}; + +#endif // TERMWIDGET_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/termwidgetpage.cpp deepin-terminal-5.4.13/src/views/termwidgetpage.cpp --- deepin-terminal-5.0.0+ds1/src/views/termwidgetpage.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termwidgetpage.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,808 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "termwidgetpage.h" +#include "termwidget.h" +#include "settings.h" +#include "utils.h" +#include "service.h" +#include "windowsmanager.h" +#include "mainwindow.h" +#include "define.h" + +#include +#include + +#include +#include + +TermWidgetPage::TermWidgetPage(const TermProperties &properties, QWidget *parent) + : QWidget(parent), m_findBar(new PageSearchBar(this)) +{ + Utils::set_Object_Name(this); + //qInfo() << "parentTermWidgetPage" << parentWidget(); + m_MainWindow = qobject_cast(parentWidget()); + setFocusPolicy(Qt::NoFocus); + setProperty("TAB_CUSTOM_NAME_PROPERTY", false); + + //fix bug 55961 UOS SP2 OEM版本的系统下,一个窗口同时打开几个终端,各终端简无法切换 + //Qt自带API接口QUuid::createUuid()在浪潮服务器上会生成重复的id:ffffffff-ffff-4fff-bfff-ffffffffffff + QString pageId = QString::number(reinterpret_cast(this)); + // 生成唯一 pageID + setProperty("TAB_IDENTIFIER_PROPERTY", pageId); + + TermWidget *w = createTerm(properties); + m_layout = new QVBoxLayout(this); + m_layout->setObjectName("TermPageLayout");//Add by ut001000 renfeixiang 2020-08-13 + m_layout->setSpacing(0); + m_layout->setContentsMargins(0, 0, 0, 0); + m_layout->addWidget(w); + setLayout(m_layout); + //qInfo() << "w->parent()" << w->parent(); + + // Init find bar. + connect(m_findBar, &PageSearchBar::findNext, this, &TermWidgetPage::handleFindNext); + connect(m_findBar, &PageSearchBar::findPrev, this, &TermWidgetPage::handleFindPrev); + connect(m_findBar, &PageSearchBar::keywordChanged, this, &TermWidgetPage::handleKeywordChanged); + connect(DApplicationHelper::instance(), &DApplicationHelper::themeTypeChanged, this, &TermWidgetPage::handleThemeTypeChanged); + + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 2020-05-28 优化代码 Begin***************/ + connect(this, &TermWidgetPage::uninstallTerminal, this, &TermWidgetPage::handleUninstallTerminal); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + + m_currentTerm = w; +} + +inline void TermWidgetPage::handleKeywordChanged(QString keyword) +{ + handleUpdateSearchKeyword(keyword); +} + +inline void TermWidgetPage::handleThemeTypeChanged() +{ + applyTheme(); +} + +inline bool TermWidgetPage::handleUninstallTerminal(QString commandname) +{ + //MainWindow *mainWindow = qobject_cast(parent); + //构造函数中已经获取了mainwindow窗口,无需在获取一遍 + if (m_MainWindow && m_MainWindow->hasRunningProcesses()) { + if (!Utils::showExitUninstallConfirmDialog()) + return false; + } + return Utils::showUninstallConfirmDialog(commandname); +} + +MainWindow *TermWidgetPage::parentMainWindow() +{ + return m_MainWindow; +} + +void TermWidgetPage::setParentMainWindow(MainWindow *mainWin) +{ + m_MainWindow = mainWin; +} + +void TermWidgetPage::setSplitStyle(DSplitter *splitter) +{ + splitter->setHandleWidth(1); + QSplitterHandle *handle = splitter->handle(1); + + if (handle) { + //分割线颜色暂时设置为Highlight颜色,需要和UI确认下 + //此处代码暂时保留 //DPalette pa = DApplicationHelper::instance()->palette(handle); + //bug#57044 中的分割线颜色,保留的代码对默认主题,和十个内置主题的颜色是正确获取,但是在自定义的颜色获取存在异常,采取如下方式获取 + DPalette pa = DApplicationHelper::instance()->applicationPalette(); + QColor splitBrush = pa.color(DPalette::Highlight); + pa.setBrush(DPalette::Background, splitBrush); + handle->setPalette(pa); + handle->setBackgroundRole(QPalette::Background); + handle->setAutoFillBackground(true); + } +} + +TermWidget *TermWidgetPage::currentTerminal() +{ + return m_currentTerm; +} + +QString TermWidgetPage::getCurrentTerminalTitle() +{ + if (nullptr == m_currentTerm) + return ""; + return m_currentTerm->getTabTitle(); +} + +void TermWidgetPage::split(Qt::Orientation orientation) +{ + parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_NONE); + TermWidget *term = m_currentTerm; + if (1 == getTerminalCount()) { + qInfo() << "first split"; + QSplitter *firstSplit = createSubSplit(term, orientation); + m_layout->addWidget(firstSplit); + //return ; + } else { + qInfo() << "not first split"; + QSplitter *upSplit = qobject_cast(term->parent()); + int index = upSplit->indexOf(term); + QList parentSizes = upSplit->sizes(); + + // 用新的Split分割布局替换原来的位置 + QSplitter *subSplit = createSubSplit(term, orientation); + upSplit->insertWidget(index, subSplit); + upSplit->setSizes(parentSizes); + setSplitStyle(upSplit); + } + + /******** Add by ut001000 renfeixiang 2020-08-07:新增分屏时改变大小,bug#41436***************/ + parentMainWindow()->updateMinHeight(); + + //分屏时切换到当前选中主题方案 + QString expandThemeStr = ""; + expandThemeStr = Settings::instance()->extendColorScheme(); + if (!expandThemeStr.isEmpty()) + emit DApplicationHelper::instance()->themeTypeChanged(DGuiApplicationHelper::instance()->themeType()); + + return ; +} + +DSplitter *TermWidgetPage::createSubSplit(TermWidget *term, Qt::Orientation orientation) +{ + TermProperties properties(term->workingDirectory()); + term->setParent(nullptr); + TermWidget *newTerm = createTerm(properties); + + // 意义与名称是相反的 + DSplitter *subSplit = new DSplitter(orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, + this); + + subSplit->setFocusPolicy(Qt::NoFocus); + subSplit->insertWidget(0, term); + subSplit->insertWidget(1, newTerm); + subSplit->setSizes({ 1, 1 }); + setSplitStyle(subSplit); + setCurrentTerminal(newTerm); + /******** Modify by ut000439 wangpeili 2020-07-27: fix bug 39371: 分屏线可以拉到边****/ + subSplit->setChildrenCollapsible(false); + /********************* Modify by n014361 wangpeili End ************************/ + + return subSplit; +} + +void TermWidgetPage::closeSplit(TermWidget *term, bool hasConfirmed) +{ + qInfo() << "TermWidgetPage::closeSplit:" << term->getSessionId(); + if (getTerminalCount() > 1) { + if (!hasConfirmed && term->hasRunningProcess()) { + showExitConfirmDialog(Utils::CloseType_Terminal, 1, parentMainWindow()); + return; + } + QSplitter *upSplit = qobject_cast(term->parent()); + term->setParent(nullptr); + + // 另一个兄弟也可能是终端,也可能是split, + QWidget *brother = upSplit->widget(0); + TermWidget *nextTerm = upSplit->findChild(); + // 如果上级是分屏 + if ("QSplitter" == QString(upSplit->parent()->metaObject()->className())) { + QSplitter *upupSplit = qobject_cast(upSplit->parent()); + //兄弟替换parent split + upupSplit->replaceWidget(upupSplit->indexOf(upSplit), brother); + } + // 上级不是分屏控件,就是布局在控制了 + else { + qInfo() << "TermWidgetPage only one term exist!"; + m_layout->addWidget(brother); + } + + // 子控件的变化会引起焦点的变化,控制焦点要放在最后 + if (nextTerm != nullptr) { + qInfo() << "nextTerm change" << m_currentTerm->getSessionId(); + nextTerm->setFocus(); + } else { + qInfo() << "can not found nextTerm in TermWidget"; + } + + // 释放控件,并隐藏term、upSplit,避免出现闪现窗口bug#80809 + term->hide(); + term->deleteLater(); + upSplit->hide(); + upSplit->setParent(nullptr); + upSplit->deleteLater(); + qInfo() << "page terminal count =" << getTerminalCount(); + /******** Add by ut001000 renfeixiang 2020-08-07:关闭分屏时改变大小,bug#41436***************/ + parentMainWindow()->updateMinHeight(); + return; + } + parentMainWindow()->closeTab(identifier()); + return; +} + +void TermWidgetPage::showExitConfirmDialog(Utils::CloseType type, int count, QWidget *parent) +{ + /******** Modify by ut001000 renfeixiang 2020-06-03:修改 直接调用MainWindow中的showExitConfirmDialog函数中 Begin***************/ + parentMainWindow()->showExitConfirmDialog(type, count, parent); + /******** Modify by ut001000 renfeixiang 2020-06-03:修改 直接调用MainWindow中的showExitConfirmDialog函数中 End***************/ +// // count < 1 不提示 +// if (count < 1) { +// return; +// } +// QString title; +// QString txt; +// Utils::getExitDialogText(type, title, txt, count); + +// // 有弹窗显示 +// Service::instance()->setIsDialogShow(window(), true); + +// DDialog *dlg = new DDialog(title, txt, parent); +// dlg->setIcon(QIcon::fromTheme("deepin-terminal")); +// dlg->addButton(QString(tr("Cancel")), false, DDialog::ButtonNormal); +// /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close Begin***************/ +// dlg->addButton(QString(tr("Close")), true, DDialog::ButtonWarning); +// /******** Modify by nt001000 renfeixiang 2020-05-21:修改Exit成Close End***************/ +// dlg->setWindowModality(Qt::WindowModal); +// setAttribute(Qt::WA_ShowModal); +// dlg->show(); + + +// if (type == Utils::CloseType_Terminal) { +// connect(dlg, &DDialog::finished, this, [this](int result) { +// qInfo() << result; +// // 有弹窗消失 +// Service::instance()->setIsDialogShow(window(), false); +// if (result == 1) { +// //接口二次重入 +// closeSplit(currentTerminal(), true); +// } +// }); +// } + +// if (type == Utils::CloseType_OtherTerminals) { +// connect(dlg, &DDialog::finished, this, [this](int result) { +// qInfo() << result; +// // 有弹窗消失 +// Service::instance()->setIsDialogShow(window(), false); +// if (result == 1) { +// //接口二次重入 +// closeOtherTerminal(true); +// } +// }); +// } + + return ; +} + +const QString TermWidgetPage::identifier() +{ + return property("TAB_IDENTIFIER_PROPERTY").toString(); +} + +void TermWidgetPage::focusCurrentTerm() +{ + m_currentTerm->setFocus(); +} + +void TermWidgetPage::closeOtherTerminal(bool hasConfirmed) +{ + int runningCount = runningTerminalCount() - static_cast(currentTerminal()->hasRunningProcess()); + if (!hasConfirmed && runningCount != 0) { + showExitConfirmDialog(Utils::CloseType_OtherTerminals, runningCount, parentMainWindow()); + return; + } + + QList termList = findChildren(); + // 终端数量小于2,执行关闭其他窗口操作 + if (termList.count() < 2) { + qInfo() << "current window doesn't have other terminal, can't close other terminals."; + return; + } + + int currSessionId = m_currentTerm->getSessionId(); + //exit protection + for (TermWidget *term : qAsConst(termList)) { + if (term->getSessionId() != currSessionId) + // 前面已经检测过了,不用重复检测 + closeSplit(term, true); + } + + setTerminalOpacity(Settings::instance()->opacity()); + m_MainWindow->focusCurrentPage(); +} + +/******** Modify by ut000439 wangpeili 2020-01-07: 修改了计算上下左右判断的方法 ********×****/ +void TermWidgetPage::focusNavigation(Qt::Edge dir) +{ + QPoint comparPoint = GetComparePoint(currentTerminal(), dir); + TermWidget *dst = nullptr; + QList termList = findChildren(); + //QMap mapTermRect; + for (TermWidget *term : qAsConst(termList)) { + if (GetRect(term).contains(comparPoint)) { + qInfo() << "yes!" << comparPoint.x() << comparPoint.y(); + dst = term; + break; + } + } + if (dst) + dst->setFocus(); +} + +int TermWidgetPage::getTerminalCount() +{ + return findChildren().size(); +} + +bool TermWidgetPage::hasHasHorizontalSplit() +{ + qInfo() << "start hasHasHorizontalSplit"; + QList splitList = findChildren(); + for (QSplitter *split : splitList) { + if (Qt::Vertical == split->orientation()) { + return true; + } + } + return false; +} +/********************* Modify by ut000439 wangpeili End ************************/ +QRect TermWidgetPage::GetRect(TermWidget *term) +{ + QPoint leftTop = term->mapTo(term->window(), QPoint(0, 0)); + QPoint rightBottom = term->mapTo(term->window(), QPoint(term->width(), term->height())); + QRect rec(leftTop, rightBottom); + qInfo() << "leftTop: " << leftTop.x() << leftTop.y() << "rightBottom: " << rightBottom.x() << rightBottom.y(); + return rec; +} + +QPoint TermWidgetPage::GetComparePoint(TermWidget *term, Qt::Edge dir) +{ + QPoint leftTop = term->mapTo(term->window(), QPoint(0, 0)); + QPoint leftBottom = term->mapTo(term->window(), QPoint(0, term->height())); + QPoint rightTop = term->mapTo(term->window(), QPoint(term->width(), 0)); + QPoint ret; + switch (dir) { + case Qt::LeftEdge: + ret = leftTop + QPoint(-1, 1); + break; + case Qt::RightEdge: + ret = rightTop + QPoint(1, 1); + break; + case Qt::TopEdge: + ret = leftTop + QPoint(1, -1); + break; + case Qt::BottomEdge: + ret = leftBottom + QPoint(1, 1); + break; + } + return ret; +} + +int TermWidgetPage::runningTerminalCount() +{ + int count = 0; + QList termList = findChildren(); + for (TermWidget *term : termList) { + if (term->hasRunningProcess()) + count++; + } + return count; +} + +TermProperties TermWidgetPage::createCurrentTerminalProperties() +{ + TermProperties properties; + + TermWidget *term = currentTerminal(); + if (term) + properties[WorkingDir] = currentTerminal()->workingDirectory(); + + return properties; +} + +void TermWidgetPage::setTerminalOpacity(qreal opacity) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setTermOpacity(opacity); +} + +void TermWidgetPage::setColorScheme(const QString &name) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setColorScheme(name); +} + +void TermWidgetPage::sendTextToCurrentTerm(const QString &text, bool isRemoteConnect) +{ + TermWidget *term = currentTerminal(); + if (term) { + //标记当前命令是代码中通过sendText发给终端的(而不是用户手动输入的命令) + term->setProperty("isSendByRemoteManage", QVariant(isRemoteConnect)); + term->sendText(text); + } +} + +void TermWidgetPage::copyClipboard() +{ + TermWidget *term = currentTerminal(); + if (term) + term->copyClipboard(); +} + +void TermWidgetPage::pasteClipboard() +{ + TermWidget *term = currentTerminal(); + if (term) + term->pasteClipboard(); +} + +void TermWidgetPage::toggleShowSearchBar() +{ + TermWidget *term = currentTerminal(); + if (term) + term->toggleShowSearchBar(); +} + +void TermWidgetPage::zoomInCurrentTierminal() +{ + TermWidget *term = currentTerminal(); + if (term) + term->zoomIn(); +} + +void TermWidgetPage::zoomOutCurrentTerminal() +{ + TermWidget *term = currentTerminal(); + if (term) + term->zoomOut(); +} + +void TermWidgetPage::setFontSize(int fontSize) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setTermFontSize(fontSize); +} + +void TermWidgetPage::setFont(QString fontName) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setTermFont(fontName); +} + +void TermWidgetPage::selectAll() +{ + TermWidget *term = currentTerminal(); + if (term) + term->setSelectionAll(); +} + +void TermWidgetPage::skipToNextCommand() +{ + TermWidget *term = currentTerminal(); + if (term) + term->skipToNextCommand(); +} + +void TermWidgetPage::skipToPreCommand() +{ + TermWidget *term = currentTerminal(); + if (term) + term->skipToPreCommand(); +} + +void TermWidgetPage::setcursorShape(int shape) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setCursorShape(shape); +} + +void TermWidgetPage::setBlinkingCursor(bool enable) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setBlinkingCursor(enable); +} + +void TermWidgetPage::setPressingScroll(bool enable) +{ + QList termList = findChildren(); + for (TermWidget *term : termList) + term->setPressingScroll(enable); +} + +void TermWidgetPage::showSearchBar(int state) +{ + /******** Modify by ut001000 renfeixiang 2020-08-28:修改bug 45227,SearchBar没有显示,且不需要显示时,return Begin***************/ + // 沒显示,且不要显示 + if (!m_findBar->isVisible() && state != SearchBar_Show) + return; + /******** Modify by ut001000 renfeixiang 2020-08-28***************/ + if (SearchBar_Show == state) { + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,查询界面使用不方便,将雷神窗口变大适应正常的查询界面 Begin***************/ + if (m_MainWindow->isQuakeMode() && m_MainWindow->height() < LISTMINHEIGHT) { + //因为拉伸函数设置了FixSize,导致自定义界面弹出时死循环,然后崩溃的问题 + QuakeWindow *quakeWindow = qobject_cast(m_MainWindow); + if (nullptr == quakeWindow) + return; + quakeWindow->switchEnableResize(true); + m_MainWindow->resize(m_MainWindow->width(), LISTMINHEIGHT); //首先设置雷神界面的大小 + m_MainWindow->showPlugin(MainWindow::PLUGIN_TYPE_SEARCHBAR);//重新打开查询界面,当前流程结束 + //窗口弹出后,重新判断雷神窗口是否需要有拉伸属性 + quakeWindow->switchEnableResize(); + return; + } + /******** Add by nt001000 renfeixiang 2020-05-18:修改雷神窗口太小时,查询界面使用不方便,将雷神窗口变大适应正常的查询界面 End***************/ + m_findBar->raise(); + m_findBar->clearHoldContent(); + m_findBar->show(); + //Add by ut001000 renfeixiang 2020-12-02 在搜索框弹出时,添加设置Term的m_bHasSelect为false函数 + if (m_currentTerm != nullptr) + m_currentTerm->setNoHasSelect(); + m_findBar->move(width() - SEARCHBAR_RIGHT_MARGIN, 0); + qInfo() << __FUNCTION__ << "show search bar!"; + QTimer::singleShot(10, this, [ = ] { m_findBar->focus(); }); + } else if (SearchBar_Hide == state) { + m_findBar->hide(); + qInfo() << __FUNCTION__ << "hide search bar!"; + } else if (SearchBar_FocusOut == state) { + + qInfo() << __FUNCTION__ << "hide search bar! focus in term!"; + /******** Modify by ut001000 renfeixiang 2020-08-28:修改bug 45227,焦点只有在m_findBar上时,才将焦点设置到CurrentPage Begin***************/ + MainWindow *w = Utils::getMainWindow(this); + if (w && w->isFocusOnList()) + w->focusCurrentPage(); + m_findBar->hide(); + /******** Modify by ut001000 renfeixiang 2020-08-28 End***************/ + } +} + +void TermWidgetPage::showRenameTitleDialog() +{ + // 弹窗显示 + Service::instance()->setIsDialogShow(window(), true); + if (nullptr == m_renameDlg) { + m_renameDlg = new TabRenameDlg(this); + m_renameDlg->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + QString tabTitleFormat = currentTerminal()->getTabTitleFormat(); + QString remoteTabTitleFormat = currentTerminal()->getRemoteTabTitleFormat(); + m_renameDlg->setText(tabTitleFormat, remoteTabTitleFormat); + m_renameDlg->setFocusPolicy(Qt::NoFocus); + m_renameDlg->setAttribute(Qt::WA_DeleteOnClose); + + //bug 53463 ut000442 判断当前是否为远程链接状态,根据状态设置对应行的选中 + //设置全选效果 + m_renameDlg->setFocusOnEdit(currentTerminal()->isConnectRemote()); + + m_renameDlg->open(); + + connect(m_renameDlg, &TabRenameDlg::finished, this, &TermWidgetPage::handleTabRenameDlgFinished); + + connect(m_renameDlg, &TabRenameDlg::tabTitleFormatRename, this, &TermWidgetPage::tabTitleFormatChanged); + } +} + +inline void TermWidgetPage::handleTabRenameDlgFinished() +{ + // 弹窗隐藏或消失 + Service::instance()->setIsDialogShow(window(), false); + m_renameDlg = nullptr; +} + +void TermWidgetPage::printSearchCostTime() +{ + qint64 costTime = m_findBar->searchCostTime(); + if (costTime != -1) { + QString strSearchTime = GRAB_POINT + LOGO_TYPE + SEARCH_TIME + QString::number(costTime); + qInfo() << qPrintable(strSearchTime); + } +} + +void TermWidgetPage::onTermRequestRenameTab(QString newTabName) +{ + if (newTabName.isEmpty()) { + setProperty("TAB_CUSTOM_NAME_PROPERTY", false); + emit termTitleChanged(m_currentTerm->title()); + } else { + // Mark it as we renamed it. + setProperty("TAB_CUSTOM_NAME_PROPERTY", true); + // Yeah, TermWidgetPage doesn't store the tab name, only the tab bar did it. + emit tabTitleChanged(newTabName); + } +} + +void TermWidgetPage::onTermTitleChanged(QString title) +{ + TermWidget *term = qobject_cast(sender()); + // 标题内容没变化的话不发,不是当前终端改变,不发 + if (term == m_currentTerm && m_tabTitle != title) { + m_tabTitle = title; + emit termTitleChanged(title); + } +} + +void TermWidgetPage::onTermGetFocus() +{ + TermWidget *term = qobject_cast(sender()); + setCurrentTerminal(term); + emit Service::instance()->currentTermChange(m_currentTerm); + qInfo() << "onTermGetFocus" << m_currentTerm->getSessionId(); + emit termGetFocus(); +} + +void TermWidgetPage::onTermClosed() +{ + TermWidget *w = qobject_cast(sender()); + if (!w) { + qInfo() << "TermWidgetPage::onTermClosed: Unknown object to handle" << w; + return; + } + closeSplit(w); +} + +void TermWidgetPage::handleFindNext() +{ + qInfo() << m_findBar->searchKeytxt(); + setMismatchAlert(false); + m_currentTerm->search(m_findBar->searchKeytxt(), true, true); +} + +void TermWidgetPage::handleFindPrev() +{ + setMismatchAlert(false); + m_currentTerm->search(m_findBar->searchKeytxt(), false, false); +} + +/******************************************************************************* + 1. @函数: slotFindbarClose + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-12 + 4. @说明: 空函数,待处理 +*******************************************************************************/ +//void TermWidgetPage::slotFindbarClose() +//{ +// EditWrapper *wrapper = currentWrapper(); +// if (wrapper->bottomBar()->isHidden()) +// { +// wrapper->bottomBar()->show(); +// } +//} + +/******************************************************************************* + 1. @函数: handleRemoveSearchKeyword + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-12 + 4. @说明: 空函数,待处理 +*******************************************************************************/ +//void TermWidgetPage::handleRemoveSearchKeyword() +//{ +// currentWrapper()->textEditor()->removeKeywords(); +//} + +void TermWidgetPage::handleUpdateSearchKeyword(const QString &keyword) +{ + setMismatchAlert(false); + if (keyword.isEmpty()) { + m_currentTerm->clearSelection(); + } else { + // 输入时直接查找,被禁用 + // m_currentTerm->search(m_findBar->SearchKeytxt(), true, false); + } +} + +void TermWidgetPage::applyTheme() +{ + updateSplitStyle(); +} + +void TermWidgetPage::updateSplitStyle() +{ + QList splitList = findChildren(); + for (DSplitter *splitter : qAsConst(splitList)) + setSplitStyle(splitter); +} + +void TermWidgetPage::slotShowPluginChanged(const QString name) +{ + MainWindow *mainWindow = qobject_cast(sender()); + // 判断是否是当前页,不是当前页不用管 + if (mainWindow && mainWindow->currentPage() == this) { + // 显示和隐藏搜索框 + if (MainWindow::PLUGIN_TYPE_SEARCHBAR == name) { + // 显示搜索框 + this->showSearchBar(SearchBar_Show); + } else if (MainWindow::PLUGIN_TYPE_NONE == name) { + // 隐藏搜索框,焦点落回终端 + this->showSearchBar(SearchBar_FocusOut); + } else { + // 隐藏搜索框 + this->showSearchBar(SearchBar_Hide); + } + } +} + +void TermWidgetPage::slotQuakeHidePlugin() +{ + MainWindow *mainWindow = qobject_cast(sender()); + // 判断是否是当前页,不是当前页不用管 + if (mainWindow && mainWindow->currentPage() == this) { + // 隐藏搜索框 + this->showSearchBar(SearchBar_Hide); + } +} + +void TermWidgetPage::setCurrentTerminal(TermWidget *term) +{ + TermWidget *oldTerm = m_currentTerm; + m_currentTerm = term; + if (oldTerm != m_currentTerm) { + // 当前界面切换 + qInfo() << "m_currentTerm change" << m_currentTerm->getSessionId(); + QString tabTitle = term->getTabTitle(); + // 当前标签为空,标签格式不为空 => 未得到term参数,暂不上传数据 + if ((tabTitle == DEFAULT_TAB_TITLE) && !term->getCurrentTabTitleFormat().trimmed().isEmpty()) + return; + m_tabTitle = tabTitle; + // 当前窗口变化修改标签标题 + emit termTitleChanged(m_tabTitle); + } +} + +TermWidget *TermWidgetPage::createTerm(TermProperties properties) +{ + TermWidget *term = new TermWidget(properties, this); + connect(term, &TermWidget::termRequestRenameTab, this, &TermWidgetPage::onTermRequestRenameTab); + connect(term, &TermWidget::termTitleChanged, this, &TermWidgetPage::onTermTitleChanged); + connect(term, &TermWidget::termGetFocus, this, &TermWidgetPage::onTermGetFocus); + connect(term, &TermWidget::leftMouseClick, this, &TermWidgetPage::handleLeftMouseClick); + + connect(term, &TermWidget::finished, this, &TermWidgetPage::onTermClosed); + qInfo() << "create Terminal, sessionId = " << term->getSessionId(); + // 对标签页重命名设置 + connect(this, &TermWidgetPage::tabTitleFormatChanged, term, &TermWidget::renameTabFormat); + return term; +} + +inline void TermWidgetPage::handleLeftMouseClick() +{ + parentMainWindow()->showPlugin(MainWindow::PLUGIN_TYPE_NONE); +} + +void TermWidgetPage::setTextCodec(QTextCodec *codec) +{ + TermWidget *term = currentTerminal(); + if (term) + term->setTextCodec(codec); +} + +void TermWidgetPage::setMismatchAlert(bool alert) +{ + m_findBar->setNoMatchAlert(alert); +} + +void TermWidgetPage::resizeEvent(QResizeEvent *event) +{ + Q_UNUSED(event) + this->m_findBar->move(width() - SEARCHBAR_RIGHT_MARGIN, 0); +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/termwidgetpage.h deepin-terminal-5.4.13/src/views/termwidgetpage.h --- deepin-terminal-5.0.0+ds1/src/views/termwidgetpage.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/termwidgetpage.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,449 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangpeili + * + * Maintainer: wangpeili + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TERMWIDGETPAGE_H +#define TERMWIDGETPAGE_H + +#include "define.h" +#include "termproperties.h" +#include "pagesearchbar.h" +#include "mainwindow.h" +#include "utils.h" +#include "tabrenamedlg.h" + +#include + +#include + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: TermWidgetPage + 2. @作者: ut000439 wangpeili + 3. @日期: 2020-08-12 + 4. @说明: +*******************************************************************************/ + +class TermWidget; +class MainWindow; +class TermWidgetPage : public QWidget +{ + Q_OBJECT +public: + TermWidgetPage(const TermProperties &properties, QWidget *parent = nullptr); + // mainwindow指针,parent()会变化???所以要在构造的时候保存。 + /** + * @brief 获取父主窗口 + * @author ut000439 wangpeili + * @return + */ + MainWindow *parentMainWindow(); + /** + * @brief 当标签页拖拽到新的MainWindow时,重新设置TermWidgetPage的父窗口 + * @author ut000438 王亮 + * @param mainWin + */ + void setParentMainWindow(MainWindow *mainWin); + /** + * @brief 获取当前终端 + * @author ut000439 wangpeili + * @return + */ + TermWidget *currentTerminal(); + + /** + * @brief 获取当前终端的title + */ + QString getCurrentTerminalTitle(); + + /** + * @brief 分屏 + * @author ut000439 王培利 + * @param orientation 方向 + */ + void split(Qt::Orientation orientation); + /** + * @brief 创建分屏 + * @author ut000439 王培利 + * @param term + * @param orientation 方向 + * @return + */ + DSplitter *createSubSplit(TermWidget *term, Qt::Orientation orientation); + /** + * @brief 关闭分屏 + * @author ut000439 王培利 + * @param term + * @param hasConfirmed + */ + void closeSplit(TermWidget *term, bool hasConfirmed = false); + /** + * @brief 显示退出确认对话框 + * @author ut000439 wangpeili + * @param type + * @param count + * @param parent + */ + void showExitConfirmDialog(Utils::CloseType type, int count = 1, QWidget *parent = nullptr); + // 标识page的唯一ID, 和tab匹配,存在tab中,tabid 用的index,是变化的。 + /** + * @brief 获取识别码 + * @author ut000439 wangpeili + * @return + */ + const QString identifier(); + /** + * @brief 设置焦点到当前终端 + * @author ut000439 wangpeili + */ + void focusCurrentTerm(); + /** + * @brief 关闭其它终端 + * @author ut000439 wangpeili + * @param hasConfirmed + */ + void closeOtherTerminal(bool hasConfirmed = false); + /** + * @brief 焦点导航 + * @author ut000439 wangpeili + * @param dir + */ + void focusNavigation(Qt::Edge dir); + /** + * @brief 获取当前页的终端个数 + * @author ut000439 王培利 + * @return + */ + int getTerminalCount(); + /******** Add by ut001000 renfeixiang 2020-08-07:用于查找当前所有term中是否含有水平分屏线,有返回true,反之false,#bug#41436***************/ + /** + * @brief 用于查找当前所有term中是否含有水平分屏线,有返回true,反之false,#bug#41436 + * @author ut001000 任飞翔 + * @return + */ + bool hasHasHorizontalSplit(); + /******** Modify by n014361 wangpeili 2020-01-08: 计算上下左右判断方法 ******×****/ + /** + * @brief 获取标签页内所有子窗体的区域 + * @author ut000439 王培利 + * @param term + * @return + */ + QRect GetRect(TermWidget *term); + /** + * @brief 获取窗口上下左右键需要判断的点位信息,只需要获取偏离1个像素信息,即可 + * @author ut000439 王培利 + * @param term + * @param dir + * @return + */ + QPoint GetComparePoint(TermWidget *term, Qt::Edge dir); + /********************* Modify by n014361 wangpeili End ************************/ + /** + * @brief 获取正在执行的终端个数 + * @author ut000439 wangpeili + * @return + */ + int runningTerminalCount(); + /** + * @brief 创建当前终端属性 + * @author ut000439 wangpeili + * @return + */ + TermProperties createCurrentTerminalProperties(); + + /** + * @brief 设置当前终端的透明度 + * @author ut000439 wangpeili + * @param opacity + */ + void setTerminalOpacity(qreal opacity); + /** + * @brief 设置主题 + * @author ut000439 wangpeili + * @param name + */ + void setColorScheme(const QString &name); + + /** + * @brief 发送文本到当前终端 + * @author ut000439 wangpeili + * @param text 文本 + * @param isRemoteConnect 是否远程连接 + */ + void sendTextToCurrentTerm(const QString &text, bool isRemoteConnect = false); + + /** + * @brief 复制到剪贴板 + * @author ut000439 wangpeili + */ + void copyClipboard(); + /** + * @brief 用户粘贴时候,直接粘贴剪切板内容 + * @author ut000439 王培利 + */ + void pasteClipboard(); + /** + * @brief 切换显示搜索栏 + * @author ut000439 wangpeili + */ + void toggleShowSearchBar(); + + /** + * @brief 放大当前端子 + * @author ut000439 wangpeili + */ + void zoomInCurrentTierminal(); + /** + * @brief 缩小当前端子 + * @author ut000439 wangpeili + */ + void zoomOutCurrentTerminal(); + + /******** Modify by n014361 wangpeili 2020-01-06:增加相关设置功能 ***********×****/ + /** + * @brief 设置字体大小 + * @author ut000439 王培利 + * @param 字体大小 + */ + void setFontSize(int fontSize); + // 字体 + /** + * @brief 设置字体 + * @author ut000439 王培利 + * @param 字体名称 + */ + void setFont(QString fontName); + // 全选 + + /******************************************************************************* + 1. @函数: void TermWidgetPage::selectAll() + 2. @作者: ut000439 王培利 + 3. @日期: 2020-01-10 + 4. @说明: 全选 + *******************************************************************************/ + /** + * @brief 全选 + * @author ut000439 王培利 + */ + void selectAll(); + /** + * @brief 跳转到下一命令 + * @author ut000439 王培利 + */ + void skipToNextCommand(); + /** + * @brief 跳转到前一命令 + * @author ut000439 王培利 + */ + void skipToPreCommand(); + /** + * @brief 设置光标形状 + * @author ut000439 王培利 + * @param shape 光标形状 + */ + void setcursorShape(int shape); + /** + * @brief 设置光标闪烁 + * @author 王培利ut000439 + * @param enable 是否闪烁 + */ + void setBlinkingCursor(bool enable); + /** + * @brief 设置按键时是否滚动 + * @author ut000439 wangpeili + * @param enable 是否滚动 + */ + void setPressingScroll(bool enable); + /** + * @brief 是否显示搜索框 + * @author ut000439 王培利 + * @param state 1) 显示搜索框 0 SearchBar_Show 2) 隐藏搜索框 => 显示其他列表框,焦点顺移 1 SearchBar_Hide 3) 隐藏搜索框 => 焦点返回终端 2 SearchBar_FocusOut + */ + void showSearchBar(int state); + /********************* Modify by n014361 wangpeili End ************************/ + /** + * @brief 设置文本编解码器 + * @author ut000439 wangpeili + * @param codec + */ + void setTextCodec(QTextCodec *codec); + /** + * @brief 是否将输入框标为警告 + * @author ut000439 王培利 + * @param alert 警告 + */ + void setMismatchAlert(bool alert); + + /** + * @brief 显示重命名弹窗,判断是否有重命名弹窗,有则显示,没有则创建 + * @author ut000610 戴正文 + */ + void showRenameTitleDialog(); + + /** + * @brief 打印查找花费的时间 + * @author ut000610 戴正文 + */ + void printSearchCostTime(); + +protected: + /** + * @brief 将窗口设置为随着窗口变化而变化, 重绘时候,调整查找框的位置 + * @author ut000439 王培利 + * @param event + */ + virtual void resizeEvent(QResizeEvent *event) override; + +public slots: + /** + * @brief 终端请求重命名便签响应 + * @param newTabName 新Tab标签名 + */ + void onTermRequestRenameTab(QString newTabName); + /** + * @brief 终端标题变化响应函数 + * @author ut000439 wangpeili + * @param title 终端标题 + */ + void onTermTitleChanged(QString title); + /** + * @brief 终端获取焦点响应函数 + * @author ut000439 wangpeili + */ + void onTermGetFocus(); + /** + * @brief 终端关闭响应函数 + * @author ut000439 wangpeili + */ + void onTermClosed(); + /** + * @brief 查找下一个接口 + * @author ut000439 王培利 + */ + void handleFindNext(); + /** + * @brief 查找上一个接口 + * @author ut000439 王培利 + */ + void handleFindPrev(); + // 预留 +// void slotFindbarClose(); + // 预留 +// void handleRemoveSearchKeyword(); + /** + * @brief 更新搜索关键词接口,更新key(没有输入回车情况),自动查找接口 + * @author ut000439 王培利 + * @param keyword + */ + void handleUpdateSearchKeyword(const QString &keyword); + /******** Modify by n014361 wangpeili 2020-03-11: 非DTK控件手动匹配系统主题的修改 **********/ + /** + * @brief 非DTK控件手动匹配系统主题的修改 + * @author ut000439 王培利 + */ + void applyTheme(); + /********************* Modify by n014361 wangpeili End ************************/ + /** + * @brief 更新分屏样式 + * @author ut000439 wangpeili + */ + void updateSplitStyle(); + + void slotShowPluginChanged(const QString name); + void slotQuakeHidePlugin(); + +signals: + void tabTitleChanged(QString title) const; + void termTitleChanged(QString title) const; + void lastTermClosed(QString pageIdentifier) const; + void termRequestOpenSettings() const; + void termGetFocus() const; + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + bool uninstallTerminal(QString commandname); + /******** Modify by nt001000 renfeixiang 2020-05-27:修改 增加参数区别remove和purge卸载命令 Begin***************/ + // 下载失败时退出下载 + void quitDownload(); + // 对当前标签页的标题重命名,只对当前标签页有效 + void tabTitleFormatChanged(const QString &tabTitleFormat, const QString &remoteTabTitleFormat); + +private slots: + /** + * @brief 设置当前终端标题 + * @author ut000439 wangpeili + * @param term 当前终端 + */ + void setCurrentTerminal(TermWidget *term); + + /** + * @brief 处理搜索关键词变化的槽 + * @author ut000438 王亮 + * @param keyword 搜索关键词 + */ + void handleKeywordChanged(QString keyword); + /** + * @brief 处理主题变化的槽 + * @author ut000438 王亮 + */ + void handleThemeTypeChanged(); + /** + * @brief 理卸载终端时的确认对话框 + * @author ut000438 王亮 + * @param commandname 终端名称 + * @return + */ + bool handleUninstallTerminal(QString commandname); + /** + * @brief 处理重命名标签标题对话框关闭 + * @author ut000438 王亮 + */ + void handleTabRenameDlgFinished(); + /** + * @brief 处理在终端内点击鼠标左键 + * @author ut000438 王亮 + */ + void handleLeftMouseClick(); + +private: + /** + * @brief 创建终端 + * @author ut000439 wangpeili + * @param properties 属性 + * @return + */ + TermWidget *createTerm(TermProperties properties); + /** + * @brief 设置分割线样式 + * @author ut000439 wangpeili + * @param splitter 分割线 + */ + void setSplitStyle(DSplitter *splitter); + + TermWidget *m_currentTerm = nullptr; + PageSearchBar *m_findBar = nullptr; + MainWindow *m_MainWindow = nullptr; + QVBoxLayout *m_layout = nullptr; + + // 重命名弹框 + TabRenameDlg *m_renameDlg = nullptr; + // 标签标题 + QString m_tabTitle; +}; +#endif // TERMWIDGETPAGE_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/themepreviewarea.cpp deepin-terminal-5.4.13/src/views/themepreviewarea.cpp --- deepin-terminal-5.0.0+ds1/src/views/themepreviewarea.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/themepreviewarea.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,147 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#include "themepreviewarea.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +ThemePreviewArea::ThemePreviewArea(QWidget *parent) : DWidget(parent), m_titleRect(0, 0, 439, 35) +{ + this->setWindowFlags(Qt::FramelessWindowHint); + setAttribute(Qt::WA_TranslucentBackground); + setFixedSize(439, 113); +} + +void ThemePreviewArea::paintEvent(QPaintEvent *event) +{ + QPainter painter(this); + //抗锯设置 + painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); + painter.setPen(Qt::NoPen); + painter.setBrush(Qt::NoBrush); + + painter.setOpacity(1); + const QRect &rect = this->rect(); + //绘制标题图片 + painter.drawPixmap(m_titleRect, m_titlePixmap, m_titleRect); + + //绘制背景色 + QPainterPath backgroundPathTop; + backgroundPathTop.addRect( + QRect(rect.x(), rect.y() + 35, rect.width(), 8)); + painter.setPen(m_backgroundColor); + painter.fillPath(backgroundPathTop, QColor(m_backgroundColor)); + + QPainterPath backgroundPath; + backgroundPath.addRoundedRect( + QRect(rect.x(), rect.y() + 35, rect.width(), rect.height() - 35), 8, 8); + painter.setPen(m_backgroundColor); + painter.fillPath(backgroundPath, QColor(m_backgroundColor)); + + QFont font; + font.setPointSize(8); + font.setFamily("Menlo"); + font.setLetterSpacing(QFont::AbsoluteSpacing, 1); + painter.setFont(font); + + int lineHeight = 18; + //绘制提示符PS1演示文本 + painter.setPen(QPen(m_ps1Color)); + painter.drawText( + QRect(rect.x() + 10, rect.y() + 35 + 10, 90, lineHeight), Qt::AlignLeft | Qt::AlignTop, m_ps1String); + //绘制前景色演示文本 + painter.setPen(QPen(m_foregroundColor)); + painter.drawText( + QRect(rect.x() + 10 + 90, rect.y() + 35 + 10, 5, lineHeight), Qt::AlignLeft | Qt::AlignTop, m_foregroundLeftString); + //绘制提示符PS2演示文本 + painter.setPen(QPen(m_ps2Color)); + painter.drawText( + QRect(rect.x() + 10 + 90 + 5, rect.y() + 35 + 10, 65, lineHeight), Qt::AlignLeft | Qt::AlignTop, m_ps2String); + //绘制前景色演示文本 + painter.setPen(QPen(m_foregroundColor)); + painter.drawText( + QRect(rect.x() + 10 + 90 + 5 + 65, rect.y() + 35 + 10, 230, lineHeight), Qt::AlignLeft | Qt::AlignTop, m_foregroundRightString); + + // 边框描线,主要深色主题下标题与窗口分界不明显 + QPainterPath FramePath; + FramePath.addRoundedRect(QRectF(rect.x(), rect.y(), rect.width(), rect.height()), 8, 8); + // 获取控件边框颜色 + DPalette pa = DApplicationHelper::instance()->palette(this); + QPen pen(pa.color(DPalette::FrameBorder), 1); + painter.setPen(pen); + // 绘制边框 + painter.drawPath(FramePath); + + + DWidget::paintEvent(event); +} + +void ThemePreviewArea::setTitleStyle(const QString &titleStyle) +{ + if ("Light" == titleStyle) + m_titlePixmap.load(":/logo/headbar-light.svg"); + else + m_titlePixmap.load(":/logo/headbar-dark.svg"); + + update(); +} + +void ThemePreviewArea::setBackgroundColor(const QColor &color) +{ + m_backgroundColor = color; + update(); +} + +void ThemePreviewArea::setForegroundgroundColor(const QColor &color) +{ + m_foregroundColor = color; + update(); +} + +void ThemePreviewArea::setPs1Color(const QColor &color) +{ + m_ps1Color = color; + update(); +} + +void ThemePreviewArea::setPs2Color(const QColor &color) +{ + m_ps2Color = color; + update(); +} + +void ThemePreviewArea::setAllColorParameter(const QColor &foregroundColorParameter, const QColor &backgroundColorParameter, const QColor &ps1ColorParameter, const QColor &ps2ColorParameter) +{ + m_foregroundColor = foregroundColorParameter; + m_backgroundColor = backgroundColorParameter; + m_ps1Color = ps1ColorParameter; + m_ps2Color = ps2ColorParameter; + update(); +} + diff -Nru deepin-terminal-5.0.0+ds1/src/views/themepreviewarea.h deepin-terminal-5.4.13/src/views/themepreviewarea.h --- deepin-terminal-5.0.0+ds1/src/views/themepreviewarea.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/themepreviewarea.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,115 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ +#ifndef THEMEPREVIEWAREA_H +#define THEMEPREVIEWAREA_H + +#include +#include + +#include +#include + + +DWIDGET_USE_NAMESPACE + +/******************************************************************************* + 1. @类名: ThemePreviewArea + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-12-01 + 4. @说明: 自定义主题预览类 +*******************************************************************************/ +class ThemePreviewArea : public DWidget +{ + Q_OBJECT +public: + explicit ThemePreviewArea(QWidget *parent = nullptr); + /** + * @brief 设置主题风格 + * @author ut000125 sunchengxi + * @param titleStyle 主题类型 + */ + void setTitleStyle(const QString &titleStyle); + /** + * @brief 设置背景色 + * @author ut000125 sunchengxi + * @param color 颜色 + */ + void setBackgroundColor(const QColor &color); + /** + * @brief 设置前景色 + * @author ut000125 sunchengxi + * @param color 颜色 + */ + void setForegroundgroundColor(const QColor &color); + /** + * @brief 设置ps1颜色 + * @author ut000125 sunchengxi + * @param color 颜色 + */ + void setPs1Color(const QColor &color); + /** + * @brief 设置ps2颜色 + * @author ut000125 sunchengxi + * @param color 颜色 + */ + void setPs2Color(const QColor &color); + /** + * @brief 设置全部配色 + * @param foregroundColorParameter 前景色 + * @param backgroundColorParameter 背景色 + * @param ps1ColorParameter ps1颜色 + * @param ps2ColorParameter ps2颜色 + */ + void setAllColorParameter(const QColor &foregroundColorParameter, const QColor &backgroundColorParameter, const QColor &ps1ColorParameter, const QColor &ps2ColorParameter); + +protected: + /** + * @brief 处理重绘事件 备注:预览界面的视觉错觉,在深色区域和预览背景的蓝色( rgb(85,0,255) )接触边线最明显,左上两边看起来是紫红色,右下两边看起来是蓝色。关联的bug#57007 + * @author ut000125 sunchengxi + */ + void paintEvent(QPaintEvent *) override; + +private: + //主题风格区域 + QRectF m_titleRect; + //预览字符串 ps1 + QString m_ps1String = "hyde@hyde-PC"; + //预览字符串 ps2 + QString m_ps2String = "~/Desktop "; + //预览字符串 前景色字符 + QString m_foregroundLeftString = ":"; + //预览字符串 前景色字符串 + QString m_foregroundRightString = "$ sudo apt install deepin-terminal"; + + //背景色 + QColor m_backgroundColor = QColor(248, 248, 248); + //PS1 配色 + QColor m_ps1Color = QColor(133, 153, 0); + //前景色 + QColor m_foregroundColor = QColor(0, 0, 0); + //PS2 配色 + QColor m_ps2Color = QColor(52, 101, 164); + //预览主题风格图片 + QPixmap m_titlePixmap = QPixmap(":/logo/headbar-light.svg"); + +}; + +#endif // THEMEPREVIEWAREA_H diff -Nru deepin-terminal-5.0.0+ds1/src/views/titlebar.cpp deepin-terminal-5.4.13/src/views/titlebar.cpp --- deepin-terminal-5.0.0+ds1/src/views/titlebar.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/titlebar.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "titlebar.h" +#include "utils.h" + +#include +#include + +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +TitleBar::TitleBar(QWidget *parent, bool isQuakeWindowStyle) : QWidget(parent), m_layout(new QHBoxLayout(this)) +{ + Utils::set_Object_Name(this); + m_layout->setObjectName("TitleBarLayout");//Add by ut001000 renfeixiang 2020-08-13 + /******** Modify by m000714 daizhengwen 2020-04-15: 标签栏和Dtk标签色保持一致****************/ +// DPalette palette = this->palette(); +// palette.setBrush(DPalette::Background, palette.color(DPalette::Base)); +// this->setPalette(palette); + this->setBackgroundRole(DPalette::Base); + this->setAutoFillBackground(true); + // daizhengwen fix bug#22927 动画出的矩形框会 -50 设置标题栏为50 + this->setFixedHeight(WIN_TITLE_BAR_HEIGHT); + /********************* Modify by m000714 daizhengwen End ************************/ + m_layout->setContentsMargins(0, 0, 0, 0); + + if (isQuakeWindowStyle) + return; + + if (DApplication::isDXcbPlatform()) { + + DIconButton *iconLabel = new DIconButton(this); + iconLabel->setIcon(QIcon::fromTheme("deepin-terminal")); + iconLabel->setIconSize(QSize(ICONSIZE_36, ICONSIZE_36)); + iconLabel->setFocusPolicy(Qt::NoFocus); + iconLabel->setFlat(true); + + m_layout->addSpacing(10); + + /******** Modify by n014361 wangpeili 2020-02-12: 修改居中样式***********×****/ + m_layout->addWidget(iconLabel, 0, Qt::AlignVCenter); + /***************** Modify by n014361 End ********************×****/ + m_layout->addSpacing(10); + } +} + +TitleBar::~TitleBar() +{ +} + +void TitleBar::setTabBar(QWidget *widget) +{ + /******** Modify by n014361 wangpeili 2020-02-12: 修改居中样式***********×****/ + m_layout->addWidget(widget, 0, Qt::AlignVCenter); + /***************** Modify by n014361 End ********************×****/ +} + +int TitleBar::rightSpace() +{ + return m_rightSpace; +} diff -Nru deepin-terminal-5.0.0+ds1/src/views/titlebar.h deepin-terminal-5.4.13/src/views/titlebar.h --- deepin-terminal-5.0.0+ds1/src/views/titlebar.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/src/views/titlebar.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TITLEBAR_H +#define TITLEBAR_H + +#include +#include + +/******************************************************************************* + 1. @类名: TitleBar + 2. @作者: ut000610 daizhengwen + 3. @日期: 2020-08-12 + 4. @说明: +*******************************************************************************/ + +class TitleBar : public QWidget +{ + Q_OBJECT +public: + TitleBar(QWidget *parent = nullptr, bool isQuakeWindowStyle = false); + ~TitleBar(); + + /** + * @brief 设置标签栏 + * @author ut000610 daizhengwen + * @param widget + */ + void setTabBar(QWidget *widget); + /** + * @brief 右边的空间 + * @author ut000610 daizhengwen + * @return + */ + int rightSpace(); + +private: + QHBoxLayout *m_layout = nullptr; + int m_rightSpace; +}; + +#endif // TITLEBAR_H diff -Nru deepin-terminal-5.0.0+ds1/ssh_login.sh deepin-terminal-5.4.13/ssh_login.sh --- deepin-terminal-5.0.0+ds1/ssh_login.sh 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/ssh_login.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -#! /usr/bin/expect -f - -# Copyright (C) 2011 ~ 2016 Deepin, Inc. -# 2011 ~ 2016 Wang Yong -# -# Author: Wang Yong -# Maintainer: Wang Yong -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -## All possible interactive messages: -# Are you sure you want to continue connecting (yes/no)? -# password: -# Enter passphrase for key - -## Main -# Delete self for secret, will not affect the following code -file delete $argv0 - -# Setup variables -# Set timeout -1 to avoid remote server dis-connect. -set timeout -1 -set user {<>} -set server {<>} -set password "<>" -set private_key {<>} -set port {<>} -set authentication {<>} -set ssh_cmd {zssh -X -o ServerAliveInterval=60} -set ssh_opt {$user@$server -p $port -o PubkeyAuthentication=$authentication} -set remote_command {<>} - -# This code is use for synchronous pty's size to avoid terminal not update if login in remote server. -trap { - stty rows [stty rows] columns [stty columns] < $spawn_out(slave,name) -} WINCH - -# Spawn and expect -eval spawn $ssh_cmd $ssh_opt $private_key -t $remote_command exec \\\$SHELL -l -if {[string length $password]} { - expect { - timeout {send_user "ssh connection time out, please operate manually\n"} - -nocase "(yes/no)\\?" {send "yes\r"; exp_continue} - -nocase -re "password:|enter passphrase for key" { - send "$password\r" - } - } - -} -interact - diff -Nru deepin-terminal-5.0.0+ds1/style.css deepin-terminal-5.4.13/style.css --- deepin-terminal-5.0.0+ds1/style.css 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,990 +0,0 @@ -/* -*- Mode: CSS; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2016 Deepin, Inc. - * 2011 ~ 2016 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - -.frame { - border-style: none; - margin: 0; - border-radius: 0; -} - -.scrolledwindow { - color: #303030; -} - -.scrolledwindow undershoot.top { - background-image: none; -} - -.scrolledwindow undershoot.bottom { - background-image: none; -} - -.scrolledwindow undershoot.left { - background-image: none; -} - -.scrolledwindow undershoot.right { - background-image: none; -} - -.scrolledwindow overshoot.top { - background-image: none; -} - -.scrolledwindow overshoot.bottom { - background-image: none; -} - -.scrolledwindow overshoot.left { - background-image: none; -} - -.scrolledwindow overshoot.right { - background-image: none; -} - -.window_dark_shadow_active { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 20px 0px rgba(0,0,0,0.3),inset 0 1px rgba(0,0,0,0.7),inset 0 -1px rgba(0,0,0,0.7),inset 1px 0 rgba(0,0,0,0.7),inset -1px 0 rgba(0,0,0,0.7) ; -} - -.window_dark_shadow_inactive { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 14px 0px rgba(0,0,0,0.15),inset 0 1px rgba(0,0,0,0.5),inset 0 -1px rgba(0,0,0,0.5),inset 1px 0 rgba(0,0,0,0.5),inset -1px 0 rgba(0,0,0,0.5) ; -} - -.window_light_shadow_active { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 20px 0px rgba(0,0,0,0.2),inset 0 1px rgba(0,0,0,0.2),inset 0 -1px rgba(0,0,0,0.2),inset 1px 0 rgba(0,0,0,0.2),inset -1px 0 rgba(0,0,0,0.2) ; -} - -.window_light_shadow_inactive { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 14px 0px rgba(0,0,0,0.1),inset 0 1px rgba(0,0,0,0.15),inset 0 -1px rgba(0,0,0,0.15),inset 1px 0 rgba(0,0,0,0.15),inset -1px 0 rgba(0,0,0,0.15) ; -} - -.window_noradius_shadow_active { - background: transparent; - border-radius: 0px; - box-shadow: 0px 10px 20px 0px rgba(0,0,0,0.3),inset 0 1px rgba(0,0,0,0.7),inset 0 -1px rgba(0,0,0,0.7),inset 1px 0 rgba(0,0,0,0.7),inset -1px 0 rgba(0,0,0,0.7) ; -} - -.window_noradius_shadow_inactive { - background: transparent; - border-radius: 0px; - box-shadow: 0px 10px 14px 0px rgba(0,0,0,0.15),inset 0 1px rgba(0,0,0,0.5),inset 0 -1px rgba(0,0,0,0.5),inset 1px 0 rgba(0,0,0,0.5),inset -1px 0 rgba(0,0,0,0.5) ; -} - -.window_dark_noshadow_active { - border-radius: 0px; -} - -.window_dark_noshadow_inactive { - border-radius: 0px; -} - -.window_light_noshadow_active { - border-radius: 0px; -} - -.window_light_noshadow_inactive { - border-radius: 0px; -} - -.window_noradius_noshadow_active { - border-radius: 0px; -} - -.window_noradius_noshadow_inactive { - border-radius: 0px; -} - -.dialog_shadow_active { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 20px 0px rgba(0,0,0,0.3),0 0 0 1px rgba(0,0,0,0.1); -} - -.dialog_shadow_inactive { - background: transparent; - border-radius: 5px; - box-shadow: 0px 10px 14px 0px rgba(0,0,0,0.15),0 0 0 1px rgba(0,0,0,0.1); -} - -.dialog_noshadow_active { - border-radius: 0px; -} - -.dialog_noshadow_inactive { - border-radius: 0px; -} - -.search_dark_box { - background: rgba(32,32,32,0.8); - border-radius: 0px 0px 0px 10px; - border: 1px solid rgba(1,1,1,0.10); -} - -.search_light_box { - background: rgba(255,255,255,0.8); - border-radius: 0px 0px 0px 10px; - border: 1px solid rgba(0,0,0,0.10); -} - -.search_dark_entry { - background: transparent; - border: 0px solid rgba(0,0,0,0.10); - font-size: 11px; - border-radius: 4px; - padding: 0px 6px; -} - -.search_dark_entry:focus { - color: white; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.search_dark_entry selection:focus { - color: white; - background-color: #61B5F8; - font-size: 11px; -} - -.search_light_entry { - background: transparent; - border: 0px solid rgba(0,0,0,0.10); - font-size: 11px; - border-radius: 4px; - padding: 0px 6px; -} - -.search_light_entry:focus { - color: #303030; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.search_light_entry selection:focus { - color: white; - background-color: #61B5F8; - font-size: 11px; -} - -.dark_scrollbar { - padding-right: 2px; - background: transparent; - box-shadow: none; - border: none; - min-width: 8px; - margin-top: 2px; - margin-bottom: 2px; -} - -.dark_scrollbar slider { - background-color: rgba(255, 255, 255, 0.2); - border-radius: 4px; - border: none; - box-shadow:inset 1px 1px rgba(255,255,255,0.05),inset -1px -1px rgba(255,255,255,0.05); - min-width: 4px; -} - -.dark_scrollbar slider:hover { - background-color: rgba(255, 255, 255, 0.4); - box-shadow:inset 1px 1px rgba(255,255,255,0.1),inset -1px -1px rgba(255,255,255,0.05); - border-radius: 4px; - border: none; - min-width: 8px; -} - -.dark_scrollbar slider:hover:active { - background-color: rgba(255, 255, 255, 0.3); - box-shadow:inset 1px 1px rgba(255,255,255,0.05),inset -1px -1px rgba(255,255,255,0.05); - border-radius: 4px; - border: none; - min-width: 8px; -} - -.light_scrollbar { - padding-right: 2px; - background: transparent; - box-shadow: none; - border: none; - min-width: 8px; - margin-top: 2px; - margin-bottom: 2px; -} - -.light_scrollbar slider { - background-color: rgba(16, 16, 16, 0.5); - box-shadow:none; - border: 1px solid transparent; - border-radius: 4px; - min-width: 4px; -} - -.light_scrollbar slider:hover { - background-color: rgba(16, 16, 16, 0.7); - box-shadow: none; - border: 1px solid transparent; - border-radius: 5px; - min-width: 8px; -} - -.light_scrollbar slider:hover:active { - background-color: rgba(16, 16, 16, 0.8); - box-shadow: none; - border: 1px solid transparent; - border-radius: 5px; - min-width: 8px; -} - -.switcher_scrollbar { - padding-right: 2px; - background: transparent; - box-shadow: none; - border: 1px solid transparent; - min-width: 0px; -} - -.switcher_scrollbar slider { - background-color: transparent; - box-shadow:none; - border: 1px; - border-color: transparent; - min-width: 0px; -} - -.preference_comboboxtext { - min-height: 2px; -} - -.preference_comboboxtext button { - border-radius: 4px; - padding: 0 6px; -} - -.preference_comboboxtext arrow { - min-height: 16px; - min-width: 11px; - -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); -} - -.preference_comboboxtext menu { - border-radius:4px; - font-size:12px; - color: #303030; - background: white; - border: 1px solid white; - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); -} - -.preference_comboboxtext menu > arrow{ - border-radius:0px; - background:white; -} - -.preference_comboboxtext arrow { - min-height: 16px; - min-width: 11px; -} - -.preference_comboboxtext menu menuitem { - padding-left: 6px; -} - -.preference_comboboxtext menu menuitem:hover{ - background-color:#2ca7f8; - color:white; -} - -.preference_comboboxtext button.combo { - padding-top: 0px; - padding-bottom: 0px; - color:#303030; - font-size: 12px; - background-image:linear-gradient(-180deg,#fff 0%,#fdfdfd 100%); - border:none; - box-shadow: 0 1px rgba(0,0,0,0.02),inset 0 1px rgba(0,0,0,0.1),inset 0 -1px rgba(0,0,0,0.1),inset 1px 0 rgba(0,0,0,0.1),inset -1px 0 rgba(0,0,0,0.1); -} - -.preference_comboboxtext button.combo:focus { - box-shadow: 0 1px rgba(0,0,0,0.04),inset 0 1px #2ca7f8,inset 0 -1px #2ca7f8,inset 1px 0 #2ca7f8,inset -1px 0 #2ca7f8; -} - -.preference_comboboxtext button.combo:hover { - padding-top: 0px; - padding-bottom: 0px; - color:white; - background-image:linear-gradient(-180deg,#8CCFFF 0%, #4BB8FF 100%); - box-shadow: 0 1px rgba(0,0,0,0.04),inset 0 1px rgba(0,118,243,0.2),inset 0 -1px rgba(0,118,243,0.2),inset 1px 0 rgba(0,118,243,0.2),inset -1px 0 rgba(0,118,243,0.2); -} - -.preference_entry { - color:#303030; - min-height: 18px; - background-color:white; - border:1px solid rgba(0,0,0,0.1); - font-size: 11px; - padding-top: 0px; - padding-bottom: 0px; - border-radius: 4px; - padding: 0px 6px; -} - -.preference_entry selection:focus { - color:white; - min-height: 18px; - background-color: #61B5F8; - border:1px solid #2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.preference_entry:focus { - color:black; - min-height: 18px; - background-color:white; - border:1px solid #2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.preference_spinbutton:not(.vertical) button { - min-height: 24px; - min-width: 20px; - padding: 0 4px; - color:#303030; - background-image:linear-gradient(-180deg,#fff 0%,#fdfdfd 100%); - border:0px solid rgba(0,0,0,0.1); - box-shadow: 0 1px rgba(0,0,0,0.02),inset 0 1px rgba(0,0,0,0.1),inset 0 -1px rgba(0,0,0,0.1),inset 1px 0 rgba(0,0,0,0.1),inset -1px 0 rgba(0,0,0,0.1); - -} - -.preference_spinbutton:not(.vertical) button:last-child { - min-height: 24px; - padding-top: 0px; - padding-bottom: 0px; - background-image:linear-gradient(-180deg,#fff 0%,#fdfdfd 100%); - border:0px solid rgba(1,0,0,0.1); - border-radius:0 4px 4px 0; - box-shadow: 0 1px rgba(0,0,0,0.02),inset 0 1px rgba(0,0,0,0.1),inset 0 -1px rgba(0,0,0,0.1),inset 1px 0 rgba(0,0,0,0.0),inset -1px 0 rgba(0,0,0,0.1); - -} -.preference_spinbutton:not(.vertical) button:hover { - min-height: 24px; - padding-top: 0px; - padding-bottom: 0px; - color:white; - background-image:linear-gradient(-180deg,#8CCFFF 0%, #4BB8FF 100%); - box-shadow: 0 1px rgba(0,0,0,0.04),inset 0 1px rgba(0,118,243,0.2),inset 0 -1px rgba(0,118,243,0.2),inset 1px 0 rgba(0,118,243,0.2),inset -1px 0 rgba(0,118,243,0.2); - -} -.preference_spinbutton:not(.vertical) button:active { - min-height: 24px; - padding-top: 0px; - padding-bottom: 0px; - color:white; - background-image:linear-gradient(-180deg,#0B8CFF 0%, #0AA1FF 100%); - box-shadow: 0 1px rgba(0,0,0,0.04),inset 0 1px rgba(29,129,255,0.30),inset 0 -1px rgba(29,129,255,0.30),inset 1px 0 rgba(29,129,255,0.30),inset -1px 0 rgba(29,129,255,0.30); - -} - -.preference_spinbutton:not(.vertical) entry { - min-height: 23px; - padding-top: 0px; - padding-bottom: 0px; - background-color:white; - color:#303030; - border:1px solid rgba(0,0,0,0.1); - border-width:1px 0 1px 1px; - font-size: 11px; - border-radius: 4px 0 0 4px; - padding: 0 6px; -} - -.preference_spinbutton:not(.vertical) entry selection { - color:white; - background-color:#2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.preference_spinbutton:not(.vertical) entry selection:focus { - font-size: 11px; - min-height: 18px; - padding-top: 1px; - padding-bottom: 1px; -} - -.preference_label { - color: #303030; - font-size: 12px; -} - -.dialog_title { - color: #303030; - font-weight: bold; - font-size: 12px; -} - -.dialog_content { - color: #303030; - font-size: 12px; -} - -.homepage { - color: #004DE6; - font-size: 13px; -} - -.acknowledgments { - color: #004DE6; - font-size: 13px; -} - -.remote_search_light_entry { - background: transparent; - border: 0px solid rgba(0,0,0,0.10); - font-size: 11px; -} - -.remote_search_light_entry:focus { - color: black; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.remote_search_light_entry selection:focus { - color: white; - background-color: #61B5F8; - font-size: 11px; -} - -.remote_search_dark_entry { - background: transparent; - border: 0px solid rgba(0,0,0,0.10); - font-size: 11px; -} - -.remote_search_dark_entry:focus { - color: white; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.remote_search_dark_entry selection:focus { - color: white; - background-color: #61B5F8; - font-size: 11px; -} - -.remote_search_label_dark { - color: #ffffff; -} - -.remote_search_label_light { - color: #000000; -} - -.password_invisible_entry { - color:#303030; - min-height: 18px; - background-color:white; - border:1px solid rgba(0,0,0,0.1); - border-right:1px solid white; - border-radius:4px 0 0 4px; - letter-spacing: 2px; - font-size: 11px; - padding: 0px 6px; -} - -.password_invisible_entry:focus { - color:black; - min-height: 18px; - background-color:white; - border:1px solid #2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.password_visible_entry { - color:#303030; - min-height: 18px; - background-color:white; - border:1px solid rgba(0,0,0,0.1); - border-right:1px solid white; - border-radius:4px 0 0 4px; - letter-spacing: 2px; - font-size: 11px; - padding: 0px 6px; -} - -.password_visible_entry:focus { - color:black; - min-height: 18px; - background-color:white; - border:1px solid #2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.file_add_entry { - color:#303030; - min-height: 18px; - background-color:white; - border:1px solid rgba(0,0,0,0.1); - border-right:1px solid white; - border-radius:4px 0 0 4px; - font-size: 11px; - padding: 0px 6px; -} - -.file_add_entry:focus { - color:black; - min-height: 18px; - background-color:white; - border:1px solid #2ca7f8; - font-size: 11px; - padding-top: 1px; - padding-bottom: 1px; -} - -.preference_first_segment { - color: #303030; - font-size: 15px; - font-weight: bold; -} - -.preference_second_segment { - color: #303030; - font-size: 14px; - font-weight: bold; -} - -.preference_title { - color: #303030; - font-size: 13px; -} - -.remote_server_label { - color: #303030; - font-weight: bold; -} - -.dialog_button_left_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 5px; -} - -.dialog_button_left_text:hover, -.dialog_button_left_action:hover, -.dialog_button_left_warning:hover, -.dialog_button_left_text:focus, -.dialog_button_left_action:focus, -.dialog_button_left_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #3cabfd; - border-radius: 0 0 0 5px; -} - -.dialog_button_left_text:active, -.dialog_button_left_action:active, -.dialog_button_left_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #0f97ff; - border-radius: 0 0 0 5px; -} - - -.dialog_button_left_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 5px; -} - - -.dialog_button_left_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 5px; -} - -.dialog_button_right_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 5px 0; -} - -.dialog_button_right_text:hover, -.dialog_button_right_action:hover, -.dialog_button_right_warning:hover, -.dialog_button_right_text:focus, -.dialog_button_right_action:focus, -.dialog_button_right_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: inset 1px 0 #3cabfd; - transition: all 200ms ease; - border-width: 1px 0 0 0px; - border-color: #3cabfd; - border-radius: 0 0 5px 0; -} -.dialog_button_right_text:active, -.dialog_button_right_action:active, -.dialog_button_right_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 0 0 0px; - border-color: #0f97ff; - border-radius: 0 0 5px 0; -} - -.dialog_button_right_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 5px 0; -} - -.dialog_button_right_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 5px 0; -} - - -.dialog_button_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 5px 5px; -} - -.dialog_button_text:hover, -.dialog_button_action:hover, -.dialog_button_warning:hover, -.dialog_button_text:focus, -.dialog_button_action:focus, -.dialog_button_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #3cabfd; - border-radius: 0 0 5px 5px; -} - -.dialog_button_text:active, -.dialog_button_action:active, -.dialog_button_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #0f97ff; - border-radius: 0 0 5px 5px; -} - - -.dialog_button_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 5px 5px; -} - - -.dialog_button_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 5px 5px; -} - -.dialog_noradius_button_left_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_left_text:hover, -.dialog_noradius_button_left_action:hover, -.dialog_noradius_button_left_warning:hover, -.dialog_noradius_button_left_text:focus, -.dialog_noradius_button_left_action:focus, -.dialog_noradius_button_left_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #3cabfd; - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_left_text:active, -.dialog_noradius_button_left_action:active, -.dialog_noradius_button_left_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #0f97ff; - border-radius: 0 0 0 0; -} - - -.dialog_noradius_button_left_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - - -.dialog_noradius_button_left_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_right_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_right_text:hover, -.dialog_noradius_button_right_action:hover, -.dialog_noradius_button_right_warning:hover, -.dialog_noradius_button_right_text:focus, -.dialog_noradius_button_right_action:focus, -.dialog_noradius_button_right_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: inset 1px 0 #3cabfd; - transition: all 200ms ease; - border-width: 1px 0 0 0px; - border-color: #3cabfd; - border-radius: 0 0 0 0; -} -.dialog_noradius_button_right_text:active, -.dialog_noradius_button_right_action:active, -.dialog_noradius_button_right_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 0 0 0px; - border-color: #0f97ff; - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_right_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_right_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 0 0 0px; - border-top-color: rgba(0,0,0,0.1); - border-left-color: transparent; - border-radius: 0 0 0 0; -} - - -.dialog_noradius_button_text { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#303030; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_text:hover, -.dialog_noradius_button_action:hover, -.dialog_noradius_button_warning:hover, -.dialog_noradius_button_text:focus, -.dialog_noradius_button_action:focus, -.dialog_noradius_button_warning:focus { - background-image: linear-gradient(-180deg,#8ccfff 0%, #4bb8ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #3cabfd; - border-radius: 0 0 0 0; -} - -.dialog_noradius_button_text:active, -.dialog_noradius_button_action:active, -.dialog_noradius_button_warning:active { - background-image: linear-gradient(-180deg,#0b8cff 0%, #0aa1ff 100%); - color:white; - box-shadow: none; - transition: all 200ms ease; - border-width: 1px 1px 0 0; - border-color: #0f97ff; - border-radius: 0 0 0 0; -} - - -.dialog_noradius_button_action { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#0087ff; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - - -.dialog_noradius_button_warning { - background-image: linear-gradient(-180deg,#ffffff 0%, #ffffff 100%); - color:#ff5a5a; - box-shadow: none; - border-width: 1px 1px 0 0; - border-color: rgba(0,0,0,0.1); - border-radius: 0 0 0 0; -} - -.add_button_light { - background-image: linear-gradient(-180deg, #FFFFFF 0%, #FDFDFD 100%); - border: 1px solid rgba(0,0,0,0.08); - box-shadow: 0px 1px 0px 0px rgba(0,0,0,0.02), inset 0px 1px 0px 0px rgba(255,255,255,0.60); - border-radius: 4px; - color: #303030; -} - -.add_button_light:hover { - background-image: linear-gradient(-180deg, #8CCFFF 0%, #4BB8FF 97%); - border: 1px solid rgba(0,117,243,0.20); - box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.05); - border-radius: 4px; - color: #ffffff; -} - -.add_button_light:active { - background-image: linear-gradient(-180deg, #0B8CFF 0%, #0AA1FF 100%); - border: 1px solid rgba(29,129,255,0.30); - box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.05); - border-radius: 4px; - color: #ffffff; -} - -.add_button_dark { - background: rgba(255, 255, 255, 0.2); - border: 0px; - border-radius: 4px; - color: #ffffff; -} - -.add_button_dark:hover { - background: rgba(255, 255, 255, 0.3); - border: 0px; - border-radius: 4px; - color: #ffffff; -} - -.add_button_dark:active { - background: rgba(255, 255, 255, 0.1); - border: 0px; - border-radius: 4px; - color: #2ca7f8; -} diff -Nru deepin-terminal-5.0.0+ds1/tests/cmake-lcov-test.sh deepin-terminal-5.4.13/tests/cmake-lcov-test.sh --- deepin-terminal-5.0.0+ds1/tests/cmake-lcov-test.sh 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/cmake-lcov-test.sh 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,27 @@ +utdir=build-ut +rm -r $utdir +rm -r ../$utdir +mkdir ../$utdir +cd ../$utdir + +cmake -DCMAKE_BUILD_TYPE=Debug .. +make -j16 + +workdir=$(cd ../$(dirname $0)/$utdir; pwd) + +app_name=deepin-terminal-test + +mkdir -p report + +./tests/$app_name --gtest_output=xml:./report/report.xml + +lcov -d $workdir -c -o ./report/coverage.info + +#以下几行是过滤一些我们不感兴趣的文件的覆盖率信息 +lcov --extract ./report/coverage.info '*/src/*' -o ./report/coverage.info + +lcov --remove ./report/coverage.info '*/tests/*' -o ./report/coverage.info + +genhtml -o ./report ./report/coverage.info + +exit 0 diff -Nru deepin-terminal-5.0.0+ds1/tests/CMakeLists.txt deepin-terminal-5.4.13/tests/CMakeLists.txt --- deepin-terminal-5.0.0+ds1/tests/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/CMakeLists.txt 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,153 @@ + +project(deepin-terminal-test) + +configure_file(../src/environments.h.in environments.h @ONLY) + +# 设置添加gocv相关信息的输出 +set(CMAKE_CXX_FLAGS "-g -fprofile-arcs -ftest-coverage") +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(PROJECT_NAME_TEST ${PROJECT_NAME}) + +add_compile_options(-fno-access-control) + +find_package(Qt5Test REQUIRED) +find_package(GTest REQUIRED) + +add_definitions(${Qt5Test_DEFINITIONS}) +add_definitions(-D UNIT_TEST) + +include_directories(${GTEST_INCLUDE_DIRS}) +include_directories("src/common") +include_directories("src/customcommand") +include_directories("src/encodeplugin") +include_directories("src/remotemanage") +include_directories("src/views") +include_directories("src/main") +include_directories("src/3rdparty/terminalwidget/lib/") +include_directories("src/3rdparty/terminalwidget/lib/history") +include_directories("src/3rdparty/terminalwidget/lib/history/compact") + +FILE(GLOB allSource + ../src/common/*.cpp + ../src/customcommand/*.cpp + ../src/encodeplugin/*.cpp + ../src/remotemanage/*.cpp + ../src/settings/*.cpp + ../src/views/*.cpp + ../src/main/service.cpp + ../src/main/windowsmanager.cpp + ../src/main/mainwindow.cpp + ../src/main/terminalapplication.cpp + ../src/main/termproperties.cpp + ../src/main/dbusmanager.cpp + ../src/main/atspidesktop.cpp +) + +FILE(GLOB allHeaders + ../src/common/*.h + ../src/customcommand/*.h + ../src/encodeplugin/*.h + ../src/main/*.h + ../src/remotemanage/*.h + ../src/settings/*.h + ../src/views/*.h +) + +FILE(GLOB allThirdPartySource + ../3rdparty/terminalwidget/lib/*.cpp + ../3rdparty/terminalwidget/lib/history/*.cpp + ../3rdparty/terminalwidget/lib/history/compact/*.cpp +) + +FILE(GLOB qrcFiles + ../src/assets/resources.qrc +) + +FILE(GLOB allTestHeader + src/common/*.h + src/customcommand/*.h + src/encodeplugin/*.h + src/main/*.h + src/remotemanage/*.h + src/settings/*.h + src/views/*.h + src/3rdparty/terminalwidget/lib/*.h +) + +FILE(GLOB allTestSource + src/common/*.cpp + src/customcommand/*.cpp + src/encodeplugin/*.cpp + src/main/*.cpp + src/remotemanage/*.cpp + src/settings/*.cpp + src/views/*.cpp +) + +set(UI ../3rdparty/terminalwidget/lib/SearchBar.ui) +qt5_wrap_ui(UI_SRCS ${UI}) + +set(KB_LAYOUT_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/kb-layouts") +set(COLORSCHEMES_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/color-schemes") +set(TRANSLATIONS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/translations") + +add_definitions("-DHAVE_POSIX_OPENPT") +add_definitions("-DKB_LAYOUT_DIR=\"${KB_LAYOUT_DIR}\"") +add_definitions("-DCOLORSCHEMES_DIR=\"${COLORSCHEMES_DIR}\"") +add_definitions("-DTRANSLATIONS_DIR=\"${TRANSLATIONS_DIR}\"") + +add_executable(${PROJECT_NAME_TEST} + ${UI_SRCS} + ${allThirdPartySource} + ${allHeaders} + ${allSource} + ${allTestHeader} + ${allTestSource} + ${qrcFiles} + ${uiFiles} +) + +target_include_directories(${PROJECT_NAME_TEST} PUBLIC ${Qt5Widgets_LIBRARIES} + ${Qt5DBus_LIBRARIES} + ${Qt5TestLib_LIBRARIES} + ${Qt5Widgets_PRIVATE_INCLUDE_DIRS} + ${Qt5Core_PRIVATE_INCLUDE_DIRS} + ${Qt5Gui_PRIVATE_INCLUDE_DIRS} + ${PROJECT_BINARY_DIR} + ${DtkWidget_INCLUDE_DIRS} + ${DtkCore_LIBRARIES} + ${DtkGUI_INCLUDE_DIRS} + ${DFrameworkDBus_INCLUDE_DIRS} + ${GOBJECT_INCLUDE_DIRS} + ${LIBSECRET_INCLUDE_DIRS}) + +target_link_libraries(${PROJECT_NAME_TEST} PUBLIC ${LINK_LIBS} Qt5::Test ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} -lpthread -lm) + +#------------------------------ 创建'make test'指令--------------------------------------- +add_custom_target(test +# #执行mkdir -p 创建 coverageResult +# COMMAND mkdir -p coverageResult +# #设置工作目录 +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) + +add_custom_command(TARGET test + COMMAND ${CMAKE_BINARY_DIR}/tests/${PROJECT_NAME_TEST} +) + +#'make test'命令依赖与我们的测试程序 +add_dependencies(test ${PROJECT_NAME_TEST}) + +#ASAN安全性检测标志 +set(CMAKE_SAFETYTEST "${CMAKE_SAFETYTEST_ARG}") +if(CMAKE_SAFETYTEST STREQUAL "") + set(CMAKE_SAFETYTEST "CMAKE_SAFETYTEST_ARG_OFF") +endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${CMAKE_SAFETYTEST}") +if(CMAKE_SAFETYTEST STREQUAL "CMAKE_SAFETYTEST_ARG_ON") + #安全测试选项 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fsanitize=undefined,address -O2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=undefined,address -O2") +endif() + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/3rdparty/terminalwidget/lib/qtermwidget_export.h deepin-terminal-5.4.13/tests/src/3rdparty/terminalwidget/lib/qtermwidget_export.h --- deepin-terminal-5.0.0+ds1/tests/src/3rdparty/terminalwidget/lib/qtermwidget_export.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/3rdparty/terminalwidget/lib/qtermwidget_export.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TERMINALWIDGET_EXPORT_H +#define TERMINALWIDGET_EXPORT_H + +#ifdef TERMINALWIDGET5_STATIC_DEFINE +# define TERMINALWIDGET_EXPORT +# define TERMINALWIDGET5_NO_EXPORT +#else +# ifndef TERMINALWIDGET_EXPORT +# ifdef terminalwidget5_EXPORTS + /* We are building this library */ +# define TERMINALWIDGET_EXPORT __attribute__((visibility("default"))) +# else + /* We are using this library */ +# define TERMINALWIDGET_EXPORT __attribute__((visibility("default"))) +# endif +# endif + +# ifndef TERMINALWIDGET5_NO_EXPORT +# define TERMINALWIDGET5_NO_EXPORT __attribute__((visibility("hidden"))) +# endif +#endif + +#ifndef TERMINALWIDGET5_DEPRECATED +# define TERMINALWIDGET5_DEPRECATED __attribute__ ((__deprecated__)) +#endif + +#ifndef TERMINALWIDGET5_DEPRECATED_EXPORT +# define TERMINALWIDGET5_DEPRECATED_EXPORT TERMINALWIDGET_EXPORT TERMINALWIDGET5_DEPRECATED +#endif + +#ifndef TERMINALWIDGET5_DEPRECATED_NO_EXPORT +# define TERMINALWIDGET5_DEPRECATED_NO_EXPORT TERMINALWIDGET5_NO_EXPORT TERMINALWIDGET5_DEPRECATED +#endif + +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef TERMINALWIDGET5_NO_DEPRECATED +# define TERMINALWIDGET5_NO_DEPRECATED +# endif +#endif + +#endif /* TERMINALWIDGET_EXPORT_H */ diff -Nru deepin-terminal-5.0.0+ds1/tests/src/common/ut_defines.h deepin-terminal-5.4.13/tests/src/common/ut_defines.h --- deepin-terminal-5.0.0+ds1/tests/src/common/ut_defines.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/common/ut_defines.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_DEFINES_TEST_H +#define UT_DEFINES_TEST_H + +//UI测试等待时间间隔 +#define UT_WAIT_TIME 10 + +//是否开启UI测试 +#define ENABLE_UI_TEST + +#define UT_UTILS_TEST +#define UT_SETTINGIO_TEST + +#define UT_ENCODELISTVIEW_TEST +#define UT_ENCODEPANEL_TEST + +#define UT_SWITCHTHEMEMENU_TEST +#define UT_MAINWINDOW_TEST +#define UT_SERVICE_TEST +#define UT_TERMPROPERTIES_TEST +#define UT_TERMINALAPPLICATION_TEST +#define UI_WINDOWSMANAGER_TEST + +#define UT_SERVERCONFIGMANAGER_TEST +#define UT_SERVERCONFIGGROUPPANEL_TEST +#define UT_REMOTEMANAGEMENTTOPPANEL_TEST +#define UT_REMOTEMANAGEMENTSEARCHPANEL_TEST +#define UT_REMOTEMANAGEMENTPLUGIN_TEST +#define UT_REMOTEMANAGEMENTPANEL_TEST +#define UT_SERVERCONFIGOPTDLG_TEST + +#define UT_SETTINGS_TEST +#define UT_SHORTCUTMANAGER_TEST + +#define UT_THEMELISTVIEW_TEST +#define UT_THEMEPANEL_TEST + +#define UT_LISTVIEW_TEST +#define UT_TABBAR_TEST +#define UT_ICONBUTTON_TEST +#define UT_MYICONBUTTON_TEST +#define UT_FOCUSFRAME_TEST +#define UT_ITEMWIDGET_TEST +#define UT_MYICONBUTTON_TEST +#define UT_OPERATIONCONFIRMDLG_TEST +#define UT_TERMINPUTDIALOG_TEST +#define UT_NEWDSPINBOX_TEST +#define UT_CUSTOMTHEMESETTINGDIALOG_TEST + +#define UT_DBUSMANAGER_TEST + +#define UT_TERMWIDGETPAGE_TEST +#define UT_TERMWIDGET_TEST +#define UT_TITLEBAR_TEST +#define UT_PAGESEARCHBAR_TEST + +#define UT_CUSTOMCOMMANDOPTDLG_TEST +#define UT_CUSTOMCOMMANDPANEL_TEST +#define UT_CUSTOMCOMMANDPLUGIN_TEST +#define UT_CUSTOMCOMMANDSEARCHRSTPANEL_TEST +#define UT_CUSTOMCOMMANDTOPPANEL_TEST + +#define UT_TERMARGUMENTPARSER_TEST + +//第三方库 QTermWidget 单元测试开关 +#define UT_TERMINALDISPLAY_TEST +#define UT_VT102EMULATION_TEST +#define UT_SHELLCOMMAND_TEST +#define UT_SESSION_TEST +#define UT_SCREEN_TEST +#define UT_PTY_TEST +#define UT_HISTORY_TEST +#define UT_CHARACTER_TEST +#define UT_CHARACTERCOLOR_TEST +#define UT_COLORSCHEME_TEST +#define UT_QTERMWIDGET_TEST +#define UT_FILTER_TEST +#define UT_BLOCKARRAY_TEST +#define UT_SEARCHBAR_TEST +#define UT_KEYBOARDTRANSLATOR_TEST +#define UT_KPROCESS_TEST +#define UT_KPTY_TEST + +#endif // UT_DEFINES_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/common/ut_settingio_test.cpp deepin-terminal-5.4.13/tests/src/common/ut_settingio_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/common/ut_settingio_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/common/ut_settingio_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,108 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#include "ut_settingio_test.h" + +#include "settingio.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include + +//DTK相关头文件 +#include +DWIDGET_USE_NAMESPACE + +UT_SettingIO_Test::UT_SettingIO_Test() +{ + +} + +void UT_SettingIO_Test::SetUp() +{ +} + +void UT_SettingIO_Test::TearDown() +{ +} + +#ifdef UT_SETTINGIO_TEST + +/******************************************************************************* + 1. @函数: canTransferTest + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-12-15 + 4. @说明: canTransfer函数测试 +*******************************************************************************/ +TEST_F(UT_SettingIO_Test, canTransferTest) +{ + //"%U4E2D%U56FD%U4EBA" Unicode编码 对应中文为"中国人" + QString strUnicode = "%U4E2D%U56FD%U4EBA"; + QString strResut = SettingIO::canTransfer(strUnicode); + EXPECT_EQ(strResut, QString("中国人")); + qDebug() << strResut; + + //"%%E4%B8%AD%E5%9B%BD%E4%BA%BA"Latin1格式的字符串 编码 对应中文为"中国人" + QString strLatin1 = "%E4%B8%AD%E5%9B%BD%E4%BA%BA"; + strResut = SettingIO::canTransfer(strLatin1); + EXPECT_EQ(strResut, QString("中国人")); + qDebug() << strResut; +} + +/******************************************************************************* + 1. @函数: canTransferTest + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-12-15 + 4. @说明: escapedString函数测试 +*******************************************************************************/ +TEST_F(UT_SettingIO_Test, escapedStringTest) +{ + QString strTest = "a;b,c=d#e\\0"; + QString strResut = SettingIO::escapedString(strTest); + qDebug() << strResut; + + strTest = "!@#$%^&*()-+=\???bB0\n\r\t\\\0\0"; + strResut = SettingIO::escapedString(strTest); + qDebug() << strResut; +} + +/******************************************************************************* + 1. @函数: unescapedStringTest + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-12-15 + 4. @说明: unescapedString函数测试 +*******************************************************************************/ +TEST_F(UT_SettingIO_Test, unescapedStringTest) +{ + QString strTest = "123\1?\\t\\x1Bb\a\t "; + QString strResut = SettingIO::unescapedString(strTest); + qDebug() << strResut; +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/common/ut_settingio_test.h deepin-terminal-5.4.13/tests/src/common/ut_settingio_test.h --- deepin-terminal-5.0.0+ds1/tests/src/common/ut_settingio_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/common/ut_settingio_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +/* +* Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +* +* Author: sunchengxi +* +* Maintainer: sunchengxi +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#ifndef UT_SETTINGIO_TEST_H +#define UT_SETTINGIO_TEST_H + +#include "ut_defines.h" + +#include +/******************************************************************************* + 1. @类名: UT_SettingIO_Test + 2. @作者: ut000125 孙成熙 + 3. @日期: 2020-12-15 + 4. @说明: SettingIO类测试 +*******************************************************************************/ +class UT_SettingIO_Test : public ::testing::Test +{ +public: + UT_SettingIO_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_SETTINGIO_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/common/ut_utils_test.cpp deepin-terminal-5.4.13/tests/src/common/ut_utils_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/common/ut_utils_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/common/ut_utils_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,431 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_utils_test.h" +#include "termproperties.h" + +#include "utils.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include + +//DTK相关头文件 +#include +DWIDGET_USE_NAMESPACE + +UT_Utils_Test::UT_Utils_Test() +{ +} + +void UT_Utils_Test::SetUp() +{ +} + +void UT_Utils_Test::TearDown() +{ +} + +#ifdef UT_UTILS_TEST + +TEST_F(UT_Utils_Test, getQssContentEmpty) +{ + EXPECT_TRUE(Utils::getQssContent(QString()).isEmpty()); +} + +TEST_F(UT_Utils_Test, getQssContentNoFile) +{ + EXPECT_TRUE(Utils::getQssContent(QString("/opt/qt.qss")).isEmpty()); +} + +TEST_F(UT_Utils_Test, getQssContentOKFile) +{ + system("echo '' > qts.qss"); + EXPECT_FALSE(Utils::getQssContent(QString("./qts.qss")).isEmpty()); +} + + +TEST_F(UT_Utils_Test, getConfigPath) +{ + EXPECT_FALSE(Utils::getConfigPath().isEmpty()); +} + + +TEST_F(UT_Utils_Test, suffixList) +{ + EXPECT_FALSE(Utils::suffixList().isEmpty()); +} + +TEST_F(UT_Utils_Test, getRandString) +{ + EXPECT_FALSE(Utils::getRandString().isEmpty()); + + QString allGenText = ""; + for (int i = 0; i < 20; i++) { + QString str = Utils::getRandString(); + allGenText.append(str); + EXPECT_EQ(str.length(), 6); + //加个延时用于提高Utils::getRandString()函数生成的随机性,因为随机函数使用时间作为随机数的种子 + QTest::qWait(UT_WAIT_TIME); + } +} + +TEST_F(UT_Utils_Test, showDirDialog) +{ +#ifdef ENABLE_UI_TEST + QWidget parentWidget; + + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + QString dirName = Utils::showDirDialog(&parentWidget); + EXPECT_GE(dirName.length(), 0); +#endif +} + +//static void setSpaceInWord(DPushButton *button); + +//static void showRenameTitleDialog(QString oldTitle, QWidget *parentWidget); + +//static void showSameNameDialog(QWidget *parent, const QString &firstLine, const QString &secondLine); +TEST_F(UT_Utils_Test, showFilesSelectDialog) +{ +#ifdef ENABLE_UI_TEST + QWidget *parentWidget = new QWidget; + + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + parentWidget->deleteLater(); + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + QStringList fileList = Utils::showFilesSelectDialog(parentWidget); + EXPECT_GE(fileList.size(), 0); + + +#endif +} + +TEST_F(UT_Utils_Test, showExitConfirmDialogTab_CloseTypeTab) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + + bool isAccepted = Utils::showExitConfirmDialog(Utils::CloseType::CloseType_Tab); + EXPECT_EQ(isAccepted, false); + + +#endif +} + +TEST_F(UT_Utils_Test, showExitConfirmDialog_CloseTypeWindow) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + bool isAccepted = Utils::showExitConfirmDialog(Utils::CloseType::CloseType_Window); + EXPECT_EQ(isAccepted, false); + + +#endif +} + +TEST_F(UT_Utils_Test, getExitDialogText) +{ + QString title; + QString txt; + Utils::CloseType temtype = Utils::CloseType::CloseType_Window; + Utils::getExitDialogText(temtype, title, txt, 0); + + QString titleWindow = QObject::tr("Close this window?"); + QString txtWindow = QObject::tr("There are still processes running in this window. Closing the window will kill all of them."); + + EXPECT_NE(title, titleWindow); + EXPECT_NE(txt, txtWindow); + + Utils::getExitDialogText(temtype, title, txt, 1); + EXPECT_EQ(title, titleWindow); + EXPECT_EQ(txt, txtWindow); + + + QString titleDefault = QObject::tr("Close this terminal?"); + QString txtDefault = QObject::tr("There is still a process running in this terminal. " + "Closing the terminal will kill it."); + temtype = Utils::CloseType::CloseType_Terminal; + Utils::getExitDialogText(temtype, title, txt, 1); + EXPECT_EQ(title, titleDefault); + EXPECT_EQ(txt, txtDefault); + + Utils::getExitDialogText(temtype, title, txt, 2); + EXPECT_EQ(title, titleDefault); + EXPECT_NE(txt, txtDefault); +} + + +TEST_F(UT_Utils_Test, showExitUninstallConfirmDialog) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + bool isAccepted = Utils::showExitUninstallConfirmDialog(); + EXPECT_EQ(isAccepted, false); + + +#endif +} + + +TEST_F(UT_Utils_Test, showUninstallConfirmDialog) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + QString commandName = "python"; + bool isAccepted = Utils::showUninstallConfirmDialog(commandName); + EXPECT_EQ(isAccepted, false); + + +#endif +} + + +TEST_F(UT_Utils_Test, showShortcutConflictMsgbox) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + QString shortcutName = "Ctrl+C"; + bool isAccepted = Utils::showShortcutConflictMsgbox(shortcutName); + EXPECT_EQ(isAccepted, true); + + +#endif +} + +TEST_F(UT_Utils_Test, showSameNameDialog) +{ +#ifdef ENABLE_UI_TEST + QWidget *parentWidget = new QWidget; + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + parentWidget->deleteLater(); + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + Utils::showSameNameDialog(parentWidget, "servername1", "servername1"); + + +#endif +} + +// 参数解析 +TEST_F(UT_Utils_Test, parseCommandLine) +{ + QStringList appArguments; + appArguments << "deepin-terminal" << QString("-h"); + + TermProperties properties; + Utils::parseCommandLine(appArguments, properties, false); + + appArguments.clear(); + appArguments << "deepin-terminal" << QString("-v"); + Utils::parseCommandLine(appArguments, properties, false); + + appArguments.clear(); + appArguments << "deepin-terminal" << QString("-q"); + Utils::parseCommandLine(appArguments, properties, false); + + appArguments.clear(); + appArguments << "deepin-terminal" << "-e" << "ls" << "-w" << "/home/"; + Utils::parseCommandLine(appArguments, properties, false); +} + +TEST_F(UT_Utils_Test, parseExecutePara) +{ + QStringList appArguments; + appArguments << "deepin-terminal" << "-e" << "ls /home/"; + QStringList paraList = Utils::parseExecutePara(appArguments); + EXPECT_EQ(paraList.size(), 2); + + appArguments.clear(); + appArguments << "deepin-terminal" << "-e" << "ping 127.0.0.1 -c 5"; + paraList = Utils::parseExecutePara(appArguments); + EXPECT_EQ(paraList.size(), 4); + + appArguments.clear(); + appArguments << "deepin-terminal" << "-e" << "bash -c 'ping 127.0.0.1 -c 5'"; + paraList = Utils::parseExecutePara(appArguments); + EXPECT_EQ(paraList.size(), 3); +} + +TEST_F(UT_Utils_Test, parseNestedQString) +{ + QString str = QString("bash -c 'ping 127.0.0.1'"); + QStringList paraList = Utils::parseNestedQString(str); + EXPECT_EQ(paraList.size(), 3); + + str = QString("bash -c ping 127.0.0.1"); + QStringList paraList2 = Utils::parseNestedQString(str); + EXPECT_EQ(paraList.size(), 3); +} + +TEST_F(UT_Utils_Test, FontFilterTest) +{ + FontFilter *ff = FontFilter::instance(); + ff->handleWidthFont(); + + ff->setStop(true); + EXPECT_EQ(ff->m_bstop, true); + + ff->compareWhiteList(); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/common/ut_utils_test.h deepin-terminal-5.4.13/tests/src/common/ut_utils_test.h --- deepin-terminal-5.0.0+ds1/tests/src/common/ut_utils_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/common/ut_utils_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_UTILS_TEST_H +#define UT_UTILS_TEST_H + +#include "ut_defines.h" + +#include + +class UT_Utils_Test : public ::testing::Test +{ +public: + UT_Utils_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_UTILS_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandoptdlg_test.cpp deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandoptdlg_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandoptdlg_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandoptdlg_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_customcommandoptdlg_test.h" + +#include "ut_defines.h" +#include "customcommandoptdlg.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include + +UT_CustomCommandOptDlg_Test::UT_CustomCommandOptDlg_Test() +{ +} + +void UT_CustomCommandOptDlg_Test::SetUp() +{ +} + +void UT_CustomCommandOptDlg_Test::TearDown() +{ +} + +static void doDeleteLater(CustomCommandOptDlg *obj) +{ + obj->deleteLater(); +} + + +#ifdef UT_CUSTOMCOMMANDOPTDLG_TEST + +TEST_F(UT_CustomCommandOptDlg_Test, CustomCommandOptDlgTest) +{ + DApplicationHelper::instance()->setPaletteType(DApplicationHelper::DarkType); + QSharedPointer cmdDlg_new(new CustomCommandOptDlg, doDeleteLater); + cmdDlg_new->setIconPixmap(QPixmap()); + cmdDlg_new->show(); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::LightType); + DApplicationHelper::instance()->setPaletteType(DApplicationHelper::LightType); + + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + + cmdDlg->show(); + + QList lineEditList = cmdDlg->findChildren(); + EXPECT_EQ(lineEditList.size(), 2); + + DLineEdit *cmdNameEdit = lineEditList.first(); + DLineEdit *cmdTextEdit = lineEditList.last(); + + QString str = Utils::getRandString(); + cmdNameEdit->setText(str.toLower()); + cmdTextEdit->setText("ls -al"); + + DKeySequenceEdit *shortcutEdit = cmdDlg->findChild(); + EXPECT_NE(shortcutEdit, nullptr); + shortcutEdit->setKeySequence(QKeySequence("Ctrl+Shift+K")); +} + +TEST_F(UT_CustomCommandOptDlg_Test, setCancelBtnText) +{ + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + + cmdDlg->addCancelConfirmButtons(); + EXPECT_NE(cmdDlg->m_cancelBtn, nullptr); + EXPECT_NE(cmdDlg->m_confirmBtn, nullptr); + + QString cancelText("Cancel"); + cmdDlg->setCancelBtnText(cancelText); + EXPECT_EQ(cmdDlg->m_cancelBtn->text(), cancelText); +} + +TEST_F(UT_CustomCommandOptDlg_Test, setConfirmBtnText) +{ + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + cmdDlg->addCancelConfirmButtons(); + EXPECT_NE(cmdDlg->m_cancelBtn, nullptr); + EXPECT_NE(cmdDlg->m_confirmBtn, nullptr); + + QString confirmText("Add"); + cmdDlg->setConfirmBtnText(confirmText); + EXPECT_EQ(cmdDlg->m_confirmBtn->text(), confirmText); +} + +TEST_F(UT_CustomCommandOptDlg_Test, addCancelConfirmButtonsTest) +{ + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + cmdDlg->addCancelConfirmButtons(); + EXPECT_NE(cmdDlg->m_cancelBtn, nullptr); + EXPECT_NE(cmdDlg->m_confirmBtn, nullptr); + + cmdDlg->m_shortCutLineEdit->setKeySequence(QKeySequence("Ctrl+T")); + emit cmdDlg->m_cancelBtn->clicked(true); + emit cmdDlg->m_confirmBtn->clicked(true); + emit cmdDlg->m_shortCutLineEdit->editingFinished(QKeySequence("Ctrl+T")); +} + +TEST_F(UT_CustomCommandOptDlg_Test, slotAddSaveButtonClicked) +{ + QKeySequence keySeq("Ctrl+T"); + QAction newAction(ShortcutManager::instance()); + newAction.setObjectName("CustomQAction"); + newAction.setText("cmd"); + newAction.setData("ls -al"); + newAction.setShortcut(keySeq); + ShortcutManager::instance()->addCustomCommand(newAction); + + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + cmdDlg->m_currItemData = new CustomCommandData; + cmdDlg->m_currItemData->m_cmdName = ""; + cmdDlg->m_currItemData->m_cmdText = ""; + cmdDlg->m_currItemData->m_cmdShortcut = ""; + + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_nameLineEdit->setText("cmd"); + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_commandLineEdit->setText("ls -al"); + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_shortCutLineEdit->setKeySequence(QKeySequence("Ctrl+Shift+T")); + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_type = CustomCommandOptDlg::CCT_MODIFY; + cmdDlg->slotAddSaveButtonClicked(); + + { + cmdDlg->m_bRefreshCheck = true; + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_bRefreshCheck = false; + cmdDlg->m_currItemData->m_cmdName = "cmd"; + cmdDlg->m_currItemData->m_cmdText = "ls -al"; + cmdDlg->m_currItemData->m_cmdShortcut = "Ctrl+Shift+T"; + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_nameLineEdit->setText("cmd_no"); + cmdDlg->slotAddSaveButtonClicked(); + + } +} + +TEST_F(UT_CustomCommandOptDlg_Test, slotRefreshData) +{ + QSharedPointer cmdDlg(new CustomCommandOptDlg, doDeleteLater); + + cmdDlg->m_currItemData = new CustomCommandData; + cmdDlg->m_currItemData->m_cmdName = ""; + cmdDlg->m_currItemData->m_cmdText = ""; + cmdDlg->m_currItemData->m_cmdShortcut = ""; + + cmdDlg->m_nameLineEdit->setText("cmd"); + + cmdDlg->m_commandLineEdit->setText("ls -al"); + + QKeySequence keytmp = cmdDlg->m_shortCutLineEdit->setKeySequence(QKeySequence("Ctrl+Shift+T")); + cmdDlg->slotAddSaveButtonClicked(); + + cmdDlg->m_type = CustomCommandOptDlg::CCT_ADD; + cmdDlg->slotRefreshData("cmd", "cmd2"); + + cmdDlg->m_type = CustomCommandOptDlg::CCT_MODIFY; + cmdDlg->slotRefreshData("cmd", "cmd2"); +} + + + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandoptdlg_test.h deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandoptdlg_test.h --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandoptdlg_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandoptdlg_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_CUSTOMCOMMANDOPTDLG_TEST_H +#define UT_CUSTOMCOMMANDOPTDLG_TEST_H + +#include "ut_defines.h" + +#include + +class UT_CustomCommandOptDlg_Test : public ::testing::Test +{ +public: + UT_CustomCommandOptDlg_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; +#endif//UT_CUSTOMCOMMANDOPTDLG_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandpanel_test.cpp deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandpanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandpanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandpanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "customcommandpanel.h" +#include "customcommandoptdlg.h" +#include "ut_defines.h" +#include "shortcutmanager.h" +#include "../stub.h" + +#include + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include + + +#include + +class UT_CustomCommandPanel_Test : public ::testing::Test +{ +public: + UT_CustomCommandPanel_Test(); + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +private: + ShortcutManager *m_scManager; +}; + +static QAction m_action; +static QAction *ut_m_pdlg_getCurCustomCmd() { + return &m_action; +} + +UT_CustomCommandPanel_Test::UT_CustomCommandPanel_Test():m_scManager(nullptr) +{ +} + +void UT_CustomCommandPanel_Test::SetUp() +{ + //快捷键、自定义命令 + m_scManager = ShortcutManager::instance(); + m_scManager->createCustomCommandsFromConfig(); +} + +void UT_CustomCommandPanel_Test::TearDown() +{ +} + +#ifdef UT_CUSTOMCOMMANDPANEL_TEST + +TEST_F(UT_CustomCommandPanel_Test, CustomCommandPanelTest) +{ + QList cmdActionlist = m_scManager->getCustomCommandActionList(); + + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + CustomCommandPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + panel.refreshCmdPanel(); + + ListView *cmdListWidget = panel.findChild(); + EXPECT_EQ(cmdActionlist.size(), cmdListWidget->count()); + + panel.refreshCmdSearchState(); +} + +TEST_F(UT_CustomCommandPanel_Test, showCurSearchResult) +{ + CustomCommandPanel panel; + panel.m_searchEdit->setText("1"); + panel.showCurSearchResult(); +} + +TEST_F(UT_CustomCommandPanel_Test, showAddCustomCommandDlg) +{ + QList cmdActionlist = m_scManager->getCustomCommandActionList(); + + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + CustomCommandPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + panel.refreshCmdPanel(); + + ListView *cmdListWidget = panel.findChild(); + EXPECT_EQ(cmdActionlist.size(), cmdListWidget->count()); + + panel.refreshCmdSearchState(); + panel.m_pushButton->setFocus(); + panel.showAddCustomCommandDlg(); + panel.showAddCustomCommandDlg(); + panel.m_bpushButtonHaveFocus = true; + //打桩 + Stub stub; + stub.set(ADDR(CustomCommandOptDlg, getCurCustomCmd), ut_m_pdlg_getCurCustomCmd); + + panel.onAddCommandResponse(QDialog::Accepted); + //打桩还原 + stub.reset(ADDR(CustomCommandOptDlg, getCurCustomCmd)); + + ShortcutManager::instance()->addCustomCommand(QAction("xxx")); + QAction *action = ShortcutManager::instance()->getCustomCommandActionList().value(0); + panel.doCustomCommand(action->text()); +} + +TEST_F(UT_CustomCommandPanel_Test, onFocusOut) +{ + CustomCommandPanel panel; + panel.onFocusOut(Qt::TabFocusReason); + panel.m_searchEdit->setFocus(); + panel.onFocusOut(Qt::BacktabFocusReason); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandplugin_test.cpp deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandplugin_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandplugin_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandplugin_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_customcommandplugin_test.h" +#include "customcommandplugin.h" + +#include "mainwindow.h" +#include "termproperties.h" +#include "service.h" +#include +#include +#include +#include +UT_Customcommandplugin_Test::UT_Customcommandplugin_Test() +{ + +} + +void UT_Customcommandplugin_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) + { + Service::instance()->setProperty("isServiceInit", true); + } + m_cmdPlugin = new CustomCommandPlugin; +} + +void UT_Customcommandplugin_Test::TearDown() +{ + delete m_cmdPlugin; +} + +#ifdef UT_CUSTOMCOMMANDPLUGIN_TEST + +TEST_F(UT_Customcommandplugin_Test,initPlugin) +{ + EXPECT_NE(m_cmdPlugin, nullptr); + + NormalWindow* pNewNorm = new NormalWindow(TermProperties(), nullptr); + + m_cmdPlugin->initPlugin(pNewNorm); + EXPECT_NE(m_cmdPlugin->titlebarMenu(pNewNorm), nullptr); + EXPECT_NE(m_cmdPlugin->getCustomCommandTopPanel(), nullptr); + + delete pNewNorm; +} + +#endif + + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandplugin_test.h deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandplugin_test.h --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandplugin_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandplugin_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_CUSTOMCOMMANDPLUGIN_TEST_H +#define UT_CUSTOMCOMMANDPLUGIN_TEST_H + +#include "ut_defines.h" + +#include + +class CustomCommandPlugin; +class UT_Customcommandplugin_Test : public ::testing::Test +{ +public: + UT_Customcommandplugin_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +public: + CustomCommandPlugin* m_cmdPlugin = nullptr; +}; + +#endif//UT_CUSTOMCOMMANDPLUGIN_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandsearchrstpanel_test.cpp deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandsearchrstpanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandsearchrstpanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandsearchrstpanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_customcommandsearchrstpanel_test.h" +#include "customcommandsearchrstpanel.h" +#include "service.h" +#include "shortcutmanager.h" +#include "listview.h" + +#include +#include +#include +#include +#include + +UT_CustomCommandSearchRstPanel_Test::UT_CustomCommandSearchRstPanel_Test() +{ + +} + +void UT_CustomCommandSearchRstPanel_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + DApplicationHelper::instance()->setPaletteType(DApplicationHelper::DarkType); + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_cmdSearchPanel = new CustomCommandSearchRstPanel(m_normalWindow); +} + +void UT_CustomCommandSearchRstPanel_Test::TearDown() +{ + delete m_cmdSearchPanel; + delete m_normalWindow; + +} +#ifdef UT_CUSTOMCOMMANDSEARCHRSTPANEL_TEST + +TEST_F(UT_CustomCommandSearchRstPanel_Test, CustomCommandSearchRstPanelTest) +{ + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::LightType); + + emit m_cmdSearchPanel->m_rebackButton->focusOut(Qt::FocusReason::TabFocusReason); + + emit m_cmdSearchPanel->m_cmdListWidget->focusOut(Qt::FocusReason::TabFocusReason); + emit m_cmdSearchPanel->m_cmdListWidget->focusOut(Qt::NoFocusReason); +} + +TEST_F(UT_CustomCommandSearchRstPanel_Test, refreshDataTest) +{ + EXPECT_NE(m_cmdSearchPanel, nullptr); + m_cmdSearchPanel->show(); + + m_cmdSearchPanel->refreshData(); + + m_cmdSearchPanel->refreshData("test"); +} + +TEST_F(UT_CustomCommandSearchRstPanel_Test, setSearchFilterTest) +{ + EXPECT_NE(m_cmdSearchPanel, nullptr); + m_cmdSearchPanel->show(); + + m_cmdSearchPanel->setSearchFilter("SearchFilter"); +} + +TEST_F(UT_CustomCommandSearchRstPanel_Test, doCustomCommandTest) +{ + EXPECT_NE(m_cmdSearchPanel, nullptr); + m_cmdSearchPanel->show(); + + QKeySequence keySeq("Ctrl+T"); + QAction newAction(ShortcutManager::instance()); + newAction.setObjectName("CustomQAction"); + newAction.setText("myCommand"); + newAction.setData("ls -al"); + newAction.setShortcut(keySeq); + ShortcutManager::instance()->addCustomCommand(newAction); + + m_cmdSearchPanel->doCustomCommand("myCommand"); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandsearchrstpanel_test.h deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandsearchrstpanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandsearchrstpanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandsearchrstpanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_CUSTOMCOMMANDSEARCHRSTPANEL_TEST_H +#define UT_CUSTOMCOMMANDSEARCHRSTPANEL_TEST_H + +#include "ut_defines.h" +#include "mainwindow.h" + +#include + +class CustomCommandSearchRstPanel; +class UT_CustomCommandSearchRstPanel_Test : public ::testing::Test +{ +public: + UT_CustomCommandSearchRstPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +public: + CustomCommandSearchRstPanel* m_cmdSearchPanel = nullptr; + + //普通窗口 + MainWindow *m_normalWindow = nullptr; + TermProperties m_normalTermProperty; +}; + +#endif//UT_CUSTOMCOMMANDSEARCHRSTPANEL_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandtoppanel_test.cpp deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandtoppanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandtoppanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandtoppanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_customcommandtoppanel_test.h" + +#include "customcommandtoppanel.h" +#include "mainwindow.h" + +#include +#include +#include +#include + +UT_CustomCommandTopPanel_Test::UT_CustomCommandTopPanel_Test() + : m_normalWindow(nullptr) + , m_cmdTopPanel(nullptr) +{ +} + +void UT_CustomCommandTopPanel_Test::SetUp() +{ + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + m_cmdTopPanel = new CustomCommandTopPanel(m_normalWindow); +} + +void UT_CustomCommandTopPanel_Test::TearDown() +{ + if (m_cmdTopPanel != nullptr) { + delete m_cmdTopPanel; + m_cmdTopPanel = nullptr; + } + if (m_normalWindow != nullptr) { + delete m_normalWindow; + m_normalWindow = nullptr; + } +} + +#ifdef UT_CUSTOMCOMMANDTOPPANEL_TEST + +TEST_F(UT_CustomCommandTopPanel_Test, showCustomCommandPanel) +{ + m_cmdTopPanel->show(true); + EXPECT_EQ(m_cmdTopPanel->isVisible(), true); + + m_cmdTopPanel->showCustomCommandPanel(); + EXPECT_EQ(m_cmdTopPanel->m_customCommandPanel->isVisible(), true); +} + +TEST_F(UT_CustomCommandTopPanel_Test, showCustomCommandSearchPanel) +{ + m_cmdTopPanel->show(true); + EXPECT_EQ(m_cmdTopPanel->isVisible(), true); + + m_cmdTopPanel->showCustomCommandSearchPanel("cmd"); + EXPECT_EQ(m_cmdTopPanel->m_customCommandSearchPanel->isVisible(), true); +} + +TEST_F(UT_CustomCommandTopPanel_Test, slotsRefreshCommandPanel) +{ + m_cmdTopPanel->show(true); + EXPECT_EQ(m_cmdTopPanel->isVisible(), true); + + m_cmdTopPanel->slotsRefreshCommandPanel(); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandtoppanel_test.h deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandtoppanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/customcommand/ut_customcommandtoppanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/customcommand/ut_customcommandtoppanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_CUSTOMCOMMANDTOPPANEL_TEST_H +#define UT_CUSTOMCOMMANDTOPPANEL_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class CustomCommandTopPanel; +class UT_CustomCommandTopPanel_Test : public ::testing::Test +{ +public: + UT_CustomCommandTopPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +private: + TermProperties m_normalTermProperty; + MainWindow *m_normalWindow = nullptr; + CustomCommandTopPanel* m_cmdTopPanel = nullptr; +}; + +#endif//UT_CUSTOMCOMMANDTOPPANEL_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodelistview_test.cpp deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodelistview_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodelistview_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodelistview_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,261 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "encodelistview.h" +#include "mainwindow.h" +#include "service.h" +#include "encodelistmodel.h" +#include "ut_defines.h" +#include "termproperties.h" +#include "../stub.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +class MainWindow; +class UT_EncodeListView_Test : public ::testing::Test +{ +public: + UT_EncodeListView_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +UT_EncodeListView_Test::UT_EncodeListView_Test() +{ +} + +void UT_EncodeListView_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +void UT_EncodeListView_Test::TearDown() +{ + delete m_normalWindow; +} +static int ut_MouseEvent_source() +{ + return Qt::MouseEventSynthesizedByQt; +} + +static Qt::FocusReason ut_ListView_getFocusReason() +{ + return Qt::TabFocusReason; +} + +#ifdef UT_ENCODELISTVIEW_TEST + +TEST_F(UT_EncodeListView_Test, initEncodeItems) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + encodeListView->initEncodeItems(); + EXPECT_GT(encodeListView->count(), 0); +} + +TEST_F(UT_EncodeListView_Test, clickItemTest) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + if(!encodeListView) + return; + encodeListView->show(); + + int itemCount = encodeListView->count(); + int randomIndex = QRandomGenerator::global()->bounded(0, itemCount); + + QAbstractItemModel *model = encodeListView->model(); + if(!model) + return; + QModelIndex firstIndex = model->index(0, 0, QModelIndex()); + int itemHeight = encodeListView->visualRect(firstIndex).height(); + +#ifdef ENABLE_UI_TEST + + for (int i = 0; i < itemCount; ++i) { + if (randomIndex == i) { + QPoint clickPoint(5, 1 + itemHeight * i); + QModelIndex index = encodeListView->indexAt(clickPoint); + if (!index.isValid()) { + continue; + } + QTest::mouseClick(encodeListView->viewport(), Qt::LeftButton, Qt::NoModifier, clickPoint); + QTest::qWait(2000); + break; + } + } + +#endif +} +TEST_F(UT_EncodeListView_Test, keyPressEvent) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + encodeListView->show(); + + QTest::keyPress(encodeListView, Qt::Key_Space); + QTest::keyPress(encodeListView, Qt::Key_Escape); +} + +TEST_F(UT_EncodeListView_Test, keyPressEvent2) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + encodeListView->show(); + encodeListView->addItem("test"); + + encodeListView->setCurrentIndex(encodeListView->model()->index(0, 0)); + QTest::keyPress(encodeListView, Qt::Key_Up); + + int rowcount = encodeListView->m_encodeModel->listData().size(); + while(encodeListView->model()->rowCount() < rowcount) { + encodeListView->addItem("test"); + } + encodeListView->setCurrentIndex(encodeListView->model()->index(rowcount - 1, 0)); + QTest::keyPress(encodeListView, Qt::Key_Down); + + QTest::keyPress(encodeListView, Qt::Key_A); +} +TEST_F(UT_EncodeListView_Test, focusInEvent) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + + QFocusEvent event(QEvent::FocusIn, Qt::TabFocusReason); + encodeListView->focusInEvent(&event); +} + +TEST_F(UT_EncodeListView_Test, mouseMoveEvent) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + + //打桩 + Stub stub; + stub.set(ADDR(QMouseEvent, source), ut_MouseEvent_source); + + QMouseEvent event(QEvent::MouseMove, QPoint(1, 1), Qt::NoButton, Qt::NoButton, Qt::KeyboardModifiers()); + + encodeListView->mouseMoveEvent(&event); + //打桩还原 + stub.reset(ADDR(QMouseEvent, source)); +} + +TEST_F(UT_EncodeListView_Test, paint) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + + QPainter painter(encodeListView); + QStyleOptionViewItem option; + option.state = QStyle::State_MouseOver + | QStyle::State_Selected + ; + encodeListView->addItem("test"); + QModelIndex index = encodeListView->model()->index(0, 0); + + //打桩 + Stub stub; + stub.set(ADDR(EncodeListView, getFocusReason), ut_ListView_getFocusReason); + + encodeListView->itemDelegate()->paint(&painter, option, index); + //打桩还原 + stub.reset(ADDR(EncodeListView, getFocusReason)); +} + +TEST_F(UT_EncodeListView_Test, focusOutEvent) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodeListView *encodeListView = m_normalWindow->findChild("EncodeListView"); + + + QFocusEvent event(QEvent::FocusOut); + encodeListView->focusOutEvent(&event); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodepanel_test.cpp deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodepanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodepanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodepanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_encodepanel_test.h" + +#include "encodepanel.h" +#include "service.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include + +UT_EncodePanel_Test::UT_EncodePanel_Test() +{ +} + +void UT_EncodePanel_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) + { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +void UT_EncodePanel_Test::TearDown() +{ + delete m_normalWindow; +} + +#ifdef UT_ENCODEPANEL_TEST +TEST_F(UT_EncodePanel_Test, EncodePanelTest) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_ENCODING); + + EncodePanel *panel = m_normalWindow->findChild(); + panel->show(); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodepanel_test.h deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodepanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/encodeplugin/ut_encodepanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/encodeplugin/ut_encodepanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_ENCODEPANEL_TEST_H +#define UT_ENCODEPANEL_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_EncodePanel_Test : public ::testing::Test +{ +public: + UT_EncodePanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_ENCODEPANEL_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/main.cpp deepin-terminal-5.4.13/tests/src/main/main.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/main.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "terminalapplication.h" +#include "ut_defines.h" + +#include +#include + +#include +#include + +#if defined(CMAKE_SAFETYTEST_ARG_ON) +#include +#endif + +QT_BEGIN_NAMESPACE +QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS +QT_END_NAMESPACE + +int main(int argc, char *argv[]) +{ + qputenv("QT_QPA_PLATFORM", "offscreen"); + TerminalApplication app(argc, argv); + + QTEST_DISABLE_KEYPAD_NAVIGATION + QTEST_ADD_GPU_BLACKLIST_SUPPORT + + testing::InitGoogleTest(&argc, argv); + int ret = RUN_ALL_TESTS(); + +#if defined(CMAKE_SAFETYTEST_ARG_ON) + __sanitizer_set_report_path("asan.log"); +#endif + + qDebug() << ret; + +#ifdef ENABLE_UI_TEST + QTest::qExec(&app, argc, argv); +#endif + + QTEST_SET_MAIN_SOURCE_PATH + + return ret; +} diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_dbusmanager_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_dbusmanager_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_dbusmanager_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_dbusmanager_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_dbusmanager_test.h" +#include "dbusmanager.h" + +#include + +UT_Dbusmanager_Test::UT_Dbusmanager_Test() +{ + m_pDbusManager = new DBusManager(); + m_pDbusManager->initDBus(); +} + +UT_Dbusmanager_Test::~UT_Dbusmanager_Test() +{ + delete m_pDbusManager; +} + +#ifdef UT_DBUSMANAGER_TEST + +//设置桌面索引 +TEST_F(UT_Dbusmanager_Test, callKDECurrentDesktopIndex) +{ + m_pDbusManager->callKDESetCurrentDesktop(1); +} + +//获取字体 标准字体 +TEST_F(UT_Dbusmanager_Test, standardfont) +{ + m_pDbusManager->callAppearanceFont("standardfont"); +} + +//获取字体 等宽字体 +TEST_F(UT_Dbusmanager_Test, monospacefont) +{ + m_pDbusManager->callAppearanceFont("monospacefont"); +} + +//获取字体,其他错误字体 +TEST_F(UT_Dbusmanager_Test, otherfailfont) +{ + QStringList lstFont = m_pDbusManager->callAppearanceFont("otherfailfont"); + EXPECT_EQ(lstFont.size(), 0); +} + +//唤醒终端 +TEST_F(UT_Dbusmanager_Test, callTerminal) +{ + m_pDbusManager->callTerminalEntry({"deepin-terminal", "-C", "void_script"}); +} + + +//Json转为 QStringList +TEST_F(UT_Dbusmanager_Test, converToList) +{ + QJsonArray array = { 1, 2.2, QString() }; + DBusManager::converToList("type", array); +} + +TEST_F(UT_Dbusmanager_Test, listenTouchPadSignal) +{ + m_pDbusManager->listenTouchPadSignal(); +} + +TEST_F(UT_Dbusmanager_Test, listenDesktopSwitched) +{ + m_pDbusManager->listenDesktopSwitched(); +} + +#endif + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_dbusmanager_test.h deepin-terminal-5.4.13/tests/src/main/ut_dbusmanager_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_dbusmanager_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_dbusmanager_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_DBUSMANAGER_TEST_H +#define UT_DBUSMANAGER_TEST_H + +#include "ut_defines.h" + +#include + +class DBusManager; +class UT_Dbusmanager_Test: public ::testing::Test +{ +public: + UT_Dbusmanager_Test(); + ~UT_Dbusmanager_Test(); +private: + DBusManager *m_pDbusManager; +}; + + + +#endif//UT_DBUSMANAGER_TEST_H + + + + + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_mainwindow_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_mainwindow_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_mainwindow_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_mainwindow_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1278 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_mainwindow_test.h" + +#include "service.h" +#include "mainwindow.h" +#include "tabbar.h" +#include "termwidget.h" +#include "termwidget.h" +#include "../stub.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include + + +UT_SwitchThemeMenu_Test::UT_SwitchThemeMenu_Test() +{ +} + +void UT_SwitchThemeMenu_Test::SetUp() +{ + m_themeMenu = new SwitchThemeMenu("Theme", nullptr); +} + +void UT_SwitchThemeMenu_Test::TearDown() +{ + delete m_themeMenu; +} + +/******************************************************************************* + 1. @函数: SwitchThemeMenu类的函数 + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: SwitchThemeMenu类单元测试 +*******************************************************************************/ +#ifdef UT_SWITCHTHEMEMENU_TEST +TEST_F(UT_SwitchThemeMenu_Test, SwitchThemeMenuTest) +{ + EXPECT_NE(m_themeMenu, nullptr); + m_themeMenu->show(); + + QEvent e(QEvent::None); + m_themeMenu->leaveEvent(&e); + + QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier); + m_themeMenu->keyPressEvent(&keyPress); + + m_themeMenu->enterEvent(&e); + EXPECT_EQ(m_themeMenu->hoveredThemeStr, ""); + + QHideEvent he; + m_themeMenu->hideEvent(&he); + EXPECT_EQ(m_themeMenu->hoveredThemeStr, ""); +} +#endif + + + +UT_MainWindow_Test::UT_MainWindow_Test() +{ +} + +void UT_MainWindow_Test::SetUp() +{ + m_service = Service::instance(); + //Service的init初始化函数只能执行一次,否则会crash + if (!m_service->property("isServiceInit").toBool()) { + m_service->init(); + m_service->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + + m_quakeTermProperty[QuakeMode] = true; + m_quakeWindow = new QuakeWindow(m_quakeTermProperty, nullptr); +} + +void UT_MainWindow_Test::TearDown() +{ + delete m_normalWindow; + delete m_quakeWindow; +} + +#ifdef UT_MAINWINDOW_TEST + +/******************************************************************************* + 1. @函数: QuakeAnimationTest + 2. @作者: ut001000 任飞翔 + 3. @日期: 2020-11-24 + 4. @说明: 测试雷神窗口动画效果UT +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, QuakeAnimationTest) +{ + m_quakeTermProperty[QuakeMode] = true; + QuakeWindow *quakeWindow = new QuakeWindow(m_quakeTermProperty); + quakeWindow->setAnimationFlag(false); + quakeWindow->show(); + quakeWindow->topToBottomAnimation(); + + quakeWindow->bottomToTopAnimation(); + + delete quakeWindow; + quakeWindow = nullptr; +} + +int ut_main_runningTerminalCount() +{ + return 1; +} + +TEST_F(UT_MainWindow_Test, NormalWindowTest) +{ + EXPECT_EQ(MainWindow::m_MinWidth, 450); + EXPECT_EQ(MainWindow::m_MinHeight, 250); + + EXPECT_NE(m_normalWindow, nullptr); + + m_normalWindow->show(); + + EXPECT_GE(m_normalWindow->width(), MainWindow::m_MinWidth); + EXPECT_GE(m_normalWindow->height(), MainWindow::m_MinHeight); + + m_normalWindow->isQuakeMode(); + m_normalWindow->hasRunningProcesses(); + +// Stub stub; +// stub.set(ADDR(TermWidgetPage,runningTerminalCount),ut_main_runningTerminalCount); +// m_normalWindow->hasRunningProcesses(); + + const int tabCount = 5; + for (int i = 0; i < tabCount; i++) { + m_normalWindow->addTab(m_normalTermProperty); + } + TabBar *tabBar = m_normalWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + //窗口默认启动就自带了1个tab,所以这里加1 + EXPECT_EQ(tabBar->count(), tabCount + 1); + + QString firstTabId = tabBar->identifier(0); + m_normalWindow->closeTab(firstTabId); + + EXPECT_EQ(tabBar->count(), tabCount); + + TermWidgetPage *currPage = m_normalWindow->currentPage(); + EXPECT_NE(currPage, nullptr); + TermWidget *currTerm = currPage->currentTerminal(); + EXPECT_NE(currTerm, nullptr); + + Service::instance()->showSettingDialog(m_normalWindow); + m_service->showHideOpacityAndBlurOptions(true); + +#ifdef ENABLE_UI_TEST + //只有在开启UI测试的模式下,才能判断焦点 + currTerm->hasFocus(); +#endif +} + +TEST_F(UT_MainWindow_Test, closeOtherTab) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + QString firstTabId = tabBar->identifier(0); + m_normalWindow->closeOtherTab(firstTabId); + EXPECT_EQ(tabBar->count(), 1); +} + +TEST_F(UT_MainWindow_Test, getCurrTabTitle) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + QString firstTabId = tabBar->identifier(0); + + QString strTabTitle = "Test Title"; + tabBar->setTabText(firstTabId, strTabTitle); + QString currTabTitle = m_normalWindow->getCurrTabTitle(); + EXPECT_EQ(currTabTitle, strTabTitle); +} + +TEST_F(UT_MainWindow_Test, isFocusOnList) +{ + bool isFocusOnList = m_normalWindow->isFocusOnList(); + EXPECT_EQ(isFocusOnList, true); +} + +TEST_F(UT_MainWindow_Test, focusPage) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + QString firstTabId = tabBar->identifier(0); + + m_normalWindow->focusPage(firstTabId); + TermWidgetPage *tabPage = m_normalWindow->getPageByIdentifier(firstTabId); + EXPECT_NE(tabPage, nullptr); + + //#ifdef ENABLE_UI_TEST + // QTest::qWait(UT_WAIT_TIME); + // //只有在开启UI测试的模式下,才能判断焦点 + // EXPECT_EQ(tabPage->currentTerminal()->hasFocus(), true); + //#endif +} + + +TEST_F(UT_MainWindow_Test, focusCurrentPage) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + m_normalWindow->focusCurrentPage(); + QString firstTabId = tabBar->identifier(0); + + m_normalWindow->focusPage(firstTabId); + TermWidgetPage *tabPage = m_normalWindow->getPageByIdentifier(firstTabId); + EXPECT_NE(tabPage, nullptr); + + //#ifdef ENABLE_UI_TEST + // QTest::qWait(UT_WAIT_TIME); + // //只有在开启UI测试的模式下,才能判断焦点 + // EXPECT_EQ(tabPage->currentTerminal()->hasFocus(), true); + //#endif +} + +TEST_F(UT_MainWindow_Test, showPlugin) +{ + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND); + EXPECT_EQ(m_normalWindow->m_CurrentShowPlugin, QString(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND)); +} + + +TEST_F(UT_MainWindow_Test, hidePlugin) +{ + m_normalWindow->hidePlugin(); + EXPECT_EQ(m_normalWindow->m_CurrentShowPlugin, QString(MainWindow::PLUGIN_TYPE_NONE)); +} + +TEST_F(UT_MainWindow_Test, selectedText) +{ + QString selectedText = m_normalWindow->selectedText(); + + EXPECT_EQ(selectedText.length(), 0); +} + +TEST_F(UT_MainWindow_Test, createNewTab) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + m_normalWindow->createNewTab(); + EXPECT_EQ(tabBar->count(), 2); +} + +TEST_F(UT_MainWindow_Test, closeAllTab) +{ + TabBar *tabBar = m_normalWindow->m_tabbar; + m_normalWindow->closeAllTab(); + EXPECT_EQ(tabBar->count(), 0); +} + +TEST_F(UT_MainWindow_Test, createJsonGroup) +{ + QJsonArray jsonGroups; + m_normalWindow->createJsonGroup("terminal", jsonGroups); + m_normalWindow->createJsonGroup("workspace", jsonGroups); + m_normalWindow->createJsonGroup("advanced", jsonGroups); +} + +TEST_F(UT_MainWindow_Test, QuakeWindowTest) +{ + EXPECT_NE(m_quakeWindow, nullptr); + + m_quakeWindow->show(); + + int desktopWidth = QApplication::desktop()->availableGeometry().width(); + EXPECT_EQ(m_quakeWindow->width(), desktopWidth); + EXPECT_GE(m_quakeWindow->height(), 0); + + EXPECT_EQ(m_quakeWindow->isQuakeMode(), true); + EXPECT_EQ(m_quakeWindow->hasRunningProcesses(), false); + + const int tabCount = 5; + for (int i = 0; i < tabCount; i++) { + m_quakeWindow->addTab(m_normalTermProperty); + } + TabBar *tabBar = m_quakeWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + //窗口默认启动就自带了1个tab,所以这里加1 + EXPECT_EQ(tabBar->count(), tabCount + 1); + + QString firstTabId = tabBar->identifier(0); + m_quakeWindow->closeTab(firstTabId); + + QString lastTabId = tabBar->identifier(tabBar->count() - 1); + m_quakeWindow->closeTab(lastTabId); +} + +TEST_F(UT_MainWindow_Test, quake_closeOtherTab) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + QString firstTabId = tabBar->identifier(0); + m_quakeWindow->closeOtherTab(firstTabId); + EXPECT_EQ(tabBar->count(), 1); +} + +TEST_F(UT_MainWindow_Test, quake_getCurrTabTitle) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + QString firstTabId = tabBar->identifier(0); + + QString strTabTitle = "Test Title"; + tabBar->setTabText(firstTabId, strTabTitle); + QString currTabTitle = m_quakeWindow->getCurrTabTitle(); + EXPECT_EQ(currTabTitle, strTabTitle); +} + +TEST_F(UT_MainWindow_Test, quake_isFocusOnList) +{ + bool isFocusOnList = m_quakeWindow->isFocusOnList(); + EXPECT_EQ(isFocusOnList, true); +} + +TEST_F(UT_MainWindow_Test, quake_focusPage) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + QString firstTabId = tabBar->identifier(0); + + m_quakeWindow->focusPage(firstTabId); + TermWidgetPage *tabPage = m_quakeWindow->getPageByIdentifier(firstTabId); + EXPECT_NE(tabPage, nullptr); + + //#ifdef ENABLE_UI_TEST + // QTest::qWait(UT_WAIT_TIME); + // //只有在开启UI测试的模式下,才能判断焦点 + // EXPECT_EQ(tabPage->currentTerminal()->hasFocus(), true); + //#endif +} + +TEST_F(UT_MainWindow_Test, quake_focusCurrentPage) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + m_quakeWindow->focusCurrentPage(); + QString firstTabId = tabBar->identifier(0); + + m_quakeWindow->focusPage(firstTabId); + TermWidgetPage *tabPage = m_quakeWindow->getPageByIdentifier(firstTabId); + EXPECT_NE(tabPage, nullptr); + + //#ifdef ENABLE_UI_TEST + // QTest::qWait(UT_WAIT_TIME); + // //只有在开启UI测试的模式下,才能判断焦点 + // EXPECT_EQ(tabPage->currentTerminal()->hasFocus(), true); + //#endif +} + +TEST_F(UT_MainWindow_Test, quake_showPlugin) +{ + m_quakeWindow->showPlugin(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND); + EXPECT_EQ(m_quakeWindow->m_CurrentShowPlugin, QString(MainWindow::PLUGIN_TYPE_CUSTOMCOMMAND)); +} + + +TEST_F(UT_MainWindow_Test, quake_hidePlugin) +{ + m_quakeWindow->hidePlugin(); + EXPECT_EQ(m_quakeWindow->m_CurrentShowPlugin, QString(MainWindow::PLUGIN_TYPE_NONE)); +} + +TEST_F(UT_MainWindow_Test, quake_selectedText) +{ + QString selectedText = m_quakeWindow->selectedText(); + + EXPECT_EQ(selectedText.length(), 0); +} + +TEST_F(UT_MainWindow_Test, quake_createNewTab) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + m_quakeWindow->createNewTab(); + EXPECT_EQ(tabBar->count(), 2); +} + +TEST_F(UT_MainWindow_Test, quake_closeAllTab) +{ + TabBar *tabBar = m_quakeWindow->m_tabbar; + m_quakeWindow->closeAllTab(); + EXPECT_EQ(tabBar->count(), 0); +} + +TEST_F(UT_MainWindow_Test, displayShortcuts) +{ + m_normalWindow->displayShortcuts(); + m_quakeWindow->displayShortcuts(); +} + +TEST_F(UT_MainWindow_Test, getConfigWindowState) +{ +// m_normalTermProperty[StartWindowState] = "normal"; +// EXPECT_EQ(m_normalWindow->getConfigWindowState(), "window_normal"); +} + +TEST_F(UT_MainWindow_Test, OnHandleCloseType) +{ + m_normalWindow->createNewTab(); + m_normalWindow->createNewTab(); + m_normalWindow->createNewTab(); + + m_normalWindow->OnHandleCloseType(0, Utils::CloseType::CloseType_Window); + + m_normalWindow->OnHandleCloseType(1, Utils::CloseType::CloseType_Tab); + m_normalWindow->OnHandleCloseType(1, Utils::CloseType::CloseType_OtherTab); + m_normalWindow->OnHandleCloseType(1, Utils::CloseType::CloseType_Window); +} + +TEST_F(UT_MainWindow_Test, onWindowSettingChanged) +{ + m_normalWindow->onWindowSettingChanged("advanced.window.blurred_background"); + + m_normalWindow->onWindowSettingChanged("advanced.window.use_on_starting"); + + m_normalWindow->onWindowSettingChanged("advanced.window.auto_hide_raytheon_window"); +} + +bool ut_isTabVisited() +{ + return true; +} + +TEST_F(UT_MainWindow_Test, onTermIsIdle) +{ + TermWidgetPage *currPage = m_normalWindow->currentPage(); + Stub stub; + stub.set(ADDR(MainWindow,isTabVisited),ut_isTabVisited); + m_normalWindow->onTermIsIdle(currPage->identifier(), true); + + m_normalWindow->onTermIsIdle(currPage->identifier(), false); +} + +TEST_F(UT_MainWindow_Test, showExitConfirmDialog) +{ +#ifdef ENABLE_UI_TEST + //要自己退出,否则对话框窗口会一直阻塞 + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + qApp->exit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + m_normalWindow->createNewTab(); + m_normalWindow->showExitConfirmDialog(Utils::CloseType::CloseType_Tab, 1, m_normalWindow); + +#endif +} + +/******************************************************************************* + 1. @函数: checkThemeItem + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: checkThemeItem函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, checkExtendThemeItemTest) +{ + QAction *pAction = nullptr; + m_normalWindow->checkExtendThemeItem("Theme1", pAction); + EXPECT_EQ(m_normalWindow->themeOneAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme2", pAction); + EXPECT_EQ(m_normalWindow->themeTwoAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme3", pAction); + EXPECT_EQ(m_normalWindow->themeThreeAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme4", pAction); + EXPECT_EQ(m_normalWindow->themeFourAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme5", pAction); + EXPECT_EQ(m_normalWindow->themeFiveAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme6", pAction); + EXPECT_EQ(m_normalWindow->themeSixAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme7", pAction); + EXPECT_EQ(m_normalWindow->themeSevenAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme8", pAction); + EXPECT_EQ(m_normalWindow->themeEightAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme9", pAction); + EXPECT_EQ(m_normalWindow->themeNineAction, pAction); + + m_normalWindow->checkExtendThemeItem("Theme10", pAction); + EXPECT_EQ(m_normalWindow->themeTenAction, pAction); +} + +/******************************************************************************* + 1. @函数: checkThemeItem + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: checkThemeItem函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, checkThemeItemTest) +{ + m_normalWindow->checkThemeItem(); + EXPECT_NE(m_normalWindow->currCheckThemeAction, nullptr); +} + +/******************************************************************************* + 1. @函数: switchThemeAction + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: switchThemeAction函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, switchThemeActionTest) +{ + QAction *pAction = m_normalWindow->themeOneAction; + QString themeNameStr = "Theme1"; + m_normalWindow->switchThemeAction(pAction, themeNameStr); + //EXPECT_EQ(Settings::instance()->extendThemeStr, "Theme1"); + + pAction = m_normalWindow->themeNineAction; + themeNameStr = "Theme9"; + m_normalWindow->switchThemeAction(pAction, themeNameStr); + //EXPECT_EQ(Settings::instance()->extendThemeStr, "Theme9"); +} + +/******************************************************************************* + 1. @函数: switchThemeAction + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: switchThemeAction函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, switchThemeActionTestOne) +{ + QAction *pAction = m_normalWindow->lightThemeAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->darkThemeAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->autoThemeAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeOneAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeTwoAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeThreeAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeFourAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeFiveAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeSixAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeSevenAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeEightAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeNineAction; + m_normalWindow->switchThemeAction(pAction); + + pAction = m_normalWindow->themeTenAction; + m_normalWindow->switchThemeAction(pAction); +} + +/******************************************************************************* + 1. @函数: setThemeCheckItemSlot + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: setThemeCheckItemSlot函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, setThemeCheckItemSlotTest) +{ + Settings::instance()->themeStr = "Light"; + Settings::instance()->extendThemeStr = ""; + m_normalWindow->setThemeCheckItemSlot(); + + Settings::instance()->themeStr = "Dark"; + Settings::instance()->extendThemeStr = ""; + m_normalWindow->setThemeCheckItemSlot(); + + m_normalWindow->autoThemeAction->setChecked(true); + m_normalWindow->setThemeCheckItemSlot(); + + m_normalWindow->autoThemeAction->setChecked(false); + + Settings::instance()->extendThemeStr = "Theme1"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme2"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme3"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme4"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme5"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme6"; + m_normalWindow->setThemeCheckItemSlot(); + Settings::instance()->extendThemeStr = "Theme7"; + m_normalWindow->setThemeCheckItemSlot(); + + Settings::instance()->extendThemeStr = "Theme9"; + m_normalWindow->setThemeCheckItemSlot(); +} + +/******************************************************************************* + 1. @函数: menuHideSetThemeSlot + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: menuHideSetThemeSlot函数单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, menuHideSetThemeSlotTest) +{ + m_normalWindow->currCheckThemeAction = m_normalWindow->lightThemeAction; + m_normalWindow->menuHideSetThemeSlot(); + + m_normalWindow->currCheckThemeAction = m_normalWindow->darkThemeAction; + m_normalWindow->menuHideSetThemeSlot(); + + m_normalWindow->currCheckThemeAction = m_normalWindow->autoThemeAction; + m_normalWindow->menuHideSetThemeSlot(); + + m_normalWindow->currCheckThemeAction = m_normalWindow->themeOneAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeTwoAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeThreeAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeFourAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeFiveAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeSixAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeSevenAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeEightAction; + m_normalWindow->menuHideSetThemeSlot(); + + m_normalWindow->currCheckThemeAction = m_normalWindow->themeNineAction; + m_normalWindow->menuHideSetThemeSlot(); + m_normalWindow->currCheckThemeAction = m_normalWindow->themeTenAction; + m_normalWindow->menuHideSetThemeSlot(); +} + +/******************************************************************************* + 1. @函数: dragDropTabTest + 2. @作者: ut000438 王亮 + 3. @日期: 2020-11-20 + 4. @说明: tab标签拖拽单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, clickTabTest) +{ + EXPECT_NE(m_normalWindow, nullptr); + + m_normalWindow->show(); + + const int tabCount = 5; + for (int i = 0; i < tabCount; i++) { + m_normalWindow->addTab(m_normalTermProperty); + } + TabBar *tabBar = m_normalWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + + QTest::mouseClick(tabBar, Qt::LeftButton, Qt::NoModifier, QPoint(50, 10), UT_WAIT_TIME); + + QTest::mouseClick(tabBar, Qt::LeftButton, Qt::NoModifier, QPoint(100, 10), UT_WAIT_TIME); + + QTest::mouseClick(tabBar, Qt::LeftButton, Qt::NoModifier, QPoint(200, 10), UT_WAIT_TIME); +} + +/******************************************************************************* + 1. @函数: hasRunningProcesses + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-13 + 4. @说明: 是否有程序正在运行 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, hasRunningProcesses) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->show(); + // 此时没有正在执行的程序 + EXPECT_EQ(mainWindow->hasRunningProcesses(), false); + + // 发送数据 + mainWindow->currentPage()->sendTextToCurrentTerm("ping 127.0.0.1\n"); + bool running = mainWindow->hasRunningProcesses(); + qDebug() << "has running process :" << running; + // EXPECT_EQ(running, true); + delete mainWindow; +} + +TEST_F(UT_MainWindow_Test, initPlugins) +{ + // 新建一个mainWindow + + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->initTabBar(); + emit mainWindow->m_tabbar->tabBarClicked(1, ""); + emit mainWindow->m_tabbar->tabAddRequested(); + emit mainWindow->m_tabbar->tabCloseRequested(1); + emit mainWindow->m_tabbar->menuCloseTab(""); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutBuiltinCopy单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutBuiltinCopy) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutBuiltinCopy(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutBuiltinPaste单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutBuiltinPaste) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutBuiltinPaste(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutFocusOut单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutFocusOut) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutFocusOut(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutVerticalSplit单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutVerticalSplit) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutVerticalSplit(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutHorizonzalSplit单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutHorizonzalSplit) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutHorizonzalSplit(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutNextTab单元测试 +*******************************************************************************/ + +bool ut_main_hasRunningProcess() +{ + return false; +} + +bool ut_main_isTabChangeColor() +{ + return true; +} + +TEST_F(UT_MainWindow_Test, slotShortcutNextTab) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + + const int tabCount = 3; + for (int i = 0; i < tabCount; i++) { + mainWindow->addTab(m_normalTermProperty); + } + + TabBar *tabBar = mainWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + + Stub stub; + stub.set(ADDR(TermWidget,hasRunningProcess),ut_main_hasRunningProcess); + stub.set(ADDR(MainWindow,isTabChangeColor),ut_main_isTabChangeColor); + mainWindow->slotTabBarClicked(0, tabBar->identifier(0)); + + mainWindow->slotShortcutNextTab(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutPreviousTab单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutPreviousTab) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + + const int tabCount = 3; + for (int i = 0; i < tabCount; i++) { + mainWindow->addTab(m_normalTermProperty); + } + + TabBar *tabBar = mainWindow->m_tabbar; + EXPECT_NE(tabBar, nullptr); + + mainWindow->slotTabBarClicked(1, tabBar->identifier(0)); + + mainWindow->slotShortcutPreviousTab(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutSwitchFullScreen单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutSwitchFullScreen) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutSwitchFullScreen(); + delete mainWindow; +} + +TEST_F(UT_MainWindow_Test, slotTabAddRequested) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->m_ReferedAppStartTime = 1; + mainWindow->slotTabAddRequested(); + mainWindow->slotTabCloseRequested(1); + mainWindow->slotMenuCloseOtherTab("/"); +// mainWindow->slotShowRenameTabDialog("name"); +// mainWindow->slotClickNewWindowTimeout(); + delete mainWindow; +} + +int ut_widgetCount() +{ + return 200; +} + +TEST_F(UT_MainWindow_Test, slotFileChanged) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotFileChanged(); + mainWindow->singleFlagMove(); + + Stub stub; + stub.set(ADDR(WindowsManager,widgetCount),ut_widgetCount); + + mainWindow->beginAddTab(); + delete mainWindow; +} + +bool ut_beginAddTab() +{ + return true; +} + +TEST_F(UT_MainWindow_Test, addTabWithTermPage) +{ + // 新建一个mainWindow + Stub stub; + stub.set(ADDR(MainWindow,beginAddTab),ut_beginAddTab); + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + TermWidgetPage *currPage = m_normalWindow->currentPage(); + mainWindow->addTabWithTermPage("name",true,false,currPage,-1); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutCloseOtherTabs单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutCloseOtherTabs) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + + const int tabCount = 3; + for (int i = 0; i < tabCount; i++) { + mainWindow->addTab(m_normalTermProperty); + } + + mainWindow->slotShortcutCloseOtherTabs(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutCloseTab单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutCloseTab) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutCloseTab(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutNewTab单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutNewTab) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutNewTab(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutPaste单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutPaste) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutPaste(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutCopy单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutCopy) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutCopy(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutZoomIn单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutZoomIn) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutZoomIn(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutZoomOut单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutZoomOut) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutZoomOut(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutCloseWorkspace单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutCloseWorkspace) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutCloseWorkspace(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutSelectLowerWorkspace单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutSelectLowerWorkspace) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutSelectLowerWorkspace(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutSelectLeftWorkspace单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutSelectLeftWorkspace) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutSelectLeftWorkspace(); + delete mainWindow; +} + +QString ut_getConfigWindowState() +{ + return "window_maximum"; +} + +QString ut_getConfigWindowState1() +{ + return "fullscreen"; +} + +QString ut_getConfigWindowState2() +{ + return "split_screen"; +} + +QString ut_getConfigWindowState3() +{ + return "window"; +} + +TEST_F(UT_MainWindow_Test, initWindowAttribute) +{ + // 新建一个mainWindow +// MainWindow *mainWindow = new NormalWindow(TermProperties("/")); +//// mainWindow->slotDDialogFinished(0); +// Stub stub; +// stub.set(ADDR(MainWindow,getConfigWindowState),ut_getConfigWindowState); +// mainWindow->initWindowAttribute(); +// stub.set(ADDR(MainWindow,getConfigWindowState),ut_getConfigWindowState1); +// mainWindow->initWindowAttribute(); +// stub.set(ADDR(MainWindow,getConfigWindowState),ut_getConfigWindowState2); +// mainWindow->initWindowAttribute(); +// stub.set(ADDR(MainWindow,getConfigWindowState),ut_getConfigWindowState3); +// mainWindow->initWindowAttribute(); +// delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-25 + 4. @说明: slotShortcutSelectRightWorkspace单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutSelectRightWorkspace) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutSelectRightWorkspace(); + delete mainWindow; +} + +bool ut_isTabChangeColor() +{ + return true; +} + +TEST_F(UT_MainWindow_Test, updateTabStatus) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + Stub stub; + stub.set(ADDR(TermWidget,hasRunningProcess),ut_main_hasRunningProcess); + stub.set(ADDR(MainWindow,isTabVisited),ut_isTabVisited); + stub.set(ADDR(MainWindow,isTabChangeColor),ut_isTabChangeColor); + mainWindow->updateTabStatus(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2021-2-22 + 4. @说明: slotShortcutSelectAll单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutSelectAll) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutSelectAll(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2021-2-22 + 4. @说明: slotShortcutCustomCommand单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutCustomCommand) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutCustomCommand(); + delete mainWindow; +} + +/******************************************************************************* + 1. @函数: MainWindow类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2021-2-22 + 4. @说明: slotShortcutRemoteManage单元测试 +*******************************************************************************/ +TEST_F(UT_MainWindow_Test, slotShortcutRemoteManage) +{ + // 新建一个mainWindow + MainWindow *mainWindow = new NormalWindow(TermProperties("/")); + mainWindow->slotShortcutRemoteManage(); + delete mainWindow; +} + +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, slotOptionButtonPressed) +{ + NormalWindow(TermProperties("/")).slotOptionButtonPressed(); +} + +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, slotClickNewWindowTimeout) +{ + qCritical()<< "会导致无限循环"; + //NormalWindow(TermProperties("/")).slotClickNewWindowTimeout(); +} +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, slotShortcutSwitchActivated) +{ + qCritical()<< "会导致崩溃"; + // NormalWindow(TermProperties("/")).slotShortcutSwitchActivated(); +} + +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, slotShortcutSelectUpperWorkspace) +{ + NormalWindow(TermProperties("/")).slotShortcutSelectUpperWorkspace(); +} + +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, slotShortcutFind) +{ + NormalWindow(TermProperties("/")).slotShortcutFind(); +} + +//调用一个新的进程,开启终端 +TEST_F(UT_MainWindow_Test, onCreateNewWindow) +{ + qCritical()<< "会导致无限循环"; + // NormalWindow(TermProperties("/")).onCreateNewWindow("/"); +} + +//MainWindow类的函数 +TEST_F(UT_MainWindow_Test, onShortcutSettingChanged) +{ + // NormalWindow w(TermProperties("/")); + //w.m_builtInShortcut["Ctrl+O"] = new QShortcut(QKeySequence("Ctrl+O"), &w); + //w.onShortcutSettingChanged("Ctrl+O"); +} + +TEST_F(UT_MainWindow_Test, onCommandActionTriggered) +{ + NormalWindow(TermProperties("/")).onCommandActionTriggered(); +} + +TEST_F(UT_MainWindow_Test, pressCtrlAt) +{ + NormalWindow(TermProperties("/")).pressCtrlAt(); +} + +TEST_F(UT_MainWindow_Test, pressEnterKey) +{ + NormalWindow(TermProperties("/")).pressEnterKey(""); +} + +TEST_F(UT_MainWindow_Test, pressCtrlU) +{ + NormalWindow(TermProperties("/")).pressCtrlU(); +} + +TEST_F(UT_MainWindow_Test, sleep) +{ + NormalWindow(TermProperties("/")).sleep(100); +} + +TEST_F(UT_MainWindow_Test, slotWorkAreaResized) +{ + TermProperties arg("/"); + arg[QuakeMode] = true; + QuakeWindow(arg).slotWorkAreaResized(); +} + + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_mainwindow_test.h deepin-terminal-5.4.13/tests/src/main/ut_mainwindow_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_mainwindow_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_mainwindow_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_MAINWINDOW_TEST_H +#define UT_MAINWINDOW_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class Service; +class MainWindow; +class SwitchThemeMenu; + +/******************************************************************************* + 1. @类名: SwitchThemeMenu + 2. @作者: ut000125 sunchengxi + 3. @日期: 2020-11-05 + 4. @说明: 主题菜单的快捷键项在鼠标离开悬浮时,触发主题还原测试类 +*******************************************************************************/ +class UT_SwitchThemeMenu_Test : public ::testing::Test +{ +public: + UT_SwitchThemeMenu_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + + SwitchThemeMenu *m_themeMenu = nullptr; +}; + + +class UT_MainWindow_Test : public ::testing::Test +{ +public: + UT_MainWindow_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + Service *m_service = nullptr; + + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + //雷神窗口 + MainWindow *m_quakeWindow = nullptr; + + TermProperties m_normalTermProperty; + TermProperties m_quakeTermProperty; +}; + +#endif // UT_MAINWINDOW_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_service_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_service_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_service_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_service_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,422 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_service_test.h" + +#include "service.h" +#include "mainwindow.h" +#include "windowsmanager.h" +#include "dbusmanager.h" +#include "utils.h" +#include "customthemesettingdialog.h" +#include "../stub.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include + +#include +#include + +#define DELETE_PTR(ptr) \ + if(ptr) {\ + delete ptr;\ + ptr = nullptr;\ + } + + +UT_Service_Test::UT_Service_Test() +{ +} + +void UT_Service_Test::SetUp() +{ + m_service = Service::instance(); + m_service->m_settingOwner = new NormalWindow(TermProperties()); + m_service->m_settingShortcutConflictDialog = new DDialog; + m_service->m_customThemeSettingDialog = new CustomThemeSettingDialog; + if (!m_service->property("isServiceInit").toBool()) { + m_service->setProperty("isServiceInit", true); + } +} + +void UT_Service_Test::TearDown() +{ +} + +static bool ut_dtk_managerhelper_hasComposite() +{ + return false; +} + +static int ut_dbus_type() +{ + return QDBusMessage::InvalidMessage; +} + +static void ui_dialog_show() +{ + +} + +#ifdef UT_SERVICE_TEST + + +TEST_F(UT_Service_Test, listenWindowEffectSwitcher) +{ + m_service->listenWindowEffectSwitcher(); + + QSignalSpy spyWinEffectEnable(Service::instance(), SIGNAL(Service::onWindowEffectEnabled(bool))); + EXPECT_EQ(spyWinEffectEnable.count(), 0); + + { + Stub stub; + stub.set(ADDR(QDBusMessage,type),ut_dbus_type); + m_service->isWindowEffectEnabled(); + } + bool isWindowEffectEnabled = m_service->isWindowEffectEnabled(); + if (isWindowEffectEnabled) { +#ifdef ENABLE_UI_TEST + // 模拟自动关闭窗口特效 + // QTest::qWait(UT_WAIT_TIME); + // EXPECT_EQ(m_service->isWindowEffectEnabled(), false); + // EXPECT_EQ(spyWinEffectEnable.count(), 1); +#endif + } else { +#ifdef ENABLE_UI_TEST + // 模拟自动开启窗口特效 + // QTest::qWait(UT_WAIT_TIME); + // EXPECT_EQ(m_service->isWindowEffectEnabled(), false); + // EXPECT_EQ(spyWinEffectEnable.count(), 1); +#endif + } +} + +TEST_F(UT_Service_Test, slotCustomThemeSettingDialogFinished) +{ + m_service->slotCustomThemeSettingDialogFinished(QDialog::Accepted); +} + +int ut_window_widgetCount() +{ + return 200; +} + +TEST_F(UT_Service_Test, EntryTerminal) +{ + Stub stub; + stub.set(ADDR(WindowsManager,widgetCount),ut_window_widgetCount); + m_service->EntryTerminal(QStringList() << "1" << "2",true); +} + +TEST_F(UT_Service_Test, isCountEnable) +{ + bool isCountEnable = m_service->isCountEnable(); + EXPECT_EQ(isCountEnable, true); +} + +TEST_F(UT_Service_Test, getsetIsDialogShow) +{ + EXPECT_EQ(m_service->getIsDialogShow(), false); + if(nullptr == WindowsManager::instance()->m_quakeWindow) { + TermProperties properties; + Utils::parseCommandLine({"deepin-terminal", "--quake-mode"}, properties); + WindowsManager::instance()->m_quakeWindow = new QuakeWindow(properties); + } + + m_service->setIsDialogShow(WindowsManager::instance()->getQuakeWindow(), true); +} + +TEST_F(UT_Service_Test, getEntryTime) +{ + qint64 entyTime = m_service->getEntryTime(); + EXPECT_GE(entyTime, 0); +} + +TEST_F(UT_Service_Test, showHideOpacityAndBlurOptions) +{ + m_service->m_settingDialog = new DSettingsDialog(); + m_service->m_settingDialog->widgetFactory()->registerWidget("fontcombobox", Settings::createFontComBoBoxHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("slider", Settings::createCustomSliderHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("spinbutton", Settings::createSpinButtonHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("shortcut", Settings::createShortcutEditOptionHandle); + + m_service->m_settingDialog->updateSettings(Settings::instance()->settings); + m_service->m_settingDialog->setWindowModality(Qt::NonModal); + m_service->m_settingDialog->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint); + + m_service->m_settingDialog->show(); + + m_service->showHideOpacityAndBlurOptions(true); + m_service->showHideOpacityAndBlurOptions(false); + + { + QWidget *rightFrame = m_service->m_settingDialog->findChild("RightFrame"); + if(rightFrame){ + rightFrame->setObjectName("RightFrame1"); + m_service->showHideOpacityAndBlurOptions(true); + rightFrame->setObjectName("RightFrame"); + } + } + + m_service->m_settingDialog->close(); +} + +TEST_F(UT_Service_Test, isSettingDialogVisible) +{ + m_service->m_settingDialog = new DSettingsDialog(); + m_service->m_settingDialog->widgetFactory()->registerWidget("fontcombobox", Settings::createFontComBoBoxHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("slider", Settings::createCustomSliderHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("spinbutton", Settings::createSpinButtonHandle); + m_service->m_settingDialog->widgetFactory()->registerWidget("shortcut", Settings::createShortcutEditOptionHandle); + + m_service->m_settingDialog->updateSettings(Settings::instance()->settings); + m_service->m_settingDialog->setWindowModality(Qt::NonModal); + m_service->m_settingDialog->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint); + + m_service->m_settingDialog->show(); + EXPECT_EQ(m_service->isSettingDialogVisible(), true); + + m_service->m_settingDialog->close(); +} + +/******************************************************************************* + 1. @函数: init + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-04 + 4. @说明: 初始化设置框 +*******************************************************************************/ +TEST_F(UT_Service_Test, initSetting) +{ + DELETE_PTR(m_service->m_settingDialog); + // 初始化设置框 + m_service->initSetting(); + + DELETE_PTR(m_service->m_settingDialog); + // 初始化设置框 + Stub stub; + stub.set(ADDR(DWindowManagerHelper,hasComposite),ut_dtk_managerhelper_hasComposite); + m_service->initSetting(); + + // 判断设置框是否被初始化 + EXPECT_NE(m_service->m_settingDialog, nullptr); + // 获取刚刚生成的dialog + DSettingsDialog *settingDialog = m_service->m_settingDialog; + // 再次初始化 + m_service->initSetting(); + // 若已经初始化过,此时指针不变 + EXPECT_NE(m_service->m_settingDialog, nullptr); + EXPECT_EQ(m_service->m_settingDialog, settingDialog); +} + +/******************************************************************************* + 1. @函数: getShells + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-04 + 4. @说明: 获取可获取的shell名称和地址 +*******************************************************************************/ +TEST_F(UT_Service_Test, getShells) +{ + // 获取shell列表 + QMap shellMap = m_service->getShells(); + // 正常情况下若没有shell终端无法打开,所以map不为空 + EXPECT_EQ(shellMap.isEmpty(), false); + // 且m_shellsMap需要被赋值,内容不为空 + EXPECT_EQ(m_service->m_shellsMap.isEmpty(), false); +} + +/******************************************************************************* + 1. @函数: shellsMap + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-04 + 4. @说明: 获取当前的shellMap +*******************************************************************************/ +TEST_F(UT_Service_Test, shellsMap) +{ + // 清空map + m_service->m_shellsMap.clear(); + // 获取时候,应该是空的 + EXPECT_EQ(m_service->shellsMap().isEmpty(), true); + // 获取数据 + m_service->getShells(); + // 内容不为空 + EXPECT_EQ(m_service->shellsMap().isEmpty(), false); +} + +/******************************************************************************* + 1. @函数: Entry + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-04 + 4. @说明: Service进入接口 +*******************************************************************************/ +TEST_F(UT_Service_Test, Entry) +{ + // -q进入,启动雷神窗口 + m_service->Entry(QStringList() << "deepin-terminal" << "-q"); + // 雷神窗口不为空 + EXPECT_NE(WindowsManager::instance()->getQuakeWindow(), nullptr); + // 不带参数进入,启动普通窗口 + // 获取窗口数量 + int widgetCount = WindowsManager::instance()->widgetCount(); + m_service->Entry(QStringList() << ""); + EXPECT_EQ(WindowsManager::instance()->widgetCount(), widgetCount + 1); +} + +/******************************************************************************* + 1. @函数: isSettingDialogVisible + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 设置框是否显示 +*******************************************************************************/ +TEST_F(UT_Service_Test, isSettingDialogVisible2) +{ + // 此时没有设置窗口新建,应该得到false + EXPECT_EQ(m_service->isSettingDialogVisible(), false); + + // 初始化设置窗口,但是没有show此时应该得到false + m_service->initSetting(); + EXPECT_EQ(m_service->isSettingDialogVisible(), false); + + // 此时显示设置框,应该得到true + m_service->m_settingDialog->show(); + EXPECT_EQ(m_service->isSettingDialogVisible(), true); +} + +/******************************************************************************* + 1. @函数: getSettingOwner + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 验证获取设置框的所有者是否正确 +*******************************************************************************/ +TEST_F(UT_Service_Test, getSettingOwner) +{ + // 未设置时是空 + m_service->m_settingOwner = nullptr; + EXPECT_EQ(m_service->getSettingOwner(), nullptr); + + // 显示设置时会有父类 + MainWindow *window = new NormalWindow(TermProperties("/")); + m_service->showSettingDialog(window); + EXPECT_EQ(m_service->getSettingOwner(), window); + + // 重置设置框所有者 + m_service->resetSettingOwner(); + EXPECT_EQ(m_service->getSettingOwner(), nullptr); + // 删除临时变量 + delete window; +} + +/******************************************************************************* + 1. @函数: resetSettingOwner + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 重置设置框的所有者 +*******************************************************************************/ +TEST_F(UT_Service_Test, resetSettingOwner) +{ + // 显示设置 + MainWindow *window = new NormalWindow(TermProperties("/")); + m_service->m_settingOwner = window; + EXPECT_EQ(m_service->getSettingOwner(), window); + // 重置设置框所有者 + m_service->resetSettingOwner(); + EXPECT_EQ(m_service->getSettingOwner(), nullptr); + // 删除临时变量 + delete window; +} + +/******************************************************************************* + 1. @函数: onDesktopWorkspaceSwitched + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 桌面工作区切换 => 雷神窗口的显隐 +*******************************************************************************/ +TEST_F(UT_Service_Test, onDesktopWorkspaceSwitched) +{ + // 设置当前窗口1 + DBusManager::callKDESetCurrentDesktop(1); + // 关闭雷神 + if (WindowsManager::instance()->getQuakeWindow()) { + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + } + + // 关闭雷神窗口 没有雷神,没有任何影响,程序正常运行 + m_service->onDesktopWorkspaceSwitched(1, 2); + + TermProperties properties; + Utils::parseCommandLine(QStringList() << "deepin-terminal" << "-q", properties); + // 显示雷神 + WindowsManager::instance()->runQuakeWindow(properties); + + // 切换桌面1到桌面2 + m_service->onDesktopWorkspaceSwitched(1, 2); + + // 切换桌面雷神影藏 + EXPECT_EQ(WindowsManager::instance()->getQuakeWindow()->isHidden(), true); + // 切回 + m_service->onDesktopWorkspaceSwitched(2, WindowsManager::instance()->getQuakeWindow()->m_desktopIndex); + + // 雷神显示 + EXPECT_EQ(WindowsManager::instance()->getQuakeWindow()->isVisible(), true); + // 关闭雷神 + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); +} + +TEST_F(UT_Service_Test, slotWMChanged) +{ + m_service->slotWMChanged("deepin wm"); +} + +TEST_F(UT_Service_Test, showShortcutConflictMsgbox) +{ + Stub sub; + sub.set(ADDR(DDialog, show), ui_dialog_show); + + DELETE_PTR(m_service->m_settingShortcutConflictDialog); + m_service->showShortcutConflictMsgbox(ShortcutManager::instance()->m_mapReplaceText.keys().value(0)); + DELETE_PTR(m_service->m_settingShortcutConflictDialog); +} + +TEST_F(UT_Service_Test, slotSettingShortcutConflictDialogFinished) +{ + DELETE_PTR(m_service->m_settingShortcutConflictDialog); + m_service->m_settingShortcutConflictDialog = new DDialog; + m_service->slotSettingShortcutConflictDialogFinished(); + DELETE_PTR(m_service->m_settingShortcutConflictDialog); +} + +TEST_F(UT_Service_Test, hideSettingDialog) +{ + if(nullptr == m_service->m_settingDialog) + m_service->m_settingDialog = new DSettingsDialog(); + m_service->hideSettingDialog(); +} + +TEST_F(UT_Service_Test, showCustomThemeSettingDialog) +{ + +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_service_test.h deepin-terminal-5.4.13/tests/src/main/ut_service_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_service_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_service_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_SERVICE_TEST_H +#define UT_SERVICE_TEST_H + +#include "ut_defines.h" +#include "utils.h" + +#include + +class Service; + +class UT_Service_Test : public ::testing::Test +{ +public: + UT_Service_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +private: + Service *m_service = nullptr; +}; + +#endif // UT_SERVICE_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_terminalapplication_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_terminalapplication_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_terminalapplication_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_terminalapplication_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_terminalapplication_test.h" + +#include "terminalapplication.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include + +UT_TerminalApplication_Test::UT_TerminalApplication_Test() +{ +} + +void UT_TerminalApplication_Test::SetUp() +{ +} + +void UT_TerminalApplication_Test::TearDown() +{ +} + +#ifdef UT_TERMINALAPPLICATION_TEST + +int ut_key() +{ + return Qt::Key_Enter; +} + +TEST_F(UT_TerminalApplication_Test, getsetStartTime) +{ + int argc = 0; + char **argv = nullptr; + TerminalApplication *app = new TerminalApplication(argc, argv); + Stub stub; + stub.set(ADDR(QKeyEvent,key),ut_key); + QtConcurrent::run([ = ]() { + QTimer timer; + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + app->quit(); + }); + + timer.start(1000); + loop->exec(); + + delete loop; + }); + + QTime useTime; + useTime.start(); + qint64 startTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + + app->setStartTime(startTime); + + qint64 getStartTime = app->getStartTime(); + EXPECT_EQ(startTime, getStartTime); + + app->exec(); +} + +TEST_F(UT_TerminalApplication_Test, notify) +{ + int argc = 0; + char **argv = nullptr; + TerminalApplication *app = new TerminalApplication(argc, argv); + + QtConcurrent::run([ = ]() { + QTimer timer; + DKeySequenceEdit* object = new DKeySequenceEdit(); + QEvent *event = new QEvent(QEvent::FocusOut); + + app->notify(object, event); + if (event) { + delete event; + } + timer.setSingleShot(true); + + QEventLoop *loop = new QEventLoop; + QObject::connect(&timer, &QTimer::timeout, [ = ]() { + loop->quit(); + app->quit(); + delete object; + delete loop; + }); + + timer.start(2000); + loop->exec(); + }); + + QTime useTime; + useTime.start(); + qint64 startTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + + app->setStartTime(startTime); + + qint64 getStartTime = app->getStartTime(); + EXPECT_EQ(startTime, getStartTime); + + app->exec(); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_terminalapplication_test.h deepin-terminal-5.4.13/tests/src/main/ut_terminalapplication_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_terminalapplication_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_terminalapplication_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TerminalApplication_Test_H +#define UT_TerminalApplication_Test_H + +#include "ut_defines.h" + +#include + +class Service; +class MainWindow; +class UT_TerminalApplication_Test : public ::testing::Test +{ +public: + UT_TerminalApplication_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_TerminalApplication_Test_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_termproperties_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_termproperties_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_termproperties_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_termproperties_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_termproperties_test.h" + +#include "termproperties.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include + +UT_TermProperties_Test::UT_TermProperties_Test() +{ +} + +void UT_TermProperties_Test::SetUp() +{ +} + +void UT_TermProperties_Test::TearDown() +{ +} + +#ifdef UT_TERMPROPERTIES_TEST + +TEST_F(UT_TermProperties_Test, setWorkingDir) +{ + QString workingDir = ""; + TermProperties tp(workingDir); + workingDir = "/home/uos"; + tp.setWorkingDir(workingDir); + + EXPECT_EQ(tp.m_properties[TermProperty::WorkingDir], workingDir); +} + +TEST_F(UT_TermProperties_Test, contains) +{ + QString workingDir = "/home/uos"; + QString colorScheme = "someColorScheme"; + TermProperties tp(workingDir, colorScheme); + EXPECT_EQ(tp.contains(TermProperty::WorkingDir), true); + EXPECT_EQ(tp.contains(TermProperty::ColorScheme), true); +} + +TEST_F(UT_TermProperties_Test, setTermPropertyMap) +{ + QMap list; + TermProperties tp(list); + QString workingDir = "/home/uos"; + QString colorScheme = "someColorScheme"; + + list.insert(TermProperty::WorkingDir, workingDir); + list.insert(TermProperty::ColorScheme, colorScheme); + + tp.setTermPropertyMap(list); + + EXPECT_EQ(tp.m_properties, list); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_termproperties_test.h deepin-terminal-5.4.13/tests/src/main/ut_termproperties_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_termproperties_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_termproperties_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TERMPROPERTIES_TEST_H +#define UT_TERMPROPERTIES_TEST_H + +#include "ut_defines.h" + +#include + +class UT_TermProperties_Test : public ::testing::Test +{ +public: + UT_TermProperties_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_TERMPROPERTIES_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_windowsmanager_test.cpp deepin-terminal-5.4.13/tests/src/main/ut_windowsmanager_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_windowsmanager_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_windowsmanager_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,239 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_windowsmanager_test.h" +#include "../stub.h" + +#include "service.h" +#include "mainwindow.h" +#include "tabbar.h" +#include "termwidget.h" +#include "windowsmanager.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +UI_WindowsManager_Test::UI_WindowsManager_Test() +{ +} + +void UI_WindowsManager_Test::SetUp() +{ + m_service = Service::instance(); + //Service的init初始化函数只能执行一次,否则会crash + if (!m_service->property("isServiceInit").toBool()) { + m_service->init(); + m_service->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + + m_quakeTermProperty[QuakeMode] = true; +} + +void UI_WindowsManager_Test::TearDown() +{ +} + +static int ut_quakeWindow_getDesktopIndex() +{ + return -1; +} + +static bool ut_service_getIsDialogShow() +{ + return false; +} +static bool ut_service_isSettingDialogVisible() +{ + return true; +} + +static MainWindow* ut_service_getSettingOwner() +{ + WindowsManager::instance()->getQuakeWindow(); +} + +static bool ut_quakeWindow_isActiveWindow() +{ + return true; +} + +#ifdef UI_WINDOWSMANAGER_TEST + +TEST_F(UI_WindowsManager_Test, runQuakeWindow) +{ + WindowsManager *winManager = WindowsManager::instance(); + winManager->runQuakeWindow(m_quakeTermProperty); + EXPECT_EQ((winManager->m_quakeWindow != nullptr), true); +} + +TEST_F(UI_WindowsManager_Test, getQuakeWindow) +{ + WindowsManager *winManager = WindowsManager::instance(); + MainWindow *mainWin = winManager->getQuakeWindow(); + EXPECT_EQ((mainWin != nullptr), true); +} + +TEST_F(UI_WindowsManager_Test, createNormalWindow) +{ + WindowsManager *winManager = WindowsManager::instance(); + winManager->createNormalWindow(m_normalTermProperty); + + if(!WindowsManager::instance()->getNormalWindowList().isEmpty()) + WindowsManager::instance()->onMainwindowClosed(WindowsManager::instance()->getNormalWindowList().last()); + + EXPECT_EQ((winManager->m_normalWindowList.size() > 0), true); +} + +TEST_F(UI_WindowsManager_Test, terminalCountIncrease) +{ + WindowsManager *winManager = WindowsManager::instance(); + int widgetCount = winManager->widgetCount(); + winManager->terminalCountIncrease(); + EXPECT_EQ(winManager->widgetCount(), widgetCount + 1); +} + +TEST_F(UI_WindowsManager_Test, terminalCountReduce) +{ + WindowsManager *winManager = WindowsManager::instance(); + int widgetCount = winManager->widgetCount(); + winManager->terminalCountReduce(); + EXPECT_EQ(winManager->widgetCount(), widgetCount - 1); +} + +/******************************************************************************* + 1. @函数: runQuakeWindow + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-09 + 4. @说明: 运行雷神窗口的显隐测试 +*******************************************************************************/ +TEST_F(UI_WindowsManager_Test, runQuakeWindow2) +{ + // 若雷神还在就关闭 + if (WindowsManager::instance()->getQuakeWindow()) { + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + WindowsManager::instance()->m_quakeWindow = nullptr; + } + + // 启动雷神 + WindowsManager::instance()->runQuakeWindow(m_quakeTermProperty); + WindowsManager::instance()->m_quakeWindow->setAnimationFlag(true); + // 雷神存在 + EXPECT_NE(WindowsManager::instance()->getQuakeWindow(), nullptr); + // 相当于再次Alt+F2 + WindowsManager::instance()->runQuakeWindow(m_quakeTermProperty); + + // 关闭雷神窗口 + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + WindowsManager::instance()->m_quakeWindow = nullptr; +} + +/******************************************************************************* + 1. @函数: onMainwindowClosed + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-09 + 4. @说明: 测试窗口关闭 +*******************************************************************************/ +TEST_F(UI_WindowsManager_Test, onMainwindowClosed) +{ + // 新建一个窗口 + MainWindow *newWindow = new NormalWindow(m_normalTermProperty); + // 关闭当前的窗口 => 测试是否正常执行 + WindowsManager::instance()->onMainwindowClosed(newWindow); + + // 没有雷神窗口 + if (!WindowsManager::instance()->getQuakeWindow()) { + // 创建雷神窗口 + WindowsManager::instance()->runQuakeWindow(m_quakeTermProperty); + } + // 关闭雷神窗口 + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + if (WindowsManager::instance()->getQuakeWindow()) { + WindowsManager::instance()->onMainwindowClosed(WindowsManager::instance()->getQuakeWindow()); + } + EXPECT_EQ(WindowsManager::instance()->getQuakeWindow(), nullptr); +} + +TEST_F(UI_WindowsManager_Test, quakeWindowShowOrHide) +{ + // 若雷神还在就关闭 + if (WindowsManager::instance()->getQuakeWindow()) { + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + WindowsManager::instance()->m_quakeWindow = nullptr; + } + + // 启动雷神 + WindowsManager::instance()->runQuakeWindow(m_quakeTermProperty); + WindowsManager::instance()->m_quakeWindow->setAnimationFlag(true); + // 雷神存在 + EXPECT_NE(WindowsManager::instance()->getQuakeWindow(), nullptr); + // 雷神显示 + EXPECT_EQ(WindowsManager::instance()->getQuakeWindow()->isVisible(), true); + WindowsManager::instance()->getQuakeWindow()->setVisible(false); + WindowsManager::instance()->m_quakeWindow->hideQuakeWindow(); + WindowsManager::instance()->quakeWindowShowOrHide(); + + { + Stub stub; + stub.set(ADDR(QuakeWindow, getDesktopIndex), ut_quakeWindow_getDesktopIndex); + WindowsManager::instance()->quakeWindowShowOrHide(); + } + + { + Stub stub; + stub.set(ADDR(Service, getIsDialogShow), ut_service_getIsDialogShow); + stub.set(ADDR(Service, isSettingDialogVisible), ut_service_isSettingDialogVisible); + stub.set(ADDR(Service, getSettingOwner), ut_service_getSettingOwner); + WindowsManager::instance()->quakeWindowShowOrHide(); + } + { + + Stub stub; + stub.set(ADDR(Service, getIsDialogShow), ut_service_getIsDialogShow); + stub.set(ADDR(QuakeWindow, isActiveWindow), ut_quakeWindow_isActiveWindow); + WindowsManager::instance()->quakeWindowShowOrHide(); + } + + // 相当于再次Alt+F2 + WindowsManager::instance()->runQuakeWindow(m_quakeTermProperty); + // 雷神隐藏 => 又开始了新一轮的动画 + EXPECT_EQ(WindowsManager::instance()->getQuakeWindow()->isNotAnimation, false); + + // 关闭雷神窗口 + WindowsManager::instance()->getQuakeWindow()->closeAllTab(); + WindowsManager::instance()->m_quakeWindow = nullptr; +} + +TEST_F(UI_WindowsManager_Test, getNormalWindowList) +{ + WindowsManager::instance()->getNormalWindowList(); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/main/ut_windowsmanager_test.h deepin-terminal-5.4.13/tests/src/main/ut_windowsmanager_test.h --- deepin-terminal-5.0.0+ds1/tests/src/main/ut_windowsmanager_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/main/ut_windowsmanager_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UI_WINDOWSMANAGER_TEST_H +#define UI_WINDOWSMANAGER_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class Service; +class MainWindow; +class UI_WindowsManager_Test : public ::testing::Test +{ +public: + UI_WindowsManager_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + Service *m_service = nullptr; + + TermProperties m_normalTermProperty; + TermProperties m_quakeTermProperty; +}; + +#endif // UI_WINDOWSMANAGER_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementpanel_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementpanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementpanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementpanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,383 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_remotemanagementpanel_test.h" + +#include "remotemanagementpanel.h" +#include "utils.h" +#include "../stub.h" +#include "service.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include + +UT_RemoteManagementPanel_Test::UT_RemoteManagementPanel_Test() +{ +} +void stub_return() +{ + return; +} + +void UT_RemoteManagementPanel_Test::SetUp() +{ + //远程服务器管理 + m_serverConfigManager = ServerConfigManager::instance(); + // 初始化远程管理数据 + m_serverConfigManager->initServerConfig(); + + prepareData(); +} + +int UT_RemoteManagementPanel_Test::getServerConfigCount() +{ + QList serverConfigList; + QMap> severConfigs = ServerConfigManager::instance()->getServerConfigs(); + for (QMap>::iterator iter = severConfigs.begin(); iter != severConfigs.end(); ++iter) { + QList value = iter.value(); + for (int i = 0; i < value.size(); ++i) { + serverConfigList.append(value.at(i)); + } + } + + qDebug() << serverConfigList.count(); + return serverConfigList.count(); +} + +void UT_RemoteManagementPanel_Test::prepareData() +{ + ServerConfigManager *serverConfigManager = ServerConfigManager::instance(); + serverConfigManager->initServerConfig(); + + int serverConfigCount = getServerConfigCount(); + qDebug() << serverConfigCount << endl; + + QString groupName = QString("group_01"); + + qsrand(static_cast(time(nullptr))); + ServerConfig *config = new ServerConfig(); + config->m_serverName = QString("new_server_%1").arg(Utils::getRandString()); + config->m_address = QString("192.168.10.%1").arg(qrand() % 255); + config->m_userName = QString("zhangsan"); + config->m_password = QString("123"); + config->m_privateKey = QString(""); + config->m_port = QString(""); + config->m_group = groupName; + config->m_path = QString(""); + config->m_command = QString(""); + config->m_encoding = QString(""); + config->m_backspaceKey = QString(""); + config->m_deleteKey = QString(""); + + serverConfigManager->saveServerConfig(config); + EXPECT_EQ(getServerConfigCount(), serverConfigCount + 1); + + int serverCount = serverConfigManager->getServerCount(config->m_group); + + ServerConfig *currConfig = serverConfigManager->getServerConfig(config->m_serverName); + EXPECT_NE(currConfig, nullptr); + + qsrand(static_cast(time(nullptr))); + ServerConfig *newConfig = new ServerConfig(); + newConfig->m_serverName = QString("new_server_%1").arg(Utils::getRandString()); + newConfig->m_address = QString("192.168.10.%1").arg(qrand() % 255); + newConfig->m_userName = QString("uos"); + newConfig->m_password = QString("123456"); + newConfig->m_privateKey = QString(""); + newConfig->m_port = QString(""); + newConfig->m_group = groupName; + newConfig->m_path = QString(""); + newConfig->m_command = QString(""); + newConfig->m_encoding = QString(""); + newConfig->m_backspaceKey = QString(""); + newConfig->m_deleteKey = QString(""); + serverConfigManager->modifyServerConfig(newConfig, currConfig); + EXPECT_EQ(newConfig, serverConfigManager->getServerConfig(newConfig->m_serverName)); + + EXPECT_GE(serverCount, 1); + + serverConfigManager->delServerConfig(newConfig); + EXPECT_EQ(getServerConfigCount(), serverConfigCount); + + EXPECT_EQ(serverConfigManager->getServerCount(groupName), serverCount - 1); +} + +void UT_RemoteManagementPanel_Test::TearDown() +{ +} + +#ifdef UT_REMOTEMANAGEMENTPANEL_TEST +TEST_F(UT_RemoteManagementPanel_Test, refreshPanel) +{ + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + RemoteManagementPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + panel.refreshPanel(); + + +} + +TEST_F(UT_RemoteManagementPanel_Test, setFocusInPanel) +{ + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + RemoteManagementPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + panel.setFocusInPanel(); + int listIndex = panel.getListIndex(); + qDebug() << "listIndex:" << listIndex << endl; + EXPECT_EQ(listIndex, -1); + + // 最后一种情况 + panel.m_searchEdit->hide(); + panel.m_listWidget->hide(); + panel.setFocusInPanel(); + + +} + +TEST_F(UT_RemoteManagementPanel_Test, setFocusBack) +{ + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + RemoteManagementPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + // 创建分组 + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + // 刷新列表,填充数据 + panel.refreshPanel(); + // 不要焦点 => 没有主界面会崩 + // panel.setFocusBack("group2020"); + + + // 要焦点 + panel.m_listWidget->setFocusState(true); + panel.setFocusBack("group2020"); + int listIndex = panel.getListIndex(); + EXPECT_GE(listIndex, 0); + + // 找不到情况 + panel.setFocusBack("group1988"); + listIndex = panel.getListIndex(); + EXPECT_GE(listIndex, 0); + ServerConfigManager::instance()->m_serverConfigs.clear(); + +} + +TEST_F(UT_RemoteManagementPanel_Test, clearListFocus) +{ + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + RemoteManagementPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + + panel.clearListFocus(); + EXPECT_EQ(panel.m_pushButton->hasFocus(), false); + EXPECT_EQ(panel.m_listWidget->hasFocus(), false); + EXPECT_EQ(panel.m_searchEdit->hasFocus(), false); + EXPECT_EQ(panel.m_listWidget->currentIndex(), -1); +} + +TEST_F(UT_RemoteManagementPanel_Test, refreshSearchState) +{ + const int PANEL_WIDTH = 242; + const int PANEL_HEIGHT = 600; + RemoteManagementPanel panel; + panel.resize(PANEL_WIDTH, PANEL_HEIGHT); + panel.show(); + EXPECT_EQ(panel.size().width(), PANEL_WIDTH); + EXPECT_EQ(panel.size().height(), PANEL_HEIGHT); + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 一个也没有,搜索框隐藏 + panel.refreshSearchState(); + //添加数据,显示搜索框 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_port = "22"; + ServerConfig config2; + config2.m_serverName = "test_item2"; + config2.m_address = "127.0.0.1"; + config2.m_userName = "dzw"; + config2.m_port = "22"; + // 分组数据存储结构 + QList list; + list.append(&config); + list.append(&config2); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("", list); + // 刷新列表,填充数据 + panel.refreshPanel(); + // 两个数据,搜索框显示 + panel.refreshSearchState(); + // list中数据的数量 + int count = panel.m_listWidget->count(); + EXPECT_EQ(count, 2); + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +/******************************************************************************* + 1. @函数: onItemClicked + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-22 + 4. @说明: 当前项被点击 +*******************************************************************************/ +TEST_F(UT_RemoteManagementPanel_Test, onItemClicked) +{ + // 初始化一个panel + RemoteManagementPanel remotePanel; + remotePanel.show(); + // 初始化一个可点击的数据 + //添加数据,显示搜索框 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_port = "22"; + // 添加数据到列表中 + // 分组数据存储结构 + QList list; + list.append(&config); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("", list); + // 刷新列表,填充数据 + remotePanel.refreshPanel(); + + // 模拟数据被点击 + // 传来被点击的key值 + remotePanel.onItemClicked("test_item"); + + // 传来错误的值 + remotePanel.onItemClicked("test_item2"); + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +/******************************************************************************* + 1. @函数: showCurSearchResult + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-22 + 4. @说明: 测试接口是否可以正常调用 +*******************************************************************************/ +TEST_F(UT_RemoteManagementPanel_Test, showCurSearchResult) +{ + // 没有搜索内容 + RemoteManagementPanel remotePanel; + remotePanel.show(); + remotePanel.showCurSearchResult(); + // 有搜索内容 + remotePanel.m_searchEdit->setText("aaa"); + remotePanel.showCurSearchResult(); +} + +/******************************************************************************* + 1. @函数: showAddServerConfigDlg + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-22 + 4. @说明: 弹出添加数据弹窗 +*******************************************************************************/ +TEST_F(UT_RemoteManagementPanel_Test, showAddServerConfigDlg) +{ + // 没有搜索内容 + RemoteManagementPanel remotePanel; + remotePanel.show(); + // 打桩 + Stub s; + s.set(ADDR(Service, setIsDialogShow), stub_return); + + // 显示弹窗 + remotePanel.showAddServerConfigDlg(); + ServerConfigOptDlg *dialog = remotePanel.findChild(); + // 发送弹窗添加失败 + if (dialog) { + emit dialog->reject(); + } + + // 设置添加按钮有焦点 + remotePanel.m_pushButton->setFocus(); + remotePanel.showAddServerConfigDlg(); + dialog = remotePanel.findChild(); + // 发送弹窗添加失败 + if (dialog) { + emit dialog->accept(); + } + // 打桩还原 + s.reset(ADDR(Service, setIsDialogShow)); +} + +/******************************************************************************* + 1. @函数: lambda + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 测试部分lambda表达式是否正常响应信号 +*******************************************************************************/ +TEST_F(UT_RemoteManagementPanel_Test, lambda) +{ + // 初始化界面 + RemoteManagementPanel remotePanel; + remotePanel.show(); + remotePanel.m_isShow = true; + // 刷新界面 + emit ServerConfigManager::instance()->refreshList(); + + + // 焦点切入切出 + // 切出理由 + emit remotePanel.m_listWidget->focusOut(Qt::TabFocusReason); + + // 列表内没有index + EXPECT_EQ(remotePanel.m_listWidget->m_currentIndex, -1); + emit remotePanel.m_listWidget->focusOut(Qt::BacktabFocusReason); + + EXPECT_EQ(remotePanel.m_listWidget->m_currentIndex, -1); + +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementpanel_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementpanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementpanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementpanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_REMOTEMANAGEMENTPANEL_TEST_H +#define UT_REMOTEMANAGEMENTPANEL_TEST_H + +#include "ut_defines.h" +#include "serverconfigmanager.h" + +#include + +class UT_RemoteManagementPanel_Test : public ::testing::Test +{ +public: + UT_RemoteManagementPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + + ServerConfigManager *m_serverConfigManager = nullptr; + +private: + int getServerConfigCount(); + + void prepareData(); +}; + +#endif // UT_REMOTEMANAGEMENTPANEL_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementplugn_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementplugn_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementplugn_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementplugn_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_remotemanagementplugn_test.h" + +#include "remotemanagementplugn.h" +#include "mainwindow.h" +#include "service.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include + +UT_RemoteManagementPlugin_Test::UT_RemoteManagementPlugin_Test() +{ +} + +void UT_RemoteManagementPlugin_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); +} + +void UT_RemoteManagementPlugin_Test::TearDown() +{ + delete m_normalWindow; +} + +#ifdef UT_REMOTEMANAGEMENTPLUGIN_TEST +TEST_F(UT_RemoteManagementPlugin_Test, setRemoteEncode) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + remotePlugin->setRemoteEncode(QString("UTF-8")); +} + +TEST_F(UT_RemoteManagementPlugin_Test, setBackspaceKey) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + TermWidget *termWidget = m_normalWindow->currentPage()->currentTerminal(); + remotePlugin->setBackspaceKey(termWidget, QString("control-h")); + remotePlugin->setBackspaceKey(termWidget, QString("auto")); + remotePlugin->setBackspaceKey(termWidget, QString("escape-sequence")); + remotePlugin->setBackspaceKey(termWidget, QString("ascii-del")); + remotePlugin->setBackspaceKey(termWidget, QString("tty")); +} + +TEST_F(UT_RemoteManagementPlugin_Test, setDeleteKey) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + TermWidget *termWidget = m_normalWindow->currentPage()->currentTerminal(); + remotePlugin->setDeleteKey(termWidget, QString("control-h")); + remotePlugin->setDeleteKey(termWidget, QString("auto")); + remotePlugin->setDeleteKey(termWidget, QString("escape-sequence")); + remotePlugin->setDeleteKey(termWidget, QString("ascii-del")); + remotePlugin->setDeleteKey(termWidget, QString("tty")); +} + +TEST_F(UT_RemoteManagementPlugin_Test, createShellFile) +{ + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + QString groupName = QString("group_01"); + + qsrand(static_cast(time(nullptr))); + ServerConfig *config = new ServerConfig(); + config->m_serverName = QString("new_server_%1").arg(Utils::getRandString()); + config->m_address = QString("192.168.10.%1").arg(qrand() % 255); + config->m_userName = QString("zhangsan"); + config->m_password = QString("123"); + config->m_privateKey = QString(""); + config->m_port = QString(""); + config->m_group = groupName; + config->m_path = QString(""); + config->m_command = QString(""); + config->m_encoding = QString(""); + config->m_backspaceKey = QString(""); + config->m_deleteKey = QString(""); + + QString shellFile = remotePlugin->createShellFile(config); + EXPECT_NE(shellFile.length(), 0); + delete config; +} + +/******************************************************************************* + 1. @函数: createShellFile + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-13 + 4. @说明: 测试创建脚本的各种情况 +*******************************************************************************/ +TEST_F(UT_RemoteManagementPlugin_Test, createShellFile2) +{ + RemoteManagementPlugin *pRemotePlugin = new RemoteManagementPlugin; + ServerConfig config; + config.m_userName = "root"; + config.m_address = "127.0.0.1"; + config.m_port = "22"; + // 密钥为空 + config.m_privateKey = ""; + config.m_password = "1"; + config.m_path = "/"; + config.m_command = "ls"; + // 生成配置文件执行位置及其参数 + QString command = pRemotePlugin->createShellFile(&config); + QStringList strList = command.split(" "); + QFile file(strList.first()); + // 文件存在 + EXPECT_EQ(file.exists(), true); + + // 密钥不为空 + config.m_privateKey = "/"; + command = pRemotePlugin->createShellFile(&config); + strList.clear(); + strList = command.split(" "); + file.setFileName(strList.first()); + // 文件存在 + EXPECT_EQ(file.exists(), true); + // 删除文件 + file.remove(); + + delete pRemotePlugin; +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementplugn_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementplugn_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementplugn_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementplugn_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_REMOTEMANAGEMENTPLUGIN_TEST_H +#define UT_REMOTEMANAGEMENTPLUGIN_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_RemoteManagementPlugin_Test : public ::testing::Test +{ +public: + UT_RemoteManagementPlugin_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_REMOTEMANAGEMENTPLUGIN_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,289 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_remotemanagementsearchpanel_test.h" + +#include "remotemanagementsearchpanel.h" +#include "service.h" +#include "mainwindow.h" +#include "../stub.h" + +// DTK +#include + +//Qt单元测试相关头文件 +#include +#include + +//Google GTest 相关头文件 +#include + +void stub_focusCurrentPage() +{ + return; +} + +UT_RemoteManagementSearchPanel_Test::UT_RemoteManagementSearchPanel_Test() +{ +} + +void UT_RemoteManagementSearchPanel_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); +} + +void UT_RemoteManagementSearchPanel_Test::TearDown() +{ + if (m_normalWindow) { + delete m_normalWindow; + } +} + +#ifdef UT_REMOTEMANAGEMENTSEARCHPANEL_TEST + +/******************************************************************************* + 1. @函数: refreshDataByGroupAndFilter + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-22 + 4. @说明: 测试组内搜索 +*******************************************************************************/ +TEST_F(UT_RemoteManagementSearchPanel_Test, refreshDataByGroupAndFilter) +{ + RemoteManagementSearchPanel searchPanel; + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + //添加数据 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_group = "group2020"; + config.m_port = "22"; + ServerConfig config2; + config2.m_serverName = "test_item2"; + config2.m_address = "127.0.0.1"; + config2.m_userName = "dzw"; + config2.m_port = "22"; + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + list.append(&config); + QList list2; + list2.append(&config2); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + ServerConfigManager::instance()->m_serverConfigs.insert("", list2); + // 刷新列表,填充数据 + searchPanel.refreshDataByGroupAndFilter("group2020", "test_item"); + // 获取当前列表内的数据 + int count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 1); + // 重新搜索 => 找不到的情况 + searchPanel.refreshDataByGroupAndFilter("group2020", "test_item2"); + count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 0); + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +TEST_F(UT_RemoteManagementSearchPanel_Test, refreshDataByFilter) +{ + RemoteManagementSearchPanel searchPanel; + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + //添加数据 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_group = "group2020"; + config.m_port = "22"; + ServerConfig config2; + config2.m_serverName = "test_item2"; + config2.m_address = "127.0.0.1"; + config2.m_userName = "dzw"; + config2.m_port = "22"; + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + list.append(&config); + QList list2; + list2.append(&config2); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + ServerConfigManager::instance()->m_serverConfigs.insert("", list2); + // 刷新列表,填充数据 + searchPanel.refreshDataByFilter("item"); + int count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 3); + searchPanel.refreshDataByFilter("group"); + count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 2); + searchPanel.refreshDataByFilter("test_item2"); + count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 1); + searchPanel.refreshDataByFilter("1988"); + count = searchPanel.m_listWidget->count(); + EXPECT_EQ(count, 0); + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +/******************************************************************************* + 1. @函数: clearAllFocus + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 清除所有焦点 +*******************************************************************************/ +TEST_F(UT_RemoteManagementSearchPanel_Test, clearAllFocus) +{ + RemoteManagementSearchPanel searchPanel; + searchPanel.show(); + searchPanel.clearAllFocus(); + EXPECT_EQ(searchPanel.m_rebackButton->hasFocus(), false); + EXPECT_EQ(searchPanel.m_listWidget->hasFocus(), false); + EXPECT_EQ(searchPanel.m_label->hasFocus(), false); +} + +/******************************************************************************* + 1. @函数: setFocusBack + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 返回设置 +*******************************************************************************/ +TEST_F(UT_RemoteManagementSearchPanel_Test, setFocusBack) +{ + Stub s; + s.set(ADDR(MainWindow, focusCurrentPage), stub_focusCurrentPage); + // 初始化界面 + RemoteManagementSearchPanel searchPanel; + searchPanel.show(); + // 新增服务器配置数据 + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + // 填充数据 + searchPanel.refreshDataByFilter("item"); + // 返回分组 + searchPanel.setFocusBack("group2020", false, 0); + // 返回分组2 + searchPanel.setFocusBack("group2020", true, 0); + + // 还原 + ServerConfigManager::instance()->m_serverConfigs.clear(); + s.reset(ADDR(MainWindow, focusCurrentPage)); +} + +TEST_F(UT_RemoteManagementSearchPanel_Test, getListIndex) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + RemoteManagementSearchPanel *searchPanel = remoteTopPanel->findChild(); + int listIndex = searchPanel->getListIndex(); + EXPECT_EQ(listIndex, -1); +} + +/******************************************************************************* + 1. @函数: onItemClicked + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 点击事件 +*******************************************************************************/ +TEST_F(UT_RemoteManagementSearchPanel_Test, onItemClicked) +{ + // 初始化搜索界面 + RemoteManagementSearchPanel searchPanel; + searchPanel.show(); + + // 初始化数据 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_port = "22"; + // 添加数据到列表中 + // 分组数据存储结构 + QList list; + list.append(&config); + // 数据存储结构 + ServerConfigManager::instance()->m_serverConfigs.insert("", list); + // 刷新列表,填充数据 + searchPanel.refreshDataByFilter("item"); + + // 模拟数据被点击 + // 传来被点击的key值 + searchPanel.onItemClicked("test_item"); + // 清空测试数据 + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +/******************************************************************************* + 1. @函数: lambda + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 测试lambda表达式 +*******************************************************************************/ +TEST_F(UT_RemoteManagementSearchPanel_Test, lambda) +{ + // 初始化界面 + RemoteManagementSearchPanel searchPanel; + searchPanel.show(); + + // 发送焦点切出信号 +// emit searchPanel.m_listWidget->focusOut(Qt::TabFocusReason); +// searchPanel.show(); + emit searchPanel.m_listWidget->focusOut(Qt::BacktabFocusReason); + // 切换主题 + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::LightType); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementsearchpanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_REMOTEMANAGEMENTSEARCHPANEL_TEST_H +#define UT_REMOTEMANAGEMENTSEARCHPANEL_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_RemoteManagementSearchPanel_Test : public ::testing::Test +{ +public: + UT_RemoteManagementSearchPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_REMOTEMANAGEMENTSEARCHPANEL_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementtoppanel_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementtoppanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementtoppanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementtoppanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,211 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_remotemanagementtoppanel_test.h" + +#include "remotemanagementtoppanel.h" +#include "service.h" +#include "mainwindow.h" +#include "../stub.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include + +void stub_focusCurrentPage_remote() +{ + return; +} + +bool stub_isFocusOnList() +{ + return true; +} + +UT_RemoteManagementTopPanel_Test::UT_RemoteManagementTopPanel_Test() +{ +} + +void UT_RemoteManagementTopPanel_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } +} + +void UT_RemoteManagementTopPanel_Test::TearDown() +{ +} + +static void doDeleteLater(RemoteManagementTopPanel *obj) +{ + obj->deleteLater(); +} + +#ifdef UT_REMOTEMANAGEMENTTOPPANEL_TEST + +TEST_F(UT_RemoteManagementTopPanel_Test, setFocusInPanel) +{ + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + remoteTopPanel->setFocusInPanel(); + m_normalWindow->close(); + delete m_normalWindow; +} + +TEST_F(UT_RemoteManagementTopPanel_Test, showSearchPanel) +{ + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + remoteTopPanel->showSearchPanel("group"); + m_normalWindow->close(); + delete m_normalWindow; +} + +TEST_F(UT_RemoteManagementTopPanel_Test, showGroupPanel) +{ + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + remoteTopPanel->showSearchPanel("group"); + + //显示前一个界面(返回) + remoteTopPanel->showPrevPanel(); + + m_normalWindow->close(); + delete m_normalWindow; +} + +/******************************************************************************* + 1. @函数: ShowSearchPanel + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 显示搜索面板 => 组内搜索和无法搜索 +*******************************************************************************/ +TEST_F(UT_RemoteManagementTopPanel_Test, ShowSearchPanelTest) +{ + RemoteManagementTopPanel topPanel; + // 没数据的情况 + // 显示分组界面的搜索 + topPanel.m_currentPanelType = ServerConfigManager::PanelType_Group; + topPanel.m_group = "group"; + topPanel.showSearchPanel("1988"); + + // 未知类型 + topPanel.m_currentPanelType = ServerConfigManager::PanelType_Search; + topPanel.showSearchPanel("1995"); +} + +/******************************************************************************* + 1. @函数: showGroupPanel + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 显示分组界面 +*******************************************************************************/ +TEST_F(UT_RemoteManagementTopPanel_Test, showGroupPanelTest) +{ + Stub s; + s.set(ADDR(MainWindow, focusCurrentPage), stub_focusCurrentPage_remote); + RemoteManagementTopPanel topPanel; + // 没数据的情况 + // 不用界面显示分组界面 + topPanel.m_currentPanelType = ServerConfigManager::PanelType_Manage; + topPanel.showGroupPanel("1988", false); + topPanel.showGroupPanel("1988", true); + + topPanel.m_currentPanelType = ServerConfigManager::PanelType_Search; + topPanel.showGroupPanel("1995", true); + + // 未知类型 + topPanel.m_currentPanelType = ServerConfigManager::PanelType_Group; + topPanel.showGroupPanel("1995", true); + s.reset(ADDR(MainWindow, focusCurrentPage)); +} + +/******************************************************************************* + 1. @函数: showPrePanel + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-23 + 4. @说明: 显示前一个界面 +*******************************************************************************/ +TEST_F(UT_RemoteManagementTopPanel_Test, showPrePanelTest) +{ + Stub s; + s.set(ADDR(MainWindow, isFocusOnList), stub_isFocusOnList); + // 清空堆栈 + QSharedPointer topPanel(new RemoteManagementTopPanel, doDeleteLater); + topPanel->m_prevPanelStack.clear(); + + // 显示前一个窗口 + topPanel->m_currentPanelType = ServerConfigManager::PanelType_Manage; + topPanel->showPrevPanel(); + + // 搜索返回 + topPanel->m_currentPanelType = ServerConfigManager::PanelType_Search; + topPanel->showPrevPanel(); + + // 分组返回 + topPanel->m_currentPanelType = ServerConfigManager::PanelType_Search; + topPanel->showPrevPanel(); + + // 栈为空,最后返回都是主界面 + EXPECT_EQ(topPanel->m_currentPanelType, ServerConfigManager::PanelType_Manage); + s.reset(ADDR(MainWindow, isFocusOnList)); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementtoppanel_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementtoppanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_remotemanagementtoppanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_remotemanagementtoppanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_REMOTEMANAGEMENTTOPPANEL_TEST_H +#define UT_REMOTEMANAGEMENTTOPPANEL_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_RemoteManagementTopPanel_Test : public ::testing::Test +{ +public: + UT_RemoteManagementTopPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_REMOTEMANAGEMENTTOPPANEL_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfiggrouppanel_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfiggrouppanel_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfiggrouppanel_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfiggrouppanel_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,244 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_serverconfiggrouppanel_test.h" + +#include "serverconfiggrouppanel.h" +#include "service.h" +#include "mainwindow.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include + +UT_ServerConfigGroupPanel_Test::UT_ServerConfigGroupPanel_Test() +{ +} + +void UT_ServerConfigGroupPanel_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); + m_normalWindow->resize(800, 600); + m_normalWindow->show(); +} + +void UT_ServerConfigGroupPanel_Test::TearDown() +{ + delete m_normalWindow; +} + +#ifdef UT_SERVERCONFIGGROUPPANEL_TEST +TEST_F(UT_ServerConfigGroupPanel_Test, refreshData) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + ServerConfigGroupPanel *groupPanel = remoteTopPanel->findChild(); + EXPECT_NE(groupPanel, nullptr); + groupPanel->refreshData("group01"); +} + +TEST_F(UT_ServerConfigGroupPanel_Test, setFocusBack) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + ServerConfigGroupPanel *groupPanel = remoteTopPanel->findChild(); + EXPECT_NE(groupPanel, nullptr); + groupPanel->setFocusBack(); +} + +TEST_F(UT_ServerConfigGroupPanel_Test, clearAllFocus) +{ + EXPECT_EQ(m_normalWindow->isVisible(), true); + + m_normalWindow->showPlugin(MainWindow::PLUGIN_TYPE_REMOTEMANAGEMENT); + + RemoteManagementPlugin *remotePlugin = m_normalWindow->findChild(); + RemoteManagementTopPanel *remoteTopPanel = remotePlugin->getRemoteManagementTopPanel(); + EXPECT_NE(remoteTopPanel, nullptr); + EXPECT_EQ(remoteTopPanel->isVisible(), true); + + ServerConfigGroupPanel *groupPanel = remoteTopPanel->findChild(); + EXPECT_NE(groupPanel, nullptr); + groupPanel->clearAllFocus(); + + EXPECT_EQ(groupPanel->m_rebackButton->hasFocus(), false); + EXPECT_EQ(groupPanel->m_searchEdit->hasFocus(), false); + EXPECT_EQ(groupPanel->m_listWidget->hasFocus(), false); +} + +/******************************************************************************* + 1. @函数: refreshDataTest + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 刷新列表 => 组内数据 +*******************************************************************************/ +TEST_F(UT_ServerConfigGroupPanel_Test, refreshDataTest) +{ + // 创建分组 + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + // 数据存储结构 + // 清空数据 + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 装填数据 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + + // 新建界面 + ServerConfigGroupPanel groupPanel; + // 刷新界面 + groupPanel.refreshData("group2020"); + // 界面下只有一个数据 + int count = groupPanel.m_listWidget->count(); + EXPECT_EQ(count, 1); + + // 不存在的组 + groupPanel.refreshData("group1988"); + count = groupPanel.m_listWidget->count(); + EXPECT_EQ(count, 0); + + // 清空数据 + ServerConfigManager::instance()->m_serverConfigs.clear(); +} + +/******************************************************************************* + 1. @函数: setFocusBackTest + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 测试界面返回 +*******************************************************************************/ +TEST_F(UT_ServerConfigGroupPanel_Test, setFocusBackTest) +{ + // 创建分组 + ServerConfig groupConfig; + groupConfig.m_serverName = "group_item"; + groupConfig.m_address = "127.0.0.1"; + groupConfig.m_group = "group2020"; + groupConfig.m_userName = "dzw"; + groupConfig.m_port = "22"; + ServerConfig groupConfig2; + groupConfig2.m_serverName = "group_item2"; + groupConfig2.m_address = "127.0.0.1"; + groupConfig2.m_group = "group2020"; + groupConfig2.m_userName = "dzw"; + groupConfig2.m_port = "22"; + // 分组数据存储结构 + QList list; + list.append(&groupConfig); + list.append(&groupConfig); + // 数据存储结构 + // 清空数据 + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 装填数据 + ServerConfigManager::instance()->m_serverConfigs.insert("group2020", list); + + // 新建界面 + ServerConfigGroupPanel groupPanel; + // 刷新界面 + groupPanel.refreshData("group2020"); + // 刷新搜索框状态 + groupPanel.refreshSearchState(); + + // 两个数据 => 有搜索框 + groupPanel.setFocusBack(); + + // 影藏搜索框 + groupPanel.m_searchEdit->hide(); + groupPanel.setFocusBack(); + + // 清空数据 + ServerConfigManager::instance()->m_serverConfigs.clear(); + // 刷新界面 + groupPanel.refreshData("group2020"); + groupPanel.setFocusBack(); +} + +/******************************************************************************* + 1. @函数: clearAllFocusTest + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 测试清除焦点是否成功 +*******************************************************************************/ +TEST_F(UT_ServerConfigGroupPanel_Test, clearAllFocusTest) +{ + ServerConfigGroupPanel groupPanel; + groupPanel.show(); + groupPanel.refreshData("group2020"); + groupPanel.clearAllFocus(); + EXPECT_EQ(groupPanel.m_rebackButton->hasFocus(), false); + EXPECT_EQ(groupPanel.m_listWidget->hasFocus(), false); + EXPECT_EQ(groupPanel.m_searchEdit->hasFocus(), false); +} + +/******************************************************************************* + 1. @函数: lambda + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 测试lambda表达式,是否会影响进程 +*******************************************************************************/ +TEST_F(UT_ServerConfigGroupPanel_Test, lambda) +{ + // 初始化界面 + ServerConfigGroupPanel groupPanel; + groupPanel.show(); + groupPanel.refreshData("group2020"); + groupPanel.m_isShow = true; + + // 焦点信号 + emit groupPanel.m_listWidget->focusOut(Qt::BacktabFocusReason); + emit groupPanel.m_listWidget->focusOut(Qt::OtherFocusReason); + emit groupPanel.m_listWidget->focusOut(Qt::NoFocusReason); + + + emit ServerConfigManager::instance()->refreshList(); + + +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfiggrouppanel_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfiggrouppanel_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfiggrouppanel_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfiggrouppanel_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_SERVERCONFIGGROUPPANEL_TEST_H +#define UT_SERVERCONFIGGROUPPANEL_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_ServerConfigGroupPanel_Test : public ::testing::Test +{ +public: + UT_ServerConfigGroupPanel_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_SERVERCONFIGGROUPPANEL_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigmanager_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigmanager_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigmanager_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigmanager_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,218 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_serverconfigmanager_test.h" + +#include "serverconfigmanager.h" +#include "service.h" +#include "mainwindow.h" +#include "serverconfigoptdlg.h" +#include "utils.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include + +UT_ServerConfigManager_Test::UT_ServerConfigManager_Test() +{ +} + +void UT_ServerConfigManager_Test::SetUp() +{ +} + +void UT_ServerConfigManager_Test::TearDown() +{ +} + +int UT_ServerConfigManager_Test::getServerConfigCount() +{ + QList serverConfigList; + QMap> severConfigs = ServerConfigManager::instance()->getServerConfigs(); + for (QMap>::iterator iter = severConfigs.begin(); iter != severConfigs.end(); ++iter) { + QList value = iter.value(); + for (int i = 0; i < value.size(); ++i) { + serverConfigList.append(value.at(i)); + } + } + + qDebug() << serverConfigList.count(); + return serverConfigList.count(); +} + +#ifdef UT_SERVERCONFIGMANAGER_TEST +TEST_F(UT_ServerConfigManager_Test, ServerConfigManagerTest) +{ + ServerConfigManager *serverConfigManager = ServerConfigManager::instance(); + serverConfigManager->initServerConfig(); + + int serverConfigCount = getServerConfigCount(); + qDebug() << serverConfigCount << endl; + + QString groupName = QString("group_01"); + + qsrand(static_cast(time(nullptr))); + ServerConfig *config = new ServerConfig(); + config->m_serverName = QString("new_server_%1").arg(Utils::getRandString()); + config->m_address = QString("192.168.10.%1").arg(qrand() % 255); + config->m_userName = QString("zhangsan"); + config->m_password = QString("123"); + config->m_privateKey = QString(""); + config->m_port = QString(""); + config->m_group = groupName; + config->m_path = QString(""); + config->m_command = QString(""); + config->m_encoding = QString(""); + config->m_backspaceKey = QString(""); + config->m_deleteKey = QString(""); + + serverConfigManager->saveServerConfig(config); + + serverConfigManager->getServerCount(config->m_group); + + ServerConfig *currConfig = serverConfigManager->getServerConfig(config->m_serverName); + + qsrand(static_cast(time(nullptr))); + ServerConfig *newConfig = new ServerConfig(); + newConfig->m_serverName = QString("new_server_%1").arg(Utils::getRandString()); + newConfig->m_address = QString("192.168.10.%1").arg(qrand() % 255); + newConfig->m_userName = QString("uos"); + newConfig->m_password = QString("123456"); + newConfig->m_privateKey = QString(""); + newConfig->m_port = QString(""); + newConfig->m_group = groupName; + newConfig->m_path = QString(""); + newConfig->m_command = QString(""); + newConfig->m_encoding = QString(""); + newConfig->m_backspaceKey = QString(""); + newConfig->m_deleteKey = QString(""); + serverConfigManager->modifyServerConfig(newConfig, currConfig); + + serverConfigManager->delServerConfig(newConfig); +} + +/******************************************************************************* + 1. @函数: initManager + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 初始化Manager +*******************************************************************************/ +TEST_F(UT_ServerConfigManager_Test, initManager) +{ + // 将现在已有的instance删除 + //delete ServerConfigManager::m_instance; + ServerConfigManager::m_instance = nullptr; + + // 初始化数据 + // 先将数据存入配置文件 + ServerConfig *groupConfig = new ServerConfig; + groupConfig->m_serverName = "group_item"; + groupConfig->m_address = "127.0.0.1"; + groupConfig->m_group = "group2020"; + groupConfig->m_userName = "dzw"; + groupConfig->m_port = "22"; + ServerConfig *config = new ServerConfig; + config->m_serverName = "1988"; + config->m_address = "127.0.0.1"; + config->m_group = ""; + config->m_userName = "dzw"; + config->m_port = "22"; + // 保存数据 + ServerConfigManager::instance()->saveServerConfig(groupConfig); + ServerConfigManager::instance()->saveServerConfig(config); + + //初始化数据 + ServerConfigManager::instance()->initServerConfig(); + + // 删除数据 + ServerConfigManager::instance()->delServerConfig(groupConfig); + ServerConfigManager::instance()->delServerConfig(config); +} + +/******************************************************************************* + 1. @函数: removeDialog + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 远程管理弹窗操作 +*******************************************************************************/ +TEST_F(UT_ServerConfigManager_Test, removeDialog) +{ + // 初始化数据 + ServerConfig config; + config.m_serverName = "1988"; + config.m_address = "127.0.0.1"; + config.m_group = ""; + config.m_userName = "dzw"; + config.m_port = "22"; + + //初始化弹窗 + ServerConfigOptDlg *dlg = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_MODIFY, &config, nullptr); + dlg->show(); + + // 将弹窗记录 + ServerConfigManager::instance()->setModifyDialog(config.m_serverName, dlg); + + // 删除弹窗 + ServerConfigManager::instance()->removeDialog(dlg); + bool isContain = ServerConfigManager::instance()->m_serverConfigDialogMap.contains(config.m_serverName); + EXPECT_EQ(isContain, false); +} + +/******************************************************************************* + 1. @函数: closeAllDialog + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 关闭同类弹窗 +*******************************************************************************/ +TEST_F(UT_ServerConfigManager_Test, closeAllDialog) +{ + // 初始化数据 + ServerConfig config; + config.m_serverName = "1988"; + config.m_address = "127.0.0.1"; + config.m_group = ""; + config.m_userName = "dzw"; + config.m_port = "22"; + + // 打开多个同一种弹窗 + ServerConfigOptDlg *dlg1 = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_MODIFY, &config, nullptr); + ServerConfigOptDlg *dlg2 = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_MODIFY, &config, nullptr); + dlg1->show(); + dlg2->show(); + + // 将弹窗记录 + ServerConfigManager::instance()->setModifyDialog(config.m_serverName, dlg1); + ServerConfigManager::instance()->setModifyDialog(config.m_serverName, dlg2); + // 同一类弹窗 + int typeCount = ServerConfigManager::instance()->m_serverConfigDialogMap.count(); + EXPECT_EQ(typeCount, 1); + // 弹窗数量 + int count = ServerConfigManager::instance()->m_serverConfigDialogMap[config.m_serverName].count(); + EXPECT_EQ(count, 2); + + // 将弹窗全部全部拒绝 => 拒绝后信号槽会自动删除弹窗 + ServerConfigManager::instance()->closeAllDialog(config.m_serverName); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigmanager_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigmanager_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigmanager_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigmanager_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_SERVERCONFIGMANAGER_TEST_H +#define UT_SERVERCONFIGMANAGER_TEST_H + +#include "ut_defines.h" + +#include + +class UT_ServerConfigManager_Test : public ::testing::Test +{ +public: + UT_ServerConfigManager_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + + int getServerConfigCount(); +}; + +#endif // UT_SERVERCONFIGMANAGER_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigoptdlg_test.cpp deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigoptdlg_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigoptdlg_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigoptdlg_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_serverconfigoptdlg_test.h" + +#include "serverconfigoptdlg.h" +#include "serverconfigmanager.h" +#include "utils.h" + +// DTK +#include + +//Qt单元测试相关头文件 +#include +#include + +UT_ServerConfigOptDlg_Test::UT_ServerConfigOptDlg_Test() +{ +} + +void UT_ServerConfigOptDlg_Test::SetUp() +{ + ServerConfigManager *serverConfigManager = ServerConfigManager::instance(); + serverConfigManager->initServerConfig(); +} + +void UT_ServerConfigOptDlg_Test::TearDown() +{ +} + +#ifdef UT_SERVERCONFIGOPTDLG_TEST + +TEST_F(UT_ServerConfigOptDlg_Test, getCurServer) +{ + ServerConfigOptDlg serverCfgDlg; + serverCfgDlg.show(); + EXPECT_EQ(serverCfgDlg.isVisible(), true); + + ServerConfig *serverConfig = serverCfgDlg.getCurServer(); + EXPECT_EQ(serverConfig, nullptr); +} + +TEST_F(UT_ServerConfigOptDlg_Test, setDelServer) +{ + ServerConfigOptDlg serverCfgDlg; + serverCfgDlg.show(); + EXPECT_EQ(serverCfgDlg.isVisible(), true); + + serverCfgDlg.setDelServer(true); + EXPECT_EQ(serverCfgDlg.isDelServer(), true); + + serverCfgDlg.setDelServer(false); + EXPECT_EQ(serverCfgDlg.isDelServer(), false); +} + +TEST_F(UT_ServerConfigOptDlg_Test, getServerName) +{ + ServerConfigOptDlg serverCfgDlg; + serverCfgDlg.show(); + EXPECT_EQ(serverCfgDlg.isVisible(), true); + + QString serverName = serverCfgDlg.getServerName(); + EXPECT_EQ(serverName.isEmpty(), true); +} + +TEST_F(UT_ServerConfigOptDlg_Test, updataData) +{ +// ServerConfigOptDlg serverCfgDlg; + +// QString serverName = QString("new_server_%1").arg(Utils::getRandString()); +// ServerConfig *serverConfig = serverCfgDlg.getCurServer(); +// serverConfig->m_serverName = serverName; +// serverCfgDlg.updataData(serverConfig); + +// EXPECT_EQ(serverCfgDlg.getServerName(), serverName); +} + +TEST_F(UT_ServerConfigOptDlg_Test, getData) +{ + ServerConfigOptDlg serverCfgDlg; + + ServerConfig serverConfig = serverCfgDlg.getData(); + EXPECT_EQ(serverConfig.m_serverName, serverCfgDlg.getServerName()); +} + +TEST_F(UT_ServerConfigOptDlg_Test, resetCurServer) +{ + ServerConfigOptDlg serverCfgDlg; + + ServerConfig serverConfig = serverCfgDlg.getData(); + serverCfgDlg.resetCurServer(serverConfig); +} + +/******************************************************************************* + 1. @函数: getDataTest + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 测试带值初始化弹窗 +*******************************************************************************/ +TEST_F(UT_ServerConfigOptDlg_Test, getDataTest) +{ + // 初始化测试数据 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_port = "22"; + // 初始化弹窗 + ServerConfigOptDlg serverConfigDialog(ServerConfigOptDlg::SCT_MODIFY, &config); + + // 未改变数据前getData + // 指向的不是同一片空间,所以只能比较里面的值 + ServerConfig curConfig = serverConfigDialog.getData(); + EXPECT_EQ(curConfig.m_serverName, config.m_serverName); + + // 修改弹窗内服务器名称 + serverConfigDialog.m_serverName->setText("1988"); + curConfig = serverConfigDialog.getData(); + EXPECT_EQ(curConfig.m_serverName, "1988"); + + // 函数修改数据 => 还原数据 + serverConfigDialog.updataData(&config); + curConfig = serverConfigDialog.getData(); + EXPECT_EQ(curConfig.m_serverName, config.m_serverName); +} + +/******************************************************************************* + 1. @函数: resetCurServerTest + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 尝试重新修改弹窗原数据 +*******************************************************************************/ +TEST_F(UT_ServerConfigOptDlg_Test, resetCurServerTest) +{ + // 初始化测试数据 + ServerConfig config; + config.m_serverName = "test_item"; + config.m_address = "127.0.0.1"; + config.m_userName = "dzw"; + config.m_port = "22"; + ServerConfig config2; + config2.m_serverName = "test_item2"; + config2.m_address = "127.0.0.1"; + config2.m_userName = "dzw"; + config2.m_port = "22"; + // 初始化弹窗 + ServerConfigOptDlg serverConfigDialog(ServerConfigOptDlg::SCT_MODIFY, &config); + + // 将数据传入弹窗,获取的指针和原数据指针应该一致 + ServerConfig *curConfig = serverConfigDialog.getCurServer(); + EXPECT_EQ(&config, curConfig); + + // 函数修改原数据 => 传入的临时数据不是指针,传入后被拷贝构造,所以还原后指针不一定相同 + // 只能对比数据是否还原 + serverConfigDialog.resetCurServer(config2); + curConfig = serverConfigDialog.getCurServer(); + EXPECT_EQ(curConfig->m_serverName, config2.m_serverName); +} + +/******************************************************************************* + 1. @函数: lambda + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-24 + 4. @说明: 测试lambda表达式 +*******************************************************************************/ +TEST_F(UT_ServerConfigOptDlg_Test, lambda) +{ + // 初始化弹窗 + ServerConfigOptDlg serverConfigDialog(ServerConfigOptDlg::SCT_ADD, nullptr); + serverConfigDialog.show(); + + // 切换主题 + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::LightType); + + // 扩展弹窗 + emit serverConfigDialog.m_advancedOptions->click(); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigoptdlg_test.h deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigoptdlg_test.h --- deepin-terminal-5.0.0+ds1/tests/src/remotemanage/ut_serverconfigoptdlg_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/remotemanage/ut_serverconfigoptdlg_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: daizhengwen + * + * Maintainer: daizhengwen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_SERVERCONFIGOPTDLG_TEST_H +#define UT_SERVERCONFIGOPTDLG_TEST_H + +#include "ut_defines.h" + +#include + +class UT_ServerConfigOptDlg_Test : public ::testing::Test +{ +public: + UT_ServerConfigOptDlg_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_SERVERCONFIGOPTDLG_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/settings/ut_newdspinbox_test.cpp deepin-terminal-5.4.13/tests/src/settings/ut_newdspinbox_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/settings/ut_newdspinbox_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/settings/ut_newdspinbox_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_newdspinbox_test.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include + +#include + +DCORE_USE_NAMESPACE + +UT_NewDSpinBox_Test::UT_NewDSpinBox_Test() +{ +} + +void UT_NewDSpinBox_Test::SetUp() +{ + m_spinBox = new NewDspinBox(nullptr); + m_spinBox->show(); +} + +void UT_NewDSpinBox_Test::TearDown() +{ + delete m_spinBox; +} + +#ifdef UT_NEWDSPINBOX_TEST + +TEST_F(UT_NewDSpinBox_Test, WheelEvent_Increase) +{ + int value = 20; + m_spinBox->setValue(value); + + QWheelEvent *event = new QWheelEvent(QPointF(63, 29), 120, Qt::NoButton, Qt::NoModifier); + m_spinBox->wheelEvent(event); + if (event) { + delete event; + } +} + +TEST_F(UT_NewDSpinBox_Test, WheelEvent_Reduce) +{ + int value = 20; + m_spinBox->setValue(value); + + QWheelEvent *event = new QWheelEvent(QPointF(63, 29), -120, Qt::NoButton, Qt::NoModifier); + m_spinBox->wheelEvent(event); + if (event) { + delete event; + } +} + +TEST_F(UT_NewDSpinBox_Test, eventFilter_Key_Up) +{ + int value = 20; + m_spinBox->setValue(value); + QKeyEvent *key_event = new QKeyEvent(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier, QString("")); + m_spinBox->eventFilter(m_spinBox->lineEdit(), key_event); + if (key_event) { + delete key_event; + } +} + +TEST_F(UT_NewDSpinBox_Test, eventFilter_Key_Down) +{ + int value = 20; + m_spinBox->setValue(value); + QKeyEvent *key_event = new QKeyEvent(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier, QString("")); + m_spinBox->eventFilter(m_spinBox->lineEdit(), key_event); + if (key_event) { + delete key_event; + } +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/settings/ut_newdspinbox_test.h deepin-terminal-5.4.13/tests/src/settings/ut_newdspinbox_test.h --- deepin-terminal-5.0.0+ds1/tests/src/settings/ut_newdspinbox_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/settings/ut_newdspinbox_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_NEWDSPINBOX_TEST_H +#define UT_NEWDSPINBOX_TEST_H + +#include "ut_defines.h" +#include "utils.h" +#include "newdspinbox.h" + +#include + +class UT_NewDSpinBox_Test : public ::testing::Test +{ +public: + UT_NewDSpinBox_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + + NewDspinBox *m_spinBox = nullptr; +}; + +#endif // UT_NEWDSPINBOX_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/settings/ut_settings_test.cpp deepin-terminal-5.4.13/tests/src/settings/ut_settings_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/settings/ut_settings_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/settings/ut_settings_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include "ut_defines.h" +#include "settings.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +#include +#include + +#include + +DCORE_USE_NAMESPACE + +extern void GenerateSettingTranslate(); + + +class UT_Settings_Test : public ::testing::Test +{ +public: + UT_Settings_Test() {} + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp() {} + + //用于做一些清理操作 + virtual void TearDown() {} +}; + +static bool ut_file_exists() +{ + return false; +} + +static int ut_combobox_findText(const QString &, Qt::MatchFlags) +{ + return -1; +} + +static int ut_stringlist_size() +{ + return 0; +} + +static QString ut_variant_toString() +{ + return QString(); +} + +static void doDeleteLater(DSettingsOption *obj) +{ + obj->deleteLater(); +} + +#ifdef UT_SETTINGS_TEST + +TEST_F(UT_Settings_Test, init) +{ + Stub stub; + stub.set((QString (QVariant::*)() const)ADDR(QVariant, toString), ut_variant_toString); + stub.set((bool (QFile::*)() const)ADDR(QFile, exists), ut_file_exists); + + Settings::releaseInstance(); + Settings::instance(); + +} +TEST_F(UT_Settings_Test, SettingsTest) +{ + Settings::instance()->opacity(); + + Settings::instance()->fontName(); + + Settings::instance()->fontSize(); + + //由于编码没有保存到conf,这里只验证和默认编码相同 + Settings::instance()->encoding(); + + Settings::instance()->cursorShape(); + + Settings::instance()->cursorBlink(); + + Settings::instance()->backgroundBlur(); + + Settings::instance()->colorScheme(); + + Settings::instance()->PressingScroll(); + + Settings::instance()->OutputtingScroll(); +} + +TEST_F(UT_Settings_Test, GenerateSettingTranslate) +{ + GenerateSettingTranslate(); +} + +TEST_F(UT_Settings_Test, createSpinButtonHandle) +{ + DSettingsOption option; + option.setData("min", QVariant(10)); + option.setData("max", QVariant(90)); + Settings::instance()->createSpinButtonHandle(&option); +} + +TEST_F(UT_Settings_Test, createCustomSliderHandle) +{ + DSettingsOption option; + option.setData("min", QVariant(0)); + option.setData("max", QVariant(100)); + Settings::instance()->createCustomSliderHandle(&option); +} + +TEST_F(UT_Settings_Test, createFontComBoBoxHandle) +{ + Stub stub; + stub.set((int (QStringList::*)() const)ADDR(QStringList, size), ut_stringlist_size); + + DSettingsOption option; + Settings::instance()->createFontComBoBoxHandle(&option); +} + +TEST_F(UT_Settings_Test, createShortcutEditOptionHandle) +{ + DSettingsOption option; + option.setValue(QVariant("Ctrl+Shift+A")); + KeySequenceEdit *w = static_cast(Settings::instance()->createShortcutEditOptionHandle(&option).second); + if(!w) + return; + + emit w->editingFinished(QKeySequence("Backspace")); + emit w->editingFinished(QKeySequence("Esc")); + emit w->editingFinished(QKeySequence("F4")); + emit w->editingFinished(QKeySequence("")); +} + +TEST_F(UT_Settings_Test, createShellConfigComboxOptionHandle) +{ + Stub stub; + stub.set((bool (QFile::*)() const)ADDR(QFile, exists), ut_file_exists); + + QSharedPointer option(new DSettingsOption, doDeleteLater); + option->setValue(QVariant("Ctrl+Shift+A")); + DComboBox *w = static_cast(Settings::instance()->createShellConfigComboxOptionHandle(option.data()).second); + if(!w) + return; + + const QString DEFAULT_SHELL = "$SHELL"; + emit option->valueChanged(DEFAULT_SHELL); + emit option->valueChanged("sh"); + emit w->currentTextChanged("zsh"); +} + +TEST_F(UT_Settings_Test, loadDefaultsWhenReinstall) +{ + Settings::instance()->loadDefaultsWhenReinstall(); + + emit Settings::instance()->settings->valueChanged("", ""); +} +TEST_F(UT_Settings_Test, handleWidthFont) +{ + Stub stub; + stub.set((int (QComboBox::*)(const QString &, Qt::MatchFlags) const)ADDR(DComboBox, findText), ut_combobox_findText); + + Settings::instance()->handleWidthFont(); + Settings::instance()->enableControlFlow(); +} + + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/settings/ut_shortcutmanager_test.cpp deepin-terminal-5.4.13/tests/src/settings/ut_shortcutmanager_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/settings/ut_shortcutmanager_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/settings/ut_shortcutmanager_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,163 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_shortcutmanager_test.h" + +#include "service.h" +#include "shortcutmanager.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +#include + +DCORE_USE_NAMESPACE + +UT_ShortcutManager_Test::UT_ShortcutManager_Test() +{ + //Service中默认已经初始化了ShortcutManager + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_shortcutManager = ShortcutManager::instance(); +} + +#ifdef UT_SHORTCUTMANAGER_TEST +TEST_F(UT_ShortcutManager_Test, createBuiltinShortcutsFromConfig) +{ + m_shortcutManager->createBuiltinShortcutsFromConfig(); +} + + +TEST_F(UT_ShortcutManager_Test, getCustomCommandActionList) +{ + QList &commandActionList = m_shortcutManager->getCustomCommandActionList(); + commandActionList.count(); +} + + +TEST_F(UT_ShortcutManager_Test, addCustomCommand) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + m_shortcutManager->addCustomCommand(*newAction); +} + +TEST_F(UT_ShortcutManager_Test, checkActionIsExist) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + m_shortcutManager->addCustomCommand(*newAction); + m_shortcutManager->checkActionIsExist(*newAction); +} + + +TEST_F(UT_ShortcutManager_Test, checkActionIsExistForModify) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + m_shortcutManager->checkActionIsExistForModify(*newAction); +} + +TEST_F(UT_ShortcutManager_Test, findActionByKey) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + m_shortcutManager->findActionByKey(cmdName); +} + + +TEST_F(UT_ShortcutManager_Test, isShortcutConflictInCustom) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + + m_shortcutManager->isShortcutConflictInCustom(cmdName, shortcutKey); +} + +bool stub_checkShortcutValid(const QString &Name, const QString &Key, QString &Reason) +{ + Q_UNUSED(Name) + Q_UNUSED(Key) + Q_UNUSED(Reason) + return false; +} + +bool stub_showShortcutConflictMsgbox(QString txt) +{ + Q_UNUSED(txt) + return true; +} + +TEST_F(UT_ShortcutManager_Test, isValidShortcut) +{ + Stub s; + s.set(ADDR(ShortcutManager, checkShortcutValid), stub_checkShortcutValid); + s.set(ADDR(Utils, showShortcutConflictMsgbox), stub_showShortcutConflictMsgbox); + + QString newCmdName = QString("cmd_new_%1").arg(Utils::getRandString()); + QString forCheckShortcutKey = QString("Ctrl+Alt+Shift+Tab+T"); + m_shortcutManager->isValidShortcut(newCmdName, forCheckShortcutKey); + + s.reset(ADDR(ShortcutManager, checkShortcutValid)); + s.reset(ADDR(Utils, showShortcutConflictMsgbox)); +} + +TEST_F(UT_ShortcutManager_Test, checkShortcutValid) +{ + QString key = QString(QChar('A')); + QString shortcutKey = QString("Ctrl+Shift+%1").arg(key); + QString cmdName = QString("cmd_001"); + QAction *newAction = new QAction; + newAction->setText(cmdName); + newAction->setShortcut(QKeySequence(shortcutKey)); + + QString reason; + m_shortcutManager->checkShortcutValid(cmdName, shortcutKey, reason); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/settings/ut_shortcutmanager_test.h deepin-terminal-5.4.13/tests/src/settings/ut_shortcutmanager_test.h --- deepin-terminal-5.0.0+ds1/tests/src/settings/ut_shortcutmanager_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/settings/ut_shortcutmanager_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_SHORTCUTMANAGER_TEST_H +#define UT_SHORTCUTMANAGER_TEST_H + +#include "ut_defines.h" + +#include + +class ShortcutManager; +class UT_ShortcutManager_Test : public ::testing::Test +{ +public: + UT_ShortcutManager_Test(); + +private: + ShortcutManager *m_shortcutManager; +}; + +#endif // UT_SHORTCUTMANAGER_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/stub.h deepin-terminal-5.4.13/tests/src/stub.h --- deepin-terminal-5.0.0+ds1/tests/src/stub.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/stub.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,290 @@ +#ifndef __STUB_H__ +#define __STUB_H__ + + +#ifdef _WIN32 +//windows +#include +#include +#else +//linux +#include +#include +#endif +//c +#include +#include +//c++ +#include + + +#define ADDR(CLASS_NAME,MEMBER_NAME) (&CLASS_NAME::MEMBER_NAME) + +/********************************************************** + replace function +**********************************************************/ +#ifdef _WIN32 +#define CACHEFLUSH(addr, size) FlushInstructionCache(GetCurrentProcess(), addr, size) +#else +#define CACHEFLUSH(addr, size) __builtin___clear_cache(addr, addr + size) +#endif + +#if defined(__aarch64__) || defined(_M_ARM64) + #define CODESIZE 16U + #define CODESIZE_MIN 16U + #define CODESIZE_MAX CODESIZE + // ldr x9, +8 + // br x9 + // addr + #define REPLACE_FAR(t, fn, fn_stub)\ + ((uint32_t*)fn)[0] = 0x58000040 | 9;\ + ((uint32_t*)fn)[1] = 0xd61f0120 | (9 << 5);\ + *(long long *)(fn + 8) = (long long )fn_stub;\ + CACHEFLUSH((char *)fn, CODESIZE); + #define REPLACE_NEAR(t, fn, fn_stub) REPLACE_FAR(t, fn, fn_stub) +#elif defined(__arm__) || defined(_M_ARM) + #define CODESIZE 8U + #define CODESIZE_MIN 8U + #define CODESIZE_MAX CODESIZE + // ldr pc, [pc, #-4] + #define REPLACE_FAR(t, fn, fn_stub)\ + ((uint32_t*)fn)[0] = 0xe51ff004;\ + ((uint32_t*)fn)[1] = (uint32_t)fn_stub;\ + CACHEFLUSH((char *)fn, CODESIZE); + #define REPLACE_NEAR(t, fn, fn_stub) REPLACE_FAR(t, fn, fn_stub) +#elif defined(__thumb__) || defined(_M_THUMB) + #error "Thumb is not supported" +#else //__i386__ _x86_64__ + #define CODESIZE 13U + #define CODESIZE_MIN 5U + #define CODESIZE_MAX CODESIZE + //13 byte(jmp m16:64) + //movabs $0x102030405060708,%r11 + //jmpq *%r11 + #define REPLACE_FAR(t, fn, fn_stub)\ + *fn = 0x49;\ + *(fn + 1) = 0xbb;\ + *(long long *)(fn + 2) = (long long)fn_stub;\ + *(fn + 10) = 0x41;\ + *(fn + 11) = 0xff;\ + *(fn + 12) = 0xe3;\ + //CACHEFLUSH((char *)fn, CODESIZE); + + //5 byte(jmp rel32) + #define REPLACE_NEAR(t, fn, fn_stub)\ + *fn = 0xE9;\ + *(int *)(fn + 1) = (int)(fn_stub - fn - CODESIZE_MIN);\ + //CACHEFLUSH((char *)fn, CODESIZE); +#endif + +struct func_stub +{ + char *fn; + unsigned char code_buf[CODESIZE]; + bool far_jmp; +}; + +class Stub +{ +public: + Stub() + { +#ifdef _WIN32 + SYSTEM_INFO sys_info; + GetSystemInfo(&sys_info); + m_pagesize = sys_info.dwPageSize; +#else + m_pagesize = sysconf(_SC_PAGE_SIZE); +#endif + + if (m_pagesize < 0) + { + m_pagesize = 4096; + } + } + ~Stub() + { + std::map::iterator iter; + struct func_stub *pstub; + for(iter=m_result.begin(); iter != m_result.end(); iter++) + { + pstub = iter->second; +#ifdef _WIN32 + DWORD lpflOldProtect; + if(0 != VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READWRITE, &lpflOldProtect)) +#else + if (0 == mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_WRITE | PROT_EXEC)) +#endif + { + + if(pstub->far_jmp) + { + std::memcpy(pstub->fn, pstub->code_buf, CODESIZE_MAX); + } + else + { + std::memcpy(pstub->fn, pstub->code_buf, CODESIZE_MIN); + } + +#ifdef _WIN32 + VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READ, &lpflOldProtect); +#else + mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_EXEC); +#endif + } + + iter->second = NULL; + delete pstub; + } + + return; + } + template + void set(T addr, S addr_stub) + { + char * fn; + char * fn_stub; + fn = addrof(addr); + fn_stub = addrof(addr_stub); + struct func_stub *pstub; + pstub = new func_stub; + //start + pstub->fn = fn; + + if(distanceof(fn, fn_stub)) + { + pstub->far_jmp = true; + std::memcpy(pstub->code_buf, fn, CODESIZE_MAX); + } + else + { + pstub->far_jmp = false; + std::memcpy(pstub->code_buf, fn, CODESIZE_MIN); + } + +#ifdef _WIN32 + DWORD lpflOldProtect; + if(0 == VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READWRITE, &lpflOldProtect)) +#else + if (-1 == mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_WRITE | PROT_EXEC)) +#endif + { + throw("stub set memory protect to w+r+x faild"); + } + + if(pstub->far_jmp) + { + REPLACE_FAR(this, fn, fn_stub); + } + else + { + REPLACE_NEAR(this, fn, fn_stub); + } + + +#ifdef _WIN32 + if(0 == VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READ, &lpflOldProtect)) +#else + if (-1 == mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_EXEC)) +#endif + { + throw("stub set memory protect to r+x failed"); + } + m_result.insert(std::pair(fn,pstub)); + return; + } + + template + void reset(T addr) + { + char * fn; + fn = addrof(addr); + + std::map::iterator iter = m_result.find(fn); + + if (iter == m_result.end()) + { + return; + } + struct func_stub *pstub; + pstub = iter->second; + +#ifdef _WIN32 + DWORD lpflOldProtect; + if(0 == VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READWRITE, &lpflOldProtect)) +#else + if (-1 == mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_WRITE | PROT_EXEC)) +#endif + { + throw("stub reset memory protect to w+r+x faild"); + } + + if(pstub->far_jmp) + { + std::memcpy(pstub->fn, pstub->code_buf, CODESIZE_MAX); + } + else + { + std::memcpy(pstub->fn, pstub->code_buf, CODESIZE_MIN); + } + + +#ifdef _WIN32 + if(0 == VirtualProtect(pageof(pstub->fn), m_pagesize * 2, PAGE_EXECUTE_READ, &lpflOldProtect)) +#else + if (-1 == mprotect(pageof(pstub->fn), m_pagesize * 2, PROT_READ | PROT_EXEC)) +#endif + { + throw("stub reset memory protect to r+x failed"); + } + m_result.erase(iter); + delete pstub; + + return; + } +private: + char *pageof(char* addr) + { +#ifdef _WIN32 + return (char *)((unsigned long long)addr & ~(m_pagesize - 1)); +#else + return (char *)((unsigned long)addr & ~(m_pagesize - 1)); +#endif + } + + template + char* addrof(T addr) + { + union + { + T _s; + char* _d; + }ut; + ut._s = addr; + return ut._d; + } + + bool distanceof(char* addr, char* addr_stub) + { + std::ptrdiff_t diff = addr_stub >= addr ? addr_stub - addr : addr - addr_stub; + if((sizeof(addr) > 4) && (((diff >> 31) - 1) > 0)) + { + return true; + } + return false; + } + +private: +#ifdef _WIN32 + //LLP64 + long long m_pagesize; +#else + //LP64 + long m_pagesize; +#endif + std::map m_result; + +}; + + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_customthemesettingdialog_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_customthemesettingdialog_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_customthemesettingdialog_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_customthemesettingdialog_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_customthemesettingdialog_test.h" +#include "customthemesettingdialog.h" +#include "../stub.h" + +// DTK +#include +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +UT_ColorPushButton_Test::UT_ColorPushButton_Test() +{ +} + +void UT_ColorPushButton_Test::SetUp() +{ +} + +void UT_ColorPushButton_Test::TearDown() +{ +} + +#ifdef UT_COLORSCHEME_TEST + +TEST_F(UT_ColorPushButton_Test, paintEvent) +{ + ColorPushButton colorPushBtn; +// colorPushBtn.resize(200, 30); + colorPushBtn.grab(); + colorPushBtn.m_isFocus = true; + colorPushBtn.grab(); +// QPaintEvent *event = new QPaintEvent(colorPushBtn.rect()); + +// colorPushBtn.paintEvent(event); + +// colorPushBtn.m_isFocus = true; +// colorPushBtn.paintEvent(event); + +// delete event; +} + +/******************************************************************************* + 1. @函数: focusEvent + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 测试焦点事件 +*******************************************************************************/ +TEST_F(UT_ColorPushButton_Test, focusEvent) +{ + // 初始化button + ColorPushButton colorPushBtn; + colorPushBtn.show(); + + // 焦点进入 + QFocusEvent focusIn(QEvent::FocusIn, Qt::TabFocusReason); + colorPushBtn.focusInEvent(&focusIn); + + QFocusEvent focusIn1(QEvent::FocusIn, Qt::ActiveWindowFocusReason); + colorPushBtn.m_isFocus = true; + colorPushBtn.focusInEvent(&focusIn1); + + // 焦点出 + QFocusEvent focusOut(QEvent::FocusOut, Qt::TabFocusReason); + colorPushBtn.focusOutEvent(&focusOut); +} +#endif + +UT_CustomThemeSettingDialog_Test::UT_CustomThemeSettingDialog_Test() +{ +} + +void UT_CustomThemeSettingDialog_Test::SetUp() +{ +} + +void UT_CustomThemeSettingDialog_Test::TearDown() +{ +} + +#ifdef UT_CUSTOMTHEMESETTINGDIALOG_TEST +/******************************************************************************* + 1. @函数: CustomThemeSettingDialog + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 自定义主题设置弹窗初始化 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, CustomThemeSettingDialog) +{ + // 初始化界面 + CustomThemeSettingDialog dialog; + dialog.show(); + // 弹窗显示 + EXPECT_EQ(dialog.isVisible(), true); + // 标签有值 + EXPECT_EQ(dialog.m_titleText->text().isEmpty(), false); + qDebug() << "CustomThemeSettingDialog title : " << dialog.m_titleText->text(); + + // 主题变化 => 弹窗字体颜色变化 + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::DarkType); + emit DApplicationHelper::instance()->themeTypeChanged(DApplicationHelper::LightType); +} + +/******************************************************************************* + 1. @函数: resetFocusState + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 测试reset后的焦点状态 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, resetFocusState) +{ + // 初始化界面 + CustomThemeSettingDialog dialog; + dialog.show(); + + // 重置焦点状态 + dialog.resetFocusState(); + EXPECT_EQ(dialog.m_darkRadioButton->focusPolicy(), Qt::TabFocus); + dialog.onSelectColor(); +} + + +TEST_F(UT_CustomThemeSettingDialog_Test, clearFocussSlot) +{ + CustomThemeSettingDialog *customThemeSettingDialog = new CustomThemeSettingDialog; + EXPECT_NE(customThemeSettingDialog, nullptr); + + customThemeSettingDialog->clearFocussSlot(); + + delete customThemeSettingDialog; +} + +QStringList ut_toStringList(){ + return QStringList() << "1" << "2"; +} + +/******************************************************************************* + 1. @函数: loadConfiguration + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 加载主题配置文件 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, loadConfiguration) +{ + // 自定义主题弹窗 + CustomThemeSettingDialog dialog; + dialog.show(); + + // 最好能重新设置配置文件然后再加载调用的函数 + // 重新加载配置文件 + Stub stub; + stub.set(ADDR(QVariant,toStringList),ut_toStringList); + dialog.loadConfiguration(); + dialog.update(); +} + +/******************************************************************************* + 1. @函数: keyPressEvent + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 键盘事件 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, keyPressEvent) +{ + // 自定义主题弹窗 + CustomThemeSettingDialog dialog; + dialog.show(); +} + +/******************************************************************************* + 1. @函数: showEvent + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 显示事件 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, showEvent) +{ + CustomThemeSettingDialog dialog; + dialog.m_foregroundButton->m_isFocus = true; + + // 调用函数 + QShowEvent event; + dialog.showEvent(&event); + + EXPECT_EQ(dialog.m_foregroundButton->m_isFocus, false); +} + +/******************************************************************************* + 1. @函数: click + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-25 + 4. @说明: 测试部分点击事件 +*******************************************************************************/ +TEST_F(UT_CustomThemeSettingDialog_Test, click) +{ + // 初始化弹窗 + CustomThemeSettingDialog dialog; + dialog.show(); + + // 测试点击事件 + QTest::mouseClick(dialog.m_darkRadioButton, Qt::LeftButton, Qt::NoModifier); + // 鼠标事件中true,lambda表达式中将true改为false + EXPECT_EQ(dialog.m_darkRadioButton->m_mouseClick, false); + QTest::mouseClick(dialog.m_lightRadioButton, Qt::LeftButton, Qt::NoModifier); + // 鼠标事件中true,lambda表达式中将true改为false + EXPECT_EQ(dialog.m_darkRadioButton->m_mouseClick, false); + + QTest::mouseClick(dialog.m_cancelBtn, Qt::LeftButton, Qt::NoModifier); + QTest::mouseClick(dialog.m_confirmBtn, Qt::LeftButton, Qt::NoModifier); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_customthemesettingdialog_test.h deepin-terminal-5.4.13/tests/src/views/ut_customthemesettingdialog_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_customthemesettingdialog_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_customthemesettingdialog_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: sunchengxi + * + * Maintainer: sunchengxi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_CUSTOMTHEMESETTINGDIALOG_TEST_H +#define UT_CUSTOMTHEMESETTINGDIALOG_TEST_H + +#include "ut_defines.h" + +#include + +class UT_ColorPushButton_Test : public ::testing::Test +{ +public: + UT_ColorPushButton_Test(); + virtual void SetUp(); + virtual void TearDown(); +}; + +class UT_CustomThemeSettingDialog_Test : public ::testing::Test +{ +public: + UT_CustomThemeSettingDialog_Test(); + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_CUSTOMTHEMESETTINGDIALOG_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_focusframe_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_focusframe_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_focusframe_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_focusframe_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_focusframe_test.h" + +#include "focusframe.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +UT_FocusFrame_Test::UT_FocusFrame_Test() +{ +} + +void UT_FocusFrame_Test::SetUp() +{ +} + +void UT_FocusFrame_Test::TearDown() +{ +} + +#ifdef UT_FOCUSFRAME_TEST + +TEST_F(UT_FocusFrame_Test, paintEvent) +{ + FocusFrame frame; + frame.resize(50, 50); + frame.m_isFocus = true; + QPaintEvent *event = new QPaintEvent(frame.rect()); + + frame.paintEvent(event); + + delete event; +} + +TEST_F(UT_FocusFrame_Test, enterEvent) +{ + FocusFrame frame; + frame.resize(50, 50); + + QEvent *event = new QEvent(QEvent::Enter); + + frame.enterEvent(event); + + delete event; +} + +TEST_F(UT_FocusFrame_Test, leaveEvent) +{ + FocusFrame frame; + frame.resize(50, 50); + + QEvent *event = new QEvent(QEvent::Leave); + + frame.leaveEvent(event); + + delete event; +} + +TEST_F(UT_FocusFrame_Test, focusInEvent) +{ + FocusFrame frame; + frame.resize(50, 50); + + QFocusEvent *event = new QFocusEvent(QEvent::FocusIn); + + frame.focusInEvent(event); + + delete event; +} + +TEST_F(UT_FocusFrame_Test, focusOutEvent) +{ + FocusFrame frame; + frame.resize(50, 50); + + QFocusEvent *event = new QFocusEvent(QEvent::FocusOut); + + frame.focusOutEvent(event); + + delete event; +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_focusframe_test.h deepin-terminal-5.4.13/tests/src/views/ut_focusframe_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_focusframe_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_focusframe_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_FOCUSFRAME_TEST_H +#define UT_FOCUSFRAME_TEST_H + +#include "ut_defines.h" + +#include + +class UT_FocusFrame_Test : public ::testing::Test +{ +public: + UT_FocusFrame_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_FOCUSFRAME_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_iconbutton_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_iconbutton_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_iconbutton_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_iconbutton_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_iconbutton_test.h" + +#include "iconbutton.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +UT_IconButton_Test::UT_IconButton_Test() +{ +} + +void UT_IconButton_Test::SetUp() +{ +} + +void UT_IconButton_Test::TearDown() +{ +} + +#ifdef UT_ICONBUTTON_TEST +TEST_F(UT_IconButton_Test, IconButton) +{ + IconButton *iconButton = new IconButton(nullptr); + EXPECT_NE(iconButton, nullptr); + + delete iconButton; +} + +/******************************************************************************* + 1. @函数: keyPressEvent + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 测试函数是否正确执行 +*******************************************************************************/ +TEST_F(UT_IconButton_Test, keyPressEvent) +{ + // 创建iconbutton + IconButton *iconButton = new IconButton(nullptr); + iconButton->show(); + // 发送键盘按键 + // 右键 + QKeyEvent keyRigth(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier); + iconButton->keyPressEvent(&keyRigth); + // 上键 + QKeyEvent keyUp(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier); + iconButton->keyPressEvent(&keyUp); + // 下键 + QKeyEvent keyDown(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier); + iconButton->keyPressEvent(&keyDown); + // 左键 + QKeyEvent keyLeft(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier); + iconButton->keyPressEvent(&keyLeft); + // 其他按键 + QKeyEvent keyOther(QEvent::KeyPress, Qt::Key_W, Qt::NoModifier); + iconButton->keyPressEvent(&keyOther); + + delete iconButton; +} + +/******************************************************************************* + 1. @函数: focusOutEvent + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-08 + 4. @说明: 焦点切出 +*******************************************************************************/ +TEST_F(UT_IconButton_Test, focusOutEvent) +{ + // 创建iconbutton + IconButton *iconButton = new IconButton(nullptr); + iconButton->show(); + + // 丢失焦点 + QFocusEvent foucsOut(QEvent::FocusOut, Qt::TabFocusReason); + iconButton->focusOutEvent(&foucsOut); + EXPECT_EQ(iconButton->hasFocus(), false); + + delete iconButton; +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_iconbutton_test.h deepin-terminal-5.4.13/tests/src/views/ut_iconbutton_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_iconbutton_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_iconbutton_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_ICONBUTTON_TEST_H +#define UT_ICONBUTTON_TEST_H + +#include "ut_defines.h" + +#include + +class UT_IconButton_Test : public ::testing::Test +{ +public: + UT_IconButton_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_ICONBUTTON_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_itemwidget_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_itemwidget_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_itemwidget_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_itemwidget_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,345 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_itemwidget_test.h" + +#include "itemwidget.h" + +//Google GTest 相关头文件 +#include + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +UT_ItemWidget_Test::UT_ItemWidget_Test() +{ +} + +void UT_ItemWidget_Test::SetUp() +{ +} + +void UT_ItemWidget_Test::TearDown() +{ +} + +#ifdef UT_ITEMWIDGET_TEST + +TEST_F(UT_ItemWidget_Test, setIcon) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + itemWidget->setIcon("deepin-terminal"); + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, setFuncIcon) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + itemWidget->setFuncIcon(ItemFuncType::ItemFuncType_Group); + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, setText) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + QString firstText = "name"; + QString secondText = "content"; + itemWidget->setText(firstText, secondText); + + EXPECT_EQ(itemWidget->m_firstText, firstText); + EXPECT_EQ(itemWidget->m_secondText, secondText); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, isEqual) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + QString firstText = "isEqual"; + itemWidget->setText(firstText); + + bool isEqual = itemWidget->isEqual(ItemFuncType_Item, firstText); + EXPECT_EQ(isEqual, true); + + isEqual = itemWidget->isEqual(ItemFuncType_Group, firstText); + EXPECT_EQ(isEqual, false); + + firstText = "NotEqual"; + isEqual = itemWidget->isEqual(ItemFuncType_Group, firstText); + EXPECT_EQ(isEqual, false); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, getFocus) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->getFocus(); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, lostFocus) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->lostFocus(); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, setFont) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->setFont(itemWidget->m_firstline, DFontSizeManager::T7, ItemTextColor_Text); + EXPECT_EQ(itemWidget->m_firstline->font().pixelSize(), DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T7)); + + itemWidget->setFont(itemWidget->m_secondline, DFontSizeManager::T8, ItemTextColor_TextTips); + EXPECT_EQ(itemWidget->m_secondline->font().pixelSize(), DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T8)); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, setFontSize) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->setFontSize(itemWidget->m_firstline, DFontSizeManager::T6); + EXPECT_EQ(itemWidget->m_firstline->font().pixelSize(), DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T6)); + + itemWidget->setFontSize(itemWidget->m_secondline, DFontSizeManager::T9); + EXPECT_EQ(itemWidget->m_secondline->font().pixelSize(), DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T9)); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, setFontColor) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->setFontColor(itemWidget->m_firstline, ItemTextColor::ItemTextColor_Text); + DPalette firstPalette = DApplicationHelper::instance()->palette(itemWidget->m_firstline); + EXPECT_EQ(firstPalette.color(DPalette::Text), itemWidget->getColor(ItemTextColor::ItemTextColor_Text)); + + itemWidget->setFontColor(itemWidget->m_secondline, ItemTextColor::ItemTextColor_TextTips); + DPalette secondPalette = DApplicationHelper::instance()->palette(itemWidget->m_secondline); + EXPECT_EQ(secondPalette.color(DPalette::Text), itemWidget->getColor(ItemTextColor::ItemTextColor_TextTips)); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, getColor) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, onFuncButtonClicked) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->onFuncButtonClicked(); + + QObject *moveSource = new QObject(); + itemWidget->m_moveSource = moveSource; + itemWidget->onFuncButtonClicked(); + + itemWidget->m_functType = ItemFuncType_Item; + itemWidget->onFuncButtonClicked(); + + delete moveSource; + itemWidget->m_moveSource = nullptr; + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, slotThemeChange) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->slotThemeChange(DApplicationHelper::LightType); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, onIconButtonClicked) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->onIconButtonClicked(); + + QObject *moveSource = new QObject(); + itemWidget->m_moveSource = moveSource; + itemWidget->onIconButtonClicked(); + + itemWidget->m_functType = ItemFuncType_Item; + itemWidget->onIconButtonClicked(); + + delete moveSource; + itemWidget->m_moveSource = nullptr; + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, onItemClicked) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->onItemClicked(); + + QObject *moveSource = new QObject(); + itemWidget->m_moveSource = moveSource; + + itemWidget->m_functType = ItemFuncType_Group; + itemWidget->onItemClicked(); + + itemWidget->m_functType = ItemFuncType_Item; + itemWidget->onItemClicked(); + + itemWidget->onFocusReback(); + + delete moveSource; + itemWidget->m_moveSource = nullptr; + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, rightKeyPress) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->rightKeyPress(); + + itemWidget->m_functType = ItemFuncType_Item; + itemWidget->rightKeyPress(); + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, paintEvent) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->resize(50, 50); + itemWidget->show(); + + QPaintEvent *event = new QPaintEvent(itemWidget->rect()); + itemWidget->paintEvent(event); + if (event) { + delete event; + } + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, mousePressEvent) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->resize(50, 50); + itemWidget->show(); + + QMouseEvent *event = new QMouseEvent(QMouseEvent::MouseButtonPress, QPointF(5, 5), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + itemWidget->mousePressEvent(event); + if (event) { + delete event; + } + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, mouseReleaseEvent) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->resize(50, 50); + itemWidget->show(); + + QMouseEvent *event = new QMouseEvent(QMouseEvent::MouseButtonPress, QPointF(5, 5), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + itemWidget->mousePressEvent(event); + if (event) { + delete event; + } + + event = new QMouseEvent(QMouseEvent::MouseButtonRelease, QPointF(5, 5), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + itemWidget->mouseReleaseEvent(event); + if (event) { + delete event; + } + + delete itemWidget; +} + +TEST_F(UT_ItemWidget_Test, keyPressEvent) +{ + ItemWidget *itemWidget = new ItemWidget(ItemFuncType::ItemFuncType_Item, nullptr); + EXPECT_NE(itemWidget, nullptr); + + itemWidget->resize(50, 50); + itemWidget->show(); + + // 发送键盘按键 + // 右键 + QKeyEvent keyRight(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier); + itemWidget->keyPressEvent(&keyRight); + // Enter键 + QKeyEvent keyEnter(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); + itemWidget->keyPressEvent(&keyEnter); + // Return键 + QKeyEvent keyReturn(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier); + itemWidget->keyPressEvent(&keyReturn); + // Space键 + QKeyEvent keySpace(QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier); + itemWidget->keyPressEvent(&keySpace); + // 其他按键 + QKeyEvent keyOther(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier); + itemWidget->keyPressEvent(&keyOther); + + delete itemWidget; +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_itemwidget_test.h deepin-terminal-5.4.13/tests/src/views/ut_itemwidget_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_itemwidget_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_itemwidget_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_ITEMWIDGET_TEST_H +#define UT_ITEMWIDGET_TEST_H + +#include "ut_defines.h" + +#include + +class UT_ItemWidget_Test : public ::testing::Test +{ +public: + UT_ItemWidget_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_ITEMWIDGET_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_listview_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_listview_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_listview_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_listview_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,309 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_listview_test.h" + +#include "itemwidget.h" +#include "listview.h" +#include "customcommandpanel.h" +#include "remotemanagementpanel.h" +#include "utils.h" +#include "shortcutmanager.h" +#include "customcommandoptdlg.h" +#include "service.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include + + +UT_ListView_Test::UT_ListView_Test() +{ +} + +void UT_ListView_Test::SetUp() +{ +} + +void UT_ListView_Test::TearDown() +{ +} + +#ifdef UT_LISTVIEW_TEST + +TEST_F(UT_ListView_Test, CustomCommandListViewTest) +{ + ListView cmdListWidget(ListType_Custom, nullptr); + cmdListWidget.resize(242, 600); + cmdListWidget.show(); + + QList cmdActionList; + const int cmdCount = 10; + for (int i = 0; i <= cmdCount; i++) { + QString key = QString(QChar('A' + i)); + QAction *newAction = new QAction; + newAction->setText(QString("cmd_%1").arg(i)); + newAction->setShortcut(QKeySequence(QString("Ctrl+Shift+%1").arg(key))); + cmdListWidget.addItem(ItemFuncType_Item, newAction->text(), newAction->shortcut().toString()); + + cmdActionList.append(newAction); + ShortcutManager::instance()->addCustomCommand(*newAction); + } + + emit Service::instance()->refreshCommandPanel("", ""); + + EXPECT_EQ(cmdActionList.isEmpty(), false); + + QAction *firstAction = cmdActionList.first(); + QString firstCmdName = firstAction->text(); + EXPECT_EQ(firstCmdName, QString("cmd_%1").arg(0)); + + QAction *lastAction = cmdActionList.last(); + QString lastCmdName = lastAction->text(); + EXPECT_EQ(lastCmdName, QString("cmd_%1").arg(cmdCount)); + + cmdListWidget.removeItem(ItemFuncType_Item, firstCmdName); + EXPECT_EQ(cmdListWidget.count(), cmdActionList.size() - 1); + + QString updateCmdName = Utils::getRandString().toLower(); + cmdListWidget.updateItem(ItemFuncType_Item, lastCmdName, updateCmdName); + + QList itemWidgetList = cmdListWidget.m_itemList; + ItemWidget *lastItemWidget = itemWidgetList.last(); + + cmdListWidget.onCustomItemModify("cmd_0", false); + + cmdListWidget.onCustomItemModify("cmd_0", true); + + cmdListWidget.getWidgetIndex(lastItemWidget); + + //释放内存 + for (int i = 0; i < cmdActionList.size(); i++) { + QAction *action = cmdActionList.at(i); + delete action; + } +} + +TEST_F(UT_ListView_Test, onRemoteItemModify) +{ + ListView remoteListWidget(ListType_Custom, nullptr); + remoteListWidget.resize(242, 600); + remoteListWidget.show(); + + ServerConfigManager *serverConfigManager = ServerConfigManager::instance(); + QList remoteServerList; + const int remoteCount = 8; + for (int i = 0; i <= remoteCount; i++) { + + ServerConfig *config = new ServerConfig(); + config->m_serverName = QString("server_%1").arg(i); + config->m_address = QString("192.168.10.%1").arg(qrand() % 255); + config->m_userName = QString("%1").arg(Utils::getRandString()); + config->m_password = QString("123"); + config->m_privateKey = QString(""); + config->m_port = QString(""); + config->m_group = QString(""); + config->m_path = QString(""); + config->m_command = QString(""); + config->m_encoding = QString(""); + config->m_backspaceKey = QString(""); + config->m_deleteKey = QString(""); + + serverConfigManager->saveServerConfig(config); + + remoteListWidget.addItem(ItemFuncType_Item, config->m_serverName, config->m_address); + + remoteServerList.append(config); + } + + remoteListWidget.onRemoteItemModify("server_0", false); + + // 清理不用的数据 + for (ServerConfig *item : remoteServerList) { + if (item->m_serverName.contains("server_")) { + remoteServerList.removeOne(item); + qDebug() << "####### delete " << item->m_serverName; + // 删除测试数据 + ServerConfigManager::instance()->delServerConfig(item); + } + } +} + +TEST_F(UT_ListView_Test, setFocusFromeIndex) +{ + ListView listWidget(ListType_Custom, nullptr); + listWidget.resize(242, 600); + listWidget.show(); + + const int count = 10; + for (int i = 0; i <= count; i++) { + QString key = QString(QChar('A' + i)); + QAction *newAction = new QAction; + newAction->setText(QString("cmd_%1").arg(i)); + newAction->setShortcut(QKeySequence(QString("Ctrl+Shift+%1").arg(key))); + listWidget.addItem(ItemFuncType_Item, newAction->text(), newAction->shortcut().toString()); + + ShortcutManager::instance()->addCustomCommand(*newAction); + } + + listWidget.setFocusFromeIndex(0, ListFocusUp); + + listWidget.setFocusFromeIndex(0, ListFocusDown); + + listWidget.setFocusFromeIndex(0, ListFocusHome); + + listWidget.setFocusFromeIndex(0, ListFocusEnd); +} + +//为测试onCustomCommandOptDlgFinished打桩 +QAction *stub_getCurCustomCmd() +{ + return ShortcutManager::instance()->getCustomCommandActionList().first(); +} + +//为测试onCustomCommandOptDlgFinished打桩 +void stub_setIsDialogShow(QWidget *parent, bool isDialogShow) +{ + Q_UNUSED(parent) + Q_UNUSED(isDialogShow) +} + +bool stub_isDelCurCommand() +{ + return true; +} + +/******************************************************************************* + 1. @函数: onCustomCommandOptDlgFinished + 2. @作者: ut000438 王亮 + 3. @日期: 2021-02-09 + 4. @说明: onCustomCommandOptDlgFinished单元测试 +*******************************************************************************/ +TEST_F(UT_ListView_Test, onCustomCommandOptDlgFinished) +{ + ListView listWidget(ListType_Custom, nullptr); + + const int count = 3; + for (int i = 0; i <= count; i++) { + QString key = QString(QChar('A' + i)); + QAction *newAction = new QAction; + newAction->setText(QString("cmd_%1").arg(i)); + newAction->setShortcut(QKeySequence(QString("Ctrl+Shift+%1").arg(key))); + listWidget.addItem(ItemFuncType_Item, newAction->text(), newAction->shortcut().toString()); + + ShortcutManager::instance()->addCustomCommand(*newAction); + } + + QAction *firstAction = ShortcutManager::instance()->getCustomCommandActionList().first(); + CustomCommandData itemData; + itemData.m_cmdName = firstAction->text() + "_modify"; + itemData.m_cmdText = firstAction->data().toString() + "_modify"; + itemData.m_cmdShortcut = firstAction->shortcut().toString() + "_modify"; + + Stub s; + s.set(ADDR(CustomCommandOptDlg, getCurCustomCmd), stub_getCurCustomCmd); + s.set(ADDR(Service, setIsDialogShow), stub_setIsDialogShow); + + listWidget.m_pdlg = new CustomCommandOptDlg(CustomCommandOptDlg::CCT_MODIFY, &itemData, nullptr); + listWidget.onCustomCommandOptDlgFinished(QDialog::Accepted); + + s.set(ADDR(CustomCommandOptDlg, isDelCurCommand), stub_isDelCurCommand); + + listWidget.onCustomCommandOptDlgFinished(QDialog::Rejected); + + // 打桩还原 + s.reset(ADDR(CustomCommandOptDlg, isDelCurCommand)); + + s.reset(ADDR(CustomCommandOptDlg, getCurCustomCmd)); + s.reset(ADDR(Service, setIsDialogShow)); + + listWidget.onGroupClicked("/",true); +} + +ServerConfig* generateNewServerConfig() +{ + ServerConfig *config = new ServerConfig(); + config->m_serverName = QStringLiteral("new_server_listview_test"); + config->m_address = QStringLiteral("192.168.10.%1").arg(qrand() % 255); + config->m_userName = QStringLiteral("server_user"); + config->m_password = QStringLiteral("123456"); + config->m_privateKey = QStringLiteral(""); + config->m_port = QStringLiteral(""); + config->m_group = QStringLiteral("new group"); + config->m_path = QStringLiteral(""); + config->m_command = QStringLiteral(""); + config->m_encoding = QStringLiteral(""); + config->m_backspaceKey = QStringLiteral(""); + config->m_deleteKey = QStringLiteral(""); + + ServerConfigManager::instance()->saveServerConfig(config); + + ServerConfigManager::instance()->getServerCount(config->m_group); + + ServerConfig *currConfig = ServerConfigManager::instance()->getServerConfig(config->m_serverName); + return currConfig; +} + +//用于onServerConfigOptDlgFinished函数单元测试打桩 +void stub_focusCurrentPage_listview() +{ +} + +//用于onServerConfigOptDlgFinished函数单元测试打桩 +bool stub_isDelServer_true() +{ + return true; +} +//用于onServerConfigOptDlgFinished函数单元测试打桩 +bool stub_isDelServer_false() +{ + return false; +} + +TEST_F(UT_ListView_Test, onServerConfigOptDlgFinished) +{ + ListView listWidget(ListType_Custom, nullptr); + ServerConfig *curItemServer = generateNewServerConfig(); + listWidget.m_configDialog = new ServerConfigOptDlg(ServerConfigOptDlg::SCT_MODIFY, curItemServer, &listWidget); + + Stub s; + s.set(ADDR(MainWindow, focusCurrentPage), stub_focusCurrentPage_listview); + + listWidget.onServerConfigOptDlgFinished(ServerConfigOptDlg::Rejected); + + s.set(ADDR(ServerConfigOptDlg, isDelServer), stub_isDelServer_false); + listWidget.onServerConfigOptDlgFinished(ServerConfigOptDlg::Accepted); + s.reset(ADDR(ServerConfigOptDlg, isDelServer)); + + s.set(ADDR(ServerConfigOptDlg, isDelServer), stub_isDelServer_true); + listWidget.onServerConfigOptDlgFinished(ServerConfigOptDlg::Accepted); + s.reset(ADDR(ServerConfigOptDlg, isDelServer)); + + s.reset(ADDR(MainWindow, focusCurrentPage)); + + listWidget.onDeleteServerDialogFinished(DDialog::Accepted); + listWidget.onDeleteServerDialogFinished(DDialog::Rejected); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_listview_test.h deepin-terminal-5.4.13/tests/src/views/ut_listview_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_listview_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_listview_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_LISTVIEW_TEST_H +#define UT_LISTVIEW_TEST_H + +#include "ut_defines.h" + +#include + +class UT_ListView_Test : public ::testing::Test +{ +public: + UT_ListView_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); +}; + +#endif // UT_LISTVIEW_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_pagesearchbar_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_pagesearchbar_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_pagesearchbar_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_pagesearchbar_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_pagesearchbar_test.h" + +#include "pagesearchbar.h" +#include "termwidgetpage.h" +#include "service.h" +#include "utils.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +UT_PageSearchBar_Test::UT_PageSearchBar_Test() +{ +} + +void UT_PageSearchBar_Test::SetUp() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +void UT_PageSearchBar_Test::TearDown() +{ + delete m_normalWindow; +} + +#ifdef UT_PAGESEARCHBAR_TEST +TEST_F(UT_PageSearchBar_Test, PageSearchBarTest) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *termPage = m_normalWindow->currentPage(); + EXPECT_EQ(termPage->isVisible(), true); + + termPage->sendTextToCurrentTerm("ls -al\n"); + + PageSearchBar *searchBar = termPage->m_findBar; + termPage->showSearchBar(SearchBar_State::SearchBar_Show); + EXPECT_EQ(searchBar->isVisible(), true); + + QString placeHolder = searchBar->m_originalPlaceHolder; + searchBar->saveOldHoldContent(); + EXPECT_EQ(searchBar->m_searchEdit->placeHolder(), searchBar->m_originalPlaceHolder); + searchBar->clearHoldContent(); + EXPECT_EQ(searchBar->m_searchEdit->placeHolder().length(), 0); + searchBar->recoveryHoldContent(); + EXPECT_EQ(searchBar->m_searchEdit->placeHolder(), searchBar->m_originalPlaceHolder); + + QString searchTxt = searchBar->searchKeytxt(); + EXPECT_EQ(searchTxt.length(), 0); + + QString searchCmd = QString("rw"); + searchBar->m_searchEdit->setText(searchCmd); + EXPECT_EQ(searchBar->m_searchEdit->text().length(), searchCmd.length()); + + const int findNextCount = 2; + //查找下一个'rw'字符串 + DIconButton *findNextButton = searchBar->m_findNextButton; + QPoint clickPoint(3, 3); + for (int i = 0; i < findNextCount; i++) { + QSignalSpy spyNext(findNextButton, SIGNAL(clicked())); + EXPECT_EQ(spyNext.count(), 0); + QTest::mouseClick(findNextButton, Qt::LeftButton, Qt::NoModifier, clickPoint); + EXPECT_EQ(spyNext.count(), 1); + } + + const int findPrevCount = 2; + //查找前一个rw + for (int i = 0; i < findPrevCount; i++) { + DIconButton *findPrevButton = searchBar->m_findPrevButton; + QSignalSpy spyPrev(findPrevButton, SIGNAL(clicked())); + EXPECT_EQ(spyPrev.count(), 0); + QTest::mouseClick(findPrevButton, Qt::LeftButton, Qt::NoModifier, clickPoint); + EXPECT_EQ(spyPrev.count(), 1); + } +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_pagesearchbar_test.h deepin-terminal-5.4.13/tests/src/views/ut_pagesearchbar_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_pagesearchbar_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_pagesearchbar_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_PageSearchBar_Test_H +#define UT_PageSearchBar_Test_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_PageSearchBar_Test : public ::testing::Test +{ +public: + UT_PageSearchBar_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +public: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_PageSearchBar_Test_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabbar_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_tabbar_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabbar_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabbar_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,427 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_tabbar_test.h" + +#include "tabbar.h" +#include "utils.h" +#include "../stub.h" +#include "termwidgetpage.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include + +#include + +UT_Tabbar_Test::UT_Tabbar_Test() +{ +} + +void UT_Tabbar_Test::SetUp() +{ +} + +void UT_Tabbar_Test::TearDown() +{ +} + +QString UT_Tabbar_Test::generateUniqueId() +{ + return QUuid::createUuid().toString(); +} + +#ifdef UT_TABBAR_TEST +TEST_F(UT_Tabbar_Test, setTabHeight) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + int tabHeight = 36; + tabbar.setTabHeight(tabHeight); + EXPECT_EQ(tabbar.height(), 36); +} + +TEST_F(UT_Tabbar_Test, setTabItemMinWidth) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + int tabItemMinWidth = 110; + tabbar.setTabItemMinWidth(tabItemMinWidth); + EXPECT_EQ(tabbar.m_tabItemMinWidth, tabItemMinWidth); + +} + +TEST_F(UT_Tabbar_Test, setTabItemMaxWidth) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + int tabItemMaxWidth = 450; + tabbar.setTabItemMaxWidth(tabItemMaxWidth); + EXPECT_EQ(tabbar.m_tabItemMaxWidth, tabItemMaxWidth); +} + +TEST_F(UT_Tabbar_Test, addTab) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + EXPECT_EQ(tabbar.count(), tabCount); +} + +TEST_F(UT_Tabbar_Test, insertTab) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.insertTab(i, tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + EXPECT_EQ(tabbar.count(), tabCount); +} + +TEST_F(UT_Tabbar_Test, removeTab) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QObject::disconnect(&tabbar, &DTabBar::tabIsRemoved, nullptr, nullptr); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.insertTab(i, tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + EXPECT_EQ(tabbar.count(), tabCount); + + QString firstTabId = tabbar.identifier(0); + tabbar.removeTab(firstTabId); + + EXPECT_EQ(tabbar.count(), tabCount - 1); +} + + +TEST_F(UT_Tabbar_Test, identifier) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + int firstTabIndex = 0; + EXPECT_EQ(tabbar.identifier(firstTabIndex), tabIdList.first()); +} + +TEST_F(UT_Tabbar_Test, getIndexByIdentifier) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + int firstTabIndex = 0; + int tabIndex = tabbar.getIndexByIdentifier(tabIdList.first()); + EXPECT_EQ(tabIndex, firstTabIndex); +} + +TEST_F(UT_Tabbar_Test, setTabText) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + int firstTabIndex = 0; + QString tabText = QString("tab001"); + tabbar.setTabText(tabIdList.first(), tabText); + EXPECT_EQ(tabbar.tabText(firstTabIndex), tabText); +} + +TEST_F(UT_Tabbar_Test, getSessionIdTabIndexMap) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QMap sessionIdTabIndexMap = tabbar.getSessionIdTabIndexMap(); + EXPECT_EQ(sessionIdTabIndexMap.isEmpty(), true); +} + +TEST_F(UT_Tabbar_Test, saveSessionIdWithTabIndex) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + const int mapSize = 5; + for (int i = 0; i < mapSize; i++) { + tabbar.saveSessionIdWithTabIndex(i + 1, i); + } + + QMap sessionIdTabIndexMap = tabbar.getSessionIdTabIndexMap(); + EXPECT_EQ((mapSize == sessionIdTabIndexMap.size()), true); +} + +TEST_F(UT_Tabbar_Test, saveSessionIdWithTabId) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + const int mapSize = 5; + for (int i = 0; i < mapSize; i++) { + tabbar.saveSessionIdWithTabId(i, generateUniqueId()); + } + + QMap sessionIdTabIdMap = tabbar.m_sessionIdTabIdMap; + EXPECT_EQ((mapSize == sessionIdTabIdMap.size()), true); +} + +TEST_F(UT_Tabbar_Test, queryIndexBySessionId) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + const int mapSize = 5; + for (int i = 0; i < mapSize; i++) { + tabbar.saveSessionIdWithTabIndex(i + 1, i); + } + + int queryIndex = tabbar.queryIndexBySessionId(0); + EXPECT_EQ((queryIndex == -1), true); +} + +TEST_F(UT_Tabbar_Test, setChangeTextColor) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + QString firstTabId = tabbar.identifier(0); + tabbar.setChangeTextColor(firstTabId); +} + +TEST_F(UT_Tabbar_Test, setNeedChangeTextColor) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + QColor redColor = QColor(Qt::red); + + QString firstTabId = tabbar.identifier(0); + tabbar.setNeedChangeTextColor(firstTabId, redColor); +} + +TEST_F(UT_Tabbar_Test, removeNeedChangeTextColor) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + QString firstTabId = tabbar.identifier(0); + tabbar.setChangeTextColor(firstTabId); + + tabbar.removeNeedChangeTextColor(firstTabId); +} + +TEST_F(UT_Tabbar_Test, isNeedChangeTextColor) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + QColor redColor = QColor(Qt::red); + + QString firstTabId = tabbar.identifier(0); + tabbar.setNeedChangeTextColor(firstTabId, redColor); + + EXPECT_EQ(tabbar.isNeedChangeTextColor(firstTabId), true); +} + +TEST_F(UT_Tabbar_Test, setClearTabColor) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + QList tabIdList; + const int tabCount = 6; + for (int i = 0; i < tabCount; i++) { + QString tabName = QString("tab%1").arg(i); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + tabIdList.append(tabIdentifier); + } + + EXPECT_EQ(tabIdList.size(), tabCount); + + QString firstTabId = tabbar.identifier(0); + tabbar.setChangeTextColor(firstTabId); + + tabbar.setClearTabColor(firstTabId); +} + +//用于createDragPixmapFromTab测试打桩 +TermWidgetPage *stub_getTermPage(const QString &identifier) +{ + Q_UNUSED(identifier) + + TermProperties properties; + TermWidgetPage *widgetPage = new TermWidgetPage(properties, nullptr); + widgetPage->resize(800, 600); + return widgetPage; +} + +//用于createDragPixmapFromTab测试打桩 +bool stub_hasComposite() +{ + return true; +} + +/******************************************************************************* + 1. @函数: Tabbar类的函数 + 2. @作者: ut000438 王亮 + 3. @日期: 2020-12-23 + 4. @说明: createDragPixmapFromTab单元测试 +*******************************************************************************/ +TEST_F(UT_Tabbar_Test, createDragPixmapFromTab) +{ + Stub s; + s.set(ADDR(MainWindow, getTermPage), stub_getTermPage); + + TabBar tabbar; + QString tabName = QString("tab01"); + QString tabIdentifier = generateUniqueId(); + tabbar.addTab(tabIdentifier, tabName); + + QStyleOptionTab styleOptionTab; + QPoint hotSpot = QPoint(1, 1); + tabbar.createDragPixmapFromTab(0, styleOptionTab, &hotSpot); + + s.set(ADDR(DWindowManagerHelper, hasComposite), stub_hasComposite); + + tabbar.createDragPixmapFromTab(0, styleOptionTab, &hotSpot); + + s.reset(ADDR(MainWindow, getTermPage)); + s.reset(ADDR(DWindowManagerHelper, hasComposite)); +} + +TEST_F(UT_Tabbar_Test, handleDragActionChanged) +{ + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + + tabbar.handleDragActionChanged(Qt::MoveAction); + + tabbar.handleDragActionChanged(Qt::IgnoreAction); +} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabbar_test.h deepin-terminal-5.4.13/tests/src/views/ut_tabbar_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabbar_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabbar_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TABBAR_TEST_H +#define UT_TABBAR_TEST_H + +#include "ut_defines.h" + +#include + +#include + +class UT_Tabbar_Test : public ::testing::Test +{ +public: + UT_Tabbar_Test(); + +public: + //这里的几个函数都会自动调用 + + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + + inline QString generateUniqueId(); +}; + +#endif // UT_TABBAR_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamedlg_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_tabrenamedlg_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamedlg_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabrenamedlg_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_tabrenamedlg_test.h" +#include "mainwindow.h" + +#include + +Ut_TabRenameDlg_Test::Ut_TabRenameDlg_Test() +{ + m_renameDlg = new TabRenameDlg; +} + +Ut_TabRenameDlg_Test::~Ut_TabRenameDlg_Test() +{ + delete m_renameDlg; +} + +TEST_F(Ut_TabRenameDlg_Test, TesSetText) +{ + m_renameDlg->setText("first", "second"); + + QLineEdit *normalLineEdit = m_renameDlg->m_normalWidget->findChild(); + QLineEdit *remoteLineEdit = m_renameDlg->m_remoteWidget->findChild(); + + EXPECT_TRUE(normalLineEdit->text() == "first"); + EXPECT_TRUE(remoteLineEdit->text() == "second"); +} + +TEST_F(Ut_TabRenameDlg_Test, TestEventFilter) +{ + QKeyEvent *event = new QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier); + + m_renameDlg->m_confirmButton->setFocus(); + m_renameDlg->eventFilter(m_renameDlg->m_confirmButton, event); + if (event) { + delete event; + } +} diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamedlg_test.h deepin-terminal-5.4.13/tests/src/views/ut_tabrenamedlg_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamedlg_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabrenamedlg_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TABRENAMEDLG_TEST_H +#define UT_TABRENAMEDLG_TEST_H + +#include "termproperties.h" + +#include "tabrenamedlg.h" +#include "tabrenamewidget.h" + +//Google GTest 相关头文件 +#include + +#include +#include + +class Ut_TabRenameDlg_Test : public ::testing::Test +{ +public: + Ut_TabRenameDlg_Test(); + + ~Ut_TabRenameDlg_Test(); + +private: + TabRenameDlg *m_renameDlg = nullptr; + TermProperties m_normalTermProperty; +}; + +#endif // UT_TABRENAMEDLG_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamewidget_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_tabrenamewidget_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamewidget_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabrenamewidget_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_tabrenamewidget_test.h" + +//用于做一些初始化操作 +void Ut_TabRenameWidget_Test::SetUp() +{ + m_renameWidgetRS = new TabRenameWidget(true, true); +} + +//用于做一些清理操作 +void Ut_TabRenameWidget_Test::TearDown() +{ + delete m_renameWidgetRS; +} + +//远程 设置界面 +TEST_F(Ut_TabRenameWidget_Test, TestInitConnection) +{ + QList list = m_renameWidgetRS->m_choseMenu->findChildren(); + + QAction *firstAction = list.first(); + //取出action的text为空,信号发送后程序崩溃,只能重新设置action的文字 + //也反映出槽函数没有对特殊情况处理,需要的话可以修改 + if (firstAction->text().isNull()) { + firstAction->setText("username: %u"); + } + + m_renameWidgetRS->getInputedit()->clear(); + + emit m_renameWidgetRS->m_choseMenu->triggered(list.first()); + EXPECT_TRUE(m_renameWidgetRS->getInputedit()->text() == "%u"); + EXPECT_TRUE(m_renameWidgetRS->m_Label == nullptr); +} + + +//普通 设置界面 +TEST_F(Ut_TabRenameWidget_Test, TestNormalIsSeeting) +{ + TabRenameWidget *m_renameWidgetNS = nullptr; + m_renameWidgetNS = new TabRenameWidget(false, true); + + EXPECT_TRUE(m_renameWidgetNS->m_Label == nullptr); + + delete m_renameWidgetNS; +} + +//远程 对话框 +TEST_F(Ut_TabRenameWidget_Test, TestRemateNotSeeting) +{ + TabRenameWidget *m_renameWidgetRNS = nullptr; + m_renameWidgetRNS = new TabRenameWidget(true, false); + + EXPECT_TRUE(m_renameWidgetRNS->m_Label != nullptr); +// EXPECT_TRUE(m_renameWidgetRNS->m_Label->text() == "Remote tab title format"); + + delete m_renameWidgetRNS; +} + +//非远程 对话框 +TEST_F(Ut_TabRenameWidget_Test, TestNormaNotSeeting) +{ + TabRenameWidget *m_renameWidgetNNS = nullptr; + m_renameWidgetNNS = new TabRenameWidget(false, false); + + EXPECT_TRUE(m_renameWidgetNNS->m_Label != nullptr); +// EXPECT_TRUE(m_renameWidgetNNS->m_Label->text() == "Tab title format"); + + delete m_renameWidgetNNS; +} diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamewidget_test.h deepin-terminal-5.4.13/tests/src/views/ut_tabrenamewidget_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_tabrenamewidget_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_tabrenamewidget_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TABRENAMEWIDGET_TEST_H +#define UT_TABRENAMEWIDGET_TEST_H + +#include "tabrenamewidget.h" + +//Google GTest 相关头文件 +#include + +#include +#include + +class Ut_TabRenameWidget_Test : public ::testing::Test +{ +protected: + //用于做一些初始化操作 + virtual void SetUp(); + + //用于做一些清理操作 + virtual void TearDown(); + +private: + TabRenameWidget *m_renameWidgetRS = nullptr; +}; + +#endif // UT_TABRENAMEWIDGET_TEST_H diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidgetpage_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_termwidgetpage_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidgetpage_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_termwidgetpage_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,512 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_termwidgetpage_test.h" + +#include "termwidgetpage.h" +#include "termwidget.h" +#include "service.h" +#include "TerminalDisplay.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include + +UT_TermWidgetPage_Test::UT_TermWidgetPage_Test() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +UT_TermWidgetPage_Test::~UT_TermWidgetPage_Test() +{ + delete m_normalWindow; +} + +#ifdef UT_TERMWIDGETPAGE_TEST + +void stub_toggleShowSearchBar() +{ +} + +void stub_focusCurrentPage_TermWidgetPage() +{ +} + +TEST_F(UT_TermWidgetPage_Test, TermWidgetPageTest) +{ + QMainWindow mainWin; + mainWin.resize(800, 600); + mainWin.setAttribute(Qt::WA_TranslucentBackground); + mainWin.show(); + + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + //需要将控件放在一个QMainWindow中,否则无法看到正确的透明度调节效果 + TermWidgetPage termWidgetPage(termProperty, &mainWin); + termWidgetPage.resize(mainWin.size().width(), mainWin.size().height()); + termWidgetPage.show(); + + TermWidget *currTermWidget = termWidgetPage.m_currentTerm; + EXPECT_NE(currTermWidget, nullptr); + + //设置透明度,提示符会出现异常,且显示2个光标 + for (qreal opacity = 0.01; opacity <= 1.0; opacity += 0.01) { + termWidgetPage.setTerminalOpacity(opacity); + } + + QStringList fontFamilyList; + fontFamilyList << "Courier 10 Pitch" << "DejaVu Sans Mono" << "Liberation Mono" + << "Noto Mono" << "Noto Sans Mono" << "Noto Sans Mono CJK JP" + << "Noto Sans Mono CJK KR" << "Noto Sans Mono CJK SC" + << "Noto Sans Mono CJK TC"; + for (int i = 0; i < fontFamilyList.size(); i++) { + QString fontFamily = fontFamilyList.at(i); + termWidgetPage.setFont(fontFamily); + QFont currFont = currTermWidget->getTerminalFont(); + EXPECT_EQ(currFont.family(), fontFamily); + } + + QString lastFontFamily = fontFamilyList.last(); + QFont currTermFont = currTermWidget->getTerminalFont(); + EXPECT_EQ(currTermFont.family(), lastFontFamily); + + //字体大小大于20时界面提示符显示会有异常 + //设置字体大小时会不停刷日志:Using a variable-width font in the terminal. This may cause performance degradation and display/alignment errors. + for (int fontSize = 5; fontSize <= 50; fontSize++) { + termWidgetPage.setFontSize(fontSize); + QFont currFont = currTermWidget->getTerminalFont(); + EXPECT_EQ(currFont.pointSize(), fontSize); + } +} + +TEST_F(UT_TermWidgetPage_Test, TermWidgetPageTest2) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + TermWidget *currTermWidget = termWidgetPage.m_currentTerm; + EXPECT_NE(currTermWidget, nullptr); + + enum class KeyboardCursorShape { + BlockCursor = 0, + UnderlineCursor = 1, + IBeamCursor = 2 + }; + + Konsole::TerminalDisplay *termDisplay = currTermWidget->m_termDisplay; + EXPECT_NE(termDisplay, nullptr); + + //改光标形状 + Konsole::Emulation::KeyboardCursorShape blockShape = Konsole::Emulation::KeyboardCursorShape::BlockCursor; + Konsole::Emulation::KeyboardCursorShape underlineShape = Konsole::Emulation::KeyboardCursorShape::UnderlineCursor; + Konsole::Emulation::KeyboardCursorShape ibeamShape = Konsole::Emulation::KeyboardCursorShape::IBeamCursor; + + termWidgetPage.setcursorShape(static_cast(blockShape)); + EXPECT_EQ(blockShape, termDisplay->_cursorShape); + + termWidgetPage.setcursorShape(static_cast(underlineShape)); + EXPECT_EQ(underlineShape, termDisplay->_cursorShape); + + termWidgetPage.setcursorShape(static_cast(ibeamShape)); + EXPECT_EQ(ibeamShape, termDisplay->_cursorShape); + +} + +bool ut_term_hasRunningProcesses() +{ + return true; +} + +TEST_F(UT_TermWidgetPage_Test, TermWidgetPageTest3) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + + //测试分屏 + currTermPage->split(Qt::Orientation::Vertical); + //测试分屏 + currTermPage->split(Qt::Orientation::Horizontal); + //测试关闭分屏 + currTermPage->closeSplit(currTermPage->currentTerminal(), true); + Stub stub; + stub.set(ADDR(TermWidget,hasRunningProcess),ut_term_hasRunningProcesses); + currTermPage->closeSplit(currTermPage->currentTerminal(), false); +} + +TEST_F(UT_TermWidgetPage_Test, showRenameTitleDialog) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + currTermPage->showRenameTitleDialog(); + + EXPECT_EQ((currTermPage->m_renameDlg != nullptr), true); +} + +TEST_F(UT_TermWidgetPage_Test, setParentMainWindow) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.setParentMainWindow(m_normalWindow); +} + +bool ut_showExitUninstallConfirmDialog(){ + return false; +} + +TEST_F(UT_TermWidgetPage_Test, handleUninstallTerminal) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, m_normalWindow); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + Stub stub; + stub.set(ADDR(MainWindow,hasRunningProcesses),ut_term_hasRunningProcesses); + stub.set(ADDR(Utils,showExitUninstallConfirmDialog),ut_showExitUninstallConfirmDialog); + termWidgetPage.handleUninstallTerminal(""); +} + +int ut_runningTerminalCount() +{ + return 5; +} + +TEST_F(UT_TermWidgetPage_Test, closeOtherTerminal) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + Stub stub; + stub.set(ADDR(TermWidgetPage,runningTerminalCount),ut_runningTerminalCount); + termWidgetPage.closeOtherTerminal(true); +} + +TEST_F(UT_TermWidgetPage_Test, setColorScheme) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.setColorScheme("Light"); + + termWidgetPage.setColorScheme("Dark"); +} + +TEST_F(UT_TermWidgetPage_Test, toggleShowSearchBar) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + + Stub s; + s.set(ADDR(QTermWidget, toggleShowSearchBar), stub_toggleShowSearchBar); + + currTermPage->toggleShowSearchBar(); + + s.reset(ADDR(QTermWidget, toggleShowSearchBar)); +} + +bool ut_isQuakeMode() +{ + return true; +} + +int ut_height() +{ + return 200; +} + +TEST_F(UT_TermWidgetPage_Test, showSearchBar) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + + Stub stub; + stub.set(ADDR(MainWindow,isQuakeMode),ut_isQuakeMode); + currTermPage->showSearchBar(0); + stub.set(ADDR(QWidget,height),ut_height); + currTermPage->showSearchBar(2); + currTermPage->showSearchBar(1); +} + +bool ut_focusNavigation_contains() +{ + return true; +} + +TEST_F(UT_TermWidgetPage_Test, focusNavigation) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + + Stub stub; + stub.set((bool(QRect::*)(const QPoint &, bool) const)ADDR(QRect,contains),ut_focusNavigation_contains); + + currTermPage->focusNavigation(Qt::TopEdge); +} + +TEST_F(UT_TermWidgetPage_Test, selectAll) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.selectAll(); +} + +TEST_F(UT_TermWidgetPage_Test, skipToPreCommand) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.skipToPreCommand(); +} + +TEST_F(UT_TermWidgetPage_Test, skipToNextCommand) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.skipToNextCommand(); +} + +TEST_F(UT_TermWidgetPage_Test, setBlinkingCursor) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.setBlinkingCursor(false); + + termWidgetPage.setBlinkingCursor(true); +} + +TEST_F(UT_TermWidgetPage_Test, setPressingScroll) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.setPressingScroll(false); + + termWidgetPage.setPressingScroll(true); +} + +TEST_F(UT_TermWidgetPage_Test, handleTabRenameDlgFinished) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + Stub s; + s.set(ADDR(MainWindow, focusCurrentPage), stub_focusCurrentPage_TermWidgetPage); + + termWidgetPage.handleTabRenameDlgFinished(); + + s.reset(ADDR(MainWindow, focusCurrentPage)); +} + +qint64 ut_searchCostTime() +{ + return 1; +} + +TEST_F(UT_TermWidgetPage_Test, printSearchCostTime) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + Stub stub; + stub.set(ADDR(PageSearchBar,searchCostTime),ut_searchCostTime); + + termWidgetPage.printSearchCostTime(); +} + +TEST_F(UT_TermWidgetPage_Test, onTermRequestRenameTab) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.onTermRequestRenameTab(QStringLiteral("")); + + termWidgetPage.onTermRequestRenameTab(QStringLiteral("tab001")); +} + +TEST_F(UT_TermWidgetPage_Test, onTermClosed) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.onTermClosed(); +} + +TermWidgetPage *stub_currentPage() +{ + return nullptr; +} + +TEST_F(UT_TermWidgetPage_Test, slotQuakeHidePlugin) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + + Stub s; + s.set(ADDR(MainWindow, currentPage), stub_currentPage); + + currTermPage->slotQuakeHidePlugin(); + + s.reset(ADDR(MainWindow, currentPage)); +} + +TEST_F(UT_TermWidgetPage_Test, handleLeftMouseClick) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + currTermPage->handleLeftMouseClick(); +} + +TEST_F(UT_TermWidgetPage_Test, setTextCodec) +{ + TermProperties termProperty; + termProperty[QuakeMode] = false; + termProperty[SingleFlag] = true; + + TermWidgetPage termWidgetPage(termProperty, nullptr); + termWidgetPage.resize(800, 600); + termWidgetPage.show(); + + termWidgetPage.setTextCodec(QTextCodec::codecForName("UTF-8")); +} + +#endif + +class UT_ThemePreviewArea_Test : public ::testing::Test +{ +public: + void SetUp() + { + m_area = new ThemePreviewArea; + } + void TearDown() + { + delete m_area; + } + ThemePreviewArea *m_area = nullptr; +}; + +TEST_F(UT_ThemePreviewArea_Test, ut_paintEvent) +{ + QPaintEvent paint(QRect(m_area->rect())); + m_area->paintEvent(&paint); + m_area->setPs1Color(Qt::red); + m_area->setPs2Color(Qt::red); + m_area->setBackgroundColor(Qt::red); + m_area->setForegroundgroundColor(Qt::red); +} diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidgetpage_test.h deepin-terminal-5.4.13/tests/src/views/ut_termwidgetpage_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidgetpage_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_termwidgetpage_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TERMWIDGETPAGE_TEST_H +#define UT_TERMWIDGETPAGE_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class Service; +class MainWindow; +class TermProperties; + +class UT_TermWidgetPage_Test : public ::testing::Test +{ +public: + UT_TermWidgetPage_Test(); + + ~UT_TermWidgetPage_Test(); + +private: + Service *m_service = nullptr; + + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_TERMWIDGETPAGE_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidget_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_termwidget_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidget_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_termwidget_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1007 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_termwidget_test.h" + +#include "service.h" +#include "termwidget.h" +#include "termwidgetpage.h" +#include "qtermwidget.h" +#include "TerminalDisplay.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include +#include + +UT_TermWidget_Test::UT_TermWidget_Test() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +UT_TermWidget_Test::~UT_TermWidget_Test() +{ + delete m_normalWindow; +} + +QStringList ut_TermWidget_toStringList(){ + return QStringList() << "1" << "2"; +} + +bool ut_contains() +{ + return true; +} + +#ifdef UT_TERMWIDGET_TEST +TEST_F(UT_TermWidget_Test, TermWidgetTest) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + Stub stub; + stub.set(ADDR(QVariant,toStringList),ut_TermWidget_toStringList); + stub.set(ADDR(TermProperties,contains),ut_contains); + + TermWidget *termWidget = currTermPage->m_currentTerm; + bool isInRemoteServer = termWidget->isInRemoteServer(); + EXPECT_EQ(isInRemoteServer, false); + + TermWidgetPage *termPage = termWidget->parentPage(); + EXPECT_NE(termPage, nullptr); + EXPECT_EQ(QString(termPage->metaObject()->className()), QString("TermWidgetPage")); + + //这两个函数未实现 + termWidget->skipToPreCommand(); + termWidget->skipToNextCommand(); + + termWidget->setEnterSzCommand(false); + EXPECT_EQ(termWidget->enterSzCommand(), false); + + termWidget->setEnterSzCommand(true); + EXPECT_EQ(termWidget->enterSzCommand(), true); + + //设置透明度 + for (qreal opacity = 0.01; opacity <= 1.0; opacity += 0.01) { + termWidget->setTermOpacity(opacity); + } + + QStringList fontFamilyList; + fontFamilyList << "Courier 10 Pitch" << "DejaVu Sans Mono" << "Liberation Mono" + << "Noto Mono" << "Noto Sans Mono" << "Noto Sans Mono CJK JP" + << "Noto Sans Mono CJK KR" << "Noto Sans Mono CJK SC" + << "Noto Sans Mono CJK TC"; + for (int i = 0; i < fontFamilyList.size(); i++) { + QString fontFamily = fontFamilyList.at(i); + termWidget->setTermFont(fontFamily); + QFont currFont = termWidget->getTerminalFont(); + EXPECT_EQ(currFont.family(), fontFamily); + } + + QString lastFontFamily = fontFamilyList.last(); + QFont currTermFont = termWidget->getTerminalFont(); + EXPECT_EQ(currTermFont.family(), lastFontFamily); + + //字体大小大于20时界面提示符显示会有异常 + //设置字体大小时会不停刷日志:Using a variable-width font in the terminal. This may cause performance degradation and display/alignment errors. + for (int fontSize = 5; fontSize <= 50; fontSize++) { + termWidget->setTermFontSize(fontSize); + QFont currFont = termWidget->getTerminalFont(); + EXPECT_EQ(currFont.pointSize(), fontSize); + } + +} + +TEST_F(UT_TermWidget_Test, getsetEncode) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + + QList encodeList; + encodeList << "UTF-8" << "GB18030" << "GB2312" << "GBK" /*简体中文*/ + << "BIG5" << "BIG5-HKSCS" //<< "EUC-TW" /*繁体中文*/ + << "EUC-JP" << "SHIFT_JIS" //<< "ISO-2022-JP"/*日语*/ + << "EUC-KR" //<< "ISO-2022-KR" //<< "UHC" /*韩语*/ + << "IBM864" << "ISO-8859-6" << "ARABIC" << "WINDOWS-1256" /*阿拉伯语*/ + << "ISO-8859-13" << "ISO-8859-4" << "WINDOWS-1257" /*波罗的海各国语*/ + << "ISO-8859-14" /*凯尔特语*/ + << "IBM-852" << "ISO-8859-2" << "x-mac-CE" << "WINDOWS-1250" /*中欧*/ + << "IBM855" << "ISO-8859-5" << "KOI8-R" << "MAC-CYRILLIC" << "WINDOWS-1251" //<< "ISO-IR-111" /*西里尔语*/ + << "CP866" /*西里尔语或俄语*/ + << "KOI8-U" << "x-MacUkraine" /*西里尔语或乌克兰语*/ + << "ISO-8859-7" << "x-mac-GREEK" << "WINDOWS-1253" /*希腊语*/ + << "IBM862" << "ISO-8859-8-I" << "WINDOWS-1255"//<< "x-mac-HEBREW" /*希伯来语*/ + << "ISO-8859-8" /*希伯来语*/ + << "ISO-8859-10" /*北欧语*/ + << "ISO-8859-3" /*西欧语*/ + << "TIS-620" /*泰语*/ + << "IBM857" << "ISO-8859-9" << "x-mac-TURKISH" << "WINDOWS-1254" /*土耳其语*/ + << "WINDOWS-1258" //<< "TCVN" << "VISCII" /*越南语*/ + << "IBM850" << "ISO-8859-1" << "ISO-8859-15" << "x-ROMAN8" << "WINDOWS-1252"; /*西方国家*/ + + for (int i = 0; i < encodeList.size(); i++) { + QString encode = QString(encodeList.at(i)); + termWidget->setEncode(encode); + EXPECT_EQ(termWidget->encode(), encode); + qDebug() << termWidget->encode(); + + termWidget->setRemoteEncode(encode); + EXPECT_EQ(termWidget->RemoteEncode(), encode); + qDebug() << termWidget->RemoteEncode(); + } +} + + +//用于customContextMenuCall测试打桩 +void stub_showPlugin(const QString &name) +{ + Q_UNUSED(name) +} + +//用于customContextMenuCall测试打桩 +void stub_addMenuActions(const QPoint &pos) +{ + Q_UNUSED(pos) +} + +//用于customContextMenuCall测试打桩 +QAction *stub_exec(const QPoint &pos, QAction *at = nullptr) +{ + Q_UNUSED(pos) + Q_UNUSED(at) + + return nullptr; +} + +TEST_F(UT_TermWidget_Test, customContextMenuCall) +{ + Stub s; + s.set(ADDR(MainWindow, showPlugin), stub_showPlugin); + s.set(ADDR(TermWidget, addMenuActions), stub_addMenuActions); + s.set((QAction *(QMenu::*)(const QPoint &, QAction *))ADDR(QMenu, exec), stub_exec); + + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + QPoint pos(50, 50); + termWidget->customContextMenuCall(pos); + + s.reset(ADDR(MainWindow, showPlugin)); + s.reset(ADDR(TermWidget, addMenuActions)); + s.reset((QAction *(QMenu::*)(const QPoint &, QAction *))ADDR(QMenu, exec)); +} + +TEST_F(UT_TermWidget_Test, addMenuActions) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->m_menu = new DMenu(termWidget); + + QPoint pos(50, 50); + termWidget->addMenuActions(pos); +} + +TEST_F(UT_TermWidget_Test, onSetTerminalFont) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->m_menu = new DMenu(termWidget); + + QPoint pos(50, 50); + termWidget->onSetTerminalFont(); + termWidget->onSig_matchFound(); +} + +TEST_F(UT_TermWidget_Test, onSettingValueChanged) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->onSettingValueChanged("basic.interface.opacity"); + termWidget->onSettingValueChanged("basic.interface.font"); + termWidget->onSettingValueChanged("basic.interface.font_size"); + termWidget->onSettingValueChanged("advanced.cursor.cursor_shape"); + termWidget->onSettingValueChanged("advanced.cursor.cursor_blink"); + termWidget->onSettingValueChanged("advanced.scroll.scroll_on_key"); + termWidget->onSettingValueChanged("advanced.cursor.auto_copy_selection"); +} + +TEST_F(UT_TermWidget_Test, search) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->search("~", true, false); + termWidget->search("~", false, true); +} + +TEST_F(UT_TermWidget_Test, onTermWidgetReceivedData) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->onTermWidgetReceivedData("Permission denied"); + termWidget->onExitRemoteServer(); + termWidget->onUrlActivated(QUrl(""),true); + termWidget->onWindowEffectEnabled(true); + termWidget->onWindowEffectEnabled(false); +} + +TEST_F(UT_TermWidget_Test, onTouchPadSignal) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->onTouchPadSignal("pinch", "in", 2); + termWidget->onTouchPadSignal("pinch", "out", 2); +} + +TEST_F(UT_TermWidget_Test, wheelEvent) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + + QWheelEvent event(QPointF(QPoint(0,0)),QPointF(QPoint(0,0)),0,0,0,Qt::Horizontal); + QCoreApplication::sendEvent(termWidget,&event); +} + +bool ut_process_startDetached() +{ + return false; +} + +TEST_F(UT_TermWidget_Test, getFormatFileName) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + +// Stub stub; + +// stub.set((bool (QProcess::*)(const QString))ADDR(QProcess,startDetached), ut_process_startDetached); + + TermWidget *termWidget = currTermPage->m_currentTerm; +// termWidget->onOpenFileInFileManager(); +// termWidget->getFormatFileName("\\"); + termWidget->onShellMessage("",true); + termWidget->onShellMessage("",false); +} + +TEST_F(UT_TermWidget_Test, showFlowMessage) +{ + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + EXPECT_EQ(currTermPage->isVisible(), true); + + TermWidget *termWidget = currTermPage->m_currentTerm; + termWidget->showFlowMessage(true); + EXPECT_EQ(termWidget->m_flowMessage->isVisible(), true); +} + +/******************************************************************************* + 1. @函数: setRemoteTabFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证是否能正确设置term中远程标签标题格式的值 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, setRemoteTabFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *termWidget = currTermPage->m_currentTerm; + QString remoteFormat = "%U"; + termWidget->setRemoteTabFormat(remoteFormat); + // 验证远程标签标签标题是否正确 + EXPECT_EQ(termWidget->m_tabFormat.remoteTabFormat, remoteFormat); + EXPECT_EQ(termWidget->getRemoteTabTitleFormat(), remoteFormat); +} + +/******************************************************************************* + 1. @函数: setTabFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证是否能正确设置term中标签标题格式的值 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, setTabFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + QString tabFormat = "%w"; + term->setTabFormat(tabFormat); + // 验证标签标签标题是否正确 + EXPECT_EQ(term->m_tabFormat.currentTabFormat, tabFormat); + EXPECT_EQ(term->getTabTitleFormat(), tabFormat); + // 若没有连接远程 + if (!term->isConnectRemote()) { + EXPECT_EQ(term->getCurrentTabTitleFormat(), tabFormat); + } +} + +/******************************************************************************* + 1. @函数: renameTabFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试重命名标签标题格式是否正确 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, renameTabFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + QString tabFormat = "%D"; + QString remoteFormat = "%h"; + term->renameTabFormat(tabFormat, remoteFormat); + // 验证标签标签标题是否正确 + EXPECT_EQ(term->m_tabFormat.currentTabFormat, tabFormat); + EXPECT_EQ(term->getTabTitleFormat(), tabFormat); + // 若没有连接远程 + if (!term->isConnectRemote()) { + EXPECT_EQ(term->getCurrentTabTitleFormat(), tabFormat); + } + // 验证远程标签标题是否正确 + EXPECT_EQ(term->m_tabFormat.remoteTabFormat, remoteFormat); + EXPECT_EQ(term->getRemoteTabTitleFormat(), remoteFormat); + EXPECT_EQ(term->m_tabFormat.isGlobal, false); +} + +/******************************************************************************* + 1. @函数: getTabTitle + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证获取标签标题是否正确 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, getTabTitle) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 有内容 + QString tabFormat = "ut_test"; + term->setTabFormat(tabFormat); + // 验证的获取的标签标题是否是给定值 + EXPECT_EQ(term->getTabTitle(), tabFormat); + // 空标签 + tabFormat = ""; + term->setTabFormat(tabFormat); + EXPECT_EQ(term->getTabTitle(), "Terminal"); + + // 设置远程标题 + QString tabTitle = "remote_current_title"; + term->m_isConnectRemote = true; + term->setRemoteTabFormat(tabTitle); + EXPECT_EQ(term->getTabTitle(), tabTitle); + // 设置非远程标题 + tabTitle = "current_title"; + term->m_isConnectRemote = false; + term->setTabFormat(tabTitle); + EXPECT_EQ(term->getTabTitle(), tabTitle); +} + +/******************************************************************************* + 1. @函数: initTabTitleArgs + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证初始化标签标题参数列表是否正确 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, initTabTitleArgs) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + term->initTabTitleArgs(); + // 验证初始化标签标题参数列表是否正确 + // 标签标题 + QStringList strTabArgs = TAB_ARGS.split(" "); + EXPECT_EQ(strTabArgs.count(), term->m_tabArgs.count()); + // 填充标签标题参数 + for (QString arg : strTabArgs) { + EXPECT_EQ(term->m_tabArgs.contains(arg), true); + } + // 远程标签标题 + // 参数数量是否一致 + QStringList strRemoteTabArgs = REMOTE_ARGS.split(" "); + EXPECT_EQ(strRemoteTabArgs.count(), term->m_remoteTabArgs.count()); + for (QString arg : strRemoteTabArgs) { + EXPECT_EQ(term->m_remoteTabArgs.contains(arg), true); + } + +} + +/******************************************************************************* + 1. @函数: getCurrentTabTitleFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 获取的当前标签标题格式 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, getCurrentTabTitleFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置远程标题 + QString tabTitle = "remote_current_title"; + term->m_isConnectRemote = true; + term->setRemoteTabFormat(tabTitle); + EXPECT_EQ(term->getCurrentTabTitleFormat(), tabTitle); + // 设置非远程标题 + tabTitle = "current_title"; + term->m_isConnectRemote = false; + term->setTabFormat(tabTitle); + EXPECT_EQ(term->getCurrentTabTitleFormat(), tabTitle); +} + +/******************************************************************************* + 1. @函数: getTabTitleFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证获取的标签标题格式 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, getTabTitleFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置标签标题 + QString tabTitle = "tab_title"; + term->setTabFormat(tabTitle); + EXPECT_EQ(term->getTabTitleFormat(), tabTitle); +} + +/******************************************************************************* + 1. @函数: getRemoteTabTitleFormat + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证获取远程标签标题格式 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, getRemoteTabTitleFormat) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置远程标签标题 + QString remoteTabTitle = "remote_tab_title"; + term->setRemoteTabFormat(remoteTabTitle); + EXPECT_EQ(term->getRemoteTabTitleFormat(), remoteTabTitle); +} + +/******************************************************************************* + 1. @函数: showShellMessage + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证shell消息报错弹窗是否正常显示 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, showShellMessage) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置远程标签标题 + QString shellWarning = "shell message"; + term->showShellMessage(shellWarning); + // 获取DFloatingMessage + QList list = term->findChildren(); + QString strShellMessage; + // 获取label的提示信息 + for (DFloatingMessage *msg : list) { + QList lst = msg->findChildren(); + for (QLabel *label : lst) { + strShellMessage = label->text(); + } + } + EXPECT_EQ(strShellMessage, shellWarning); +} + +/******************************************************************************* + 1. @函数: setEncode + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试setEncode接口是否正常使用 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, setEncode) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置编码 + QString encode = "GBK"; + term->setEncode(encode); + EXPECT_EQ(term->encode(), encode); + EXPECT_EQ(term->m_encode, encode); + // 切换编码 + encode = "UTF-8"; + term->setEncode(encode); + EXPECT_EQ(term->encode(), encode); + EXPECT_EQ(term->m_encode, encode); +} + +/******************************************************************************* + 1. @函数: encode + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试获取encode接口是否获取争取的值 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, encode) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 测试函数修改是否获取正确的值 + QString encode = "GBK"; + term->setEncode(encode); + EXPECT_EQ(term->encode(), encode); + // 测试直接修改变量是否获取正确的值 + encode = "UTF-8"; + term->m_encode = encode; + EXPECT_EQ(term->encode(), encode); +} + +/******************************************************************************* + 1. @函数: setEncode + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试setRemoteEncode接口是否正常使用 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, setRemoteEncode) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置远程编码 + QString remoteEncode = "GBK"; + term->setRemoteEncode(remoteEncode); + EXPECT_EQ(term->RemoteEncode(), remoteEncode); + EXPECT_EQ(term->m_remoteEncode, remoteEncode); + // 切换编码 + remoteEncode = "UTF-8"; + term->setRemoteEncode(remoteEncode); + EXPECT_EQ(term->RemoteEncode(), remoteEncode); + EXPECT_EQ(term->m_remoteEncode, remoteEncode); +} + +/******************************************************************************* + 1. @函数: RemoteEncode + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试获取远程encode接口是否获取争取的值 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, RemoteEncode) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 测试函数修改是否获取正确的值 + QString remoteEncode = "GBK"; + term->setRemoteEncode(remoteEncode); + term->getFilePath("/"); + EXPECT_EQ(term->RemoteEncode(), remoteEncode); + // 测试直接修改变量是否获取正确的值 + remoteEncode = "UTF-8"; + term->m_remoteEncode = remoteEncode; + EXPECT_EQ(term->RemoteEncode(), remoteEncode); +} + +/******************************************************************************* + 1. @函数: modifyRemoteTabTitle + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证修改远程标签标题参数 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, modifyRemoteTabTitle) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 初始化测试数据 + ServerConfig serverConfig; + serverConfig.m_address = "127.0.0.1"; + serverConfig.m_userName = "uos"; + serverConfig.m_serverName = "ut_test"; + // 参数传入 + term->modifyRemoteTabTitle(serverConfig); + // 验证是否正确 + // 远程主机名 + EXPECT_EQ(term->m_remoteTabArgs[REMOTE_HOST_NAME], serverConfig.m_address); + // 用户名 %u + EXPECT_EQ(term->m_remoteTabArgs[USER_NAME], serverConfig.m_userName); + // 用户名@ %U + EXPECT_EQ(term->m_remoteTabArgs[USER_NAME_L], serverConfig.m_userName + QString("@")); +} + +/******************************************************************************* + 1. @函数: setIsConnectRemote + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 测试接口是否能够正确设置变量值 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, setIsConnectRemote) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置远程变量状态 + term->setIsConnectRemote(true); + // 验证是否正确 + EXPECT_EQ(term->isConnectRemote(), true); + EXPECT_EQ(term->m_isConnectRemote, true); + // 设置远程变量状态 + term->setIsConnectRemote(false); + // 验证是否正确 + EXPECT_EQ(term->isConnectRemote(), false); + EXPECT_EQ(term->m_isConnectRemote, false); +} + +/******************************************************************************* + 1. @函数: isConnectRemote + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 是否连接远程 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, isConnectRemote) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 通过函数设置远程变量状态 + term->setIsConnectRemote(true); + // 验证是否正确 + EXPECT_EQ(term->isConnectRemote(), true); + // 设置远程变量状态 + term->m_isConnectRemote = false; + // 验证是否正确 + EXPECT_EQ(term->isConnectRemote(), false); +} + +/******************************************************************************* + 1. @函数: selectEncode + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-03 + 4. @说明: 验证在连接远程和未连接远程状态下,修改编码是否正确 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, selectEncode) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 设置连接远程 + term->setIsConnectRemote(true); + // 编码变量 + QString encode = "GBK"; + // 设置编码 + term->selectEncode(encode); + // 此时远程编码应该和设置的编码一致 + EXPECT_EQ(term->RemoteEncode(), encode); + // 设置断开远程 + term->setIsConnectRemote(false); + // 改变编码 + encode = "BIG5"; + term->selectEncode(encode); + // 此时当前编码和设置的编码一致 + EXPECT_EQ(term->encode(), encode); +} + +/******************************************************************************* + 1. @函数: onTitleArgsChange + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-14 + 4. @说明: 测试标签标题变化 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, onTitleArgsChange) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + // %D %d + // 第一种情况 + term->onTitleArgsChange(DIR_L, "~"); + QString longDir = term->m_tabArgs[DIR_L]; + QString shortDir = term->m_tabArgs[DIR_S]; + EXPECT_EQ(longDir, "~"); + EXPECT_EQ(shortDir, QDir::homePath().split("/").last()); + // 第二种情况 + term->onTitleArgsChange(DIR_L, QDir::homePath()); + longDir = term->m_tabArgs[DIR_L]; + shortDir = term->m_tabArgs[DIR_S]; + EXPECT_EQ(longDir, "~"); + EXPECT_EQ(shortDir, QDir::homePath().split("/").last()); + // 第三种情况 + term->onTitleArgsChange(DIR_L, "/"); + longDir = term->m_tabArgs[DIR_L]; + shortDir = term->m_tabArgs[DIR_S]; + EXPECT_EQ(longDir, QString("/")); + EXPECT_EQ(shortDir, QString("/")); + // 一般情况 + term->onTitleArgsChange(DIR_L, "/home/777/aaa"); + longDir = term->m_tabArgs[DIR_L]; + shortDir = term->m_tabArgs[DIR_S]; + EXPECT_EQ(longDir, QString("/home/777/aaa")); + EXPECT_EQ(shortDir, QString("aaa")); + + // %h + term->onTitleArgsChange(LOCAL_HOST_NAME, "dzw"); + QString localHostName = term->m_tabArgs[LOCAL_HOST_NAME]; + EXPECT_EQ(localHostName, "dzw"); +} + +/******************************************************************************* + 1. @函数: onHostnameChanged + 2. @作者: ut000610 戴正文 + 3. @日期: 2020-12-14 + 4. @说明: 更新当前主机名 +*******************************************************************************/ +TEST_F(UT_TermWidget_Test, onHostnameChanged) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + // 获取当前主机名 + QString hostName = QHostInfo::localHostName(); + term->onHostnameChanged(); + QString result = term->m_tabArgs[LOCAL_HOST_NAME]; + EXPECT_EQ(hostName, result); +} + +TEST_F(UT_TermWidget_Test, onHorizontalSplit) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onHorizontalSplit(); +} + +TEST_F(UT_TermWidget_Test, onVerticalSplit) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onVerticalSplit(); +} + +TEST_F(UT_TermWidget_Test, splitHorizontal) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->splitHorizontal(); +} + +TEST_F(UT_TermWidget_Test, splitVertical) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->splitVertical(); +} + +TEST_F(UT_TermWidget_Test, onCloseCurrWorkSpace) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onCloseCurrWorkSpace(); +} + +TEST_F(UT_TermWidget_Test, onCloseOtherWorkSpaces) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onCloseOtherWorkSpaces(); +} + +TEST_F(UT_TermWidget_Test, onCreateNewTab) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onCreateNewTab(); +} + +TEST_F(UT_TermWidget_Test, onSwitchFullScreen) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onSwitchFullScreen(); +} + +TEST_F(UT_TermWidget_Test, openBing) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->openBing(); +} + +TEST_F(UT_TermWidget_Test, openBaidu) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->openBaidu(); +} + +TEST_F(UT_TermWidget_Test, openGithub) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->openGithub(); +} + +TEST_F(UT_TermWidget_Test, openStackOverflow) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->openStackOverflow(); +} + + +TEST_F(UT_TermWidget_Test, onShowSearchBar) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onShowSearchBar(); +} + +TEST_F(UT_TermWidget_Test, onShowEncoding) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onShowEncoding(); +} + +TEST_F(UT_TermWidget_Test, onShowCustomCommands) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onShowCustomCommands(); +} + +TEST_F(UT_TermWidget_Test, onShowRemoteManagement) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onShowRemoteManagement(); +} + + +TEST_F(UT_TermWidget_Test, onUploadFile) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onUploadFile(); +} + +TEST_F(UT_TermWidget_Test, onDownloadFile) +{ + // 获取当前term + TermWidgetPage *currTermPage = m_normalWindow->currentPage(); + TermWidget *term = currTermPage->m_currentTerm; + + term->onDownloadFile(); +} + +// 测试该函数会crash,待查找原因 +//TEST_F(UT_TermWidget_Test, onShowSettings) +//{ +// // 获取当前term +// TermWidgetPage *currTermPage = m_normalWindow->currentPage(); +// TermWidget *term = currTermPage->m_currentTerm; + +// term->onShowSettings(); +//} + +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidget_test.h deepin-terminal-5.4.13/tests/src/views/ut_termwidget_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_termwidget_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_termwidget_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TERMWIDGET_TEST_H +#define UT_TERMWIDGET_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" + +#include + +class MainWindow; +class UT_TermWidget_Test : public ::testing::Test +{ +public: + UT_TermWidget_Test(); + + ~UT_TermWidget_Test(); + +private: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_TERMWIDGET_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_titlebar_test.cpp deepin-terminal-5.4.13/tests/src/views/ut_titlebar_test.cpp --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_titlebar_test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_titlebar_test.cpp 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ut_titlebar_test.h" + +#include "titlebar.h" +#include "tabbar.h" +#include "mainwindow.h" +#include "service.h" +#include "../stub.h" + +//Qt单元测试相关头文件 +#include +#include +#include +#include +#include +#include + +DWIDGET_USE_NAMESPACE + +UT_TitleBar_Test::UT_TitleBar_Test() +{ + if (!Service::instance()->property("isServiceInit").toBool()) { + Service::instance()->setProperty("isServiceInit", true); + } + + m_normalTermProperty[QuakeMode] = false; + m_normalTermProperty[SingleFlag] = true; + m_normalWindow = new NormalWindow(m_normalTermProperty, nullptr); +} + +UT_TitleBar_Test::~UT_TitleBar_Test() +{ + delete m_normalWindow; +} + +#ifdef UT_TITLEBAR_TEST + +bool ut_isDXcbPlatform() +{ + return true; +} + +TEST_F(UT_TitleBar_Test, TitleBarTest) +{ + Stub stub; + stub.set(ADDR(DApplication,isDXcbPlatform),ut_isDXcbPlatform); + TitleBar *bar = new TitleBar(nullptr,false); + delete bar; + m_normalWindow->resize(800, 600); + m_normalWindow->show(); + EXPECT_EQ(m_normalWindow->isVisible(), true); + + DTitlebar *dtkTitleBar = m_normalWindow->titlebar(); + TitleBar *titleBar = qobject_cast(dtkTitleBar->customWidget()); + EXPECT_NE(titleBar, nullptr); + EXPECT_EQ(titleBar->isVisible(), true); + + //清空titleBar布局 + QHBoxLayout *titleBarLayout = titleBar->m_layout; + QLayoutItem *child; + while ((child = titleBarLayout->takeAt(0)) != nullptr) { + if (child->widget()) { + child->widget()->setParent(nullptr); + } + delete child; + } + + TabBar tabbar; + tabbar.resize(800, 50); + tabbar.show(); + EXPECT_EQ(tabbar.isVisible(), true); + + int tabHeight = 36; + tabbar.setTabHeight(tabHeight); + EXPECT_EQ(tabbar.height(), 36); + + QString tabName = QString("TestTitleBar"); + QString tabIdentifier = Utils::getRandString().toLower(); + tabbar.addTab(tabIdentifier, tabName); + titleBar->setTabBar(&tabbar); + + int rightSpace = titleBar->rightSpace(); + EXPECT_EQ(rightSpace, titleBar->m_rightSpace); +} +#endif diff -Nru deepin-terminal-5.0.0+ds1/tests/src/views/ut_titlebar_test.h deepin-terminal-5.4.13/tests/src/views/ut_titlebar_test.h --- deepin-terminal-5.0.0+ds1/tests/src/views/ut_titlebar_test.h 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/tests/src/views/ut_titlebar_test.h 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd + * + * Author: wangliang + * + * Maintainer: wangliang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UT_TITLEBAR_TEST_H +#define UT_TITLEBAR_TEST_H + +#include "ut_defines.h" +#include "termproperties.h" +#include + +class MainWindow; +class UT_TitleBar_Test : public ::testing::Test +{ +public: + UT_TitleBar_Test(); + ~UT_TitleBar_Test(); + +private: + //普通窗口 + MainWindow *m_normalWindow = nullptr; + + TermProperties m_normalTermProperty; +}; + +#endif // UT_TITLEBAR_TEST_H + diff -Nru deepin-terminal-5.0.0+ds1/theme/aci deepin-terminal-5.4.13/theme/aci --- deepin-terminal-5.0.0+ds1/theme/aci 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/aci 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#363636 -color_2=#ff0883 -color_3=#83ff08 -color_4=#ff8308 -color_5=#0883ff -color_6=#8308ff -color_7=#08ff83 -color_8=#b6b6b6 -color_9=#424242 -color_10=#ff1e8e -color_11=#8eff1e -color_12=#ff8e1e -color_13=#1e8eff -color_14=#8e1eff -color_15=#1eff8e -color_16=#c2c2c2 -background=#0d1926 -foreground=#31B96E -tab=#31B96E diff -Nru deepin-terminal-5.0.0+ds1/theme/aco deepin-terminal-5.4.13/theme/aco --- deepin-terminal-5.0.0+ds1/theme/aco 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/aco 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#3f3f3f -color_2=#ff0883 -color_3=#83ff08 -color_4=#ff8308 -color_5=#0883ff -color_6=#8308ff -color_7=#08ff83 -color_8=#bebebe -color_9=#474747 -color_10=#ff1e8e -color_11=#8eff1e -color_12=#ff8e1e -color_13=#1e8eff -color_14=#8e1eff -color_15=#1eff8e -color_16=#c4c4c4 -background=#1f1305 -foreground=#E89F65 -tab=#E89F65 diff -Nru deepin-terminal-5.0.0+ds1/theme/argonaut deepin-terminal-5.4.13/theme/argonaut --- deepin-terminal-5.0.0+ds1/theme/argonaut 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/argonaut 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#232323 -color_2=#ff000f -color_3=#8ce10b -color_4=#ffb900 -color_5=#008df8 -color_6=#6d43a6 -color_7=#00d8eb -color_8=#ffffff -color_9=#444444 -color_10=#ff2740 -color_11=#abe15b -color_12=#ffd242 -color_13=#0092ff -color_14=#9a5feb -color_15=#67fff0 -color_16=#ffffff -background=#0e1019 -foreground=#fffaf4 -tab=#f2f2f2 diff -Nru deepin-terminal-5.0.0+ds1/theme/azu deepin-terminal-5.4.13/theme/azu --- deepin-terminal-5.0.0+ds1/theme/azu 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/azu 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#ac6d74 -color_3=#74ac6d -color_4=#aca46d -color_5=#6d74ac -color_6=#a46dac -color_7=#6daca4 -color_8=#e6e6e6 -color_9=#262626 -color_10=#d6b8bc -color_11=#bcd6b8 -color_12=#d6d3b8 -color_13=#b8bcd6 -color_14=#d3b8d6 -color_15=#b8d6d3 -color_16=#ffffff -background=#09111a -foreground=#508b6b -tab=#508b6b diff -Nru deepin-terminal-5.0.0+ds1/theme/bim deepin-terminal-5.4.13/theme/bim --- deepin-terminal-5.0.0+ds1/theme/bim 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/bim 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#2c2423 -color_2=#f557a0 -color_3=#a9ee55 -color_4=#f5a255 -color_5=#5ea2ec -color_6=#a957ec -color_7=#5eeea0 -color_8=#918988 -color_9=#918988 -color_10=#f579b2 -color_11=#bbee78 -color_12=#f5b378 -color_13=#81b3ec -color_14=#bb79ec -color_15=#81eeb2 -color_16=#f5eeec -background=#012849 -foreground=#FFD500 -tab=#FFD500 diff -Nru deepin-terminal-5.0.0+ds1/theme/breeze deepin-terminal-5.4.13/theme/breeze --- deepin-terminal-5.0.0+ds1/theme/breeze 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/breeze 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -[theme] -color_1=#31363b -color_2=#ed1515 -color_3=#1abc9c -color_4=#ed1515 -color_5=#1d99f3 -color_6=#9b59b6 -color_7=#11d116 -color_8=#eff0f1 -color_9=#93a1a1 -color_10=#c0392b -color_11=#1cdc9a -color_12=#fdbc4b -color_13=#3daee9 -color_14=#6c71c4 -color_15=#1abc9c -color_16=#fdf6e3 -background=#31363b -foreground=#eff0f1 -tab=#2CA7F8 -style=dark diff -Nru deepin-terminal-5.0.0+ds1/theme/cai deepin-terminal-5.4.13/theme/cai --- deepin-terminal-5.0.0+ds1/theme/cai 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/cai 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#ca274d -color_3=#4dca27 -color_4=#caa427 -color_5=#274dca -color_6=#a427ca -color_7=#27caa4 -color_8=#808080 -color_9=#808080 -color_10=#e98da3 -color_11=#a3e98d -color_12=#e9d48d -color_13=#8da3e9 -color_14=#d48de9 -color_15=#8de9d4 -color_16=#ffffff -background=#09111a -foreground=#2f918a -tab=#2f918a diff -Nru deepin-terminal-5.0.0+ds1/theme/chalk deepin-terminal-5.4.13/theme/chalk --- deepin-terminal-5.0.0+ds1/theme/chalk 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/chalk 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#646464 -color_2=#F58E8E -color_3=#A9D3AB -color_4=#FED37E -color_5=#7AABD4 -color_6=#D6ADD5 -color_7=#79D4D5 -color_8=#D4D4D4 -color_9=#646464 -color_10=#F58E8E -color_11=#A9D3AB -color_12=#FED37E -color_13=#7AABD4 -color_14=#D6ADD5 -color_15=#79D4D5 -color_16=#D4D4D4 -background=#2D2D2D -foreground=#ffa665 -tab=#ffa665 diff -Nru deepin-terminal-5.0.0+ds1/theme/deepin deepin-terminal-5.4.13/theme/deepin --- deepin-terminal-5.0.0+ds1/theme/deepin 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/deepin 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -[theme] -color_1=#073642 -color_2=#bdb76b -color_3=#859900 -color_4=#b58900 -color_5=#3465a4 -color_6=#d33682 -color_7=#2aa198 -color_8=#eee8d5 -color_9=#002b36 -color_10=#8b0000 -color_11=#00ff00 -color_12=#657b83 -color_13=#1e90ff -color_14=#6c71c4 -color_15=#93a1a1 -color_16=#fdf6e3 -background=#000000 -foreground=#00cd00 -tab=#2CA7F8 - diff -Nru deepin-terminal-5.0.0+ds1/theme/dracula deepin-terminal-5.4.13/theme/dracula --- deepin-terminal-5.0.0+ds1/theme/dracula 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/dracula 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#44475a -color_2=#ff5555 -color_3=#50fa7b -color_4=#ffb86c -color_5=#8be9fd -color_6=#bd93f9 -color_7=#ff79c6 -color_8=#94A3A5 -color_9=#000000 -color_10=#ff5555 -color_11=#50fa7b -color_12=#ffb86c -color_13=#8be9fd -color_14=#bd93f9 -color_15=#ff79c6 -color_16=#ffffff -background=#282a36 -foreground=#8986d1 -tab=#8986d1 diff -Nru deepin-terminal-5.0.0+ds1/theme/elementary deepin-terminal-5.4.13/theme/elementary --- deepin-terminal-5.0.0+ds1/theme/elementary 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/elementary 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#303030 -color_2=#e1321a -color_3=#6ab017 -color_4=#ffc005 -color_5=#004f9e -color_6=#ec0048 -color_7=#2aa7e7 -color_8=#f2f2f2 -color_9=#5d5d5d -color_10=#ff361e -color_11=#7bc91f -color_12=#ffd00a -color_13=#0071ff -color_14=#ff1d62 -color_15=#4bb8fd -color_16=#a020f0 -background=#101010 -foreground=#f2f2f2 -tab=#f2f2f2 diff -Nru deepin-terminal-5.0.0+ds1/theme/elic deepin-terminal-5.4.13/theme/elic --- deepin-terminal-5.0.0+ds1/theme/elic 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/elic 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#303030 -color_2=#e1321a -color_3=#6ab017 -color_4=#ffc005 -color_5=#729FCF -color_6=#ec0048 -color_7=#f2f2f2 -color_8=#2aa7e7 -color_9=#5d5d5d -color_10=#ff361e -color_11=#7bc91f -color_12=#ffd00a -color_13=#0071ff -color_14=#ff1d62 -color_15=#4bb8fd -color_16=#a020f0 -background=#4A453E -foreground=#55ac76 -tab=#55ac76 diff -Nru deepin-terminal-5.0.0+ds1/theme/elio deepin-terminal-5.4.13/theme/elio --- deepin-terminal-5.0.0+ds1/theme/elio 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/elio 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#303030 -color_2=#e1321a -color_3=#6ab017 -color_4=#ffc005 -color_5=#729FCF -color_6=#ec0048 -color_7=#2aa7e7 -color_8=#f2f2f2 -color_9=#5d5d5d -color_10=#ff361e -color_11=#7bc91f -color_12=#ffd00a -color_13=#0071ff -color_14=#ff1d62 -color_15=#4bb8fd -color_16=#a020f0 -background=#041A3B -foreground=#00e2b5 -tab=#b9ff35 diff -Nru deepin-terminal-5.0.0+ds1/theme/empathy deepin-terminal-5.4.13/theme/empathy --- deepin-terminal-5.0.0+ds1/theme/empathy 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/empathy 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -[theme] -color_1=#2e3436 -color_2=#cc0000 -color_3=#4e9a06 -color_4=#DFD841 -color_5=#2E64A6 -color_6=#75507b -color_7=#86BC26 -color_8=#d3d7cf -color_9=#555753 -color_10=#ef2929 -color_11=#D22E24 -color_12=#fce94f -color_13=#729fcf -color_14=#ad7fa8 -color_15=#00f5e9 -color_16=#eeeeec -background=#310924 -foreground=#C6AEBE -tab=#C6AEBE - diff -Nru deepin-terminal-5.0.0+ds1/theme/flat deepin-terminal-5.4.13/theme/flat --- deepin-terminal-5.0.0+ds1/theme/flat 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/flat 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#2c3e50 -color_2=#c0392b -color_3=#27ae60 -color_4=#f39c12 -color_5=#2980b9 -color_6=#8e44ad -color_7=#16a085 -color_8=#bdc3c7 -color_9=#34495e -color_10=#e74c3c -color_11=#2ecc71 -color_12=#f1c40f -color_13=#3498db -color_14=#9b59b6 -color_15=#2AA198 -color_16=#ecf0f1 -background=#1F2D3A -foreground=#00e2b5 -tab=#00e2b5 diff -Nru deepin-terminal-5.0.0+ds1/theme/freya deepin-terminal-5.4.13/theme/freya --- deepin-terminal-5.0.0+ds1/theme/freya 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/freya 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#073642 -color_2=#dc322f -color_3=#859900 -color_4=#b58900 -color_5=#268bd2 -color_6=#ec0048 -color_7=#2aa198 -color_8=#94a3a5 -color_9=#5D5D5D -color_10=#cb4b16 -color_11=#859900 -color_12=#b58900 -color_13=#54837e -color_14=#d33682 -color_15=#4BB8FD -color_16=#6c71c4 -background=#000000 -foreground=#23B5D3 -tab=#23B5D3 diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/gruvbox dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/gruvbox dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/gruvbox dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/gruvbox dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -[theme] -color_1=#282828 -color_2=#cc241d -color_3=#98971a -color_4=#d79921 -color_5=#458588 -color_6=#b16286 -color_7=#689d6a -color_8=#a89984 -color_9=#928374 -color_10=#fb4934 -color_11=#b8bb26 -color_12=#fabd2f -color_13=#83a598 -color_14=#d3869b -color_15=#8ec07c -color_16=#ebdbb2 -background=#282828 -foreground=#d5c4a1 -tab=#d5c4a1 -style=dark diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/gruvbox light" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/gruvbox light" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/gruvbox light" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/gruvbox light" 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -[theme] -color_1=#282828 -color_2=#cc241d -color_3=#98971a -color_4=#d79921 -color_5=#458588 -color_6=#b16286 -color_7=#689d6a -color_8=#7c6f64 -color_9=#928374 -color_10=#9d0006 -color_11=#70740e -color_12=#b57614 -color_13=#076678 -color_14=#8f3f71 -color_15=#427b58 -color_16=#3c3836 -background=#fbf1c7 -foreground=#3c3836 -tab=#3c3836 -style=light diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/hemisu dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/hemisu dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/hemisu dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/hemisu dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#444444 -color_2=#FF0054 -color_3=#B1D630 -color_4=#9D895E -color_5=#67BEE3 -color_6=#B576BC -color_7=#569A9F -color_8=#EDEDED -color_9=#777777 -color_10=#D65E75 -color_11=#BAFFAA -color_12=#ECE1C8 -color_13=#9FD3E5 -color_14=#DEB3DF -color_15=#B6E0E5 -color_16=#FFFFFF -background=#000000 -foreground=#3AF4D5 -tab=#3AF4D5 diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/hemisu light" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/hemisu light" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/hemisu light" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/hemisu light" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#777777 -color_2=#FF0055 -color_3=#739100 -color_4=#503D15 -color_5=#538091 -color_6=#5B345E -color_7=#538091 -color_8=#999999 -color_9=#999999 -color_10=#D65E76 -color_11=#9CC700 -color_12=#947555 -color_13=#9DB3CD -color_14=#A184A4 -color_15=#85B2AA -color_16=#2d522a -background=#EFEFEF -foreground=#1c2e00 -tab=#1c2e00 diff -Nru deepin-terminal-5.0.0+ds1/theme/hybrid deepin-terminal-5.4.13/theme/hybrid --- deepin-terminal-5.0.0+ds1/theme/hybrid 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/hybrid 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#282a2e -color_2=#A54242 -color_3=#8C9440 -color_4=#de935f -color_5=#5F819D -color_6=#85678F -color_7=#5E8D87 -color_8=#969896 -color_9=#373b41 -color_10=#cc6666 -color_11=#b5bd68 -color_12=#f0c674 -color_13=#81a2be -color_14=#b294bb -color_15=#8abeb7 -color_16=#c5c8c6 -background=#141414 -foreground=#FE9000 -tab=#FE9000 diff -Nru deepin-terminal-5.0.0+ds1/theme/jup deepin-terminal-5.4.13/theme/jup --- deepin-terminal-5.0.0+ds1/theme/jup 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/jup 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#dd006f -color_3=#6fdd00 -color_4=#dd6f00 -color_5=#006fdd -color_6=#6f00dd -color_7=#00dd6f -color_8=#f2f2f2 -color_9=#7d7d7d -color_10=#ff74b9 -color_11=#b9ff74 -color_12=#ffb974 -color_13=#74b9ff -color_14=#b974ff -color_15=#74ffb9 -color_16=#00ebc7 -background=#758480 -foreground=#225560 -tab=#225560 diff -Nru deepin-terminal-5.0.0+ds1/theme/mar deepin-terminal-5.4.13/theme/mar --- deepin-terminal-5.0.0+ds1/theme/mar 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/mar 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#b5407b -color_3=#7bb540 -color_4=#b57b40 -color_5=#407bb5 -color_6=#7b40b5 -color_7=#40b57b -color_8=#f8f8f8 -color_9=#737373 -color_10=#cd73a0 -color_11=#a0cd73 -color_12=#cda073 -color_13=#73a0cd -color_14=#a073cd -color_15=#73cda0 -color_16=#7d51d0 -background=#ffffff -foreground=#629460 -tab=#629460 diff -Nru deepin-terminal-5.0.0+ds1/theme/material deepin-terminal-5.4.13/theme/material --- deepin-terminal-5.0.0+ds1/theme/material 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/material 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#073641 -color_2=#EB606B -color_3=#C3E88D -color_4=#F7EB95 -color_5=#80CBC3 -color_6=#FF2490 -color_7=#AEDDFF -color_8=#FFFFFF -color_9=#002B36 -color_10=#EB606B -color_11=#C3E88D -color_12=#F7EB95 -color_13=#7DC6BF -color_14=#6C71C3 -color_15=#34434D -color_16=#FFFFFF -background=#1E282C -foreground=#E5BD47 -tab=#E5BD47 diff -Nru deepin-terminal-5.0.0+ds1/theme/miu deepin-terminal-5.4.13/theme/miu --- deepin-terminal-5.0.0+ds1/theme/miu 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/miu 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#b87a7a -color_3=#7ab87a -color_4=#b8b87a -color_5=#7a7ab8 -color_6=#b87ab8 -color_7=#7ab8b8 -color_8=#d9d9d9 -color_9=#262626 -color_10=#dbbdbd -color_11=#bddbbd -color_12=#dbdbbd -color_13=#bdbddb -color_14=#dbbddb -color_15=#bddbdb -color_16=#ffffff -background=#0d1926 -foreground=#c0d647 -tab=#c0d647 diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/monokai dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/monokai dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/monokai dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/monokai dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#75715e -color_2=#f92672 -color_3=#a6e22e -color_4=#f4bf75 -color_5=#66d9ef -color_6=#ae81ff -color_7=#2AA198 -color_8=#f9f8f5 -color_9=#272822 -color_10=#f92672 -color_11=#a6e22e -color_12=#f4bf75 -color_13=#66d9ef -color_14=#ae81ff -color_15=#2AA198 -color_16=#f8f8f2 -background=#272822 -foreground=#c3c384 -tab=#c3c384 diff -Nru deepin-terminal-5.0.0+ds1/theme/nep deepin-terminal-5.4.13/theme/nep --- deepin-terminal-5.0.0+ds1/theme/nep 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/nep 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#dd6f00 -color_3=#00dd6f -color_4=#6fdd00 -color_5=#6f00dd -color_6=#dd006f -color_7=#006fdd -color_8=#f2f2f2 -color_9=#7d7d7d -color_10=#ffb974 -color_11=#74ffb9 -color_12=#b9ff74 -color_13=#b974ff -color_14=#ff74b9 -color_15=#74b9ff -color_16=#ffffff -background=#758480 -foreground=#1e291d -tab=#1e291d diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/ocean dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/ocean dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/ocean dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/ocean dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#4F4F4F -color_2=#AF4B57 -color_3=#AFD383 -color_4=#E5C079 -color_5=#7D90A4 -color_6=#A4799D -color_7=#85A6A5 -color_8=#EEEDEE -color_9=#7B7B7B -color_10=#AF4B57 -color_11=#CEFFAB -color_12=#FFFECC -color_13=#B5DCFE -color_14=#FB9BFE -color_15=#DFDFFD -color_16=#FEFFFE -background=#1C1F27 -foreground=#637cce -tab=#637cce diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/one dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/one dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/one dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/one dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#E06C75 -color_3=#98C379 -color_4=#D19A66 -color_5=#61AFEF -color_6=#C678DD -color_7=#56B6C2 -color_8=#ABB2BF -color_9=#5C6370 -color_10=#E06C75 -color_11=#98C379 -color_12=#D19A66 -color_13=#61AFEF -color_14=#C678DD -color_15=#56B6C2 -color_16=#FFFEFE -background=#1E2127 -foreground=#21937d -tab=#21937d diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/one light" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/one light" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/one light" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/one light" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#DA3E39 -color_3=#41933E -color_4=#855504 -color_5=#315EEE -color_6=#930092 -color_7=#0E6FAD -color_8=#8E8F96 -color_9=#2A2B32 -color_10=#DA3E39 -color_11=#41933E -color_12=#855504 -color_13=#315EEE -color_14=#930092 -color_15=#0E6FAD -color_16=#352d46 -background=#F8F8F8 -foreground=#000000 -tab=#000000 diff -Nru deepin-terminal-5.0.0+ds1/theme/pali deepin-terminal-5.4.13/theme/pali --- deepin-terminal-5.0.0+ds1/theme/pali 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/pali 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#0a0a0a -color_2=#ab8f74 -color_3=#74ab8f -color_4=#8fab74 -color_5=#8f74ab -color_6=#ab748f -color_7=#748fab -color_8=#F2F2F2 -color_9=#5D5D5D -color_10=#FF1D62 -color_11=#9cc3af -color_12=#FFD00A -color_13=#af9cc3 -color_14=#FF1D62 -color_15=#4BB8FD -color_16=#A020F0 -background=#232E37 -foreground=#5fa5a2 -tab=#5fa5a2 diff -Nru deepin-terminal-5.0.0+ds1/theme/peppermint deepin-terminal-5.4.13/theme/peppermint --- deepin-terminal-5.0.0+ds1/theme/peppermint 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/peppermint 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#353535 -color_2=#E64569 -color_3=#89D287 -color_4=#DAB752 -color_5=#439ECF -color_6=#D961DC -color_7=#64AAAF -color_8=#B3B3B3 -color_9=#535353 -color_10=#E4859A -color_11=#A2CCA1 -color_12=#E1E387 -color_13=#6FBBE2 -color_14=#E586E7 -color_15=#96DCDA -color_16=#DEDEDE -background=#000000 -foreground=#ff2a63 -tab=#ff2a63 diff -Nru deepin-terminal-5.0.0+ds1/theme/sat deepin-terminal-5.4.13/theme/sat --- deepin-terminal-5.0.0+ds1/theme/sat 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/sat 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#dd0007 -color_3=#07dd00 -color_4=#ddd600 -color_5=#0007dd -color_6=#d600dd -color_7=#00ddd6 -color_8=#f2f2f2 -color_9=#7d7d7d -color_10=#ff7478 -color_11=#78ff74 -color_12=#fffa74 -color_13=#7478ff -color_14=#fa74ff -color_15=#74fffa -color_16=#ffffff -background=#758480 -foreground=#002617 -tab=#002617 diff -Nru deepin-terminal-5.0.0+ds1/theme/shel deepin-terminal-5.4.13/theme/shel --- deepin-terminal-5.0.0+ds1/theme/shel 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/shel 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#2c2423 -color_2=#ab2463 -color_3=#6ca323 -color_4=#ab6423 -color_5=#2c64a2 -color_6=#6c24a2 -color_7=#2ca363 -color_8=#918988 -color_9=#918988 -color_10=#f588b9 -color_11=#c2ee86 -color_12=#f5ba86 -color_13=#8fbaec -color_14=#c288ec -color_15=#8feeb9 -color_16=#f5eeec -background=#2a201f -foreground=#c66744 -tab=#c66744 diff -Nru deepin-terminal-5.0.0+ds1/theme/smyck deepin-terminal-5.4.13/theme/smyck --- deepin-terminal-5.0.0+ds1/theme/smyck 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/smyck 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -[theme] -color_1=#000000 -color_2=#C75646 -color_3=#8EB33B -color_4=#D0B03C -color_5=#72B3CC -color_6=#C8A0D1 -color_7=#218693 -color_8=#B0B0B0 -color_9=#5D5D5D -color_10=#E09690 -color_11=#CDEE69 -color_12=#FFE377 -color_13=#9CD9F0 -color_14=#FBB1F9 -color_15=#77DFD8 -color_16=#F7F7F7 -background=#242424 -foreground=#bca96b -tab=#bca96b - - diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/solarized dark" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/solarized dark" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/solarized dark" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/solarized dark" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#073642 -color_2=#DC322F -color_3=#859900 -color_4=#B58900 -color_5=#268BD2 -color_6=#D33682 -color_7=#2AA198 -color_8=#EEE8D5 -color_9=#002B36 -color_10=#CB4B16 -color_11=#586E75 -color_12=#657B83 -color_13=#839496 -color_14=#6C71C4 -color_15=#93A1A1 -color_16=#FDF6E3 -background=#002B36 -foreground=#00c18d -tab=#00c18d diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/solarized light" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/solarized light" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/solarized light" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/solarized light" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#073642 -color_2=#DC322F -color_3=#859900 -color_4=#B58900 -color_5=#268BD2 -color_6=#D33682 -color_7=#2AA198 -color_8=#EEE8D5 -color_9=#002B36 -color_10=#CB4B16 -color_11=#586E75 -color_12=#657B83 -color_13=#839496 -color_14=#6C71C4 -color_15=#93A1A1 -color_16=#906900 -background=#FDF6E3 -foreground=#403513 -tab=#403513 diff -Nru deepin-terminal-5.0.0+ds1/theme/tango deepin-terminal-5.4.13/theme/tango --- deepin-terminal-5.0.0+ds1/theme/tango 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/tango 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#2e3436 -color_2=#cc0000 -color_3=#4e9a06 -color_4=#c4a000 -color_5=#3465a4 -color_6=#75507b -color_7=#0b939b -color_8=#d3d7cf -color_9=#555753 -color_10=#ef2929 -color_11=#8ae234 -color_12=#fce94f -color_13=#729fcf -color_14=#ad7fa8 -color_15=#00f5e9 -color_16=#eeeeec -background=#101010 -foreground=#f2f2f2 -tab=#f2f2f2 diff -Nru deepin-terminal-5.0.0+ds1/theme/tin deepin-terminal-5.4.13/theme/tin --- deepin-terminal-5.0.0+ds1/theme/tin 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/tin 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#8d534e -color_3=#4e8d53 -color_4=#888d4e -color_5=#534e8d -color_6=#8d4e88 -color_7=#4e888d -color_8=#ffffff -color_9=#000000 -color_10=#b57d78 -color_11=#78b57d -color_12=#b0b578 -color_13=#7d78b5 -color_14=#b578b0 -color_15=#78b0b5 -color_16=#ffffff -background=#2e2e35 -foreground=#8575ff -tab=#8575ff diff -Nru deepin-terminal-5.0.0+ds1/theme/tomorrow deepin-terminal-5.4.13/theme/tomorrow --- deepin-terminal-5.0.0+ds1/theme/tomorrow 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/tomorrow 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#C82828 -color_3=#718C00 -color_4=#EAB700 -color_5=#4171AE -color_6=#8959A8 -color_7=#3E999F -color_8=#FFFEFE -color_9=#000000 -color_10=#C82828 -color_11=#708B00 -color_12=#E9B600 -color_13=#4170AE -color_14=#8958A7 -color_15=#3D999F -color_16=#203916 -background=#FFFFFF -foreground=#212121 -tab=#212121 diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#CC6666 -color_3=#B5BD68 -color_4=#F0C674 -color_5=#81A2BE -color_6=#B293BB -color_7=#8ABEB7 -color_8=#FFFEFE -color_9=#000000 -color_10=#CC6666 -color_11=#B5BD68 -color_12=#F0C574 -color_13=#80A1BD -color_14=#B294BA -color_15=#8ABDB6 -color_16=#FFFEFE -background=#1D1F21 -foreground=#8db2ac -tab=#8db2ac diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night blue" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night blue" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night blue" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night blue" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#FF9DA3 -color_3=#D1F1A9 -color_4=#FFEEAD -color_5=#BBDAFF -color_6=#EBBBFF -color_7=#99FFFF -color_8=#FFFEFE -color_9=#000000 -color_10=#FF9CA3 -color_11=#D0F0A8 -color_12=#FFEDAC -color_13=#BADAFF -color_14=#EBBAFF -color_15=#99FFFF -color_16=#FFFEFE -background=#002451 -foreground=#91a2ff -tab=#91a2ff diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night bright" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night bright" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night bright" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night bright" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#D54E53 -color_3=#B9CA49 -color_4=#E7C547 -color_5=#79A6DA -color_6=#C397D8 -color_7=#70C0B1 -color_8=#FFFEFE -color_9=#000000 -color_10=#D44D53 -color_11=#B9C949 -color_12=#E6C446 -color_13=#79A6DA -color_14=#C396D7 -color_15=#70C0B1 -color_16=#FFFEFE -background=#000000 -foreground=#919191 -tab=#919191 diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night eighties" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night eighties" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/tomorrow night eighties" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/tomorrow night eighties" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#F27779 -color_3=#99CC99 -color_4=#FFCC66 -color_5=#6699CC -color_6=#CC99CC -color_7=#66CCCC -color_8=#FFFEFE -color_9=#000000 -color_10=#F17779 -color_11=#99CC99 -color_12=#FFCC66 -color_13=#6699CC -color_14=#CC99CC -color_15=#66CCCC -color_16=#FFFEFE -background=#2C2C2C -foreground=#6f6f6f -tab=#6f6f6f diff -Nru deepin-terminal-5.0.0+ds1/theme/ura deepin-terminal-5.4.13/theme/ura --- deepin-terminal-5.0.0+ds1/theme/ura 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/ura 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#000000 -color_2=#c21b6f -color_3=#6fc21b -color_4=#c26f1b -color_5=#1b6fc2 -color_6=#6f1bc2 -color_7=#1bc26f -color_8=#808080 -color_9=#808080 -color_10=#ee84b9 -color_11=#b9ee84 -color_12=#eeb984 -color_13=#84b9ee -color_14=#b984ee -color_15=#84eeb9 -color_16=#45402e -background=#feffee -foreground=#39352c -tab=#39352c diff -Nru deepin-terminal-5.0.0+ds1/theme/vag deepin-terminal-5.4.13/theme/vag --- deepin-terminal-5.0.0+ds1/theme/vag 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/theme/vag 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#303030 -color_2=#a87139 -color_3=#39a871 -color_4=#71a839 -color_5=#7139a8 -color_6=#a83971 -color_7=#3971a8 -color_8=#8a8a8a -color_9=#494949 -color_10=#b0763b -color_11=#3bb076 -color_12=#76b03b -color_13=#763bb0 -color_14=#b03b76 -color_15=#3b76b0 -color_16=#cfcfcf -background=#191f1d -foreground=#16967e -tab=#16967e diff -Nru "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/white wind" "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/white wind" --- "/tmp/tmpcrb0hopo/nZKdEZnTEB/deepin-terminal-5.0.0+ds1/theme/white wind" 2019-07-08 06:37:52.000000000 +0000 +++ "/tmp/tmpcrb0hopo/CSNvUW4fd0/deepin-terminal-5.4.13/theme/white wind" 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -[theme] -color_1=#2b2b2b -color_2=#df6a73 -color_3=#719faa -color_4=#e5c17c -color_5=#68939c -color_6=#c679dd -color_7=#7db2bc -color_8=#9cacad -color_9=#34495e -color_10=#e74c3c -color_11=#719faa -color_12=#f1c40f -color_13=#719faa -color_14=#9b59b6 -color_15=#2AA198 -color_16=#ecf0f1 -background=#f7f9f9 -foreground=#7c8082 -tab=#00e2b5 diff -Nru deepin-terminal-5.0.0+ds1/.transifexrc deepin-terminal-5.4.13/.transifexrc --- deepin-terminal-5.0.0+ds1/.transifexrc 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/.transifexrc 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,6 @@ +[https://www.transifex.com] +api_hostname = https://api.transifex.com +hostname = https://www.transifex.com +password = 1/2847330938c2eebc627c8dd113ba4f58aeb3fd3d +username = api + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_az.ts deepin-terminal-5.4.13/translations/deepin-terminal_az.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_az.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_az.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Ad: + + + + Command: + Əmr: + + + + Shortcuts: + Qısayollar: + + + + + + + Required + Tələb olunur + + + + Add Command + Command əlavə et + + + + Edit Command + Əmrə düzəliş + + + + Delete Command + Əmri silmək + + + + Cancel + button + İmtina + + + + Add + button + Əlavə edin + + + + Save + button + Saxlayın + + + + OK + button + OK + + + + Please enter a name + Ad daxil edin + + + + Please enter a command + Əmr daxil edin + + + + The name already exists, + Bu ad artıq var + + + + please input another one. + lütfən başqasını seçin + + + + CustomCommandPanel + + + Add Command + Command əlavə et + + + + CustomCommandPlugin + + + Custom commands + Fərdi əmrlər + + + + CustomCommandSearchRstPanel + + + Search + Axtar + + + + CustomThemeSettingDialog + + + Custom Theme + Fərdi mövzu + + + + Style: + Tərz: + + + + Light + İşıqlı + + + + Dark + Tünd + + + + Fore color: + Ön rəng: + + + + Back color: + Arxa rəng: + + + + Prompt PS1: + PS1 dəvəti: + + + + Prompt PS2: + PS2 dəvəti: + + + + Cancel + button + İmtina + + + + Confirm + button + Təsdiqlə + + + + ListView + + + Delete Server + Serveri silmək + + + + + Are you sure you want to delete %1? + %1 silmək istədiyinizə əminsiniz? + + + + MainWindow + + + + New window + Yeni pəncərə + + + + Settings + Tənzimləmələr + + + + Cancel + button + İmtina + + + + Close + button + Bağla + + + + Type path to download file + Fayl yüklənəcək yolu yazın + + + + Custom Theme + Fərdi mövzu + + + + QObject + + + Copy on select + Seçimi kopyalamaq + + + + Cursor blink + Kursor sayrışır + + + + Cursor style + Kursor tərzi + + + + Scroll on keystroke + Düyməyə vurmaqla sürüşdürmək + + + + Scroll on output + Çıxışda sürüşdürmək + + + + Hide Quake window after losing focus + Fokus itirildikdən sonra Quake Terminalı gizlətmək + + + + + Blur background + Bulanıq arxa fon + + + + Use on starting + Başlanğıcda istifadə etmək + + + + Font + Şrift + + + + Font size + Şrift ölçüsü + + + + + Opacity + Qeyri-şəffaflıq + + + + Advanced + Təkmilləşmiş + + + + Cursor + Kursor + + + + Scroll + Sürüşdürmə + + + + Window + Pəncərə + + + + Basic + Əsas + + + + Interface + İnterfeys + + + + Shortcuts + Qısayollar + + + + + Others + Digəriləri + + + + + + Terminal + Terminal + + + + Workspace + İş sahəsi + + + + + Custom commands + Fərdi əmrlər + + + + + Display shortcuts + Qısayolları göstərmək + + + + + Remote management + Uzaqdan idarəetmə + + + + + New tab + Yeni vərəq + + + + + Next tab + Növbəti vərəq + + + + + Previous tab + Əvvəlki vərəq + + + + + Select left workspace + Sol iş sahəsini seçmək + + + + + Select lower workspace + Aşağı iş sahəsini seçmək + + + + + Select right workspace + Sağ iş sahəsini seçmək + + + + + Select upper workspace + Yuxarı iş sahəsini seçmək + + + + Tab titles + Vərəq başlıqları + + + + + Go to tab 1 + 1 vərəqə keçid + + + + + Go to tab 2 + 2 vərəqə keçid + + + + + Go to tab 3 + 3 vərəqə keçid + + + + + Go to tab 4 + 4 vərəqə keçid + + + + + Go to tab 5 + 5 vərəqə keçid + + + + + Go to tab 6 + 6 vərəqə keçid + + + + + Go to tab 7 + 7 vərəqə keçid + + + + + Go to tab 8 + 8 vərəqə keçid + + + + + Go to tab 9 + 9 vərəqə keçid + + + + Disable flow control using Ctrl+S, Ctrl+Q + Ctrl+S, Ctrl+Q istifadə edərək axını idarə edin + + + + Shell profile + Üz qabığı profili + + + + + + + Rename title + Başlığın adını dəyişmək + + + + + Fullscreen + Tam ekran + + + + + Copy + Kopyala + + + + + Default size + Standart ölçü + + + + + Paste + Əlavə et + + + + Search + Axtar + + + + + Select all + Hamısını seçmək + + + + Jump to next command + Sonra əmrə keçmək + + + + Jump to previous command + Əvvəlki əmrə keçmək + + + + + Zoom in + Yaxınlaşdır + + + + + Zoom out + Uzaqlaşdır + + + + Close other windows + Digər pəncərələri bağla + + + + + + Close other workspaces + Başqa iş sahələrini bağlamaq + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + "%1" tapılmadı, əvəzinə "%2" başladılır. Lütfən üz qabığı profilini yoxlayın. + + + + Could not open "%1", unable to run it + "%1" açıla bilmədi, onu başlatmaq mümkün deyil + + + + Could not find "%1", unable to run it + "%1" tapılmadı, onu başlatmaq mümkün olmadı + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Ctrl+S basmaqla çıxış dayandırıldı. Davam etmək üçün Ctrl+Q vurun. + + + + Close window + Pəncərəni bağlamaq + + + + + + Close workspace + İş sahəsini bağla + + + + + Horizontal split + Üfüqi bölünmə + + + + + Vertical split + Şaquli bölünmə + + + + + Find + Tapmaq + + + + + + please set another one. + lütfən başqasını təyin edin. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal, iş sahələri, çoxsaylı pəncərələr, uzaqdan idarəetmə, sürüşüb açılma rejimi və digər xüsusiyyətləri ilə birlikdə təkmilləşdirilmiş terminaldır. + + + + Tabs + Vərəqlər + + + + + Close tab + Vərəqi bağlamaq + + + + Select tab + Vərəqi seçmək + + + + Switch focus to "+" icon + Fokusu "+" nişanına dəyişmək + + + + + Select file to upload + Yükləmək üçün faylı seçin + + + + + Upload + Yükləmək + + + + Programs are still running in terminal + Proqramlar hələ də terminalda işləyir + + + + + Close this terminal? + Bu terminal bağlanılsın? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Hələ də terminalda işləyən proseslər var. Terminalı bağlamaq onlar sonlanacaq. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Bu terminalda hələ də işləyən %1 proses var. Terminalı bağlamaq onların hamısını sonlandıracaq. + + + + + Close this window? + Bu pəncərə baölansın? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Bu pəncərədə hələ də işləyən proseslər var. Pəncərənin bağlanması onların hamısını sonlandıracaq. + + + + + Select a directory to save the file + Fayl saxlanılacaq qovluğu seçin + + + + Are you sure you want to uninstall it? + Bunu silmək istədiyinizə əminsiniz? + + + + + Are you sure you want to uninstall this application? + Bu tətbiqi silmək istədiyinizə əminsiniz? + + + + + You will not be able to use Terminal any longer. + Terminaldan artıq istifadə edə bilməyəcəksiniz. + + + + + + + Cancel + button + İmtina + + + + + OK + button + OK + + + + Execute a command in the terminal + Əmri terminalda icra etmək + + + + Run script string in the terminal + Skript sətrini terminalda başlatmaq + + + + Set the work directory + İş qovluğunu təyin edin + + + + Set the window mode on starting + Başlanğıcda pəncərə rejimini təyin etmək + + + + Run in quake mode + Sürüşüb açılan rejimi işə salmaq + + + + Keep terminal open when command finishes + Əmr başa çatdıqda terminalı açıq saxlamaq + + + + + The name should be no more than 32 characters + Ad 32 işarədən böyük olmamalıdır + + + + + + Select + Seçmək + + + + Select the private key file + Məxfi açar faylını seçmək + + + + + Tab title format + Vərəq başlığı formatı + + + + + Remote tab title format + Uzaq vərəq başlığı formatı + + + + + Close other tabs + Başqa vərəqləri bağlamaq + + + + Delete + button + Sil + + + + + Confirm + button + Təsdiqlə + + + + RemoteManagementPanel + + + Add Server + Server əlavə edin + + + + RemoteManagementPlugin + + + Remote management + Uzaqdan idarəetmə + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Faylları göndərmək və endirmək üçün sağ klik etmədən öncə rz və sz əmrlərinin quraşdırıldığına əmin olun. + + + + RemoteManagementSearchPanel + + + Search + Axtar + + + + ServerConfigOptDlg + + + Advanced options + Əlavə seçimlər + + + + Add Server + Server əlavə edin + + + + Server name: + Serverin adı: + + + + + + Required + Tələb olunur + + + + Address: + Address + + + + Port: + Port: + + + + Username: + İstifadəçi adı: + + + + Password: + Şifrə: + + + + Certificate: + Sertifikat: + + + + Group: + Qrup: + + + + Path: + Yol: + + + + Command: + Əmr: + + + + Encoding: + Kodlaşma: + + + + Backspace key: + Backspace düyməsi: + + + + Delete key: + Açarı silmək: + + + + Delete server + Serveri silmək + + + + Cancel + button + İmtina + + + + Add + button + Əlavə edin + + + + Edit Server + Serverə düzəliş + + + + Save + button + Saxlayın + + + + + tty + tty + + + + Please enter a server name + Lütfən server adını daxil edin + + + + Please enter an IP address + Lütfən İP ünvanını daxil edin + + + + Please enter a port + Lütfən portu daxil edin + + + + Please enter a username + Lütfən istifadıçi adını daxil edin + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Server adı artıq mövcuddur, + + + + please input another one. + lütfən başqasını daxil edin. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Ekranı bölmək + + + + Fullscreen + Tam ekran + + + + Normal window + Normal pəncərə + + + + Maximum + Maksimum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1 qısayolu səhvdir, + + + + + + The shortcut %1 was already in use, + %1 qısayolu artıq istifadə olunur, + + + + TabRenameWidget + + + Insert + Yerləşdirmək + + + + + username: %u + istifadəçi_adı: %u + + + + username@: %U + istifadəçi_adı@: %U + + + + remote host: %h + uzaq host: %h + + + + + session number: %# + sesiya nömrəsi: %# + + + + + title set by shell: %w + üz qabığının təyin etdiyi başlıq: %w + + + + program name: %n + proqramın adı: %n + + + + current directory (short): %d + cari qovluq (qısa): %d + + + + current directory (long): %D + cari qovluq (uzun): %D + + + + local host: %h + lokal host: %h + + + + TermWidget + + + Copy + Kopyala + + + + Paste + Əlavə et + + + + Open + + + + + Open in file manager + Fayl menecerində açmaq + + + + + Horizontal split + Üfüqi bölünmə + + + + + Vertical split + Şaquli bölünmə + + + + + New tab + Yeni vərəq + + + + Exit fullscreen + Tam ekrandan çıx + + + + Fullscreen + Tam ekran + + + + Find + Tapmaq + + + + Search + Axtar + + + + Encoding + Kodlaşma: + + + + Custom commands + Fərdi əmrlər + + + + Remote management + Uzaqdan idarəetmə + + + + Upload file + Fayl göndərmək + + + + Download file + Fayl endirmək + + + + Settings + Tənzimləmələr + + + + Utils + + + + Cancel + button + İmtina + + + + Close + button + Bağla + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_bo.ts deepin-terminal-5.4.13/translations/deepin-terminal_bo.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_bo.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_bo.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + མིང་། + + + + Command: + བཀའ། + + + + Shortcuts: + མྱུར་མཐེབ། + + + + + + + Required + ངེས་པར་འབྲི་དགོས། + + + + Add Command + བཀའ་སྣོན་པ། + + + + Edit Command + རྩོམ་སྒྲིག་བཀའ། + + + + Delete Command + བཀའ་སུབ་པ། + + + + Cancel + button + འདོར་བ། + + + + Add + button + ཁ་སྣོན། + + + + Save + button + ཉར་གསོག་ + + + + OK + button + གཏན་ཁེལ། + + + + Please enter a name + མིང་འཇུག་རོགས། + + + + Please enter a command + བཀའ་འཇུག་རོགས། + + + + The name already exists, + མིང་འདི་མིན་འདུག + + + + please input another one. + ཡང་བསྐྱར་འཇུག་རོགས། + + + + CustomCommandPanel + + + Add Command + བཀའ་སྣོན་པ། + + + + CustomCommandPlugin + + + Custom commands + རང་སྒྲུབ་བཀའ། + + + + CustomCommandSearchRstPanel + + + Search + བཤེར་འཚོལ། + + + + CustomThemeSettingDialog + + + Custom Theme + རང་སྒྲུབ་བརྗོད་གཞི། + + + + Style: + བརྗོད་གཞིའི་ཁྱད་ཆོས། + + + + Light + མདོག་ཧར་པོ། + + + + Dark + མདོག་སྣུམ་་པོ། + + + + Fore color: + མདུན་གྱི་ཚོས་གཞི། + + + + Back color: + རྒྱབ་ཀྱི་ཚོས་གཞི། + + + + Prompt PS1: + ཟུར་སྟོན་བརྡ་རྟགས། PS1 + + + + Prompt PS2: + ཟུར་སྟོན་བརྡ་རྟགས། PS2 + + + + Cancel + button + འདོར་བ། + + + + Confirm + button + གཏན་ཁེལ། + + + + ListView + + + Delete Server + ཞབས་ཞུ་ཆས་སུབ་པ། + + + + + Are you sure you want to delete %1? + ཁྱོད་ཀྱིས་ %1སུབ་རྒྱུ་གཏན་ཁེལ་ལམ། + + + + MainWindow + + + + New window + སྒེའུ་ཁུང་གསར་པ་བཟོ་བ། + + + + Settings + སྒྲིག་འགོད། + + + + Cancel + button + འདོར་བ། + + + + Close + button + སྒོ་བརྒྱབ། + + + + Type path to download file + ཕབ་ལེན་ཡིག་ཆའི་འགྲོ་ལམ་འཇུག་རོགས། + + + + Custom Theme + རང་སྒྲུབ་བརྗོད་གཞི། + + + + QObject + + + Copy on select + ཡི་གེ་འདེམས་སྐབས་རང་འགུལ་ངང་གཏུབ་པང་ལ་པར་སློག་བྱེད། + + + + Cursor blink + འོད་རྟགས་ཆེམ་ཆེམ། + + + + Cursor style + འོད་རྟགས་བཟོ་ལྟ། + + + + Scroll on keystroke + མཐེབ་གཞོང་མནན་སྐབས་འགུལ་བ། + + + + Scroll on output + ཕྱིར་འདྲེན་སྐབས་འགུལ་བ། + + + + Hide Quake window after losing focus + འདུ་གནས་བརླག་སྐབས་ཐོག་ལྷ་སྒེའུ་ཁུང་ཡིབ་སྲིད། + + + + + Blur background + རྒྱབ་ལྗོངས་མི་གསལ། + + + + Use on starting + འགོ་སློང་དུས་སྤྱོད་རྒྱུ། + + + + Font + ཡིག་གཟུགས། + + + + Font size + ཡིག་གཟུགས་ཆེ་ཆུང་། + + + + + Opacity + གསལ་ཚད། + + + + Advanced + མཐོ་རིམ་སྒྲིག་འགོད། + + + + Cursor + འོད་རྟགས། + + + + Scroll + འགུལ་བ། + + + + Window + སྒེའུ་ཁུང་། + + + + Basic + རྨང་གཞིའི་སྒྲིག་འགོད། + + + + Interface + མཐུད་ཁ། + + + + Shortcuts + མྱུར་མཐེབ། + + + + + Others + གཞན་དག + + + + + + Terminal + མཐའ་སྣེ། + + + + Workspace + ལས་ཀ་བྱེད་ས། + + + + + Custom commands + རང་སྒྲུབ་བཀའ། + + + + + Display shortcuts + མྱུར་མཐེབ་མངོན་པ། + + + + + Remote management + རྒྱང་རིང་དོ་དམ། + + + + + New tab + གསར་བཟོས་གདོང་འཛར། + + + + + Next tab + གདོང་འཛར་ཤོག་ལྷེ་རྗེས་མ། + + + + + Previous tab + གདོང་འཛར་ཤོག་ལྷེ་གོང་མ། + + + + + Select left workspace + གཡོན་གྱི་ལས་ཀ་བྱེད་ཁུལ་འདེམས་པ། + + + + + Select lower workspace + གཤམ་གྱི་ལས་ཀ་བྱེད་ཁུལ་འདེམས་པ། + + + + + Select right workspace + གཡས་ཀྱི་ལས་ཀ་བྱེད་ཁུལ་འདེམས་པ། + + + + + Select upper workspace + གོང་གི་ལས་ཀ་བྱེད་ཁུལ་འདེམས་པ། + + + + Tab titles + གདོང་འཛར་གྱི་ཁ་བྱང་། + + + + + Go to tab 1 + གདོང་འཛར་1བརྗེ་བ། + + + + + Go to tab 2 + གདོང་འཛར་2བརྗེ་བ། + + + + + Go to tab 3 + གདོང་འཛར་3བརྗེ་བ། + + + + + Go to tab 4 + གདོང་འཛར་4བརྗེ་བ། + + + + + Go to tab 5 + གདོང་འཛར་5བརྗེ་བ། + + + + + Go to tab 6 + གདོང་འཛར་6བརྗེ་བ། + + + + + Go to tab 7 + གདོང་འཛར་7བརྗེ་བ། + + + + + Go to tab 8 + གདོང་འཛར་8བརྗེ་བ། + + + + + Go to tab 9 + གདོང་འཛར་9བརྗེ་བ། + + + + Disable flow control using Ctrl+S, Ctrl+Q + Ctrl+Sདང་Ctrl+Qསྤྱད་དེ་ཚོད་འཛིན་བྱེད་མི་ཆོག + + + + Shell profile + Shellསྒྲིག་འགོད། + + + + + + + Rename title + ཁ་བྱང་གི་མིང་བསྐྱར་འདོགས། + + + + + Fullscreen + ཡོལ་གང་། + + + + + Copy + མཁོ་ཕབ། + + + + + Default size + སོར་བཞག་ཆེ་ཆུང་། + + + + + Paste + སྦྱར་བ། + + + + Search + བཤེར་འཚོལ། + + + + + Select all + ཡོངས་འདེམས། + + + + Jump to next command + བཀའ་རྗེས་མར་མཆོང་བ། + + + + Jump to previous command + བཀའ་སྔ་མར་མཆོང་བ། + + + + + Zoom in + ཆེར་གཏོང་། + + + + + Zoom out + ཝང་གཏོང་། + + + + Close other windows + སྒེའུ་ཁུང་གཞན་ཁ་རྒྱག + + + + + + Close other workspaces + ལས་ཀ་བྱེད་ཡུལ་གཞན་དག་ཁ་རྒྱག + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + “%1”རྙེད་མེད་པས། “%2”ཚབ་བྱས་པ། Shellསྒྲིག་འགོད་ལ་ཞིབ་བཤེར་བྱེད། + + + + Could not open "%1", unable to run it + "%1"ཕྱེ་མི་ཐུབ་པས། རྒྱུན་ལྡན་ལྟར་སྤྱོད་ཐབས་བྲལ། + + + + Could not find "%1", unable to run it + “%1”རྙེད་མེད་པས། རྒྱུན་ལྡན་ལྟར་བེད་སྤྱོད་བྱ་ཐབས་བྲལ། + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Ctrl+Sམནན་ནས་བཀལ་ཟིན་པས། Ctrl+Qམནན་ན་མུ་མཐུད་བེད་སྤྱོད་བྱེད་ཆོག + + + + Close window + སྒེའུ་ཁུང་བརྒྱབ་པ། + + + + + + Close workspace + ལས་ཀྱ་བྱེད་ཡུལ་ཁ་རྒྱག + + + + + Horizontal split + བརྙན་ཡོལ་འཕྲེད་དུ་འབྱེད་པ། + + + + + Vertical split + བརྙན་ཡོལ་གཞུང་དུ་འབྱེད་པ། + + + + + Find + འཚོལ་བཤེར། + + + + + + please set another one. + ཡང་བསྐྱར་སྒྲིག་འགོད་བྱེད་རོགས། + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + མཐའ་སྣེ་ནི་ལས་ཀ་བྱེད་ཡུལ་དང་། སྒེའུ་ཁུང་མང་བ། རྒྱང་རིང་དོ་དམ། ཐོག་ལྷའི་དཔེ་རྣམ་སོགས་བྱེད་ནུས་འདུ་བའི་མཐའ་སྣེའི་དཔེ་ལད་ཆས་ཤིག་རེད། + + + + Tabs + གདོང་འཛར་ཤོག་ངོས། + + + + + Close tab + གདོང་འཛར་ཤོག་ངོས་ཁ་རྒྱག་པ། + + + + Select tab + གདོང་འཛར་ཤོག་ངོས་འདེམས་པ། + + + + Switch focus to "+" icon + འོད་རྟགས་མདོ་ཚེག་པར་རིས་“+”ལ་བརྗེ་བ། + + + + + Select file to upload + སྐྱེལ་འཇོག་བྱེད་པའི་ཡིག་ཆ་འདེམས་རྒྱུ། + + + + + Upload + སྐྱེལ་འཇོག + + + + Programs are still running in terminal + མཐའ་སྣེར་སྔར་བཞིན་བཀོལ་སྤྱོད་བྱེད་བཞིན་པའི་བྱ་རིམ་འདུག + + + + + Close this terminal? + མཐའ་སྣེ་འདི་ཁ་རྒྱག + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + མཐའ་སྣེ་འདིར་ད་རུང་བྱ་རིམ་1བཀོལ་སྤྱོད་བྱེད་བཞིན་ཡོད་པས། མཐའ་སྣེ་ཁ་རྒྱག་ན་བྱ་རིམ་ཡང་ཁ་རྒྱག་སྲིད། + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + མཐའ་སྣེ་འདིར་ད་རུང་བྱ་རིམ་%1བཀོལ་སྤྱོད་བྱེད་བཞིན་ཡོད་པས། མཐའ་སྣེ་ཁ་རྒྱག་ན་བྱ་རིམ་ཡང་ཁ་རྒྱག་སྲིད། + + + + + Close this window? + སྒེའུ་ཁུང་འདི་ཁ་རྒྱག + + + + + There are still processes running in this window. Closing the window will kill all of them. + སྒེའུ་ཁུང་ནང་གི་མཐའ་སྣེ་འགར་ད་དུང་བྱ་རིམ་བཀོལ་སྤྱོད་བྱེད་བཞིན་ཡོད་པས། སྒེའུ་ཁུང་ཁ་རྒྱག་ན་བྱ་རིམ་ཡང་ཁ་རྒྱག་སྲིད། + + + + + Select a directory to save the file + ཕབ་ལེན་བྱས་པའི་ཡིག་ཆའི་ཉར་ཚགས་དཀར་ཆག་བྱ་ཡུལ་འདེམས་རྒྱུ། + + + + Are you sure you want to uninstall it? + ཁྱེད་ཀྱིས་དེ་བཤིག་འདོན་བྱ་རྒྱུ་གཏན་ཁེལ་ལམ། + + + + + Are you sure you want to uninstall this application? + ཁྱེད་ཀྱིས་མཐའ་སྣེ་བཤིག་འདོན་བྱ་རྒྱུ་གཏན་ཁེལ་ལམ། + + + + + You will not be able to use Terminal any longer. + བཤིག་འདོན་བྱས་རྗེས་ཉེར་སྤྱོད་འདི་སྤྱོད་ཐབས་མེད། + + + + + + + Cancel + button + འདོར་བ། + + + + + OK + button + གཏན་ཁེལ། + + + + Execute a command in the terminal + མཐའ་སྣེའི་ཁྲོད་དུ་བྱ་རིམ་ བཀོལ་བཞིན་ཡོད། + + + + Run script string in the terminal + མཐའ་སྣེའི་ཁྲོད་འཁྲབ་དེབ་ཡིག་རྟགས་ཕྲེང་བ་ཡོད་ཆོག + + + + Set the work directory + མཐའ་སྣེའི་འགོ་སློང་དཀར་ཆག་སྒྲིག་འགོད། + + + + Set the window mode on starting + མཐའ་སྣེའི་འགོ་སློང་བའི་དཔེ་རྣམ་སྒྲིག་འགོད། + + + + Run in quake mode + མཐའན་སྣེ་ཡིས་ཐོག་ལྷའི་དཔེ་རྣམ་ལྟར་འགོ་སློང་རྒྱུ་སྒྲིག་འགོད་བྱ་རྒྱུ། + + + + Keep terminal open when command finishes + མཐའ་སྣེས་བཀའ་འམ་འཁྲབ་གཞུང་ལག་བསྟར་བྱས་རྗེས་ཀྱི་འབྲས་བུ་མངོན་རྒྱུ་སྒྲིག་འགོད་བྱ་རྒྱུ། + + + + + The name should be no more than 32 characters + མིང་གི་རིང་ཐུང་ཡིག་རྟགས་32ལས་བརྒལ་མི་རུང་། + + + + + + Select + ཡིག་བརྙན་འདེམས་པ། + + + + Select the private key file + སྒེར་གྱི་ཡིག་ཆ་འདེམས་རྒྱུ། + + + + + Tab title format + གདོང་འཛར་ཁ་བྱང་གི་རྣམ་གཞག + + + + + Remote tab title format + རྒྱང་སྦྲེལ་གདོང་འཛར་ཁ་བྱང་གི་རྣམ་གཞག + + + + + Close other tabs + གདོང་འཛར་ཤོག་ངོས་གཞན་དག་ཁ་རྒྱོབ། + + + + Delete + button + སུབ་པ། + + + + + Confirm + button + གཏན་ཁེལ། + + + + RemoteManagementPanel + + + Add Server + ཞབས་ཞུ་ཆས་སྣོན་པ། + + + + RemoteManagementPlugin + + + Remote management + རྒྱང་སྦྲེལ་དོ་དམ། + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + ཁྱེད་ཀྱིས་མཐེབ་གཡས་འདེམས་བྱང་སྤྱད་ནས་ཡིག་ཆ་སྐྱེལ་འཇུག་དང་ཕབ་ལེན་མ་བྱས་གོང་དུ། ཞབས་ཞུ་ཆས་ལ་བཀའ་rzདང་sz སྒྲིག་འཇུག་བྱ་དགོས། + + + + RemoteManagementSearchPanel + + + Search + བཤེར་འཚོལ། + + + + ServerConfigOptDlg + + + Advanced options + མཐོ་རིམ་གདམ་ག + + + + Add Server + ཞབས་ཞུ་ཆས་སྣོན་པ། + + + + Server name: + ཞབས་ཞུ་ཆས་ཀྱི་མིང་། + + + + + + Required + ངེས་པར་འབྲི་དགོས། + + + + Address: + གནས་ཡུལ། + + + + Port: + མཐུད་ཁ། + + + + Username: + སྤྱོད་མཁན་མིང་། + + + + Password: + གསང་ཨང་། + + + + Certificate: + དཔང་ཡིག + + + + Group: + ཚོ་བགོས། + + + + Path: + ཡིག་ཆའི་འགྲོ་ལམ། + + + + Command: + བཀའ། + + + + Encoding: + ཨང་སྒྲིག + + + + Backspace key: + ཕྱིར་བཤོལ་མཐེབ། + + + + Delete key: + སུབ་པའི་མཐེབ། + + + + Delete server + ཞབས་ཞུ་ཆས་སུབ་པ། + + + + Cancel + button + འདོར་བ། + + + + Add + button + ཁ་སྣོན། + + + + Edit Server + ཞབས་ཞུ་ཆས་རྩོམ་སྒྲིག + + + + Save + button + ཉར་གསོག་ + + + + + tty + tty + + + + Please enter a server name + ཞབས་ཞུ་ཆས་ཀྱི་མིང་འཇུག་རོགས། + + + + Please enter an IP address + IP གནས་ཡུལ་འཇུག་རོགས། + + + + Please enter a port + མཐུད་ཁ་འཇུག་རོགས། + + + + Please enter a username + སྤྱོད་མཁན་མིང་འཇུག་རོགས། + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + ཞབས་ཞུ་ཆས་འདིའི་མིང་མིན་འདུག + + + + please input another one. + ཡང་བསྐྱར་འཇུག་རོགས། + + + + Service + + + OK + button + གཏན་ཁེལ། + + + + Settings + + + Split screen + བརྙན་ཡོལ་འབྱེད་པ། + + + + Fullscreen + ཡོལ་གང་། + + + + Normal window + རྒྱུན་ཅན་སྒེའུ་ཁུང་། + + + + Maximum + ཆེ་སྒྱུར། + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1ནི་ཕན་མེད་མྱུར་མཐེབ་རེད། + + + + + + The shortcut %1 was already in use, + མྱུར་མཐེབ་%1སྤྱོད་བཞིན་ཡོད། + + + + TabRenameWidget + + + Insert + བར་འཇུག + + + + + username: %u + སྤྱོད་མཁན་མིང་། %u + + + + username@: %U + སྤྱོད་མཁན་མིང་། @ %u + + + + remote host: %h + རྒྱང་སྦྲེལ་རྩིས་འཁོར་ཨ་མ། %h + + + + + session number: %# + བགྲོ་གླེང་ཨང་རྟགས། %# + + + + + title set by shell: %w + shellསྒྲིག་བཀོད་བྱས་པའི་སྒེའུ་ཁུང་གི་ཁ་བྱང་། %w + + + + program name: %n + བྱ་རིམ་མིང་། %n + + + + current directory (short): %d + མིག་སྔའི་དཀར་ཆག (ཐུང་ངུ་):%d + + + + current directory (long): %D + མིག་སྔའི་དཀར་ཆག་(རིང་བ་):%D + + + + local host: %h + རང་སའི་རྩིས་འཁོར་ཨ་མ། + + + + TermWidget + + + Copy + མཁོ་ཕབ། + + + + Paste + སྦྱར་བ། + + + + Open + ཁ་ཕྱེ་བ། + + + + Open in file manager + ཡིག་ཆ་དོ་དམ་ཆས་ནང་དུ་ཁ་ཕྱེ། + + + + + Horizontal split + བརྙན་ཡོལ་འཕྲེད་དུ་འབྱེད་པ། + + + + + Vertical split + བརྙན་ཡོལ་གཞུང་དུ་འབྱེད་པ། + + + + + New tab + གསར་བཟོས་གདོང་འཛར། + + + + Exit fullscreen + ཡོལ་གང་ལས་ཕྱིར་འཐེན་པ། + + + + Fullscreen + ཡོལ་གང་། + + + + Find + འཚོལ་བཤེར། + + + + Search + བཤེར་འཚོལ། + + + + Encoding + ཨང་སྒྲིག་བྱེད་སྟངས། + + + + Custom commands + རང་སྒྲུབ་བཀའ། + + + + Remote management + རྒྱང་སྦྲེལ་དོ་དམ། + + + + Upload file + ཡིག་ཆ་སྐྱེལ་འཇོག + + + + Download file + ཡིག་ཆ་ཕབ་ལེན། + + + + Settings + སྒྲིག་འགོད། + + + + Utils + + + + Cancel + button + འདོར་བ། + + + + Close + button + སྒོ་བརྒྱབ། + + + + + OK + button + གཏན་ཁེལ། + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_br.ts deepin-terminal-5.4.13/translations/deepin-terminal_br.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_br.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_br.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1310 @@ + + + + + CustomCommandOptDlg + + + Name: + Anv: + + + + Command: + Urzhiad: + + + + Shortcuts: + Berradurioù: + + + + + + + Required + Goulennet + + + + Add Command + Ouzhpennañ un urzhiad + + + + Edit Command + Aozañ an urzhiad + + + + Delete Command + Dilemel an urzhiad + + + + Cancel + button + Nullañ + + + + Add + button + Ouzhpennañ + + + + Save + button + Enrollañ + + + + OK + button + Mat eo + + + Cancel + Nullañ + + + Add + Ouzhpennañ + + + Save + Enrollañ + + + + Please enter a name + Ebarzhit un anv mar plij + + + + Please enter a command + Ebarzhit un urzhiad mar plij + + + + The name already exists, + An anv-mañ a zo anezhañ dija, + + + + please input another one. + ebarzhit unan all mar plij. + + + OK + Mat eo + + + + CustomCommandPanel + + + Add Command + Ouzhpennañ un urzhiad + + + + CustomCommandPlugin + + + Custom commands + Urzhiadoù personnelaet + + + + CustomCommandSearchRstPanel + + + Search + Klask + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + Nullañ + + + + Confirm + button + Kadarnaat + + + Cancel + Nullañ + + + Confirm + Kadarnaat + + + + DSettingsDialog + + This shortcut conflicts with %1 + Ar verradenn a sav bec'h gant %1 + + + + ListView + + + Delete Server + Dilemel ar servijer + + + + + Are you sure you want to delete %1? + Ha sur oc'h ho peus c'hoant dilemel %1? + + + + MainWindow + + + + New window + Prenestr nevez + + + + Settings + Arventennoù + + + + Cancel + button + Nullañ + + + + Close + button + Serriñ + + + Cancel + Nullañ + + + Close + Serriñ + + + + Type path to download file + Skrivit an hent evit pellgargañ ar restr + + + + Custom Theme + + + + + QObject + + OK + Mat eo + + + + Copy on select + Eilañ an diuzadenn + + + + Cursor blink + Blinkadenn ar reti + + + + Cursor style + Doare kursor + + + + Scroll on keystroke + Dibunañ pa vez pouezet war ur bouton + + + + Scroll on output + Dibunañ an ezvont + + + + Hide Quake window after losing focus + Kuzhat ar prenestr Quake ur wech kollet ar fokus gantañ + + + + + Blur background + Disteraat an drek-leur + + + + Use on starting + Implijout el loc'hañ + + + + Font + Skritur + + + + Font size + Ment ar skritur + + + + + Opacity + Treuzwelusted + + + + Advanced + Araokaet + + + + Cursor + Reti + + + + Scroll + Dibunañ + + + + Window + Prenestr + + + + Basic + Eeun + + + + Interface + Etrefas + + + + Shortcuts + Berradurioù + + + + + Others + Traoù all + + + + + + Terminal + Terminal + + + + Workspace + Spas-labour + + + + + Custom commands + Urzhiadoù personnelaet + + + + + Display shortcuts + Diskouez ar berradurioù + + + + + Remote management + Kontrolliñ a-bell + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Adenvel an titl + + + + + Fullscreen + Skramm-leun + + + + + Copy + Eilañ + + + + + Default size + Ment dre ziouer + + + + + Paste + Pegañ + + + + Search + Klask + + + + + Select all + Diuzañ pep-tra + + + + Jump to next command + Mont d'an urzhiad da heul + + + + Jump to previous command + Mont d'an urzhiad kent + + + + + Zoom in + Zoumañ + + + + + Zoom out + Dizoumañ + + + + Close other windows + Serriñ ar prinistri all + + + + + + Close other workspaces + Serriñ ar spasoù-labour all + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Serriñ ar prenestr + + + + + + Close workspace + Serriñ ar spas-labour + + + + + Horizontal split + Rannañ a-blaen + + + + + Vertical split + Rannañ a-blom + + + + + Find + Kavout + + + Cancel + Nullañ + + + Delete + Dilemel + + + + + + please set another one. + termenit unan all mar plij. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Deepin Terminal a zo un emulator terminal araokaet gant spasoù-labour, meur a brenestr, merañ a-bell, ur mod quake hag arc'hweladurioù ouzhpenn. + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + Diuzañ ar restr da bellgas + + + + + Upload + Pellgas + + + + Programs are still running in terminal + Programmoù a zo war sekutiñ en terminal bepred + + + Are you sure you want to exit? + Ha sur oc'h ho peus c'hoant kuitaat? + + + Exit + Kuitaat + + + + + Close this terminal? + Serriñ an terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Bez ez eus c'hoazh ur prosesus o vont en-dro e-barzh an terminal-mañ. Serriñ an terminal a lazho hemañ. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Bez ez eus c'hoazh 1% a brosesusoù o vont en-dro e-barzh an terminal-mañ. Serriñ an terminal a lazho an holl anezho. + + + + + Close this window? + Serriñ ar prenestr-mañ? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Bez ez eus c'hoazh prosesusoù o vont en-dro e-barzh ar prenestr-mañ. Serriñ ar prenestr a lazho ar re-se. + + + + + Select a directory to save the file + Diuzit ur c'havlec'h evit enrollañ ar restr + + + + Are you sure you want to uninstall it? + Ha sur oc'h da gaout c'hoant da zistaliañ an dra-mañ? + + + + + Are you sure you want to uninstall this application? + Ha sur oc'h ho peus c'hoant da zistaliañ an aplikasion-mañ? + + + + + You will not be able to use Terminal any longer. + Ne vo ket posupl deoc'h implijout Terminal ken. + + + Click on Add to make this shortcut effective immediately + Klikit war Ouzhpennañ evit ma vefe oberiant ar verradenn-mañ kerkent + + + Replace + Erlec'hiañ + + + + Execute a command in the terminal + Sekutiñ un urzhiad en terminal + + + + Run script string in the terminal + Sekutiñ chadenn ar skript en terminal + + + + Set the work directory + Spisait ar c'havlec'h labour + + + + + OK + button + Mat eo + + + + Set the window mode on starting + Spisait mod prenestr el loc'hañ + + + + Run in quake mode + Sekutiñ e mod Quake + + + + Keep terminal open when command finishes + Mirout an terminal digoret pa echu an urzhiad + + + + + The name should be no more than 32 characters + N'hall ket bezañ hiroc'h an anv evit 32 arouezenn + + + + + + Select + Diuzañ + + + + Select the private key file + Diuzit ar restr alc'hwez prevez + + + Confirm + Kadarnaat + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + Nullañ + + + + Delete + button + Dilemel + + + + + Confirm + button + Kadarnaat + + + + RemoteManagementPanel + + + Add Server + Ouzhpennañ ar servijer + + + + RemoteManagementPlugin + + + Remote management + Kontrolliñ a-bell + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Bezit asur eo bet staliet an urzhiadoù rz hag sz e-barzh ar servijer a-raok na glikfer dehoù evit pellgas ha pellgargañ ar restroù. + + + + RemoteManagementSearchPanel + + + Search + Klask + + + + ServerConfigOptDlg + + + Advanced options + Dibarzhioù araokaet + + + + Add Server + Ouzhpennañ ar servijer + + + + Server name: + Anv ar servijer: + + + + + + Required + Goulennet + + + + Address: + Chomlec'h: + + + + Port: + Porzh: + + + + Username: + Anv-implijer: + + + + Password: + Ger-tremen: + + + + Certificate: + Testeni: + + + + Group: + Strollad: + + + + Path: + Hent: + + + + Command: + Urzhiad: + + + + Encoding: + Enkodañ: + + + + Backspace key: + Stokell souzañ: + + + + Delete key: + Dilemel an alc'hwez: + + + + Delete server + Dilemel ar servijer + + + + Cancel + button + Nullañ + + + + Add + button + Ouzhpennañ + + + Cancel + Nullañ + + + Add + Ouzhpennañ + + + + Edit Server + Aozañ ar servijer + + + + Save + button + Enrollañ + + + + + tty + tty + + + + Please enter a server name + Ebarzhit un anv-servijer mar plij + + + + Please enter an IP address + Ebarzhit ur chomlec'h IP mar plij + + + + Please enter a port + Ebarzhit ur porzh mar plij + + + + Please enter a username + Ebarzhit un anv-implijader mar plij + + + Save + Enrollañ + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + kontrol-E-barzh + + + + + escape-sequence + sekañs-achapañ + + + + The server name already exists, + An anv-servijer a zo anezhañ endeo, + + + + please input another one. + ebarzhit unan all mar plij. + + + + Service + + OK + Mat eo + + + + OK + button + Mat eo + + + + Settings + + + Split screen + Skramm daouhanteret + + + + Fullscreen + Skramm-leun + + + + Normal window + Prenestr normal + + + + Maximum + Maksimom + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Ar verradenn-glaver %1 a zo direizh + + + + + + The shortcut %1 was already in use, + Ar verradenn %1 a zo war implij dija, + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Cancel + Nullañ + + + Confirm + Kadarnaat + + + + TermWidget + + + Copy + Eilañ + + + + Paste + Pegañ + + + + Open + Digeriñ + + + + Open in file manager + Digeriñ ar merer restroù + + + + + Horizontal split + Rannañ a-blaen + + + + + Vertical split + Rannañ a-blom + + + + + New tab + + + + + Exit fullscreen + Kuitaat ar skramm-leun + + + + Fullscreen + Skramm-leun + + + + Find + Kavout + + + + Search + Klask + + + + Encoding + Enkodañ + + + + Custom commands + Urzhiadoù personnelaet + + + + Remote management + Kontrolliñ a-bell + + + + Upload file + Pellgas ar restr + + + + Download file + Pellgargañ ar restr + + + + Settings + Arventennoù + + + + Utils + + Cancel + Nullañ + + + Close + Serriñ + + + OK + Mat eo + + + + + Cancel + button + Nullañ + + + + Close + button + Serriñ + + + + + OK + button + Mat eo + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ca.ts deepin-terminal-5.4.13/translations/deepin-terminal_ca.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ca.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_ca.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nom: + + + + Command: + Ordre: + + + + Shortcuts: + Dreceres: + + + + + + + Required + Cal + + + + Add Command + Afegeix una ordre + + + + Edit Command + Edita l'ordre + + + + Delete Command + Elimina l'ordre + + + + Cancel + button + Cancel·la + + + + Add + button + Afegeix + + + + Save + button + Desa + + + + OK + button + D'acord + + + + Please enter a name + Si us plau, escriviu un nom. + + + + Please enter a command + Si us plau, escriviu una ordre. + + + + The name already exists, + El nom ja existeix; + + + + please input another one. + si us plau, escriviu-ne un altre. + + + + CustomCommandPanel + + + Add Command + Afegeix una ordre + + + + CustomCommandPlugin + + + Custom commands + Ordres personalitzades + + + + CustomCommandSearchRstPanel + + + Search + Cerca + + + + CustomThemeSettingDialog + + + Custom Theme + Tema personalitzat + + + + Style: + Estil: + + + + Light + Lleugera + + + + Dark + Fosc + + + + Fore color: + Color frontal: + + + + Back color: + Color de fons: + + + + Prompt PS1: + Indicador PS1: + + + + Prompt PS2: + Indicador PS2: + + + + Cancel + button + Cancel·la + + + + Confirm + button + Confirmeu-ho + + + + ListView + + + Delete Server + Elimina el servidor + + + + + Are you sure you want to delete %1? + Segur que voleu eliminar %1? + + + + MainWindow + + + + New window + Finestra nova + + + + Settings + Configuració + + + + Cancel + button + Cancel·la + + + + Close + button + Tanca + + + + Type path to download file + Escriviu el camí per baixar el fitxer. + + + + Custom Theme + Tema personalitzat + + + + QObject + + + Copy on select + Copia en seleccionar + + + + Cursor blink + Intermitència del cursor + + + + Cursor style + Estil del cursor + + + + Scroll on keystroke + Desplaçament en tocar una tecla + + + + Scroll on output + Desplaçament en una sortida + + + + Hide Quake window after losing focus + Oculta la finestra desplegable en perdre el focus. + + + + + Blur background + Fons difuminat + + + + Use on starting + Usa en iniciar + + + + Font + Lletra + + + + Font size + Mida de la lletra + + + + + Opacity + Opacitat + + + + Advanced + Avançat + + + + Cursor + Cursor + + + + Scroll + Desplaçament + + + + Window + Finestra + + + + Basic + Bàsic + + + + Interface + Interfície + + + + Shortcuts + Dreceres + + + + + Others + Altres + + + + + + Terminal + Terminal + + + + Workspace + Espai de treball + + + + + Custom commands + Ordres personalitzades + + + + + Display shortcuts + Mostra les dreceres + + + + + Remote management + Gestió remota + + + + + New tab + Pestanya nova + + + + + Next tab + Pestanya següent + + + + + Previous tab + Pestanya anterior + + + + + Select left workspace + Selecciona l'espai de treball de l'esquerra + + + + + Select lower workspace + Selecciona l'espai de treball de baix + + + + + Select right workspace + Selecciona l'espai de treball de la dreta + + + + + Select upper workspace + Selecciona l'espai de treball de dalt + + + + Tab titles + Títols de les pestanyes + + + + + Go to tab 1 + Ves a la pestanya 1 + + + + + Go to tab 2 + Ves a la pestanya 2 + + + + + Go to tab 3 + Ves a la pestanya 3 + + + + + Go to tab 4 + Ves a la pestanya 4 + + + + + Go to tab 5 + Ves a la pestanya 5 + + + + + Go to tab 6 + Ves a la pestanya 6 + + + + + Go to tab 7 + Ves a la pestanya 7 + + + + + Go to tab 8 + Ves a la pestanya 8 + + + + + Go to tab 9 + Ves a la pestanya 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Inhabiliteu el control de flux amb Ctrl+S, Ctrl+Q. + + + + Shell profile + Perfil de l'intèrpret + + + + + + + Rename title + Canvia'n el títol + + + + + Fullscreen + Pantalla completa + + + + + Copy + Copia + + + + + Default size + Mida per defecte + + + + + Paste + Enganxa + + + + Search + Cerca + + + + + Select all + Selecciona-ho tot + + + + Jump to next command + Salta a l'ordre següent + + + + Jump to previous command + Salta a l'ordre anterior + + + + + Zoom in + Ampliació + + + + + Zoom out + Reducció + + + + Close other windows + Tanca les altres finestres + + + + + + Close other workspaces + Tanca altres espais de treball + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + No s'ha pogut trobar "%1", s'inicia "%2". Si us plau, comproveu el perfil de l'intèrpret d'ordres. + + + + Could not open "%1", unable to run it + No s'ha pogut obrir "%1". No es pot executar. + + + + Could not find "%1", unable to run it + No s'ha pogut trobar "%1", no es pot executar. + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + La sortida s'ha suspès prement Ctrl+S. Premeu Ctrl+Q per reprendre-la. + + + + Close window + Tanca la finestra + + + + + + Close workspace + Tanca l'espai de treball + + + + + Horizontal split + Divisió horitzontal + + + + + Vertical split + Divisió vertical + + + + + Find + Troba + + + + + + please set another one. + si us plau, establiu-ne un/a altre/a. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + El Terminal és un emulador de terminal avançat amb divisió de finestres, espais de treball, gestió remota, mode Quake i altres característiques. + + + + Tabs + Pestanyes + + + + + Close tab + Tanca la pestanya + + + + Select tab + Selecciona la pestanya + + + + Switch focus to "+" icon + Canvia el focus a la icona "+" + + + + + Select file to upload + Seleccioneu el fitxer per carregar + + + + + Upload + Carrega + + + + Programs are still running in terminal + Encara hi ha programes executant-se al terminal + + + + + Close this terminal? + Voleu tancar aquest terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Encara hi ha un procés que s'executa en aquest terminal. Tancar-lo el matarà. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Encara hi ha %1 processos que s'executen en aquest terminal. Tancar-lo els matarà tots. + + + + + Close this window? + Voleu tancar aquesta finestra? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Encara hi ha processos que s'executen en aquesta finestra. Tancar-la els matarà tots. + + + + + Select a directory to save the file + Seleccioneu un directori per desar-hi el fitxer. + + + + Are you sure you want to uninstall it? + Segur que voleu desinstal·lar-la? + + + + + Are you sure you want to uninstall this application? + Segur que voleu desinstal·lar aquesta aplicació? + + + + + You will not be able to use Terminal any longer. + Ja no podreu usar més el Terminal. + + + + + + + Cancel + button + Cancel·la + + + + + OK + button + D'acord + + + + Execute a command in the terminal + Executa una ordre al terminal + + + + Run script string in the terminal + Executa la cadena de script al terminal + + + + Set the work directory + Establiu el directori de treball. + + + + Set the window mode on starting + Establiu el mode de finestra a l'inici. + + + + Run in quake mode + Execució en mode quake + + + + Keep terminal open when command finishes + Mantén el terminal obert quan l'odre acabi. + + + + + The name should be no more than 32 characters + El nom no hauria de superar els 32 caràcters. + + + + + + Select + Selecciona + + + + Select the private key file + Selecciona el fitxer de clau privada + + + + + Tab title format + Format del títol de les pestanyes + + + + + Remote tab title format + Format remot del títol de les pestanyes + + + + + Close other tabs + Tanca les altres pestanyes + + + + Delete + button + Elimina + + + + + Confirm + button + Confirmeu-ho + + + + RemoteManagementPanel + + + Add Server + Afegeix un servidor + + + + RemoteManagementPlugin + + + Remote management + Gestió remota + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Assegureu-vos que les ordres rz i sz s'han instal·lat al servidor abans de fer clic dret per penjar i baixar fitxers. + + + + RemoteManagementSearchPanel + + + Search + Cerca + + + + ServerConfigOptDlg + + + Advanced options + Opcions avançades + + + + Add Server + Afegeix un servidor + + + + Server name: + Nom de servidor: + + + + + + Required + Cal + + + + Address: + Adreça: + + + + Port: + Port: + + + + Username: + Nom d'usuari: + + + + Password: + Contrasenya: + + + + Certificate: + Certificat: + + + + Group: + Grup: + + + + Path: + Camí: + + + + Command: + Ordre: + + + + Encoding: + Codificació: + + + + Backspace key: + Tecla de retrocés: + + + + Delete key: + Elimina la clau: + + + + Delete server + Elimina el servidor + + + + Cancel + button + Cancel·la + + + + Add + button + Afegeix + + + + Edit Server + Edita el servidor + + + + Save + button + Desa + + + + + tty + tty + + + + Please enter a server name + Si us plau, escriviu un nom de servidor. + + + + Please enter an IP address + Si us plau, escriviu una adreça IP. + + + + Please enter a port + Si us plau, escriviu un port. + + + + Please enter a username + Si us plau, escriviu un nom d'usuari. + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + El nom del servidor ja existeix; + + + + please input another one. + si us plau, escriviu-ne un altre. + + + + Service + + + OK + button + D'acord + + + + Settings + + + Split screen + Divideix la pantalla + + + + Fullscreen + Pantalla completa + + + + Normal window + Finestra normal + + + + Maximum + Màxim + + + + ShortcutManager + + + + The shortcut %1 is invalid, + La drecera %1 no és vàlida; + + + + + + The shortcut %1 was already in use, + La drecera %1 ja s'usava; + + + + TabRenameWidget + + + Insert + Insereix + + + + + username: %u + nom d'usuari: %u + + + + username@: %U + nom d'usuari@: %U + + + + remote host: %h + amfitrió remot: %h + + + + + session number: %# + número de sessió: %# + + + + + title set by shell: %w + títol establert per l'intèrpret: %w + + + + program name: %n + nom del programa: %n + + + + current directory (short): %d + directori actual (breu): %d + + + + current directory (long): %D + directori actual (extens): %D + + + + local host: %h + amfitrió local: %h + + + + TermWidget + + + Copy + Copia + + + + Paste + Enganxa + + + + Open + Obre + + + + Open in file manager + Obre al gestor de fitxers + + + + + Horizontal split + Divisió horitzontal + + + + + Vertical split + Divisió vertical + + + + + New tab + Pestanya nova + + + + Exit fullscreen + Surt de la pantalla completa + + + + Fullscreen + Pantalla completa + + + + Find + Troba + + + + Search + Cerca + + + + Encoding + Codificació + + + + Custom commands + Ordres personalitzades + + + + Remote management + Gestió remota + + + + Upload file + Carrega un fitxer + + + + Download file + Baixa el fitxer + + + + Settings + Configuració + + + + Utils + + + + Cancel + button + Cancel·la + + + + Close + button + Tanca + + + + + OK + button + D'acord + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_cs.ts deepin-terminal-5.4.13/translations/deepin-terminal_cs.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_cs.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_cs.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Název: + + + + Command: + Příkaz: + + + + Shortcuts: + Klávesové zkratky: + + + + + + + Required + Vyžadováno + + + + Add Command + Přidat příkaz + + + + Edit Command + Upravit příkaz + + + + Delete Command + Smazat příkaz + + + + Cancel + button + Zrušit + + + + Add + button + Přidat + + + + Save + button + Uložit + + + + OK + button + OK + + + + Please enter a name + Zadejte název + + + + Please enter a command + Zadejte příkaz + + + + The name already exists, + Tento název už existuje, + + + + please input another one. + zadejte jiný. + + + + CustomCommandPanel + + + Add Command + Přidat příkaz + + + + CustomCommandPlugin + + + Custom commands + Uživatelsky určené příkazy + + + + CustomCommandSearchRstPanel + + + Search + Hledat + + + + CustomThemeSettingDialog + + + Custom Theme + Uživatelsky určený motiv vzhledu + + + + Style: + Styl: + + + + Light + Světlý + + + + Dark + Tmavý + + + + Fore color: + Barva popředí: + + + + Back color: + Barva pozadí: + + + + Prompt PS1: + Výzva PS1: + + + + Prompt PS2: + Výzva PS2: + + + + Cancel + button + Zrušit + + + + Confirm + button + Potvrdit + + + + ListView + + + Delete Server + Smazat záznam pro server + + + + + Are you sure you want to delete %1? + Opravdu chcete smazat %1? + + + + MainWindow + + + + New window + Nové okno + + + + Settings + Nastavení + + + + Cancel + button + Zrušit + + + + Close + button + Zavřít + + + + Type path to download file + Pro jeho stažení, napište popis umístění souboru + + + + Custom Theme + Uživatelsky určený motiv vzhledu + + + + QObject + + + Copy on select + Kopírovat při výběru + + + + Cursor blink + Blikání ukazatele + + + + Cursor style + Styl ukazatele + + + + Scroll on keystroke + Posunout stisku klávesy + + + + Scroll on output + Posunout při výstupu + + + + Hide Quake window after losing focus + Při ztrátě zaměření vysouvací okno skrýt + + + + + Blur background + Rozmazat pozadí + + + + Use on starting + Použít při spouštění + + + + Font + Písmo + + + + Font size + Velikost písma + + + + + Opacity + Neprůhlednost + + + + Advanced + Pokročilé + + + + Cursor + Ukazatel + + + + Scroll + Otáčet kolečkem myši + + + + Window + Okno + + + + Basic + Základní + + + + Interface + Rozhraní + + + + Shortcuts + Klávesové zkratky + + + + + Others + Ostatní + + + + + + Terminal + Terminál + + + + Workspace + Pracovní plocha + + + + + Custom commands + Uživatelsky určené příkazy + + + + + Display shortcuts + Zobrazit klávesové zkratky + + + + + Remote management + Správa na dálku + + + + + New tab + Nová karta + + + + + Next tab + Další karta + + + + + Previous tab + Předchozí karta + + + + + Select left workspace + Vybrat pracovní plochu vlevo + + + + + Select lower workspace + Vybrat pracovní plochu níže + + + + + Select right workspace + Vybrat pracovní plochu vpravo + + + + + Select upper workspace + Vybrat pracovní plochu výše + + + + Tab titles + Dlaždice karty + + + + + Go to tab 1 + Přejít na kartu 1 + + + + + Go to tab 2 + Přejít na kartu 2 + + + + + Go to tab 3 + Přejít na kartu 3 + + + + + Go to tab 4 + Přejít na kartu 4 + + + + + Go to tab 5 + Přejít na kartu 5 + + + + + Go to tab 6 + Přejít na kartu 6 + + + + + Go to tab 7 + Přejít na kartu 7 + + + + + Go to tab 8 + Přejít na kartu 8 + + + + + Go to tab 9 + Přejít na kartu 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Řízení toku vypnete pomocí Ctrl+S, Ctrl+Q + + + + Shell profile + Profil shellu + + + + + + + Rename title + Změnit titulek + + + + + Fullscreen + Celá obrazovka + + + + + Copy + Zkopírovat + + + + + Default size + Výchozí velikost + + + + + Paste + Vložit + + + + Search + Hledat + + + + + Select all + Vybrat vše + + + + Jump to next command + Skočit na další příkaz + + + + Jump to previous command + Skočit na předchozí příkaz + + + + + Zoom in + Přiblížit + + + + + Zoom out + Oddálit + + + + Close other windows + Zavřít další okna + + + + + + Close other workspaces + Zavřít ostatní pracovní plochy + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + „%1“ se nepodařilo najít. Náhradně se spouští „%2“. Zkontrolujte svůj profil pro shell. + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + „%1“ se nedaří najít, není možné ho spustit + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Výstup byl pozastaven stisknutím Ctrl+S. Pokud chcete pokračovat, stiskněte Ctrl+Q. + + + + Close window + Zavřít okno + + + + + + Close workspace + Zavřít pracovní plochu + + + + + Horizontal split + Vodorovné rozdělení + + + + + Vertical split + Svislé rozdělení + + + + + Find + Najít + + + + + + please set another one. + nastavte jiné. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminál je pokročilým emulátorem terminálu s pracovními plochami, vícero okny, správou na dálku, vysouvacím režimem (quake) a dalšími funkcemi. + + + + Tabs + Karty + + + + + Close tab + Zavřít kartu + + + + Select tab + Vybrat kartu + + + + Switch focus to "+" icon + Přepnout zaměření na ikonu „+“ (plus) + + + + + Select file to upload + Vyberte soubor k nahrání + + + + + Upload + Nahrát + + + + Programs are still running in terminal + V terminálu jsou ještě spuštěné programy + + + + + Close this terminal? + Zavřít tento terminál? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + V tomto terminálu je pořád ještě spuštěný proces. Zavření terminálu vynutí ukončení tohoto procesu. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + V tomto terminálu jsou pořád ještě spuštěné %1 procesy. Zavření terminálu vynutí jejich ukončení. + + + + + Close this window? + Zavřít toto okno? + + + + + There are still processes running in this window. Closing the window will kill all of them. + V tomto okně je pořád ještě spuštěný proces. Zavření okna vynutí ukončení tohoto procesu. + + + + + Select a directory to save the file + Vyberte složku pro uložení souboru + + + + Are you sure you want to uninstall it? + Opravdu ho chcete odinstalovat? + + + + + Are you sure you want to uninstall this application? + Opravdu chcete tuto aplikaci odinstalovat? + + + + + You will not be able to use Terminal any longer. + Nadále už nebudete moci Terminál používat. + + + + + + + Cancel + button + Zrušit + + + + + OK + button + OK + + + + Execute a command in the terminal + Vykonat příkaz v terminálu + + + + Run script string in the terminal + Spustit řetězec skriptu v terminálu + + + + Set the work directory + Nastavit pracovní složku + + + + Set the window mode on starting + Nastavit režim okna při spouštění + + + + Run in quake mode + Spustit ve vysouvacím (quake) režimu + + + + Keep terminal open when command finishes + Ponechat terminál otevřený i po skončení příkazu + + + + + The name should be no more than 32 characters + Jméno by nemělo být delší než 32 znaků + + + + + + Select + Vybrat + + + + Select the private key file + Vybrat soubor se soukromým klíčem + + + + + Tab title format + Formát nadpisu karty + + + + + Remote tab title format + Formát nadpisu vzdálené karty + + + + + Close other tabs + Zavřít ostatní karty + + + + Delete + button + Smazat + + + + + Confirm + button + Potvrdit + + + + RemoteManagementPanel + + + Add Server + Přidat server + + + + RemoteManagementPlugin + + + Remote management + Správa na dálku + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Než budete nahrávat na a stahovat ze serveru soubory pomocí klepnutí pravým tlačítkem myši, ověřte, že jsou na něm nainstalovány příkazy rz a sz. + + + + RemoteManagementSearchPanel + + + Search + Hledat + + + + ServerConfigOptDlg + + + Advanced options + Pokročilé volby + + + + Add Server + Přidat server + + + + Server name: + Název serveru: + + + + + + Required + Vyžadováno + + + + Address: + Adresa: + + + + Port: + Číslo portu: + + + + Username: + Uživatelské jméno: + + + + Password: + Heslo: + + + + Certificate: + Certifikát: + + + + Group: + Skupina: + + + + Path: + Umístění: + + + + Command: + Příkaz: + + + + Encoding: + Kódování: + + + + Backspace key: + Klávesa Backspace: + + + + Delete key: + Klávesa pro mazání: + + + + Delete server + Smazat server + + + + Cancel + button + Zrušit + + + + Add + button + Přidat + + + + Edit Server + Upravit server + + + + Save + button + Uložit + + + + + tty + tty + + + + Please enter a server name + Zadejte název serveru + + + + Please enter an IP address + Zadejte IP adresu serveru + + + + Please enter a port + Zadejte číslo portu + + + + Please enter a username + Zadejte uživatelské jméno + + + + + ascii-del + ascii-del + + + + + auto + automaticky + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Tento název serveru už tu existuje, + + + + please input another one. + zadejte jiný. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Rozdělit obrazovku + + + + Fullscreen + Celá obrazovka + + + + Normal window + Obyčejné okno + + + + Maximum + Maximalizováno + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Zkratka %1 není platná + + + + + + The shortcut %1 was already in use, + Zkratka %1 už byla používána, + + + + TabRenameWidget + + + Insert + Vložit + + + + + username: %u + uživatelské jméno: %u + + + + username@: %U + uživatelské jméno@: %U + + + + remote host: %h + vzdálený stroj: %h + + + + + session number: %# + číslo relace: %# + + + + + title set by shell: %w + nadpis nastavený shellem: %w + + + + program name: %n + název programu: %n + + + + current directory (short): %d + stávající složka (krátce): %d + + + + current directory (long): %D + stávající složka (dlouze): %d + + + + local host: %h + tento stroj: %h + + + + TermWidget + + + Copy + Zkopírovat + + + + Paste + Vložit + + + + Open + Otevřít + + + + Open in file manager + Otevřít ve správci souborů + + + + + Horizontal split + Vodorovné rozdělení + + + + + Vertical split + Svislé rozdělení + + + + + New tab + Nová karta + + + + Exit fullscreen + Opustit celou obrazovku + + + + Fullscreen + Celá obrazovka + + + + Find + Najít + + + + Search + Hledat + + + + Encoding + Kódování znaků + + + + Custom commands + Uživatelsky určené příkazy + + + + Remote management + Správa na dálku + + + + Upload file + Nahrát soubor + + + + Download file + Stáhnout soubor + + + + Settings + Nastavení + + + + Utils + + + + Cancel + button + Zrušit + + + + Close + button + Zavřít + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_de.ts deepin-terminal-5.4.13/translations/deepin-terminal_de.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_de.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_de.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1373 @@ + + + + + CustomCommandOptDlg + + + Name: + Name: + + + + Command: + Befehl: + + + + Shortcuts: + Tastenkürzel: + + + + + + + Required + Erforderlich + + + + Add Command + Befehl hinzufügen + + + + Edit Command + Befehl bearbeiten + + + + Delete Command + Befehl löschen + + + + Cancel + button + Abbrechen + + + + Add + button + Hinzufügen + + + + Save + button + Speichern + + + + OK + button + OK + + + Cancel + Abbrechen + + + Add + Hinzufügen + + + Save + Speichern + + + + Please enter a name + Bitte einen Namen eingeben + + + + Please enter a command + Bitte einen Befehl eingeben + + + + The name already exists, + Der Name existiert bereits, + + + + please input another one. + + + + OK + OK + + + + CustomCommandPanel + + + Add Command + Befehl hinzufügen + + + + CustomCommandPlugin + + + Custom commands + Benutzerdefinierte Befehle + + + + CustomCommandSearchRstPanel + + + Search + Suchen + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + Abbrechen + + + + Confirm + button + Bestätigen + + + Cancel + Abbrechen + + + Confirm + Bestätigen + + + + DSettingsDialog + + This shortcut conflicts with %1 + Dieses Tastenkürzel kollidiert mit %1 + + + + ListView + + + Delete Server + Server löschen + + + + + Are you sure you want to delete %1? + Sind Sie sicher, dass Sie %1 löschen möchten? + + + + MainWindow + + + + New window + Neues Fenster + + + + Settings + Einstellungen + + + + Cancel + button + Abbrechen + + + + Close + button + Schließen + + + Cancel + Abbrechen + + + Close + Schließen + + + + Custom Theme + + + + Select workspace + Arbeitsfläche auswählen + + + + Type path to download file + Geben Sie den Pfad zum Herunterladen der Datei ein + + + + QObject + + OK + OK + + + + Copy on select + Kopieren bei Auswahl + + + + Cursor blink + Cursorblinkgeschwindigkeit + + + + Cursor style + Mauszeiger-Stil + + + + Scroll on keystroke + Bildlauf bei Tastendruck + + + + Scroll on output + Bildlauf bei Ausgabe + + + + Hide Quake window after losing focus + Verstecke das Quake-Fenster, nachdem der Fokus verloren wurde + + + + + Blur background + Hintergrund weichzeichnen + + + + Use on starting + Beim Startvorgang verwenden + + + + Font + Schriftart + + + + Font size + Schriftgröße + + + + + Opacity + Deckkraft + + + + Advanced + Erweitert + + + + Cursor + Mauszeiger + + + + Scroll + Bildlauf + + + + Window + Fenster + + + + Basic + Basis + + + + Interface + Schnittstelle + + + + Shortcuts + Tastenkürzel + + + + + Others + Andere + + + + + + Terminal + Terminal + + + + Workspace + Arbeitsfläche + + + + + Custom commands + Benutzerdefinierte Befehle + + + + + Display shortcuts + Tastenkürzel anzeigen + + + + + Remote management + Fernverwaltung + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Titel umbenennen + + + + + Fullscreen + Vollbild + + + + + Copy + Kopieren + + + + + Default size + Standardgröße + + + + + Paste + Einfügen + + + + Search + Suchen + + + + + Select all + Alles auswählen + + + + Jump to next command + Zum nächsten Befehl springen + + + + Jump to previous command + Zum vorherigen Befehl springen + + + + + Zoom in + Hineinzoomen: + + + + + Zoom out + Hinauszoomen: + + + + Close other windows + Andere Fenster schließen + + + + + + Close other workspaces + Andere Arbeitsflächen schließen + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Fenster schließen + + + + + + Close workspace + Arbeitsfläche schließen + + + + + Horizontal split + Horizontal teilen + + + New workspace + Neue Arbeitsfläche + + + Next workspace + Nächste Arbeitsfläche + + + Previous workspace + Vorherige Arbeitsfläche + + + Select left window + Linkes Fenster auswählen + + + Select lower window + Unteres Fenster auswählen + + + Select right window + Rechtes Fenster auswählen + + + Select upper window + Oberes Fenster auswählen + + + + + Vertical split + Vertikal teilen + + + + + Find + Suchen + + + Cancel + Abbrechen + + + Delete + Löschen + + + + + + please set another one. + + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal ist ein fortschrittlicher Terminalemulator mit Arbeitsbereich, mehreren Fenstern, Fernverwaltung, Quake-Modus und anderen Funktionen. + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + Datei zum Hochladen auswählen + + + + + Upload + Hochladen + + + + Programs are still running in terminal + Es werden noch Programme im Terminal ausgeführt + + + Are you sure you want to exit? + Sie sind sicher, dass Sie beenden möchten? + + + Exit + Beenden + + + + + Close this terminal? + Dieses Terminal schließen? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + + + + + + Close this window? + Dieses Fenster schließen? + + + + + There are still processes running in this window. Closing the window will kill all of them. + + + + + + Select a directory to save the file + Ein Verzeichnis zum Speichern der Datei auswählen + + + + Are you sure you want to uninstall it? + Sind Sie sicher, dass Sie es deinstallieren möchten? + + + + + Are you sure you want to uninstall this application? + Sind Sie sicher, dass Sie diese Anwendung deinstallieren möchten? + + + + + You will not be able to use Terminal any longer. + Sie können das Terminal nicht länger verwenden. + + + Replace + Ersetzen + + + + Execute a command in the terminal + + + + + Run script string in the terminal + Skriptzeichenfolge im Terminal ausführen + + + + Set the work directory + Arbeitsverzeichnis festlegen + + + + + OK + button + OK + + + + Set the window mode on starting + Fenstermodus beim Start festlegen + + + + Run in quake mode + + + + + Keep terminal open when command finishes + Terminal offen lassen, wenn der Befehl abgeschlossen ist + + + + + The name should be no more than 32 characters + + + + + + + Select + Auswählen + + + + Select the private key file + Private Schlüsseldatei auswählen + + + Confirm + Bestätigen + + + Select workspace + Arbeitsfläche auswählen + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + Abbrechen + + + + Delete + button + Löschen + + + + + Confirm + button + Bestätigen + + + + RemoteManagementPanel + + + Add Server + Server hinzufügen + + + + RemoteManagementPlugin + + + Remote management + Fernverwaltung + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + + + + + RemoteManagementSearchPanel + + + Search + Suchen + + + + ServerConfigOptDlg + + + Advanced options + Erweiterte Optionen + + + + Add Server + Server hinzufügen + + + + Server name: + Servername: + + + + + + Required + Erforderlich + + + + Address: + Adresse: + + + + Port: + Port + + + + Username: + Benutzername: + + + + Password: + Passwort: + + + + Certificate: + Zertifikat: + + + + Group: + Gruppe: + + + + Path: + Pfad: + + + + Command: + Befehl: + + + + Encoding: + Kodierung: + + + + Backspace key: + Rücklauftaste: + + + + Delete key: + Taste löschen: + + + + Delete server + Server löschen + + + + Cancel + button + Abbrechen + + + + Add + button + Hinzufügen + + + Cancel + Abbrechen + + + Add + Hinzufügen + + + + Edit Server + Server bearbeiten + + + + Save + button + Speichern + + + + + tty + + + + + Please enter a server name + Bitte einen Servername eingeben + + + + Please enter an IP address + Bitte eine IP-Adresse eingeben + + + + Please enter a port + Bitte einen Port eingeben + + + + Please enter a username + Bitte einen Benutzernamen eingeben + + + Save + Speichern + + + + + ascii-del + + + + + + auto + + + + + + control-h + + + + + + escape-sequence + + + + + The server name already exists, + Der Servername existiert bereits, + + + + please input another one. + + + + + Service + + OK + OK + + + + OK + button + OK + + + + Settings + + + Split screen + Geteilter Bildschirm + + + + Fullscreen + Vollbild + + + + Normal window + Normales Fenster + + + + Maximum + Maximum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Das Kürzel %1 ist ungültig, + + + + + + The shortcut %1 was already in use, + Das Tastenkürzel %1 ist bereits in Verwendung, + + + + TabBar + + Close workspace + Arbeitsfläche schließen + + + Close other workspaces + Andere Arbeitsflächen schließen + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Rename title + Titel umbenennen + + + Cancel + Abbrechen + + + Confirm + Bestätigen + + + + TermWidget + + Rename title + Titel umbenennen + + + + Copy + Kopieren + + + + Paste + Einfügen + + + + Open + Öffnen + + + + Open in file manager + Im Dateimanager öffnen + + + + + Horizontal split + Horizontal teilen + + + + + Vertical split + Vertikal teilen + + + Close window + Fenster schließen + + + Close other windows + Andere Fenster schließen + + + New workspace + Neue Arbeitsfläche + + + + + New tab + + + + + Exit fullscreen + Vollbild beenden + + + + Fullscreen + Vollbild + + + + Find + Suchen + + + + Search + Suchen + + + + Encoding + Kodierung + + + + Custom commands + Benutzerdefinierte Befehle + + + + Remote management + Fernverwaltung + + + + Upload file + Datei hochladen + + + + Download file + Datei herunterladen + + + + Settings + Einstellungen + + + + Utils + + Cancel + Abbrechen + + + Close + Schließen + + + OK + OK + + + + + Cancel + button + Abbrechen + + + + Close + button + Schließen + + + + + OK + button + OK + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_el.ts deepin-terminal-5.4.13/translations/deepin-terminal_el.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_el.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_el.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1366 @@ + + + + + CustomCommandOptDlg + + + Name: + Όνομα: + + + + Command: + Εντολή: + + + + Shortcuts: + Συντομεύσεις: + + + + + + + Required + Απαιτείται + + + + Add Command + Προσθήκη Εντολής + + + + Edit Command + Επεξεργασία Εντολής + + + + Delete Command + Διαγραφή Εντολής + + + + Cancel + button + Ακύρωση + + + + Add + button + Προσθήκη + + + + Save + button + Αποθήκευση + + + + OK + button + OK + + + Cancel + Ακύρωση + + + Add + Προσθήκη + + + Save + Αποθήκευση + + + + Please enter a name + + + + + Please enter a command + + + + + The name already exists, + Το όνομα υπάρχει ήδη, + + + + please input another one. + παρακαλώ εισάγετε άλλο κείμενο. + + + OK + OK + + + + CustomCommandPanel + + + Add Command + Προσθήκη Εντολής + + + + CustomCommandPlugin + + + Custom commands + Προσαρμοσμένες εντολές + + + + CustomCommandSearchRstPanel + + + Search + Αναζήτηση + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + Ακύρωση + + + + Confirm + button + Επιβεβαίωση + + + Cancel + Ακύρωση + + + Confirm + Επιβεβαίωση + + + + ListView + + + Delete Server + Διαγραφή διακομιστή + + + + + Are you sure you want to delete %1? + Είστε βέβαιος ότι θέλετε να διαγράψετε %1; + + + + MainWindow + + + + New window + Νέο παράθυρο + + + + Settings + Ρυθμίσεις + + + + Cancel + button + Ακύρωση + + + + Close + button + Κλείσιμο + + + Cancel + Ακύρωση + + + Close + Κλείσιμο + + + + Custom Theme + + + + Select workspace + Επιλογή χώρου εργασίας + + + + Type path to download file + Πληκτρολογήστε διαδρομή για το αρχείο λήψης + + + + QObject + + OK + OK + + + + Copy on select + Αντιγραφή κατά την επιλογή: + + + + Cursor blink + Αναβόσβημα δρομέα + + + + Cursor style + Στυλ δρομέα + + + + Scroll on keystroke + Κύλιση με πληκτρολόγηση + + + + Scroll on output + Κύλιση στην εκροή + + + + Hide Quake window after losing focus + Απόκρυψη παραθύρου "Quake" μετά από την απώλεια εστίασης + + + + + Blur background + Θωλό παρασκήνιο + + + + Use on starting + Χρήση κατά την εκκίνηση + + + + Font + Γραμματοσειρά + + + + Font size + Μέγεθος γραμματοσειράς + + + + + Opacity + Αδιαφάνεια + + + + Advanced + Προηγμένες + + + + Cursor + Δρομέας + + + + Scroll + Κύλιση + + + + Window + Παράθυρο + + + + Basic + Βασικές + + + + Interface + Διεπαφή + + + + Shortcuts + Συντομεύσεις + + + + + Others + Άλλα + + + + + + Terminal + Τερματικό + + + + Workspace + Χώρος εργασίας + + + + + Custom commands + Προσαρμοσμένες εντολές + + + + + Display shortcuts + Προβολή συντομεύσεων + + + + + Remote management + Απομακρυσμένη διαχείριση + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Μετονομασία τίτλου + + + + + Fullscreen + Πλήρης οθόνη + + + + + Copy + Αντιγραφή + + + + + Default size + Προεπιλεγμένο μέγεθος + + + + + Paste + Επικόλληση + + + + Search + Αναζήτηση + + + + + Select all + Επιλογή όλων + + + + Jump to next command + Μετάβαση στην επόμενη εντολή + + + + Jump to previous command + Μετάβαση στην προηγούμενη εντολή + + + + + Zoom in + Μεγέθυνση + + + + + Zoom out + Σμίκρυνση + + + + Close other windows + Κλείσιμο άλλων παραθύρων + + + + + + Close other workspaces + Κλείσιμο άλλων χώρων εργασίας + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Κλείσιμο παράθυρου + + + + + + Close workspace + Κλείσιμο χώρου εργασίας + + + + + Horizontal split + Οριζόντια διαίρεση + + + New workspace + Νέος χώρος εργασίας + + + Next workspace + Επόμενος χώρος εργασίας + + + Previous workspace + Προηγούμενος χώρος εργασίας + + + Select left window + Επιλογή αριστερού παράθυρου + + + Select lower window + Επιλογή κατώτερου παράθυρου + + + Select right window + Επιλογή δεξιού παράθυρου + + + Select upper window + Επιλογή ανώτερου παράθυρου + + + + + Vertical split + Κάθετη διαίρεση + + + + + Find + Εύρεση + + + Cancel + Ακύρωση + + + Delete + Διαγραφή + + + + + + please set another one. + + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + Επιλογή αρχείου προς μεταφόρτωση + + + + + Upload + Μεταφόρτωση + + + + Programs are still running in terminal + Εξακολουθούν να τρέχουν προγράμματα στο τερματικό + + + Are you sure you want to exit? + Σίγουρα θέλετε να πραγματοποιήσετε έξοδο; + + + Exit + Έξοδος + + + + + Close this terminal? + + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + + + + + + Close this window? + Κλείσιμο τρέχοντος παραθύρου; + + + + + There are still processes running in this window. Closing the window will kill all of them. + + + + + + Select a directory to save the file + Επιλέξτε φάκελο για αποθήκευση του αρχείου + + + + Are you sure you want to uninstall it? + Είστε σίγουροι ότι θέλετε να το απεγκαταστήσετε; + + + + + Are you sure you want to uninstall this application? + Είστε σίγουροι ότι θέλετε να απεγκαταστήσετε αυτή την εφαρμογή; + + + + + You will not be able to use Terminal any longer. + + + + Replace + Αντικατάσταση + + + + Execute a command in the terminal + Τρέξτε μια εντολή στο τερματικό + + + + Run script string in the terminal + + + + + Set the work directory + + + + + + OK + button + OK + + + + Set the window mode on starting + + + + + Run in quake mode + + + + + Keep terminal open when command finishes + + + + + + The name should be no more than 32 characters + To όνομα δεν πρέπει να είναι περισσότερο από 32 χαρακτήρες + + + + + + Select + Επιλογή + + + + Select the private key file + Επιλογή αρχείου ιδιωτικού κλειδιού + + + Confirm + Επιβεβαίωση + + + Select workspace + Επιλογή χώρου εργασίας + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + Ακύρωση + + + + Delete + button + Διαγραφή + + + + + Confirm + button + Επιβεβαίωση + + + + RemoteManagementPanel + + + Add Server + Προσθήκη Διακομιστή + + + + RemoteManagementPlugin + + + Remote management + Απομακρυσμένη διαχείριση + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + + + + + RemoteManagementSearchPanel + + + Search + Αναζήτηση + + + + ServerConfigOptDlg + + + Advanced options + Προηγμένες επιλογές + + + + Add Server + Προσθήκη Διακομιστή + + + + Server name: + Όνομα διακομιστή: + + + + + + Required + Απαιτείται + + + + Address: + Διεύθυνση: + + + + Port: + Θύρα: + + + + Username: + Όνομα χρήστη: + + + + Password: + Κωδικός πρόσβασης: + + + + Certificate: + Πιστοποιητικό: + + + + Group: + Ομάδα: + + + + Path: + Διαδρομή: + + + + Command: + Εντολή: + + + + Encoding: + Κωδικοποίηση: + + + + Backspace key: + Πλήκτρο Backspace: + + + + Delete key: + Πλήκτρο Delete: + + + + Delete server + Διαγραφή διακομιστή + + + + Cancel + button + Ακύρωση + + + + Add + button + Προσθήκη + + + Cancel + Ακύρωση + + + Add + Προσθήκη + + + + Edit Server + Επεξεργασία Διακομιστή + + + + Save + button + Αποθήκευση + + + + + tty + + + + + Please enter a server name + Παρακαλούμε εισάγετε όνομα διακομιστή + + + + Please enter an IP address + Παρακαλώ εισάγετε IP διεύθυνση + + + + Please enter a port + Παρακαλούμε εισάγετε θύρα + + + + Please enter a username + Παρακαλούμε εισάγετε όνομα χρήστη + + + Save + Αποθήκευση + + + + + ascii-del + + + + + + auto + + + + + + control-h + + + + + + escape-sequence + + + + + The server name already exists, + Το όνομα του διακομιστή υπάρχει ήδη, + + + + please input another one. + παρακαλώ εισάγετε άλλο. + + + + Service + + OK + OK + + + + OK + button + OK + + + + Settings + + + Split screen + + + + + Fullscreen + Πλήρης οθόνη + + + + Normal window + Κανονικό παράθυρο + + + + Maximum + + + + + ShortcutManager + + + + The shortcut %1 is invalid, + + + + + + + The shortcut %1 was already in use, + + + + + TabBar + + Close workspace + Κλείσιμο χώρου εργασίας + + + Close other workspaces + Κλείσιμο άλλων χώρων εργασίας + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Rename title + Μετονομασία τίτλου + + + Cancel + Ακύρωση + + + Confirm + Επιβεβαίωση + + + + TermWidget + + Rename title + Μετονομασία τίτλου + + + + Copy + Αντιγραφή + + + + Paste + Επικόλληση + + + + Open + Άνοιγμα + + + + Open in file manager + Άνοιγμα στη διαχείριση αρχείων + + + + + Horizontal split + Οριζόντια διαίρεση + + + + + Vertical split + Κάθετη διαίρεση + + + Close window + Κλείσιμο παράθυρου + + + Close other windows + Κλείσιμο άλλων παραθύρων + + + New workspace + Νέος χώρος εργασίας + + + + + New tab + + + + + Exit fullscreen + Έξοδος από πλήρη οθόνη + + + + Fullscreen + Πλήρης οθόνη + + + + Find + Εύρεση + + + + Search + Αναζήτηση + + + + Encoding + Κωδικοποίηση + + + + Custom commands + Προσαρμοσμένες εντολές + + + + Remote management + Απομακρυσμένη διαχείριση + + + + Upload file + Μεταφόρτωση αρχείου + + + + Download file + Λήψη αρχείου + + + + Settings + Ρυθμίσεις + + + + Utils + + Cancel + Ακύρωση + + + Close + Κλείσιμο + + + OK + OK + + + + + Cancel + button + Ακύρωση + + + + Close + button + Κλείσιμο + + + + + OK + button + OK + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_en.ts deepin-terminal-5.4.13/translations/deepin-terminal_en.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_en.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_en.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Name: + + + + Command: + Command: + + + + Shortcuts: + Shortcuts: + + + + + + + Required + Required + + + + Add Command + Add Command + + + + Edit Command + Edit Command + + + + Delete Command + Delete Command + + + + Cancel + button + Cancel + + + + Add + button + Add + + + + Save + button + Save + + + + OK + button + OK + + + + Please enter a name + Please enter a name + + + + Please enter a command + Please enter a command + + + + The name already exists, + The name already exists, + + + + please input another one. + please input another one. + + + + CustomCommandPanel + + + Add Command + Add Command + + + + CustomCommandPlugin + + + Custom commands + Custom commands + + + + CustomCommandSearchRstPanel + + + Search + Search + + + + CustomThemeSettingDialog + + + Custom Theme + Custom Theme + + + + Style: + Style: + + + + Light + Light + + + + Dark + Dark + + + + Fore color: + Fore color: + + + + Back color: + Back color: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Cancel + + + + Confirm + button + Confirm + + + + ListView + + + Delete Server + Delete Server + + + + + Are you sure you want to delete %1? + Are you sure you want to delete %1? + + + + MainWindow + + + + New window + New window + + + + Settings + Settings + + + + Cancel + button + Cancel + + + + Close + button + Close + + + + Type path to download file + Type path to download file + + + + Custom Theme + Custom Theme + + + + QObject + + + Copy on select + Copy on select + + + + Cursor blink + Cursor blink + + + + Cursor style + Cursor style + + + + Scroll on keystroke + Scroll on keystroke + + + + Scroll on output + Scroll on output + + + + Hide Quake window after losing focus + Hide Quake window after losing focus + + + + + Blur background + Blur background + + + + Use on starting + Use on starting + + + + Font + Font + + + + Font size + Font size + + + + + Opacity + Opacity + + + + Advanced + Advanced + + + + Cursor + Cursor + + + + Scroll + Scroll + + + + Window + Window + + + + Basic + Basic + + + + Interface + Interface + + + + Shortcuts + Shortcuts + + + + + Others + Others + + + + + + Terminal + Terminal + + + + Workspace + Workspace + + + + + Custom commands + Custom commands + + + + + Display shortcuts + Display shortcuts + + + + + Remote management + Remote management + + + + + New tab + New tab + + + + + Next tab + Next tab + + + + + Previous tab + Previous tab + + + + + Select left workspace + Select left workspace + + + + + Select lower workspace + Select lower workspace + + + + + Select right workspace + Select right workspace + + + + + Select upper workspace + Select upper workspace + + + + Tab titles + Tab titles + + + + + Go to tab 1 + Go to tab 1 + + + + + Go to tab 2 + Go to tab 2 + + + + + Go to tab 3 + Go to tab 3 + + + + + Go to tab 4 + Go to tab 4 + + + + + Go to tab 5 + Go to tab 5 + + + + + Go to tab 6 + Go to tab 6 + + + + + Go to tab 7 + Go to tab 7 + + + + + Go to tab 8 + Go to tab 8 + + + + + Go to tab 9 + Go to tab 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Disable flow control using Ctrl+S, Ctrl+Q + + + + Shell profile + Shell profile + + + + + + + Rename title + Rename title + + + + + Fullscreen + Fullscreen + + + + + Copy + Copy + + + + + Default size + Default size + + + + + Paste + Paste + + + + Search + Search + + + + + Select all + Select all + + + + Jump to next command + Jump to next command + + + + Jump to previous command + Jump to previous command + + + + + Zoom in + Zoom in + + + + + Zoom out + Zoom out + + + + Close other windows + Close other windows + + + + + + Close other workspaces + Close other workspaces + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + Could not open "%1", unable to run it + Could not open "%1", unable to run it + + + + Could not find "%1", unable to run it + Could not find "%1", unable to run it + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + Close window + Close window + + + + + + Close workspace + Close workspace + + + + + Horizontal split + Horizontal split + + + + + Vertical split + Vertical split + + + + + Find + Find + + + + + + please set another one. + please set another one. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + + + + Tabs + Tabs + + + + + Close tab + Close tab + + + + Select tab + Select tab + + + + Switch focus to "+" icon + Switch focus to "+" icon + + + + + Select file to upload + Select file to upload + + + + + Upload + Upload + + + + Programs are still running in terminal + Programs are still running in terminal + + + + + Close this terminal? + Close this terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + There is still a process running in this terminal. Closing the terminal will kill it. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + + + + + Close this window? + Close this window? + + + + + There are still processes running in this window. Closing the window will kill all of them. + There are still processes running in this window. Closing the window will kill all of them. + + + + + Select a directory to save the file + Select a directory to save the file + + + + Are you sure you want to uninstall it? + Are you sure you want to uninstall it? + + + + + Are you sure you want to uninstall this application? + Are you sure you want to uninstall this application? + + + + + You will not be able to use Terminal any longer. + You will not be able to use Terminal any longer. + + + + + + + Cancel + button + Cancel + + + + + OK + button + OK + + + + Execute a command in the terminal + Execute a command in the terminal + + + + Run script string in the terminal + Run script string in the terminal + + + + Set the work directory + Set the work directory + + + + Set the window mode on starting + Set the window mode on starting + + + + Run in quake mode + Run in quake mode + + + + Keep terminal open when command finishes + Keep terminal open when command finishes + + + + + The name should be no more than 32 characters + The name should be no more than 32 characters + + + + + + Select + Select + + + + Select the private key file + Select the private key file + + + + + Tab title format + Tab title format + + + + + Remote tab title format + Remote tab title format + + + + + Close other tabs + Close other tabs + + + + Delete + button + Delete + + + + + Confirm + button + Confirm + + + + RemoteManagementPanel + + + Add Server + Add Server + + + + RemoteManagementPlugin + + + Remote management + Remote management + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + + + + RemoteManagementSearchPanel + + + Search + Search + + + + ServerConfigOptDlg + + + Advanced options + Advanced options + + + + Add Server + Add Server + + + + Server name: + Server name: + + + + + + Required + Required + + + + Address: + Address: + + + + Port: + Port: + + + + Username: + Username: + + + + Password: + Password: + + + + Certificate: + Certificate: + + + + Group: + Group: + + + + Path: + Path: + + + + Command: + Command: + + + + Encoding: + Encoding: + + + + Backspace key: + Backspace key: + + + + Delete key: + Delete key: + + + + Delete server + Delete server + + + + Cancel + button + Cancel + + + + Add + button + Add + + + + Edit Server + Edit Server + + + + Save + button + Save + + + + + tty + tty + + + + Please enter a server name + Please enter a server name + + + + Please enter an IP address + Please enter an IP address + + + + Please enter a port + Please enter a port + + + + Please enter a username + Please enter a username + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + The server name already exists, + + + + please input another one. + please input another one. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Split screen + + + + Fullscreen + Fullscreen + + + + Normal window + Normal window + + + + Maximum + Maximum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + The shortcut %1 is invalid, + + + + + + The shortcut %1 was already in use, + The shortcut %1 was already in use, + + + + TabRenameWidget + + + Insert + Insert + + + + + username: %u + username: %u + + + + username@: %U + username@: %U + + + + remote host: %h + remote host: %h + + + + + session number: %# + session number: %# + + + + + title set by shell: %w + title set by shell: %w + + + + program name: %n + program name: %n + + + + current directory (short): %d + current directory (short): %d + + + + current directory (long): %D + current directory (long): %D + + + + local host: %h + local host: %h + + + + TermWidget + + + Copy + Copy + + + + Paste + Paste + + + + Open + Open + + + + Open in file manager + Open in file manager + + + + + Horizontal split + Horizontal split + + + + + Vertical split + Vertical split + + + + + New tab + New tab + + + + Exit fullscreen + Exit fullscreen + + + + Fullscreen + Fullscreen + + + + Find + Find + + + + Search + Search + + + + Encoding + Encoding + + + + Custom commands + Custom commands + + + + Remote management + Remote management + + + + Upload file + Upload file + + + + Download file + Download file + + + + Settings + Settings + + + + Utils + + + + Cancel + button + Cancel + + + + Close + button + Close + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_es.ts deepin-terminal-5.4.13/translations/deepin-terminal_es.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_es.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_es.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nombre: + + + + Command: + Comando: + + + + Shortcuts: + Atajo: + + + + + + + Required + Requerido + + + + Add Command + Añadir comando + + + + Edit Command + Editar comando + + + + Delete Command + Borrar comando + + + + Cancel + button + Cancelar + + + + Add + button + Añadir + + + + Save + button + Guardar + + + + OK + button + Aceptar + + + + Please enter a name + Por favor introduzca un nombre + + + + Please enter a command + Por favor introduzca un comando + + + + The name already exists, + El nombre ya existe, + + + + please input another one. + por favor ingrese otro. + + + + CustomCommandPanel + + + Add Command + Añadir comando + + + + CustomCommandPlugin + + + Custom commands + Comandos personalizados + + + + CustomCommandSearchRstPanel + + + Search + Buscar + + + + CustomThemeSettingDialog + + + Custom Theme + Tema personalizado + + + + Style: + Estilo: + + + + Light + Claro + + + + Dark + Oscuro + + + + Fore color: + Color principal: + + + + Back color: + Color de fondo: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Cancelar + + + + Confirm + button + Confirmar + + + + ListView + + + Delete Server + Borrar servidor + + + + + Are you sure you want to delete %1? + ¿Está seguro que quiere borrar %1? + + + + MainWindow + + + + New window + Nueva ventana + + + + Settings + Ajustes + + + + Cancel + button + Cancelar + + + + Close + button + Cerrar + + + + Type path to download file + Escriba la ruta para descargar el archivo + + + + Custom Theme + Tema personalizado + + + + QObject + + + Copy on select + Copiar al seleccionar + + + + Cursor blink + Cursor con parpadeo + + + + Cursor style + Estilo de cursor + + + + Scroll on keystroke + Desplazamiento de tecla + + + + Scroll on output + Desplazamiento en la impresión + + + + Hide Quake window after losing focus + Ocultar el modo Quake al cambiar de ventana + + + + + Blur background + Desenfoque del fondo + + + + Use on starting + Iniciar con + + + + Font + Fuente + + + + Font size + Tamaño de fuente + + + + + Opacity + Opacidad + + + + Advanced + Avanzado + + + + Cursor + Cursor + + + + Scroll + Desplazar + + + + Window + Ventana + + + + Basic + Básico + + + + Interface + Interfaz + + + + Shortcuts + Atajos + + + + + Others + Otros + + + + + + Terminal + Terminal + + + + Workspace + Espacio de trabajo + + + + + Custom commands + Comandos personalizados + + + + + Display shortcuts + Mostrar atajos + + + + + Remote management + Conexiones remotas + + + + + New tab + Nueva pestaña + + + + + Next tab + Pestaña siguiente + + + + + Previous tab + Pestaña anterior + + + + + Select left workspace + Seleccionar espacio de trabajo de la izquierda + + + + + Select lower workspace + Seleccionar espacio de trabajo de abajo + + + + + Select right workspace + Seleccionar espacio de trabajo de la derecha + + + + + Select upper workspace + Seleccionar espacio de trabajo de arriba + + + + Tab titles + Títulos de pestañas + + + + + Go to tab 1 + Ir a pestaña 1 + + + + + Go to tab 2 + Ir a pestaña 2 + + + + + Go to tab 3 + Ir a pestaña 3 + + + + + Go to tab 4 + Ir a pestaña 4 + + + + + Go to tab 5 + Ir a pestaña 5 + + + + + Go to tab 6 + Ir a pestaña 6 + + + + + Go to tab 7 + Ir a pestaña 7 + + + + + Go to tab 8 + Ir a pestaña 8 + + + + + Go to tab 9 + Ir a pestaña 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Desactivar el control de flujo usando Ctrl + S, Ctrl + Q + + + + Shell profile + Perfil de shell + + + + + + + Rename title + Renombrar título + + + + + Fullscreen + Pantalla completa + + + + + Copy + Copiar + + + + + Default size + Tamaño por defecto + + + + + Paste + Pegar + + + + Search + Buscar + + + + + Select all + Seleccionar todo + + + + Jump to next command + Saltar al siguiente comando + + + + Jump to previous command + Saltar al comando anterior + + + + + Zoom in + Acercar + + + + + Zoom out + Alejar + + + + Close other windows + Cerrar otras ventanas + + + + + + Close other workspaces + Cerrar los otros espacios de trabajo + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + No se encontró "%1", iniciando "%2" en su lugar. Por favor, verifique su perfil de shell. + + + + Could not open "%1", unable to run it + No se pudo abrir "% 1", no se pudo ejecutar + + + + Could not find "%1", unable to run it + No se encontró "%1", no se puede ejecutar + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + La salida se ha suspendido presionando Ctrl + S. Presione Ctrl + Q para reanudar. + + + + Close window + Cerrar ventana + + + + + + Close workspace + Cerrar espacio de trabajo + + + + + Horizontal split + División horizontal + + + + + Vertical split + División vertical + + + + + Find + Buscar + + + + + + please set another one. + por favor establezca otro. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal de Deepin es un emulador de terminal avanzado con espacios de trabajo, división de ventana, administración de conexiones remotas, modo Quake y otras características. + + + + Tabs + Pestañas + + + + + Close tab + Cerrar pestaña + + + + Select tab + Seleccionar pestaña + + + + Switch focus to "+" icon + Cambiar el enfoque al icono "+" + + + + + Select file to upload + Seleccionar archivo para subir + + + + + Upload + Subir + + + + Programs are still running in terminal + Aún hay programas ejecutándose en la terminal + + + + + Close this terminal? + ¿Cerrar esta terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Aún hay un proceso ejecutándose en esta terminal. Cerrar la terminal lo matará. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Aún hay %1 procesos ejecutándose en esta terminal. Cerrar la terminal los matará. + + + + + Close this window? + ¿Cerrar esta ventana? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Aún hay procesos ejecutándose en esta ventana. Cerrar la ventana los matará a todos. + + + + + Select a directory to save the file + Seleccione una carpeta para guardar el archivo + + + + Are you sure you want to uninstall it? + ¿Está seguro que quiere desinstalarlo? + + + + + Are you sure you want to uninstall this application? + ¿Está seguro que quiere desinstalar esta aplicación? + + + + + You will not be able to use Terminal any longer. + Ya no podrá usar Terminal. + + + + + + + Cancel + button + Cancelar + + + + + OK + button + Aceptar + + + + Execute a command in the terminal + Ejecutar un comando en la terminal + + + + Run script string in the terminal + Ejecutar secuencia de comandos en la terminal + + + + Set the work directory + Establecer carpeta de trabajo + + + + Set the window mode on starting + Establecer el modo de ventana al iniciar + + + + Run in quake mode + Ejecutar en modo Quake + + + + Keep terminal open when command finishes + Mantener la terminal abierta cuando finalice el comando + + + + + The name should be no more than 32 characters + El nombre no debe tener más de 32 caracteres. + + + + + + Select + Seleccionar + + + + Select the private key file + Seleccione el archivo de clave privada + + + + + Tab title format + Formato de título de pestaña + + + + + Remote tab title format + Formato de título de pestaña remota + + + + + Close other tabs + Cerrar las otras pestañas + + + + Delete + button + Borrar + + + + + Confirm + button + Confirmar + + + + RemoteManagementPanel + + + Add Server + Añadir servidor + + + + RemoteManagementPlugin + + + Remote management + Conexiones remotas + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Verifique que los comandos rz y sz estén instalados en el servidor antes de hacer clic derecho para cargar y descargar archivos. + + + + RemoteManagementSearchPanel + + + Search + Buscar + + + + ServerConfigOptDlg + + + Advanced options + Opciones avanzadas + + + + Add Server + Añadir servidor + + + + Server name: + Nombre del servidor: + + + + + + Required + Requerido + + + + Address: + Dirección: + + + + Port: + Puerto: + + + + Username: + Nombre de usuario: + + + + Password: + Contraseña: + + + + Certificate: + Certificado: + + + + Group: + Grupo: + + + + Path: + Carpeta de inicio: + + + + Command: + Comando: + + + + Encoding: + Codificación: + + + + Backspace key: + Tecla de retroceso: + + + + Delete key: + Tecla suprimir: + + + + Delete server + Borrar servidor + + + + Cancel + button + Cancelar + + + + Add + button + Añadir + + + + Edit Server + Editar servidor + + + + Save + button + Guardar + + + + + tty + tty + + + + Please enter a server name + Por favor ingrese un nombre de servidor + + + + Please enter an IP address + Por favor ingrese una dirección IP + + + + Please enter a port + Por favor ingrese un puerto + + + + Please enter a username + Por favor ingrese un nombre de usuario + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + secuencia-escape + + + + The server name already exists, + El nombre del servidor ya existe, + + + + please input another one. + por favor ingrese otro. + + + + Service + + + OK + button + Aceptar + + + + Settings + + + Split screen + Dividir ventana + + + + Fullscreen + Pantalla completa + + + + Normal window + Ventana normal + + + + Maximum + Ventana maximizada + + + + ShortcutManager + + + + The shortcut %1 is invalid, + El atajo %1 no es válido, + + + + + + The shortcut %1 was already in use, + El atajo %1 ya está en uso, + + + + TabRenameWidget + + + Insert + Insertar + + + + + username: %u + nombre de usuario: %u + + + + username@: %U + nombre de usuario@: %U + + + + remote host: %h + host remoto: %h + + + + + session number: %# + numero de sesión: %# + + + + + title set by shell: %w + título establecido por shell: %w + + + + program name: %n + nombre de programa: %n + + + + current directory (short): %d + carpeta actual (corto): %d + + + + current directory (long): %D + carpeta actual (largo): %D + + + + local host: %h + host local: %h + + + + TermWidget + + + Copy + Copiar + + + + Paste + Pegar + + + + Open + Abrir + + + + Open in file manager + Abrir en administrador de archivo + + + + + Horizontal split + División horizontal + + + + + Vertical split + División vertical + + + + + New tab + Nueva pestaña + + + + Exit fullscreen + Salir de pantalla completa + + + + Fullscreen + Pantalla completa + + + + Find + Buscar + + + + Search + Buscar en Internet + + + + Encoding + Codificación + + + + Custom commands + Comandos personalizados + + + + Remote management + Conexiones remotas + + + + Upload file + Subir archivo + + + + Download file + Descargar archivo + + + + Settings + Ajustes + + + + Utils + + + + Cancel + button + Cancelar + + + + Close + button + Cerrar + + + + + OK + button + Aceptar + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_fi.ts deepin-terminal-5.4.13/translations/deepin-terminal_fi.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_fi.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_fi.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nimi: + + + + Command: + Komento: + + + + Shortcuts: + Pikanäppäimet: + + + + + + + Required + Vaadittu + + + + Add Command + Lisää komento + + + + Edit Command + Muokkaa komentoa + + + + Delete Command + Poista komento + + + + Cancel + button + Peruuta + + + + Add + button + Lisää + + + + Save + button + Tallenna + + + + OK + button + OK + + + + Please enter a name + Kirjoita nimi + + + + Please enter a command + Kirjoita komento + + + + The name already exists, + Nimi on jo olemassa. + + + + please input another one. + kirjoita toinen. + + + + CustomCommandPanel + + + Add Command + Lisää komento + + + + CustomCommandPlugin + + + Custom commands + Mukautetut komennot + + + + CustomCommandSearchRstPanel + + + Search + Etsi + + + + CustomThemeSettingDialog + + + Custom Theme + Mukautettu teema + + + + Style: + Tyyli: + + + + Light + Vaalea + + + + Dark + Tumma + + + + Fore color: + Etuosan väri: + + + + Back color: + Taustan väri: + + + + Prompt PS1: + Kehote PS1: + + + + Prompt PS2: + Kehote PS2: + + + + Cancel + button + Peruuta + + + + Confirm + button + Vahvista + + + + ListView + + + Delete Server + Poista palvelin + + + + + Are you sure you want to delete %1? + Haluatko varmasti poistaa %1? + + + + MainWindow + + + + New window + Uusi ikkuna + + + + Settings + Asetukset + + + + Cancel + button + Peruuta + + + + Close + button + Sulje + + + + Type path to download file + Kirjoita ladattavan tiedoston polku + + + + Custom Theme + Mukautettu teema + + + + QObject + + + Copy on select + Kopioi valittu + + + + Cursor blink + Kursorin vilkkuminen + + + + Cursor style + Kursorin tyyli + + + + Scroll on keystroke + Selaa näppäimillä + + + + Scroll on output + Selaa ulostuloa + + + + Hide Quake window after losing focus + Piilota quake-ikkuna kadotetun tarkennuksen jälkeen + + + + + Blur background + Sumea tausta + + + + Use on starting + Käyttö käynnistettäessä + + + + Font + Kirjasin + + + + Font size + Kirjasimen koko + + + + + Opacity + Läpinäkyvyys + + + + Advanced + Lisäasetukset + + + + Cursor + Kursori + + + + Scroll + Vieritä + + + + Window + Ikkuna + + + + Basic + Perusasetukset + + + + Interface + Liitäntä + + + + Shortcuts + Pikanäppäimet + + + + + Others + Muut + + + + + + Terminal + Pääte + + + + Workspace + Välilehti + + + + + Custom commands + Mukautetut komennot + + + + + Display shortcuts + Näytä pikanäppäimet + + + + + Remote management + Etähallinta + + + + + New tab + Uusi välilehti + + + + + Next tab + Seuraava välilehti + + + + + Previous tab + Edellinen välilehti + + + + + Select left workspace + Valitse vasen työtila + + + + + Select lower workspace + Valitse alempi työtila + + + + + Select right workspace + Valitse oikea työtila + + + + + Select upper workspace + Valitse ylempi työtila + + + + Tab titles + Välilehden otsikot + + + + + Go to tab 1 + Välilehteen 1 + + + + + Go to tab 2 + Välilehteen 2 + + + + + Go to tab 3 + Välilehteen 3 + + + + + Go to tab 4 + Välilehteen 4 + + + + + Go to tab 5 + Välilehteen 5 + + + + + Go to tab 6 + Välilehteen 6 + + + + + Go to tab 7 + Välilehteen 7 + + + + + Go to tab 8 + Välilehteen 8 + + + + + Go to tab 9 + Välilehteen 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Poista vuonohjaus käytöstä Ctrl+S, Ctrl+Q + + + + Shell profile + Liittymän profiili + + + + + + + Rename title + Nimeä välilehti + + + + + Fullscreen + Koko näyttö + + + + + Copy + Kopioi + + + + + Default size + Oletuskoko + + + + + Paste + Liitä + + + + Search + Etsi + + + + + Select all + Valitse kaikki + + + + Jump to next command + Siirry seuraavaan komentoon + + + + Jump to previous command + Siirry edelliseen komentoon + + + + + Zoom in + Lähennä + + + + + Zoom out + Loitonna + + + + Close other windows + Sulje paneelit + + + + + + Close other workspaces + Sulje muut työtilat + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Ei lötynyt "%1", alkaa sen sijaan "%2". Tarkista liittymäsi profiili. + + + + Could not open "%1", unable to run it + Tiedostoa "%1" ei voitu avata, eikä suorittaa + + + + Could not find "%1", unable to run it + Ei löytynyt "%1", suoritus epäonnistui + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Tulostus on keskeytetty yhdistelmällä Ctrl+S. Jatka painamalla Ctrl+Q. + + + + Close window + Sulje paneeli + + + + + + Close workspace + Sulje välilehti + + + + + Horizontal split + Vaakasuora jako + + + + + Vertical split + Pystysuora jako + + + + + Find + Etsi + + + + + + please set another one. + aseta toinen. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Pääte on edistynyt terminal-emulaattori, joka sisältää välilehdet, useita ikkunoita, etähallinan, Quake-tilan ja muita ominaisuuksia. + + + + Tabs + Välilehdet + + + + + Close tab + Sulje välilehti + + + + Select tab + Valitse välilehti + + + + Switch focus to "+" icon + Vaihda kohdistus "+" kuvakkeeseen + + + + + Select file to upload + Valitse lähetettävä tiedosto + + + + + Upload + Lähetä + + + + Programs are still running in terminal + Ohjelmia on silti käynnissä päätteessä + + + + + Close this terminal? + Sulje tämä pääte? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Tässä päätteessä on vielä prosessi käynnissä. Sulkeminen lopettaa sen. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Tässä päätteessä on vielä %1 prosessia käynnissä. Sulkeminen lopettaa ne. + + + + + Close this window? + Sulje tämä ikkuna? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Tässä ikkunassa on edelleen käynnissä prosesseja. Ikkunan sulkeminen tappaa ne kaikki. + + + + + Select a directory to save the file + Valitse kansio, johon tiedosto tallennetaan + + + + Are you sure you want to uninstall it? + Haluatko varmasti poistaa sen asennuksen? + + + + + Are you sure you want to uninstall this application? + Haluatko varmasti poistaa tämän sovelluksen asennuksen? + + + + + You will not be able to use Terminal any longer. + Et voi enää jatkaa päätteen käyttöä. + + + + + + + Cancel + button + Peruuta + + + + + OK + button + OK + + + + Execute a command in the terminal + Suorita komento päätteessä + + + + Run script string in the terminal + Suorita komentosarja päätteessä + + + + Set the work directory + Aseta työhakemisto + + + + Set the window mode on starting + Ikkunatila käynnistyessä + + + + Run in quake mode + Suorita quake-tilassa + + + + Keep terminal open when command finishes + Pidä pääte auki, kun komento on valmis + + + + + The name should be no more than 32 characters + Nimessä saa olla enintään 32 merkkiä + + + + + + Select + Valitse + + + + Select the private key file + Valitse yksityinen avaintiedosto + + + + + Tab title format + Välilehden otsikon muoto + + + + + Remote tab title format + Etävälilehden otsikon muoto + + + + + Close other tabs + Sulje muut välilehdet + + + + Delete + button + Poista + + + + + Confirm + button + Vahvista + + + + RemoteManagementPanel + + + Add Server + Lisää palvelin + + + + RemoteManagementPlugin + + + Remote management + Etähallinta + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Varmista, että rz- ja sz-komennot on asennettu palvelimelle, ennen kuin napsautat hiiren oikealla painikkeella tiedostojen lähettämistä ja lataamista. + + + + RemoteManagementSearchPanel + + + Search + Etsi + + + + ServerConfigOptDlg + + + Advanced options + Lisäasetukset + + + + Add Server + Lisää palvelin + + + + Server name: + Palvelimen nimi: + + + + + + Required + Vaadittu + + + + Address: + Osoite: + + + + Port: + Portti: + + + + Username: + Käyttäjänimi: + + + + Password: + Salasana: + + + + Certificate: + Sertifikaatti: + + + + Group: + Ryhmä: + + + + Path: + Polku: + + + + Command: + Komento: + + + + Encoding: + Koodaus: + + + + Backspace key: + Askelpalautin: + + + + Delete key: + Delete-näppäin: + + + + Delete server + Poista palvelin + + + + Cancel + button + Peruuta + + + + Add + button + Lisää + + + + Edit Server + Muokkaa palvelinta + + + + Save + button + Tallenna + + + + + tty + tty + + + + Please enter a server name + Kirjoita palvelimen nimi + + + + Please enter an IP address + Kirjoita IP-osoite + + + + Please enter a port + Anna portti + + + + Please enter a username + Kirjoita käyttäjänimi + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Palvelimen nimi on jo olemassa, + + + + please input another one. + kirjoita toinen. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Jaettu näyttö + + + + Fullscreen + Koko näyttö + + + + Normal window + Normaali ikkuna + + + + Maximum + Kokoruutu + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Pikakuvake %1 ei kelpaa, + + + + + + The shortcut %1 was already in use, + Pikakuvake %1 on jo käytössä, + + + + TabRenameWidget + + + Insert + Lisää + + + + + username: %u + käyttäjänimi: %u + + + + username@: %U + käyttäjänimi@: %U + + + + remote host: %h + etäpalvelin: %h + + + + + session number: %# + istunnon numero: %# + + + + + title set by shell: %w + shell asettanut otsikon: %w + + + + program name: %n + ohjelman nimi: %n + + + + current directory (short): %d + nykyinen hakemisto (lyhyt): %d + + + + current directory (long): %D + nykyinen hakemisto (pitkä): %D + + + + local host: %h + paikallinen palvelin: %h + + + + TermWidget + + + Copy + Kopioi + + + + Paste + Liitä + + + + Open + Avaa + + + + Open in file manager + Avaa tiedostonhallinnassa + + + + + Horizontal split + Vaakasuora jako + + + + + Vertical split + Pystysuora jako + + + + + New tab + Uusi välilehti + + + + Exit fullscreen + Poistu koko näytöstä + + + + Fullscreen + Koko näyttö + + + + Find + Etsi + + + + Search + Etsi + + + + Encoding + Koodaus + + + + Custom commands + Mukautetut komennot + + + + Remote management + Etähallinta + + + + Upload file + Lähetä tiedosto + + + + Download file + Lataa tiedosto + + + + Settings + Asetukset + + + + Utils + + + + Cancel + button + Peruuta + + + + Close + button + Sulje + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_fr.ts deepin-terminal-5.4.13/translations/deepin-terminal_fr.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_fr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_fr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nom : + + + + Command: + Commande : + + + + Shortcuts: + Raccourcis : + + + + + + + Required + Requis + + + + Add Command + Insérer une commande + + + + Edit Command + Éditer la commande + + + + Delete Command + Supprimer la commande + + + + Cancel + button + Annuler + + + + Add + button + Ajouter + + + + Save + button + Sauvegarder + + + + OK + button + OK + + + + Please enter a name + Veuillez saisir un nom + + + + Please enter a command + Veuillez saisir une commande + + + + The name already exists, + Le nom existe déjà, + + + + please input another one. + veuillez en saisir un autre. + + + + CustomCommandPanel + + + Add Command + Insérer une commande + + + + CustomCommandPlugin + + + Custom commands + Commandes personnalisées + + + + CustomCommandSearchRstPanel + + + Search + Rechercher + + + + CustomThemeSettingDialog + + + Custom Theme + Thème personnalisé + + + + Style: + Style : + + + + Light + Clair + + + + Dark + Sombre + + + + Fore color: + Couleur de premier plan : + + + + Back color: + Couleur de fond : + + + + Prompt PS1: + Invite PS1 : + + + + Prompt PS2: + Invite PS2 : + + + + Cancel + button + Annuler + + + + Confirm + button + Confirmer + + + + ListView + + + Delete Server + Supprimer le serveur + + + + + Are you sure you want to delete %1? + Voulez-vous vraiment supprimer %1 ? + + + + MainWindow + + + + New window + Nouvelle fenêtre + + + + Settings + Paramètres + + + + Cancel + button + Annuler + + + + Close + button + Fermer + + + + Type path to download file + Taper le chemin pour télécharger le fichier + + + + Custom Theme + Thème personnalisé + + + + QObject + + + Copy on select + Copier la sélection + + + + Cursor blink + Clignotement du curseur + + + + Cursor style + Style de curseur + + + + Scroll on keystroke + Défilement sur pression d'une touche + + + + Scroll on output + Faire défiler les résultats + + + + Hide Quake window after losing focus + Cacher la fenêtre Quake après avoir perdu le focus + + + + + Blur background + Flou Arrière-plan + + + + Use on starting + Utiliser au démarrage + + + + Font + Police + + + + Font size + Taille de police + + + + + Opacity + Opacité + + + + Advanced + Avancé + + + + Cursor + Curseur + + + + Scroll + Défiler + + + + Window + Fenêtre + + + + Basic + Simple + + + + Interface + Interface + + + + Shortcuts + Raccourcis + + + + + Others + Autres + + + + + + Terminal + Terminal + + + + Workspace + Espace de travail + + + + + Custom commands + Commandes personnalisées + + + + + Display shortcuts + Afficher les raccourcis + + + + + Remote management + Contrôle à distance + + + + + New tab + Nouvel onglet + + + + + Next tab + Onglet suivant + + + + + Previous tab + Onglet précédent + + + + + Select left workspace + Sélectionner l'espace de travail de gauche + + + + + Select lower workspace + Sélectionner l'espace de travail inférieur + + + + + Select right workspace + Sélectionner l'espace de travail de droite + + + + + Select upper workspace + Sélectionner l'espace de travail supérieur + + + + Tab titles + Titres des onglets + + + + + Go to tab 1 + Aller à l'onglet 1 + + + + + Go to tab 2 + Aller à l'onglet 2 + + + + + Go to tab 3 + Aller à l'onglet 3 + + + + + Go to tab 4 + Aller à l'onglet 4 + + + + + Go to tab 5 + Aller à l'onglet 5 + + + + + Go to tab 6 + Aller à l'onglet 6 + + + + + Go to tab 7 + Aller à l'onglet 7 + + + + + Go to tab 8 + Aller à l'onglet 8 + + + + + Go to tab 9 + Aller à l'onglet 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Désactiver le contrôle de flux à l'aide de Ctrl+S, Ctrl+Q + + + + Shell profile + Profil Shell + + + + + + + Rename title + Renommer le titre + + + + + Fullscreen + Plein écran + + + + + Copy + Copier + + + + + Default size + Taille par défaut + + + + + Paste + Coller + + + + Search + Rechercher + + + + + Select all + Tout sélectionner + + + + Jump to next command + Commande suivante + + + + Jump to previous command + Commande précédente + + + + + Zoom in + Zoom avant + + + + + Zoom out + Zoom arrière + + + + Close other windows + Fermer les autres fenêtres + + + + + + Close other workspaces + Fermer les autres espaces de travail + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Impossible de trouver "%1", démarrage de "%2" à la place. Veuillez vérifier votre profil shell. + + + + Could not open "%1", unable to run it + L'ouverture de "%1" a échouée, impossible de l'exécuter + + + + Could not find "%1", unable to run it + Impossible de trouver "%1", impossible de l'exécuter + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + La sortie a été suspendue en appuyant sur Ctrl+S. Appuyez sur Ctrl+Q pour reprendre. + + + + Close window + Fermer la fenêtre + + + + + + Close workspace + Fermer l'espace de travail + + + + + Horizontal split + Diviser horizontalement + + + + + Vertical split + Diviser verticalement + + + + + Find + Rechercher + + + + + + please set another one. + veuillez en définir un autre. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal est un émulateur de terminal avancé avec espace de travail, fenêtres multiples, gestion à distance, un mode "Quake" et d'autres fonctionnalités. + + + + Tabs + Onglets + + + + + Close tab + Fermer l'onglet + + + + Select tab + Sélectionner l'onglet + + + + Switch focus to "+" icon + Basculez le focus avec l'icône "+" + + + + + Select file to upload + Sélectionner le fichier à transférer + + + + + Upload + Transférer + + + + Programs are still running in terminal + Des programmes sont toujours en cours d'exécution dans le terminal + + + + + Close this terminal? + Fermer ce terminal ? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Un processus est toujours en cours d'exécution dans ce terminal. La fermeture du terminal le tuera. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Il reste %1 processus en cours d'exécution dans ce terminal. La fermeture du terminal les tuera tous. + + + + + Close this window? + Fermer cette fenêtre ? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Il y a encore des processus en cours d'exécution dans cette fenêtre. Fermer la fenêtre les tuera tous. + + + + + Select a directory to save the file + Sélectionnez un répertoire pour enregistrer le fichier + + + + Are you sure you want to uninstall it? + Êtes-vous sûr de vouloir le désinstaller ? + + + + + Are you sure you want to uninstall this application? + Êtes-vous sûr de vouloir désinstaller cette application ? + + + + + You will not be able to use Terminal any longer. + Vous ne pourrez plus utiliser le Terminal. + + + + + + + Cancel + button + Annuler + + + + + OK + button + OK + + + + Execute a command in the terminal + Exécuter une commande dans le terminal + + + + Run script string in the terminal + Exécuter la chaîne de script dans le terminal + + + + Set the work directory + Définir le répertoire de travail + + + + Set the window mode on starting + Définir le mode de fenêtre au démarrage + + + + Run in quake mode + Exécuter en mode tremblement + + + + Keep terminal open when command finishes + Garder le terminal ouvert lorsque la commande se termine + + + + + The name should be no more than 32 characters + Le nom ne doit pas dépasser 32 caractères + + + + + + Select + Sélectionner + + + + Select the private key file + Sélectionner le fichier de clé privée + + + + + Tab title format + Format du titre de l'onglet + + + + + Remote tab title format + Format du titre de l'onglet distant + + + + + Close other tabs + Fermer les autres onglets + + + + Delete + button + Supprimer + + + + + Confirm + button + Confirmer + + + + RemoteManagementPanel + + + Add Server + Ajouter un serveur + + + + RemoteManagementPlugin + + + Remote management + Contrôle à distance + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Assurez-vous que les commandes rz et sz ont été installées sur le serveur avant de cliquer avec le bouton droit pour envoyer et télécharger des fichiers. + + + + RemoteManagementSearchPanel + + + Search + Rechercher + + + + ServerConfigOptDlg + + + Advanced options + Options avancées + + + + Add Server + Ajouter un serveur + + + + Server name: + Nom du serveur : + + + + + + Required + Requis + + + + Address: + Adresse : + + + + Port: + Port : + + + + Username: + Nom d'utilisateur : + + + + Password: + Mot de passe : + + + + Certificate: + Certificat : + + + + Group: + Groupe : + + + + Path: + Chemin : + + + + Command: + Commande : + + + + Encoding: + Encodage : + + + + Backspace key: + Touche retour arrière : + + + + Delete key: + Supprimer la clé : + + + + Delete server + Supprimer le serveur + + + + Cancel + button + Annuler + + + + Add + button + Ajouter + + + + Edit Server + Éditer le serveur + + + + Save + button + Sauvegarder + + + + + tty + tty + + + + Please enter a server name + Veuillez saisir un nom de serveur + + + + Please enter an IP address + Veuillez saisir une adresse IP + + + + Please enter a port + Veuillez entrer un port + + + + Please enter a username + Merci d'entrer un nom d'utilisateur + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + séquence d'échappement + + + + The server name already exists, + Le nom du serveur existe déjà, + + + + please input another one. + veuillez en saisir un autre. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Écran divisé + + + + Fullscreen + Plein écran + + + + Normal window + Fenêtre normale + + + + Maximum + Maximum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Le raccourci %1 n'est pas valide, + + + + + + The shortcut %1 was already in use, + Le raccourci %1 était déjà utilisé, + + + + TabRenameWidget + + + Insert + Insérer + + + + + username: %u + nom d'utilisateur : %u + + + + username@: %U + nom d'utilisateur@ : %U + + + + remote host: %h + hôte distant : %h + + + + + session number: %# + numéro de session : %# + + + + + title set by shell: %w + titre défini par le shell : %w + + + + program name: %n + nom du programme : %n + + + + current directory (short): %d + répertoire actuel (court) : %d + + + + current directory (long): %D + répertoire actuel (long) : %D + + + + local host: %h + hôte local : %h + + + + TermWidget + + + Copy + Copier + + + + Paste + Coller + + + + Open + Ouvrir + + + + Open in file manager + Ouvrir dans le gestionnaire de fichier + + + + + Horizontal split + Diviser horizontalement + + + + + Vertical split + Diviser verticalement + + + + + New tab + Nouvel onglet + + + + Exit fullscreen + Quitter le plein écran + + + + Fullscreen + Plein écran + + + + Find + Trouver + + + + Search + Rechercher + + + + Encoding + Encodage + + + + Custom commands + Commandes personnalisées + + + + Remote management + Contrôle à distance + + + + Upload file + Transférer un fichier + + + + Download file + Télécharger un fichier + + + + Settings + Paramètres + + + + Utils + + + + Cancel + button + Annuler + + + + Close + button + Fermer + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_gl_ES.ts deepin-terminal-5.4.13/translations/deepin-terminal_gl_ES.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_gl_ES.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_gl_ES.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1310 @@ + + + + + CustomCommandOptDlg + + + Name: + Nome: + + + + Command: + Comando: + + + + Shortcuts: + Atallos: + + + + + + + Required + Requirido + + + + Add Command + Engadir Comando + + + + Edit Command + Editar Comando + + + + Delete Command + Eliminar comando + + + + Cancel + button + Cancelar + + + + Add + button + Engadir + + + + Save + button + Gardar + + + + OK + button + Aceptar + + + Cancel + Cancelar + + + Add + Engadir + + + Save + Gardar + + + + Please enter a name + Insira un nome + + + + Please enter a command + Insira un comando + + + + The name already exists, + O nome xa existe, + + + + please input another one. + por favor, poña outro. + + + OK + Aceptar + + + + CustomCommandPanel + + + Add Command + Engadir Comando + + + + CustomCommandPlugin + + + Custom commands + Comandos personalizados + + + + CustomCommandSearchRstPanel + + + Search + Buscar + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + Cancelar + + + + Confirm + button + Confirmar + + + Cancel + Cancelar + + + Confirm + Confirmar + + + + DSettingsDialog + + This shortcut conflicts with %1 + Este atallo entra en conflito con %1 + + + + ListView + + + Delete Server + Eliminar servidor + + + + + Are you sure you want to delete %1? + Estás seguro de que queres eliminar %1? + + + + MainWindow + + + + New window + Nova xanela + + + + Settings + Axustes + + + + Cancel + button + Cancelar + + + + Close + button + Pechar + + + Cancel + Cancelar + + + Close + Pechar + + + + Type path to download file + Tipo de ruta para descargar o ficheiro + + + + Custom Theme + + + + + QObject + + OK + Aceptar + + + + Copy on select + Copiar ao seleccionar + + + + Cursor blink + Intermitencia do cursor + + + + Cursor style + Estilo do cursor + + + + Scroll on keystroke + Desprazar cunha pulsación de tecla + + + + Scroll on output + Desprazar a saída + + + + Hide Quake window after losing focus + Agochar a xanela Quake despois de perder o foco + + + + + Blur background + Fondo desenfocado + + + + Use on starting + Usar ao principio + + + + Font + Fonte + + + + Font size + Tamaño da fonte + + + + + Opacity + Opacidade + + + + Advanced + Avanzado + + + + Cursor + Cursor + + + + Scroll + Desprazar + + + + Window + Xanela + + + + Basic + Básico + + + + Interface + Interface + + + + Shortcuts + Atallos + + + + + Others + Outros + + + + + + Terminal + Terminal + + + + Workspace + Área de traballo + + + + + Custom commands + Comandos personalizados + + + + + Display shortcuts + Amosar atallos + + + + + Remote management + Xestión remota + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Renomear título + + + + + Fullscreen + Pantalla completa + + + + + Copy + Copiar + + + + + Default size + Tamaño predefinido + + + + + Paste + Pegar + + + + Search + Buscar + + + + + Select all + Seleccionar todo + + + + Jump to next command + Ir ao comando seguinte + + + + Jump to previous command + Ir ao comando anterior + + + + + Zoom in + Achegar + + + + + Zoom out + Afastar + + + + Close other windows + Pechar outras xanelas + + + + + + Close other workspaces + Pechar outros espazos de traballo + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Pechar a xanela + + + + + + Close workspace + Pechar o espazo de traballo + + + + + Horizontal split + División horizontal + + + + + Vertical split + División vertical + + + + + Find + Atopar + + + Cancel + Cancelar + + + Delete + Eliminar + + + + + + please set another one. + por favor, estableza outro + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + O terminal é un emulador de termos avanzado con espazo de traballo, múltiples xanelas, xestión remota, modo de terremoto e outras funcións. + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + Seleccionar ficheiro a subir + + + + + Upload + Subir + + + + Programs are still running in terminal + Aínda hai programas en execución no terminal + + + Are you sure you want to exit? + Tes a certeza de querer saír? + + + Exit + Saír + + + + + Close this terminal? + Pechar este terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Aínda hai un proceso en execución neste terminal. O peche do terminal matalo. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Aínda hai procesos %1 executados neste terminal. O peche do terminal matará a todos eles. + + + + + Close this window? + Pechar esta xanela? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Aínda hai procesos en execución nesta xanela. O peche da xanela matará a todos. + + + + + Select a directory to save the file + Seleccione un directorio para gardar o ficheiro + + + + Are you sure you want to uninstall it? + Estás seguro de que queres desinstalalo? + + + + + Are you sure you want to uninstall this application? + Estás seguro de que queres desinstalar este aplicativo? + + + + + You will not be able to use Terminal any longer. + Xa non poderás usar Terminal. + + + Click on Add to make this shortcut effective immediately + Prema en Engadir para facer efectivo este atallo inmediatamente + + + Replace + Substituír + + + + Execute a command in the terminal + Executa un comando no terminal + + + + Run script string in the terminal + Executa a cadea de guión no terminal + + + + Set the work directory + Estableza o directorio de traballo + + + + + OK + button + Aceptar + + + + Set the window mode on starting + Estableza o modo da xanela ao comezo + + + + Run in quake mode + Executa en modo terremoto + + + + Keep terminal open when command finishes + Manteña o terminal aberto cando termine o comando + + + + + The name should be no more than 32 characters + O nome non debe ser superior a 32 caracteres + + + + + + Select + Seleccionar + + + + Select the private key file + Seleccionar o ficheiro de clave privada + + + Confirm + Confirmar + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + Cancelar + + + + Delete + button + Eliminar + + + + + Confirm + button + Confirmar + + + + RemoteManagementPanel + + + Add Server + Engadir Servidor + + + + RemoteManagementPlugin + + + Remote management + Xestión remota + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Asegúrese de que se instalaron as ordes rz e sz no servidor antes de facer clic dereito para cargar e descargar ficheiros. + + + + RemoteManagementSearchPanel + + + Search + Buscar + + + + ServerConfigOptDlg + + + Advanced options + Opcións avanzadas + + + + Add Server + Engadir Servidor + + + + Server name: + Nome de servidor: + + + + + + Required + Requirido + + + + Address: + Enderezo: + + + + Port: + Porto: + + + + Username: + Nome de usuario: + + + + Password: + Contrasinal: + + + + Certificate: + Certificado: + + + + Group: + Grupo: + + + + Path: + Ruta: + + + + Command: + Comando: + + + + Encoding: + Codificación: + + + + Backspace key: + Tecla retroceso: + + + + Delete key: + Eliminar chave: + + + + Delete server + Eliminar servidor + + + + Cancel + button + Cancelar + + + + Add + button + Engadir + + + Cancel + Cancelar + + + Add + Engadir + + + + Edit Server + Editar Servidor + + + + Save + button + Gardar + + + + + tty + tty + + + + Please enter a server name + Insira o nome do servidor + + + + Please enter an IP address + Insira un enderezo IP + + + + Please enter a port + Insira un porto + + + + Please enter a username + Insira un nome de usuario + + + Save + Gardar + + + + + ascii-del + ascii-del + + + + + auto + automático + + + + + control-h + control-h + + + + + escape-sequence + secuencia de escape + + + + The server name already exists, + O nome do servidor xa existe, + + + + please input another one. + por favor, poña outro. + + + + Service + + OK + Aceptar + + + + OK + button + Aceptar + + + + Settings + + + Split screen + Dividir a pantalla + + + + Fullscreen + Pantalla completa + + + + Normal window + Xanela normal + + + + Maximum + Máximo + + + + ShortcutManager + + + + The shortcut %1 is invalid, + O atallo %1 é inválido, + + + + + + The shortcut %1 was already in use, + O atallo %1 estivo xa en uso, + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Cancel + Cancelar + + + Confirm + Confirmar + + + + TermWidget + + + Copy + Copiar + + + + Paste + Pegar + + + + Open + Abrir + + + + Open in file manager + Abrir no xestor de ficheiros + + + + + Horizontal split + División horizontal + + + + + Vertical split + División vertical + + + + + New tab + + + + + Exit fullscreen + Saír da pantalla completa + + + + Fullscreen + Pantalla completa + + + + Find + Atopar + + + + Search + Buscar + + + + Encoding + Codificación + + + + Custom commands + Comandos personalizados + + + + Remote management + Xestión remota + + + + Upload file + Subir ficheiro + + + + Download file + Descargar ficheiro + + + + Settings + Axustes + + + + Utils + + Cancel + Cancelar + + + Close + Pechar + + + OK + Aceptar + + + + + Cancel + button + Cancelar + + + + Close + button + Pechar + + + + + OK + button + Aceptar + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_hr.ts deepin-terminal-5.4.13/translations/deepin-terminal_hr.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_hr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_hr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Ime: + + + + Command: + Naredba: + + + + Shortcuts: + Prečaci: + + + + + + + Required + Potrebno + + + + Add Command + Dodaj naredbu + + + + Edit Command + Uredi naredbu + + + + Delete Command + Obriši naredbu + + + + Cancel + button + Otkaži + + + + Add + button + Dodaj + + + + Save + button + Spremi + + + + OK + button + U redu + + + + Please enter a name + Molim unesite ime + + + + Please enter a command + Molim unesite naredbu + + + + The name already exists, + Ime već postoji, + + + + please input another one. + molim unesite neko drugo. + + + + CustomCommandPanel + + + Add Command + Dodaj naredbu + + + + CustomCommandPlugin + + + Custom commands + Prilagođene naredbe + + + + CustomCommandSearchRstPanel + + + Search + Traži + + + + CustomThemeSettingDialog + + + Custom Theme + Prilagođena tema + + + + Style: + Stil: + + + + Light + Svijetlo + + + + Dark + Tamno + + + + Fore color: + Prednja boja: + + + + Back color: + Stražnja boja: + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + Otkaži + + + + Confirm + button + Potvrdi + + + + ListView + + + Delete Server + Obriši poslužitelj + + + + + Are you sure you want to delete %1? + Jeste li sigurni da želite obrisati %1? + + + + MainWindow + + + + New window + Novi prozor + + + + Settings + Postavke + + + + Cancel + button + Otkaži + + + + Close + button + Zatvori + + + + Type path to download file + Ukucajte putanju za preuzimanje datoteke + + + + Custom Theme + Prilagođena tema + + + + QObject + + + Copy on select + Kopiraj pri odabiru + + + + Cursor blink + Treptanje pokazivača + + + + Cursor style + Stil pokazivača + + + + Scroll on keystroke + + + + + Scroll on output + + + + + Hide Quake window after losing focus + + + + + + Blur background + Zamuti pozadinu + + + + Use on starting + + + + + Font + Font + + + + Font size + Veličina fonta + + + + + Opacity + Neprozirnost + + + + Advanced + Napredno + + + + Cursor + Pokazivač + + + + Scroll + Kliži + + + + Window + Prozor + + + + Basic + Osnovno + + + + Interface + Sučelje + + + + Shortcuts + Prečaci + + + + + Others + Ostalo + + + + + + Terminal + Terminal + + + + Workspace + Radni prostor + + + + + Custom commands + Prilagođene naredbe + + + + + Display shortcuts + Prikaži prečace + + + + + Remote management + Udaljeno upravljanje + + + + + New tab + Nova kartica + + + + + Next tab + Slijedeća kartica + + + + + Previous tab + Prethodna kartica + + + + + Select left workspace + Odaberi lijevi radni prostor + + + + + Select lower workspace + Odaberi donji radni prostor + + + + + Select right workspace + Odaberi desni radni prostor + + + + + Select upper workspace + Odaberi gornji radni prostor + + + + Tab titles + Naslovi kartice + + + + + Go to tab 1 + Idi na karticu 1 + + + + + Go to tab 2 + Idi na karticu 2 + + + + + Go to tab 3 + Idi na karticu 3 + + + + + Go to tab 4 + Idi na karticu 4 + + + + + Go to tab 5 + Idi na karticu 5 + + + + + Go to tab 6 + Idi na karticu 6 + + + + + Go to tab 7 + Idi na karticu 7 + + + + + Go to tab 8 + Idi na karticu 8 + + + + + Go to tab 9 + Idi na karticu 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Preimenuj naslov + + + + + Fullscreen + Cijeli zaslon + + + + + Copy + Kopiraj + + + + + Default size + Zadana veličina + + + + + Paste + Zalijepi + + + + Search + Traži + + + + + Select all + Odaberi sve + + + + Jump to next command + Skoči na slijedeću naredbu + + + + Jump to previous command + Skoči na prethodnu naredbu + + + + + Zoom in + Povećaj + + + + + Zoom out + Smanji + + + + Close other windows + Zatvori ostale prozore + + + + + + Close other workspaces + Zatvore ostale radne prostore + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Zatvori prozor + + + + + + Close workspace + Zatvori radni prostor + + + + + Horizontal split + Vodoravna podjela + + + + + Vertical split + Okomita podjela + + + + + Find + Traži + + + + + + please set another one. + + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + + + + + Tabs + KArtice + + + + + Close tab + Zatvori karticu + + + + Select tab + Odaberi karticu + + + + Switch focus to "+" icon + + + + + + Select file to upload + Odaberite datoteku za slanje + + + + + Upload + Slanje + + + + Programs are still running in terminal + Programi još rade u terminalu + + + + + Close this terminal? + Zatvoriti ovaj terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + + + + + + Close this window? + Zatvoriti ovaj prozor? + + + + + There are still processes running in this window. Closing the window will kill all of them. + + + + + + Select a directory to save the file + Odaberite direktorij za spremanje datoteke + + + + Are you sure you want to uninstall it? + Jeste li sigurni da želite deinstalirati? + + + + + Are you sure you want to uninstall this application? + Jeste li sigurni da želite deinstalirati ovu aplikaciju? + + + + + You will not be able to use Terminal any longer. + Ne možete više koristiti Terminal. + + + + + + + Cancel + button + Otkaži + + + + + OK + button + U redu + + + + Execute a command in the terminal + Izvrši naredbu u terminalu + + + + Run script string in the terminal + + + + + Set the work directory + Postavi radni direktorij + + + + Set the window mode on starting + + + + + Run in quake mode + + + + + Keep terminal open when command finishes + + + + + + The name should be no more than 32 characters + + + + + + + Select + Odaberi + + + + Select the private key file + + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + Delete + button + Obriši + + + + + Confirm + button + Potvrdi + + + + RemoteManagementPanel + + + Add Server + Dodaj poslužitelj + + + + RemoteManagementPlugin + + + Remote management + Udaljeno upravljanje + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + + + + + RemoteManagementSearchPanel + + + Search + Traži + + + + ServerConfigOptDlg + + + Advanced options + Napredne opcije + + + + Add Server + Dodaj poslužitelj + + + + Server name: + Ime poslužitelja: + + + + + + Required + Potrebno + + + + Address: + Adresa: + + + + Port: + Port: + + + + Username: + Korisničko ime: + + + + Password: + Lozinka: + + + + Certificate: + Certifikat: + + + + Group: + Grupa: + + + + Path: + Putanja: + + + + Command: + Naredba: + + + + Encoding: + Kodiranje: + + + + Backspace key: + Backspace tipka: + + + + Delete key: + Obriši tipku: + + + + Delete server + Obriši poslužitelj + + + + Cancel + button + Otkaži + + + + Add + button + Dodaj + + + + Edit Server + Uredi poslužitelj + + + + Save + button + Spremi + + + + + tty + tty + + + + Please enter a server name + Molim unesite ime poslužitelja + + + + Please enter an IP address + Molim unesite IP adresu + + + + Please enter a port + Molim unesite port + + + + Please enter a username + Molim unesite korisničko ime + + + + + ascii-del + ascii-del + + + + + auto + + + + + + control-h + control-h + + + + + escape-sequence + + + + + The server name already exists, + Ime poslužitelja već postoji. + + + + please input another one. + molim unesite neko drugo. + + + + Service + + + OK + button + U redu + + + + Settings + + + Split screen + Razdjeli zaslon + + + + Fullscreen + Cijeli zaslon + + + + Normal window + Normalni prozor + + + + Maximum + Maksimum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Prečac %1 je neispravan, + + + + + + The shortcut %1 was already in use, + Prečac %1 je već u uporabi, + + + + TabRenameWidget + + + Insert + Umetni + + + + + username: %u + korisničko ime: %u + + + + username@: %U + korisničko ime: %U + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermWidget + + + Copy + Kopiraj + + + + Paste + Zalijepi + + + + Open + Otvori + + + + Open in file manager + Otvori u upravitelju datotekama + + + + + Horizontal split + Vodoravna podjela + + + + + Vertical split + Okomita podjela + + + + + New tab + Nova kartica + + + + Exit fullscreen + Izađi iz cijelog zaslona + + + + Fullscreen + Cijeli zaslon + + + + Find + Traži + + + + Search + Traži + + + + Encoding + Enkodiranje + + + + Custom commands + Prilagođene naredbe + + + + Remote management + Udaljeno upravljanje + + + + Upload file + Slanje datoteke + + + + Download file + Preuzmi datoteku + + + + Settings + Postavke + + + + Utils + + + + Cancel + button + Otkaži + + + + Close + button + Zatvori + + + + + OK + button + U redu + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_hu.ts deepin-terminal-5.4.13/translations/deepin-terminal_hu.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_hu.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_hu.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Név: + + + + Command: + Parancs: + + + + Shortcuts: + Gyorsbillentyűk: + + + + + + + Required + Kötelező + + + + Add Command + Parancs hozzáadása + + + + Edit Command + Parancs szerkesztése + + + + Delete Command + Parancs törlése + + + + Cancel + button + Mégsem + + + + Add + button + Hozzáadás + + + + Save + button + Mentés + + + + OK + button + OK + + + + Please enter a name + Kérjük adjon meg egy nevet + + + + Please enter a command + Kérjük adjon meg egy parancsot + + + + The name already exists, + Ez a név már létezik + + + + please input another one. + Kérjük adjon meg egy másikat + + + + CustomCommandPanel + + + Add Command + Parancs hozzáadása + + + + CustomCommandPlugin + + + Custom commands + Egyéni parancsok + + + + CustomCommandSearchRstPanel + + + Search + Keresés + + + + CustomThemeSettingDialog + + + Custom Theme + Egyéni Téma + + + + Style: + Stílus: + + + + Light + Világos + + + + Dark + Sötét + + + + Fore color: + Elülső szín: + + + + Back color: + Háttér szín: + + + + Prompt PS1: + Felszólítás PS1: + + + + Prompt PS2: + Felszólítás PS2: + + + + Cancel + button + Mégsem + + + + Confirm + button + Megerősítés + + + + ListView + + + Delete Server + Szerver törlése + + + + + Are you sure you want to delete %1? + Biztos, hogy törölni akarja a %1-t? + + + + MainWindow + + + + New window + Új ablak + + + + Settings + Beállítások + + + + Cancel + button + Mégsem + + + + Close + button + Bezárás + + + + Type path to download file + Elérési útvonal a letöltött fájlokhoz + + + + Custom Theme + Egyéni téma + + + + QObject + + + Copy on select + Másolás kijelöléskor + + + + Cursor blink + Kurzor villogás + + + + Cursor style + Kurzor stílusa + + + + Scroll on keystroke + Görgetés gombnyomásra + + + + Scroll on output + Görgetés kimenetnél + + + + Hide Quake window after losing focus + Lebegő ablak elrejtése fókusz elvesztésekor + + + + + Blur background + Háttér elhomályosítása + + + + Use on starting + Használja indításkor + + + + Font + Betűtípus + + + + Font size + Betűméret + + + + + Opacity + Áttetszőség + + + + Advanced + Haladó + + + + Cursor + Kurzor + + + + Scroll + Görgetés + + + + Window + Ablak + + + + Basic + Alapvető + + + + Interface + Felület + + + + Shortcuts + Gyorsbillentyűk + + + + + Others + Egyebek + + + + + + Terminal + Terminál + + + + Workspace + Munkaterület + + + + + Custom commands + Egyéni parancsok + + + + + Display shortcuts + Gyorsbillentyűk megjelenítése + + + + + Remote management + Távoli elérés + + + + + New tab + Új fül + + + + + Next tab + Következő fül + + + + + Previous tab + Előző fül + + + + + Select left workspace + Baloldali munkaterület kiválasztása + + + + + Select lower workspace + Alsó munkaterület kiválasztása + + + + + Select right workspace + Jobboldali munkaterület kiválasztása + + + + + Select upper workspace + Felső munkaterület kiválasztása + + + + Tab titles + Fülek címei + + + + + Go to tab 1 + Ugrás az 1. fülre + + + + + Go to tab 2 + Ugrás az 2. fülre + + + + + Go to tab 3 + Ugrás az 3. fülre + + + + + Go to tab 4 + Ugrás az 4. fülre + + + + + Go to tab 5 + Ugrás az 5. fülre + + + + + Go to tab 6 + Ugrás az 6. fülre + + + + + Go to tab 7 + Ugrás az 7. fülre + + + + + Go to tab 8 + Ugrás az 8. fülre + + + + + Go to tab 9 + Ugrás az 9. fülre + + + + Disable flow control using Ctrl+S, Ctrl+Q + A folyam vezérlése a Ctrl+S, Ctrl+Q billentyűkombinációkkal + + + + Shell profile + Shell profil + + + + + + + Rename title + Cím átnevezése + + + + + Fullscreen + Teljes képernyő + + + + + Copy + Másolás + + + + + Default size + Alapértelmezett méret + + + + + Paste + Beillesztés + + + + Search + Keresés + + + + + Select all + Összes kijelölése + + + + Jump to next command + Ugrás a következő parancsra + + + + Jump to previous command + Visszaugrás az előző parancsra + + + + + Zoom in + Nagyítás + + + + + Zoom out + Kicsinyítés + + + + Close other windows + Egyéb ablakok bezárása + + + + + + Close other workspaces + Egyéb munkaterületek bezárása + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Nem található a "%1", helyette a "%2" indul. Kérjük ellenőrizze a shell profilját. + + + + Could not open "%1", unable to run it + Nem nyitható meg a "%1", nem tudja futtatni azt + + + + Could not find "%1", unable to run it + Nem található a "%1", nem tudja futtatni azt + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + A kimenet a Ctrl+S billentyűkombináció megnyomásával felfüggesztésre kerül. A folytatáshoz nyomja meg a Ctrl+Q billentyűkombinációt. + + + + Close window + Ablak bezárása + + + + + + Close workspace + Munkaterület bezárása + + + + + Horizontal split + Kettéosztás vízszintesen + + + + + Vertical split + Függőleges elválasztás + + + + + Find + Találat + + + + + + please set another one. + Kérjük állítson be egy másikat. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + A Terminál egy fejlett terminálemulátor munkaterülettel, több ablakkal, távkezeléssel, lebegő móddal és egyéb funkciókkal. + + + + Tabs + Fülek + + + + + Close tab + Fül bezárása + + + + Select tab + Fül kiválasztása + + + + Switch focus to "+" icon + Váltson fókuszt a „+” ikonnal + + + + + Select file to upload + A feltöltendő fájl kiválasztása + + + + + Upload + Feltöltés + + + + Programs are still running in terminal + Még futnak programok a terminál ablakban + + + + + Close this terminal? + Bezárja ezt a terminált? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Ebben a terminálban még fut egy folyamat. A terminál bezárása kilövi azt. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Még mindig fut a %1 folyamat ebben a terminálban. A terminál bezárása mindegyiket kilövi. + + + + + Close this window? + Bezárja ezt az ablakot? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Ebben az ablakban még fut egy folyamat. Az ablak bezárása kilövi valamennyit. + + + + + Select a directory to save the file + Válasszon könyvtárat a fájl mentéséhez + + + + Are you sure you want to uninstall it? + Biztosan el szeretné távolítani? + + + + + Are you sure you want to uninstall this application? + Biztosan el szeretné távolítani ezt az alkalmazást? + + + + + You will not be able to use Terminal any longer. + Nem használhatja tovább a terminált. + + + + + + + Cancel + button + Mégsem + + + + + OK + button + OK + + + + Execute a command in the terminal + Parancs futtatása terminál ablakban + + + + Run script string in the terminal + Szkript futtatása terminál ablakban + + + + Set the work directory + Állítsa be a munkakönyvtár helyét + + + + Set the window mode on starting + Ablakmód indítási beállítása + + + + Run in quake mode + Futtatás lebegő módban + + + + Keep terminal open when command finishes + A parancs befejezése után tartsa nyitva a terminál ablakot + + + + + The name should be no more than 32 characters + A név legfeljebb 32 karakter lehet + + + + + + Select + Kiválasztás + + + + Select the private key file + Privát kulcs fájl kiválasztása + + + + + Tab title format + Fül címének formátuma + + + + + Remote tab title format + Távoli fül címének formátuma + + + + + Close other tabs + Egyéb fülek bezárása + + + + Delete + button + Törlés + + + + + Confirm + button + Megerősítés + + + + RemoteManagementPanel + + + Add Server + Szerver hozzáadása + + + + RemoteManagementPlugin + + + Remote management + Távoli elérés + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Mielőtt a fájlok feltöltéséhez és letöltéséhez jobb gombbal kattintana, győződjön meg arról, hogy az rz és sz parancsok telepítve vannak a szerveren. + + + + RemoteManagementSearchPanel + + + Search + Keresés + + + + ServerConfigOptDlg + + + Advanced options + Haladó beállítások + + + + Add Server + Szerver hozzáadása + + + + Server name: + Szerver név: + + + + + + Required + Kötelező + + + + Address: + Cím: + + + + Port: + Port: + + + + Username: + Felhasználónév: + + + + Password: + Jelszó: + + + + Certificate: + Tanúsítvány: + + + + Group: + Csoport: + + + + Path: + Elérési útvonal: + + + + Command: + Parancs: + + + + Encoding: + Kódolás: + + + + Backspace key: + Backspace billentyű: + + + + Delete key: + Törlés billentyű: + + + + Delete server + Szerver törlése + + + + Cancel + button + Mégsem + + + + Add + button + Hozzáadás + + + + Edit Server + Szerver szerkesztése + + + + Save + button + Mentés + + + + + tty + tty + + + + Please enter a server name + Kérjük adjon meg egy szerver nevet + + + + Please enter an IP address + Kérjük adjon meg egy IP címet + + + + Please enter a port + Kérjük adjon meg egy portot + + + + Please enter a username + Kérjük adjon meg egy felhasználónevet + + + + + ascii-del + ascii-del + + + + + auto + automatikus + + + + + control-h + control-h + + + + + escape-sequence + kilépési-szekvencia + + + + The server name already exists, + A szerver név már használatban van + + + + please input another one. + Kérjük adjon meg egy másikat + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Osztott képernyő + + + + Fullscreen + Teljes képernyő + + + + Normal window + Normál ablak + + + + Maximum + Maximum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + A %1 gyorsbillentyű érvénytelen, + + + + + + The shortcut %1 was already in use, + A %1 gyorsbillentyű már használatban van, + + + + TabRenameWidget + + + Insert + Beillesztés + + + + + username: %u + Felhasználónév: %u + + + + username@: %U + Felhasználónév@: %U + + + + remote host: %h + Távoli gazdagép: %h + + + + + session number: %# + Munkamenet száma: %# + + + + + title set by shell: %w + Shell által beállított cím: %w + + + + program name: %n + Program neve: %n + + + + current directory (short): %d + Jelenlegi mappa (rövid): %d + + + + current directory (long): %D + Jelenlegi mappa (hosszú): %D + + + + local host: %h + Helyi gazdagép: %h + + + + TermWidget + + + Copy + Másolás + + + + Paste + Beillesztés + + + + Open + Megnyitás + + + + Open in file manager + Megnyitás a fájlkezelőben + + + + + Horizontal split + Vízszintes felosztás + + + + + Vertical split + Függőleges felosztás + + + + + New tab + Új fül + + + + Exit fullscreen + Kilépés a teljes képernyőből + + + + Fullscreen + Teljes képernyő + + + + Find + Találat + + + + Search + Keresés + + + + Encoding + Kódolás + + + + Custom commands + Egyéni parancsok + + + + Remote management + Távoli elérés + + + + Upload file + Fájl feltöltése + + + + Download file + Fájl letöltése + + + + Settings + Beállítások + + + + Utils + + + + Cancel + button + Mégsem + + + + Close + button + Bezárás + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_it.ts deepin-terminal-5.4.13/translations/deepin-terminal_it.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_it.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_it.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1199 @@ + + + CustomCommandOptDlg + + + Name: + Nome: + + + + Command: + Comando: + + + + Shortcuts: + Scorciatoie: + + + + + + + Required + Richiesta + + + + Add Command + Aggiungi Comando + + + + Edit Command + Modifica Comando + + + + Delete Command + Elimina comando + + + + Cancel + button + Annulla + + + + Add + button + Aggiungi + + + + Save + button + Salva + + + + OK + button + OK + + + + Please enter a name + Inserisci un nome + + + + Please enter a command + Inserisci un comando + + + + The name already exists, + Il nome esiste già, + + + + please input another one. + inseriscine un altro. + + + + CustomCommandPanel + + + Add Command + Aggiungi Comando + + + + CustomCommandPlugin + + + Custom commands + Comandi personalizzati + + + + CustomCommandSearchRstPanel + + + Search + Cerca + + + + CustomThemeSettingDialog + + + Custom Theme + Tema personalizzato + + + + Style: + Stile: + + + + Light + Chiara + + + + Dark + Scura + + + + Fore color: + Colore anteriore: + + + + Back color: + Colore posteriore: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Annulla + + + + Confirm + button + Conferma + + + + ListView + + + Delete Server + Elimina Server + + + + + Are you sure you want to delete %1? + Sicuro di voler eliminare %1? + + + + MainWindow + + + + New window + Nuova finestra + + + + Settings + Impostazioni + + + + Cancel + button + Annulla + + + + Close + button + Chiudi + + + + Type path to download file + Digita il percorso per scaricare i file + + + + Custom Theme + Tema personalizzato + + + + QObject + + + Copy on select + Copia sulla selezione + + + + Cursor blink + Intermittenza cursore + + + + Cursor style + Stile cursore + + + + Scroll on keystroke + Scorri automaticamente verso il basso + + + + Scroll on output + Scorri automaticamente verso l'output + + + + Hide Quake window after losing focus + Nascondi Quake window dopo il movimento del mouse + + + + + Blur background + Sfondo Blur + + + + Use on starting + Usa all'avvio + + + + Font + Font + + + + Font size + Dimensione font + + + + + Opacity + Opacità + + + + Advanced + Avanzate + + + + Cursor + Cursore + + + + Scroll + Scroll + + + + Window + Finestra + + + + Basic + Base + + + + Interface + Interfaccia + + + + Shortcuts + Scorciatoie + + + + + Others + Altro + + + + + + Terminal + Terminale + + + + Workspace + Spazio di lavoro + + + + + Custom commands + Comandi personalizzati + + + + + Display shortcuts + Visualizza scorciatoie + + + + + Remote management + Gestione remota + + + + + New tab + Nuova scheda + + + + + Next tab + Prossima scheda + + + + + Previous tab + Scheda precedente + + + + + Select left workspace + Seleziona lo spazio di lavoro a sinistra + + + + + Select lower workspace + Seleziona lo spazio di lavoro inferiore + + + + + Select right workspace + Seleziona lo spazio di lavoro a destra + + + + + Select upper workspace + Seleziona lo spazio di lavoro superiore + + + + Tab titles + Titolo scheda + + + + + Go to tab 1 + Vai alla scheda 1 + + + + + Go to tab 2 + Vai alla scheda 2 + + + + + Go to tab 3 + Vai alla scheda 3 + + + + + Go to tab 4 + Vai alla scheda 4 + + + + + Go to tab 5 + Vai alla scheda 5 + + + + + Go to tab 6 + Vai alla scheda 6 + + + + + Go to tab 7 + Vai alla scheda 7 + + + + + Go to tab 8 + Vai alla scheda 8 + + + + + Go to tab 9 + Vai alla scheda 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Disattiva il controllo di flusso con Ctrl+S, Ctrl+Q + + + + Shell profile + Profilo Shell + + + + + + + Rename title + Titolo rinominato + + + + + Fullscreen + Schermo intero + + + + + Copy + Copia + + + + + Default size + Dimensione di default + + + + + Paste + Incolla + + + + Search + Cerca + + + + + Select all + Seleziona tutto + + + + Jump to next command + Salta al comando successivo + + + + Jump to previous command + Torna al comando precedente + + + + + Zoom in + Zoom più + + + + + Zoom out + Zoom meno + + + + Close other windows + Chiudi le altre finestre + + + + + + Close other workspaces + Chiudi altri spazi di lavoro + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Impossibile trovare "%1", inizia da "%2". Controlla il tuo profilo Shell. + + + + Could not open "%1", unable to run it + Impossibile aprire ed eseguire "%1" + + + + Could not find "%1", unable to run it + Impossibile trovare "%1", non è possibile eseguirlo + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + L'output è stato sospeso con Ctrl+S. Premi Ctrl+Q per riprendere. + + + + Close window + Chiudi finestra + + + + + + Close workspace + Chiudi spazio di lavoro + + + + + Horizontal split + Dividi orizzontalmente + + + + + Vertical split + Split verticale + + + + + Find + Trova + + + + + + please set another one. + impostane un altro + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Il Terminale di Deepin è un emulatore di terminale avanzato con spazi di lavoro, finestre multiple, gestione remota, quake mode ed altre funzionalità utili nell'uso quotidiano. +Localizzazione italiana a cura di Massimo A. Carofano + + + + Tabs + Schede + + + + + Close tab + Chiudi scheda + + + + Select tab + Seleziona scheda + + + + Switch focus to "+" icon + Sposta il focus con l'icona "+" + + + + + Select file to upload + Seleziona il file da caricare + + + + + Upload + Carica + + + + Programs are still running in terminal + Programmi in esecuzione nel terminale + + + + + Close this terminal? + Chiudere questo terminale? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + C'è ancora un processo in esecuzione, chiudendo il terminale lo interromperai. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Ci sono ancora %1 processi in esecuzione, chiudendo il terminale li interromperai. + + + + + Close this window? + Chiudere questa finestra? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Ci sono ancora processi in esecuzione nella finestra, chiudendola li interromperai tutti. + + + + + Select a directory to save the file + Seleziona un percorso dove salvare il file + + + + Are you sure you want to uninstall it? + Sicuro di voler disinstallarlo? + + + + + Are you sure you want to uninstall this application? + Sicuro di voler disinstallare questa applicazione? + + + + + You will not be able to use Terminal any longer. + Non sarà più possibile utilizzare il terminale. + + + + + + + Cancel + button + Annulla + + + + + OK + button + OK + + + + Execute a command in the terminal + Esegui un comando nel terminale + + + + Run script string in the terminal + Esegui script nel terminale + + + + Set the work directory + Imposta il percorso di lavoro + + + + Set the window mode on starting + Imposta la modalità finestra allavvio + + + + Run in quake mode + Esegui in primo piano + + + + Keep terminal open when command finishes + Fai in modo che il terminale rimanga aperto alla conclusione + + + + + The name should be no more than 32 characters + Il nome non dovrebbe eccedere i 32 caratteri + + + + + + Select + Seleziona + + + + Select the private key file + Seleziona il file di chiave privata + + + + + Tab title format + Formato titolo scheda + + + + + Remote tab title format + Formato titolo della scheda remota + + + + + Close other tabs + Chiudi le altre schede + + + + Delete + button + Elimina + + + + + Confirm + button + Conferma + + + + RemoteManagementPanel + + + Add Server + Aggiungi Server + + + + RemoteManagementPlugin + + + Remote management + Gestione remota + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Assicurati che i comandi RZ e SZ siano stati installati nel server prima di caricare o scaricare file + + + + RemoteManagementSearchPanel + + + Search + Cerca + + + + ServerConfigOptDlg + + + Advanced options + Opzioni avanzate + + + + Add Server + Aggiungi Server + + + + Server name: + Nome server: + + + + + + Required + Richiesta + + + + Address: + Indirizzo: + + + + Port: + Porta: + + + + Username: + Username: + + + + Password: + Password: + + + + Certificate: + Certificato: + + + + Group: + Gruppo: + + + + Path: + Percorso: + + + + Command: + Comando: + + + + Encoding: + Encoding: + + + + Backspace key: + Tasto cancella: + + + + Delete key: + Elimina chiave: + + + + Delete server + Elimina server + + + + Cancel + button + Annulla + + + + Add + button + Aggiungi + + + + Edit Server + Modifica Server + + + + Save + button + Salva + + + + + tty + tty + + + + Please enter a server name + Inserisci il nome del Server + + + + Please enter an IP address + Inserisci l'indirizzo IP + + + + Please enter a port + Inserisci la Porta + + + + Please enter a username + Inserisci l'username + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Il nome server esiste già, + + + + please input another one. + inseriscine un altro. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Dividi schermo + + + + Fullscreen + Schermo intero + + + + Normal window + Finestra normale + + + + Maximum + Massimo + + + + ShortcutManager + + + + The shortcut %1 is invalid, + La scorciatoia %1 non è valida, + + + + + + The shortcut %1 was already in use, + La scorciatoia %1 è già in uso, + + + + TabRenameWidget + + + Insert + Inserisci + + + + + username: %u + username: %u + + + + username@: %U + username@: %U + + + + remote host: %h + host remoto: %h + + + + + session number: %# + numero sessione: %# + + + + + title set by shell: %w + titolo impostato dal programma: %w + + + + program name: %n + nome programma: %n + + + + current directory (short): %d + percorso corrente (breve): %d + + + + current directory (long): %D + percorso corrente (completo): %D + + + + local host: %h + host locale: %h + + + + TermWidget + + + Copy + Copia + + + + Paste + Incolla + + + + Open + Apri + + + + Open in file manager + Apri nel file manager + + + + + Horizontal split + Dividi orizzontalmente + + + + + Vertical split + Split verticale + + + + + New tab + Nuova scheda + + + + Exit fullscreen + Esci dalla modalità fullscreen + + + + Fullscreen + Schermo intero + + + + Find + Trova + + + + Search + Cerca + + + + Encoding + Encoding + + + + Custom commands + Comandi personalizzati + + + + Remote management + Gestione remota + + + + Upload file + Carica file + + + + Download file + Scarica file + + + + Settings + Impostazioni + + + + Utils + + + + Cancel + button + Annulla + + + + Close + button + Chiudi + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ko.ts deepin-terminal-5.4.13/translations/deepin-terminal_ko.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ko.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_ko.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1310 @@ + + + + + CustomCommandOptDlg + + + Name: + 이름: + + + + Command: + 명령: + + + + Shortcuts: + 단축키 + + + + + + + Required + 필수 항목 + + + + Add Command + 명령 추가 + + + + Edit Command + 명령 편집 + + + + Delete Command + 명령 삭제 + + + + Cancel + button + 취소 + + + + Add + button + 추가 + + + + Save + button + 저장 + + + + OK + button + 확인 + + + Cancel + 취소 + + + Add + 추가 + + + Save + 저장 + + + + Please enter a name + 이름을 입력하십시오 + + + + Please enter a command + 명령을 입력하십시오 + + + + The name already exists, + 이름이 이미 존재합니다 + + + + please input another one. + 다른 이름을 입력하십시오 + + + OK + 확인 + + + + CustomCommandPanel + + + Add Command + 명령 추가 + + + + CustomCommandPlugin + + + Custom commands + 사용자 지정 명령 + + + + CustomCommandSearchRstPanel + + + Search + 찾기 + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + 취소 + + + + Confirm + button + 확인 + + + Cancel + 취소 + + + Confirm + 확인 + + + + DSettingsDialog + + This shortcut conflicts with %1 + 이 단축키는 %1과(와) 충돌합니다 + + + + ListView + + + Delete Server + 서버 삭제 + + + + + Are you sure you want to delete %1? + %1을(를) 삭제하시겠습니까? + + + + MainWindow + + + + New window + 새 창 + + + + Settings + 설정 + + + + Cancel + button + 취소 + + + + Close + button + 닫기 + + + Cancel + 취소 + + + Close + 닫기 + + + + Type path to download file + 파일을 다운로드할 경로 입력 + + + + Custom Theme + + + + + QObject + + OK + 확인 + + + + Copy on select + 선택시 복사 + + + + Cursor blink + 커서 깜박임 + + + + Cursor style + 커서 스타일 + + + + Scroll on keystroke + 키 입력시 스크롤 + + + + Scroll on output + 출력시 스크롤 + + + + Hide Quake window after losing focus + 포커스를 잃은 후 진동 창 숨기기 + + + + + Blur background + 배경 흐림 + + + + Use on starting + 시작시 사용 + + + + Font + 글꼴 + + + + Font size + 글꼴 크기 + + + + + Opacity + 불투명도 + + + + Advanced + 고급 + + + + Cursor + 커서 + + + + Scroll + 스크롤 + + + + Window + + + + + Basic + 기본 + + + + Interface + 인터페이스 + + + + Shortcuts + 단축키 + + + + + Others + 기타 + + + + + + Terminal + 터미널 + + + + Workspace + 작업 공간 + + + + + Custom commands + 사용자 지정 명령 + + + + + Display shortcuts + 단축키 표시 + + + + + Remote management + 원격 관리 + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + 제목 이름 변경 + + + + + Fullscreen + 전체화면 + + + + + Copy + 복사 + + + + + Default size + 기본 크기 + + + + + Paste + 붙여넣기 + + + + Search + 찾기 + + + + + Select all + 전체 선택 + + + + Jump to next command + 다음 명령으로 건너뛰기 + + + + Jump to previous command + 이전 명령으로 건너뛰기 + + + + + Zoom in + 확대 + + + + + Zoom out + 축소 + + + + Close other windows + 다른 창 닫기 + + + + + + Close other workspaces + 다른 작업 공간 닫기 + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + 창 닫기 + + + + + + Close workspace + 작업공간 닫기 + + + + + Horizontal split + 수평 분할 + + + + + Vertical split + 수직 분할 + + + + + Find + 찾기 + + + Cancel + 취소 + + + Delete + 삭제 + + + + + + please set another one. + 다른 것을 설정하십시오. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + 터미널은 작업 공간, 여러 창, 원격 관리, 지진 모드 및 기타 기능을 갖춘 고급 터미널 에뮬레이터입니다. + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + 업로드할 파일 선택 + + + + + Upload + 업로드 + + + + Programs are still running in terminal + 터미널에서 프로그램이 여전히 실행 중입니다 + + + Are you sure you want to exit? + 종료하시겠습니까? + + + Exit + 나가기 + + + + + Close this terminal? + 이 터미널을 닫으시겠습니까? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + 이 터미널에서 여전히 실행중인 프로세스가 있습니다. 터미널을 닫으면 터미널이 종료됩니다. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + 이 터미널에서 여전히 %1 개의 프로세스가 실행 중입니다. 터미널을 닫으면 모든 터미널이 종료됩니다. + + + + + Close this window? + 이 창을 닫으시겠습니까? + + + + + There are still processes running in this window. Closing the window will kill all of them. + 이 창에서 여전히 실행중인 프로세스가 있습니다. 창을 닫으면 모든 창이 종료됩니다. + + + + + Select a directory to save the file + 파일을 저장할 디렉터리 선택 + + + + Are you sure you want to uninstall it? + 제거하시겠습니까? + + + + + Are you sure you want to uninstall this application? + 이 응용프로그램을 제거하시겠습니까? + + + + + You will not be able to use Terminal any longer. + 더 이상 터미널을 사용할 수 없습니다. + + + Click on Add to make this shortcut effective immediately + 이 단축키를 즉시 적용하려면 추가를 클릭하십시오 + + + Replace + 교체 + + + + Execute a command in the terminal + 터미널에서 명령 실행 + + + + Run script string in the terminal + 터미널에서 스크립트 문자열 실행 + + + + Set the work directory + 작업 디렉토리 지정하기 + + + + + OK + button + 확인 + + + + Set the window mode on starting + 시작 시 윈도우 모드 지정하기 + + + + Run in quake mode + 진동 모드에서 실행 + + + + Keep terminal open when command finishes + 명령이 완료될 때 터미널 열기 유지하기 + + + + + The name should be no more than 32 characters + 이름은 32자 이하여야 합니다 + + + + + + Select + 선택 + + + + Select the private key file + 개인 키 파일 선택 + + + Confirm + 확인 + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + 취소 + + + + Delete + button + 삭제 + + + + + Confirm + button + 확인 + + + + RemoteManagementPanel + + + Add Server + 서버 추가 + + + + RemoteManagementPlugin + + + Remote management + 원격 관리 + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + 파일을 업로드 및 다운로드하려면 마우스 오른쪽 단추를 클릭하기 전에 rz 및 sz 명령이 서버에 설치되어 있는지 확인하십시오. + + + + RemoteManagementSearchPanel + + + Search + 찾기 + + + + ServerConfigOptDlg + + + Advanced options + 고급 옵션 + + + + Add Server + 서버 추가 + + + + Server name: + 서버 이름: + + + + + + Required + 필수 항목 + + + + Address: + 주소: + + + + Port: + 포트: + + + + Username: + 사용자 이름: + + + + Password: + 비밀번호: + + + + Certificate: + 인증서: + + + + Group: + 그룹: + + + + Path: + 경로: + + + + Command: + 명령: + + + + Encoding: + 인코딩: + + + + Backspace key: + 백스페이스 키: + + + + Delete key: + 키 삭제: + + + + Delete server + 서버 삭제 + + + + Cancel + button + 취소 + + + + Add + button + 추가 + + + Cancel + 취소 + + + Add + 추가 + + + + Edit Server + 서버 편집 + + + + Save + button + 저장 + + + + + tty + tty + + + + Please enter a server name + 서버 이름을 입력하십시오 + + + + Please enter an IP address + IP 주소를 입력하십시오 + + + + Please enter a port + 포트를 입력하십시오 + + + + Please enter a username + 사용자 이름을 입력하십시오 + + + Save + 저장 + + + + + ascii-del + ascii-del + + + + + auto + 자동 + + + + + control-h + control-h + + + + + escape-sequence + 탈출-시퀀스 + + + + The server name already exists, + 서버 이름이 이미 존재합니다. + + + + please input another one. + 다른 서버 이름을 입력하십시오. + + + + Service + + OK + 확인 + + + + OK + button + 확인 + + + + Settings + + + Split screen + 분할 화면 + + + + Fullscreen + 전체화면 + + + + Normal window + 보통 창 + + + + Maximum + 최대 + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1 단축키가 잘못됨, + + + + + + The shortcut %1 was already in use, + %1 단축키가 이미 사용 중이었습니다. + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Cancel + 취소 + + + Confirm + 확인 + + + + TermWidget + + + Copy + 복사 + + + + Paste + 붙여넣기 + + + + Open + 열기 + + + + Open in file manager + 파일 관리도구에서 열기 + + + + + Horizontal split + 수평 분할 + + + + + Vertical split + 수직 분할 + + + + + New tab + + + + + Exit fullscreen + 전체화면 종료 + + + + Fullscreen + 전체화면 + + + + Find + 찾기 + + + + Search + 찾기 + + + + Encoding + 인코딩 + + + + Custom commands + 사용자 지정 명령 + + + + Remote management + 원격 관리 + + + + Upload file + 파일 업로드 + + + + Download file + 다운로드 파일 + + + + Settings + 설정 + + + + Utils + + Cancel + 취소 + + + Close + 닫기 + + + OK + 확인 + + + + + Cancel + button + 취소 + + + + Close + button + 닫기 + + + + + OK + button + 확인 + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_nl.ts deepin-terminal-5.4.13/translations/deepin-terminal_nl.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_nl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_nl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Naam: + + + + Command: + Opdracht: + + + + Shortcuts: + Sneltoetsen: + + + + + + + Required + Vereist + + + + Add Command + Opdracht toevoegen + + + + Edit Command + Opdracht bewerken + + + + Delete Command + Opdracht verwijderen + + + + Cancel + button + Annuleren + + + + Add + button + Toevoegen + + + + Save + button + Opslaan + + + + OK + button + Oké + + + + Please enter a name + Voer een naam in + + + + Please enter a command + Voer een opdracht in + + + + The name already exists, + Deze naam is al in gebruik; + + + + please input another one. + kies een andere naam. + + + + CustomCommandPanel + + + Add Command + Opdracht toevoegen + + + + CustomCommandPlugin + + + Custom commands + Aangepaste opdrachten + + + + CustomCommandSearchRstPanel + + + Search + Zoeken + + + + CustomThemeSettingDialog + + + Custom Theme + Eigen thema + + + + Style: + Stijl: + + + + Light + Licht + + + + Dark + Donker + + + + Fore color: + Voorgrondkleur: + + + + Back color: + Achtergrondkleur: + + + + Prompt PS1: + Vraag PS1: + + + + Prompt PS2: + Vraag PS2: + + + + Cancel + button + Annuleren + + + + Confirm + button + Oké + + + + ListView + + + Delete Server + Server verwijderen + + + + + Are you sure you want to delete %1? + Weet je zeker dat je %1 wilt verwijderen? + + + + MainWindow + + + + New window + Nieuw venster + + + + Settings + Instellingen + + + + Cancel + button + Annuleren + + + + Close + button + Sluiten + + + + Type path to download file + Geef het pad op van het te downloaden bestand + + + + Custom Theme + Eigen thema + + + + QObject + + + Copy on select + Selecties kopiëren naar klembord + + + + Cursor blink + Knipperende cursor + + + + Cursor style + Cursorstijl + + + + Scroll on keystroke + Scrollen na toetsaanslag + + + + Scroll on output + Scrollen na nieuwe uitvoer + + + + Hide Quake window after losing focus + Quake-venster verbergen na verliezen van focus + + + + + Blur background + Achtergrond vervagen + + + + Use on starting + Opstartmodus + + + + Font + Lettertype + + + + Font size + Tekstgrootte + + + + + Opacity + Doorzichtigheid + + + + Advanced + Geavanceerd + + + + Cursor + Cursor + + + + Scroll + Scrollen + + + + Window + Venster + + + + Basic + Algemeen + + + + Interface + Uiterlijk + + + + Shortcuts + Sneltoetsen + + + + + Others + Overig + + + + + + Terminal + Terminal + + + + Workspace + Werkblad + + + + + Custom commands + Aangepaste opdrachten + + + + + Display shortcuts + Sneltoetsen tonen + + + + + Remote management + Beheer op afstand + + + + + New tab + Nieuw tabblad + + + + + Next tab + Volgend tabblad + + + + + Previous tab + Vorig tabblad + + + + + Select left workspace + Ga naar linkerwerkruimte + + + + + Select lower workspace + Ga naar onderste werkruimte + + + + + Select right workspace + Ga naar rechterwerkruimte + + + + + Select upper workspace + Ga naar bovenste werkruimte + + + + Tab titles + Tabbladnamen + + + + + Go to tab 1 + Ga naar tabblad 1 + + + + + Go to tab 2 + Ga naar tabblad 2 + + + + + Go to tab 3 + Ga naar tabblad 3 + + + + + Go to tab 4 + Ga naar tabblad 4 + + + + + Go to tab 5 + Ga naar tabblad 5 + + + + + Go to tab 6 + Ga naar tabblad 6 + + + + + Go to tab 7 + Ga naar tabblad 7 + + + + + Go to tab 8 + Ga naar tabblad 8 + + + + + Go to tab 9 + Ga naar tabblad 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Uitvoer onderbreken/hervatten middels Ctrl+S en Ctrl+Q + + + + Shell profile + Shellprofiel + + + + + + + Rename title + Titelnaam wijzigen + + + + + Fullscreen + Beeldvullende modus + + + + + Copy + Kopiëren + + + + + Default size + Standaardgrootte + + + + + Paste + Plakken + + + + Search + Zoeken + + + + + Select all + Alles selecteren + + + + Jump to next command + Ga naar volgende opdracht + + + + Jump to previous command + Ga naar vorige opdracht + + + + + Zoom in + Inzoomen + + + + + Zoom out + Uitzoomen + + + + Close other windows + Andere vensters sluiten + + + + + + Close other workspaces + Andere werkbladen sluiten + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + “%1” is niet aangetroffen, dus wordt “%2” gestart. Controleer je shellprofiel. + + + + Could not open "%1", unable to run it + “%1” kan niet worden geopend en worden gestart + + + + Could not find "%1", unable to run it + “%1” is niet aangetroffen en kan daarom niet worden gestart + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Door het drukken op Ctrl+S is de uitvoer onderbroken. Druk op Ctrl+Q om te hervatten. + + + + Close window + Venster sluiten + + + + + + Close workspace + Werkblad sluiten + + + + + Horizontal split + Horizontaal splitsen + + + + + Vertical split + Verticaal splitsen + + + + + Find + Zoeken + + + + + + please set another one. + kies een andere. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal is een geavanceerde terminalemulator met functies als werkbladen, meerdere vensters, beheer op afstand, quake-modus en nog veel meer. + + + + Tabs + Tabbladen + + + + + Close tab + Tabblad sluiten + + + + Select tab + Ga naar tabblad + + + + Switch focus to "+" icon + Focussen op ‘+’-pictogram + + + + + Select file to upload + Kies het te uploaden bestand + + + + + Upload + Uploaden + + + + Programs are still running in terminal + Er draaien nog programma's in de terminal + + + + + Close this terminal? + Wil je dit terminalvenster sluiten? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Er is nog één proces actief in dit venster. Als je het venster sluit, wordt het proces afgebroken. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Er zijn nog %1 processen actief in dit venster. Als je het venster sluit, worden ze afgebroken. + + + + + Close this window? + Wil je dit venster sluiten? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Er zijn nog processen actief in dit venster. Als je het venster sluit, worden ze afgebroken. + + + + + Select a directory to save the file + Kies de map waarin het bestand moet worden opgeslagen + + + + Are you sure you want to uninstall it? + Weet je zeker dat je het wilt deïnstalleren? + + + + + Are you sure you want to uninstall this application? + Weet je zeker dat je dit programma wilt deïnstalleren? + + + + + You will not be able to use Terminal any longer. + Je kunt Deepin Terminal dan niet meer gebruiken. + + + + + + + Cancel + button + Annuleren + + + + + OK + button + Oké + + + + Execute a command in the terminal + Voer een opdracht uit in het terminalvenster + + + + Run script string in the terminal + Script uitvoeren in terminalvenster + + + + Set the work directory + Stel de werkmap in + + + + Set the window mode on starting + Stel de standaard venstermodus in + + + + Run in quake mode + Opstarten in quake-modus + + + + Keep terminal open when command finishes + Terminal niet sluiten na afronden van opdracht + + + + + The name should be no more than 32 characters + De naam mag niet langer zijn dan 32 tekens + + + + + + Select + Kiezen + + + + Select the private key file + Kies het privésleutelbestand + + + + + Tab title format + Tabbladnaamopmaak + + + + + Remote tab title format + Tabbladnaamopmaak (beheer op afstand) + + + + + Close other tabs + Andere tabbladen sluiten + + + + Delete + button + Verwijderen + + + + + Confirm + button + Oké + + + + RemoteManagementPanel + + + Add Server + Server toevoegen + + + + RemoteManagementPlugin + + + Remote management + Beheer op afstand + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Zorg er voor dat de rz- en sz-opdrachten geïnstalleerd zijn op de server zodat je bestanden kunt up- en downloaden middels de rechtermuisknop. + + + + RemoteManagementSearchPanel + + + Search + Zoeken + + + + ServerConfigOptDlg + + + Advanced options + Geavanceerde opties + + + + Add Server + Server toevoegen + + + + Server name: + Servernaam: + + + + + + Required + Vereist + + + + Address: + Adres: + + + + Port: + Poort: + + + + Username: + Gebruikersnaam: + + + + Password: + Wachtwoord: + + + + Certificate: + Certificaat: + + + + Group: + Groep: + + + + Path: + Pad: + + + + Command: + Opdracht: + + + + Encoding: + Versleuteling: + + + + Backspace key: + Backspace-toets: + + + + Delete key: + Toets verwijderen: + + + + Delete server + Server verwijderen + + + + Cancel + button + Annuleren + + + + Add + button + Toevoegen + + + + Edit Server + Server bewerken + + + + Save + button + Opslaan + + + + + tty + tty + + + + Please enter a server name + Voer een servernaam in + + + + Please enter an IP address + Voer een ip-adres in + + + + Please enter a port + Voer een poortnummer in + + + + Please enter a username + Voer een gebruikersnaam in + + + + + ascii-del + ascii-del + + + + + auto + automatisch + + + + + control-h + ctrl+h + + + + + escape-sequence + escape-sequentie + + + + The server name already exists, + Deze naam is al in gebruik; + + + + please input another one. + kies een andere naam. + + + + Service + + + OK + button + Oké + + + + Settings + + + Split screen + Gesplitst scherm + + + + Fullscreen + Beeldvullende modus + + + + Normal window + Normaal venster + + + + Maximum + Maximaal + + + + ShortcutManager + + + + The shortcut %1 is invalid, + De sneltoets '%1' is ongeldig; + + + + + + The shortcut %1 was already in use, + De sneltoets '%1' is al in gebruik; + + + + TabRenameWidget + + + Insert + Invoegen + + + + + username: %u + gebruikersnaam: %u + + + + username@: %U + gebruikersnaam@: %u + + + + remote host: %h + host op afstand: %h + + + + + session number: %# + sessienummer: %# + + + + + title set by shell: %w + naam ingesteld door shell: %w + + + + program name: %n + programmanaam: %n + + + + current directory (short): %d + huidige map (verkort): %d + + + + current directory (long): %D + huidige map (volledig): %D + + + + local host: %h + lokale host: %h + + + + TermWidget + + + Copy + Kopiëren + + + + Paste + Plakken + + + + Open + Openen + + + + Open in file manager + Openen in bestandsbeheerder + + + + + Horizontal split + Horizontaal splitsen + + + + + Vertical split + Verticaal splitsen + + + + + New tab + Nieuw tabblad + + + + Exit fullscreen + Beeldvullende modus verlaten + + + + Fullscreen + Beeldvullende modus + + + + Find + Zoeken + + + + Search + Zoeken + + + + Encoding + Versleuteling + + + + Custom commands + Aangepaste opdrachten + + + + Remote management + Beheer op afstand + + + + Upload file + Bestand uploaden + + + + Download file + Bestand downloaden + + + + Settings + Instellingen + + + + Utils + + + + Cancel + button + Annuleren + + + + Close + button + Sluiten + + + + + OK + button + Oké + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pl.ts deepin-terminal-5.4.13/translations/deepin-terminal_pl.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_pl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nazwa: + + + + Command: + Polecenie: + + + + Shortcuts: + Skróty: + + + + + + + Required + Wymagane + + + + Add Command + Dodaj polecenie + + + + Edit Command + Edycja polecenia + + + + Delete Command + Usuń polecenie + + + + Cancel + button + Anuluj + + + + Add + button + Dodaj + + + + Save + button + Zapisz + + + + OK + button + OK + + + + Please enter a name + Wpisz nazwę + + + + Please enter a command + Wpisz polecenie + + + + The name already exists, + Nazwa już istnieje, + + + + please input another one. + proszę wprowadzić inny. + + + + CustomCommandPanel + + + Add Command + Dodaj polecenie + + + + CustomCommandPlugin + + + Custom commands + Polecenia własne + + + + CustomCommandSearchRstPanel + + + Search + Szukaj + + + + CustomThemeSettingDialog + + + Custom Theme + Własny motyw + + + + Style: + Styl: + + + + Light + Lekka + + + + Dark + Ciemny + + + + Fore color: + Kolor czcionki: + + + + Back color: + Kolor tła: + + + + Prompt PS1: + PS1: + + + + Prompt PS2: + PS2: + + + + Cancel + button + Anuluj + + + + Confirm + button + Potwierdź + + + + ListView + + + Delete Server + Usuń serwer + + + + + Are you sure you want to delete %1? + Czy na pewno chcesz usunąć %1? + + + + MainWindow + + + + New window + Nowe okno + + + + Settings + Ustawienia + + + + Cancel + button + Anuluj + + + + Close + button + Zamknij + + + + Type path to download file + Wpisz ścieżkę, aby pobrać plik + + + + Custom Theme + Własny motyw + + + + QObject + + + Copy on select + Kopiuj przy zaznaczaniu + + + + Cursor blink + Miganie kursora + + + + Cursor style + Styl kursora + + + + Scroll on keystroke + Przewiń przy naciśnięciu klawisza + + + + Scroll on output + Przewiń przy wyjściu + + + + Hide Quake window after losing focus + Ukryj okno Quake po utracie ostrości + + + + + Blur background + Rozmycie tła + + + + Use on starting + Użyj na starcie + + + + Font + Czcionka + + + + Font size + Rozmiar czcionki + + + + + Opacity + Nieprzezroczystość + + + + Advanced + Zaawansowane + + + + Cursor + Kursor + + + + Scroll + Przewijanie + + + + Window + Okno + + + + Basic + Podstawowe + + + + Interface + Interfejs + + + + Shortcuts + Skróty + + + + + Others + Inne + + + + + + Terminal + Terminal + + + + Workspace + Przestrzeń robocza + + + + + Custom commands + Polecenia własne + + + + + Display shortcuts + Wyświetl skróty + + + + + Remote management + Zdalne zarządzanie + + + + + New tab + Nowa karta + + + + + Next tab + Następna karta + + + + + Previous tab + Poprzednia karta + + + + + Select left workspace + Zaznacz lewy obszar roboczy + + + + + Select lower workspace + Zaznacz dolny obszar roboczy + + + + + Select right workspace + Zaznacz prawy obszar roboczy + + + + + Select upper workspace + Zaznacz górny obszar roboczy + + + + Tab titles + Nazwy kart + + + + + Go to tab 1 + Idź do karty 1 + + + + + Go to tab 2 + Idź do karty 2 + + + + + Go to tab 3 + Idź do karty 3 + + + + + Go to tab 4 + Idź do karty 4 + + + + + Go to tab 5 + Idź do karty 5 + + + + + Go to tab 6 + Idź do karty 6 + + + + + Go to tab 7 + Idź do karty 7 + + + + + Go to tab 8 + Idź do karty 8 + + + + + Go to tab 9 + Idź do karty 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Wyłącz kontrolę przepływu skrótami Ctrl+S, Ctrl+Q + + + + Shell profile + Profil powłoki + + + + + + + Rename title + Zmień nazwę tytułu + + + + + Fullscreen + Pełny ekran + + + + + Copy + Kopiuj + + + + + Default size + Domyślny rozmiar + + + + + Paste + Wklej + + + + Search + Szukaj + + + + + Select all + Zaznacz wszystko + + + + Jump to next command + Przejdź do następnego polecenia + + + + Jump to previous command + Przejdź do poprzedniego polecenia + + + + + Zoom in + Przybliż + + + + + Zoom out + Oddal + + + + Close other windows + Zamknij inne okna + + + + + + Close other workspaces + Zamknij inne obszary robocze + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Nie można znaleźć „%1”, zamiast tego rozpoczynam „%2”. Sprawdź swój profil powłoki. + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + Nie można znaleźć „%1”, nie można go uruchomić + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Wyjście zostało zawieszone przez naciśnięcie Ctrl+S. Naciśnij Ctrl+Q, aby wznowić. + + + + Close window + Zamknij okno + + + + + + Close workspace + Zamknij przestrzeń roboczą + + + + + Horizontal split + Podział poziomy + + + + + Vertical split + Podział pionowy + + + + + Find + Znajdź + + + + + + please set another one. + proszę ustawić inny. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal to zaawansowany emulator terminala z obszarem roboczym, wieloma oknami, zdalnym zarządzaniem, trybem quake i innymi funkcjami. + + + + Tabs + Karty + + + + + Close tab + Zamknij kartę + + + + Select tab + Zaznacz kartę + + + + Switch focus to "+" icon + Przełącz zaznaczenie na ikonę „+” + + + + + Select file to upload + Wybierz plik do przesłania + + + + + Upload + Prześlij + + + + Programs are still running in terminal + Programy są wciąż uruchomione w terminalu + + + + + Close this terminal? + Zamknij ten terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + W tym terminalu nadal działa proces. Zamknięcie terminalu go zabije. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + W tym terminalu nadal działa %1 procesów. Zamknięcie terminalu zabije ich wszystkich. + + + + + Close this window? + Zamknij to okno? + + + + + There are still processes running in this window. Closing the window will kill all of them. + W tym oknie nadal działają procesy. Zamknięcie okna zabije ich wszystkich. + + + + + Select a directory to save the file + Wybierz katalog, w którym chcesz zapisać plik + + + + Are you sure you want to uninstall it? + Czy na pewno chcesz go odinstalować? + + + + + Are you sure you want to uninstall this application? + Czy na pewno chcesz odinstalować tę aplikację? + + + + + You will not be able to use Terminal any longer. + Nie będziesz już mógł korzystać z terminala. + + + + + + + Cancel + button + Anuluj + + + + + OK + button + OK + + + + Execute a command in the terminal + Wykonaj polecenie w terminalu + + + + Run script string in the terminal + Uruchom ciąg skryptu w terminalu + + + + Set the work directory + Ustaw katalog roboczy + + + + Set the window mode on starting + Ustaw tryb okna podczas uruchamiania + + + + Run in quake mode + Uruchom w trybie quake + + + + Keep terminal open when command finishes + Pozostaw terminal otwarty po zakończeniu polecenia + + + + + The name should be no more than 32 characters + Nazwa nie powinna mieć więcej niż 32 znaki + + + + + + Select + Wybierz + + + + Select the private key file + Wybierz plik klucza prywatnego + + + + + Tab title format + Format tytułu karty + + + + + Remote tab title format + Format tytułu zdalnej karty + + + + + Close other tabs + Zamknij inne karty + + + + Delete + button + Usuń + + + + + Confirm + button + Potwierdź + + + + RemoteManagementPanel + + + Add Server + Dodaj serwer + + + + RemoteManagementPlugin + + + Remote management + Zdalne zarządzanie + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Upewnij się, że polecenia rz i sz zostały zainstalowane na serwerze, zanim klikniesz prawym przyciskiem, aby przesłać i pobrać pliki. + + + + RemoteManagementSearchPanel + + + Search + Szukaj + + + + ServerConfigOptDlg + + + Advanced options + Zaawansowane opcje + + + + Add Server + Dodaj serwer + + + + Server name: + Nazwa serwera: + + + + + + Required + Wymagane + + + + Address: + Adres: + + + + Port: + Port: + + + + Username: + Nazwa użytkownika: + + + + Password: + Hasło: + + + + Certificate: + Certyfikat: + + + + Group: + Grupa: + + + + Path: + Ścieżka: + + + + Command: + Polecenie: + + + + Encoding: + Kodowanie: + + + + Backspace key: + Przycisk Backspace: + + + + Delete key: + Przycisk Delete: + + + + Delete server + Usuń serwer + + + + Cancel + button + Anuluj + + + + Add + button + Dodaj + + + + Edit Server + Edycja serwera + + + + Save + button + Zapisz + + + + + tty + tty + + + + Please enter a server name + Wprowadź nazwę serwera + + + + Please enter an IP address + Wprowadź adres IP + + + + Please enter a port + Wprowadź port + + + + Please enter a username + Proszę, wpisz nazwę użytkownika + + + + + ascii-del + ascii-del + + + + + auto + automatyczny + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Nazwa serwera już istnieje, + + + + please input another one. + wprowadź inną. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Podzielony ekran + + + + Fullscreen + Pełny ekran + + + + Normal window + Normalne okno + + + + Maximum + Maksymalny + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Skrót %1 jest nieprawidłowy, + + + + + + The shortcut %1 was already in use, + Skrót %1 był już używany, + + + + TabRenameWidget + + + Insert + Wstaw + + + + + username: %u + nazwa użytkownika: %u + + + + username@: %U + username@: %U + + + + remote host: %h + zdalny host: %h + + + + + session number: %# + numer sesji: %# + + + + + title set by shell: %w + tytuł ustawiony przez powłokę: %w + + + + program name: %n + nazwa programu: %n + + + + current directory (short): %d + obecny katalog: %d + + + + current directory (long): %D + obecny katalog (pełna ścieżka): %D + + + + local host: %h + host: %h + + + + TermWidget + + + Copy + Kopiuj + + + + Paste + Wklej + + + + Open + Otwórz + + + + Open in file manager + Otwórz w menedżerze plików + + + + + Horizontal split + Podział poziomy + + + + + Vertical split + Podział pionowy + + + + + New tab + Nowa karta + + + + Exit fullscreen + Opuść tryb pełnoekranowy + + + + Fullscreen + Pełny ekran + + + + Find + Znajdź + + + + Search + Szukaj + + + + Encoding + Kodowanie + + + + Custom commands + Polecenia własne + + + + Remote management + Zdalne zarządzanie + + + + Upload file + Prześlij plik + + + + Download file + Pobierz plik + + + + Settings + Ustawienia + + + + Utils + + + + Cancel + button + Anuluj + + + + Close + button + Zamknij + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pt_BR.ts deepin-terminal-5.4.13/translations/deepin-terminal_pt_BR.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pt_BR.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_pt_BR.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nome: + + + + Command: + Comando: + + + + Shortcuts: + Atalhos: + + + + + + + Required + Obrigatório + + + + Add Command + Adicionar Comando + + + + Edit Command + Editar Comando + + + + Delete Command + Comando Excluir + + + + Cancel + button + Cancelar + + + + Add + button + Adicionar + + + + Save + button + Salvar + + + + OK + button + Ok + + + + Please enter a name + Digite um nome + + + + Please enter a command + Digite um comando + + + + The name already exists, + O nome já existe, + + + + please input another one. + insira outro. + + + + CustomCommandPanel + + + Add Command + Adicionar Comando + + + + CustomCommandPlugin + + + Custom commands + Comandos personalizados + + + + CustomCommandSearchRstPanel + + + Search + Pesquisar + + + + CustomThemeSettingDialog + + + Custom Theme + Tema Personalizado + + + + Style: + Estilo: + + + + Light + Claro + + + + Dark + Escuro + + + + Fore color: + Cor de frente: + + + + Back color: + Cor de fundo: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Cancelar + + + + Confirm + button + Confirmar + + + + ListView + + + Delete Server + Excluir Servidor + + + + + Are you sure you want to delete %1? + Excluir %1? + + + + MainWindow + + + + New window + Nova janela + + + + Settings + Configurações + + + + Cancel + button + Cancelar + + + + Close + button + Fechar + + + + Type path to download file + Digite o caminho para baixar o arquivo + + + + Custom Theme + Tema Personalizado + + + + QObject + + + Copy on select + Copiar ao selecionar + + + + Cursor blink + Intermitência do cursor + + + + Cursor style + Estilo do cursor + + + + Scroll on keystroke + Rolar ao teclar + + + + Scroll on output + Rolar na saída + + + + Hide Quake window after losing focus + Ocultar a janela Quake após perder o foco + + + + + Blur background + Desfocar o fundo + + + + Use on starting + Utilizar na inicialização + + + + Font + Fonte + + + + Font size + Tamanho da fonte + + + + + Opacity + Opacidade + + + + Advanced + Avançado + + + + Cursor + Cursor + + + + Scroll + Rolagem + + + + Window + Janela + + + + Basic + Básico + + + + Interface + Interface + + + + Shortcuts + Atalhos + + + + + Others + Outros + + + + + + Terminal + Terminal + + + + Workspace + Área de Trabalho + + + + + Custom commands + Comandos personalizados + + + + + Display shortcuts + Exibir atalhos + + + + + Remote management + Gerenciamento remoto + + + + + New tab + Nova aba + + + + + Next tab + Próxima aba + + + + + Previous tab + Aba anterior + + + + + Select left workspace + Selecionar o espaço de trabalho esquerdo + + + + + Select lower workspace + Selecionar o espaço de trabalho inferior + + + + + Select right workspace + Selecionar o espaço de trabalho direito + + + + + Select upper workspace + Selecionar o espaço de trabalho superior + + + + Tab titles + Títulos das abas + + + + + Go to tab 1 + Ir para a aba 1 + + + + + Go to tab 2 + Ir para a aba 2 + + + + + Go to tab 3 + Ir para a aba 3 + + + + + Go to tab 4 + Ir para a aba 4 + + + + + Go to tab 5 + Ir para a aba 5 + + + + + Go to tab 6 + Ir para a aba 6 + + + + + Go to tab 7 + Ir para a aba 7 + + + + + Go to tab 8 + Ir para a aba 8 + + + + + Go to tab 9 + Ir para a aba 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Desative o controle de fluxo usando Ctrl+S, Ctrl+Q + + + + Shell profile + Perfil do shell + + + + + + + Rename title + Renomear título + + + + + Fullscreen + Tela Cheia + + + + + Copy + Copiar + + + + + Default size + Tamanho padrão + + + + + Paste + Colar + + + + Search + Pesquisar + + + + + Select all + Selecionar tudo + + + + Jump to next command + Ir para o próximo comando + + + + Jump to previous command + Ir para o comando anterior + + + + + Zoom in + Aumentar zoom + + + + + Zoom out + Reduzir zoom + + + + Close other windows + Fechar outras janelas + + + + + + Close other workspaces + Fechar outros espaços de trabalho + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Impossível encontrar "%1", iniciando com "%2" em vez disso. Verifique o perfil do shell. + + + + Could not open "%1", unable to run it + Impossível abrir "% 1", impossível executá-lo + + + + Could not find "%1", unable to run it + Impossível localizar "% 1", não foi possível executá-lo + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + A saída foi suspensa ao pressionar Ctrl+S. Pressionando Ctrl+Q irá retomar. + + + + Close window + Fechar janela + + + + + + Close workspace + Fechar espaço de trabalho + + + + + Horizontal split + Dividir horizontalmente + + + + + Vertical split + Dividir verticalmente + + + + + Find + Localizar + + + + + + please set another one. + Defina outro. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + O Terminal é um emulador de terminal avançado com espaço de trabalho, múltiplas janelas, gerenciamento remoto, modo quake e outros recursos. + + + + Tabs + Abas + + + + + Close tab + Fechar aba + + + + Select tab + Selecionar aba + + + + Switch focus to "+" icon + Alterar o foco para o ícone "+" + + + + + Select file to upload + Selecionar arquivo para enviar + + + + + Upload + Upload + + + + Programs are still running in terminal + Alguns programas estão sendo executados no terminal + + + + + Close this terminal? + Fechar este terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Há um processo em execução neste terminal. Ao fechar o terminal, irá matá-lo. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Existem %1 processos em execução neste terminal. Fechá-lo irá matar todos eles. + + + + + Close this window? + Fechar esta janela? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Existem processos em execução nesta janela. Ao fechá-la, irá matar todos eles. + + + + + Select a directory to save the file + Selecione um diretório para salvar o arquivo + + + + Are you sure you want to uninstall it? + Desinstalá-lo? + + + + + Are you sure you want to uninstall this application? + Desinstalar este aplicativo? + + + + + You will not be able to use Terminal any longer. + Você não poderá mais usar o Terminal. + + + + + + + Cancel + button + Cancelar + + + + + OK + button + Ok + + + + Execute a command in the terminal + Executar um comando no terminal + + + + Run script string in the terminal + Executar o conjunto de scripts no terminal + + + + Set the work directory + Definir o diretório de trabalho + + + + Set the window mode on starting + Definir o modo de janela ao iniciar + + + + Run in quake mode + Executar no modo quake + + + + Keep terminal open when command finishes + Manter o terminal aberto quando o comando finalizar + + + + + The name should be no more than 32 characters + O nome não deve ter mais do que 32 caracteres + + + + + + Select + Selecionar + + + + Select the private key file + Selecionar o arquivo da chave privada + + + + + Tab title format + Formato do título da aba + + + + + Remote tab title format + Formato do título da aba remota + + + + + Close other tabs + Fechar as outras abas + + + + Delete + button + Excluir + + + + + Confirm + button + Confirmar + + + + RemoteManagementPanel + + + Add Server + Adicionar Servidor + + + + RemoteManagementPlugin + + + Remote management + Gerenciamento remoto + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Antes de clicar com o botão direito para enviar e baixar os arquivos; verifique se os comandos rz e sz estão instalados no servidor. + + + + RemoteManagementSearchPanel + + + Search + Pesquisar + + + + ServerConfigOptDlg + + + Advanced options + Opções avançadas + + + + Add Server + Adicionar Servidor + + + + Server name: + Nome do servidor: + + + + + + Required + Obrigatório + + + + Address: + Endereço: + + + + Port: + Porta: + + + + Username: + Nome de Usuário: + + + + Password: + Senha: + + + + Certificate: + Certificado: + + + + Group: + Grupo: + + + + Path: + Caminho: + + + + Command: + Comando: + + + + Encoding: + Codificação: + + + + Backspace key: + Tecla backspace: + + + + Delete key: + Excluir chave: + + + + Delete server + Excluir servidor + + + + Cancel + button + Cancelar + + + + Add + button + Adicionar + + + + Edit Server + Editar Servidor + + + + Save + button + Salvar + + + + + tty + tty + + + + Please enter a server name + Digite o nome do servidor + + + + Please enter an IP address + Digite um endereço de IP + + + + Please enter a port + Digite uma porta + + + + Please enter a username + Digite um nome de usuário + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + O nome do servidor já existe, + + + + please input another one. + insira outro. + + + + Service + + + OK + button + Ok + + + + Settings + + + Split screen + Tela dividida + + + + Fullscreen + Tela Cheia + + + + Normal window + Janela normal + + + + Maximum + Maximizado + + + + ShortcutManager + + + + The shortcut %1 is invalid, + O atalho %1 é inválido, + + + + + + The shortcut %1 was already in use, + O atalho %1 já está em uso, + + + + TabRenameWidget + + + Insert + Inserir + + + + + username: %u + nome de usuário: %u + + + + username@: %U + nome de usuário@: %U + + + + remote host: %h + host remoto: %h + + + + + session number: %# + número da sessão: %# + + + + + title set by shell: %w + título definido pelo shell: %w + + + + program name: %n + nome do programa: %n + + + + current directory (short): %d + diretório atual (abreviado): %d + + + + current directory (long): %D + diretório atual (longo): %D + + + + local host: %h + host local: %h + + + + TermWidget + + + Copy + Copiar + + + + Paste + Colar + + + + Open + Abrir + + + + Open in file manager + Abrir no Gerenciador de Arquivos + + + + + Horizontal split + Dividir horizontalmente + + + + + Vertical split + Dividir verticalmente + + + + + New tab + Nova aba + + + + Exit fullscreen + Sair da tela cheia + + + + Fullscreen + Tela cheia + + + + Find + Localizar + + + + Search + Pesquisar + + + + Encoding + Codificação + + + + Custom commands + Comandos personalizados + + + + Remote management + Gerenciamento remoto + + + + Upload file + Enviar arquivo + + + + Download file + Baixar arquivo + + + + Settings + Configurações + + + + Utils + + + + Cancel + button + Cancelar + + + + Close + button + Fechar + + + + + OK + button + Ok + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pt.ts deepin-terminal-5.4.13/translations/deepin-terminal_pt.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_pt.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_pt.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Nome: + + + + Command: + Comando: + + + + Shortcuts: + Atalhos: + + + + + + + Required + Necessário + + + + Add Command + Adicionar comando + + + + Edit Command + Editar comando + + + + Delete Command + Comando eliminar + + + + Cancel + button + Cancelar + + + + Add + button + Adicionar + + + + Save + button + Guardar + + + + OK + button + Aceitar + + + + Please enter a name + Introduza um nome + + + + Please enter a command + Introduza um comando + + + + The name already exists, + O nome de já existe, + + + + please input another one. + introduza outro. + + + + CustomCommandPanel + + + Add Command + Adicionar comando + + + + CustomCommandPlugin + + + Custom commands + Comandos personalizados + + + + CustomCommandSearchRstPanel + + + Search + Pesquisar + + + + CustomThemeSettingDialog + + + Custom Theme + Tema personalizado + + + + Style: + Estilo: + + + + Light + Claro + + + + Dark + Escuro + + + + Fore color: + Cor dianteira: + + + + Back color: + Cor traseira: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Cancelar + + + + Confirm + button + Confirmar + + + + ListView + + + Delete Server + Eliminar servidor + + + + + Are you sure you want to delete %1? + Tem a certeza que deseja eliminar %1? + + + + MainWindow + + + + New window + Nova janela + + + + Settings + Definições + + + + Cancel + button + Cancelar + + + + Close + button + Fechar + + + + Type path to download file + Escreva o caminho para transferir o ficheiro + + + + Custom Theme + Tema personalizado + + + + QObject + + + Copy on select + Copiar ao selecionar + + + + Cursor blink + Piscar do cursor + + + + Cursor style + Estilo do cursor + + + + Scroll on keystroke + Deslocar ao tocar em tecla + + + + Scroll on output + Deslocar na saída + + + + Hide Quake window after losing focus + Ocultar janela deslizante depois de perder o foco + + + + + Blur background + Fundo desfocado + + + + Use on starting + Utilizar ao iniciar + + + + Font + Fonte + + + + Font size + Tamanho da fonte + + + + + Opacity + Opacidade + + + + Advanced + Avançado + + + + Cursor + Cursor + + + + Scroll + Rolar + + + + Window + Janela + + + + Basic + Básico + + + + Interface + Interface + + + + Shortcuts + Atalhos + + + + + Others + Outros + + + + + + Terminal + Terminal + + + + Workspace + Área de trabalho + + + + + Custom commands + Comandos personalizados + + + + + Display shortcuts + Mostrar atalhos + + + + + Remote management + Gestão remota + + + + + New tab + Novo separador + + + + + Next tab + Separador seguinte + + + + + Previous tab + Separador anterior + + + + + Select left workspace + Selecionar a área de trabalho à esquerda + + + + + Select lower workspace + Selecionar a área de trabalho inferior + + + + + Select right workspace + Selecionar a área de trabalho à direita + + + + + Select upper workspace + Selecionar a área de trabalho superior + + + + Tab titles + Títulos de separador + + + + + Go to tab 1 + Ir para separador 1 + + + + + Go to tab 2 + Ir para separador 2 + + + + + Go to tab 3 + Ir para separador 3 + + + + + Go to tab 4 + Ir para separador 4 + + + + + Go to tab 5 + Ir para separador 5 + + + + + Go to tab 6 + Ir para separador 6 + + + + + Go to tab 7 + Ir para separador 7 + + + + + Go to tab 8 + Ir para separador 8 + + + + + Go to tab 9 + Ir para separador 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Desativar o controlo de fluxo utilizando Ctrl+S, Ctrl+Q + + + + Shell profile + Perfil da shell + + + + + + + Rename title + Renomear título + + + + + Fullscreen + Ecrã inteiro + + + + + Copy + Copiar + + + + + Default size + Tamanho predefinido + + + + + Paste + Colar + + + + Search + Pesquisar + + + + + Select all + Selecionar tudo + + + + Jump to next command + Ir para o próximo comando + + + + Jump to previous command + Ir para o comando anterior + + + + + Zoom in + Aumentar + + + + + Zoom out + Diminuir + + + + Close other windows + Fechar outras janelas + + + + + + Close other workspaces + Fechar outras áreas de trabalho + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Não foi possível localizar "%1", a iniciar "%2" ao invés. Verifique o seu perfil da shell. + + + + Could not open "%1", unable to run it + Não foi possível abrir o "%1", incapaz de o executar + + + + Could not find "%1", unable to run it + Não foi possível localizar "%1", incapaz de o executar + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + O resultado foi suspenso pressionando Ctrl+S. Pressionando Ctrl+Q para retomar. + + + + Close window + Fechar janela + + + + + + Close workspace + Fechar área de trabalho + + + + + Horizontal split + Dividir horizontalmente + + + + + Vertical split + Dividir verticalmente + + + + + Find + Localizar + + + + + + please set another one. + defina outro. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + O Terminal é um emulador de terminal avançado com áreas de trabalho, várias janelas, gestão remota, modo deslizante e outros recursos. + + + + Tabs + Separadores + + + + + Close tab + Fechar separador + + + + Select tab + Selecionar separador + + + + Switch focus to "+" icon + Mudar o foco para o ícone "+" + + + + + Select file to upload + Selecionar ficheiro para enviar + + + + + Upload + Enviar + + + + Programs are still running in terminal + Os programas ainda estão em execução no terminal + + + + + Close this terminal? + Fechar este terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Ainda existe um processo em execução neste terminal. Fechar o terminal irá matá-lo. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Ainda existem %1 processos em execução neste terminal. Fechar o terminal irá matar todos eles. + + + + + Close this window? + Fechar esta janela? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Ainda existem processos em curso nesta janela. Fechar a janela irá matar todos eles. + + + + + Select a directory to save the file + Selecionar um diretório para guardar o ficheiro + + + + Are you sure you want to uninstall it? + Tem a certeza de que deseja desinstalá-lo? + + + + + Are you sure you want to uninstall this application? + Tem a certeza de que deseja desinstalar esta aplicação? + + + + + You will not be able to use Terminal any longer. + Não poderá mais usar o Terminal. + + + + + + + Cancel + button + Cancelar + + + + + OK + button + Aceitar + + + + Execute a command in the terminal + Executar um comando no terminal + + + + Run script string in the terminal + Executar a sequência do script no terminal + + + + Set the work directory + Defina o diretório de trabalho + + + + Set the window mode on starting + Definir o modo janela ao iniciar + + + + Run in quake mode + Executar em modo deslizante + + + + Keep terminal open when command finishes + Mantenha o terminal aberto quando o comando terminar + + + + + The name should be no more than 32 characters + O nome não deve ter mais que 32 caracteres + + + + + + Select + Selecionar + + + + Select the private key file + Selecionar o ficheiro de chave privada + + + + + Tab title format + Formato do título do separador + + + + + Remote tab title format + Formato do título do separador remoto + + + + + Close other tabs + Fechar outros separadores + + + + Delete + button + Eliminar + + + + + Confirm + button + Confirmar + + + + RemoteManagementPanel + + + Add Server + Adicionar servidor + + + + RemoteManagementPlugin + + + Remote management + Gestão remota + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Verifique se os comandos rz e sz foram instalados no servidor antes de clicar com o botão direito do rato para enviar e transferir ficheiros. + + + + RemoteManagementSearchPanel + + + Search + Pesquisar + + + + ServerConfigOptDlg + + + Advanced options + Opções avançadas + + + + Add Server + Adicionar servidor + + + + Server name: + Nome do servidor: + + + + + + Required + Necessário + + + + Address: + Endereço: + + + + Port: + Porta: + + + + Username: + Nome de utilizador: + + + + Password: + Palavra-passe: + + + + Certificate: + Certificado: + + + + Group: + Grupo: + + + + Path: + Caminho: + + + + Command: + Comando: + + + + Encoding: + A codificar: + + + + Backspace key: + Tecla backspace: + + + + Delete key: + Tecla delete: + + + + Delete server + Eliminar servidor + + + + Cancel + button + Cancelar + + + + Add + button + Adicionar + + + + Edit Server + Editar servidor + + + + Save + button + Guardar + + + + + tty + tty + + + + Please enter a server name + Introduza um nome de servidor + + + + Please enter an IP address + Introduza um endereço de IP + + + + Please enter a port + Introduza uma porta + + + + Please enter a username + Introduza um nome de utilizador + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + O nome de servidor já existe, + + + + please input another one. + introduza outro. + + + + Service + + + OK + button + Aceitar + + + + Settings + + + Split screen + Ecrã dividido + + + + Fullscreen + Ecrã inteiro + + + + Normal window + Janela normal + + + + Maximum + Maximizada + + + + ShortcutManager + + + + The shortcut %1 is invalid, + O atalho %1 é inválido, + + + + + + The shortcut %1 was already in use, + O atalho %1 já estava em uso, + + + + TabRenameWidget + + + Insert + Inserir + + + + + username: %u + nome de utilizador: %u + + + + username@: %U + nome de utilizador@: %U + + + + remote host: %h + anfitrião remoto: %h + + + + + session number: %# + número da sessão: %# + + + + + title set by shell: %w + título definido pela shell: %w + + + + program name: %n + nome do programa: %n + + + + current directory (short): %d + diretório atual (curto): %d + + + + current directory (long): %D + diretório atual (comprido): %D + + + + local host: %h + anfitrião local: %h + + + + TermWidget + + + Copy + Copiar + + + + Paste + Colar + + + + Open + Abrir + + + + Open in file manager + Abrir no gestor de ficheiros + + + + + Horizontal split + Dividir horizontalmente + + + + + Vertical split + Dividir verticalmente + + + + + New tab + Novo separador + + + + Exit fullscreen + Sair de ecrã inteiro + + + + Fullscreen + Ecrã inteiro + + + + Find + Localizar + + + + Search + Pesquisar + + + + Encoding + Codificação + + + + Custom commands + Comandos personalizados + + + + Remote management + Gestão remota + + + + Upload file + Enviar ficheiro + + + + Download file + Transferir ficheiro + + + + Settings + Definições + + + + Utils + + + + Cancel + button + Cancelar + + + + Close + button + Fechar + + + + + OK + button + Aceitar + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ro.ts deepin-terminal-5.4.13/translations/deepin-terminal_ro.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ro.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_ro.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1302 @@ + + + + + CustomCommandOptDlg + + + Name: + Nume: + + + + Command: + Comandă: + + + + Shortcuts: + Scurtături: + + + + + + + Required + Necesar + + + + Add Command + Adaugă comandă + + + + Edit Command + Modifică comanda + + + + Delete Command + Șterge comanda + + + + Cancel + button + + + + + Add + button + Adaugă + + + + Save + button + Salvare + + + + OK + button + + + + Cancel + Anulează + + + Add + Adaugă + + + Save + Salvare + + + + Please enter a name + Vă rugăm să introduceți un nume + + + + Please enter a command + Vă rugăm să introduceți o comandă + + + + The name already exists, + Numele acesta există deja, + + + + please input another one. + vă rugăm să introduceți un alt nume. + + + OK + În regulă + + + + CustomCommandPanel + + + Add Command + Adaugă comandă + + + + CustomCommandPlugin + + + Custom commands + Comandă personalizată + + + + CustomCommandSearchRstPanel + + + Search + Căutare + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + + + + + Confirm + button + + + + + DSettingsDialog + + This shortcut conflicts with %1 + Această scurtătură este în conflict cu %1 + + + + ListView + + + Delete Server + Ștergere server + + + + + Are you sure you want to delete %1? + Sigur doriți să ștergeți% 1? + + + + MainWindow + + + + New window + Fereastră nouă + + + + Settings + Configurări + + + + Cancel + button + + + + + Close + button + Închidere + + + Cancel + Anulare + + + Close + Închidere + + + + Type path to download file + Introdu calea pentru a descărca fișierul + + + + Custom Theme + + + + + QObject + + OK + În regulă + + + + Copy on select + Copiază textul atunci când este selectat + + + + Cursor blink + Clipire cursor + + + + Cursor style + Stilul cursorului + + + + Scroll on keystroke + Derulează conținutul la apăsarea tastelor + + + + Scroll on output + Derulează conținutul la ieșirea textului + + + + Hide Quake window after losing focus + Închide vederea Quake atunci când fereastra nu mai este în centrul atenției + + + + + Blur background + Încețoșează fundalul + + + + Use on starting + Folosește la începere + + + + Font + Font + + + + Font size + Dimensiunea fontului + + + + + Opacity + Opacitate + + + + Advanced + Avansat + + + + Cursor + Cursor + + + + Scroll + Derulare + + + + Window + Fereastră + + + + Basic + Simplu + + + + Interface + Interfață + + + + Shortcuts + Scurtături + + + + + Others + Altele + + + + + + Terminal + Terminal + + + + Workspace + Spațiu de lucru + + + + + Custom commands + Comandă personalizată + + + + + Display shortcuts + Afișează scurtături + + + + + Remote management + Administrare de la distanță + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + Redenumește titlul + + + + + Fullscreen + Redare ecran complet + + + + + Copy + Copiere + + + + + Default size + DImensiune implicită + + + + + Paste + Lipire + + + + Search + Căutare + + + + + Select all + Selectează totul + + + + Jump to next command + Sari la următoarea comandă + + + + Jump to previous command + Sari la comanda anterioară + + + + + Zoom in + Mărește + + + + + Zoom out + Micșorează + + + + Close other windows + Închide celelalte ferestre + + + + + + Close other workspaces + Închide celelalte spații de lucru + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + Închide fereastra + + + + + + Close workspace + Închide spațiul de lucru + + + + + Horizontal split + Dedublare pe orizontală + + + + + Vertical split + Dedublare pe verticală + + + + + Find + Găsire + + + Cancel + Anulează + + + Delete + Șterge + + + + + + please set another one. + vă rugăm să introduceți altul. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminal este un emulator avansat pentru linia de comandă cu spațiu de lucru, ferestre multiple, control de la distanță, mod „quake” și alte caracteristici. + + + + Tabs + + + + + + Close tab + + + + + Switch focus to "+" icon + + + + + Select tab + + + + + + Select file to upload + Alege fișierul de încărcat + + + + + Upload + Încărcare + + + + Programs are still running in terminal + Încă mai rulează programe în terminal + + + Are you sure you want to exit? + Sunteți sigur că doriți să ieșiți? + + + Exit + Ieşire + + + + + Close this terminal? + Închideți terminalul? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Încă mai rulează un program în acest terminal. Dacă închideți terminalul, acesta va fi oprit. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Încă mai rulează %1 programe în acest terminal. Dacă închideți terminalul, toate acestea vor fi oprite. + + + + + Close this window? + Închideți această fereastră? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Încă mai rulează programe în acest terminal. Dacă închideți terminalul, toate acestea vor fi oprite. + + + + + Select a directory to save the file + Alegeți un directór pentru salvarea fișierului. + + + + Are you sure you want to uninstall it? + Sunteți sigur că doriți să îl dezinstalați? + + + + + Are you sure you want to uninstall this application? + Sunteți sigur că doriți să dezinstalați această aplicație? + + + + + You will not be able to use Terminal any longer. + Nu veți putea să mai utilizați terminalul de acum încolo. + + + Click on Add to make this shortcut effective immediately + Această scurtătură este în conflict cu %1, apăsați pe Adaugă pentru a face această scurtătură valabilă imediat + + + Replace + Înlocuire + + + + Execute a command in the terminal + Execută o comandă în terminal + + + + Run script string in the terminal + Rulează un string script în terminal + + + + Set the work directory + Stabilește directórul de lucru + + + + + OK + button + + + + + Set the window mode on starting + Stabilește modul ferestrei la pornire + + + + Run in quake mode + Rulează în modul Quake + + + + Keep terminal open when command finishes + Păstrează terminalul deschis atunci când comanda termină de rulat + + + + + The name should be no more than 32 characters + Numele nu trebuie să aibă mai mult de 32 de caractere + + + + + + Select + Selectare + + + + Select the private key file + Alege fișierul cu cheia privată + + + Confirm + Confirmare + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + + + + Cancel + button + + + + + Delete + button + Șterge + + + + + Confirm + button + + + + + RemoteManagementPanel + + + Add Server + Adaugă server + + + + RemoteManagementPlugin + + + Remote management + Administrare de la distanță + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Asigurați-vă că comenzile rz și sz au fost instalate pe server înainte de a face clic-dreapta pentru a încărca și descărca fișiere + + + + RemoteManagementSearchPanel + + + Search + Căutare + + + + ServerConfigOptDlg + + + Advanced options + Opțiuni avansate + + + + Add Server + Adaugă server + + + + Server name: + Numele serverului: + + + + + + Required + Necesar + + + + Address: + Adresă: + + + + Port: + Port: + + + + Username: + Nume de utilizator: + + + + Password: + Parolă: + + + + Certificate: + Certificat: + + + + Group: + Grup: + + + + Path: + Cale fișier: + + + + Command: + Comandă: + + + + Encoding: + Încifrare: + + + + Backspace key: + Tasta backspace: + + + + Delete key: + Tasta delete: + + + + Delete server + Șterge server + + + + Cancel + button + + + + + Add + button + Adaugă + + + Cancel + Anulează + + + Add + Adaugă + + + + Edit Server + Modifică server + + + + Save + button + Salvare + + + + + tty + tty + + + + Please enter a server name + Vă rugăm să introduceți un nume de server + + + + Please enter an IP address + Vă rugăm să introduceți o adresă IP + + + + Please enter a port + Vă rugăm să introduceți un port + + + + Please enter a username + Vă rugăm să introduceți un nume de utilizator + + + Save + Salvare + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Numele serverului există deja, + + + + please input another one. + vă rugăm să introduceți un alt nume. + + + + Service + + OK + Ok + + + + OK + button + + + + + Settings + + + Split screen + Dedublare ecran + + + + Fullscreen + Redare ecran complet + + + + Normal window + Fereastră normală + + + + Maximum + Maxim + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Scurtătura %1 este nevalidă, + + + + + + The shortcut %1 was already in use, + Scurtătura %1 este deja în uz, + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermInputDialog + + Cancel + Anulează + + + Confirm + Confirmă + + + + TermWidget + + + Copy + Copiere + + + + Paste + Lipire + + + + Open + Deschide + + + + Open in file manager + Deschidere în managerul de fișiere + + + + + Horizontal split + Dedublare pe orizontală + + + + + Vertical split + Dedublare pe verticală + + + + + New tab + + + + + Exit fullscreen + Ieșire redare ecran complet + + + + Fullscreen + Redare ecran complet + + + + Find + Găsire + + + + Search + Căutare + + + + Encoding + Compresie + + + + Custom commands + Comandă personalizată + + + + Remote management + Administrare de la distanță + + + + Upload file + Încarcă fișierul + + + + Download file + Descarcă fișierul + + + + Settings + Setări + + + + Utils + + Cancel + Anulează + + + Close + Închidere + + + OK + Ok + + + + + Cancel + button + + + + + Close + button + Închidere + + + + + OK + button + + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ru.ts deepin-terminal-5.4.13/translations/deepin-terminal_ru.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_ru.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Имя: + + + + Command: + Команда: + + + + Shortcuts: + Сочетание клавиш: + + + + + + + Required + Необходимо + + + + Add Command + Добавить команду + + + + Edit Command + Редактировать команду + + + + Delete Command + Удалить команду + + + + Cancel + button + Отмена + + + + Add + button + Добавить + + + + Save + button + Сохранить + + + + OK + button + OK + + + + Please enter a name + Пожалуйста, введите название + + + + Please enter a command + Пожалуйста, введите комманду + + + + The name already exists, + Имя уже существует, + + + + please input another one. + пожалуйста, введите другое. + + + + CustomCommandPanel + + + Add Command + Добавить команду + + + + CustomCommandPlugin + + + Custom commands + Пользовательские команды + + + + CustomCommandSearchRstPanel + + + Search + Поиск + + + + CustomThemeSettingDialog + + + Custom Theme + Пользовательская тема + + + + Style: + Стиль: + + + + Light + Светлый + + + + Dark + Темный + + + + Fore color: + Передний цвет: + + + + Back color: + Задний цвет: + + + + Prompt PS1: + Подсказка PS1: + + + + Prompt PS2: + Подсказка PS2: + + + + Cancel + button + Отмена + + + + Confirm + button + Применить + + + + ListView + + + Delete Server + Удалить сервер + + + + + Are you sure you want to delete %1? + Вы уверены, что хотите удалить %1? + + + + MainWindow + + + + New window + Новое окно + + + + Settings + Настройки + + + + Cancel + button + Отмена + + + + Close + button + Закрыть + + + + Type path to download file + Введите путь для загрузки файла + + + + Custom Theme + Пользовательская тема + + + + QObject + + + Copy on select + Копировать при выборе + + + + Cursor blink + Частота мигания курсора + + + + Cursor style + Стиль курсора + + + + Scroll on keystroke + Прокрутка нажатием клавиши + + + + Scroll on output + Прокрутка при выводе + + + + Hide Quake window after losing focus + Скрыть окно Выпадающего Терминала после потери фокуса + + + + + Blur background + Размытие фона + + + + Use on starting + Использовать при запуске + + + + Font + Шрифт + + + + Font size + Размер шрифта + + + + + Opacity + Непрозрачность + + + + Advanced + Дополнительные + + + + Cursor + Курсор + + + + Scroll + Прокрутка + + + + Window + Окно + + + + Basic + Основные + + + + Interface + Интерфейс + + + + Shortcuts + Сочетание клавиш + + + + + Others + Другое + + + + + + Terminal + Терминал + + + + Workspace + Рабочая область + + + + + Custom commands + Пользовательские команды + + + + + Display shortcuts + Показать сочетания клавиш + + + + + Remote management + Удаленное управление + + + + + New tab + Новая вкладка + + + + + Next tab + Следующая вкладка + + + + + Previous tab + Предыдущая вкладка + + + + + Select left workspace + Выбрать левую рабочую область + + + + + Select lower workspace + Выбрать нижнюю рабочую область + + + + + Select right workspace + Выбрать правую рабочую область + + + + + Select upper workspace + Выбрать верхнюю рабочую область + + + + Tab titles + Заголовки вкладок + + + + + Go to tab 1 + Перейти на вкладку 1 + + + + + Go to tab 2 + Перейти на вкладку 2 + + + + + Go to tab 3 + Перейти на вкладку 3 + + + + + Go to tab 4 + Перейти на вкладку 4 + + + + + Go to tab 5 + Перейти на вкладку 5 + + + + + Go to tab 6 + Перейти на вкладку 6 + + + + + Go to tab 7 + Перейти на вкладку 7 + + + + + Go to tab 8 + Перейти на вкладку 8 + + + + + Go to tab 9 + Перейти на вкладку 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Отключить управление потоком с помощью Ctrl+S, Ctrl+Q + + + + Shell profile + Профиль оболочки + + + + + + + Rename title + Переименовать заголовок + + + + + Fullscreen + Полноэкранный режим + + + + + Copy + Копировать + + + + + Default size + Размер по умолчанию + + + + + Paste + Вставить + + + + Search + Поиск + + + + + Select all + Выбрать всё + + + + Jump to next command + Перейти к следующий команде + + + + Jump to previous command + Перейти к предыдущей команде + + + + + Zoom in + Приблизить + + + + + Zoom out + Отдалить + + + + Close other windows + Закрыть другие окна + + + + + + Close other workspaces + Закрыть другие рабочие области + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Не удалось найти "%1", вместо этого начинается "%2". Пожалуйста, проверьте свой профиль оболочки. + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + Не удалось найти "%1", невозможно его запустить + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Вывод был приостановлен нажатием Ctrl+S. Нажмите Ctrl+Q, чтобы продолжить. + + + + Close window + Закрыть окно + + + + + + Close workspace + Закрыть рабочую область + + + + + Horizontal split + Разделить по горизонтали + + + + + Vertical split + Разделить по вертикали + + + + + Find + Найти + + + + + + please set another one. + пожалуйста, установите другой. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Deepin Терминал является передовым эмулятором терминала с рабочими областями, многооконным интерфейсом, удаленным управлением, выпадающим режимом и другими функциями. + + + + Tabs + Вкладки + + + + + Close tab + Закрыть вкладку + + + + Select tab + Выбрать вкладку + + + + Switch focus to "+" icon + Переключить фокус на значок "+" + + + + + Select file to upload + Выберите файл для загрузки + + + + + Upload + Загрузить + + + + Programs are still running in terminal + Программы все еще работают в терминале + + + + + Close this terminal? + Закрыть этот терминал? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + В этом терминале все еще выполняется процесс. Закрытие терминала убьет его. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + В этом терминале все еще выполняется %1 процесса(ов). Закрытие терминала убьет их всех. + + + + + Close this window? + Закрыть это окно? + + + + + There are still processes running in this window. Closing the window will kill all of them. + В этом окне все еще выполняются процессы. Закрытие окна убьет их всех. + + + + + Select a directory to save the file + Выберите каталог для сохранения файла + + + + Are you sure you want to uninstall it? + Вы действительно хотите его удалить? + + + + + Are you sure you want to uninstall this application? + Вы действительно хотите удалить это приложение? + + + + + You will not be able to use Terminal any longer. + Вы больше не сможете использовать Терминал. + + + + + + + Cancel + button + Отмена + + + + + OK + button + OK + + + + Execute a command in the terminal + Выполнить команду в терминале + + + + Run script string in the terminal + Запустить строку скрипта в терминале + + + + Set the work directory + Установить рабочий каталог + + + + Set the window mode on starting + Установить оконный режим при запуске + + + + Run in quake mode + Запуск в выпадающем режиме + + + + Keep terminal open when command finishes + Держать терминал открытым после завершения команды + + + + + The name should be no more than 32 characters + Имя должно быть не более 32 символов. + + + + + + Select + Выбрать + + + + Select the private key file + Выберите файл закрытого ключа + + + + + Tab title format + Формат заголовка вкладки + + + + + Remote tab title format + Формат заголовка удаленной вкладки + + + + + Close other tabs + Закрыть другие вкладки + + + + Delete + button + Удалить + + + + + Confirm + button + Применить + + + + RemoteManagementPanel + + + Add Server + Добавить Сервер + + + + RemoteManagementPlugin + + + Remote management + Удаленное управление + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Убедитесь, что на сервере установлены команды rz и sz, прежде чем щелкнуть правой кнопкой мыши для загрузки и скачивания файлов. + + + + RemoteManagementSearchPanel + + + Search + Поиск + + + + ServerConfigOptDlg + + + Advanced options + Дополнительные опции + + + + Add Server + Добавить Сервер + + + + Server name: + Имя сервера: + + + + + + Required + Необходимо + + + + Address: + Адрес: + + + + Port: + Порт: + + + + Username: + Имя пользователя: + + + + Password: + Пароль: + + + + Certificate: + Сертификат: + + + + Group: + Группа: + + + + Path: + Путь: + + + + Command: + Команда: + + + + Encoding: + Кодировка: + + + + Backspace key: + Клавиша Backspace: + + + + Delete key: + Удалить ключ: + + + + Delete server + Удалить сервер + + + + Cancel + button + Отмена + + + + Add + button + Добавить + + + + Edit Server + Редактировать Сервер + + + + Save + button + Сохранить + + + + + tty + tty + + + + Please enter a server name + Пожалуйста, введите имя сервера + + + + Please enter an IP address + Пожалуйста, введите IP-адрес + + + + Please enter a port + Пожалуйста, введите порт + + + + Please enter a username + Пожалуйста введите имя пользователя + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Имя сервера уже существует, + + + + please input another one. + пожалуйста, введите другое. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Разделенный экран + + + + Fullscreen + Полноэкранный режим + + + + Normal window + Обычное окно + + + + Maximum + Максимум + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Комбинация %1 недействительна, + + + + + + The shortcut %1 was already in use, + Комбинация %1 уже используется, + + + + TabRenameWidget + + + Insert + Вставить + + + + + username: %u + имя пользователя: %u + + + + username@: %U + имя пользователя@: %U + + + + remote host: %h + удаленный узел: %h + + + + + session number: %# + номер сеанса: %# + + + + + title set by shell: %w + заголовок установлен оболочкой: %w + + + + program name: %n + название программы: %n + + + + current directory (short): %d + текущий каталог (короткий): %d + + + + current directory (long): %D + текущий каталог (длинный): %D + + + + local host: %h + локальный хост: %h + + + + TermWidget + + + Copy + Копировать + + + + Paste + Вставить + + + + Open + Открыть + + + + Open in file manager + Открыть в файловом менеджере + + + + + Horizontal split + Разделить по горизонтали + + + + + Vertical split + Разделить по вертикали + + + + + New tab + Новая вкладка + + + + Exit fullscreen + Выйти из полноэкранного режима + + + + Fullscreen + Полноэкранный режим + + + + Find + Найти + + + + Search + Поиск + + + + Encoding + Кодировка + + + + Custom commands + Пользовательские команды + + + + Remote management + Удаленное управление + + + + Upload file + Загрузить файл + + + + Download file + Скачать файл + + + + Settings + Настройки + + + + Utils + + + + Cancel + button + Отмена + + + + Close + button + Закрыть + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_sq.ts deepin-terminal-5.4.13/translations/deepin-terminal_sq.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_sq.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_sq.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Emër: + + + + Command: + Urdhër: + + + + Shortcuts: + Shkurtore: + + + + + + + Required + E domosdoshme + + + + Add Command + Shtoni Urdhër + + + + Edit Command + Përpunoni Urdhër + + + + Delete Command + Fshije Urdhrin + + + + Cancel + button + Anuloje + + + + Add + button + Shtoje + + + + Save + button + Ruaje + + + + OK + button + OK + + + + Please enter a name + Ju lutemi, jepni një emër + + + + Please enter a command + Ju lutemi, jepni një urdhër + + + + The name already exists, + Emri ekziston tashmë, + + + + please input another one. + ju lutemi, jepni një tjetër. + + + + CustomCommandPanel + + + Add Command + Shtoni Urdhër + + + + CustomCommandPlugin + + + Custom commands + Urdhra vetjakë + + + + CustomCommandSearchRstPanel + + + Search + Kërko + + + + CustomThemeSettingDialog + + + Custom Theme + Temë Vetjake + + + + Style: + Stil: + + + + Light + E çelët + + + + Dark + E errët + + + + Fore color: + Ngjyrë përpara: + + + + Back color: + Ngjyrë pas: + + + + Prompt PS1: + Prompt PS1: + + + + Prompt PS2: + Prompt PS2: + + + + Cancel + button + Anuloje + + + + Confirm + button + Ripohojeni + + + + ListView + + + Delete Server + Fshije Shërbyesin + + + + + Are you sure you want to delete %1? + Jeni i sigurt se doni të fshihet %1? + + + + MainWindow + + + + New window + Dritare e re + + + + Settings + Rregullime + + + + Cancel + button + Anuloje + + + + Close + button + Mbylle + + + + Type path to download file + Shtypni shteg për shkarkim kartele + + + + Custom Theme + Temë Vetjake + + + + QObject + + + Copy on select + Kopjo kur përzgjidhet + + + + Cursor blink + Xixëllim kursori + + + + Cursor style + Stil kursori + + + + Scroll on keystroke + + + + + Scroll on output + + + + + Hide Quake window after losing focus + Fshihe dritaren Quake pas humbjes së fokusit + + + + + Blur background + Turbulloje sfondin + + + + Use on starting + Përdore gjatë nisjes + + + + Font + Shkronja + + + + Font size + Madhësi shkronjash + + + + + Opacity + Patejdukshmëri + + + + Advanced + Të mëtejshme + + + + Cursor + Kursor + + + + Scroll + Rrëshqitje + + + + Window + Dritare + + + + Basic + Elementare + + + + Interface + Ndërfaqe + + + + Shortcuts + Shkurtore + + + + + Others + Të tjera + + + + + + Terminal + Terminal + + + + Workspace + Hapësirë Pune + + + + + Custom commands + Urdhra vetjakë + + + + + Display shortcuts + Shfaq shkurtore + + + + + Remote management + Administrim së largëti + + + + + New tab + Skedë e re + + + + + Next tab + Skeda pasuese + + + + + Previous tab + Skeda e mëparshme + + + + + Select left workspace + Përzgjidhni hapësirën e punës majtas + + + + + Select lower workspace + Përzgjidhni hapësirën e poshtme të punës + + + + + Select right workspace + Përzgjidhni hapësirën e punës djathtas + + + + + Select upper workspace + Përzgjidhni hapësirën e sipërme të punës + + + + Tab titles + Tituj skedash + + + + + Go to tab 1 + Shko te skeda 1 + + + + + Go to tab 2 + Kalo te skeda 2 + + + + + Go to tab 3 + Kalo te skeda 3 + + + + + Go to tab 4 + Kalo te skeda 4 + + + + + Go to tab 5 + Kalo te skeda 5 + + + + + Go to tab 6 + Kalo te skeda 6 + + + + + Go to tab 7 + Kalo te skeda 7 + + + + + Go to tab 8 + Kalo te skeda 8 + + + + + Go to tab 9 + Kalo te skeda 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Çaktivizoni kontroll rrjedhe duke përdorur Ctrl+S, Ctrl+Q + + + + Shell profile + Profil shelli + + + + + + + Rename title + Titull riemërtimi + + + + + Fullscreen + Sa krejt ekrani + + + + + Copy + Kopjoje + + + + + Default size + Madhësi parazgjedhje + + + + + Paste + Ngjite + + + + Search + Kërko + + + + + Select all + Përzgjidhi krejt + + + + Jump to next command + Kalo te urdhri pasues + + + + Jump to previous command + Kalo te urdhri i mëparshëm + + + + + Zoom in + Zmadhoje + + + + + Zoom out + Zvogëloje + + + + Close other windows + Mbylli dritaret e tjera + + + + + + Close other workspaces + Mbyll hapësira të tjera pune + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + S’u gjet dot "%1", në vend të tij po niset "%2". Ju lutemi, kontrolloni profilin tuaj për shellin. + + + + Could not open "%1", unable to run it + S’u hap dot "%1", s’arrihet të xhirohet + + + + Could not find "%1", unable to run it + S’u gjet dot "%1", s’arrihet të xhirohet + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Shfaqja e përfundimit është pezulluar nga shtypja e tasteve Ctrl+S. Shtypni Ctrl+Q që të vazhdojë. + + + + Close window + Mbylle dritaren + + + + + + Close workspace + Mbylle hapësirën e punës + + + + + Horizontal split + Ndarje horizontale + + + + + Vertical split + Ndarje vertikale + + + + + Find + Gjej + + + + + + please set another one. + ju lutemi, caktoni një tjetër. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Terminali është një emulues i thelluar terminali, me hapësira pune, dritare të shumta, administrim së largëti, mënyrë Quake dhe veçori të tjera. + + + + Tabs + Skeda + + + + + Close tab + Mbylle skedën + + + + Select tab + Përzgjidhni skedë + + + + Switch focus to "+" icon + Kaloje fokusin te ikona "+" + + + + + Select file to upload + Përzgjidhni kartelë për ngarkim + + + + + Upload + Ngarkim + + + + Programs are still running in terminal + Ka ende programe që xhirojnë në terminal + + + + + Close this terminal? + Të mbyllet ky terminal? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Ka ende një proces që xhiron në këtë terminal. Mbyllja e terminalit do ta asgjësojë. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Ka ende %1 procese që xhirojnë në këtë terminal. Mbyllja e terminalit do t’i asgjësojë krejt ata. + + + + + Close this window? + Të mbyllet dritarja? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Ka ende procese që xhirojnë në këtë dritare. Mbyllja e dritares do t’i asgjësojë krejt ata. + + + + + Select a directory to save the file + Përzgjidhni një drejtori ku të ruhet kartela + + + + Are you sure you want to uninstall it? + Jeni i sigurt se doni të çinstalohet? + + + + + Are you sure you want to uninstall this application? + Jeni i sigurt se doni të çinstalohet ky aplikacion? + + + + + You will not be able to use Terminal any longer. + S’do të jeni më në gjendje të xhironi Terminal-in. + + + + + + + Cancel + button + Anuloje + + + + + OK + button + OK + + + + Execute a command in the terminal + Ekzekutoni një urdhër te terminali + + + + Run script string in the terminal + Xhironi te terminali varg programthi + + + + Set the work directory + Caktoni drejtorinë e punës + + + + Set the window mode on starting + Caktoni mënyrë dritareje kur hapet + + + + Run in quake mode + Xhiroje nën mënyrën dridhje + + + + Keep terminal open when command finishes + Kur urdhri përfundon, mbaje hapur terminalin + + + + + The name should be no more than 32 characters + Emri s’duhet të jetë më tepër se 32 shenja + + + + + + Select + Përzgjidhe + + + + Select the private key file + Përzgjidhni kartelën e kyçit privat + + + + + Tab title format + Format titulli skede + + + + + Remote tab title format + Format titulli skede të largët + + + + + Close other tabs + Mbylli skedat e tjera + + + + Delete + button + Fshije + + + + + Confirm + button + Ripohojeni + + + + RemoteManagementPanel + + + Add Server + Shtoni Shërbyes + + + + RemoteManagementPlugin + + + Remote management + Administrim së largëti + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Përpara se të djathtasklikoni për ngarkim dhe shkarkim kartelash, sigurohuni që urdhrat rz dhe sz janë të instaluar te shërbyesi. + + + + RemoteManagementSearchPanel + + + Search + Kërko + + + + ServerConfigOptDlg + + + Advanced options + Mundësi të mëtejshme + + + + Add Server + Shtoni Shërbyes + + + + Server name: + Emër shërbyesi: + + + + + + Required + E domosdoshme + + + + Address: + Adresë: + + + + Port: + Portë: + + + + Username: + Emër përdoruesi: + + + + Password: + Fjalekalim: + + + + Certificate: + Dëshmi: + + + + Group: + Grup: + + + + Path: + Shteg: + + + + Command: + Urdhër: + + + + Encoding: + Kodim: + + + + Backspace key: + Tasti Backspace: + + + + Delete key: + Fshije tastin: + + + + Delete server + Fshije shërbyesin + + + + Cancel + button + Anuloje + + + + Add + button + Shtoje + + + + Edit Server + Përpunoni Shërbyes + + + + Save + button + Ruaje + + + + + tty + tty + + + + Please enter a server name + Ju lutemi, jepni një emër shërbyesi + + + + Please enter an IP address + Ju lutemi, jepni një adresë IP + + + + Please enter a port + Ju lutemi, jepni një portë + + + + Please enter a username + Ju lutemi, jepni një emër përdoruesi + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Emri i shërbyesit ekziston tashmë, + + + + please input another one. + ju lutemi, jepni një tjetër. + + + + Service + + + OK + button + OK + + + + Settings + + + Split screen + Ndaje ekranin + + + + Fullscreen + Sa krejt ekrani + + + + Normal window + Dritare normale + + + + Maximum + Maksimum + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Shkurtorja %1 është e pavlefshme, + + + + + + The shortcut %1 was already in use, + Shkurtorja %1 është tashmë në përdorim, + + + + TabRenameWidget + + + Insert + Futni + + + + + username: %u + emër përdoruesi: %u + + + + username@: %U + emër_përdoruesi@: %U + + + + remote host: %h + strehë e largët: %h + + + + + session number: %# + numër sesionesh: %# + + + + + title set by shell: %w + titull i caktuar nga shelli: %w + + + + program name: %n + emër programi: %n + + + + current directory (short): %d + drejtoria e tanishme (shkurt): %d + + + + current directory (long): %D + drejtoria e tanishme (gjatë): %D + + + + local host: %h + strehë vendore: %h + + + + TermWidget + + + Copy + Kopjoje + + + + Paste + Ngjite + + + + Open + Hap + + + + Open in file manager + Hape në përgjegjës kartelash + + + + + Horizontal split + Ndarje horizontale + + + + + Vertical split + Ndarje vertikale + + + + + New tab + Skedë e re + + + + Exit fullscreen + Dil nga mënyra sa krejt ekrani + + + + Fullscreen + Sa krejt ekrani + + + + Find + Gjej + + + + Search + Kërko + + + + Encoding + Kodim + + + + Custom commands + Urdhra vetjakë + + + + Remote management + Administrim së largëti + + + + Upload file + Ngarkoni kartelë + + + + Download file + Shkarkoje kartelën + + + + Settings + Rregullime + + + + Utils + + + + Cancel + button + Anuloje + + + + Close + button + Mbylle + + + + + OK + button + OK + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_sr.ts deepin-terminal-5.4.13/translations/deepin-terminal_sr.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_sr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_sr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Име: + + + + Command: + Команда: + + + + Shortcuts: + Пречице: + + + + + + + Required + Неопходно + + + + Add Command + Додај команду + + + + Edit Command + Уреди команду + + + + Delete Command + Обриши команду + + + + Cancel + button + Откажи + + + + Add + button + Додај + + + + Save + button + Сачувај + + + + OK + button + У реду + + + + Please enter a name + Унесите име + + + + Please enter a command + Унесите команду + + + + The name already exists, + Име већ постоји + + + + please input another one. + Унесите друго име. + + + + CustomCommandPanel + + + Add Command + Додај команду + + + + CustomCommandPlugin + + + Custom commands + Прилагођене команде + + + + CustomCommandSearchRstPanel + + + Search + Претражи + + + + CustomThemeSettingDialog + + + Custom Theme + Прилагођена тема + + + + Style: + Стил: + + + + Light + Светла + + + + Dark + Тамна + + + + Fore color: + Боја предњег плана: + + + + Back color: + Боја позадине: + + + + Prompt PS1: + Прозорче PS1: + + + + Prompt PS2: + Прозорче PS2: + + + + Cancel + button + Откажи + + + + Confirm + button + Потврди + + + + ListView + + + Delete Server + Обриши сервер + + + + + Are you sure you want to delete %1? + Заиста желите да обришете %1? + + + + MainWindow + + + + New window + Нови прозор + + + + Settings + Подeшавања + + + + Cancel + button + Откажи + + + + Close + button + Затвори + + + + Type path to download file + Унеси путању за преузимање датотеке + + + + Custom Theme + Прилагођена тема + + + + QObject + + + Copy on select + Копирај при избору + + + + Cursor blink + Трептање показивача + + + + Cursor style + Изглед показивача: + + + + Scroll on keystroke + Клизај притиском на тастер + + + + Scroll on output + Клизај по исписима + + + + Hide Quake window after losing focus + Сакриј спуштајући терминал када није у фокусу + + + + + Blur background + Замућена позадина + + + + Use on starting + Користи при покретању + + + + Font + Фонт + + + + Font size + Величина фонта + + + + + Opacity + Прозирност + + + + Advanced + Напредно + + + + Cursor + Показивач + + + + Scroll + Клизање + + + + Window + Прозор + + + + Basic + Основно + + + + Interface + Сучеље + + + + Shortcuts + Пречице + + + + + Others + Остало + + + + + + Terminal + Терминал + + + + Workspace + Радни простор + + + + + Custom commands + Прилагођене команде + + + + + Display shortcuts + Прикажи пречице + + + + + Remote management + Даљинско управљање + + + + + New tab + Нова картица + + + + + Next tab + Следећа картица + + + + + Previous tab + Претходна картица + + + + + Select left workspace + Изабери леви радни простор + + + + + Select lower workspace + Изабери доњи радни простор + + + + + Select right workspace + Изабери десни радни простор + + + + + Select upper workspace + Изабери горњи радни простор + + + + Tab titles + Наслов картице + + + + + Go to tab 1 + Иди на картицу 1 + + + + + Go to tab 2 + Иди на картицу 2 + + + + + Go to tab 3 + Иди на картицу 3 + + + + + Go to tab 4 + Иди на картицу 4 + + + + + Go to tab 5 + Иди на картицу 5 + + + + + Go to tab 6 + Иди на картицу 6 + + + + + Go to tab 7 + Иди на картицу 7 + + + + + Go to tab 8 + Иди на картицу 8 + + + + + Go to tab 9 + Иди на картицу 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Управљај протицањем користећи Ctrl+S, Ctrl+Q + + + + Shell profile + Профил љуске + + + + + + + Rename title + Промени наслов + + + + + Fullscreen + Цео екран + + + + + Copy + Копирај + + + + + Default size + Подразумевана величина + + + + + Paste + Убаци + + + + Search + Претражи + + + + + Select all + Изабери све + + + + Jump to next command + Иди на следећу команду + + + + Jump to previous command + Иди на претходну команду + + + + + Zoom in + Увеличај + + + + + Zoom out + Умањи + + + + Close other windows + Затвори остале прозоре + + + + + + Close other workspaces + Затвори остале радне просторе + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Није пронађено "%1", уместо тога покрећем "%2". Проверите ваш профил љуске. + + + + Could not open "%1", unable to run it + Не могу да отворим "%1", покретање није могуће + + + + Could not find "%1", unable to run it + Није пронађено "%1", покретање није могуће + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Испис је обустављен притиском на Ctrl+S. Притисни Ctrl+Q за наставак. + + + + Close window + Затвори прозор + + + + + + Close workspace + Затвори радни простор + + + + + Horizontal split + Хоризонтална подела + + + + + Vertical split + Вертикална подела + + + + + Find + Пронађи + + + + + + please set another one. + молимо поставите другу + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Терминал је напредни емулатор терминала са дељивим прозорима, радним просторима, даљинским управљањем, спуштајућим режимом и другим функцијама. + + + + Tabs + Картице + + + + + Close tab + Затвори картице + + + + Select tab + Изабери картице + + + + Switch focus to "+" icon + Пребаци фокус на "+" иконицу + + + + + Select file to upload + Изабери датотеку за отпремање + + + + + Upload + Отпреми + + + + Programs are still running in terminal + Програми још раде у терминалу + + + + + Close this terminal? + Затворити овај терминал? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Процес још ради у овом терминалу. Затварање терминала ће га убити. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + У овом терминалу ради %1 процеса. Затварање терминала ће их убити. + + + + + Close this window? + Затворити овај прозор? + + + + + There are still processes running in this window. Closing the window will kill all of them. + У овом прозору још раде процеси. Затварање прозора ће их убити. + + + + + Select a directory to save the file + Изабери директоријум за чување датотеке + + + + Are you sure you want to uninstall it? + Заиста желите да уклоните? + + + + + Are you sure you want to uninstall this application? + Заиста желите да уклоните овај програм? + + + + + You will not be able to use Terminal any longer. + Више нећете моћи да користите терминал. + + + + + + + Cancel + button + Откажи + + + + + OK + button + У реду + + + + Execute a command in the terminal + Изврши команду у терминалу + + + + Run script string in the terminal + Покрени скрипту у терминалу + + + + Set the work directory + Постави радни директоријум + + + + Set the window mode on starting + Подеси режим прозора при покретању + + + + Run in quake mode + Покрени спуштајући режим + + + + Keep terminal open when command finishes + Остави терминал отворен када је команда извршена + + + + + The name should be no more than 32 characters + Име не треба бити дуже од 32 карактера + + + + + + Select + Изабери + + + + Select the private key file + Изабери датотеку са приватним кључем + + + + + Tab title format + Формат наслова картице + + + + + Remote tab title format + Формат наслова удаљене картице + + + + + Close other tabs + Затвори остале картице + + + + Delete + button + Обриши + + + + + Confirm + button + Потврди + + + + RemoteManagementPanel + + + Add Server + Додај сервер + + + + RemoteManagementPlugin + + + Remote management + Даљинско управљање + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Уверите се да су rz и sz команде инсталиране на серверу пре коришћења десног клика за преузимање и отпремање датотека. + + + + RemoteManagementSearchPanel + + + Search + Претражи + + + + ServerConfigOptDlg + + + Advanced options + Напредне опције + + + + Add Server + Додај сервер + + + + Server name: + Име сервера: + + + + + + Required + Неопходно + + + + Address: + Адреса: + + + + Port: + Прикључак: + + + + Username: + Корисничко име: + + + + Password: + Лозинка: + + + + Certificate: + Сертификат: + + + + Group: + Група: + + + + Path: + Путања: + + + + Command: + Команда: + + + + Encoding: + Кодирање: + + + + Backspace key: + Backspace тастер: + + + + Delete key: + Delete тастер: + + + + Delete server + Обриши сервер + + + + Cancel + button + Откажи + + + + Add + button + Додај + + + + Edit Server + Уреди сервер + + + + Save + button + Сачувај + + + + + tty + tty + + + + Please enter a server name + Унесите име сервера + + + + Please enter an IP address + Унесите ИП адресу + + + + Please enter a port + Унесите прикључак + + + + Please enter a username + Унесите корисничко име + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Име сервера већ постоји, + + + + please input another one. + Унесите друго име. + + + + Service + + + OK + button + У реду + + + + Settings + + + Split screen + Подели екран + + + + Fullscreen + Цео екран + + + + Normal window + Нормалан прозор + + + + Maximum + Максимум + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Пречица %1 је неважећа, + + + + + + The shortcut %1 was already in use, + Пречица %1 је била већ у употреби, + + + + TabRenameWidget + + + Insert + Уметни + + + + + username: %u + корисничко име: %u + + + + username@: %U + корисничко име@: %U + + + + remote host: %h + удаљени домаћин: %h + + + + + session number: %# + број сесије: %# + + + + + title set by shell: %w + нслов задат од стране љуске: %w + + + + program name: %n + име програма: %n + + + + current directory (short): %d + тренутни директоријум (кратко): %d + + + + current directory (long): %D + тренутни директоријум (дугачко): %D + + + + local host: %h + локални домаћин: %h + + + + TermWidget + + + Copy + Копирај + + + + Paste + Убаци + + + + Open + Покрени + + + + Open in file manager + Отвори у управнику података + + + + + Horizontal split + Хоризонтална подела + + + + + Vertical split + Вертикална подела + + + + + New tab + Нова картица + + + + Exit fullscreen + Напусти цео екран + + + + Fullscreen + Цео екран + + + + Find + Пронађи + + + + Search + Претражи + + + + Encoding + Кодирање + + + + Custom commands + Прилагођене команде + + + + Remote management + Даљинско управљање + + + + Upload file + Отпреми датотеку + + + + Download file + Преузми датотеку + + + + Settings + Подeшавања + + + + Utils + + + + Cancel + button + Откажи + + + + Close + button + Затвори + + + + + OK + button + У реду + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_tr.ts deepin-terminal-5.4.13/translations/deepin-terminal_tr.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_tr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_tr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Ad: + + + + Command: + Komut: + + + + Shortcuts: + Kısayollar: + + + + + + + Required + Gerekli + + + + Add Command + Komut Ekle + + + + Edit Command + Komut Düzenle + + + + Delete Command + Komut Sil + + + + Cancel + button + İptal + + + + Add + button + Ekle + + + + Save + button + Kaydet + + + + OK + button + Tamam + + + + Please enter a name + Lütfen bir ad gir + + + + Please enter a command + Lütfen bir komut gir + + + + The name already exists, + İsim zaten var, + + + + please input another one. + lütfen başka bir tane gir. + + + + CustomCommandPanel + + + Add Command + Komut Ekle + + + + CustomCommandPlugin + + + Custom commands + Özel komutlar + + + + CustomCommandSearchRstPanel + + + Search + Ara + + + + CustomThemeSettingDialog + + + Custom Theme + Özel Tema + + + + Style: + Stil: + + + + Light + Açık + + + + Dark + Koyu + + + + Fore color: + Ön renk: + + + + Back color: + Zemin rengi: + + + + Prompt PS1: + Komut İstemi PS1: + + + + Prompt PS2: + Komut İstemi PS2: + + + + Cancel + button + İptal + + + + Confirm + button + Onayla + + + + ListView + + + Delete Server + Sunucuyu Sil + + + + + Are you sure you want to delete %1? + %1 ögesini silmek istediğinize emin misiniz? + + + + MainWindow + + + + New window + Yeni pencere + + + + Settings + Ayarlar + + + + Cancel + button + İptal + + + + Close + button + Kapat + + + + Type path to download file + Dosyanın indirileceği yolu yazın + + + + Custom Theme + Özel Tema + + + + QObject + + + Copy on select + Seçileni kopyala + + + + Cursor blink + İmleç yanıp sönmesi + + + + Cursor style + İmleç şekli + + + + Scroll on keystroke + Tuşa basıldığında kaydır + + + + Scroll on output + Çıkışta kaydır + + + + Hide Quake window after losing focus + Odakta olmadığında Quake penceresi gizle + + + + + Blur background + Arkaplanı bulanıklaştır + + + + Use on starting + Başlangıçta kullan + + + + Font + Yazı tipi + + + + Font size + Yazı tipi boyutu + + + + + Opacity + Saydamlık + + + + Advanced + Gelişmiş + + + + Cursor + İmleç + + + + Scroll + Kaydırma + + + + Window + Pencere + + + + Basic + Temel + + + + Interface + Arayüz + + + + Shortcuts + Kısayollar + + + + + Others + Diğerleri + + + + + + Terminal + Uçbirim + + + + Workspace + Çalışma alanı + + + + + Custom commands + Özel komutlar + + + + + Display shortcuts + Kısayolları görüntüle + + + + + Remote management + Uzaktan yönetim + + + + + New tab + Yeni sekme + + + + + Next tab + Sonraki sekme + + + + + Previous tab + Önceki sekme + + + + + Select left workspace + Sol çalışma alanını seç + + + + + Select lower workspace + Alt çalışma alanını seç + + + + + Select right workspace + Sağ çalışma alanını seç + + + + + Select upper workspace + Üst çalışma alanını seç + + + + Tab titles + Sekme başlıkları + + + + + Go to tab 1 + 1. sekmeye git + + + + + Go to tab 2 + 2. sekmeye git + + + + + Go to tab 3 + 3. sekmeye git + + + + + Go to tab 4 + 4. sekmeye git + + + + + Go to tab 5 + 5. sekmeye git + + + + + Go to tab 6 + 6. sekmeye git + + + + + Go to tab 7 + 7. sekmeye git + + + + + Go to tab 8 + 8. sekmeye git + + + + + Go to tab 9 + 9. sekmeye git + + + + Disable flow control using Ctrl+S, Ctrl+Q + Ctrl+S, Ctrl+Q kullanarak akış kontrolünü devre dışı bırakın + + + + Shell profile + Kabuk profili + + + + + + + Rename title + Başlığı yeniden adlandır + + + + + Fullscreen + Tam ekran + + + + + Copy + Kopyala + + + + + Default size + Varsayılan boyut + + + + + Paste + Yapıştır + + + + Search + Ara + + + + + Select all + Tümünü seç + + + + Jump to next command + Sonraki komuta atla + + + + Jump to previous command + Önceki komuta atla + + + + + Zoom in + Yakınlıştır + + + + + Zoom out + Uzaklaştır + + + + Close other windows + Diğer pencereleri kapat + + + + + + Close other workspaces + Diğer çalışma alanlarını kapat + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Onun yerine "%2" başlayarak "%1" bulunamadı. Lütfen kabuk profilinizi kontrol edin. + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + "%1" bulunamadı, çalıştırılamıyor + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Çıkış, Ctrl+S tuşlarına basılarak askıya alındı. Devam etmek için Ctrl+Q tuşlarına basın. + + + + Close window + Pencereyi kapat + + + + + + Close workspace + Çalışma alanını kapat + + + + + Horizontal split + Yatay böl + + + + + Vertical split + Dikey böl + + + + + Find + Bul + + + + + + please set another one. + lütfen başka bir tane ayarla. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Uçbirim, çalışma alanı, çoklu pencere, uzaktan yönetim, hızlı kip ve diğer özelliklere sahip gelişmiş uçbirim emülatörüdür. + + + + Tabs + Sekmeler + + + + + Close tab + Sekmeyi kapat + + + + Select tab + Sekme seç + + + + Switch focus to "+" icon + Odağı "+" simgesine getirin + + + + + Select file to upload + Yüklenecek dosyayı seç + + + + + Upload + Yükle + + + + Programs are still running in terminal + Uçbirimde hala çalışan programlar var + + + + + Close this terminal? + Bu uçbirim kapatılsın mı? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + Bu uçbirimde hala çalışan bir işlem var. Uçbirimin kapatılması işlemi öldürür. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + Bu uçbirimde hala %1 işlem çalışıyor. Uçbirimin kapatılması tüm işlemleri öldürür. + + + + + Close this window? + Bu pencereyi kapat? + + + + + There are still processes running in this window. Closing the window will kill all of them. + Bu pencerede hala çalışan işlemler var. Pencereyi kapatmak tümünü öldürecektir. + + + + + Select a directory to save the file + Dosyayı kaydetmek için bir dizin seç + + + + Are you sure you want to uninstall it? + Kaldırmak istediğinizden emin misiniz? + + + + + Are you sure you want to uninstall this application? + Bu uygulamayı kaldırmak istediğinizden emin misiniz? + + + + + You will not be able to use Terminal any longer. + Artık Uçbirimi kullanamayacaksınız. + + + + + + + Cancel + button + İptal + + + + + OK + button + Tamam + + + + Execute a command in the terminal + Uçbirimde bir komut yürüt + + + + Run script string in the terminal + Uçbirimde kod dizesini çalıştır + + + + Set the work directory + Çalışma dizinini ayarla + + + + Set the window mode on starting + Başlangıçta pencere kipini ayarla + + + + Run in quake mode + Quake kipinde çalıştır + + + + Keep terminal open when command finishes + Komut bittiğinde uçbirimi açık tut + + + + + The name should be no more than 32 characters + İsim 32 karakterden fazla olmamalıdır + + + + + + Select + Seç + + + + Select the private key file + Özel anahtar dosyasını seç + + + + + Tab title format + Sekme başlık biçimi + + + + + Remote tab title format + Sekme başlık biçimini kaldır + + + + + Close other tabs + Diğer sekmeleri kapat + + + + Delete + button + Sil + + + + + Confirm + button + Onayla + + + + RemoteManagementPanel + + + Add Server + Sunucu Ekle + + + + RemoteManagementPlugin + + + Remote management + Uzaktan yönetim + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Dosyaları yüklemek ve indirmek için sağ tıklamadan önce sunucuda rz ve sz komutlarının yüklendiğinden emin olun. + + + + RemoteManagementSearchPanel + + + Search + Ara + + + + ServerConfigOptDlg + + + Advanced options + Gelişmiş seçenekler + + + + Add Server + Sunucu Ekle + + + + Server name: + Sunucu adı: + + + + + + Required + Gerekli + + + + Address: + Adres: + + + + Port: + Port: + + + + Username: + Kullanıcı adı: + + + + Password: + Parola: + + + + Certificate: + Sertifika: + + + + Group: + Grup: + + + + Path: + Yol: + + + + Command: + Komut: + + + + Encoding: + Kodlama: + + + + Backspace key: + Geriye silme tuşu: + + + + Delete key: + Anahtarı sil: + + + + Delete server + Sunucuyu sil + + + + Cancel + button + İptal + + + + Add + button + Ekle + + + + Edit Server + Sunucuyu Düzenle + + + + Save + button + Kaydet + + + + + tty + tty + + + + Please enter a server name + Lütfen bir sunucu adı gir + + + + Please enter an IP address + Lütfen bir IP adresi gir + + + + Please enter a port + Lütfen bir port gir + + + + Please enter a username + Lütfen bir kullanıcı adı gir + + + + + ascii-del + ascii-del + + + + + auto + otomatik + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Sunucu adı zaten var, + + + + please input another one. + lütfen başka bir tane gir. + + + + Service + + + OK + button + Tamam + + + + Settings + + + Split screen + Bölünmüş ekran + + + + Fullscreen + Tam ekran + + + + Normal window + Normal pencere + + + + Maximum + Azami + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1 kısayolu geçersiz, + + + + + + The shortcut %1 was already in use, + %1 kısayolu zaten kullanımdaydı, + + + + TabRenameWidget + + + Insert + Ekle + + + + + username: %u + kullanıcı adı: %u + + + + username@: %U + kullanıcıadı@: %U + + + + remote host: %h + uzak makineyi kaldır: %h + + + + + session number: %# + oturum numarası: %# + + + + + title set by shell: %w + kabuğun belirlediği başlık: %w + + + + program name: %n + program adı: %n + + + + current directory (short): %d + mevcut dizin (kısa): %d + + + + current directory (long): %D + mevcut dizin (uzun): %D + + + + local host: %h + yerel makine: %h + + + + TermWidget + + + Copy + Kopyala + + + + Paste + Yapıştır + + + + Open + + + + + Open in file manager + Dosya yöneticisinde aç + + + + + Horizontal split + Yatay böl + + + + + Vertical split + Dikey böl + + + + + New tab + Yeni sekme + + + + Exit fullscreen + Tam ekrandan çık + + + + Fullscreen + Tam ekran + + + + Find + Bul + + + + Search + Ara + + + + Encoding + Kodlama + + + + Custom commands + Özel komutlar + + + + Remote management + Uzaktan yönetim + + + + Upload file + Dosya yükle + + + + Download file + Dosya indir + + + + Settings + Ayarlar + + + + Utils + + + + Cancel + button + İptal + + + + Close + button + Kapat + + + + + OK + button + Tamam + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal.ts deepin-terminal-5.4.13/translations/deepin-terminal.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1200 @@ + + + + + CustomCommandOptDlg + + + Name: + + + + + Command: + + + + + Shortcuts: + + + + + + + + Required + + + + + Add Command + + + + + Edit Command + + + + + Delete Command + + + + + Cancel + button + + + + + Add + button + + + + + Save + button + + + + + OK + button + + + + + Please enter a name + + + + + Please enter a command + + + + + The name already exists, + + + + + please input another one. + + + + + CustomCommandPanel + + + Add Command + + + + + CustomCommandPlugin + + + Custom commands + + + + + CustomCommandSearchRstPanel + + + Search + + + + + CustomThemeSettingDialog + + + Custom Theme + + + + + Style: + + + + + Light + + + + + Dark + + + + + Fore color: + + + + + Back color: + + + + + Prompt PS1: + + + + + Prompt PS2: + + + + + Cancel + button + + + + + Confirm + button + + + + + ListView + + + Delete Server + + + + + + Are you sure you want to delete %1? + + + + + MainWindow + + + + New window + + + + + Settings + + + + + Cancel + button + + + + + Close + button + + + + + Type path to download file + + + + + Custom Theme + + + + + QObject + + + Copy on select + + + + + Cursor blink + + + + + Cursor style + + + + + Scroll on keystroke + + + + + Scroll on output + + + + + Hide Quake window after losing focus + + + + + + Blur background + + + + + Use on starting + + + + + Font + + + + + Font size + + + + + + Opacity + + + + + Advanced + + + + + Cursor + + + + + Scroll + + + + + Window + + + + + Basic + + + + + Interface + + + + + Shortcuts + + + + + + Others + + + + + + + Terminal + + + + + Workspace + + + + + + Custom commands + + + + + + Display shortcuts + + + + + + Remote management + + + + + + New tab + + + + + + Next tab + + + + + + Previous tab + + + + + + Select left workspace + + + + + + Select lower workspace + + + + + + Select right workspace + + + + + + Select upper workspace + + + + + Tab titles + + + + + + Go to tab 1 + + + + + + Go to tab 2 + + + + + + Go to tab 3 + + + + + + Go to tab 4 + + + + + + Go to tab 5 + + + + + + Go to tab 6 + + + + + + Go to tab 7 + + + + + + Go to tab 8 + + + + + + Go to tab 9 + + + + + Disable flow control using Ctrl+S, Ctrl+Q + + + + + Shell profile + + + + + + + + Rename title + + + + + + Fullscreen + + + + + + Copy + + + + + + Default size + + + + + + Paste + + + + + Search + + + + + + Select all + + + + + Jump to next command + + + + + Jump to previous command + + + + + + Zoom in + + + + + + Zoom out + + + + + Close other windows + + + + + + + Close other workspaces + + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + + + + + Could not open "%1", unable to run it + + + + + Could not find "%1", unable to run it + + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + + + + + Close window + + + + + + + Close workspace + + + + + + Horizontal split + + + + + + Vertical split + + + + + + Find + + + + + + + please set another one. + + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + + + + + Tabs + + + + + + Close tab + + + + + Select tab + + + + + Switch focus to "+" icon + + + + + + Select file to upload + + + + + + Upload + + + + + Programs are still running in terminal + + + + + + Close this terminal? + + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + + + + + + Close this window? + + + + + + There are still processes running in this window. Closing the window will kill all of them. + + + + + + Select a directory to save the file + + + + + Are you sure you want to uninstall it? + + + + + + Are you sure you want to uninstall this application? + + + + + + You will not be able to use Terminal any longer. + + + + + + + + Cancel + button + + + + + + OK + button + + + + + Execute a command in the terminal + + + + + Run script string in the terminal + + + + + Set the work directory + + + + + Set the window mode on starting + + + + + Run in quake mode + + + + + Keep terminal open when command finishes + + + + + + The name should be no more than 32 characters + + + + + + + Select + + + + + Select the private key file + + + + + + Tab title format + + + + + + Remote tab title format + + + + + + Close other tabs + + + + + Delete + button + + + + + + Confirm + button + + + + + RemoteManagementPanel + + + Add Server + + + + + RemoteManagementPlugin + + + Remote management + + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + + + + + RemoteManagementSearchPanel + + + Search + + + + + ServerConfigOptDlg + + + Advanced options + + + + + Add Server + + + + + Server name: + + + + + + + Required + + + + + Address: + + + + + Port: + + + + + Username: + + + + + Password: + + + + + Certificate: + + + + + Group: + + + + + Path: + + + + + Command: + + + + + Encoding: + + + + + Backspace key: + + + + + Delete key: + + + + + Delete server + + + + + Cancel + button + + + + + Add + button + + + + + Edit Server + + + + + Save + button + + + + + + tty + + + + + Please enter a server name + + + + + Please enter an IP address + + + + + Please enter a port + + + + + Please enter a username + + + + + + ascii-del + + + + + + auto + + + + + + control-h + + + + + + escape-sequence + + + + + The server name already exists, + + + + + please input another one. + + + + + Service + + + OK + button + + + + + Settings + + + Split screen + + + + + Fullscreen + + + + + Normal window + + + + + Maximum + + + + + ShortcutManager + + + + The shortcut %1 is invalid, + + + + + + + The shortcut %1 was already in use, + + + + + TabRenameWidget + + + Insert + + + + + + username: %u + + + + + username@: %U + + + + + remote host: %h + + + + + + session number: %# + + + + + + title set by shell: %w + + + + + program name: %n + + + + + current directory (short): %d + + + + + current directory (long): %D + + + + + local host: %h + + + + + TermWidget + + + Copy + + + + + Paste + + + + + Open + + + + + Open in file manager + + + + + + Horizontal split + + + + + + Vertical split + + + + + + New tab + + + + + Exit fullscreen + + + + + Fullscreen + + + + + Find + + + + + Search + + + + + Encoding + + + + + Custom commands + + + + + Remote management + + + + + Upload file + + + + + Download file + + + + + Settings + + + + + Utils + + + + Cancel + button + + + + + Close + button + + + + + + OK + button + + + + diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ug.ts deepin-terminal-5.4.13/translations/deepin-terminal_ug.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_ug.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_ug.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + نامى: + + + + Command: + بۇيرۇق: + + + + Shortcuts: + تېزلەتمە كۇنۇپكىلار: + + + + + + + Required + زۆرۈر + + + + Add Command + بۇيرۇق قوشۇش + + + + Edit Command + بۇيرۇقنى تەھرىرلەش + + + + Delete Command + بۇيرۇقنى ئۆچۈرۈش + + + + Cancel + button + بىكار قىلىش + + + + Add + button + قوشۇش + + + + Save + button + ساقلاش + + + + OK + button + جەزىملەشتۈرۈش + + + + Please enter a name + نامىنى كىرگۈزۈڭ + + + + Please enter a command + بۇيرۇقنى كىرگۈزۈڭ + + + + The name already exists, + بۇ نام مەۋجۇت + + + + please input another one. + قايتا كىرگۈزۈڭ + + + + CustomCommandPanel + + + Add Command + بۇيرۇق قوشۇش + + + + CustomCommandPlugin + + + Custom commands + بۇيرۇق بەلگىلەش + + + + CustomCommandSearchRstPanel + + + Search + ئىزدەش + + + + CustomThemeSettingDialog + + + Custom Theme + ئۇسلۇب بەلگىلەش + + + + Style: + ئۇسلۇب خاسلىقى: + + + + Light + سۇس رەڭ + + + + Dark + قېنىق رەڭ + + + + Fore color: + ئالدى تەگلىك رەڭگى: + + + + Back color: + كەينى تەگلىك رەڭگى: + + + + Prompt PS1: + ئەسكەرتىش بەلگىسىPS1: + + + + Prompt PS2: + ئەسكەرتىش بەلگىسىPS2: + + + + Cancel + button + بىكار قىلىش + + + + Confirm + button + جەزملەشتۈرۈش + + + + ListView + + + Delete Server + مۇلازىمىتېرنى ئۆچۈرۈش + + + + + Are you sure you want to delete %1? + %1 نى ئۆچۈرمەكچىمۇ؟ + + + + MainWindow + + + + New window + يېڭىدىن كۆزنەك قۇرۇش + + + + Settings + تەڭشەك + + + + Cancel + button + بىكار قىلىش + + + + Close + button + تاقاش + + + + Type path to download file + ھۆججەت ئورنىنى كىرگۈزۈڭ + + + + Custom Theme + ئۇسلۇب بەلگىلەش + + + + QObject + + + Copy on select + تېكىست تاللانغاندا چاپلاش تاختىسىغا ئاپتوماتىك كۆچۈرۈلىدۇ + + + + Cursor blink + نۇر بەلگىسى كۆزنى چاقنىسۇن + + + + Cursor style + نۇر بەلگىسى ئۇسلۇبى + + + + Scroll on keystroke + كۇنۇپكا بېسىلغاندا سىيرىلسۇن + + + + Scroll on output + چىقارغاندا سىيرىلسۇن + + + + Hide Quake window after losing focus + فوكۇسنى يوقاتقاندىن كېيىن Quake كۆزنىكىنى يوشۇرسۇن + + + + + Blur background + ئارقا كۆرۈنۈش غۇۋا + + + + Use on starting + قوزغالغاندا ئىشلىتىش + + + + Font + خەت نۇسخىسى + + + + Font size + خەت شەكلى چوڭلۇقى + + + + + Opacity + سۈزۈكلۈكى + + + + Advanced + ئالىي + + + + Cursor + نۇر بەلگە + + + + Scroll + سىيرىلىش + + + + Window + كۆزنەك + + + + Basic + ئاساسىي ئۇچۇر + + + + Interface + ئۇلىنىش ئېغىزى + + + + Shortcuts + تىزلەتمە كۇنۇپكىلار + + + + + Others + باشقىلار + + + + + + Terminal + تېرمىنال + + + + Workspace + خىزمەت رايونى + + + + + Custom commands + بۇيرۇق بەلگىلەش + + + + + Display shortcuts + تېزلەتمە كۆرسىتىش + + + + + Remote management + يىراقتىن باشقۇرۇش + + + + + New tab + يېڭى بەتكۈچ قۇرۇش + + + + + Next tab + كېيىنكى بەتكۈچ + + + + + Previous tab + ئالدىنقى بەتكۈچ + + + + + Select left workspace + سولدىكى خىزمەت رايونىنى تاللاش + + + + + Select lower workspace + ئاستىدىكى خىزمەت رايونىنى تاللاش + + + + + Select right workspace + ئوڭدىكى خىزمەت رايونىنى تاللاش + + + + + Select upper workspace + ئۈستىدىكى خىزمەت رايونىنى تاللاش + + + + Tab titles + بەتكۈچ نامى + + + + + Go to tab 1 + بەتكۈچ 1 گە ئالماشتۇرۇش + + + + + Go to tab 2 + بەتكۈچ 2 گە ئالماشتۇرۇش + + + + + Go to tab 3 + بەتكۈچ 3 كە ئالماشتۇرۇش + + + + + Go to tab 4 + بەتكۈچ 4 كە ئالماشتۇرۇش + + + + + Go to tab 5 + بەتكۈچ 5 كە ئالماشتۇرۇش + + + + + Go to tab 6 + بەتكۈچ 6 گە ئالماشتۇرۇش + + + + + Go to tab 7 + بەتكۈچ 7 گە ئالماشتۇرۇش + + + + + Go to tab 8 + بەتكۈچ 8 گە ئالماشتۇرۇش + + + + + Go to tab 9 + بەتكۈچ 9 غا ئالماشتۇرۇش + + + + Disable flow control using Ctrl+S, Ctrl+Q + Ctrl+S ۋە Ctrl+Q بىلەن كونتروللاشنى چەكلەش + + + + Shell profile + Shell سەپلەش + + + + + + + Rename title + تېمىغا قايتا نام قويۇش + + + + + Fullscreen + تولۇق ئېكران + + + + + Copy + كۆچۈرۈش + + + + + Default size + سۈكۈتتىكى سىغىمى + + + + + Paste + چاپلاش + + + + Search + ئىزدەش + + + + + Select all + ھەممىنى تاللاش + + + + Jump to next command + كېيىنكىسى + + + + Jump to previous command + ئالدىنقىسى + + + + + Zoom in + چوڭايتىش + + + + + Zoom out + كىچىكلىتىش + + + + Close other windows + باشقا كۆزنەكلەرنى تاقاش + + + + + + Close other workspaces + باشقا خىزمەت رايونىنى تاقاش + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + «%1”تېپىلمىغاچقا «%2» ئۇنىڭ ئورنىغا قوزغىتىلدى، Shell سەپلىمىسىنى تەكشۈرۈڭ. + + + + Could not open "%1", unable to run it + «%1”» ئېچىلمىدى، نورمال ئىشلەتكى بولمايدۇ + + + + Could not find "%1", unable to run it + «%1”» تېپىلمىدى، نورمال ئىشلەتكى بولمايدۇ + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Ctrl+S نى بېسىپ بولدىڭىز، چىقىرىش توختىتىلدى. Ctrl+Q نى بېسىپ داۋاملاشتۇرۇڭ + + + + Close window + كۆزنەكنى تاقاش + + + + + + Close workspace + خىزمەت رايونىنى تاقاش + + + + + Horizontal split + ئېكراننى توغرىسىغا بۆلۈش + + + + + Vertical split + تىك ھالەتتە ئېكراننى بۆلۈش + + + + + Find + ئىزدەش + + + + + + please set another one. + قايتا تەڭشەش + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + تېرمىنال بىر گەۋدىلەشتۈرۈلگەن خىزمەت رايونى، كۆپ كۆزنەك، يىراقتىن باشقۇرۇش ۋە quake ھالىتى قاتارلىق ئىقتىدارلىرى بار ئىلغار تېرمىنال تەقلىدلىگۈچىسى. + + + + Tabs + بەتكۈچ + + + + + Close tab + بەتكۈچنى تاقاش + + + + Select tab + بەتكۈچنى تاللاش + + + + Switch focus to "+" icon + فوكۇسنى «+» سىنبەلگىسىگە ئالماشتۇرۇش + + + + + Select file to upload + يوللىماقچى بولغان ھۆججەتنى تاللاڭ + + + + + Upload + يوللاش + + + + Programs are still running in terminal + تېرمىنالدا يەنىلا پروگراممىلار ئىجرا بولۇۋاتىدۇ + + + + + Close this terminal? + تېرمىنالنى تاقامسىز؟ + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + تېرمىنالدا يەنىلا 1 پىروگرامما ئىجرا بولۇۋاتىدۇ، تېرمىنالنى تاقىسىڭىز بۇ پىروگراممىمۇ تاقىلىدۇ. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + تېرمىنالدا يەنىلا %1 پىروگرامما ئىجرا بولۇۋاتىدۇ، تېرمىنالنى تاقىسىڭىز بۇ پىروگراممىمۇ تاقىلىدۇ. + + + + + Close this window? + بۇ كۆزنەكنى تاقامسىز؟ + + + + + There are still processes running in this window. Closing the window will kill all of them. + كۆزنەكتىكى بەزى تېرمىناللاردا يەنىلا پىروگرامما ئىجرا بولۇۋاتىدۇ. كۆزنەكنى تاقاش بارلىق پىروگراممىلارنى يوقىتىدۇ. + + + + + Select a directory to save the file + چۈشۈرۈلگەن ھۆججەتنى ساقلاش ئۈچۈن مۇندەرىجىنى تاللاڭ + + + + Are you sure you want to uninstall it? + راستلا ئۆچۈرەمسىز؟ + + + + + Are you sure you want to uninstall this application? + تېرمىنالنى راستلا ئۆچۈرەمسىز؟ + + + + + You will not be able to use Terminal any longer. + ئۆچۈرسىڭىز بۇ ئىقتىدارنى ئىشلىتەلمەيسىز. + + + + + + + Cancel + button + بىكار قىلىش + + + + + OK + button + جەزىملەشتۈرۈش + + + + Execute a command in the terminal + تېرمىنالدا پىروگرامما ئىجرا قىلىڭ + + + + Run script string in the terminal + تېرمىنالدا قوليازما تىزىمىغا يول قويۇڭ + + + + Set the work directory + تېرمىنالنىڭ قوزغىلىش مۇندەرىجىسىنى تەڭشەڭ + + + + Set the window mode on starting + تېرمىنالنىڭ ئېچىلىش ھالىتىنى تەڭشەڭ + + + + Run in quake mode + تېرمىنال quake ھالىتىدە قوزغالسۇن + + + + Keep terminal open when command finishes + تېرمىنالنى بۇيرۇق ياكى قوليازما ئىجرا نەتىجىسىنى كۆرسىتىدىغان قىلىپ تەڭشەش + + + + + The name should be no more than 32 characters + ئىسىم 32 ھەرپتىن ئېشىپ كەتمەسلىكى كېرەك + + + + + + Select + تاللاش + + + + Select the private key file + شەخسىي ئاچقۇچ ھۆججىتىنى تاللاڭ + + + + + Tab title format + بەتكۈچ نامى فورماتى + + + + + Remote tab title format + يىراق مۇساپىلىك بەتكۈچ نامى فورماتى + + + + + Close other tabs + باشقا بەتكۈچلەرنى تاقاش + + + + Delete + button + ئۆچۈرۈش + + + + + Confirm + button + جەزملەشتۈرۈش + + + + RemoteManagementPanel + + + Add Server + مۇلازىمىتېر قوشۇش + + + + RemoteManagementPlugin + + + Remote management + يىراقتىن باشقۇرۇش + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + ھۆججەتلەرنى يوللاش ۋە چۈشۈرۈش ئۈچۈن ئوڭ تەرەپنى چېكىش تىزىملىكىنى ئىشلىتىشتىن بۇرۇن، مۇلازىمېتىرنىڭ rz ۋە sz بۇيرۇقلىرىنى ئورناتقانلىقىنى جەزملەشتۈرۈڭ. + + + + RemoteManagementSearchPanel + + + Search + ئىزدەش + + + + ServerConfigOptDlg + + + Advanced options + ئالىي تاللاش + + + + Add Server + مۇلازىمىتېر قوشۇش + + + + Server name: + مۇلازىمىتېر نامى: + + + + + + Required + زۆرۈر + + + + Address: + ئادررېس: + + + + Port: + ئېغىز: + + + + Username: + ئىشلەتكۈچى نامى: + + + + Password: + پارول: + + + + Certificate: + گۇۋاھنامە: + + + + Group: + گۇرۇپپا: + + + + Path: + غول مۇندەرىجە: + + + + Command: + بۇيرۇق: + + + + Encoding: + كودلاش: + + + + Backspace key: + كاتەكچە بويىچە چېكىنىش كۇنۇپكىسى: + + + + Delete key: + ئۆچۈرۈش كۇنۇپكىسى: + + + + Delete server + مۇلازىمىتېرنى ئۆچۈرۈش + + + + Cancel + button + بىكار قىلىش + + + + Add + button + قوشۇش + + + + Edit Server + مۇلازىمىتېرنى تەھرىرلەش + + + + Save + button + ساقلاش + + + + + tty + tty + + + + Please enter a server name + مۇلازىمىتېر نامىنى كىرگۈزۈڭ + + + + Please enter an IP address + IP ئادرېسنى كىرگۈزۈڭ + + + + Please enter a port + ئېغىزنى كىرگۈزۈڭ + + + + Please enter a username + ئىشلەتكۈچى نامىنى كىرگۈزۈڭ + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + بۇ ئىسىم مۇلازىمىتېر مەۋجۇت + + + + please input another one. + قايتا كىرگۈزۈڭ + + + + Service + + + OK + button + جەزىملەشتۈرۈش + + + + Settings + + + Split screen + ئېكران بۆلۈش + + + + Fullscreen + تولۇق ئېكران + + + + Normal window + نورمال كۆزنەك + + + + Maximum + چوڭايتىش + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1 تېزلەتكە كۇنۇپكا ئىناۋەتسىز + + + + + + The shortcut %1 was already in use, + %1 تېزلەتمە كۇنۇپكا ئىشلىتىلىپ بولغان + + + + TabRenameWidget + + + Insert + كىرگۈزۈش + + + + + username: %u + ئىشلەتكۈچى ئىسمى: %u + + + + username@: %U + ئىشلەتكۈچى ئىسمى@: %U + + + + remote host: %h + يىراق مۇساپىلىك باش ئاپپارات: %h + + + + + session number: %# + سۆزلىشىش نومۇرى: %# + + + + + title set by shell: %w + shell بەلگىلىگەن كۆزنەك نامى: %w + + + + program name: %n + پىروگرامما نامى: %n + + + + current directory (short): %d + نۆۋەتتىكى مۇندەرىجە(قىسقا): %d + + + + current directory (long): %D + نۆۋەتتىكى مۇندەرىجە(ئۇزۇن): %D + + + + local host: %h + يەرلىك باش ئاپپارات: %h + + + + TermWidget + + + Copy + كۆچۈرۈش + + + + Paste + چاپلاش + + + + Open + ئوچۇق + + + + Open in file manager + ھۆججەت باشقۇرغۇچتا ئاچسۇن + + + + + Horizontal split + ئېكراننى توغرىسىغا بۆلۈش + + + + + Vertical split + تىك ھالەتتە ئېكراننى بۆلۈش + + + + + New tab + يېڭى بەتكۈچ قۇرۇش + + + + Exit fullscreen + پۈتۈن ئېكراندىن چېكىنىش + + + + Fullscreen + تولۇق ئېكران + + + + Find + ئىزدەش + + + + Search + ئىزدەش + + + + Encoding + كودلاش + + + + Custom commands + بۇيرۇق بەلگىلەش + + + + Remote management + يىراقتىن باشقۇرۇش + + + + Upload file + ھۆججەت يوللاش + + + + Download file + ھۆججەت چۈشۈرۈش + + + + Settings + تەڭشەك + + + + Utils + + + + Cancel + button + بىكار قىلىش + + + + Close + button + تاقاش + + + + + OK + button + جەزىملەشتۈرۈش + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_uk.ts deepin-terminal-5.4.13/translations/deepin-terminal_uk.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_uk.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_uk.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + Ім'я: + + + + Command: + Команда: + + + + Shortcuts: + Ярлики: + + + + + + + Required + Вимагається + + + + Add Command + Додати команду + + + + Edit Command + Редагувати команду + + + + Delete Command + Вилучити команду + + + + Cancel + button + Скасувати + + + + Add + button + Додати + + + + Save + button + Зберегти + + + + OK + button + Гаразд + + + + Please enter a name + Будь ласка, введіть назву + + + + Please enter a command + Будь ласка, введіть команду + + + + The name already exists, + Таку назву вже визначено, + + + + please input another one. + будь ласка, введіть іншу. + + + + CustomCommandPanel + + + Add Command + Додати команду + + + + CustomCommandPlugin + + + Custom commands + Користувацькі команди + + + + CustomCommandSearchRstPanel + + + Search + Пошук + + + + CustomThemeSettingDialog + + + Custom Theme + Нетипова тема + + + + Style: + Стиль: + + + + Light + Світла + + + + Dark + Темна + + + + Fore color: + Колір тексту: + + + + Back color: + Колір тла: + + + + Prompt PS1: + Запит PS1: + + + + Prompt PS2: + Запит PS2: + + + + Cancel + button + Скасувати + + + + Confirm + button + Підтвердити + + + + ListView + + + Delete Server + Вилучити сервер + + + + + Are you sure you want to delete %1? + Ви впевнені, що хочете видалити %1? + + + + MainWindow + + + + New window + Нове вікно + + + + Settings + Налаштування + + + + Cancel + button + Скасувати + + + + Close + button + Закрити + + + + Type path to download file + Введіть шлях для завантаження файлу + + + + Custom Theme + Нетипова тема + + + + QObject + + + Copy on select + Копіювати при позначенні + + + + Cursor blink + Моргання курсору + + + + Cursor style + Стиль курсора + + + + Scroll on keystroke + Прокручування натисканням клавіші + + + + Scroll on output + Прокручування при введенні + + + + Hide Quake window after losing focus + Приховати вікно випадаючого Терміналу після втрати фокусу + + + + + Blur background + Розмитий фон + + + + Use on starting + Використовувати при запуску + + + + Font + Шрифт + + + + Font size + Розмір шрифту + + + + + Opacity + Непрозорість + + + + Advanced + Додатково + + + + Cursor + Курсор + + + + Scroll + Прогорнути + + + + Window + Вікно + + + + Basic + Основний + + + + Interface + Інтерфейс + + + + Shortcuts + Поєднання клавіш + + + + + Others + Інше + + + + + + Terminal + Термінал + + + + Workspace + Робоча область + + + + + Custom commands + Користувацькі команди + + + + + Display shortcuts + Показати ярлики + + + + + Remote management + Дистанційне керування + + + + + New tab + Нова вкладка + + + + + Next tab + Наступна вкладка + + + + + Previous tab + Попередня вкладка + + + + + Select left workspace + Вибрати лівий робочий простір + + + + + Select lower workspace + Вибрати нижній робочий простір + + + + + Select right workspace + Вибрати правий робочий простір + + + + + Select upper workspace + Вибрати верхній робочий простір + + + + Tab titles + Заголовки вкладок + + + + + Go to tab 1 + Перейти до вкладки 1 + + + + + Go to tab 2 + Перейти до вкладки 2 + + + + + Go to tab 3 + Перейти до вкладки 3 + + + + + Go to tab 4 + Перейти до вкладки 4 + + + + + Go to tab 5 + Перейти до вкладки 5 + + + + + Go to tab 6 + Перейти до вкладки 6 + + + + + Go to tab 7 + Перейти до вкладки 7 + + + + + Go to tab 8 + Перейти до вкладки 8 + + + + + Go to tab 9 + Перейти до вкладки 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + Вимкніть керування потоком даних за допомогою Ctrl+S, Ctrl+Q + + + + Shell profile + Профіль оболонки + + + + + + + Rename title + Перейменувати назву + + + + + Fullscreen + На весь екран + + + + + Copy + Копіювати + + + + + Default size + Стандартний розмір + + + + + Paste + Вставити + + + + Search + Пошук + + + + + Select all + Вибрати все + + + + Jump to next command + Перейти до наступної команди + + + + Jump to previous command + Перейти до попередньої команди + + + + + Zoom in + Збільшити масштаб + + + + + Zoom out + Зменшити масштаб + + + + Close other windows + Закрити інші вікна + + + + + + Close other workspaces + Закрити інші робочі простори + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + Не вдалося знайти «%1». Запускаємося замість нього із «%2». Будь ласка, перевірте, чи правильно вказано ваш профіль оболонки. + + + + Could not open "%1", unable to run it + Не вдалося відкрити «%1». Не можемо його запустити. + + + + Could not find "%1", unable to run it + Не вдалося знайти «%1». Не можемо його запустити. + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + Виведення даних було призупинено натисканням Ctrl+S. Натисніть Ctrl+Q, щоб відновити його. + + + + Close window + Закрити вікно + + + + + + Close workspace + Закрити робочий простір + + + + + Horizontal split + Горизонтальний розподіл + + + + + Vertical split + Вертикальний розподіл + + + + + Find + Знайти + + + + + + please set another one. + будь ласка, встановіть іншу. + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + Термінал - це розширений емулятор терміналу з робочим простором, декількома вікнами, віддаленим керуванням, режимом тремтіння і іншими функціями. + + + + Tabs + Вкладки + + + + + Close tab + Закрити вкладку + + + + Select tab + Вибрати вкладку + + + + Switch focus to "+" icon + Перемкнути фоку на піктограму «+» + + + + + Select file to upload + Вибрати файл для вивантаження + + + + + Upload + Вивантажити + + + + Programs are still running in terminal + Програми все ще працюють у терміналі + + + + + Close this terminal? + Закрити цей термінал? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + У цьому терміналі не завершено роботу одного з процесів. Закриття термінала призведе до примусового завершення роботи процесу. + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + У цьому терміналі не завершено роботу %1 процесів. Закриття термінала призведе до примусового завершення роботи усіх цих процесів. + + + + + Close this window? + Закрити це вікно? + + + + + There are still processes running in this window. Closing the window will kill all of them. + У цьому терміналі не завершено роботу процесів. Закриття термінала призведе до примусового завершення роботи усіх цих процесів. + + + + + Select a directory to save the file + Виберіть каталог для зберігання файла + + + + Are you sure you want to uninstall it? + Ви справді хочете її вилучити? + + + + + Are you sure you want to uninstall this application? + Ви справді хочете вилучити цю програму? + + + + + You will not be able to use Terminal any longer. + Після цього ви не зможете користуватися «Терміналом». + + + + + + + Cancel + button + Скасувати + + + + + OK + button + Гаразд + + + + Execute a command in the terminal + Виконати команду у терміналі + + + + Run script string in the terminal + Запустити рядок скрипту у терміналі + + + + Set the work directory + Встановити робочий каталог + + + + Set the window mode on starting + Встановити режим вікна після запуску + + + + Run in quake mode + Запустити у режимі Quake + + + + Keep terminal open when command finishes + Не закривати термінал після завершення роботи команди + + + + + The name should be no more than 32 characters + Кількість символів у назві не повинна перевищувати 32 + + + + + + Select + Обрати + + + + Select the private key file + Вибрати файл приватного ключа + + + + + Tab title format + Формат заголовка вкладки + + + + + Remote tab title format + Формат заголовка віддаленої вкладки + + + + + Close other tabs + Закрити інші вкладки + + + + Delete + button + Видалити + + + + + Confirm + button + Підтвердити + + + + RemoteManagementPanel + + + Add Server + Додати сервер + + + + RemoteManagementPlugin + + + Remote management + Дистанційне керування + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + Переконайтеся, що на сервері встановлено програми rz і sz, перш ніж клацати правою кнопкою миші для вивантаження та отримання файлів. + + + + RemoteManagementSearchPanel + + + Search + Пошук + + + + ServerConfigOptDlg + + + Advanced options + Розширені параметри + + + + Add Server + Додати сервер + + + + Server name: + Ім'я серверу: + + + + + + Required + Вимагається + + + + Address: + Адреса: + + + + Port: + Порт: + + + + Username: + Ім'я користувача: + + + + Password: + Пароль: + + + + Certificate: + Сертифікат: + + + + Group: + Група: + + + + Path: + Шлях: + + + + Command: + Команда: + + + + Encoding: + Кодування: + + + + Backspace key: + Клавіша Backspace: + + + + Delete key: + Видалити ключ: + + + + Delete server + Видалити сервер + + + + Cancel + button + Скасувати + + + + Add + button + Додати + + + + Edit Server + Редагувати сервер + + + + Save + button + Зберегти + + + + + tty + tty + + + + Please enter a server name + Будь ласка, введіть назву сервера + + + + Please enter an IP address + Будь ласка, введіть IP-адресу + + + + Please enter a port + Будь ласка, введіть порт + + + + Please enter a username + Будь ласка, введіть ім'я користувача + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + Сервер із такою назвою вже існує, + + + + please input another one. + будь ласка, введіть іншу назву. + + + + Service + + + OK + button + Гаразд + + + + Settings + + + Split screen + Розділити екран + + + + Fullscreen + На весь екран + + + + Normal window + Нормальне вікно + + + + Maximum + Максимум + + + + ShortcutManager + + + + The shortcut %1 is invalid, + Клавіатурне скорочення %1 є некоректним, + + + + + + The shortcut %1 was already in use, + Клавіатурне скорочення %1 вже вжито, + + + + TabRenameWidget + + + Insert + Вставити + + + + + username: %u + користувач: %u + + + + username@: %U + користувач@: %U + + + + remote host: %h + віддалений вузол: %h + + + + + session number: %# + номер сеансу: %# + + + + + title set by shell: %w + заголовок від командної оболонки: %w + + + + program name: %n + назва програми: %n + + + + current directory (short): %d + поточний каталог (скорочено): %d + + + + current directory (long): %D + поточний каталог (повністю): %D + + + + local host: %h + локальний вузол: %h + + + + TermWidget + + + Copy + Копіювати + + + + Paste + Вставити + + + + Open + Відкрити + + + + Open in file manager + Відкрити у файловому менеджері + + + + + Horizontal split + Горизонтальний розподіл + + + + + Vertical split + Вертикальний розподіл + + + + + New tab + Нова вкладка + + + + Exit fullscreen + Вийти з повноекранного режиму + + + + Fullscreen + На весь екран + + + + Find + Знайти + + + + Search + Пошук + + + + Encoding + Кодування + + + + Custom commands + Користувацькі команди + + + + Remote management + Дистанційне керування + + + + Upload file + Вивантажити файл + + + + Download file + Завантажити файл + + + + Settings + Налаштування + + + + Utils + + + + Cancel + button + Скасувати + + + + Close + button + Закрити + + + + + OK + button + Гаразд + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_CN.ts deepin-terminal-5.4.13/translations/deepin-terminal_zh_CN.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_CN.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_zh_CN.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + 名称: + + + + Command: + 命令: + + + + Shortcuts: + 快捷键: + + + + + + + Required + 必填 + + + + Add Command + 添加命令 + + + + Edit Command + 编辑命令 + + + + Delete Command + 删除命令 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Save + button + 保 存 + + + + OK + button + 确 定 + + + + Please enter a name + 请输入名称 + + + + Please enter a command + 请输入命令 + + + + The name already exists, + 该名称已存在, + + + + please input another one. + 请重新输入 + + + + CustomCommandPanel + + + Add Command + 添加命令 + + + + CustomCommandPlugin + + + Custom commands + 自定义命令 + + + + CustomCommandSearchRstPanel + + + Search + 搜索 + + + + CustomThemeSettingDialog + + + Custom Theme + 自定义主题 + + + + Style: + 主题风格: + + + + Light + 浅色 + + + + Dark + 深色 + + + + Fore color: + 前景色: + + + + Back color: + 背景色: + + + + Prompt PS1: + 提示符PS1: + + + + Prompt PS2: + 提示符PS2: + + + + Cancel + button + 取 消 + + + + Confirm + button + 确 定 + + + + ListView + + + Delete Server + 删除服务器 + + + + + Are you sure you want to delete %1? + 您确定要删除 %1 吗? + + + + MainWindow + + + + New window + 新建窗口 + + + + Settings + 设置 + + + + Cancel + button + 取 消 + + + + Close + button + 关 闭 + + + + Type path to download file + 请输入下载文件的路径 + + + + Custom Theme + 自定义主题 + + + + QObject + + + Copy on select + 选中文字时自动复制到剪切板 + + + + Cursor blink + 光标闪烁 + + + + Cursor style + 光标风格 + + + + Scroll on keystroke + 按键时滚动 + + + + Scroll on output + 输出时滚动 + + + + Hide Quake window after losing focus + 丢失焦点后隐藏雷神窗口 + + + + + Blur background + 背景模糊 + + + + Use on starting + 启动时使用 + + + + Font + 字体 + + + + Font size + 字体大小 + + + + + Opacity + 透明度 + + + + Advanced + 高级设置 + + + + Cursor + 光标 + + + + Scroll + 滚动 + + + + Window + 窗口 + + + + Basic + 基础设置 + + + + Interface + 界面 + + + + Shortcuts + 快捷键 + + + + + Others + 其他 + + + + + + Terminal + 终端 + + + + Workspace + 工作区 + + + + + Custom commands + 自定义命令 + + + + + Display shortcuts + 显示快捷键 + + + + + Remote management + 远程管理 + + + + + New tab + 新建标签页 + + + + + Next tab + 下一个标签页 + + + + + Previous tab + 上一个标签页 + + + + + Select left workspace + 选择左边的工作区 + + + + + Select lower workspace + 选择下面的工作区 + + + + + Select right workspace + 选择右边的工作区 + + + + + Select upper workspace + 选择上面的工作区 + + + + Tab titles + 标签标题 + + + + + Go to tab 1 + 切换到标签 1 + + + + + Go to tab 2 + 切换到标签 2 + + + + + Go to tab 3 + 切换到标签 3 + + + + + Go to tab 4 + 切换到标签 4 + + + + + Go to tab 5 + 切换到标签 5 + + + + + Go to tab 6 + 切换到标签 6 + + + + + Go to tab 7 + 切换到标签 7 + + + + + Go to tab 8 + 切换到标签 8 + + + + + Go to tab 9 + 切换到标签 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + 禁用Ctrl+S和Ctrl+Q控制 + + + + Shell profile + Shell配置 + + + + + + + Rename title + 重命名标题 + + + + + Fullscreen + 全屏 + + + + + Copy + 复制 + + + + + Default size + 默认大小 + + + + + Paste + 粘贴 + + + + Search + 搜索 + + + + + Select all + 全选 + + + + Jump to next command + 跳转到下一个命令 + + + + Jump to previous command + 跳转到上一个命令 + + + + + Zoom in + 放大 + + + + + Zoom out + 缩小 + + + + Close other windows + 关闭其他窗口 + + + + + + Close other workspaces + 关闭其他工作区 + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + 找不到 “%1”,已启动“%2”代替。请检查Shell配置。 + + + + Could not open "%1", unable to run it + 打不开“%1”,无法正常使用 + + + + Could not find "%1", unable to run it + 找不到“%1”,无法正常使用 + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + 已经按下Ctrl+S,输出被挂起。可以按下Ctrl+Q继续。 + + + + Close window + 关闭窗口 + + + + + + Close workspace + 关闭工作区 + + + + + Horizontal split + 横向分屏 + + + + + Vertical split + 纵向分屏 + + + + + Find + 查找 + + + + + + please set another one. + 请重新设置 + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + 终端是一款集工作区、多窗口、远程管理、雷神模式等功能的高级终端模拟器。 + + + + Tabs + 标签页 + + + + + Close tab + 关闭标签页 + + + + Select tab + 选择标签页 + + + + Switch focus to "+" icon + 光标焦点切换至“+”图标 + + + + + Select file to upload + 选择要上传的文件 + + + + + Upload + 上传 + + + + Programs are still running in terminal + 终端仍然有程序在运行 + + + + + Close this terminal? + 关闭此终端? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + 该终端中仍然有1个进程在运行,关闭终端将杀死进程。 + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + 该终端中仍然有%1个进程在运行,关闭终端将杀死进程。 + + + + + Close this window? + 关闭这个窗口? + + + + + There are still processes running in this window. Closing the window will kill all of them. + 窗口内一些终端仍然有进程在运行,关闭窗口会杀死所有进程。 + + + + + Select a directory to save the file + 选择下载文件的保存目录 + + + + Are you sure you want to uninstall it? + 您确定要卸载它吗? + + + + + Are you sure you want to uninstall this application? + 您确定要卸载终端吗? + + + + + You will not be able to use Terminal any longer. + 卸载后将无法再使用该应用。 + + + + + + + Cancel + button + 取 消 + + + + + OK + button + 确 定 + + + + Execute a command in the terminal + 在终端中运行⼀个程序 + + + + Run script string in the terminal + 在终端中允许脚本字符串 + + + + Set the work directory + 设置终端的启动目录 + + + + Set the window mode on starting + 设置终端开启的模式 + + + + Run in quake mode + 设置终端以雷神模式启动 + + + + Keep terminal open when command finishes + 设置终端显示命令或脚本执行后的结果 + + + + + The name should be no more than 32 characters + 名称长度不得超过32个字符 + + + + + + Select + 选择 + + + + Select the private key file + 选择私钥文件 + + + + + Tab title format + 标签标题格式 + + + + + Remote tab title format + 远程标签标题格式 + + + + + Close other tabs + 关闭其他标签页 + + + + Delete + button + 删 除 + + + + + Confirm + button + 确 定 + + + + RemoteManagementPanel + + + Add Server + 添加服务器 + + + + RemoteManagementPlugin + + + Remote management + 远程管理 + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + 在您使用右键菜单进行上传和下载文件之前, 请先确保服务器已经安装了 rz和sz 命令。 + + + + RemoteManagementSearchPanel + + + Search + 搜索 + + + + ServerConfigOptDlg + + + Advanced options + 高级选项 + + + + Add Server + 添加服务器 + + + + Server name: + 服务器名: + + + + + + Required + 必填 + + + + Address: + 地址: + + + + Port: + 端口: + + + + Username: + 用户名: + + + + Password: + 密码: + + + + Certificate: + 证书: + + + + Group: + 分组: + + + + Path: + 路径: + + + + Command: + 命令: + + + + Encoding: + 编码: + + + + Backspace key: + 退格键: + + + + Delete key: + 删除键: + + + + Delete server + 删除服务器 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Edit Server + 编辑服务器 + + + + Save + button + 保 存 + + + + + tty + tty + + + + Please enter a server name + 请输入服务器名称 + + + + Please enter an IP address + 请输入IP地址 + + + + Please enter a port + 请输入端口 + + + + Please enter a username + 请输入用户名 + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + 该服务器名已存在, + + + + please input another one. + 请重新输入 + + + + Service + + + OK + button + 确 定 + + + + Settings + + + Split screen + 分屏 + + + + Fullscreen + 全屏 + + + + Normal window + 正常窗口 + + + + Maximum + 最大化 + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1为无效快捷键, + + + + + + The shortcut %1 was already in use, + 快捷键%1已被占用, + + + + TabRenameWidget + + + Insert + 插入 + + + + + username: %u + 用户名:%u + + + + username@: %U + 用户名@:%U + + + + remote host: %h + 远程主机:%h + + + + + session number: %# + 会话编号:%# + + + + + title set by shell: %w + shell设定的窗口标题:%w + + + + program name: %n + 程序名:%n + + + + current directory (short): %d + 当前目录(短):%d + + + + current directory (long): %D + 当前目录(长):%D + + + + local host: %h + 本地主机:%h + + + + TermWidget + + + Copy + 复制 + + + + Paste + 粘贴 + + + + Open + 打开 + + + + Open in file manager + 在文件管理器中打开 + + + + + Horizontal split + 横向分屏 + + + + + Vertical split + 纵向分屏 + + + + + New tab + 新建标签页 + + + + Exit fullscreen + 退出全屏 + + + + Fullscreen + 全屏 + + + + Find + 查找 + + + + Search + 搜索 + + + + Encoding + 编码 + + + + Custom commands + 自定义命令 + + + + Remote management + 远程管理 + + + + Upload file + 上传文件 + + + + Download file + 下载文件 + + + + Settings + 设置 + + + + Utils + + + + Cancel + button + 取 消 + + + + Close + button + 关 闭 + + + + + OK + button + 确 定 + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_HK.ts deepin-terminal-5.4.13/translations/deepin-terminal_zh_HK.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_HK.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_zh_HK.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + 名稱: + + + + Command: + 命令: + + + + Shortcuts: + 捷徑: + + + + + + + Required + 必填 + + + + Add Command + 添加命令 + + + + Edit Command + 編輯命令 + + + + Delete Command + 刪除命令 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Save + button + 保 存 + + + + OK + button + 確 定 + + + + Please enter a name + 請輸入名稱 + + + + Please enter a command + 請輸入命令 + + + + The name already exists, + 該名稱已存在, + + + + please input another one. + 請重新輸入 + + + + CustomCommandPanel + + + Add Command + 添加命令 + + + + CustomCommandPlugin + + + Custom commands + 自定義命令 + + + + CustomCommandSearchRstPanel + + + Search + 搜尋 + + + + CustomThemeSettingDialog + + + Custom Theme + 自定義主題 + + + + Style: + 主題風格: + + + + Light + 淺色 + + + + Dark + 深色 + + + + Fore color: + 前景色: + + + + Back color: + 背景色: + + + + Prompt PS1: + 提示符PS1: + + + + Prompt PS2: + 提示符PS2: + + + + Cancel + button + 取 消 + + + + Confirm + button + 確 定 + + + + ListView + + + Delete Server + 刪除伺服器 + + + + + Are you sure you want to delete %1? + 您確定要刪除 %1 嗎? + + + + MainWindow + + + + New window + 新建視窗 + + + + Settings + 設置 + + + + Cancel + button + 取 消 + + + + Close + button + 關 閉 + + + + Type path to download file + 請輸入下載文件的路徑 + + + + Custom Theme + 自定義主題 + + + + QObject + + + Copy on select + 選中文字時自動複製到剪切板 + + + + Cursor blink + 光標閃爍 + + + + Cursor style + 光標風格 + + + + Scroll on keystroke + 按鍵時滾動 + + + + Scroll on output + 輸出時滾動 + + + + Hide Quake window after losing focus + 丟失焦點後隱藏雷神視窗 + + + + + Blur background + 背景模糊 + + + + Use on starting + 啟動時使用 + + + + Font + 字體 + + + + Font size + 字體大小 + + + + + Opacity + 透明度 + + + + Advanced + 高级设置 + + + + Cursor + 鼠標 + + + + Scroll + 滑鼠滾輪 + + + + Window + 視窗 + + + + Basic + 基本 + + + + Interface + 接口 + + + + Shortcuts + 快捷键 + + + + + Others + 其他 + + + + + + Terminal + 終端 + + + + Workspace + 工作區 + + + + + Custom commands + 自定義命令 + + + + + Display shortcuts + 顯示快捷鍵 + + + + + Remote management + 遠程管理 + + + + + New tab + 新建標籤頁 + + + + + Next tab + 下一個標籤頁 + + + + + Previous tab + 上一個標籤頁 + + + + + Select left workspace + 選擇左邊的工作區 + + + + + Select lower workspace + 選擇下面的工作區 + + + + + Select right workspace + 選擇右邊的工作區 + + + + + Select upper workspace + 選擇上面的工作區 + + + + Tab titles + 標籤標題 + + + + + Go to tab 1 + 切換到標籤 1 + + + + + Go to tab 2 + 切換到標籤 2 + + + + + Go to tab 3 + 切換到標籤 3 + + + + + Go to tab 4 + 切換到標籤 4 + + + + + Go to tab 5 + 切換到標籤 5 + + + + + Go to tab 6 + 切換到標籤 6 + + + + + Go to tab 7 + 切換到標籤 7 + + + + + Go to tab 8 + 切換到標籤 8 + + + + + Go to tab 9 + 切換到標籤 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + 禁用Ctrl+S和Ctrl+Q控制 + + + + Shell profile + Shell配置 + + + + + + + Rename title + 重命名標題 + + + + + Fullscreen + 全螢幕 + + + + + Copy + 複製 + + + + + Default size + 默認大小 + + + + + Paste + 貼上 + + + + Search + 搜尋 + + + + + Select all + 選擇全部 + + + + Jump to next command + 跳轉到下一個命令 + + + + Jump to previous command + 跳轉到上一個命令 + + + + + Zoom in + 拉近 + + + + + Zoom out + 拉遠 + + + + Close other windows + 關閉其他視窗 + + + + + + Close other workspaces + 關閉其他工作區 + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + 找不到 「%1」,已啟動「%2」代替。請檢查Shell配置。 + + + + Could not open "%1", unable to run it + 打不開“%1”,無法正常使用 + + + + Could not find "%1", unable to run it + 找不到「%1」,無法正常使用 + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + 已經按下Ctrl+S,輸出被掛起。可以按下Ctrl+Q繼續。 + + + + Close window + 關閉視窗 + + + + + + Close workspace + 關閉工作區 + + + + + Horizontal split + 橫向分屏 + + + + + Vertical split + 縱向分屏 + + + + + Find + 查找 + + + + + + please set another one. + 請重新設置 + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + 終端是⼀款集⼯作區、多視窗、遠程管理、雷神模式等功能的⾼級終端模擬器。 + + + + Tabs + 標籤頁 + + + + + Close tab + 關閉標籤頁 + + + + Select tab + 選擇標籤頁 + + + + Switch focus to "+" icon + 光標焦點切換至「+」圖標 + + + + + Select file to upload + 選擇要上傳的文件 + + + + + Upload + 上傳 + + + + Programs are still running in terminal + 終端仍然有程序在運行 + + + + + Close this terminal? + 關閉此終端? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + 該終端中仍然有1個進程在運行,關閉終端將殺死進程。 + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + 該終端中仍然有%1個進程在運行,關閉終端將殺死進程。 + + + + + Close this window? + 關閉這個視窗? + + + + + There are still processes running in this window. Closing the window will kill all of them. + 視窗內一些終端仍然有進程在運行,關閉視窗會殺死所有進程。 + + + + + Select a directory to save the file + 選擇下載文件的保存目錄 + + + + Are you sure you want to uninstall it? + 你確定要解除安裝嗎? + + + + + Are you sure you want to uninstall this application? + 您確定要卸載終端嗎? + + + + + You will not be able to use Terminal any longer. + 卸載後將無法再使用該應用。 + + + + + + + Cancel + button + 取 消 + + + + + OK + button + 確 定 + + + + Execute a command in the terminal + 在終端運行一個程序 + + + + Run script string in the terminal + 在終端中允許腳本字符串 + + + + Set the work directory + 設置終端的啟動目錄 + + + + Set the window mode on starting + 設置終端開啟的模式 + + + + Run in quake mode + 雷神模式 + + + + Keep terminal open when command finishes + 設置終端顯示命令或腳本執行後的結果 + + + + + The name should be no more than 32 characters + 名稱長度不得超過32個字符 + + + + + + Select + 選擇 + + + + Select the private key file + 選擇私鑰文件 + + + + + Tab title format + 標籤標題格式 + + + + + Remote tab title format + 遠程標籤標題格式 + + + + + Close other tabs + 關閉其他標籤頁 + + + + Delete + button + 刪 除 + + + + + Confirm + button + 確 定 + + + + RemoteManagementPanel + + + Add Server + 添加伺服器 + + + + RemoteManagementPlugin + + + Remote management + 遠程管理 + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + 在您使用右鍵菜單進行上傳和下載文件之前, 請先確保伺服器已經安裝了rz和sz命令。 + + + + RemoteManagementSearchPanel + + + Search + 搜尋 + + + + ServerConfigOptDlg + + + Advanced options + 高級選項 + + + + Add Server + 添加伺服器 + + + + Server name: + 伺服器名: + + + + + + Required + 必填 + + + + Address: + 地址: + + + + Port: + 端口: + + + + Username: + 用戶名稱: + + + + Password: + 密碼: + + + + Certificate: + 證書: + + + + Group: + 分組: + + + + Path: + 路徑: + + + + Command: + 命令: + + + + Encoding: + 編碼: + + + + Backspace key: + 退格鍵: + + + + Delete key: + 刪除鍵: + + + + Delete server + 刪除伺服器 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Edit Server + 編輯伺服器 + + + + Save + button + 保 存 + + + + + tty + tty + + + + Please enter a server name + 請輸入伺服器名稱 + + + + Please enter an IP address + 請輸入IP位址 + + + + Please enter a port + 請輸入端口 + + + + Please enter a username + 請輸入用戶名 + + + + + ascii-del + ascii-del + + + + + auto + auto + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + 該伺服器名已存在, + + + + please input another one. + 請重新輸入 + + + + Service + + + OK + button + 確 定 + + + + Settings + + + Split screen + 分屏 + + + + Fullscreen + 全螢幕 + + + + Normal window + 正常視窗 + + + + Maximum + 最⼤化 + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1為無效快捷鍵, + + + + + + The shortcut %1 was already in use, + 快捷鍵%1已被佔用, + + + + TabRenameWidget + + + Insert + 插入 + + + + + username: %u + 用戶名:%u + + + + username@: %U + 用戶名@:%U + + + + remote host: %h + 遠程主機:%h + + + + + session number: %# + 會話編號:%# + + + + + title set by shell: %w + shell設定的窗口標題:%w + + + + program name: %n + 程序名:%n + + + + current directory (short): %d + 當前目錄(短):%d + + + + current directory (long): %D + 當前目錄(長):%D + + + + local host: %h + 本地主機:%h + + + + TermWidget + + + Copy + 複製 + + + + Paste + 貼上 + + + + Open + 開啟 + + + + Open in file manager + 在文件管理器中打開 + + + + + Horizontal split + 橫向分屏 + + + + + Vertical split + 縱向分屏 + + + + + New tab + 新建標籤頁 + + + + Exit fullscreen + 退出全螢幕 + + + + Fullscreen + 全螢幕 + + + + Find + 查找 + + + + Search + 搜尋 + + + + Encoding + 編碼 + + + + Custom commands + 自定義命令 + + + + Remote management + 遠程管理 + + + + Upload file + 上傳文件 + + + + Download file + 下載文件 + + + + Settings + 設置 + + + + Utils + + + + Cancel + button + 取 消 + + + + Close + button + 關 閉 + + + + + OK + button + 確 定 + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_TW.ts deepin-terminal-5.4.13/translations/deepin-terminal_zh_TW.ts --- deepin-terminal-5.0.0+ds1/translations/deepin-terminal_zh_TW.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/deepin-terminal_zh_TW.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,1198 @@ + + + CustomCommandOptDlg + + + Name: + 名稱: + + + + Command: + 命令: + + + + Shortcuts: + 快速鍵: + + + + + + + Required + 必須 + + + + Add Command + 加入命令 + + + + Edit Command + 編輯命令 + + + + Delete Command + 刪除命令 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Save + button + 儲 存 + + + + OK + button + 確 定 + + + + Please enter a name + 請輸入名稱 + + + + Please enter a command + 請輸入命令 + + + + The name already exists, + 該名稱已存在, + + + + please input another one. + 請重新輸入 + + + + CustomCommandPanel + + + Add Command + 加入命令 + + + + CustomCommandPlugin + + + Custom commands + 自訂命令 + + + + CustomCommandSearchRstPanel + + + Search + 搜尋 + + + + CustomThemeSettingDialog + + + Custom Theme + 自訂主題 + + + + Style: + 主題風格: + + + + Light + 淺色 + + + + Dark + 深色 + + + + Fore color: + 前景色: + + + + Back color: + 背景色: + + + + Prompt PS1: + 提示符PS1: + + + + Prompt PS2: + 提示符PS2: + + + + Cancel + button + 取 消 + + + + Confirm + button + 確 定 + + + + ListView + + + Delete Server + 刪除伺服器 + + + + + Are you sure you want to delete %1? + 確定刪除 %1? + + + + MainWindow + + + + New window + 新增視窗 + + + + Settings + 設定 + + + + Cancel + button + 取 消 + + + + Close + button + 離 開 + + + + Type path to download file + 輸入位置以下載檔案 + + + + Custom Theme + 自訂主題 + + + + QObject + + + Copy on select + 選取時複製 + + + + Cursor blink + 游標閃爍 + + + + Cursor style + 游標樣式 + + + + Scroll on keystroke + 點擊鍵盤時捲動 + + + + Scroll on output + 輸出時捲動 + + + + Hide Quake window after losing focus + 失去焦點時隱藏雷神視窗 + + + + + Blur background + 模糊背景 + + + + Use on starting + 啟動時使用 + + + + Font + 字型 + + + + Font size + 字型大小 + + + + + Opacity + 不透明度 + + + + Advanced + 進階 + + + + Cursor + 游標 + + + + Scroll + 捲動 + + + + Window + 視窗 + + + + Basic + 基本 + + + + Interface + 界面 + + + + Shortcuts + 快捷鍵 + + + + + Others + 其他 + + + + + + Terminal + 終端機 + + + + Workspace + 工作區 + + + + + Custom commands + 自訂命令 + + + + + Display shortcuts + 顯示快速鍵 + + + + + Remote management + 遠端管理 + + + + + New tab + 建立標籤頁 + + + + + Next tab + 下一個標籤頁 + + + + + Previous tab + 上一個標籤頁 + + + + + Select left workspace + 選擇左邊的工作區 + + + + + Select lower workspace + 選擇下面的工作區 + + + + + Select right workspace + 選擇右邊的工作區 + + + + + Select upper workspace + 選擇上面的工作區 + + + + Tab titles + 標籤標題 + + + + + Go to tab 1 + 切換到標籤 1 + + + + + Go to tab 2 + 切換到標籤 2 + + + + + Go to tab 3 + 切換到標籤 3 + + + + + Go to tab 4 + 切換到標籤 4 + + + + + Go to tab 5 + 切換到標籤 5 + + + + + Go to tab 6 + 切換到標籤 6 + + + + + Go to tab 7 + 切換到標籤 7 + + + + + Go to tab 8 + 切換到標籤 8 + + + + + Go to tab 9 + 切換到標籤 9 + + + + Disable flow control using Ctrl+S, Ctrl+Q + 禁用Ctrl+S和Ctrl+Q控制 + + + + Shell profile + Shell配置 + + + + + + + Rename title + 重命名分頁 + + + + + Fullscreen + 全螢幕 + + + + + Copy + 複製 + + + + + Default size + 預設大小 + + + + + Paste + 貼上 + + + + Search + 搜尋 + + + + + Select all + 全選 + + + + Jump to next command + 跳到下個命令 + + + + Jump to previous command + 跳到上個命令 + + + + + Zoom in + 放大 + + + + + Zoom out + 縮小 + + + + Close other windows + 關閉其他視窗 + + + + + + Close other workspaces + 關閉其他工作區 + + + + Could not find "%1", starting "%2" instead. Please check your shell profile. + 找不到 「%1」,已啟動「%2」代替。請檢查Shell配置。 + + + + Could not open "%1", unable to run it + 打不開“%1”,無法正常使用 + + + + Could not find "%1", unable to run it + 找不到「%1」,無法正常使用 + + + + Output has been suspended by pressing Ctrl+S. Pressing Ctrl+Q to resume. + 已經按下Ctrl+S,輸出被掛起。可以按下Ctrl+Q繼續。 + + + + Close window + 關閉視窗 + + + + + + Close workspace + 關閉工作區 + + + + + Horizontal split + 水平分割 + + + + + Vertical split + 垂直分割 + + + + + Find + 尋找 + + + + + + please set another one. + 請重新設置 + + + + Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features. + 終端機是個進階的終端模擬器,具備視窗切割、工作區、遠端管理、雷神模式等其他功能。 + + + + Tabs + 標籤頁 + + + + + Close tab + 關閉標籤頁 + + + + Select tab + 選擇標籤頁 + + + + Switch focus to "+" icon + 光標焦點切換至「+」圖標 + + + + + Select file to upload + 選擇要上傳的檔案 + + + + + Upload + 上傳 + + + + Programs are still running in terminal + 多個程式仍在執行 + + + + + Close this terminal? + 關閉此終端? + + + + + There is still a process running in this terminal. Closing the terminal will kill it. + 該終端中仍然有1個進程在運行,關閉終端將殺死進程。 + + + + + There are still %1 processes running in this terminal. Closing the terminal will kill all of them. + 該終端中仍然有%1個進程在運行,關閉終端將殺死進程。 + + + + + Close this window? + 關閉這個窗口? + + + + + There are still processes running in this window. Closing the window will kill all of them. + 窗口內一些終端仍然有進程在運行,關閉窗口會殺死所有進程。 + + + + + Select a directory to save the file + 選擇檔案儲存路徑 + + + + Are you sure you want to uninstall it? + 您確定要卸載它嗎? + + + + + Are you sure you want to uninstall this application? + 您確定要卸載終端嗎? + + + + + You will not be able to use Terminal any longer. + 卸載後將無法再使用該應用。 + + + + + + + Cancel + button + 取 消 + + + + + OK + button + 確 定 + + + + Execute a command in the terminal + 於終端機執行程式 + + + + Run script string in the terminal + 在終端中允許腳本字符串 + + + + Set the work directory + 設定終端機的啟動目錄 + + + + Set the window mode on starting + 設置終端開啟的模式 + + + + Run in quake mode + 以雷神模式執行終端機 + + + + Keep terminal open when command finishes + 設置終端顯示命令或腳本執行後的結果 + + + + + The name should be no more than 32 characters + 名稱長度不得超過32個字元 + + + + + + Select + 選擇 + + + + Select the private key file + 選擇私鑰檔案 + + + + + Tab title format + 標籤標題格式 + + + + + Remote tab title format + 遠端標籤標題格式 + + + + + Close other tabs + 關閉其他標籤頁 + + + + Delete + button + 刪 除 + + + + + Confirm + button + 確 定 + + + + RemoteManagementPanel + + + Add Server + 加入伺服器 + + + + RemoteManagementPlugin + + + Remote management + 遠端管理 + + + + Make sure that rz and sz commands have been installed in the server before right clicking to upload and download files. + 使用右鍵點擊上傳和下載檔案前,請確認伺服器已安裝 rz 和 sz 指令。 + + + + RemoteManagementSearchPanel + + + Search + 搜尋 + + + + ServerConfigOptDlg + + + Advanced options + 進階選項 + + + + Add Server + 加入伺服器 + + + + Server name: + 伺服器名稱: + + + + + + Required + 必須 + + + + Address: + 位址: + + + + Port: + 通訊埠: + + + + Username: + 使用者名稱: + + + + Password: + 密碼: + + + + Certificate: + 憑證檔案: + + + + Group: + 分組: + + + + Path: + 位置: + + + + Command: + 命令: + + + + Encoding: + 編碼: + + + + Backspace key: + 退格鍵: + + + + Delete key: + 刪除鍵: + + + + Delete server + 刪除伺服器 + + + + Cancel + button + 取 消 + + + + Add + button + 添 加 + + + + Edit Server + 編輯伺服器 + + + + Save + button + 儲 存 + + + + + tty + tty + + + + Please enter a server name + 請輸入伺服器名稱 + + + + Please enter an IP address + 請輸入IP位址 + + + + Please enter a port + 請輸入埠 + + + + Please enter a username + 請輸入使用者名稱 + + + + + ascii-del + ascii-del + + + + + auto + 自動 + + + + + control-h + control-h + + + + + escape-sequence + escape-sequence + + + + The server name already exists, + 該伺服器名已存在, + + + + please input another one. + 請重新輸入 + + + + Service + + + OK + button + 確 定 + + + + Settings + + + Split screen + 分屏 + + + + Fullscreen + 全螢幕 + + + + Normal window + 正常視窗 + + + + Maximum + 最⼤化 + + + + ShortcutManager + + + + The shortcut %1 is invalid, + %1為無效快捷鍵, + + + + + + The shortcut %1 was already in use, + 快捷鍵%1已被占用, + + + + TabRenameWidget + + + Insert + 插入 + + + + + username: %u + 使用者名稱:%u + + + + username@: %U + 使用者名稱@:%U + + + + remote host: %h + 遠端主機:%h + + + + + session number: %# + 工作階段編號:%# + + + + + title set by shell: %w + shell設定的視窗標題:%w + + + + program name: %n + 程式名:%n + + + + current directory (short): %d + 目前目錄(短):%d + + + + current directory (long): %D + 目前目錄(長):%D + + + + local host: %h + 本機主機:%h + + + + TermWidget + + + Copy + 複製 + + + + Paste + 貼上 + + + + Open + 開啟 + + + + Open in file manager + 在檔案管理器中開啟 + + + + + Horizontal split + 水平分割 + + + + + Vertical split + 垂直分割 + + + + + New tab + 建立標籤頁 + + + + Exit fullscreen + 退出全螢幕 + + + + Fullscreen + 全螢幕 + + + + Find + 尋找 + + + + Search + 搜尋 + + + + Encoding + 編碼 + + + + Custom commands + 自訂命令 + + + + Remote management + 遠端管理 + + + + Upload file + 上傳檔案 + + + + Download file + 下載檔案 + + + + Settings + 設定 + + + + Utils + + + + Cancel + button + 取 消 + + + + Close + button + 離 開 + + + + + OK + button + 確 定 + + + \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_af.ts deepin-terminal-5.4.13/translations/desktop/desktop_af.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_af.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_af.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalNew WindowQuake TerminalTerminalTerminaalUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_am_ET.ts deepin-terminal-5.4.13/translations/desktop/desktop_am_ET.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_am_ET.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_am_ET.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalየ ዲፕኢን ተርሚናልNew WindowQuake TerminalTerminalተርሚናልUse the command lineየ ትእዛዝ መስመር ይጠቀሙshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ar.ts deepin-terminal-5.4.13/translations/desktop/desktop_ar.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ar.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ar.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalطرفية ديبينNew Windowنافذة جديدةQuake Terminalطرفية كواكTerminalالطرفيةUse the command lineاستخدام سطر الأوامرshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ast.ts deepin-terminal-5.4.13/translations/desktop/desktop_ast.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ast.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ast.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowVentana nuevaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUsa la llinia de comandosshell;prompt;command;commandline;shell;comandu;llinia;llinia de comandos;comandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_az.ts deepin-terminal-5.4.13/translations/desktop/desktop_az.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_az.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_az.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowYeni PəncərəQuake TerminalQuake TerminalTerminalTerminalUse the command lineƏmr sətirindən istifadə etshell;prompt;command;commandline;shell;prompt;command;commandline;üz qabığı;dəvət;əmr;əmrsətri; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bg.ts deepin-terminal-5.4.13/translations/desktop/desktop_bg.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bg.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_bg.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin терминалNew WindowНов прозорецQuake TerminalQuake терминалTerminalТерминалUse the command lineИзползване на команден редshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bn.ts deepin-terminal-5.4.13/translations/desktop/desktop_bn.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bn.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_bn.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalNew WindowQuake TerminalTerminalপ্রান্তিকUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bo.ts deepin-terminal-5.4.13/translations/desktop/desktop_bo.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_bo.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_bo.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalགཏིང་ཟབ་མཐའ་སྣེ།New Windowསྒེའུ་ཁུང་གསར་བཟོ།Quake Terminalཐོག་ལྷའི་མཐའ་སྣེ།Terminalམཐའ་སྣེ། Use the command lineབཀའི་ཕྲེང་སྤྱོད་པ།shell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_br.ts deepin-terminal-5.4.13/translations/desktop/desktop_br.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_br.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_br.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowPrenestr nevezQuake TerminalTerminal QuakeTerminalTerminalUse the command lineImplijout ul linenn urzhiadshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ca.ts deepin-terminal-5.4.13/translations/desktop/desktop_ca.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ca.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ca.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal del Deepin New WindowFinestra novaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUseu la línia d'ordresshell;prompt;command;commandline;shell;intèrpret;intèrpret d'ordres;ordres;ordre;línia d'ordres; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_cs.ts deepin-terminal-5.4.13/translations/desktop/desktop_cs.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_cs.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_cs.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminálNew WindowNové oknoQuake TerminalVysouvací terminál (quake)TerminalTerminálUse the command linePoužít příkazový řádekshell;prompt;command;commandline;shell;prompt;příkaz;příkazový řádek; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_da.ts deepin-terminal-5.4.13/translations/desktop/desktop_da.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_da.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_da.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin terminalNew WindowNyt vindueQuake TerminalQuake-terminalTerminalTerminalUse the command lineBrug kommandolinjenshell;prompt;command;commandline;skal;prompt;kommando;kommandolinje; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_de.ts deepin-terminal-5.4.13/translations/desktop/desktop_de.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_de.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_de.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowNeues FensterQuake TerminalQuake TerminalTerminalTerminalUse the command lineKommandozeile benutzenshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_el.ts deepin-terminal-5.4.13/translations/desktop/desktop_el.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_el.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_el.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TερματικόNew WindowΝέο παράθυροQuake TerminalΤερματικό "Quake"TerminalΤερματικόUse the command lineΧρήση της γραμμής εντολώνshell;prompt;command;commandline;κέλυφος;προτροπή;εντολή;γραμμή-εντολών; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_en_AU.ts deepin-terminal-5.4.13/translations/desktop/desktop_en_AU.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_en_AU.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_en_AU.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalTerminalUse the command lineUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_eo.ts deepin-terminal-5.4.13/translations/desktop/desktop_eo.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_eo.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_eo.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin terminaloNew WindowQuake TerminalTerminalTerminaloUse the command lineUzi la komandlinioshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_es_419.ts deepin-terminal-5.4.13/translations/desktop/desktop_es_419.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_es_419.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_es_419.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowNueva ventanaQuake TerminalTerminal en modo QuakeTerminalTerminal Use the command lineUsar la línea de comandosshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_es.ts deepin-terminal-5.4.13/translations/desktop/desktop_es.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_es.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_es.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminalNew WindowNueva ventanaQuake TerminalTerminal QuakeTerminalTerminal Use the command lineUsar la línea de comandoshell;prompt;command;commandline;shell;prompt;command;comando;commandline;lineadecomandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fa.ts deepin-terminal-5.4.13/translations/desktop/desktop_fa.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fa.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_fa.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalترمینال دیپینNew Windowپنجره جدیدQuake Terminalترمینال QuakeTerminalترمینالUse the command lineاستفاده از خط فرمانshell;prompt;command;commandline;پوسته ؛ سریع ؛ فرمان ؛ خط فرمان ؛ \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fil.ts deepin-terminal-5.4.13/translations/desktop/desktop_fil.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fil.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_fil.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fi.ts deepin-terminal-5.4.13/translations/desktop/desktop_fi.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fi.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_fi.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin pääteNew WindowUusi ikkunaQuake TerminalQuake pääteTerminalPääteUse the command lineKäytä komentoriviäshell;prompt;command;commandline;shell;kehote;komento;komentorivi;pääte;terminaali; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fr.ts deepin-terminal-5.4.13/translations/desktop/desktop_fr.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_fr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_fr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowNouvelle fenêtreQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUtiliser la ligne de commandeshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_gl_ES.ts deepin-terminal-5.4.13/translations/desktop/desktop_gl_ES.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_gl_ES.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_gl_ES.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminalNew WindowNova xanelaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineEmpregar a liña de comandosshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_he.ts deepin-terminal-5.4.13/translations/desktop/desktop_he.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_he.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_he.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalמסוף DeepinNew WindowQuake TerminalTerminalמסוףUse the command lineהשתמש בשורת פקודהshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hi_IN.ts deepin-terminal-5.4.13/translations/desktop/desktop_hi_IN.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hi_IN.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_hi_IN.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalडीपइन छोरNew WindowQuake TerminalTerminalटर्मिनलUse the command lineआदेश रेखा का उपयोग करेंshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hr.ts deepin-terminal-5.4.13/translations/desktop/desktop_hr.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_hr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin terminalNew WindowNovi prozorQuake TerminalQuake terminalTerminalTerminalUse the command lineKoristi naredbeni redakshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hu.ts deepin-terminal-5.4.13/translations/desktop/desktop_hu.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hu.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_hu.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin® TerminálNew WindowÚj ablakQuake TerminalLebegő TerminálTerminalTerminálUse the command lineParancssor használatashell;prompt;command;commandline;shell;prompt;parancs;parancssor \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hy.ts deepin-terminal-5.4.13/translations/desktop/desktop_hy.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_hy.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_hy.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin ՏերմինալNew WindowQuake TerminalTerminalUse the command lineՕգտագործել հրամանների տողըshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_id.ts deepin-terminal-5.4.13/translations/desktop/desktop_id.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_id.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_id.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowJendela BaruQuake TerminalTerminal QuakeTerminalTerminalUse the command lineGunakan baris perintahshell;prompt;command;commandline;shell;prompt;perintah;barisperintah; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_it.ts deepin-terminal-5.4.13/translations/desktop/desktop_it.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_it.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_it.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminale di DeepinNew WindowNuova finestraQuake TerminalTerminale in primo pianoTerminalTerminaleUse the command lineUsa linea di comandoshell;prompt;command;commandline;shell;prompt;command;commandline;terminale;cmd;script;bash; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ja.ts deepin-terminal-5.4.13/translations/desktop/desktop_ja.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ja.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ja.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin ターミナルNew Window新しいウィンドウQuake Terminalターミナルを振動させるTerminalターミナルUse the command lineコマンドラインを使用するshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ko.ts deepin-terminal-5.4.13/translations/desktop/desktop_ko.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ko.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ko.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin 터미널New Window새 창Quake Terminal퀘이크 터미널Terminal터미널Use the command line명령 행 사용shell;prompt;command;commandline;shell;prompt;command;commandline;쉘;프롬프트;명령;명령행; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_lt.ts deepin-terminal-5.4.13/translations/desktop/desktop_lt.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_lt.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_lt.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin terminalasNew WindowNaujas langasQuake TerminalQuake terminalasTerminalTerminalasUse the command lineNaudoti komandų eilutęshell;prompt;command;commandline;apvalkalas;užklausa;komanda;komandų eilutė;eilutė;komandos; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ml.ts deepin-terminal-5.4.13/translations/desktop/desktop_ml.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ml.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ml.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminalഡീപിൻ ടെർമിനൽNew WindowQuake TerminalTerminalടെർമിനൽUse the command lineകമാൻഡ് ലൈൻ ഉപയോഗിക്കുകshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_mn.ts deepin-terminal-5.4.13/translations/desktop/desktop_mn.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_mn.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_mn.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalДээпин ТерминалNew WindowШинэ ЦонхQuake TerminalКуаке ТерминалTerminalТерминалUse the command lineКомманд мѳр ашиглахshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ms.ts deepin-terminal-5.4.13/translations/desktop/desktop_ms.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ms.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ms.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowTerminal BaharuQuake TerminalTerminal QuakeTerminalTerminalUse the command lineguna baris perintahshell;prompt;command;commandline;shell;prom;perintah;barisperintah; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_nb.ts deepin-terminal-5.4.13/translations/desktop/desktop_nb.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_nb.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_nb.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin terminalNew WindowQuake TerminalTerminalTerminalUse the command lineBruk kommandolinjenshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ne.ts deepin-terminal-5.4.13/translations/desktop/desktop_ne.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ne.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ne.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalNew WindowQuake TerminalTerminalटर्मिनलUse the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_nl.ts deepin-terminal-5.4.13/translations/desktop/desktop_nl.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_nl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_nl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowNieuw vensterQuake TerminalQuake-terminalTerminalTerminalUse the command lineGebruik de opdrachtregelshell;prompt;command;commandline;shell;prompt;opdracht;opdrachtregel; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pam.ts deepin-terminal-5.4.13/translations/desktop/desktop_pam.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pam.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_pam.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowQuake TerminalTerminalUse the command lineGamitan ing command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pl.ts deepin-terminal-5.4.13/translations/desktop/desktop_pl.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_pl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowNowe oknoQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUżyj wiersza poleceńshell;prompt;command;commandline;powłoka;zapytanie;polecenie;wiersz;poleceń; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pt_BR.ts deepin-terminal-5.4.13/translations/desktop/desktop_pt_BR.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pt_BR.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_pt_BR.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminaldeepin TerminalNew WindowNova JanelaQuake TerminalTerminal QuakeTerminalTerminalUse the command lineUsar a linha de comandoshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pt.ts deepin-terminal-5.4.13/translations/desktop/desktop_pt.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_pt.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_pt.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowNova janelaQuake TerminalTerminal deslizanteTerminalTerminalUse the command lineUtilize a linha de comandosshell;prompt;command;commandline;shell;prompt;comando;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ro.ts deepin-terminal-5.4.13/translations/desktop/desktop_ro.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ro.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ro.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminalul DeepinNew WindowFereastră NouăQuake TerminalTerminal QuakeTerminalTerminalUse the command lineFolosește linia de comandăshell;prompt;command;commandline;shell;prompt;comandă;liniecomandă; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ru.ts deepin-terminal-5.4.13/translations/desktop/desktop_ru.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ru.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminal Терминал Deepin New WindowНовое ОкноQuake TerminalВыпадающий ТерминалTerminalТерминалUse the command lineИспользовать командную строкуshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sk.ts deepin-terminal-5.4.13/translations/desktop/desktop_sk.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sk.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_sk.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminálNew WindowNové oknoQuake TerminalQuake terminálTerminalTerminálUse the command linePoužiť príkazový riadokshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sl.ts deepin-terminal-5.4.13/translations/desktop/desktop_sl.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sl.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_sl.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminal DeepinNew WindowQuake TerminalTerminalTerminalUse the command lineUporabi ukazno vrsticoshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sq.ts deepin-terminal-5.4.13/translations/desktop/desktop_sq.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sq.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_sq.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalTerminali DeepinNew WindowDritare e ReQuake TerminalTerminal QuakeTerminalTerminalUse the command linePërdorni rresht urdhrashshell;prompt;command;commandline;shell;prompt;urdhër;rreshturdhrash; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sr.ts deepin-terminal-5.4.13/translations/desktop/desktop_sr.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_sr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalДипин ТерминалNew WindowНови прозорQuake TerminalСпуштајући терминалTerminalТерминалUse the command lineКористите командну линијуshell;prompt;command;commandline;shell;prompt;команда;командна линија; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sv.ts deepin-terminal-5.4.13/translations/desktop/desktop_sv.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_sv.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_sv.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin-terminalNew WindowNytt fönsterQuake TerminalQuake TerminalTerminalTerminalUse the command lineAnvänd kommandoradenshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ta.ts deepin-terminal-5.4.13/translations/desktop/desktop_ta.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ta.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ta.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalNew WindowQuake TerminalTerminalமுனையம்Use the command lineshell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_tr.ts deepin-terminal-5.4.13/translations/desktop/desktop_tr.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_tr.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_tr.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin UçbirimNew WindowYeni PencereQuake TerminalQuake UçbirimTerminalUçbirimUse the command lineKomut satırını kullanshell;prompt;command;commandline;kabuk;komut;komutsatırı; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop.ts deepin-terminal-5.4.13/translations/desktop/desktop.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowNew WindowQuake TerminalQuake TerminalTerminalTerminalUse the command lineUse the command lineshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ug.ts deepin-terminal-5.4.13/translations/desktop/desktop_ug.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_ug.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_ug.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin تېرمىنالىNew Windowيېڭىدىن كۆزنەك قۇرۇشQuake TerminalQuake تېرمىنالىTerminalتېرمىنالUse the command lineبۇيرۇق ئىشلىتىشshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_uk.ts deepin-terminal-5.4.13/translations/desktop/desktop_uk.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_uk.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_uk.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalТермінал DeepinNew WindowНове вікноQuake TerminalТермінал QuakeTerminalТерміналUse the command lineВикористовувати командний рядокshell;prompt;command;commandline;shell;prompt;command;commandline;оболонка;запит;команда;командна;рядок; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_vi.ts deepin-terminal-5.4.13/translations/desktop/desktop_vi.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_vi.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_vi.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin TerminalNew WindowCửa sổ mớiQuake TerminalQuake TerminalTerminalĐầu cuốiUse the command lineSử dụng lệnhshell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_CN.ts deepin-terminal-5.4.13/translations/desktop/desktop_zh_CN.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_CN.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_zh_CN.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin Terminal深度终端New Window新建窗口Quake Terminal雷神终端Terminal终端Use the command line使用命令行shell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_HK.ts deepin-terminal-5.4.13/translations/desktop/desktop_zh_HK.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_HK.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_zh_HK.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin 終端New Window新建視窗Quake Terminal雷神終端Terminal終端Use the command line使用命令列shell;prompt;command;commandline;shell;prompt;command;commandline; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_TW.ts deepin-terminal-5.4.13/translations/desktop/desktop_zh_TW.ts --- deepin-terminal-5.0.0+ds1/translations/desktop/desktop_zh_TW.ts 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/translations/desktop/desktop_zh_TW.ts 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1 @@ +desktopDeepin TerminalDeepin 終端機New Window新增視窗Quake Terminal雷神模式終端器Terminal終端機Use the command line使用命令列介面shell;prompt;command;commandline;shell;prompt;command;commandline;提示;指令;指令列; \ No newline at end of file diff -Nru deepin-terminal-5.0.0+ds1/.travis.yml deepin-terminal-5.4.13/.travis.yml --- deepin-terminal-5.0.0+ds1/.travis.yml 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -dist: xenial - -language: minimal - -before_install: - - docker pull hualet/deepin:stable-unclean - -script: - - ls -al - - docker run --rm -w /source -v `pwd`:/source --add-host=packages.deepin.com:202.141.160.114 hualet/deepin:stable-unclean /bin/bash -c "apt build-dep deepin-terminal -y && dpkg-buildpackage -us -uc -nc -j`nproc`" - -services: - - docker diff -Nru deepin-terminal-5.0.0+ds1/.tx/config deepin-terminal-5.4.13/.tx/config --- deepin-terminal-5.0.0+ds1/.tx/config 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/.tx/config 2021-09-01 02:11:44.000000000 +0000 @@ -4,13 +4,19 @@ mode = developer [deepin-terminal.deepin-terminal] -file_filter = po//LC_MESSAGES/deepin-terminal.po -source_file = i18n/deepin-terminal.pot -source_lang = en -type = PO +file_filter = translations/deepin-terminal_.ts +source_file = translations/deepin-terminal.ts +source_lang = en_US +type = QT + +[deepin-terminal.terminalwidget] +file_filter = 3rdparty/terminalwidget/lib/translations/terminalwidget_.ts +source_file = 3rdparty/terminalwidget/lib/translations/terminalwidget.ts +source_lang = en_US +type = QT [deepin-terminal.deepin-terminal-desktop] -file_filter = i18n/translations/deepin-terminal-desktop/desktop_.ts -source_file = i18n/translations/deepin-terminal-desktop/desktop.ts +file_filter = translations/desktop/desktop_.ts +source_file = translations/desktop/desktop.ts source_lang = en type = QT diff -Nru deepin-terminal-5.0.0+ds1/.tx/ts2desktop deepin-terminal-5.4.13/.tx/ts2desktop --- deepin-terminal-5.0.0+ds1/.tx/ts2desktop 1970-01-01 00:00:00.000000000 +0000 +++ deepin-terminal-5.4.13/.tx/ts2desktop 2021-09-01 02:11:44.000000000 +0000 @@ -0,0 +1,4 @@ +DESKTOP_TEMP_FILE=deepin-terminal.desktop.tmp +DESKTOP_SOURCE_FILE=deepin-terminal.desktop +DESKTOP_DEST_FILE=deepin-terminal.desktop +DESKTOP_TS_DIR=translations/desktop diff -Nru deepin-terminal-5.0.0+ds1/view_color.sh deepin-terminal-5.4.13/view_color.sh --- deepin-terminal-5.0.0+ds1/view_color.sh 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/view_color.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -# | -# | View color scheme in terminal -# | =========================================== -function gogh_colors () { - echo "" - echo -e "\e[0;30m█████\\e[0m\e[0;31m█████\\e[0m\e[0;32m█████\\e[0m\e[0;33m█████\\e[0m\e[0;34m█████\\e[0m\e[0;35m█████\\e[0m\e[0;36m█████\\e[0m\e[0;37m█████\\e[0m" - echo -e "\e[0m\e[1;30m█████\\e[0m\e[1;31m█████\\e[0m\e[1;32m█████\\e[0m\e[1;33m█████\\e[0m\e[1;34m█████\\e[0m\e[1;35m█████\\e[0m\e[1;36m█████\\e[0m\e[1;37m█████\\e[0m" - echo "" -} - -gogh_colors diff -Nru deepin-terminal-5.0.0+ds1/widget/about_dialog.vala deepin-terminal-5.4.13/widget/about_dialog.vala --- deepin-terminal-5.0.0+ds1/widget/about_dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/about_dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class AboutDialog : Widgets.Dialog { - public Gtk.Widget? focus_widget; - - public AboutDialog(Gtk.Widget? widget) { - focus_widget = widget; - - var overlay = new Gtk.Overlay(); - - var close_button = Widgets.create_close_button(); - close_button.clicked.connect((b) => { - this.destroy(); - }); - - destroy.connect((w) => { - if (focus_widget != null) { - focus_widget.grab_focus(); - } - }); - - var button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - button_box.pack_start(close_button, true, true, 0); - - var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - box.pack_start(button_box, false, false, 0); - - var about_widget = new AboutWidget(); - box.pack_start(about_widget, true, true, 0); - - set_init_size(500, 460); - - int about_text_height = Draw.get_text_render_height( - about_widget, - about_widget.about_text, - window_init_width - about_widget.about_x * 2, - about_widget.about_height, - about_widget.about_height, - Pango.Alignment.LEFT, - "top", - window_init_width - about_widget.about_x * 2); - - window_init_height += about_text_height; - - var event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - if (screen_monitor.is_composited()) { - event_area.margin_bottom = window_init_height - window_frame_margin_top - window_frame_margin_bottom - Constant.TITLEBAR_HEIGHT; - } else { - event_area.margin_bottom = window_init_height - Constant.TITLEBAR_HEIGHT; - } - - overlay.add(box); - overlay.add_overlay(event_area); - - add_widget(overlay); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/about_widget.vala deepin-terminal-5.4.13/widget/about_widget.vala --- deepin-terminal-5.0.0+ds1/widget/about_widget.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/about_widget.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class AboutWidget : Gtk.Box { - public Cairo.ImageSurface icon_surface; - public Cairo.ImageSurface logo_surface; - public int about_height = 9; - public int about_x = 38; - public int about_y = 270; - public int acknowledgments_y = 10; - public int height = 320; - public int homepage_y = 200; - public int icon_y = 13; - public int logo_y = 176; - public int name_height = 13; - public int name_y = 106; - public int version_height = 12; - public int version_size = 9; - public int version_y = 146; - public string about_text; - - public AboutWidget() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - about_text = _("Deepin Terminal is an advanced terminal emulator with workspace, multiple windows, remote management, quake mode and other features.\n\nIt sharpens your focus in the world of command line!"); - - icon_surface = Utils.create_image_surface("icon.svg"); - logo_surface = Utils.create_image_surface("logo.svg"); - - set_size_request(-1, height); - - var content_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - content_box.margin_top = homepage_y; - - // Add homepage. - try { - // Check deepin system's version is whether professional. - string os_version_path = "/etc/deepin-version"; - bool is_professional = false; - var version_file = File.new_for_path(os_version_path); - if (version_file.query_exists()) { - var version_config_file = new KeyFile(); - version_config_file.load_from_file(os_version_path, KeyFileFlags.NONE); - - is_professional = version_config_file.get_string("Release", "Type") == "Professional"; - } - - string homepage_name = is_professional ? "www.deepin.com" : "www.deepin.org"; - string homepage_link = "https://" + homepage_name; - - var homepage_area = new Widgets.LinkButton(homepage_name, homepage_link, "homepage"); - content_box.pack_start(homepage_area, false, false, 0); - } catch (Error e) { - print("AboutWidget error: %s", e.message); - } - - var acknowledgments_area = new Widgets.LinkButton(_("Acknowledgments"), "https://www.deepin.org/acknowledgments/deepin-terminal", "acknowledgments"); - acknowledgments_area.margin_top = acknowledgments_y; - content_box.pack_start(acknowledgments_area, false, false, 0); - - pack_start(content_box, true, true, 0); - - draw.connect(on_draw); - - show_all(); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - // Draw icon. - Draw.draw_surface(cr, icon_surface, (rect.width - icon_surface.get_width() / get_scale_factor()) / 2, icon_y); - - // Draw name. - cr.set_source_rgba(0, 0, 0, 1); - Draw.draw_text(cr, _("Deepin Terminal"), 0, name_y, rect.width, name_height, name_height, Pango.Alignment.CENTER, "top"); - - // Draw version. - cr.set_source_rgba(0.4, 0.4, 0.4, 1); - Draw.draw_text(cr, "%s %s".printf(_("Version:"), Constant.VERSION), 0, version_y, rect.width, version_height, version_size, Pango.Alignment.CENTER, "top"); - - // Draw logo. - Draw.draw_surface(cr, logo_surface, (rect.width - logo_surface.get_width() / get_scale_factor()) / 2, logo_y); - - // Draw about. - cr.set_source_rgba(0.1, 0.1, 0.1, 1); - Draw.draw_text(cr, about_text, about_x, about_y, rect.width - about_x * 2, about_height, about_height, Pango.Alignment.CENTER, "top", rect.width - about_x * 2); - - Utils.propagate_draw(this, cr); - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/add_button.vala deepin-terminal-5.4.13/widget/add_button.vala --- deepin-terminal-5.0.0+ds1/widget/add_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/add_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class AddButton : Gtk.Button { - public int height = 36; - - public AddButton(string button_name) { - set_label("+ %s".printf(button_name)); - set_size_request(-1, height); - - realize.connect((w) => { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - get_style_context().add_class("add_button_light"); - } else { - get_style_context().add_class("add_button_dark"); - } - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/appbar.vala deepin-terminal-5.4.13/widget/appbar.vala --- deepin-terminal-5.0.0+ds1/widget/appbar.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/appbar.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,292 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -[DBus (name = "com.deepin.terminal")] -interface TerminalBus : Object { - public abstract void exit() throws Error; - public signal void quit(); -} - -namespace Widgets { - public class Appbar : Gtk.Overlay { - public int height = Constant.TITLEBAR_HEIGHT; - public Box max_toggle_box; - public Box window_button_box; - public Box window_close_button_box; - public Gtk.Widget? focus_widget; - public Menu.Menu menu; - public Tabbar tabbar; - public Widgets.Window window; - public Widgets.WindowEventArea event_area; - public WindowButton close_button; - public WindowButton max_button; - public WindowButton menu_button; - public WindowButton min_button; - public WindowButton quit_fullscreen_button; - public WindowButton unmax_button; - public WorkspaceManager workspace_manager; - public int logo_width = 48; - public int titlebar_right_cache_width = 10; - public int menu_button_width = Constant.WINDOW_BUTTON_WIDHT; - - public signal void close_window(); - public signal void exit_terminal(); - public signal void quit_fullscreen(); - - public Appbar(TerminalApp app, Widgets.Window win, Tabbar tab_bar, WorkspaceManager manager, bool has_start) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - window = win; - workspace_manager = manager; - - set_size_request(-1, height); - - if (has_start) { - // If has one terminal start, - // just call *first* temrinal's 'exit' function, then *first* terminal process will broadcast 'quit' signal, - // all other terminals will quit when catch 'quit' signal that emit from *first* terminal. - TerminalBus bus = null; - try { - bus = Bus.get_proxy_sync( - BusType.SESSION, - "com.deepin.terminal", - "/com/deepin/terminal"); - bus.quit.connect(() => { - window.quit(); - }); - exit_terminal.connect(() => { - try { - bus.exit(); - } catch (Error e) { - stderr.printf("AppBar bus.ext: %s\n", e.message); - } - }); - } catch (Error e) { - stderr.printf("AppBar bus own: %s\n", e.message); - } - } else { - // If current temrinal is *first* one, - // broadcast 'quit' signal to other terminals and quit itself. - exit_terminal.connect(() => { - app.exit(); - }); - } - - tabbar = tab_bar; - - window_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - window_close_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - // Hide all butons. Only right-click menu will be working - if (Utils.is_tiling_wm()) menu_button_width = 0; - - menu_button = new WindowButton("window_menu", true, menu_button_width, Constant.TITLEBAR_HEIGHT); - min_button = new WindowButton("window_min", true, menu_button_width, Constant.TITLEBAR_HEIGHT); - max_button = new WindowButton("window_max", true, menu_button_width, Constant.TITLEBAR_HEIGHT); - unmax_button = new WindowButton("window_unmax", true, menu_button_width, Constant.TITLEBAR_HEIGHT); - close_button = new WindowButton("window_close", true, menu_button_width + Constant.CLOSE_BUTTON_MARGIN_RIGHT, Constant.TITLEBAR_HEIGHT); - - quit_fullscreen_button = new WindowButton("quit_fullscreen", true, Constant.WINDOW_BUTTON_WIDHT + Constant.CLOSE_BUTTON_MARGIN_RIGHT, Constant.TITLEBAR_HEIGHT); - - close_button.clicked.connect((w) => { - close_window(); - }); - quit_fullscreen_button.clicked.connect((w) => { - quit_fullscreen(); - }); - - menu_button.clicked.connect((b) => { - focus_widget = ((Gtk.Window) menu_button.get_toplevel()).get_focus(); - - var menu_content = new List(); - menu_content.append(new Menu.MenuItem("new_window", _("New window"))); - menu_content.append(new Menu.MenuItem("switch_theme", _("Switch theme"))); - menu_content.append(new Menu.MenuItem("custom_commands", _("Custom commands"))); - menu_content.append(new Menu.MenuItem("remote_manage", _("Remote management"))); - menu_content.append(new Menu.MenuItem("", "")); - menu_content.append(new Menu.MenuItem("preference", _("Settings"))); - if (Utils.is_command_exist("dman")) { - menu_content.append(new Menu.MenuItem("help", _("Help"))); - } - menu_content.append(new Menu.MenuItem("about", _("About"))); - menu_content.append(new Menu.MenuItem("exit", _("Exit"))); - - int menu_x, menu_y; - menu_button.translate_coordinates(menu_button.get_toplevel(), 0, 0, out menu_x, out menu_y); - Gtk.Allocation menu_rect; - menu_button.get_allocation(out menu_rect); - int window_x, window_y; - menu_button.get_toplevel().get_window().get_origin(out window_x, out window_y); - - menu = new Menu.Menu(window_x + menu_x, window_y + menu_y + menu_rect.height, menu_content); - menu.click_item.connect(handle_menu_item_click); - menu.destroy.connect(handle_menu_destroy); - }); - - max_toggle_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - - min_button.clicked.connect((w, e) => { - ((Gtk.Window) w.get_toplevel()).iconify(); - }); - max_button.clicked.connect((w, e) => { - ((Gtk.Window) w.get_toplevel()).maximize(); - }); - unmax_button.clicked.connect((w, e) => { - ((Gtk.Window) w.get_toplevel()).unmaximize(); - }); - - Box box = new Box(Gtk.Orientation.HORIZONTAL, 0); - - var logo_box = new Box(Gtk.Orientation.VERTICAL, 0); - logo_box.set_size_request(logo_width, Constant.TITLEBAR_HEIGHT); - Gtk.Image logo_image = new Gtk.Image.from_file(Utils.get_image_path("title_icon.svg")); - logo_box.pack_start(logo_image, true, true, 0); - box.pack_start(logo_box, false, false, 0); - - max_toggle_box.add(max_button); - - box.pack_start(tabbar, true, true, 0); - var cache_area = new Gtk.EventBox(); - cache_area.set_size_request(titlebar_right_cache_width, -1); - box.pack_start(cache_area, false, false, 0); - box.pack_start(window_button_box, false, false, 0); - box.pack_start(window_close_button_box, false, false, 0); - - show_window_button(); - - event_area = new Widgets.WindowEventArea(this); - // Don't override window button area. - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH * 4; - event_area.filter_double_click_callback = ((x, y) => { - int tabbar_x, tabbar_y; - this.translate_coordinates(tabbar, x, y, out tabbar_x, out tabbar_y); - - return tabbar.is_at_tab_close_button((int) tabbar_x) != -1; - }); - - add(box); - add_overlay(event_area); - - Gdk.RGBA background_color = Gdk.RGBA(); - - box.draw.connect((w, cr) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - try { - background_color = Utils.hex_to_rgba(window.config.config_file.get_string("theme", "background")); - if (window.window_is_fullscreen()) { - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, 0.8); - } else { - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, window.config.config_file.get_double("general", "opacity")); - } - Draw.draw_rectangle(cr, 0, 0, rect.width, Constant.TITLEBAR_HEIGHT); - } catch (Error e) { - print("Main window: %s\n", e.message); - } - - Utils.propagate_draw((Container) w, cr); - - return true; - }); - } - - public void show_window_button() { - window_button_box.pack_start(menu_button, false, false, 0); - window_button_box.pack_start(min_button, false, false, 0); - window_button_box.pack_start(max_toggle_box, false, false, 0); - - Utils.remove_all_children(window_close_button_box); - window_close_button_box.pack_start(close_button, false, false, 0); - - show_all(); - } - - public void hide_window_button() { - Utils.remove_all_children(window_button_box); - Utils.remove_all_children(window_close_button_box); - - window_close_button_box.pack_start(quit_fullscreen_button, false, false, 0); - } - - public void handle_menu_item_click(string item_id) { - switch(item_id) { - case "new_window": - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline("deepin-terminal", null, GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("Appbar menu item 'new window': %s\n", e.message); - } - break; - case "custom_commands": - workspace_manager.focus_workspace.show_command_panel(workspace_manager.focus_workspace); - break; - case "remote_manage": - workspace_manager.focus_workspace.show_remote_panel(workspace_manager.focus_workspace); - break; - case "switch_theme": - workspace_manager.focus_workspace.show_theme_panel(workspace_manager.focus_workspace); - break; - case "help": - Utils.show_manual(); - break; - case "about": - var dialog = new AboutDialog(focus_widget); - dialog.transient_for_window((Widgets.ConfigWindow) this.get_toplevel()); - break; - case "exit": - // This just call exit_terminal signal, how to exit terminal looks signal exit_terminal's hooks that define at current class. - exit_terminal(); - break; - case "preference": - var preference = new Widgets.Preference((Widgets.ConfigWindow) this.get_toplevel(), ((Gtk.Window) this.get_toplevel()).get_focus()); - preference.transient_for_window((Widgets.ConfigWindow) this.get_toplevel()); - break; - } - } - - public void handle_menu_destroy() { - menu = null; - - if (focus_widget != null) { - focus_widget.grab_focus(); - } - } - - public void update_max_button() { - Utils.remove_all_children(max_toggle_box); - - if (((Widgets.Window) get_toplevel()).window_is_max()) { - max_toggle_box.add(unmax_button); - } else { - max_toggle_box.add(max_button); - } - - max_toggle_box.show_all(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/base_panel.vala deepin-terminal-5.4.13/widget/base_panel.vala --- deepin-terminal-5.0.0+ds1/widget/base_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/base_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; - -namespace Widgets { - public class BasePanel : Gtk.HBox { - public Widgets.ConfigWindow parent_window; - public WorkspaceManager workspace_manager; - public Gdk.RGBA background_color; - public Gdk.RGBA line_dark_color; - public Gdk.RGBA line_light_color; - public Gtk.Box home_page_box; - public Gtk.Box search_page_box; - public Gtk.ScrolledWindow? home_page_scrolledwindow; - public Gtk.ScrolledWindow? search_page_scrolledwindow; - public Gtk.Widget? focus_widget; - public Widgets.Switcher switcher; - public Workspace workspace; - public int back_button_margin_left = 8; - public int back_button_margin_top = 6; - - public BasePanel() { - home_page_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - search_page_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - line_dark_color = Utils.hex_to_rgba("#ffffff", 0.1); - line_light_color = Utils.hex_to_rgba("#000000", 0.1); - } - - public Gtk.ScrolledWindow create_scrolled_window() { - var scrolledwindow = new ScrolledWindow(null, null); - scrolledwindow.get_style_context().add_class("scrolledwindow"); - scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); - scrolledwindow.set_shadow_type(Gtk.ShadowType.NONE); - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - - return scrolledwindow; - } - - public void update_search_page(string search_text, string group_name) { - double scroll_value = 0; - if (search_page_scrolledwindow != null) { - scroll_value = search_page_scrolledwindow.get_vadjustment().get_value(); - } - - create_search_page(search_text, group_name); - - switcher.add_to_left_box(search_page_box); - - if (search_page_scrolledwindow != null) { - search_page_scrolledwindow.get_vadjustment().set_value(scroll_value); - } - - show_all(); - } - - public void show_home_page(Gtk.Widget? start_widget=null) { - create_home_page(); - - if (start_widget == null) { - switcher.add_to_left_box(home_page_box); - } else { - switcher.scroll_to_left(start_widget, home_page_box); - } - - show_all(); - } - - public void show_search_page(string search_text, string group_name, Gtk.Widget start_widget) { - create_search_page(search_text, group_name); - - switcher.scroll_to_right(start_widget, search_page_box); - - show_all(); - } - - public void update_home_page() { - double scroll_value = 0; - if (home_page_scrolledwindow != null) { - scroll_value = home_page_scrolledwindow.get_vadjustment().get_value(); - } - - create_home_page(); - - switcher.add_to_left_box(home_page_box); - - if (home_page_scrolledwindow != null) { - home_page_scrolledwindow.get_vadjustment().set_value(scroll_value); - } - - show_all(); - } - - public bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - Gtk.Allocation rect; - widget.get_allocation(out rect); - - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, 0.8); - Draw.draw_rectangle(cr, 1, 0, rect.width - 1, rect.height); - - if (is_light_theme) { - Utils.set_context_color(cr, line_light_color); - } else { - Utils.set_context_color(cr, line_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, 1, rect.height); - - return false; - } - - public virtual void create_search_page(string search_text, string group_name) { - } - - public virtual void create_home_page() { - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/check_button.vala deepin-terminal-5.4.13/widget/check_button.vala --- deepin-terminal-5.0.0+ds1/widget/check_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/check_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class CheckButton : Gtk.CheckButton { - public bool is_hover = false; - public bool is_press = false; - public Cairo.ImageSurface checked_hover_surface; - public Cairo.ImageSurface checked_insensitive_surface; - public Cairo.ImageSurface checked_normal_surface; - public Cairo.ImageSurface checked_press_surface; - public Cairo.ImageSurface unchecked_hover_surface; - public Cairo.ImageSurface unchecked_insensitive_surface; - public Cairo.ImageSurface unchecked_normal_surface; - public Cairo.ImageSurface unchecked_press_surface; - - public CheckButton() { - checked_normal_surface = Utils.create_image_surface("checkbox_checked_normal.svg"); - checked_hover_surface = Utils.create_image_surface("checkbox_checked_hover.svg"); - checked_press_surface = Utils.create_image_surface("checkbox_checked_press.svg"); - checked_insensitive_surface = Utils.create_image_surface("checkbox_checked_insensitive.svg"); - unchecked_normal_surface = Utils.create_image_surface("checkbox_unchecked_normal.svg"); - unchecked_hover_surface = Utils.create_image_surface("checkbox_unchecked_hover.svg"); - unchecked_press_surface = Utils.create_image_surface("checkbox_unchecked_press.svg"); - unchecked_insensitive_surface = Utils.create_image_surface("checkbox_unchecked_insensitive.svg"); - - set_size_request(checked_normal_surface.get_width() / get_scale_factor(), - checked_normal_surface.get_height() / get_scale_factor()); - - draw.connect(on_draw); - enter_notify_event.connect((w, e) => { - is_hover = true; - queue_draw(); - - return false; - }); - leave_notify_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - button_press_event.connect((w, e) => { - is_press = true; - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - is_press = false; - queue_draw(); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - if (get_sensitive()) { - if (get_active()) { - if (is_press) { - Draw.draw_surface(cr, checked_press_surface); - } else if (is_hover) { - Draw.draw_surface(cr, checked_hover_surface); - } else { - Draw.draw_surface(cr, checked_normal_surface); - } - } else { - if (is_press) { - Draw.draw_surface(cr, unchecked_press_surface); - } else if (is_hover) { - Draw.draw_surface(cr, unchecked_hover_surface); - } else { - Draw.draw_surface(cr, unchecked_normal_surface); - } - } - } else { - if (get_active()) { - Draw.draw_surface(cr, checked_insensitive_surface); - } else { - Draw.draw_surface(cr, unchecked_insensitive_surface); - } - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/click_event_box.vala deepin-terminal-5.4.13/widget/click_event_box.vala --- deepin-terminal-5.0.0+ds1/widget/click_event_box.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/click_event_box.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Utils; - -namespace Widgets { - public class ClickEventBox : Gtk.EventBox { - public bool is_press = false; - - public signal void clicked(Gdk.EventButton event); - - public ClickEventBox() { - button_press_event.connect((w, e) => { - is_press = true; - - return false; - }); - - button_release_event.connect((w, e) => { - if (is_press && Utils.is_left_button(e) && Utils.pointer_in_widget_area(this)) { - clicked(e); - } - - is_press = false; - - return false; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/command_button.vala deepin-terminal-5.4.13/widget/command_button.vala --- deepin-terminal-5.0.0+ds1/widget/command_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/command_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class CommandButton : Widgets.PanelButton { - public signal void edit_command(string command_name); - public signal void execute_command(string command_value); - - public CommandButton(string name, string value, string shortcut) { - base(name, shortcut, null, "command"); - - click_edit_button.connect((w) => { - edit_command(name); - }); - click_button.connect((w) => { - execute_command(value); - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/command_dialog.vala deepin-terminal-5.4.13/widget/command_dialog.vala --- deepin-terminal-5.0.0+ds1/widget/command_dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/command_dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,311 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class CommandDialog : Widgets.Dialog { - public Gtk.Box box; - public Gtk.Box command_action_box; - public Gtk.Box content_box; - public Widgets.DropdownTextButton backspace_key_box; - public Widgets.DropdownTextButton del_key_box; - public Widgets.DropdownTextButton encode_box; - public Gtk.Grid advanced_grid; - public Gtk.Widget? focus_widget; - public Term? focus_term; - public Widgets.ConfigWindow parent_window; - public Widgets.Entry command_entry; - public Widgets.Entry groupname_entry; - public Widgets.Entry name_entry; - public Widgets.Entry path_entry; - public Widgets.Entry port_entry; - public Widgets.Entry user_entry; - public Widgets.FileButton file_button; - public Widgets.PasswordButton password_button; - public Widgets.ShortcutEntry shortcut_entry; - public Widgets.TextButton delete_command_button; - public Widgets.TextButton show_advanced_button; - public int action_button_margin_top = 20; - public int font_size = 11; - public int grid_height = 24; - public int label_margin_left = 14; - public int max_command_name_length = 50; - public int preference_margin_end = 10; - public int preference_margin_start = 10; - public int preference_margin_top = 10; - public int preference_name_margin_left = 10; - public int preference_name_width = 0; - public int preference_widget_width = 300; - public int window_expand_height = 330; - public string? command_info; - - public signal void add_command(string name, - string command, - string shortcut - ); - public signal void edit_command(string name, - string command, - string shortcut - ); - - public signal void delete_command(string name); - - public CommandDialog(Widgets.ConfigWindow window, Term? term, Gtk.Widget? widget, string? info=null, KeyFile? config_file=null) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_init_size(480, 320); - - var font_description = new Pango.FontDescription(); - font_description.set_size((int)(font_size * Pango.SCALE)); - int max_width = 0; - string[] label_names = {_("Name"), _("Content"), _("Shortcuts")}; - foreach (string label_name in label_names) { - var layout = create_pango_layout(label_name); - layout.set_font_description(font_description); - int name_width, name_height; - layout.get_pixel_size(out name_width, out name_height); - - max_width = int.max(max_width, name_width); - } - preference_name_width = max_width + preference_name_margin_left; - - try { - parent_window = window; - focus_term = term; - focus_widget = widget; - command_info = info; - - box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - var top_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - top_box.margin_bottom = preference_margin_top; - - var event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - - var overlay = new Gtk.Overlay(); - overlay.add(top_box); - overlay.add_overlay(event_area); - - box.pack_start(overlay, false, false, 0); - - // Make label center of titlebar. - var spacing_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - spacing_box.set_size_request(Constant.CLOSE_BUTTON_WIDTH, -1); - top_box.pack_start(spacing_box, false, false, 0); - - Gtk.Label title_label = new Gtk.Label(null); - title_label.get_style_context().add_class("remote_server_label"); - top_box.pack_start(title_label, true, true, 0); - - if (command_info != null) { - title_label.set_text(_("Edit Command")); - } else { - title_label.set_text(_("Add Command")); - } - - var close_button = Widgets.create_close_button(); - close_button.clicked.connect((b) => { - this.destroy(); - }); - - top_box.pack_start(close_button, false, false, 0); - - destroy.connect((w) => { - if (focus_widget != null) { - focus_widget.grab_focus(); - } - }); - - content_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - content_box.set_halign(Gtk.Align.CENTER); - content_box.margin_start = preference_margin_start; - content_box.margin_end = preference_margin_end; - box.pack_start(content_box, false, false, 0); - - var grid = new Gtk.Grid(); - grid.margin_end = label_margin_left; - content_box.pack_start(grid, false, false, 0); - - // Name. - Label name_label = new Gtk.Label(null); - name_entry = new Widgets.Entry(); - if (command_info != null) { - name_entry.set_text(command_info); - } - name_entry.set_placeholder_text(_("Required")); - create_key_row(name_label, name_entry, _("Name:"), grid); - - // Command. - Label command_label = new Gtk.Label(null); - command_entry = new Widgets.Entry(); - if (command_info != null) { - command_entry.set_text(config_file.get_value(command_info, "Command")); - } else { - if (focus_term != null) { - command_entry.set_text(focus_term.get_selection_text()); - } - } - command_entry.set_placeholder_text(_("Required")); - create_follow_key_row(command_label, command_entry, _("Command:"), name_label, grid); - - // Shortcut. - Label shortcut_label = new Gtk.Label(null); - shortcut_entry = new Widgets.ShortcutEntry(); - if (command_info != null) { - shortcut_entry.set_text(config_file.get_value(command_info, "Shortcut")); - } - create_follow_key_row(shortcut_label, shortcut_entry, _("Shortcuts:"), command_label, grid); - - command_action_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - command_action_box.set_size_request(-1, 30); - content_box.pack_start(command_action_box, false, false, 0); - - if (command_info != null) { - add_delete_button(); - } - - Box button_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - button_box.margin_top = action_button_margin_top; - DialogButton cancel_button = new Widgets.DialogButton(_("Cancel"), "left", "text", parent_window.screen_monitor.is_composited()); - string button_name; - if (command_info != null) { - button_name = _("Save"); - } else { - button_name = _("Add"); - } - DialogButton confirm_button = new Widgets.DialogButton(button_name, "right", "action", parent_window.screen_monitor.is_composited()); - cancel_button.clicked.connect((b) => { - destroy(); - }); - confirm_button.clicked.connect((b) => { - if (command_info != null) { - if (name_entry.get_text().strip() != "" && command_entry.get_text().strip() != "") { - edit_command(name_entry.get_text(), - command_entry.get_text(), - shortcut_entry.get_text() - ); - } - } else { - if (name_entry.get_text().strip() != "" && command_entry.get_text().strip() != "") { - add_command(name_entry.get_text(), - command_entry.get_text(), - shortcut_entry.get_text() - ); - } - } - }); - - var tab_order_list = new List(); - tab_order_list.append((Gtk.Widget) cancel_button); - tab_order_list.append((Gtk.Widget) confirm_button); - button_box.set_focus_chain(tab_order_list); - button_box.set_focus_child(confirm_button); - - button_box.pack_start(cancel_button, true, true, 0); - button_box.pack_start(confirm_button, true, true, 0); - box.pack_start(button_box, false, false, 0); - - add_widget(box); - } catch (Error e) { - error ("%s", e.message); - } - } - - public void add_delete_button() { - delete_command_button = Widgets.create_delete_button(_("Delete command")); - delete_command_button.clicked.connect((w) => { - this.hide(); - - var command_name = name_entry.get_text(); - if (command_name.length > max_command_name_length) { - command_name = command_name.substring(0, max_command_name_length) + " ... "; - } - - var confirm_dialog = new Widgets.ConfirmDialog( - _("Delete command"), - _("Are you sure you want to delete %s?").printf(command_name), - _("Cancel"), - _("Delete")); - confirm_dialog.transient_for_window(parent_window); - confirm_dialog.cancel.connect((w) => { - this.destroy(); - }); - confirm_dialog.confirm.connect((w) => { - delete_command(name_entry.get_text()); - this.destroy(); - }); - }); - - command_action_box.pack_start(delete_command_button, true, true, 0); - - command_action_box.show_all(); - } - - public Label create_label(string text) { - Label label = new Gtk.Label(null); - label.margin_start = label_margin_left; - label.set_text(text); - label.get_style_context().add_class("preference_label"); - label.set_xalign(0); - - return label; - } - - public void create_key_row(Gtk.Label label, Gtk.Widget widget, string name, Gtk.Grid grid, string class_name="preference_entry") { - label.set_text(name); - label.margin_start = label_margin_left; - label.get_style_context().add_class("preference_label"); - widget.get_style_context().add_class(class_name); - widget.margin_start = label_margin_left; - - adjust_option_widgets(label, widget); - grid_attach(grid, label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(grid, widget, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void create_follow_key_row(Gtk.Label label, Gtk.Widget widget, string name, Gtk.Label previous_label, Gtk.Grid grid, string class_name="preference_entry") { - label.set_text(name); - label.margin_start = label_margin_left; - label.get_style_context().add_class("preference_label"); - widget.get_style_context().add_class(class_name); - widget.margin_start = label_margin_left; - - adjust_option_widgets(label, widget); - grid_attach_next_to(grid, label, previous_label, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - grid_attach_next_to(grid, widget, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void adjust_option_widgets(Gtk.Label name_widget, Gtk.Widget value_widget) { - name_widget.set_xalign(0); - name_widget.set_size_request(preference_name_width, grid_height); - - value_widget.set_size_request(preference_widget_width, grid_height); - // NOTE: - // set_hexpand is very important to make widget in grid to expand space horizaontally. - value_widget.set_hexpand(true); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/command_panel.vala deepin-terminal-5.4.13/widget/command_panel.vala --- deepin-terminal-5.0.0+ds1/widget/command_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/command_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,327 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Utils; -using Widgets; - -namespace Widgets { - public class CommandPanel : BasePanel { - public KeyFile config_file; - public int width = Constant.SLIDER_WIDTH; - public string config_file_path = Utils.get_config_file_path("command-config.conf"); - - public delegate void UpdatePageAfterEdit(); - - public CommandPanel(Workspace space, WorkspaceManager manager) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - workspace = space; - workspace_manager = manager; - - config_file = new KeyFile(); - - focus_widget = ((Gtk.Window) workspace.get_toplevel()).get_focus(); - parent_window = (Widgets.ConfigWindow) workspace.get_toplevel(); - try { - background_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "background")); - } catch (Error e) { - print("CommandPanel init: %s\n", e.message); - } - - switcher = new Widgets.Switcher(width); - - set_size_request(width, -1); - home_page_box.set_size_request(width, -1); - search_page_box.set_size_request(width, -1); - - pack_start(switcher, true, true, 0); - - show_home_page(); - - draw.connect(on_draw); - } - - public void load_config() { - var file = File.new_for_path(config_file_path); - if (!file.query_exists()) { - Utils.touch_dir(Utils.get_config_dir()); - Utils.create_file(config_file_path); - } else { - try { - config_file.load_from_file(config_file_path, KeyFileFlags.NONE); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - } - } - - public override void create_home_page() { - Utils.destroy_all_children(home_page_box); - home_page_scrolledwindow = null; - - ArrayList> ungroups = new ArrayList>(); - - load_config(); - - foreach (unowned string option in config_file.get_groups ()) { - add_group_item(option, ungroups, config_file); - } - - if (ungroups.size > 1) { - Widgets.SearchEntry search_entry = new Widgets.SearchEntry(); - home_page_box.pack_start(search_entry, false, false, 0); - - search_entry.search_entry.activate.connect((entry) => { - if (entry.get_text().strip() != "") { - show_search_page(entry.get_text(), "", home_page_box); - } - }); - - var split_line = new SplitLine(); - home_page_box.pack_start(split_line, false, false, 0); - } - - home_page_scrolledwindow = create_scrolled_window(); - home_page_box.pack_start(home_page_scrolledwindow, true, true, 0); - - var command_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - home_page_scrolledwindow.add(command_box); - - if (ungroups.size > 0) { - foreach (var ungroup_list in ungroups) { - var command_button = create_command_button(ungroup_list[0], ungroup_list[1], ungroup_list[2]); - command_button.edit_command.connect((w, command_name) => { - edit_command(command_name, () => { - update_home_page(); - }); - }); - command_box.pack_start(command_button, false, false, 0); - } - - } - - var split_line = new SplitLine(); - home_page_box.pack_start(split_line, false, false, 0); - - Widgets.AddButton add_command_button = create_add_command_button(); - add_command_button.margin_left = 16; - add_command_button.margin_right = 16; - add_command_button.margin_top = 16; - add_command_button.margin_bottom = 16; - home_page_box.pack_start(add_command_button, false, false, 0); - } - - public void add_command( - string name, - string command, - string shortcut) { - if (name != "" && command != "") { - Utils.touch_dir(Utils.get_config_dir()); - - load_config(); - - // Use ',' as array-element-separator instead of ';'. - config_file.set_list_separator (','); - - config_file.set_string(name, "Command", command); - config_file.set_string(name, "Shortcut", shortcut); - - try { - config_file.save_to_file(config_file_path); - } catch (Error e) { - print("add_command error occur when config_file.save_to_file %s: %s\n", config_file_path, e.message); - } - } - } - - public override void create_search_page(string search_text, string group_name) { - Utils.destroy_all_children(search_page_box); - search_page_scrolledwindow = null; - - try { - load_config(); - - ArrayList> ungroups = new ArrayList>(); - - foreach (unowned string option in config_file.get_groups ()) { - ArrayList match_list = new ArrayList(); - match_list.add(option); - foreach (string key in config_file.get_keys(option)) { - if (key == "Command" || key == "Shortcut") { - match_list.add(config_file.get_value(option, key)); - } - } - foreach (string match_text in match_list) { - if (match_text.down().contains(search_text.down())) { - add_group_item(option, ungroups, config_file); - - // Just add option one times. - break; - } - } - } - - var top_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - top_box.set_size_request(-1, Constant.REMOTE_PANEL_SEARCHBAR_HEIGHT); - search_page_box.pack_start(top_box, false, false, 0); - - ImageButton back_button = new Widgets.ImageButton("back", true); - back_button.margin_left = back_button_margin_left; - back_button.margin_top = back_button_margin_top; - back_button.clicked.connect((w) => { - show_home_page(search_page_box); - }); - top_box.pack_start(back_button, false, false, 0); - - var search_label = new Gtk.Label(null); - search_label.set_text("%s %s".printf(_("Search:"), search_text)); - top_box.pack_start(search_label, true, true, 0); - - var split_line = new SplitLine(); - search_page_box.pack_start(split_line, false, false, 0); - - search_page_scrolledwindow = create_scrolled_window(); - search_page_box.pack_start(search_page_scrolledwindow, true, true, 0); - - var command_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - search_page_scrolledwindow.add(command_box); - - foreach (var ungroup_list in ungroups) { - var command_button = create_command_button(ungroup_list[0], ungroup_list[1], ungroup_list[2]); - command_button.edit_command.connect((w, command_name) => { - edit_command(command_name, () => { - update_search_page(search_text, ""); - }); - }); - command_box.pack_start(command_button, false, false, 0); - } - - realize.connect((w) => { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - search_label.get_style_context().add_class("remote_search_label_light"); - } else { - search_label.get_style_context().add_class("remote_search_label_dark"); - } - }); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("CommandPanel create_search_page: %s\n", e.message); - } - } - - } - - public void add_group_item(string option, ArrayList> lists, KeyFile config_file) { - try { - ArrayList list = new ArrayList(); - list.add(option); - list.add(config_file.get_value(option, "Command")); - list.add(config_file.get_value(option, "Shortcut")); - lists.add(list); - } catch (Error e) { - print("add_group_item error: %s\n", e.message); - } - } - - public void edit_command(string command_name, UpdatePageAfterEdit func) { - load_config(); - - var command_dialog = new Widgets.CommandDialog(parent_window, null, this, command_name, config_file); - command_dialog.transient_for_window(parent_window); - command_dialog.delete_command.connect((name) => { - try { - // First, remove old command info from config file. - if (config_file.has_group(command_name)) { - config_file.remove_group(command_name); - config_file.save_to_file(config_file_path); - } - - func(); - } catch (Error e) { - error ("%s", e.message); - } - }); - command_dialog.edit_command.connect((name, command, shortcut) => { - try { - // First, remove old command info from config file. - if (config_file.has_group(command_name)) { - config_file.remove_group(command_name); - config_file.save_to_file(config_file_path); - } - - // Second, add new command info. - add_command(name, command, shortcut); - - func(); - - command_dialog.destroy(); - } catch (Error e) { - error ("%s", e.message); - } - }); - - command_dialog.show_all(); - } - - public Widgets.CommandButton create_command_button(string name, string value, string shortcut) { - var command_button = new Widgets.CommandButton(name, value, shortcut); - command_button.execute_command.connect((w, command) => { - execute_command(command); - }); - return command_button; - } - - public void execute_command(string command) { - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - var command_string = "%s\n".printf(command); - focus_term.term.feed_child(command_string.to_utf8()); - - workspace.hide_command_panel(); - if (focus_widget != null) { - focus_widget.grab_focus(); - } - } - - public Widgets.AddButton create_add_command_button() { - Widgets.AddButton add_command_button = new Widgets.AddButton(_("Add command")); - add_command_button.clicked.connect((w) => { - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - var command_dialog = new Widgets.CommandDialog(parent_window, focus_term, this); - command_dialog.transient_for_window(parent_window); - command_dialog.add_command.connect((name, command, shortcut) => { - add_command(name, command, shortcut); - update_home_page(); - command_dialog.destroy(); - }); - command_dialog.show_all(); - }); - - return add_command_button; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/config_window.vala deepin-terminal-5.4.13/widget/config_window.vala --- deepin-terminal-5.0.0+ds1/widget/config_window.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/config_window.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,749 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; -using Utils; - -namespace Widgets { - public class ConfigWindow : Gtk.Window { - public Config.Config config; - public Gdk.RGBA title_line_dark_color; - public Gdk.RGBA title_line_light_color; - public Gdk.Screen screen_monitor; - public Gtk.Box box; - public Gtk.Box top_box; - public Gtk.Box window_frame_box; - public Gtk.Box window_widget_box; - public WorkspaceManager workspace_manager; - public bool quake_mode = false; - public bool show_quake_menu = false; - public bool? config_theme_is_light; - public int active_tab_underline_width; - public int active_tab_underline_x; - public int cache_height = 0; - public int cache_width = 0; - public int reset_timeout_delay = 150; - public int resize_cache_x = 0; - public int resize_cache_y = 0; - public int resize_cache_width = 0; - public int resize_cache_height = 0; - public int resize_timeout_delay = 150; - public uint? reset_timeout_source_id = null; - public uint? resize_timeout_source_id = null; - - private bool is_show_shortcut_viewer = false; - - public ConfigWindow() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - load_config(); - - title_line_dark_color = Utils.hex_to_rgba("#000000", 0.3); - title_line_light_color = Utils.hex_to_rgba("#000000", 0.1); - } - - public void init(WorkspaceManager manager, Tabbar tabbar) { - set_redraw_on_allocate(true); - - workspace_manager = manager; - box = new Box(Gtk.Orientation.VERTICAL, 0); - top_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - - screen_monitor = Gdk.Screen.get_default(); - screen_monitor.composited_changed.connect(() => { - update_frame(); - }); - - delete_event.connect((w) => { - quit(); - - return true; - }); - - destroy.connect((t) => { - quit(); - }); - - key_press_event.connect((w, e) => { - return on_key_press(w, e); - }); - - key_release_event.connect((w, e) => { - return on_key_release(w, e); - }); - - enter_notify_event.connect((w, e) => { - if (resize_timeout_source_id == null) { - resize_timeout_source_id = GLib.Timeout.add(resize_timeout_delay, () => { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - if (!window_is_normal()) { - get_window().set_cursor(null); - } else if (pointer_x != resize_cache_x || pointer_y != resize_cache_y) { - resize_cache_x = pointer_x; - resize_cache_y = pointer_y; - - var cursor_type = get_cursor_type(pointer_x, pointer_y); - var display = Gdk.Display.get_default(); - if (cursor_type != null) { - get_window().set_cursor(new Gdk.Cursor.for_display(display, cursor_type)); - } else { - get_window().set_cursor(null); - } - } - - return true; - }); - } - - return false; - }); - - enter_notify_event.connect((w, e) => { - if (resize_timeout_source_id == null) { - resize_timeout_source_id = GLib.Timeout.add(resize_timeout_delay, () => { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - if (!window_is_normal()) { - get_window().set_cursor(null); - } else if (pointer_x != resize_cache_x || pointer_y != resize_cache_y) { - resize_cache_x = pointer_x; - resize_cache_y = pointer_y; - - var cursor_type = get_cursor_type(pointer_x, pointer_y); - var display = Gdk.Display.get_default(); - if (cursor_type != null) { - get_window().set_cursor(new Gdk.Cursor.for_display(display, cursor_type)); - } else { - get_window().set_cursor(null); - } - } - - return true; - }); - } - - return false; - }); - - leave_notify_event.connect((w, e) => { - if (resize_timeout_source_id != null) { - GLib.Source.remove(resize_timeout_source_id); - resize_timeout_source_id = null; - } - - if (reset_timeout_source_id == null) { - reset_timeout_source_id = GLib.Timeout.add(reset_timeout_delay, () => { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - var cursor_type = get_cursor_type(pointer_x, pointer_y); - var display = Gdk.Display.get_default(); - if (cursor_type != null) { - get_window().set_cursor(new Gdk.Cursor.for_display(display, cursor_type)); - } else { - get_window().set_cursor(null); - } - - if (cursor_type == null) { - GLib.Source.remove(reset_timeout_source_id); - reset_timeout_source_id = null; - } - - return cursor_type != null; - }); - } - - return false; - }); - - focus_out_event.connect((w) => { - remove_shortcut_viewer(); - - return false; - }); - - configure_event.connect((w) => { - int width, height; - get_size(out width, out height); - - if (cache_width != width || cache_height != height) { - foreach (var workspace_entry in workspace_manager.workspace_map.entries) { - workspace_entry.value.remove_theme_panel(); - workspace_entry.value.remove_remote_panel(); - workspace_entry.value.remove_encoding_panel(); - workspace_entry.value.remove_command_panel(); - } - - cache_width = width; - cache_height = height; - } - - return false; - }); - - init_active_tab_underline(tabbar); - } - - public void init_active_tab_underline(Tabbar tabbar) { - tabbar.update_tab_underline.connect((t, x, width) => { - int offset_x, offset_y; - tabbar.translate_coordinates(this, 0, 0, out offset_x, out offset_y); - - int tab_x = x + offset_x; - int tab_width = width; - - if (tab_x != active_tab_underline_x || tab_width != active_tab_underline_width) { - active_tab_underline_x = x + offset_x; - active_tab_underline_width = width; - - redraw_window(); - } - }); - } - - public void load_config() { - config = new Config.Config(); - config.update.connect((w) => { - update_theme_style(); - - update_terminal(this); - - redraw_window(); - }); - } - - public void update_terminal(Gtk.Container container) { - container.forall((child) => { - var child_type = child.get_type(); - - if (child_type.is_a(typeof(Widgets.Term))) { - ((Widgets.Term) child).setup_from_config(); - } else if (child_type.is_a(typeof(Gtk.Container))) { - update_terminal((Gtk.Container) child); - } - }); - } - - public void show_shortcut_viewer(int x, int y) { - remove_shortcut_viewer(); - - if (!is_show_shortcut_viewer) { - string data = get_shortcut_data(); - - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline( - "deepin-shortcut-viewer -j='%s' -p=%i,%i".printf(data, x, y), - null, - GLib.AppInfoCreateFlags.NONE); - - appinfo.launch(null, null); - is_show_shortcut_viewer = true; - } catch (Error e) { - print("ConfigWindow show_shortcut_viewer: %s\n", e.message); - } - } - } - - public void remove_shortcut_viewer() { - if (is_show_shortcut_viewer) { - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline( - "deepin-shortcut-viewer -j=''", - null, - GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (Error e) { - print("Main on_key_press: %s\n", e.message); - } - - is_show_shortcut_viewer = false; - } - } - - public string get_shortcut_data() { - // Build a object: - Json.Builder builder = new Json.Builder(); - - try { - - builder.begin_object (); - builder.set_member_name("shortcut"); - - builder.begin_array(); - - // Terminal shortcuts. - builder.begin_object (); - builder.set_member_name("groupItems"); - - builder.begin_array(); - - insert_shortcut_key(builder, _("Copy"), config.config_file.get_string("shortcut", "copy"));; - insert_shortcut_key(builder, _("Paste"), config.config_file.get_string("shortcut", "paste"));; - insert_shortcut_key(builder, _("Open"), config.config_file.get_string("shortcut", "open"));; - insert_shortcut_key(builder, _("Search"), config.config_file.get_string("shortcut", "search"));; - insert_shortcut_key(builder, _("Zoom in"), config.config_file.get_string("shortcut", "zoom_in"));; - insert_shortcut_key(builder, _("Zoom out"), config.config_file.get_string("shortcut", "zoom_out"));; - insert_shortcut_key(builder, _("Default size"), config.config_file.get_string("shortcut", "default_size"));; - insert_shortcut_key(builder, _("Select all"), config.config_file.get_string("shortcut", "select_all"));; - insert_shortcut_key(builder, _("Jump to next command"), config.config_file.get_string("shortcut", "jump_to_next_command"));; - insert_shortcut_key(builder, _("Jump to previous command"), config.config_file.get_string("shortcut", "jump_to_previous_command"));; - - builder.end_array(); - - builder.set_member_name("groupName"); - builder.add_string_value(_("Terminal")); - builder.end_object(); - - // Workspace shortcuts. - - builder.begin_object (); - builder.set_member_name("groupItems"); - - builder.begin_array(); - - var select_workspace_key = config.config_file.get_string("shortcut", "select_workspace"); - var new_theme_terminal_key = config.config_file.get_string("shortcut", "new_theme_terminal"); - insert_shortcut_key(builder, _("New workspace"), config.config_file.get_string("shortcut", "new_workspace"));; - insert_shortcut_key(builder, _("Close workspace"), config.config_file.get_string("shortcut", "close_workspace"));; - insert_shortcut_key(builder, _("Next workspace"), config.config_file.get_string("shortcut", "next_workspace"));; - insert_shortcut_key(builder, _("Previous workspace"), config.config_file.get_string("shortcut", "previous_workspace"));; - insert_shortcut_key(builder, _("Select workspace"), "%s + 1 ~ %s + 9".printf(select_workspace_key, select_workspace_key));; - insert_shortcut_key(builder, _("Open terminal with a new theme"), "%s + 1 ~ %s + 9".printf(new_theme_terminal_key, new_theme_terminal_key));; - insert_shortcut_key(builder, _("Vertical split"), config.config_file.get_string("shortcut", "vertical_split"));; - insert_shortcut_key(builder, _("Horizontal split"), config.config_file.get_string("shortcut", "horizontal_split"));; - insert_shortcut_key(builder, _("Select upper window"), config.config_file.get_string("shortcut", "select_upper_window"));; - insert_shortcut_key(builder, _("Select lower window"), config.config_file.get_string("shortcut", "select_lower_window"));; - insert_shortcut_key(builder, _("Select left window"), config.config_file.get_string("shortcut", "select_left_window"));; - insert_shortcut_key(builder, _("Select right window"), config.config_file.get_string("shortcut", "select_right_window"));; - insert_shortcut_key(builder, _("Close window"), config.config_file.get_string("shortcut", "close_window"));; - insert_shortcut_key(builder, _("Close other windows"), config.config_file.get_string("shortcut", "close_other_windows"));; - - builder.end_array(); - - builder.set_member_name("groupName"); - builder.add_string_value(_("Workspace")); - builder.end_object(); - - // Advanced shortcuts. - builder.begin_object (); - builder.set_member_name("groupItems"); - - builder.begin_array(); - - insert_shortcut_key(builder, _("Rename title"), config.config_file.get_string("shortcut", "rename_title"));; - insert_shortcut_key(builder, _("Toggle fullscreen"), config.config_file.get_string("shortcut", "switch_fullscreen"));; - insert_shortcut_key(builder, _("Display shortcuts"), config.config_file.get_string("shortcut", "display_shortcuts"));; - insert_shortcut_key(builder, _("Custom commands"), config.config_file.get_string("shortcut", "custom_commands"));; - insert_shortcut_key(builder, _("Remote management"), config.config_file.get_string("shortcut", "remote_management"));; - - builder.end_array(); - - builder.set_member_name("groupName"); - builder.add_string_value(_("Advanced")); - builder.end_object(); - - - builder.end_array(); - - builder.end_object(); - } catch (Error e) { - print("Main get_shortcut_data: %s\n", e.message); - } - - // Generate a string: - Json.Generator generator = new Json.Generator(); - Json.Node root = builder.get_root(); - generator.set_root(root); - - return generator.to_data(null); - } - - public void insert_shortcut_key(Json.Builder builder, string name, string key) { - builder.begin_object (); - builder.set_member_name("name"); - builder.add_string_value(name); - - builder.set_member_name("value"); - builder.add_string_value(key); - builder.end_object(); - } - - public void quit() { - if (workspace_manager.has_active_term()) { - ConfirmDialog dialog = Widgets.create_running_confirm_dialog(this); - dialog.confirm.connect((d) => { - window_save_before_quit(); - fast_quit(); - }); - } else { - window_save_before_quit(); - fast_quit(); - } - } - - private void fast_quit() { - // Hide main window before real quit, it's will make user feel terminal quit faster. ;) - hide(); - Gtk.main_quit(); - } - - private bool on_key_press(Gtk.Widget widget, Gdk.EventKey key_event) { - try { - string keyname = Keymap.get_keyevent_name(key_event); - var select_workspace_key = config.config_file.get_string("shortcut", "select_workspace"); - string[] select_workspace_shortcuts = { - "%s + 1".printf(select_workspace_key), - "%s + 2".printf(select_workspace_key), - "%s + 3".printf(select_workspace_key), - "%s + 4".printf(select_workspace_key), - "%s + 5".printf(select_workspace_key), - "%s + 6".printf(select_workspace_key), - "%s + 7".printf(select_workspace_key), - "%s + 8".printf(select_workspace_key), - "%s + 9".printf(select_workspace_key) - }; - - var new_theme_terminal_key = config.config_file.get_string("shortcut", "new_theme_terminal"); - string[] new_terminal_shortcuts = { - "%s + 1".printf(new_theme_terminal_key), - "%s + 2".printf(new_theme_terminal_key), - "%s + 3".printf(new_theme_terminal_key), - "%s + 4".printf(new_theme_terminal_key), - "%s + 5".printf(new_theme_terminal_key), - "%s + 6".printf(new_theme_terminal_key), - "%s + 7".printf(new_theme_terminal_key), - "%s + 8".printf(new_theme_terminal_key), - "%s + 9".printf(new_theme_terminal_key) - }; - - if (keyname == "F1") { - Utils.show_manual(); - - return true; - } - - var search_key = config.config_file.get_string("shortcut", "search"); - if (search_key != "" && keyname == search_key) { - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - workspace_manager.focus_workspace.search(focus_term.get_selection_text()); - return true; - } - - var close_workspace_key = config.config_file.get_string("shortcut", "close_workspace"); - if (close_workspace_key != "" && keyname == close_workspace_key) { - workspace_manager.tabbar.close_current_tab(); - return true; - } - - var next_workspace_key = config.config_file.get_string("shortcut", "next_workspace"); - if (next_workspace_key != "" && keyname == next_workspace_key) { - workspace_manager.tabbar.select_next_tab(); - return true; - } - - var previous_workspace_key = config.config_file.get_string("shortcut", "previous_workspace"); - if (previous_workspace_key != "" && keyname == previous_workspace_key) { - workspace_manager.tabbar.select_previous_tab(); - return true; - } - - var resize_workspace_left_key = config.config_file.get_string("shortcut", "resize_workspace_left"); - if (resize_workspace_left_key != "" && keyname == resize_workspace_left_key) { - workspace_manager.focus_workspace.resize_workspace_left(); - return true; - } - - var resize_workspace_right_key = config.config_file.get_string("shortcut", "resize_workspace_right"); - if (resize_workspace_right_key != "" && keyname == resize_workspace_right_key) { - workspace_manager.focus_workspace.resize_workspace_right(); - return true; - } - - var resize_workspace_up_key = config.config_file.get_string("shortcut", "resize_workspace_up"); - if (resize_workspace_up_key != "" && keyname == resize_workspace_up_key) { - workspace_manager.focus_workspace.resize_workspace_up(); - return true; - } - - var resize_workspace_down_key = config.config_file.get_string("shortcut", "resize_workspace_down"); - if (resize_workspace_down_key != "" && keyname == resize_workspace_down_key) { - workspace_manager.focus_workspace.resize_workspace_down(); - return true; - } - - var split_vertically_key = config.config_file.get_string("shortcut", "vertical_split"); - if (split_vertically_key != "" && keyname == split_vertically_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.split_vertical(); - return true; - } - - var split_horizontally_key = config.config_file.get_string("shortcut", "horizontal_split"); - if (split_horizontally_key != "" && keyname == split_horizontally_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.split_horizontal(); - return true; - } - - var select_up_window_key = config.config_file.get_string("shortcut", "select_upper_window"); - if (select_up_window_key != "" && keyname == select_up_window_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.select_up_window(); - return true; - } - - var select_down_window_key = config.config_file.get_string("shortcut", "select_lower_window"); - if (select_down_window_key != "" && keyname == select_down_window_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.select_down_window(); - return true; - } - - var select_left_window_key = config.config_file.get_string("shortcut", "select_left_window"); - if (select_left_window_key != "" && keyname == select_left_window_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.select_left_window(); - return true; - } - - var select_right_window_key = config.config_file.get_string("shortcut", "select_right_window"); - if (select_right_window_key != "" && keyname == select_right_window_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.select_right_window(); - return true; - } - - var close_window_key = config.config_file.get_string("shortcut", "close_window"); - if (close_window_key != "" && keyname == close_window_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.close_focus_term(); - return true; - } - - var close_other_windows_key = config.config_file.get_string("shortcut", "close_other_windows"); - if (close_other_windows_key != "" && keyname == close_other_windows_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.close_other_terms(); - return true; - } - - var toggle_fullscreen_key = config.config_file.get_string("shortcut", "switch_fullscreen"); - if (toggle_fullscreen_key != "" && keyname == toggle_fullscreen_key) { - if (!quake_mode) { - toggle_fullscreen(); - } - return true; - } - - var rename_title_key = config.config_file.get_string("shortcut", "rename_title"); - if (rename_title_key != "" && keyname == rename_title_key) { - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - focus_term.rename_title(); - - return true; - } - - if (Utils.is_command_exist("deepin-shortcut-viewer")) { - var show_helper_window_key = config.config_file.get_string("shortcut", "display_shortcuts"); - if (show_helper_window_key != "" && keyname == show_helper_window_key) { - int x, y; - if (quake_mode) { - Gdk.Screen screen = Gdk.Screen.get_default(); - int monitor = config.get_terminal_monitor(); - Gdk.Rectangle rect; - screen.get_monitor_geometry(monitor, out rect); - - x = rect.width / 2; - y = rect.height / 2; - - show_shortcut_viewer(x, y); - } else { - Gtk.Allocation window_rect; - get_allocation(out window_rect); - - int win_x, win_y; - get_window().get_origin(out win_x, out win_y); - - x = win_x + window_rect.width / 2; - y = win_y + window_rect.height / 2; - show_shortcut_viewer(x, y); - } - - return true; - } - } - - var show_command_panel_key = config.config_file.get_string("shortcut", "custom_commands"); - if (show_command_panel_key != "" && keyname == show_command_panel_key) { - workspace_manager.focus_workspace.toggle_command_panel(workspace_manager.focus_workspace); - return true; - } - - var show_remote_panel_key = config.config_file.get_string("shortcut", "remote_management"); - if (show_remote_panel_key != "" && keyname == show_remote_panel_key) { - workspace_manager.focus_workspace.toggle_remote_panel(workspace_manager.focus_workspace); - return true; - } - - var select_all_key = config.config_file.get_string("shortcut", "select_all"); - if (select_all_key != "" && keyname == select_all_key) { - workspace_manager.focus_workspace.remove_all_panels(); - workspace_manager.focus_workspace.toggle_select_all(); - return true; - } - - if (keyname in select_workspace_shortcuts) { - workspace_manager.switch_workspace_with_index(int.parse(Keymap.get_key_name(key_event.keyval))); - return true; - } - - if (keyname in new_terminal_shortcuts) { - var theme_name = config.config_file.get_string("theme_terminal", "theme%i".printf(int.parse(Keymap.get_key_name(key_event.keyval)))); - - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline("deepin-terminal --load-theme '%s'".printf(theme_name), null, GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("Appbar menu item 'new window': %s\n", e.message); - } - - return true; - } - - return false; - } catch (GLib.KeyFileError e) { - print("Main on_key_press: %s\n", e.message); - - return false; - } - } - - private bool on_key_release(Gtk.Widget widget, Gdk.EventKey key_event) { - if (Keymap.is_no_key_press(key_event)) { - if (Utils.is_command_exist("deepin-shortcut-viewer")) { - remove_shortcut_viewer(); - } - } - - try { - string keyname = Keymap.get_keyevent_name(key_event); - var new_workspace_key = config.config_file.get_string("shortcut", "new_workspace"); - if (new_workspace_key != "" && keyname == new_workspace_key) { - workspace_manager.new_workspace_with_current_directory(); - return true; - } - } catch (GLib.KeyFileError e) { - print("Main on_key_release: %s\n", e.message); - - return false; - } - - return false; - } - - public bool is_light_theme() { - if (config_theme_is_light == null) { - update_theme_style(); - } - - return config_theme_is_light; - } - - public void update_theme_style() { - try { - config_theme_is_light = config.config_file.get_string("theme", "style") == "light"; - } catch (Error e) { - print("ConfigWindow update_theme_style: %s\n", e.message); - } - } - - public void draw_titlebar_underline(Cairo.Context cr, int x, int y, int width, int offset) { - // Draw line below at titlebar. - cr.save(); - if (is_light_theme()) { - Utils.set_context_color(cr, title_line_light_color); - } else { - Utils.set_context_color(cr, title_line_dark_color); - } - // cr.set_source_rgba(1, 0, 0, 1); - Draw.draw_rectangle(cr, x, y + Constant.TITLEBAR_HEIGHT + offset, width, 1); - cr.restore(); - } - - public void draw_active_tab_underline(Cairo.Context cr, int x, int y) { - Gdk.RGBA active_tab_color = Gdk.RGBA(); - - try { - active_tab_color = Utils.hex_to_rgba(config.config_file.get_string("theme", "tab")); - } catch (GLib.KeyFileError e) { - print("QuakeWindow draw_window_above: %s\n", e.message); - } - - cr.save(); - Utils.set_context_color(cr, active_tab_color); - Draw.draw_rectangle(cr, x, y, active_tab_underline_width, Constant.ACTIVE_TAB_UNDERLINE_HEIGHT); - cr.restore(); - } - - public virtual void toggle_fullscreen() { - } - - public virtual void window_save_before_quit() { - } - - public virtual Gdk.CursorType? get_frame_cursor_type(double x, double y) { - return null; - } - - public virtual void update_frame() { - } - - public virtual Gdk.CursorType? get_cursor_type(double x, double y) { - return null; - } - - public void redraw_window() { - queue_draw(); - } - - public bool window_is_max() { - return Gdk.WindowState.MAXIMIZED in get_window().get_state(); - } - - public bool window_is_tiled() { - return Gdk.WindowState.TILED in get_window().get_state(); - } - - public bool window_is_fullscreen() { - return Gdk.WindowState.FULLSCREEN in get_window().get_state(); - } - - public bool window_is_normal() { - return !window_is_max() && !window_is_fullscreen() && !window_is_tiled(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/confirm_dialog.vala deepin-terminal-5.4.13/widget/confirm_dialog.vala --- deepin-terminal-5.0.0+ds1/widget/confirm_dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/confirm_dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class ConfirmDialog : Widgets.Dialog { - private DialogButton cancel_button; - private DialogButton confirm_button; - private int box_margin_bottom = 24; - private int box_margin_end = 20; - private int box_margin_top = 4; - private int content_margin_top = 3; - private int logo_margin_end = 20; - private int logo_margin_start = 20; - private int title_margin_top = 7; - - public signal void cancel(); - public signal void confirm(); - - public ConfirmDialog(string title, string content, string cancel_text, string confirm_text) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_init_size(480, 230); - - // Add widgets. - var overlay = new Gtk.Overlay(); - var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - var close_button = Widgets.create_close_button(); - close_button.clicked.connect((b) => { - this.destroy(); - }); - var close_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - var content_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - content_button_box.margin_top = box_margin_top; - content_button_box.margin_bottom = box_margin_bottom; - content_button_box.margin_end = box_margin_end; - - Gtk.Image logo_image = new Gtk.Image.from_file(Utils.get_image_path("dialog_icon.svg")); - logo_image.margin_start = logo_margin_start; - logo_image.margin_end = logo_margin_end; - - var label_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - Label title_label = new Gtk.Label(null); - title_label.set_halign(Gtk.Align.START); - title_label.get_style_context().add_class("dialog_title"); - title_label.set_text(title); - title_label.margin_top = title_margin_top; - - Label content_label = new Gtk.Label(null); - content_label.set_halign(Gtk.Align.START); - content_label.get_style_context().add_class("dialog_content"); - content_label.set_text(content); - content_label.margin_top = content_margin_top; - - Box button_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - if (cancel_text != "") { - cancel_button = new Widgets.DialogButton(cancel_text, "left", "text", screen_monitor.is_composited()); - cancel_button.clicked.connect((b) => { - cancel(); - destroy(); - }); - } - if (cancel_text != "") { - confirm_button = new Widgets.DialogButton(confirm_text, "right", "warning", screen_monitor.is_composited()); - } else { - confirm_button = new Widgets.DialogButton(confirm_text, "middle", "warning", screen_monitor.is_composited()); - } - confirm_button.clicked.connect((b) => { - confirm(); - destroy(); - }); - - var tab_order_list = new List(); - if (cancel_text != "") { - tab_order_list.append((Gtk.Widget) cancel_button); - } - tab_order_list.append((Gtk.Widget) confirm_button); - button_box.set_focus_chain(tab_order_list); - button_box.set_focus_child(confirm_button); - - close_button_box.pack_start(close_button, true, true, 0); - label_box.pack_start(title_label, false, false, 0); - label_box.pack_start(content_label, false, false, 0); - content_button_box.pack_start(logo_image, false, false, 0); - content_button_box.pack_start(label_box, true, true, 0); - if (cancel_text != "") { - button_box.pack_start(cancel_button, true, true, 0); - } - button_box.pack_start(confirm_button, true, true, 0); - box.pack_start(close_button_box, false, false, 0); - box.pack_start(content_button_box, true, true, 0); - box.pack_start(button_box, true, true, 0); - - var event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - event_area.margin_bottom = Constant.DIALOG_BUTTON_HEIGHT; - - overlay.add(box); - overlay.add_overlay(event_area); - - add_widget(overlay); - } - } - - public ConfirmDialog create_running_confirm_dialog(Widgets.ConfigWindow window) { - ConfirmDialog dialog = new ConfirmDialog(_("Programs are still running in terminal"), _("Are you sure you want to exit?"), _("Cancel"), _("Exit")); - dialog.transient_for_window(window); - - return dialog; - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/cursor_toggle_button.vala deepin-terminal-5.4.13/widget/cursor_toggle_button.vala --- deepin-terminal-5.0.0+ds1/widget/cursor_toggle_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/cursor_toggle_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class CursorToggleButton : Gtk.Bin { - public CursorStyleButton block_button; - public CursorStyleButton ibeam_button; - public CursorStyleButton underline_button; - public int cursor_height = 26; - public int cursor_width = 36; - - public signal void change_cursor_state(string active_state); - - public CursorToggleButton() { - set_size_request(cursor_width, cursor_height * 3); - - var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - block_button = new CursorStyleButton("cursor_block"); - ibeam_button = new CursorStyleButton("cursor_ibeam"); - underline_button = new CursorStyleButton("cursor_underline"); - - block_button.active.connect((w) => { - set_cursor_state("block"); - change_cursor_state("block"); - }); - - ibeam_button.active.connect((w) => { - set_cursor_state("ibeam"); - change_cursor_state("ibeam"); - }); - - underline_button.active.connect((w) => { - set_cursor_state("underline"); - change_cursor_state("underline"); - }); - - box.pack_start(block_button, false, false, 0); - box.pack_start(ibeam_button, false, false, 0); - box.pack_start(underline_button, false, false, 0); - - this.add(box); - - show_all(); - } - - public void set_cursor_state(string name) { - if (name == "block") { - block_button.set_active(true); - ibeam_button.set_active(false); - underline_button.set_active(false); - } else if (name == "ibeam") { - block_button.set_active(false); - ibeam_button.set_active(true); - underline_button.set_active(false); - } else if (name == "underline") { - block_button.set_active(false); - ibeam_button.set_active(false); - underline_button.set_active(true); - } - } - } - - public class CursorStyleButton : Gtk.Button { - public bool is_active = false; - public int cursor_width = 36; - public int cursor_height = 26; - - Cairo.ImageSurface normal_surface; - Cairo.ImageSurface hover_surface; - Cairo.ImageSurface press_surface; - Cairo.ImageSurface checked_surface; - - public signal void active(); - - public CursorStyleButton(string icon_name) { - set_size_request(cursor_width, cursor_height); - - normal_surface = Utils.create_image_surface(icon_name + "_normal.svg"); - hover_surface = Utils.create_image_surface(icon_name + "_hover.svg"); - press_surface = Utils.create_image_surface(icon_name + "_press.svg"); - checked_surface = Utils.create_image_surface(icon_name + "_checked.svg"); - - button_press_event.connect((w) => { - active(); - - return false; - }); - - draw.connect(on_draw); - } - - public void set_active(bool active) { - is_active = active; - - queue_draw(); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - var state_flags = widget.get_state_flags(); - - if (is_active) { - Draw.draw_surface(cr, checked_surface); - } else if ((state_flags & Gtk.StateFlags.ACTIVE) != 0) { - Draw.draw_surface(cr, press_surface); - } else if ((state_flags & Gtk.StateFlags.PRELIGHT) != 0) { - Draw.draw_surface(cr, hover_surface); - } else { - Draw.draw_surface(cr, normal_surface); - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/dialog_button.vala deepin-terminal-5.4.13/widget/dialog_button.vala --- deepin-terminal-5.0.0+ds1/widget/dialog_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/dialog_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; -using Draw; -using Gtk; -using Utils; - -namespace Widgets { - public class DialogButton : Gtk.Button { - public DialogButton(string? text=null, string direction="left", string type="text", bool has_radius=true) { - set_label(text); - set_size_request(-1, Constant.DIALOG_BUTTON_HEIGHT); - if (direction == "middle") { - if (has_radius) { - get_style_context().add_class("dialog_button_%s".printf(type)); - } else { - get_style_context().add_class("dialog_noradius_button_%s".printf(type)); - } - } else { - if (has_radius) { - get_style_context().add_class("dialog_button_%s_%s".printf(direction, type)); - } else { - get_style_context().add_class("dialog_noradius_button_%s_%s".printf(direction, type)); - } - } - - enter_notify_event.connect((w) => { - grab_focus(); - - return false; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/dialog.vala deepin-terminal-5.4.13/widget/dialog.vala --- deepin-terminal-5.0.0+ds1/widget/dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class Dialog : Gtk.Window { - public Gdk.Screen screen_monitor; - public Gtk.Box window_frame_box; - public Gtk.Box window_widget_box; - public Widgets.ConfigWindow transient_window; - public int option_widget_margin_end = 5; - public int option_widget_margin_top = 5; - public int window_frame_margin_bottom = 60; - public int window_frame_margin_end = 50; - public int window_frame_margin_start = 50; - public int window_frame_margin_top = 50; - public int window_frame_radius = 5; - public int window_init_height; - public int window_init_width; - - public Dialog() { - set_app_paintable(true); // set_app_paintable is necessary step to make window transparent. - screen_monitor = Gdk.Screen.get_default(); - set_visual(screen.get_rgba_visual()); - - set_skip_taskbar_hint(true); - set_skip_pager_hint(true); - set_modal(true); - set_resizable(false); - set_type_hint(Gdk.WindowTypeHint.DIALOG); // DIALOG hint will give right window effect - - set_decorated(false); - - window_frame_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - window_widget_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - add(window_frame_box); - window_frame_box.pack_start(window_widget_box, true, true, 0); - - screen_monitor.composited_changed.connect(() => { - update_frame(); - }); - - focus_in_event.connect((w) => { - shadow_active(); - - return false; - }); - - focus_out_event.connect((w) => { - shadow_inactive(); - - return false; - }); - - configure_event.connect((w) => { - int width, height; - get_size(out width, out height); - - if (screen_monitor.is_composited()) { - Cairo.RectangleInt rect; - get_window().get_frame_extents(out rect); - - rect.x = window_frame_margin_start; - rect.y = window_frame_margin_top; - rect.width = width - window_frame_margin_start - window_frame_margin_end; - rect.height = height - window_frame_margin_top - window_frame_margin_bottom; - - var shape = new Cairo.Region.rectangle(rect); - get_window().input_shape_combine_region(shape, 0, 0); - } - - queue_draw(); - - return false; - }); - - window_state_event.connect((w, e) => { - update_frame(); - - return false; - }); - - - key_press_event.connect((w, e) => { - string keyname = Keymap.get_keyevent_name(e); - if (keyname == "Esc") { - this.destroy(); - } - - return false; - }); - - draw.connect_after((w, cr) => { - draw_window_below(cr); - - draw_window_widgets(cr); - - draw_window_frame(cr); - - draw_window_above(cr); - - return true; - }); - } - - public void set_init_size(int width, int height) { - if (!screen_monitor.is_composited()) { - window_init_width = width - window_frame_margin_start - window_frame_margin_end; - window_init_height = height - window_frame_margin_top - window_frame_margin_bottom; - } else { - window_init_width = width; - window_init_height = height; - } - } - - public void transient_for_window(Widgets.ConfigWindow window) { - transient_window = window; - - set_default_geometry(window_init_width, window_init_height); - - set_transient_for(window); - Gdk.Window gdk_window = window.get_window(); - int x, y; - gdk_window.get_root_origin(out x, out y); - Gtk.Allocation window_alloc; - window.get_allocation(out window_alloc); - - move(x + (window_alloc.width - window_init_width) / 2, - y + (window_alloc.height - window_init_height) / 2); - - show_all(); - } - - public void shadow_active() { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().remove_class("dialog_shadow_inactive"); - window_frame_box.get_style_context().add_class("dialog_shadow_active"); - } else { - window_frame_box.get_style_context().remove_class("dialog_noshadow_inactive"); - window_frame_box.get_style_context().add_class("dialog_noshadow_active"); - } - } - - public void shadow_inactive() { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().remove_class("dialog_shadow_active"); - window_frame_box.get_style_context().add_class("dialog_shadow_inactive"); - } else { - window_frame_box.get_style_context().remove_class("dialog_noshadow_active"); - window_frame_box.get_style_context().add_class("dialog_noshadow_inactive"); - } - } - - public void draw_window_widgets(Cairo.Context cr) { - Utils.propagate_draw(this, cr); - } - - public void add_widget(Gtk.Widget widget) { - window_widget_box.pack_start(widget, true, true, 0); - } - - public void draw_window_below(Cairo.Context cr) { - Gtk.Allocation window_rect; - window_frame_box.get_allocation(out window_rect); - - cr.set_source_rgba(1, 1, 1, 1); - if (screen_monitor.is_composited()) { - Draw.fill_rounded_rectangle(cr, window_frame_margin_start, window_frame_margin_top, window_rect.width, window_rect.height, window_frame_radius); - } else { - Draw.fill_rounded_rectangle(cr, 0, 0, window_rect.width, window_rect.height, 0); - } - } - - public void grid_attach(Gtk.Grid grid, Gtk.Widget child, int left, int top, int width, int height) { - child.margin_top = option_widget_margin_top; - child.margin_bottom = option_widget_margin_end; - grid.attach(child, left, top, width, height); - } - - public void grid_attach_next_to(Gtk.Grid grid, Gtk.Widget child, Gtk.Widget sibling, Gtk.PositionType side, int width, int height) { - child.margin_top = option_widget_margin_top; - child.margin_bottom = option_widget_margin_end; - grid.attach_next_to(child, sibling, side, width, height); - } - - public void draw_window_frame(Cairo.Context cr) { - - } - - public void update_frame() { - if (screen_monitor.is_composited()) { - get_window().set_shadow_width(window_frame_margin_start, window_frame_margin_end, window_frame_margin_top, window_frame_margin_bottom); - - window_frame_box.margin_top = window_frame_margin_top; - window_frame_box.margin_bottom = window_frame_margin_bottom; - window_frame_box.margin_start = window_frame_margin_start; - window_frame_box.margin_end = window_frame_margin_end; - } else { - get_window().set_shadow_width(0, 0, 0, 0); - - window_frame_box.margin_top = 0; - window_frame_box.margin_bottom = 0; - window_frame_box.margin_start = 0; - window_frame_box.margin_end = 0; - } - - window_widget_box.margin = 0; - } - - public virtual void draw_window_above(Cairo.Context cr) { - - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/dropdown_text_button.vala deepin-terminal-5.4.13/widget/dropdown_text_button.vala --- deepin-terminal-5.0.0+ds1/widget/dropdown_text_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/dropdown_text_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class DropdownTextButton : Gtk.ComboBoxText { - public DropdownTextButton() { - scroll_event.connect(on_scroll); - } - - public bool on_scroll(Gtk.Widget widget, Gdk.EventScroll scroll_event) { - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/encoding_button.vala deepin-terminal-5.4.13/widget/encoding_button.vala --- deepin-terminal-5.0.0+ds1/widget/encoding_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/encoding_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Widgets; - -namespace Widgets { - public class EncodingButton : Gtk.EventBox { - public Cairo.ImageSurface active_theme_border_surface; - public Cairo.ImageSurface dark_theme_border_surface; - public Cairo.ImageSurface light_theme_border_surface; - public Gdk.RGBA background_color; - public Gdk.RGBA content_color; - public Gdk.RGBA foreground_color; - public KeyFile theme_file; - public bool is_active = false; - public bool is_light_color; - public int background_padding = 2; - public int border_padding = 1; - public int button_radius = 5; - public int content_font_size = 11; - public int content_padding_x = 24; - public int content_padding_y = 15; - public string encoding_name; - - public EncodingButton(string name, Workspace space) { - encoding_name = name; - - try { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) space.get_toplevel(); - var theme_name = parent_window.config.config_file.get_string("general", "theme"); - - theme_file = new KeyFile(); - theme_file.load_from_file(Utils.get_theme_path(theme_name), KeyFileFlags.NONE); - background_color = Utils.hex_to_rgba(theme_file.get_string("theme", "background").strip()); - is_light_color = Utils.is_light_color(theme_file.get_string("theme", "background").strip()); - - background_color.alpha = 0.8; - foreground_color = Utils.hex_to_rgba(theme_file.get_string("theme", "foreground").strip()); - content_color = Utils.hex_to_rgba(theme_file.get_string("theme", "color_2").strip()); - - dark_theme_border_surface = Utils.create_image_surface("dark_theme_border.svg"); - light_theme_border_surface = Utils.create_image_surface("light_theme_border.svg"); - active_theme_border_surface = Utils.create_image_surface("active_theme_border.svg"); - } catch (Error e) { - print("EncodingButton: %s\n", e.message); - } - - visible_window = false; - - set_size_request(Constant.ENCODING_BUTTON_WIDTH, Constant.ENCODING_BUTTON_HEIGHT); - margin_start = (Constant.ENCODING_SLIDER_WIDTH - Constant.ENCODING_BUTTON_WIDTH) / 2; - margin_end = (Constant.ENCODING_SLIDER_WIDTH - Constant.ENCODING_BUTTON_WIDTH) / 2; - - draw.connect(on_draw); - } - - public void active() { - is_active = true; - - queue_draw(); - } - - public void inactive() { - is_active = false; - - queue_draw(); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, background_color.alpha); - Draw.fill_rounded_rectangle(cr, background_padding, background_padding, rect.width - background_padding * 2, rect.height - background_padding * 2, button_radius); - - cr.set_source_rgba(content_color.red, content_color.green, content_color.blue, content_color.alpha); - Draw.draw_text(cr, encoding_name, content_padding_x, content_padding_y, rect.width, rect.height, content_font_size, Pango.Alignment.LEFT, "top"); - - if (is_active) { - Draw.draw_surface(cr, active_theme_border_surface); - } else if (is_light_color) { - Draw.draw_surface(cr, light_theme_border_surface, border_padding, border_padding); - } else { - Draw.draw_surface(cr, dark_theme_border_surface, border_padding, border_padding); - } - - return true; - } - } - - public class EncodingList : Gtk.VBox { - public int encoding_button_padding = Constant.ENCODING_BUTTON_PADDING; - public HashMap encoding_button_map; - public EncodingButton? active_encoding_button = null; - - public signal void active_encoding(string encoding_name); - - public EncodingList(string temrinal_encoding, ArrayList encoding_names, Workspace space) { - encoding_button_map = new HashMap(); - - foreach (string encoding_name in encoding_names) { - var button = new Widgets.EncodingButton(encoding_name, space); - pack_start(button, false, false, encoding_button_padding); - - button.button_press_event.connect((w, e) => { - if (Utils.is_left_button(e)) { - active_button(encoding_name); - active_encoding(encoding_name); - } - - return false; - }); - - encoding_button_map.set(encoding_name, button); - } - - active_button(temrinal_encoding); - } - - public void active_button(string encoding_name) { - if (active_encoding_button != null) { - active_encoding_button.inactive(); - } - - active_encoding_button = encoding_button_map.get(encoding_name); - active_encoding_button.active(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/encoding_panel.vala deepin-terminal-5.4.13/widget/encoding_panel.vala --- deepin-terminal-5.0.0+ds1/widget/encoding_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/encoding_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Utils; -using Widgets; - -namespace Widgets { - public class EncodingPanel : Gtk.HBox { - public Widgets.Switcher switcher; - public Widgets.ConfigWindow parent_window; - public Workspace workspace; - public WorkspaceManager workspace_manager; - public Gdk.RGBA background_color; - public Gdk.RGBA line_dark_color; - public Gdk.RGBA line_light_color; - public Gtk.Box home_page_box; - public Gtk.ScrolledWindow scrolledwindow; - public Gtk.Widget focus_widget; - public KeyFile config_file; - public Term focus_term; - public int back_button_margin_left = 8; - public int back_button_margin_top = 6; - public int encoding_button_padding = 5; - public int encoding_list_margin_bottom = 5; - public int encoding_list_margin_top = 5; - public int split_line_margin_left = 1; - public int width = Constant.ENCODING_SLIDER_WIDTH; - - public delegate void UpdatePageAfterEdit(); - - public EncodingPanel(Workspace space, WorkspaceManager manager, Term term) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - workspace = space; - workspace_manager = manager; - focus_term = term; - - config_file = new KeyFile(); - - line_dark_color = Utils.hex_to_rgba("#ffffff", 0.1); - line_light_color = Utils.hex_to_rgba("#000000", 0.1); - - focus_widget = ((Gtk.Window) workspace.get_toplevel()).get_focus(); - parent_window = (Widgets.ConfigWindow) workspace.get_toplevel(); - - switcher = new Widgets.Switcher(width); - - home_page_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - set_size_request(width, -1); - home_page_box.set_size_request(width, -1); - - pack_start(switcher, true, true, 0); - - show_home_page(); - - draw.connect(on_draw); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - Gtk.Allocation rect; - widget.get_allocation(out rect); - - try { - background_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "background")); - } catch (Error e) { - print("EncodingPanel init: %s\n", e.message); - } - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, 0.8); - Draw.draw_rectangle(cr, 1, 0, rect.width - 1, rect.height); - - if (is_light_theme) { - Utils.set_context_color(cr, line_light_color); - } else { - Utils.set_context_color(cr, line_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, 1, rect.height); - - return false; - } - - public void show_home_page(Gtk.Widget? start_widget=null) { - scrolledwindow = new ScrolledWindow(null, null); - scrolledwindow.get_style_context().add_class("scrolledwindow"); - scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); - scrolledwindow.set_shadow_type(Gtk.ShadowType.NONE); - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - home_page_box.pack_start(scrolledwindow, true, true, 0); - - realize.connect((w) => { - init_scrollbar(); - }); - - var encoding_list = new EncodingList(focus_term.term.get_encoding(), parent_window.config.encoding_names, workspace); - encoding_list.margin_top = encoding_list_margin_top; - encoding_list.margin_bottom = encoding_list_margin_bottom; - encoding_list.active_encoding.connect((active_encoding_name) => { - try { - focus_term.term.set_encoding(active_encoding_name); - } catch (Error e) { - print("EncodingPanel set_encoding error: %s\n", e.message); - } - - init_scrollbar(); - - queue_draw(); - }); - - scrolledwindow.add(encoding_list); - - switcher.add_to_left_box(home_page_box); - - show.connect((w) => { - GLib.Timeout.add(100, () => { - int widget_x, widget_y; - encoding_list.active_encoding_button.translate_coordinates(encoding_list, 0, 0, out widget_x, out widget_y); - - Gtk.Allocation rect; - get_allocation(out rect); - - var adjust = scrolledwindow.get_vadjustment(); - adjust.set_value(widget_y - (rect.height - Constant.ENCODING_BUTTON_HEIGHT) / 2); - - return false; - }); - }); - - show_all(); - } - - public void init_scrollbar() { - scrolledwindow.get_vscrollbar().get_style_context().remove_class("light_scrollbar"); - scrolledwindow.get_vscrollbar().get_style_context().remove_class("dark_scrollbar"); - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - } else { - scrolledwindow.get_vscrollbar().get_style_context().add_class("dark_scrollbar"); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/entry_menu.vala deepin-terminal-5.4.13/widget/entry_menu.vala --- deepin-terminal-5.0.0+ds1/widget/entry_menu.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/entry_menu.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Utils; - -namespace Widgets { - public class EntryMenu : Object { - public Menu.Menu menu; - - public EntryMenu() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - } - - public void create_entry_menu(Gtk.Entry entry, int x, int y) { - var menu_content = new List(); - if (is_selection(entry)) { - menu_content.append(new Menu.MenuItem("cut", _("Cut"))); - menu_content.append(new Menu.MenuItem("copy", _("Copy"))); - } - menu_content.append(new Menu.MenuItem("paste", _("Paste"))); - menu_content.append(new Menu.MenuItem("", "")); - if (is_selection(entry)) { - menu_content.append(new Menu.MenuItem("delete", _("Delete"))); - menu_content.append(new Menu.MenuItem("", "")); - } - menu_content.append(new Menu.MenuItem("select_all", _("Select all"))); - - menu = new Menu.Menu(x, y, menu_content); - menu.click_item.connect((item_id) => { - handle_menu_item_click(entry, item_id); - }); - menu.destroy.connect(handle_menu_destroy); - } - - public void handle_menu_item_click(Gtk.Entry entry, string item_id) { - switch(item_id) { - case "cut": - entry.cut_clipboard(); - break; - case "copy": - entry.copy_clipboard(); - break; - case "paste": - entry.paste_clipboard(); - break; - case "delete": - entry.delete_selection(); - break; - case "select_all": - entry.select_region(0, -1); - break; - } - } - - public bool is_selection(Gtk.Entry entry) { - int start_pos, end_pos; - entry.get_selection_bounds(out start_pos, out end_pos); - - return start_pos != end_pos; - } - - public void handle_menu_destroy() { - menu = null; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/entry.vala deepin-terminal-5.4.13/widget/entry.vala --- deepin-terminal-5.0.0+ds1/widget/entry.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/entry.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Utils; - -namespace Widgets { - public class Entry : Gtk.Entry { - public Widgets.EntryMenu menu; - - public Entry() { - button_press_event.connect((w, e) => { - if (Utils.is_right_button(e)) { - menu = new Widgets.EntryMenu(); - menu.create_entry_menu(this, (int) e.x_root, (int) e.y_root); - - return true; - } - - return false; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/file_button.vala deepin-terminal-5.4.13/widget/file_button.vala --- deepin-terminal-5.0.0+ds1/widget/file_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/file_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class FileButton : Gtk.EventBox { - public Gtk.Box box; - public Gtk.Box button_box; - public ImageButton file_add_button; - public Widgets.Entry entry; - public int height = 26; - - public FileButton() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - visible_window = false; - - set_size_request(-1, height); - - box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - entry = new Widgets.Entry(); - entry.margin_top = 1; - entry.margin_bottom = 1; - - file_add_button = new ImageButton("file_add"); - - button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - box.pack_start(entry, true, true, 0); - box.pack_start(button_box, false, false, 0); - - entry.get_style_context().add_class("file_add_entry"); - button_box.pack_start(file_add_button, false, false, 0); - - file_add_button.clicked.connect((w, e) => { - select_private_key_file(); - }); - - add(box); - } - - public void select_private_key_file() { - Gtk.FileChooserAction action = Gtk.FileChooserAction.OPEN; - var chooser = new Gtk.FileChooserDialog(_("Select the private key file"), - get_toplevel() as Gtk.Window, action); - chooser.add_button(_("Cancel"), Gtk.ResponseType.CANCEL); - chooser.set_select_multiple(true); - chooser.add_button(_("Select"), Gtk.ResponseType.ACCEPT); - - if (chooser.run () == Gtk.ResponseType.ACCEPT) { - entry.set_text(chooser.get_file().get_path()); - } - - chooser.destroy(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/highlight_frame.vala deepin-terminal-5.4.13/widget/highlight_frame.vala --- deepin-terminal-5.0.0+ds1/widget/highlight_frame.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/highlight_frame.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class HighlightFrame : Gtk.EventBox { - public Gdk.RGBA foreground_color = Gdk.RGBA(); - - public HighlightFrame() { - draw.connect(on_draw); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - try { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) this.get_toplevel(); - foreground_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "foreground")); - } catch (GLib.KeyFileError e) { - print("HighlightFrame: %s\n", e.message); - } - - cr.set_source_rgba(foreground_color.red, foreground_color.green, foreground_color.blue, 0.4); - Draw.draw_rectangle(cr, rect.x, rect.y, rect.width, rect.height, false); - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/image_button.vala deepin-terminal-5.4.13/widget/image_button.vala --- deepin-terminal-5.0.0+ds1/widget/image_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/image_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; -using Draw; -using Gtk; -using Utils; - -namespace Widgets { - public class ImageButton : Widgets.ClickEventBox { - public bool is_hover = false; - public Cairo.ImageSurface hover_dark_surface; - public Cairo.ImageSurface hover_light_surface; - public Cairo.ImageSurface normal_dark_surface; - public Cairo.ImageSurface normal_light_surface; - public Cairo.ImageSurface press_dark_surface; - public Cairo.ImageSurface press_light_surface; - public Gdk.RGBA text_hover_color; - public Gdk.RGBA text_normal_color; - public Gdk.RGBA text_press_color; - public bool is_theme_button; - public int button_text_size = 14; - public string? button_text; - - public ImageButton(string image_path, bool theme_button=false, string? text=null, int text_size=12) { - is_theme_button = theme_button; - - if (is_theme_button) { - normal_dark_surface = Utils.create_image_surface(image_path + "_dark_normal.svg"); - hover_dark_surface = Utils.create_image_surface(image_path + "_dark_hover.svg"); - press_dark_surface = Utils.create_image_surface(image_path + "_dark_press.svg"); - - normal_light_surface = Utils.create_image_surface(image_path + "_light_normal.svg"); - hover_light_surface = Utils.create_image_surface(image_path + "_light_hover.svg"); - press_light_surface = Utils.create_image_surface(image_path + "_light_press.svg"); - } else { - normal_dark_surface = Utils.create_image_surface(image_path + "_normal.svg"); - hover_dark_surface = Utils.create_image_surface(image_path + "_hover.svg"); - press_dark_surface = Utils.create_image_surface(image_path + "_press.svg"); - } - - button_text = text; - button_text_size = text_size; - - if (button_text != null) { - text_normal_color = Utils.hex_to_rgba("#0699FF"); - text_hover_color = Utils.hex_to_rgba("#FFFFFF"); - text_press_color = Utils.hex_to_rgba("#FFFFFF"); - } - - set_size_request(this.normal_dark_surface.get_width() / get_scale_factor(), - this.normal_dark_surface.get_height() / get_scale_factor()); - - draw.connect(on_draw); - enter_notify_event.connect((w, e) => { - is_hover = true; - queue_draw(); - - return false; - }); - leave_notify_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - button_press_event.connect((w, e) => { - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = false; - var top_level = get_toplevel(); - if (top_level.get_type().is_a(typeof(Widgets.Dialog))) { - is_light_theme = ((Widgets.Dialog) top_level).transient_window.is_light_theme(); - } else { - is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - } - - var ratio = get_scale_factor(); - - if (is_hover) { - if (is_press) { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, press_light_surface); - } else { - Draw.draw_surface(cr, press_dark_surface); - } - - if (button_text != null) { - Utils.set_context_color(cr, text_press_color); - Draw.draw_text(cr, button_text, 0, 0, normal_dark_surface.get_width() / ratio, normal_dark_surface.get_height() / ratio, button_text_size, Pango.Alignment.CENTER); - } - } else { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, hover_light_surface); - } else { - Draw.draw_surface(cr, hover_dark_surface); - } - - if (button_text != null) { - Utils.set_context_color(cr, text_hover_color); - Draw.draw_text(cr, button_text, 0, 0, normal_dark_surface.get_width() / ratio, normal_dark_surface.get_height() / ratio, button_text_size, Pango.Alignment.CENTER); - } - } - } else { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, normal_light_surface); - } else { - Draw.draw_surface(cr, normal_dark_surface); - } - - if (button_text != null) { - Utils.set_context_color(cr, text_normal_color); - Draw.draw_text(cr, button_text, 0, 0, normal_dark_surface.get_width() / ratio, normal_dark_surface.get_height() / ratio, button_text_size, Pango.Alignment.CENTER); - } - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/link_button.vala deepin-terminal-5.4.13/widget/link_button.vala --- deepin-terminal-5.0.0+ds1/widget/link_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/link_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; - -namespace Widgets { - public class LinkButton : Widgets.ClickEventBox { - public string link_css; - public string link_name; - public string link_uri; - - public LinkButton(string link_name, string link_uri, string link_css) { - add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - visible_window = false; - - var link_label = new Gtk.Label(null); - link_label.set_text(link_name); - link_label.get_style_context().add_class(link_css); - add(link_label); - enter_notify_event.connect((w, e) => { - var display = Gdk.Display.get_default(); - get_window().set_cursor(new Gdk.Cursor.for_display(display, Gdk.CursorType.HAND1)); - - return false; - }); - leave_notify_event.connect((w, e) => { - get_window().set_cursor(null); - - return false; - }); - clicked.connect((w, e) => { - Gdk.Screen screen = Gdk.Screen.get_default(); - try { - Gtk.show_uri(screen, link_uri, e.time); - } catch (GLib.Error e) { - print("LinkButton: %s\n", e.message); - } - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/panel_button.vala deepin-terminal-5.4.13/widget/panel_button.vala --- deepin-terminal-5.0.0+ds1/widget/panel_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/panel_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,234 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class PanelButton : Widgets.ClickEventBox { - public bool is_hover = false; - public Cairo.ImageSurface button_dark_surface; - public Cairo.ImageSurface button_edit_hover_dark_surface; - public Cairo.ImageSurface button_edit_hover_light_surface; - public Cairo.ImageSurface button_edit_normal_dark_surface; - public Cairo.ImageSurface button_edit_normal_light_surface; - public Cairo.ImageSurface button_edit_press_dark_surface; - public Cairo.ImageSurface button_edit_press_light_surface; - public Cairo.ImageSurface button_light_surface; - public Gdk.RGBA button_content_dark_color; - public Gdk.RGBA button_content_light_color; - public Gdk.RGBA button_name_dark_color; - public Gdk.RGBA button_name_light_color; - public Gdk.RGBA hover_dark_color; - public Gdk.RGBA hover_light_color; - public Gdk.RGBA line_dark_color; - public Gdk.RGBA line_light_color; - public Gdk.RGBA press_dark_color; - public Gdk.RGBA press_light_color; - public bool display_bottom_line = true; - public bool has_click = false; - public bool is_at_edit_button_area = false; - public int button_content_size = 10; - public int button_content_y = 27; - public int button_name_size = 11; - public int button_name_y = 5; - public int edit_button_x = 254; - public int edit_button_y; - public int height = 56; - public int image_x = 12; - public int text_width = Constant.SLIDER_PANEL_TEXT_WIDTH; - public int text_x = 72; - public int width = Constant.SLIDER_WIDTH; - public string button_content; - public string button_name; - public string? button_display_name; - - public signal void click_button(); - public signal void click_edit_button(); - - public PanelButton(string name, string content, string? display_name, string edit_button_name) { - this.add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - - button_name = name; - button_content = content; - button_display_name = display_name; - - button_dark_surface = Utils.create_image_surface("%s_dark.svg".printf(edit_button_name)); - button_light_surface = Utils.create_image_surface("%s_light.svg".printf(edit_button_name)); - button_edit_normal_dark_surface = Utils.create_image_surface("button_edit_dark_normal.svg"); - button_edit_hover_dark_surface = Utils.create_image_surface("button_edit_dark_hover.svg"); - button_edit_press_dark_surface = Utils.create_image_surface("button_edit_dark_press.svg"); - button_edit_normal_light_surface = Utils.create_image_surface("button_edit_light_normal.svg"); - button_edit_hover_light_surface = Utils.create_image_surface("button_edit_light_hover.svg"); - button_edit_press_light_surface = Utils.create_image_surface("button_edit_light_press.svg"); - - button_name_dark_color = Utils.hex_to_rgba("#FFFFFF"); - button_content_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.5); - press_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.1); - hover_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.1); - button_name_light_color = Utils.hex_to_rgba("#303030"); - button_content_light_color = Utils.hex_to_rgba("#000000", 0.5); - press_light_color = Utils.hex_to_rgba("#000000", 0.1); - hover_light_color = Utils.hex_to_rgba("#000000", 0.1); - line_dark_color = Utils.hex_to_rgba("#ffffff", 0.05); - line_light_color = Utils.hex_to_rgba("#000000", 0.05); - - set_size_request(width, height); - - edit_button_y = (height - button_edit_press_dark_surface.get_height()) / 2; - - draw.connect(on_draw); - enter_notify_event.connect((w, e) => { - is_hover = true; - queue_draw(); - - return false; - }); - leave_notify_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - button_press_event.connect((w, e) => { - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - clicked.connect((w, e) => { - if (e.x > edit_button_x && e.x < edit_button_x + button_edit_normal_dark_surface.get_width() - && e.y > edit_button_y && e.y < height - button_edit_normal_dark_surface.get_height()) { - click_edit_button(); - } else { - // Avoid user double click on button to login button twice. - if (!has_click) { - has_click = true; - click_button(); - } - } - }); - motion_notify_event.connect((w, e) => { - if (e.x > edit_button_x && e.x < edit_button_x + button_edit_normal_dark_surface.get_width() - && e.y > edit_button_y && e.y < height - button_edit_normal_dark_surface.get_height()) { - is_at_edit_button_area = true; - } else { - is_at_edit_button_area = false; - } - queue_draw(); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - if (is_light_theme) { - Draw.draw_surface(cr, button_light_surface, image_x, 0, 0, height); - } else { - Draw.draw_surface(cr, button_dark_surface, image_x, 0, 0, height); - } - - - if (is_hover) { - if (is_at_edit_button_area) { - if (is_press) { - if (is_light_theme) { - Draw.draw_surface(cr, button_edit_press_light_surface, edit_button_x, 0, 0, height); - } else { - Draw.draw_surface(cr, button_edit_press_dark_surface, edit_button_x, 0, 0, height); - } - } else if (is_hover) { - if (is_light_theme) { - Draw.draw_surface(cr, button_edit_hover_light_surface, edit_button_x, 0, 0, height); - } else { - Draw.draw_surface(cr, button_edit_hover_dark_surface, edit_button_x, 0, 0, height); - } - } - } else { - if (is_light_theme) { - Draw.draw_surface(cr, button_edit_normal_light_surface, edit_button_x, 0, 0, height); - } else { - Draw.draw_surface(cr, button_edit_normal_dark_surface, edit_button_x, 0, 0, height); - } - - } - } - - if (is_light_theme) { - Utils.set_context_color(cr, button_name_light_color); - } else { - Utils.set_context_color(cr, button_name_dark_color); - } - Draw.draw_text(cr, button_name, text_x, button_name_y, text_width, height, button_name_size, Pango.Alignment.LEFT, "top"); - - if (is_light_theme) { - Utils.set_context_color(cr, button_content_light_color); - } else { - Utils.set_context_color(cr, button_content_dark_color); - } - if (button_display_name != null) { - Draw.draw_text(cr, button_display_name, text_x, button_content_y, text_width, height, button_content_size, Pango.Alignment.LEFT, "top"); - } else { - Draw.draw_text(cr, button_content, text_x, button_content_y, text_width, height, button_content_size, Pango.Alignment.LEFT, "top"); - } - - if (display_bottom_line) { - if (is_light_theme) { - Utils.set_context_color(cr, line_light_color); - } else { - Utils.set_context_color(cr, line_dark_color); - } - Draw.draw_rectangle(cr, 8, height - 1, width - 16, 1); - } - - if (is_press) { - if (is_light_theme) { - Utils.set_context_color(cr, press_light_color); - } else { - Utils.set_context_color(cr, press_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, width, height); - } else if (is_hover) { - if (is_light_theme) { - Utils.set_context_color(cr, hover_light_color); - } else { - Utils.set_context_color(cr, hover_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, width, height); - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/password_button.vala deepin-terminal-5.4.13/widget/password_button.vala --- deepin-terminal-5.0.0+ds1/widget/password_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/password_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class PasswordButton : Gtk.EventBox { - public Gtk.Box box; - public Gtk.Box button_box; - public ImageButton hide_password_button; - public ImageButton show_password_button; - public Widgets.Entry entry; - public int height = 26; - - public PasswordButton() { - visible_window = false; - - set_size_request(-1, height); - - box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - entry = new Widgets.Entry(); - entry.margin_top = 1; - entry.margin_bottom = 1; - entry.set_invisible_char('●'); - entry.set_input_purpose(Gtk.InputPurpose.PASSWORD); - - show_password_button = new ImageButton("password_show"); - hide_password_button = new ImageButton("password_hide"); - - button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - box.pack_start(entry, true, true, 0); - box.pack_start(button_box, false, false, 0); - - init(); - - show_password_button.clicked.connect((w, e) => { - show_password(); - }); - - hide_password_button.clicked.connect((w, e) => { - hide_password(); - }); - - entry.get_buffer().deleted_text.connect((buffer, p, nc) => { - string entry_text = entry.get_text().strip(); - if (entry_text == "") { - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - } else { - if (entry.get_visibility()) { - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - } else { - entry.get_style_context().remove_class("password_visible_entry"); - entry.get_style_context().add_class("password_invisible_entry"); - } - } - }); - - entry.get_buffer().inserted_text.connect((buffer, p, c, nc) => { - string entry_text = entry.get_text().strip(); - if (entry_text == "") { - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - } else { - if (entry.get_visibility()) { - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - } else { - entry.get_style_context().remove_class("password_visible_entry"); - entry.get_style_context().add_class("password_invisible_entry"); - } - } - }); - - - add(box); - } - - public void init() { - Utils.remove_all_children(button_box); - - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - entry.set_visibility(false); - button_box.pack_start(show_password_button, false, false, 0); - - show_all(); - } - - public void show_password() { - Utils.remove_all_children(button_box); - - entry.get_style_context().remove_class("password_invisible_entry"); - entry.get_style_context().add_class("password_visible_entry"); - entry.set_visibility(true); - button_box.pack_start(hide_password_button, false, false, 0); - - show_all(); - } - - public void hide_password() { - Utils.remove_all_children(button_box); - - entry.get_style_context().remove_class("password_visible_entry"); - entry.get_style_context().add_class("password_invisible_entry"); - entry.set_visibility(false); - button_box.pack_start(show_password_button, false, false, 0); - - show_all(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/preference_slidebar.vala deepin-terminal-5.4.13/widget/preference_slidebar.vala --- deepin-terminal-5.0.0+ds1/widget/preference_slidebar.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/preference_slidebar.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class PreferenceSlidebar : Gtk.Grid { - public PreferenceSlideItem advanced_key_segment; - public PreferenceSlideItem advanced_segment; - public PreferenceSlideItem basic_segment; - public PreferenceSlideItem cursor_segment; - public PreferenceSlideItem focus_segment_item; - public PreferenceSlideItem hotkey_segment; - public PreferenceSlideItem scroll_segment; - public PreferenceSlideItem terminal_key_segment; - public PreferenceSlideItem theme_segment; - public PreferenceSlideItem window_segment; - public PreferenceSlideItem workspace_key_segment; - public int height = 30; - public int segment_spacing = 20; - public int width = Constant.PREFERENCE_SLIDEBAR_WIDTH; - - public signal void click_item(string name); - - public PreferenceSlidebar() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_size_request(width, -1); - - var spacing_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - spacing_box.set_size_request(-1, Constant.TITLEBAR_HEIGHT); - this.attach(spacing_box, 0, 0, width, height); - - basic_segment = new PreferenceSlideItem(this, _("Basic"), "basic", true); - this.attach_next_to(basic_segment, spacing_box, Gtk.PositionType.BOTTOM, width, height); - - theme_segment = new PreferenceSlideItem(this, _("Interface"), "theme", false); - this.attach_next_to(theme_segment, basic_segment, Gtk.PositionType.BOTTOM, width, height); - - var theme_spacing_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - theme_spacing_box.set_size_request(-1, segment_spacing); - this.attach_next_to(theme_spacing_box, theme_segment, Gtk.PositionType.BOTTOM, width, height); - - hotkey_segment = new PreferenceSlideItem(this, _("Shortcuts"), "hotkey", true); - this.attach_next_to(hotkey_segment, theme_spacing_box, Gtk.PositionType.BOTTOM, width, height); - - terminal_key_segment = new PreferenceSlideItem(this, _("Terminal"), "terminal_key", false); - this.attach_next_to(terminal_key_segment, hotkey_segment, Gtk.PositionType.BOTTOM, width, height); - - workspace_key_segment = new PreferenceSlideItem(this, _("Workspace"), "workspace_key", false); - this.attach_next_to(workspace_key_segment, terminal_key_segment, Gtk.PositionType.BOTTOM, width, height); - - advanced_key_segment = new PreferenceSlideItem(this, _("Advanced"), "advanced_key", false); - this.attach_next_to(advanced_key_segment, workspace_key_segment, Gtk.PositionType.BOTTOM, width, height); - - var advanced_key_spacing_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - advanced_key_spacing_box.set_size_request(-1, segment_spacing); - this.attach_next_to(advanced_key_spacing_box, advanced_key_segment, Gtk.PositionType.BOTTOM, width, height); - - advanced_segment = new PreferenceSlideItem(this, _("Advanced"), "advanced", true); - this.attach_next_to(advanced_segment, advanced_key_spacing_box, Gtk.PositionType.BOTTOM, width, height); - - cursor_segment = new PreferenceSlideItem(this, _("Cursor"), "cursor", false); - this.attach_next_to(cursor_segment, advanced_segment, Gtk.PositionType.BOTTOM, width, height); - - scroll_segment = new PreferenceSlideItem(this, _("Scroll"), "scroll", false); - this.attach_next_to(scroll_segment, cursor_segment, Gtk.PositionType.BOTTOM, width, height); - - window_segment = new PreferenceSlideItem(this, _("Window"), "window", false); - this.attach_next_to(window_segment, scroll_segment, Gtk.PositionType.BOTTOM, width, height); - - var window_spacing_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - window_spacing_box.set_size_request(-1, segment_spacing); - this.attach_next_to(window_spacing_box, window_segment, Gtk.PositionType.BOTTOM, width, height); - - add_focus_handler(basic_segment); - add_focus_handler(theme_segment); - add_focus_handler(hotkey_segment); - add_focus_handler(terminal_key_segment); - add_focus_handler(workspace_key_segment); - add_focus_handler(advanced_key_segment); - add_focus_handler(advanced_segment); - add_focus_handler(cursor_segment); - add_focus_handler(scroll_segment); - add_focus_handler(window_segment); - focus_item(basic_segment); - - draw.connect(on_draw); - - show_all(); - } - - public void focus_item(PreferenceSlideItem item) { - if (focus_segment_item != null) { - focus_segment_item.is_selected = false; - focus_segment_item.queue_draw(); - } - - focus_segment_item = item; - focus_segment_item.is_selected = true; - queue_draw(); - } - - public void add_focus_handler(PreferenceSlideItem item) { - item.button_press_event.connect((w, e) => { - focus_item(item); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation alloc; - this.get_allocation(out alloc); - - cr.set_source_rgba(0, 0, 0, 0.1); - Draw.draw_rectangle(cr, alloc.width - 1, 0, 1, alloc.height); - - return false; - } - } - - public class PreferenceSlideItem : Gtk.EventBox { - public string item_name; - public bool item_active; - public bool is_first_segment; - - public int first_segment_margin = 30; - public int second_segment_margin = 40; - - public int first_segment_size = 12; - public int second_segment_size = 10; - - public Gdk.RGBA first_segment_text_color; - public Gdk.RGBA second_segment_text_color; - public Gdk.RGBA highlight_text_color; - - public bool is_selected = false; - - public int width = Constant.PREFERENCE_SLIDEBAR_WIDTH; - public int height = 30; - - public PreferenceSlideItem(PreferenceSlidebar bar, string display_name, string name, bool is_first) { - set_visible_window(false); - - item_name = display_name; - is_first_segment = is_first; - - first_segment_text_color = Utils.hex_to_rgba("#00162C"); - second_segment_text_color = Utils.hex_to_rgba("#303030"); - highlight_text_color = Utils.hex_to_rgba("#2ca7f8"); - - set_size_request(width, height); - - button_press_event.connect((w, e) => { - bar.click_item(name); - - return false; - }); - - draw.connect(on_draw); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - cr.set_source_rgba(1, 1, 1, 1); - Draw.draw_rectangle(cr, 0, 0, rect.width - 1, rect.height, true); - - if (is_selected) { - cr.set_source_rgba(43 / 255.0, 167 / 255.0, 248 / 255.0, 0.20); - Draw.draw_rectangle(cr, 0, 0, rect.width, rect.height, true); - - cr.set_source_rgba(43 / 255.0, 167 / 255.0, 248 / 255.0, 0.10); - Draw.draw_rectangle(cr, 0, 0, rect.width, 1, true); - - cr.set_source_rgba(43 / 255.0, 167 / 255.0, 248 / 255.0, 0.10); - Draw.draw_rectangle(cr, 0, rect.height - 1, rect.width, 1, true); - - cr.set_source_rgba(43 / 255.0, 167 / 255.0, 248 / 255.0, 1); - Draw.draw_rectangle(cr, rect.width - 3, 0, 3, rect.height, true); - } - - if (is_first_segment) { - if (is_selected) { - Utils.set_context_color(cr, highlight_text_color); - } else { - Utils.set_context_color(cr, first_segment_text_color); - } - Draw.draw_text(cr, "" + item_name + "", first_segment_margin, 0, rect.width - first_segment_margin, rect.height, first_segment_size); - } else { - if (is_selected) { - Utils.set_context_color(cr, highlight_text_color); - } else { - Utils.set_context_color(cr, second_segment_text_color); - } - Draw.draw_text(cr, item_name, second_segment_margin, 0, rect.width - second_segment_margin, rect.height, second_segment_size); - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/preference.vala deepin-terminal-5.4.13/widget/preference.vala --- deepin-terminal-5.0.0+ds1/widget/preference.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/preference.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,840 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Animation; -using Gee; -using Gtk; -using Widgets; - -namespace Widgets { - public class Preference : Widgets.Dialog { - public ArrayList font_names; - public ArrayList window_state_list; - public ArrayList window_state_name_list; - public Widgets.DropdownTextButton font_combox; - public Widgets.DropdownTextButton window_combox; - public Gtk.Label close_other_windows_key_label; - public Gtk.Label close_window_key_label; - public Gtk.Label close_workspace_key_label; - public Gtk.Label copy_key_label; - public Gtk.Label cursor_style_label; - public Gtk.Label display_hotkey_terminal_key_label; - public Gtk.Label font_label; - public Gtk.Label fullscreen_key_label; - public Gtk.Label jump_to_next_command_key_label; - public Gtk.Label jump_to_previous_command_key_label; - public Gtk.Label new_workspace_key_label; - public Gtk.Label next_workspace_key_label; - public Gtk.Label opacity_label; - public Gtk.Label open_key_label; - public Gtk.Label paste_key_label; - public Gtk.Label previous_workspace_key_label; - public Gtk.Label rename_title_key_label; - public Gtk.Label search_key_label; - public Gtk.Label select_all_key_label; - public Gtk.Label select_down_window_key_label; - public Gtk.Label select_left_window_key_label; - public Gtk.Label select_right_window_key_label; - public Gtk.Label select_up_window_key_label; - public Gtk.Label show_command_key_label; - public Gtk.Label show_remote_manage_key_label; - public Gtk.Label split_horizontally_key_label; - public Gtk.Label split_vertically_key_label; - public Gtk.Label theme_label; - public Gtk.Label window_label; - public Gtk.Label blur_background_label; - public Gtk.Label zoom_in_key_label; - public Gtk.Label zoom_out_key_label; - public Gtk.Label zoom_reset_key_label; - public ScrolledWindow scrolledwindow; - public ShortcutEntry close_other_windows_key_entry; - public ShortcutEntry close_window_key_entry; - public ShortcutEntry close_workspace_key_entry; - public ShortcutEntry copy_key_entry; - public ShortcutEntry display_hotkey_terminal_key_entry; - public ShortcutEntry fullscreen_key_entry; - public ShortcutEntry jump_to_next_command_key_entry; - public ShortcutEntry jump_to_previous_command_key_entry; - public ShortcutEntry new_workspace_key_entry; - public ShortcutEntry next_workspace_key_entry; - public ShortcutEntry open_key_entry; - public ShortcutEntry paste_key_entry; - public ShortcutEntry previous_workspace_key_entry; - public ShortcutEntry rename_title_key_entry; - public ShortcutEntry search_key_entry; - public ShortcutEntry select_all_key_entry; - public ShortcutEntry select_down_window_key_entry; - public ShortcutEntry select_left_window_key_entry; - public ShortcutEntry select_right_window_key_entry; - public ShortcutEntry select_up_window_key_entry; - public ShortcutEntry show_command_key_entry; - public ShortcutEntry show_remote_manage_key_entry; - public ShortcutEntry split_horizontally_key_entry; - public ShortcutEntry split_vertically_key_entry; - public ShortcutEntry zoom_in_key_entry; - public ShortcutEntry zoom_out_key_entry; - public ShortcutEntry zoom_reset_key_entry; - public Widgets.CheckButton cursor_auto_hide_checkbutton; - public Widgets.CheckButton copy_on_select_checkbutton; - public Widgets.CheckButton cursor_blink_checkbutton; - public Widgets.CheckButton hide_quakewindow_after_lost_focus_checkbutton; - public Widgets.CheckButton scroll_on_key_checkbutton; - public Widgets.CheckButton scroll_on_out_checkbutton; - public Widgets.CheckButton blur_background_checkbutton; - public Widgets.ConfigWindow parent_window; - public Widgets.CursorToggleButton cursor_style_button; - public Widgets.ProgressBar opacity_progressbar; - public Widgets.SpinButton font_size_spinbutton; - public double timer_end_value; - public double timer_start_value; - public AnimateTimer timer; - public Gtk.Box content_box; - public Gtk.Widget? focus_widget; - public Widgets.PreferenceSlidebar slidebar; - public bool in_animation = false; - public int checkbutton_margin_right = 5; - public int checkbutton_margin_top = 4; - public int first_segment_margin_left = 20; - public int grid_height = 24; - public int option_widget_margin_left = 40; - public int option_widget_margin_right = 10; - public int preference_name_width = 180; - public int preference_split_line_margin_left = 2; - public int preference_widget_width = Constant.PREFERENCE_WIDGET_WIDTH; - public int reset_button_margin = 35; - public int second_segment_margin_left = 30; - public int segment_margin_bottom = 5; - public int segment_margin_top = 10; - public int slidebar_width = Constant.PREFERENCE_SLIDEBAR_WIDTH; - public int timer_interval = 400; - - public Preference(Widgets.ConfigWindow window, Gtk.Widget? widget) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_init_size(740, 670); - - theme_label = create_label(); - opacity_label = create_label(_("Opacity:")); - opacity_progressbar = new Widgets.ProgressBar(opacity); - font_label = create_label(); - font_combox = create_combox_text(); - window_label = create_label(); - window_combox = create_combox_text(); - blur_background_label = create_label(); - - copy_key_label = create_label(); - copy_key_entry = new ShortcutEntry(); - paste_key_label = create_label(); - paste_key_entry = new ShortcutEntry(); - open_key_label = create_label(); - open_key_entry = new ShortcutEntry(); - search_key_label = create_label(); - search_key_entry = new ShortcutEntry(); - zoom_in_key_label = create_label(); - zoom_in_key_entry = new ShortcutEntry(); - zoom_out_key_label = create_label(); - zoom_out_key_entry = new ShortcutEntry(); - zoom_reset_key_label = create_label(); - zoom_reset_key_entry = new ShortcutEntry(); - jump_to_next_command_key_label = create_label(); - jump_to_next_command_key_entry = new ShortcutEntry(); - jump_to_previous_command_key_label = create_label(); - jump_to_previous_command_key_entry = new ShortcutEntry(); - select_all_key_label = create_label(); - select_all_key_entry = new ShortcutEntry(); - new_workspace_key_label = create_label(); - new_workspace_key_entry = new ShortcutEntry(); - close_workspace_key_label = create_label(); - close_workspace_key_entry = new ShortcutEntry(); - previous_workspace_key_label = create_label(); - previous_workspace_key_entry = new ShortcutEntry(); - next_workspace_key_label = create_label(); - next_workspace_key_entry = new ShortcutEntry(); - split_vertically_key_label = create_label(); - split_vertically_key_entry = new ShortcutEntry(); - split_horizontally_key_label = create_label(); - split_horizontally_key_entry = new ShortcutEntry(); - select_up_window_key_label = create_label(); - select_up_window_key_entry = new ShortcutEntry(); - select_down_window_key_label = create_label(); - select_down_window_key_entry = new ShortcutEntry(); - select_left_window_key_label = create_label(); - select_left_window_key_entry = new ShortcutEntry(); - select_right_window_key_label = create_label(); - select_right_window_key_entry = new ShortcutEntry(); - close_window_key_label = create_label(); - close_window_key_entry = new ShortcutEntry(); - close_other_windows_key_label = create_label(); - close_other_windows_key_entry = new ShortcutEntry(); - fullscreen_key_label = create_label(); - fullscreen_key_entry = new ShortcutEntry(); - rename_title_key_label = create_label(); - rename_title_key_entry = new ShortcutEntry(); - display_hotkey_terminal_key_label = create_label(); - display_hotkey_terminal_key_entry = new ShortcutEntry(); - show_command_key_label = create_label(); - show_remote_manage_key_label = create_label(); - show_command_key_entry = new ShortcutEntry(); - show_remote_manage_key_entry = new ShortcutEntry(); - - cursor_style_label = create_label(_("Cursor style:")); - cursor_style_button = new Widgets.CursorToggleButton(); - cursor_blink_checkbutton = new Widgets.CheckButton(); - cursor_auto_hide_checkbutton = new Widgets.CheckButton(); - copy_on_select_checkbutton = new Widgets.CheckButton(); - scroll_on_key_checkbutton = new Widgets.CheckButton(); - scroll_on_out_checkbutton = new Widgets.CheckButton(); - blur_background_checkbutton = new Widgets.CheckButton(); - hide_quakewindow_after_lost_focus_checkbutton = new Widgets.CheckButton(); - - font_size_spinbutton = create_spinbutton(Constant.FONT_MIN_SIZE, Constant.FONT_MAX_SIZE, 1); - - parent_window = window; - - focus_widget = widget; - - var titlebar = new Titlebar(); - titlebar.close_button.clicked.connect((b) => { - this.destroy(); - }); - - var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - box.pack_start(titlebar, false, false, 0); - - destroy.connect((w) => { - if (focus_widget != null) { - focus_widget.grab_focus(); - } - }); - - var preference_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - add_widget(preference_box); - - slidebar = new PreferenceSlidebar(); - preference_box.pack_start(slidebar, false, false, 0); - preference_box.set_size_request(slidebar_width, -1); - - scrolledwindow = new ScrolledWindow(null, null); - scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); - scrolledwindow.set_shadow_type(Gtk.ShadowType.NONE); - scrolledwindow.get_style_context().add_class("scrolledwindow"); - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - box.pack_start(scrolledwindow, true, true, 0); - - preference_box.pack_start(box, true, true, 0); - content_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - content_box.margin_end = 20; - scrolledwindow.add(content_box); - - var basic_segment = get_first_segment(_("Basic")); - content_box.pack_start(basic_segment, false, false, 0); - - var theme_segment = get_second_segment(_("Interface")); - content_box.pack_start(theme_segment, false, false, 0); - - var theme_grid = new Gtk.Grid(); - content_box.pack_start(theme_grid, false, false, 0); - - var opacity_grid = new Gtk.Grid(); - content_box.pack_start(opacity_grid, false, false, 0); - - double opacity = 0; - try { - opacity = parent_window.config.config_file.get_double("general", "opacity"); - } catch (GLib.KeyFileError e) { - print("Preference get window config: %s\n", e.message); - } - - opacity_progressbar.set_percent(opacity); - opacity_progressbar.update.connect((w, percent) => { - parent_window.config.load_config(); - parent_window.config.config_file.set_double("general", "opacity", percent); - parent_window.config.save(); - - parent_window.config.update(); - }); - adjust_option_widgets(opacity_label, opacity_progressbar); - grid_attach(opacity_grid, opacity_label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(opacity_grid, opacity_progressbar, opacity_label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - opacity_label.get_style_context().add_class("preference_title"); - - var font_grid = new Gtk.Grid(); - content_box.pack_start(font_grid, false, false, 0); - - int num; - string[] mono_or_dot_fonts = (string[]) list_mono_or_dot_fonts(out num); - font_names = new ArrayList(); - for (int i = 0; i < num; i++) { - font_names.add(mono_or_dot_fonts[i]); - } - font_names.sort(); - - create_combox_row(font_label, font_combox, _("Font:"), font_grid, font_names, "general", "font"); - create_follow_spinbutton_row(font_size_spinbutton, _("Font size:"), font_label, font_grid, "general", "font_size"); - - var hotkey_segment = get_first_segment(_("Shortcuts")); - content_box.pack_start(hotkey_segment, false, false, 0); - - var terminal_key_segment = get_second_segment(_("Terminal")); - content_box.pack_start(terminal_key_segment, false, false, 0); - - var terminal_key_grid = new Gtk.Grid(); - content_box.pack_start(terminal_key_grid, false, false, 0); - - create_key_row(copy_key_label, copy_key_entry, _("Copy:"), terminal_key_grid, "shortcut", "copy"); - create_follow_key_row(paste_key_label, paste_key_entry, _("Paste:"), copy_key_label, terminal_key_grid, "shortcut", "paste"); - create_follow_key_row(open_key_label, open_key_entry, _("Open:"), paste_key_label, terminal_key_grid, "shortcut", "open"); - create_follow_key_row(search_key_label, search_key_entry, _("Search:"), open_key_label, terminal_key_grid, "shortcut", "search"); - create_follow_key_row(zoom_in_key_label, zoom_in_key_entry, _("Zoom in:"), search_key_label, terminal_key_grid, "shortcut", "zoom_in"); - create_follow_key_row(zoom_out_key_label, zoom_out_key_entry, _("Zoom out:"), zoom_in_key_label, terminal_key_grid, "shortcut", "zoom_out"); - create_follow_key_row(zoom_reset_key_label, zoom_reset_key_entry, _("Default size:"), zoom_out_key_label, terminal_key_grid, "shortcut", "default_size"); - create_follow_key_row(jump_to_next_command_key_label, jump_to_next_command_key_entry, _("Jump to next command:"), zoom_reset_key_label, terminal_key_grid, "shortcut", "jump_to_next_command"); - create_follow_key_row(jump_to_previous_command_key_label, jump_to_previous_command_key_entry, _("Jump to previous command:"), jump_to_next_command_key_label, terminal_key_grid, "shortcut", "jump_to_previous_command"); - create_follow_key_row(select_all_key_label, select_all_key_entry, _("Select all:"), jump_to_previous_command_key_label, terminal_key_grid, "shortcut", "select_all"); - - var workspace_key_segment = get_second_segment(_("Workspace")); - content_box.pack_start(workspace_key_segment, false, false, 0); - - var workspace_key_grid = new Gtk.Grid(); - content_box.pack_start(workspace_key_grid, false, false, 0); - - create_key_row(new_workspace_key_label, new_workspace_key_entry, _("New workspace:"), workspace_key_grid, "shortcut", "new_workspace"); - create_follow_key_row(close_workspace_key_label, close_workspace_key_entry, _("Close workspace:"), new_workspace_key_label, workspace_key_grid, "shortcut", "close_workspace"); - create_follow_key_row(previous_workspace_key_label, previous_workspace_key_entry, _("Previous workspace:"), close_workspace_key_label, workspace_key_grid, "shortcut", "previous_workspace"); - create_follow_key_row(next_workspace_key_label, next_workspace_key_entry, _("Next workspace:"), previous_workspace_key_label, workspace_key_grid, "shortcut", "next_workspace"); - create_follow_key_row(split_vertically_key_label, split_vertically_key_entry, _("Vertical split:"), next_workspace_key_label, workspace_key_grid, "shortcut", "vertical_split"); - create_follow_key_row(split_horizontally_key_label, split_horizontally_key_entry, _("Horizontal split:"), split_vertically_key_label, workspace_key_grid, "shortcut", "horizontal_split"); - create_follow_key_row(select_up_window_key_label, select_up_window_key_entry, _("Select upper window:"), split_horizontally_key_label, workspace_key_grid, "shortcut", "select_upper_window"); - create_follow_key_row(select_down_window_key_label, select_down_window_key_entry, _("Select lower window:"), select_up_window_key_label, workspace_key_grid, "shortcut", "select_lower_window"); - create_follow_key_row(select_left_window_key_label, select_left_window_key_entry, _("Select left window:"), select_down_window_key_label, workspace_key_grid, "shortcut", "select_left_window"); - create_follow_key_row(select_right_window_key_label, select_right_window_key_entry, _("Select right window:"), select_left_window_key_label, workspace_key_grid, "shortcut", "select_right_window"); - create_follow_key_row(close_window_key_label, close_window_key_entry, _("Close window:"), select_right_window_key_label, workspace_key_grid, "shortcut", "close_window"); - create_follow_key_row(close_other_windows_key_label, close_other_windows_key_entry, _("Close other windows:"), close_window_key_label, workspace_key_grid, "shortcut", "close_other_windows"); - - var advanced_key_segment = get_second_segment(_("Advanced")); - content_box.pack_start(advanced_key_segment, false, false, 0); - - var advanced_key_grid = new Gtk.Grid(); - content_box.pack_start(advanced_key_grid, false, false, 0); - - create_key_row(fullscreen_key_label, fullscreen_key_entry, _("Fullscreen:"), advanced_key_grid, "shortcut", "switch_fullscreen"); - create_follow_key_row(rename_title_key_label, rename_title_key_entry, _("Rename title:"), fullscreen_key_label, advanced_key_grid, "shortcut", "rename_title"); - create_follow_key_row(display_hotkey_terminal_key_label, display_hotkey_terminal_key_entry, _("Display shortcuts:"), rename_title_key_label, advanced_key_grid, "shortcut", "display_shortcuts"); - create_follow_key_row(show_command_key_label, show_command_key_entry, _("Custom commands:"), display_hotkey_terminal_key_label, advanced_key_grid, "shortcut", "custom_commands"); - create_follow_key_row(show_remote_manage_key_label, show_remote_manage_key_entry, _("Remote management:"), show_command_key_label, advanced_key_grid, "shortcut", "remote_management"); - - var advanced_segment = get_first_segment(_("Advanced")); - content_box.pack_start(advanced_segment, false, false, 0); - - var cursor_segment = get_second_segment(_("Cursor")); - content_box.pack_start(cursor_segment, false, false, 0); - - var cursor_grid = new Gtk.Grid(); - content_box.pack_start(cursor_grid, false, false, 0); - - - try { - cursor_style_button.set_cursor_state(parent_window.config.config_file.get_string("advanced", "cursor_shape")); - } catch (GLib.KeyFileError e) { - print("Preference set cursor shape: %s\n", e.message); - } - cursor_style_button.change_cursor_state.connect((w, active_state) => { - parent_window.config.load_config(); - parent_window.config.config_file.set_string("advanced", "cursor_shape", active_state); - parent_window.config.save(); - - parent_window.config.update(); - }); - adjust_option_widgets(cursor_style_label, cursor_style_button); - grid_attach(cursor_grid, cursor_style_label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(cursor_grid, cursor_style_button, cursor_style_label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - cursor_style_label.get_style_context().add_class("preference_title"); - - var cursor_blink_box = create_follow_check_row(cursor_blink_checkbutton, _("Cursor blink"), cursor_style_label, cursor_grid, "advanced", "cursor_blink_mode"); - var cursor_auto_hide_box = create_follow_check_row(cursor_auto_hide_checkbutton, _("Cursor autohide"), cursor_blink_box, cursor_grid, "advanced", "cursor_auto_hide"); - create_follow_check_row(copy_on_select_checkbutton, _("Copy on select"), cursor_auto_hide_box, cursor_grid, "advanced", "copy_on_select"); - - var scroll_segment = get_second_segment(_("Scroll")); - content_box.pack_start(scroll_segment, false, false, 0); - - var scroll_grid = new Gtk.Grid(); - content_box.pack_start(scroll_grid, false, false, 0); - - var scroll_on_key_box = create_check_row(scroll_on_key_checkbutton, _("Scroll on keystroke"), scroll_grid, "advanced", "scroll_on_key"); - create_follow_check_row(scroll_on_out_checkbutton, _("Scroll on output"), scroll_on_key_box, scroll_grid, "advanced", "scroll_on_output"); - - var window_segment = get_second_segment(_("Window")); - content_box.pack_start(window_segment, false, false, 0); - - var window_grid = new Gtk.Grid(); - content_box.pack_start(window_grid, false, false, 0); - - window_state_list = new ArrayList(); - window_state_list.add("window"); - window_state_list.add("maximize"); - window_state_list.add("fullscreen"); - window_state_name_list = new ArrayList(); - window_state_name_list.add(_("Normal window")); - window_state_name_list.add(_("Maximize")); - window_state_name_list.add(_("Fullscreen")); - create_combox_row_with_name(window_label, window_combox, _("Use on starting:"), window_grid, window_state_list, window_state_name_list, "advanced", "use_on_starting"); - - var hide_quakewindow_box = create_follow_check_row(hide_quakewindow_after_lost_focus_checkbutton, - _("Hide Quake window after losing focus"), - window_label, - window_grid, - "advanced", - "hide_quakewindow_after_lost_focus"); - - create_follow_check_row(blur_background_checkbutton, - _("Blur background"), - hide_quakewindow_box, - window_grid, - "advanced", - "blur_background"); - - var reset_button = new Widgets.ImageButton("reset_button", false, _("Restore Defaults")); - reset_button.set_halign(Gtk.Align.CENTER); - reset_button.margin_top = reset_button_margin; - reset_button.margin_bottom = reset_button_margin; - reset_button.clicked.connect((w, e) => { - parent_window.config.init_config(); - parent_window.config.update(); - - init_config(); - }); - content_box.pack_start(reset_button, false, false, 0); - - timer = new AnimateTimer(AnimateTimer.ease_in_out, timer_interval); - timer.animate.connect(on_animate); - slidebar.click_item.connect((w, item) => { - if (item == "basic") { - scroll_to_widget(scrolledwindow, box, basic_segment); - } else if (item == "theme") { - scroll_to_widget(scrolledwindow, box, theme_segment); - } else if (item == "hotkey") { - scroll_to_widget(scrolledwindow, box, hotkey_segment); - } else if (item == "terminal_key") { - scroll_to_widget(scrolledwindow, box, terminal_key_segment); - } else if (item == "workspace_key") { - scroll_to_widget(scrolledwindow, box, workspace_key_segment); - } else if (item == "advanced_key") { - scroll_to_widget(scrolledwindow, box, advanced_key_segment); - } else if (item == "advanced") { - scroll_to_widget(scrolledwindow, box, advanced_segment); - } else if (item == "cursor") { - scroll_to_widget(scrolledwindow, box, cursor_segment); - } else if (item == "scroll") { - scroll_to_widget(scrolledwindow, box, scroll_segment); - } else if (item == "window") { - scroll_to_widget(scrolledwindow, box, window_segment); - } - }); - - scrolledwindow.get_vadjustment().value_changed.connect((w) => { - if (!in_animation) { - if (item_in_visible_area(basic_segment)) { - slidebar.focus_item(slidebar.basic_segment); - } else if (item_in_visible_area(theme_segment)) { - slidebar.focus_item(slidebar.theme_segment); - } else if (item_in_visible_area(hotkey_segment)) { - slidebar.focus_item(slidebar.hotkey_segment); - } else if (item_in_visible_area(terminal_key_segment)) { - slidebar.focus_item(slidebar.terminal_key_segment); - } else if (item_in_visible_area(workspace_key_segment)) { - slidebar.focus_item(slidebar.workspace_key_segment); - } else if (item_in_visible_area(advanced_key_segment)) { - slidebar.focus_item(slidebar.advanced_key_segment); - } else if (item_in_visible_area(advanced_segment)) { - slidebar.focus_item(slidebar.advanced_segment); - } else if (item_in_visible_area(cursor_segment)) { - slidebar.focus_item(slidebar.cursor_segment); - } else if (item_in_visible_area(scroll_segment)) { - slidebar.focus_item(slidebar.scroll_segment); - } else if (item_in_visible_area(window_segment)) { - slidebar.focus_item(slidebar.window_segment); - } - } - }); - } - - public void init_config() { - try { - opacity_progressbar.set_percent(parent_window.config.config_file.get_double("general", "opacity")); - font_combox.set_active(font_names.index_of(parent_window.config.config_file.get_value("general", "font"))); - window_combox.set_active(window_state_list.index_of(parent_window.config.config_file.get_value("advanced", "use_on_starting"))); - - copy_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "copy")); - paste_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "paste")); - open_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "open")); - search_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "search")); - zoom_in_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "zoom_in")); - zoom_out_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "zoom_out")); - zoom_reset_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "default_size")); - jump_to_next_command_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "jump_to_next_command")); - jump_to_previous_command_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "jump_to_previous_command")); - select_all_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "select_all")); - new_workspace_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "new_workspace")); - close_workspace_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "close_workspace")); - previous_workspace_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "previous_workspace")); - next_workspace_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "next_workspace")); - split_vertically_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "vertical_split")); - split_horizontally_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "horizontal_split")); - select_up_window_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "select_upper_window")); - select_down_window_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "select_lower_window")); - select_left_window_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "select_left_window")); - select_right_window_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "select_right_window")); - close_window_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "close_window")); - close_other_windows_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "close_other_windows")); - fullscreen_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "switch_fullscreen")); - rename_title_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "rename_title")); - display_hotkey_terminal_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "display_shortcuts")); - show_command_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "custom_commands")); - show_remote_manage_key_entry.set_text(parent_window.config.config_file.get_string("shortcut", "remote_management")); - - cursor_style_button.set_cursor_state(parent_window.config.config_file.get_string("advanced", "cursor_shape"));; - - cursor_blink_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "cursor_blink_mode")); - cursor_auto_hide_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "cursor_auto_hide")); - copy_on_select_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "copy_on_select")); - scroll_on_key_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "scroll_on_key")); - scroll_on_out_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "scroll_on_output")); - blur_background_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "blur_background")); - hide_quakewindow_after_lost_focus_checkbutton.set_active(parent_window.config.config_file.get_boolean("advanced", "hide_quakewindow_after_lost_focus")); - - font_size_spinbutton.set_value(parent_window.config.config_file.get_integer("general", "font_size")); - } catch (GLib.KeyFileError e) { - print("Preference init_config: %s\n", e.message); - } - - } - - public bool item_in_visible_area(Gtk.Widget item) { - int widget_x, widget_y; - content_box.translate_coordinates(item, 0, 0, out widget_x, out widget_y); - - return Math.fabs(widget_y) > scrolledwindow.get_vadjustment().get_value() - segment_margin_top * 2; - } - - public void scroll_to_widget(ScrolledWindow scrolledwindow, Gtk.Box box, Gtk.Widget widget) { - int widget_x, widget_y; - content_box.translate_coordinates(widget, 0, 0, out widget_x, out widget_y); - - var adjust = scrolledwindow.get_vadjustment(); - timer_start_value= adjust.get_value(); - timer_end_value = Math.fabs(widget_y); - - in_animation = true; - timer.reset(); - } - - public void on_animate(double progress) { - var adjust = scrolledwindow.get_vadjustment(); - adjust.set_value(timer_start_value + (timer_end_value - timer_start_value) * progress); - - if (progress >= 1.0) { - timer.stop(); - in_animation = false; - } - } - - public Gtk.Widget get_first_segment(string name) { - var segment = create_label(); - segment.get_style_context().add_class("preference_first_segment"); - segment.set_text(name); - segment.set_xalign(0); - - var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - box.pack_start(segment, false, false, 0); - - var line = new Gtk.EventBox(); - line.margin_start = preference_split_line_margin_left; - line.draw.connect((w, cr) => { - Gtk.Allocation rect; - this.get_allocation(out rect); - - cr.set_source_rgba(0, 0, 0, 0.1); - Draw.draw_rectangle(cr, 0, 12, rect.width, 1); - - return true; - }); - box.pack_start(line, true, true, 0); - - box.margin_top = segment_margin_top; - box.margin_bottom = segment_margin_bottom; - box.margin_start = first_segment_margin_left; - - return (Gtk.Widget) box; - } - - public Gtk.Widget get_second_segment(string name) { - var segment = create_label(); - segment.get_style_context().add_class("preference_second_segment"); - segment.set_text(name); - segment.set_xalign(0); - segment.margin_top = segment_margin_top; - segment.margin_bottom = segment_margin_bottom; - segment.margin_start = second_segment_margin_left; - - return (Gtk.Widget) segment; - } - - public void create_key_row(Gtk.Label label, ShortcutEntry entry, string name, Gtk.Grid grid, string? group_name=null, string? key=null) { - label.set_text(name); - label.get_style_context().add_class("preference_title"); - - monitor_check_key(entry, group_name, key); - - adjust_option_widgets(label, entry); - grid_attach(grid, label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(grid, entry, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void create_follow_key_row(Gtk.Label label, ShortcutEntry entry, string name, Gtk.Label previous_label, Gtk.Grid grid, string? group_name=null, string? key=null) { - label.set_text(name); - label.get_style_context().add_class("preference_title"); - - monitor_check_key(entry, group_name, key); - - adjust_option_widgets(label, entry); - grid_attach_next_to(grid, label, previous_label, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - grid_attach_next_to(grid, entry, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void monitor_check_key(ShortcutEntry entry, string group_name, string key) { - entry.change_key.connect((e, new_key) => { - parent_window.config.load_config(); - parent_window.config.config_file.set_string(group_name, key, new_key); - parent_window.config.save(); - - parent_window.config.update(); - }); - - if (group_name != null && key != null) { - try { - entry.set_text(parent_window.config.config_file.get_string(group_name, key)); - } catch (GLib.KeyFileError e) { - print("Preference monitor_check_key: %s\n", e.message); - } - } - } - - public void create_combox_row(Gtk.Label label, Widgets.DropdownTextButton combox, string name, Gtk.Grid grid, ArrayList? values=null, string? group_name=null, string? key=null) { - label.set_text(name); - label.get_style_context().add_class("preference_title"); - - if (values != null) { - foreach (string value in values) { - combox.append(value, value); - } - - try { - combox.set_active(values.index_of(parent_window.config.config_file.get_value(group_name, key))); - } catch (GLib.KeyFileError e) { - print("create_combox_row error: %s\n".printf(e.message)); - } - - combox.changed.connect((w) => { - parent_window.config.load_config(); - parent_window.config.config_file.set_string(group_name, key, values[combox.get_active()]); - parent_window.config.save(); - - parent_window.config.update(); - }); - } - adjust_option_widgets(label, combox); - grid_attach(grid, label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(grid, combox, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void create_combox_row_with_name(Gtk.Label label, Widgets.DropdownTextButton combox, string name, Gtk.Grid grid, ArrayList? values=null, ArrayList? names=null, string? group_name=null, string? key=null) { - label.set_text(name); - label.get_style_context().add_class("preference_title"); - - if (values != null) { - int index = 0; - foreach (string value in values) { - combox.append(value, names[index]); - index++; - } - - try { - combox.set_active(values.index_of(parent_window.config.config_file.get_value(group_name, key))); - } catch (GLib.KeyFileError e) { - print("create_combox_row error: %s\n".printf(e.message)); - } - - combox.changed.connect((w) => { - parent_window.config.load_config(); - parent_window.config.config_file.set_string(group_name, key, values[combox.get_active()]); - parent_window.config.save(); - - parent_window.config.update(); - }); - } - adjust_option_widgets(label, combox); - grid_attach(grid, label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(grid, combox, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void adjust_option_widgets(Gtk.Label name_widget, Gtk.Widget value_widget) { - name_widget.set_xalign(0); - name_widget.set_size_request(preference_name_width, grid_height); - name_widget.margin_start = option_widget_margin_left; - - value_widget.set_size_request(preference_widget_width, grid_height); - value_widget.margin_end = option_widget_margin_right; - // NOTE: - // set_hexpand is very important to make widget in grid to expand space horizaontally. - value_widget.set_hexpand(true); - } - - public Gtk.Box create_check_row(Widgets.CheckButton checkbutton, string name, Gtk.Grid grid, string? group_name=null, string? key=null) { - var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - var label = create_label(name); - label.get_style_context().add_class("preference_title"); - adjust_option_checkbutton(label, checkbutton); - - read_check_value(checkbutton, group_name, key); - - box.pack_start(checkbutton, false, false, 0); - box.pack_start(label, false, false, 0); - grid_attach(grid, box, 0, 0, preference_name_width, grid_height); - - return box; - } - - public Gtk.Box create_follow_check_row(Widgets.CheckButton checkbutton, string name, Gtk.Widget previous_widget, Gtk.Grid grid, string? group_name=null, string? key=null) { - var box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - var label = create_label(name); - label.get_style_context().add_class("preference_title"); - - adjust_option_checkbutton(label, checkbutton); - - read_check_value(checkbutton, group_name, key); - - box.pack_start(checkbutton, false, false, 0); - box.pack_start(label, false, false, 0); - grid_attach_next_to(grid, box, previous_widget, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - - return box; - } - - public void read_check_value(Widgets.CheckButton checkbutton, string group_name, string key) { - if (group_name != null && key != null) { - try { - checkbutton.set_active(parent_window.config.config_file.get_boolean(group_name, key)); - } catch (GLib.KeyFileError e) { - print("create_follow_check_row error: %s\n".printf(e.message)); - } - - monitor_check_value(checkbutton, group_name, key); - } - } - - public Gtk.Label create_follow_spinbutton_row(Widgets.SpinButton spinbutton, string name, Gtk.Widget previous_widget, Gtk.Grid grid, string? group_name=null, string? key=null) { - var label = create_label(name); - label.get_style_context().add_class("preference_title"); - adjust_option_widgets(label, spinbutton); - - read_spin_value(spinbutton, group_name, key); - - grid_attach_next_to(grid, label, previous_widget, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - grid_attach_next_to(grid, spinbutton, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - - return label; - } - - public void read_spin_value(Widgets.SpinButton spinbutton, string group_name, string key) { - if (group_name != null && key != null) { - try { - spinbutton.set_value(parent_window.config.config_file.get_integer(group_name, key)); - } catch (GLib.KeyFileError e) { - print("read_spin_value error: %s\n".printf(e.message)); - } - - monitor_spin_value(spinbutton, group_name, key); - } - } - - public void monitor_check_value(Widgets.CheckButton checkbutton, string group_name, string key) { - checkbutton.toggled.connect((w) => { - var is_active = checkbutton.get_active(); - - parent_window.config.load_config(); - parent_window.config.config_file.set_boolean(group_name, key, is_active); - parent_window.config.save(); - - parent_window.config.update(); - }); - } - - public void monitor_spin_value(Widgets.SpinButton spinbutton, string group_name, string key) { - spinbutton.value_changed.connect((w) => { - var spin_value = spinbutton.get_value(); - - parent_window.config.load_config(); - parent_window.config.config_file.set_integer(group_name, key, (int) spin_value); - parent_window.config.save(); - - parent_window.config.update(); - }); - } - - public void adjust_option_checkbutton(Gtk.Label label, Widgets.CheckButton checkbutton) { - checkbutton.margin_start = option_widget_margin_left; - checkbutton.margin_top = checkbutton_margin_top; - checkbutton.margin_end = checkbutton_margin_right; - } - - public Widgets.Entry create_entry() { - var entry = new Widgets.Entry(); - entry.get_style_context().add_class("preference_entry"); - - return entry; - } - - public Widgets.DropdownTextButton create_combox_text() { - var combox = new Widgets.DropdownTextButton(); - combox.get_style_context().add_class("preference_comboboxtext"); - - return combox; - } - - public Widgets.SpinButton create_spinbutton(int min, int max, int step) { - var spinbutton = new Widgets.SpinButton(); - spinbutton.set_range(min, max); - spinbutton.set_increments(step, step * 10); - spinbutton.get_style_context().add_class("preference_spinbutton"); - - return spinbutton; - } - - public Gtk.Label create_label(string? text=null) { - var label = new Gtk.Label(text); - label.get_style_context().add_class("preference_label"); - - return label; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/progressbar.vala deepin-terminal-5.4.13/widget/progressbar.vala --- deepin-terminal-5.0.0+ds1/widget/progressbar.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/progressbar.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class ProgressBar : Gtk.EventBox { - public double draw_percent; - public double percent; - public int height = 22; - public Cairo.ImageSurface pointer_surface; - public Gdk.RGBA background_color; - public Gdk.RGBA foreground_color; - public int draw_pointer_offset = 3; - public int line_height = 2; - public int line_margin_top = 10; - public int width = Constant.PREFERENCE_WIDGET_WIDTH; - - public signal void update(double percent); - - public ProgressBar(double init_percent) { - percent = init_percent; - set_size_request(width, height); - - foreground_color = Utils.hex_to_rgba("#2ca7f8"); - background_color = Utils.hex_to_rgba("#A4A4A4"); - pointer_surface = Utils.create_image_surface("progress_pointer.svg"); - - button_press_event.connect((w, e) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - set_percent(e.x * 1.0 / rect.width); - - return false; - }); - - motion_notify_event.connect((w, e) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - set_percent(e.x * 1.0 / rect.width); - - return false; - }); - - draw.connect(on_draw); - - show_all(); - } - - public void set_percent(double new_percent) { - percent = double.max(double.min((1 - Constant.TERMINAL_MIN_OPACITY) * new_percent + Constant.TERMINAL_MIN_OPACITY, 1), Constant.TERMINAL_MIN_OPACITY); - draw_percent = double.max(double.min(new_percent, 1), 0); - - update(percent); - - queue_draw(); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - int left_offset = 0; - int right_offset = 0; - - // Because pointer surface opacity at side. - // So we adjust background line offset to avoid user see background line at two side when percent is 0 or 1. - if (draw_percent == 0) { - left_offset = pointer_surface.get_width() / 2; - right_offset = pointer_surface.get_width() / 2; - } else if (draw_percent == 1) { - left_offset = 0; - right_offset = draw_pointer_offset; - } - - Utils.set_context_color(cr, background_color); - Draw.draw_rectangle(cr, left_offset, line_margin_top, rect.width - right_offset, line_height); - - if (draw_percent > 0) { - cr.set_source_rgba(1, 0, 1, 1); - Utils.set_context_color(cr, foreground_color); - Draw.draw_rectangle(cr, left_offset, line_margin_top, (int) (rect.width * draw_percent) - right_offset, line_height); - } - - Draw.draw_surface(cr, - pointer_surface, - int.max(-draw_pointer_offset, - int.min((int) (rect.width * draw_percent) - pointer_surface.get_width() / 2 / 2, - rect.width - pointer_surface.get_width() + draw_pointer_offset)), - 0); - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/quake_window.vala deepin-terminal-5.4.13/widget/quake_window.vala --- deepin-terminal-5.0.0+ds1/widget/quake_window.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/quake_window.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,518 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Utils; -using Widgets; -using XUtils; - -namespace Widgets { - public class QuakeWindow : Widgets.ConfigWindow { - public double window_default_height_scale = 0.3; - public double window_max_height_scale = 0.7; - public int press_x; - public int press_y; - public int window_frame_margin_bottom = 60; - - public QuakeWindow() { - quake_mode = true; - - set_app_paintable(true); // set_app_paintable is necessary step to make window transparent. - Gdk.Screen screen = Gdk.Screen.get_default(); - set_visual(screen.get_rgba_visual()); - - int monitor = config.get_terminal_monitor(); - - Gdk.Rectangle rect; - screen.get_monitor_geometry(monitor, out rect); - - set_decorated(false); - set_keep_above(true); - - set_skip_taskbar_hint(true); - set_skip_pager_hint(true); - // NOTE: Don't change other type, otherwise window can't resize by user. - set_type_hint(Gdk.WindowTypeHint.MENU); - move(rect.x, 0); - - window_frame_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - window_widget_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - add(window_frame_box); - window_frame_box.pack_start(window_widget_box, true, true, 0); - - realize.connect((w) => { - update_frame(); - - try { - var quake_window_fullscreen = config.config_file.get_boolean("advanced", "quake_window_fullscreen"); - if (quake_window_fullscreen) { - fullscreen(); - } else { - // Don't make quake window too height that can't resize quake window from bottom edge. - var config_height = config.config_file.get_double("advanced", "quake_window_height"); - if (config_height > window_max_height_scale) { - config_height = window_max_height_scale; - } - - // Set default size. - if (config_height == 0) { - set_default_size(rect.width, (int) (rect.height * window_default_height_scale)); - } else { - set_default_size(rect.width, (int) (rect.height * double.min(config_height, 1.0))); - } - } - } catch (Error e) { - print("QuakeWindow init: %s\n", e.message); - } - }); - - focus_in_event.connect((w) => { - update_style(); - - return false; - }); - - focus_out_event.connect((w) => { - update_style(); - - try { - // Hide quake window when lost focus, and config option 'hide_quakewindow_after_lost_focus' must be true, variable 'show_quake_menu' must be fasle. - // If variable 'show_quake_menu' is true, lost focus signal is cause by click right menu on quake terminal. - if (config.config_file.get_boolean("advanced", "hide_quakewindow_after_lost_focus")) { - if (show_quake_menu) { - show_quake_menu = false; - } else { - GLib.Timeout.add(200, () => { - var window_state = get_window().get_state(); - // Because some desktop environment, such as DDE will grab keyboard focus when press keystroke. :( - // - // When press quakewindow shortcuts will make code follow order: `focus_out event -> toggle_quake_window'. - // focus_out event will make quakewindow hide immediately, quakewindow will show again when execute toggle_quake_window. - // At last, quakewindow will execute 'hide' and 'show' actions twice, not just simple hide window. - // - // So i add 200ms timeout to wait toggle_quake_window execute, - // focus_out event will hide window if it find window is show state after execute toggle_quake_window. - if (!(Gdk.WindowState.WITHDRAWN in window_state)) { - hide(); - } - - return false; - }); - // hide(); - } - } - } catch (Error e) { - print("quake_window focus_out_event: %s\n", e.message); - } - - return false; - }); - - configure_event.connect((w) => { - // Update input shape. - int width, height; - get_size(out width, out height); - - Cairo.RectangleInt input_shape_rect; - get_window().get_frame_extents(out input_shape_rect); - - if (screen_monitor.is_composited()) { - input_shape_rect.x = 0; - input_shape_rect.y = 0; - input_shape_rect.width = width; - input_shape_rect.height = height - window_frame_box.margin_bottom + Constant.RESPONSE_RADIUS; - } - - var shape = new Cairo.Region.rectangle(input_shape_rect); - get_window().input_shape_combine_region(shape, 0, 0); - - // Update blur area. - update_blur_status(); - - window_save_before_quit(); - - return false; - }); - - window_frame_box.button_press_event.connect((w, e) => { - if (!screen_monitor.is_composited()) { - var cursor_type = get_frame_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { - e.device.get_position(null, out press_x, out press_y); - - GLib.Timeout.add(10, () => { - int pointer_x, pointer_y; - e.device.get_position(null, out pointer_x, out pointer_y); - - if (pointer_x != press_x || pointer_y != press_y) { - pointer_x *= get_scale_factor(); - pointer_y *= get_scale_factor(); - resize_window(this, pointer_x, pointer_y, (int) e.button, Gdk.CursorType.BOTTOM_SIDE); - - return false; - } else { - return true; - } - }); - } - } - - return false; - }); - - button_press_event.connect((w, e) => { - var cursor_type = get_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { - e.device.get_position(null, out press_x, out press_y); - - GLib.Timeout.add(10, () => { - int pointer_x, pointer_y; - e.device.get_position(null, out pointer_x, out pointer_y); - - if (pointer_x != press_x || pointer_y != press_y) { - pointer_x *= get_scale_factor(); - pointer_y *= get_scale_factor(); - resize_window(this, pointer_x, pointer_y, (int) e.button, Gdk.CursorType.BOTTOM_SIDE); - - return false; - } else { - return true; - } - }); - } - - return false; - }); - - draw.connect_after((w, cr) => { - draw_window_widgets(cr); - - draw_window_above(cr); - - return true; - }); - - config.update.connect((w) => { - update_style(); - - update_blur_status(true); - }); - } - - public void update_blur_status(bool force_update=false) { - try { - int width, height; - get_size(out width, out height); - - if (width != resize_cache_width || height != resize_cache_height || force_update) { - resize_cache_width = width; - resize_cache_height = height; - - unowned X.Display xdisplay = (get_window().get_display() as Gdk.X11.Display).get_xdisplay(); - var xid = (int)((Gdk.X11.Window) get_window()).get_xid(); - var atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED = xdisplay.intern_atom("_NET_WM_DEEPIN_BLUR_REGION_ROUNDED", false); - - var blur_background = config.config_file.get_boolean("advanced", "blur_background"); - if (blur_background) { - Cairo.RectangleInt blur_rect; - get_window().get_frame_extents(out blur_rect); - - if (screen_monitor.is_composited()) { - blur_rect.x = 0; - blur_rect.y = 0; - blur_rect.width = width; - blur_rect.height = height - window_frame_box.margin_bottom; - } - - blur_rect.x = (int) (blur_rect.x * Utils.get_default_monitor_scale()); - blur_rect.y = (int) (blur_rect.y * Utils.get_default_monitor_scale()); - blur_rect.width = (int) (blur_rect.width * Utils.get_default_monitor_scale()); - blur_rect.height = (int) (blur_rect.height * Utils.get_default_monitor_scale()); - - ulong[] data = {(ulong) blur_rect.x, (ulong) blur_rect.y, (ulong) blur_rect.width, (ulong) blur_rect.height, 8, 8}; - xdisplay.change_property( - xid, - atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED, - X.XA_CARDINAL, - 32, - X.PropMode.Replace, - (uchar[])data, - ((ulong[]) data).length); - } else { - ulong[] data = {0, 0, 0, 0, 0, 0}; - xdisplay.change_property( - xid, - atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED, - X.XA_CARDINAL, - 32, - X.PropMode.Replace, - (uchar[])data, - ((ulong[]) data).length); - } - } - } catch (GLib.KeyFileError e) { - print("%s\n", e.message); - } - } - - public void add_widget(Gtk.Widget widget) { - window_widget_box.pack_start(widget, true, true, 0); - } - - public void toggle_quake_window() { - Gdk.Screen screen = Gdk.Screen.get_default(); - int monitor = config.get_terminal_monitor(); - int window_monitor = screen.get_monitor_at_window(get_window()); - - Gdk.Rectangle rect; - screen.get_monitor_geometry(monitor, out rect); - - if (monitor == window_monitor) { - var window_state = get_window().get_state(); - if (Gdk.WindowState.WITHDRAWN in window_state) { - show_quake_window(rect); - } else { - - try { - // When option hide_quakewindow_after_lost_focus enable. - // Focus terminal if terminal is not active, only hide temrinal after terminal focus. - if (config.config_file.get_boolean("advanced", "hide_quakewindow_when_active")) { - // Because some desktop environment, such as DDE will grab keyboard focus when press keystroke. :( - // So i add 200ms timeout to wait desktop environment release keyboard focus and then get window active state. - // Otherwise, window is always un-active state that quake terminal can't toggle to hide. - GLib.Timeout.add(200, () => { - if (is_active) { - hide(); - } else { - // blumia: present(), which send `_NET_ACTIVE_WINDOW` with current time (0) as timestamp, - // doesn't works under KWin, a correct timestamp form X-server start is required. - //present(); - present_with_time(Gdk.X11.get_server_time((Gdk.X11.Window)get_window())); - } - - return false; - }); - } - // Hide terminal immediately if option hide_quakewindow_when_active is false. - else { - hide(); - } - } catch (Error e) { - print("quake_window toggle_quake_window: %s\n", e.message); - } - } - } else { - show_quake_window(rect); - } - } - - public void show_quake_window(Gdk.Rectangle rect) { - // Init. - int width, height; - get_size(out width, out height); - show_all(); - - // Resize quake terminal window's width along with monitor's width. - get_window().move_resize(rect.x, 0, rect.width, height); - - // Present window. - present(); - } - - public void update_style() { - clean_style(); - - bool is_light_theme = is_light_theme(); - - if (is_active) { - if (is_light_theme) { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_light_shadow_active"); - } else { - window_frame_box.get_style_context().add_class("window_light_noshadow_active"); - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_dark_shadow_active"); - } else { - window_frame_box.get_style_context().add_class("window_dark_noshadow_active"); - } - } - } else { - if (is_light_theme) { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_light_shadow_inactive"); - } else { - window_frame_box.get_style_context().add_class("window_light_noshadow_inactive"); - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_dark_shadow_inactive"); - } else { - window_frame_box.get_style_context().add_class("window_dark_noshadow_inactive"); - } - } - } - } - - public void clean_style() { - window_frame_box.get_style_context().remove_class("window_light_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_dark_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_light_shadow_active"); - window_frame_box.get_style_context().remove_class("window_dark_shadow_active"); - window_frame_box.get_style_context().remove_class("window_noradius_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_noradius_shadow_active"); - window_frame_box.get_style_context().remove_class("window_light_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_dark_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_light_noshadow_active"); - window_frame_box.get_style_context().remove_class("window_dark_noshadow_active"); - window_frame_box.get_style_context().remove_class("window_noradius_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_noradius_noshadow_active"); - } - - public void draw_window_widgets(Cairo.Context cr) { - Utils.propagate_draw(this, cr); - } - - public void draw_window_above(Cairo.Context cr) { - Gtk.Allocation window_frame_rect; - window_frame_box.get_allocation(out window_frame_rect); - - int x = window_frame_box.margin_start; - int y = window_frame_box.margin_top; - int width = window_frame_rect.width; - int height = window_frame_rect.height; - - int titlebar_y = y; - if (get_scale_factor() > 1) { - titlebar_y += 1; - } - - draw_titlebar_underline(cr, x, titlebar_y + height - Constant.TITLEBAR_HEIGHT - 1, width, -1); - draw_active_tab_underline(cr, x + active_tab_underline_x, titlebar_y + height - Constant.TITLEBAR_HEIGHT - 1); - } - - public void show_window(WorkspaceManager workspace_manager, Tabbar tabbar) { - Gdk.RGBA background_color = Gdk.RGBA(); - - init(workspace_manager, tabbar); - // First focus terminal after show quake terminal. - // Sometimes, some popup window (like wine program's popup notify window) will grab focus, - // so call window.present to make terminal get focus. - show.connect((t) => { - present(); - }); - - top_box.draw.connect((w, cr) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - try { - background_color = Utils.hex_to_rgba(config.config_file.get_string("theme", "background")); - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, config.config_file.get_double("general", "opacity")); - Draw.draw_rectangle(cr, 0, 0, rect.width, Constant.TITLEBAR_HEIGHT); - } catch (Error e) { - print("Main quake mode: %s\n", e.message); - } - - Utils.propagate_draw(top_box, cr); - - return true; - }); - - top_box.pack_start(tabbar, true, true, 0); - box.pack_start(workspace_manager, true, true, 0); - - try { - if (config.config_file.get_boolean("advanced", "show_quakewindow_tab")) { - box.pack_start(top_box, false, false, 0); - } - } catch (Error e) { - print("Main quake mode: %s\n", e.message); - } - - add_widget(box); - show_all(); - } - - public override void window_save_before_quit() { - int monitor = config.get_terminal_monitor(); - Gdk.Rectangle rect; - screen.get_monitor_geometry(monitor, out rect); - - int width, height; - get_size(out width, out height); - - config.load_config(); - config.config_file.set_double("advanced", "quake_window_height", height * 1.0 / rect.height); - config.save(); - } - - public override Gdk.CursorType? get_cursor_type(double x, double y) { - int window_x, window_y; - get_window().get_origin(out window_x, out window_y); - - int width, height; - get_size(out width, out height); - - var bottom_side_start = window_y + height - window_frame_margin_bottom; - var bottom_side_end = window_y + height - window_frame_margin_bottom + Constant.RESPONSE_RADIUS;; - - if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_SIDE; - } else { - return null; - } - } - - public override Gdk.CursorType? get_frame_cursor_type(double x, double y) { - int window_x, window_y; - get_window().get_origin(out window_x, out window_y); - - int width, height; - get_size(out width, out height); - - var bottom_side_start = window_y + height - Constant.RESPONSE_RADIUS; - var bottom_side_end = window_y + height; - - if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_SIDE; - } else { - return null; - } - } - - public override void update_frame() { - update_style(); - - if (screen_monitor.is_composited()) { - window_frame_box.margin_bottom = window_frame_margin_bottom; - get_window().set_shadow_width(0, 0, 0, window_frame_margin_bottom); - } else { - window_frame_box.margin_bottom = 0; - get_window().set_shadow_width(0, 0, 0, 0); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/remote_panel.vala deepin-terminal-5.4.13/widget/remote_panel.vala --- deepin-terminal-5.0.0+ds1/widget/remote_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/remote_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,500 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; -using Utils; -using Gee; - -namespace Widgets { - public class RemotePanel : BasePanel { - public Gtk.Box group_page_box; - public Gtk.ScrolledWindow? group_page_scrolledwindow; - public KeyFile config_file; - public int width = Constant.SLIDER_WIDTH; - public string config_file_path = Utils.get_config_file_path("server-config.conf"); - - public delegate void UpdatePageAfterEdit(); - - public RemotePanel(Workspace space, WorkspaceManager manager) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - workspace = space; - workspace_manager = manager; - - config_file = new KeyFile(); - - focus_widget = ((Gtk.Window) workspace.get_toplevel()).get_focus(); - parent_window = (Widgets.ConfigWindow) workspace.get_toplevel(); - try { - background_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "background")); - } catch (Error e) { - print("RemotePanel init: %s\n", e.message); - } - - switcher = new Widgets.Switcher(width); - - group_page_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - set_size_request(width, -1); - home_page_box.set_size_request(width, -1); - group_page_box.set_size_request(width, -1); - search_page_box.set_size_request(width, -1); - - pack_start(switcher, true, true, 0); - - show_home_page(); - - draw.connect(on_draw); - } - - public void load_config() { - var file = File.new_for_path(config_file_path); - if (!file.query_exists()) { - Utils.touch_dir(Utils.get_config_dir()); - Utils.create_file(config_file_path); - } else { - try { - config_file.load_from_file(config_file_path, KeyFileFlags.NONE); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - } - } - - public override void create_home_page() { - Utils.destroy_all_children(home_page_box); - home_page_scrolledwindow = null; - - HashMap groups = new HashMap(); - ArrayList> ungroups = new ArrayList>(); - - try { - load_config(); - - foreach (unowned string option in config_file.get_groups ()) { - string group_name = config_file.get_value(option, "GroupName"); - - if (group_name == "") { - add_group_item(option, ungroups, config_file); - } else { - if (groups.has_key(group_name)) { - int group_item_number = groups.get(group_name); - groups.set(group_name, group_item_number + 1); - } else { - groups.set(group_name, 1); - } - } - } - } catch (Error e) { - print("RemotePanel config path: %s\n", config_file_path); - - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("RemotePanel create_home_page: %s\n", e.message); - } - } - - if (groups.size > 0 || ungroups.size > 1) { - Widgets.SearchEntry search_entry = new Widgets.SearchEntry(); - home_page_box.pack_start(search_entry, false, false, 0); - - search_entry.search_entry.activate.connect((entry) => { - if (entry.get_text().strip() != "") { - show_search_page(entry.get_text(), "", home_page_box); - } - }); - - var split_line = new SplitLine(); - home_page_box.pack_start(split_line, false, false, 0); - } - - home_page_scrolledwindow = create_scrolled_window(); - home_page_box.pack_start(home_page_scrolledwindow, true, true, 0); - - var server_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - home_page_scrolledwindow.add(server_box); - - if (ungroups.size + groups.size > 0) { - foreach (var group_entry in groups.entries) { - var server_group_button = create_server_group_button(group_entry.key, group_entry.value); - server_box.pack_start(server_group_button, false, false, 0); - } - - foreach (var ungroup_list in ungroups) { - var server_button = create_server_button(ungroup_list[0], ungroup_list[1]); - server_button.edit_server.connect((w, server_info) => { - edit_server(server_info, () => { - update_home_page(); - }); - }); - server_box.pack_start(server_button, false, false, 0); - } - - } - - var split_line = new SplitLine(); - home_page_box.pack_start(split_line, false, false, 0); - - Widgets.AddButton add_server_button = create_add_server_button(); - add_server_button.margin_left = 16; - add_server_button.margin_right = 16; - add_server_button.margin_top = 16; - add_server_button.margin_bottom = 16; - home_page_box.pack_start(add_server_button, false, false, 0); - } - - public void login_server(string server_info) { - // Hide remote panel first. - workspace.hide_remote_panel(); - if (focus_widget != null) { - focus_widget.grab_focus(); - } - - // New workspace if focus terminal has foreground process. - Term focus_term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - if (focus_term.has_foreground_process()) { - workspace_manager.new_workspace_with_current_directory(true); - } - - // Login server in timeout callback, otherwise login action can't execute. - GLib.Timeout.add(10, () => { - Term term = workspace_manager.focus_workspace.get_focus_term(workspace_manager.focus_workspace); - term.login_server(server_info); - - return false; - }); - } - - public void show_group_page(string group_name, Gtk.Widget start_widget, string directoin) { - create_group_page(group_name); - - if (directoin == "scroll_to_right") { - switcher.scroll_to_right(start_widget, group_page_box); - } else if (directoin == "scroll_to_left") { - switcher.scroll_to_left(start_widget, group_page_box); - } - - show_all(); - } - - public void create_group_page(string group_name) { - Utils.destroy_all_children(group_page_box); - group_page_scrolledwindow = null; - - ArrayList> ungroups = new ArrayList>(); - - try { - load_config(); - - foreach (unowned string option in config_file.get_groups ()) { - string gname = config_file.get_value(option, "GroupName"); - - if (gname == group_name) { - add_group_item(option, ungroups, config_file); - } - } - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("login_server error: %s\n", e.message); - } - } - - var top_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - top_box.set_size_request(-1, Constant.REMOTE_PANEL_SEARCHBAR_HEIGHT); - group_page_box.pack_start(top_box, false, false, 0); - - ImageButton back_button = new Widgets.ImageButton("back", true); - back_button.margin_left = back_button_margin_left; - back_button.margin_top = back_button_margin_top; - back_button.clicked.connect((w) => { - show_home_page(group_page_box); - }); - top_box.pack_start(back_button, false, false, 0); - - var split_line = new SplitLine(); - group_page_box.pack_start(split_line, false, false, 0); - - if (ungroups.size > 1) { - Widgets.SearchEntry search_entry = new Widgets.SearchEntry(); - top_box.pack_start(search_entry, true, true, 0); - - search_entry.search_entry.activate.connect((entry) => { - if (entry.get_text().strip() != "") { - show_search_page(entry.get_text(), group_name, group_page_box); - } - }); - } - - group_page_scrolledwindow = create_scrolled_window(); - group_page_box.pack_start(group_page_scrolledwindow, true, true, 0); - - var server_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - group_page_scrolledwindow.add(server_box); - - if (ungroups.size > 0) { - foreach (var ungroup_list in ungroups) { - var server_button = create_server_button(ungroup_list[0], ungroup_list[1]); - server_button.edit_server.connect((w, server_info) => { - edit_server(server_info, () => { - update_group_page(group_name); - }); - }); - server_box.pack_start(server_button, false, false, 0); - } - } - } - - public void add_server( - string server_address, - string user, - string password, - string private_key, - int port, - string encode, - string path, - string command, - string name, - string group_name, - string backspace, - string delete - ) { - if (user != "" && server_address != "") { - Utils.touch_dir(Utils.get_config_dir()); - - load_config(); - - // Use ',' as array-element-separator instead of ';'. - config_file.set_list_separator (','); - - string gname = "%s@%s@%i".printf(user, server_address, port); - config_file.set_string(gname, "Name", name); - config_file.set_string(gname, "GroupName", group_name); - config_file.set_string(gname, "Command", command); - config_file.set_string(gname, "Path", path); - config_file.set_string(gname, "Encode", encode); - config_file.set_string(gname, "Backspace", backspace); - config_file.set_string(gname, "Del", delete); - config_file.set_string(gname, "PrivateKey", private_key); - - Utils.store_password(user, server_address, port, password); - - try { - config_file.save_to_file(config_file_path); - } catch (Error e) { - print("add_server error occur when config_file.save_to_file %s: %s\n", config_file_path, e.message); - } - } - } - - public override void create_search_page(string search_text, string group_name) { - Utils.destroy_all_children(search_page_box); - search_page_scrolledwindow = null; - - try { - load_config(); - - ArrayList> ungroups = new ArrayList>(); - - foreach (unowned string option in config_file.get_groups ()) { - if (group_name == "" || group_name == config_file.get_value(option, "GroupName")) { - ArrayList match_list = new ArrayList(); - match_list.add(option); - foreach (string key in config_file.get_keys(option)) { - if (key == "Name" || key == "GroupName" || key == "Command" || key == "Path") { - match_list.add(config_file.get_value(option, key)); - } - } - foreach (string match_text in match_list) { - if (match_text.down().contains(search_text.down())) { - add_group_item(option, ungroups, config_file); - - // Just add option one times. - break; - } - } - } - } - - var top_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - top_box.set_size_request(-1, Constant.REMOTE_PANEL_SEARCHBAR_HEIGHT); - search_page_box.pack_start(top_box, false, false, 0); - - ImageButton back_button = new Widgets.ImageButton("back", true); - back_button.margin_left = back_button_margin_left; - back_button.margin_top = back_button_margin_top; - back_button.clicked.connect((w) => { - if (group_name == "") { - show_home_page(search_page_box); - } else { - show_group_page(group_name, search_page_box, "scroll_to_left"); - } - }); - top_box.pack_start(back_button, false, false, 0); - - var search_label = new Gtk.Label(null); - search_label.set_text("%s %s".printf(_("Search:"), search_text)); - top_box.pack_start(search_label, true, true, 0); - - var split_line = new SplitLine(); - search_page_box.pack_start(split_line, false, false, 0); - - search_page_scrolledwindow = create_scrolled_window(); - search_page_box.pack_start(search_page_scrolledwindow, true, true, 0); - - var server_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - search_page_scrolledwindow.add(server_box); - - foreach (var ungroup_list in ungroups) { - var server_button = create_server_button(ungroup_list[0], ungroup_list[1]); - server_button.edit_server.connect((w, server_info) => { - edit_server(server_info, () => { - update_search_page(search_text, group_name); - }); - }); - server_box.pack_start(server_button, false, false, 0); - } - - realize.connect((w) => { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - search_label.get_style_context().add_class("remote_search_label_light"); - } else { - search_label.get_style_context().add_class("remote_search_label_dark"); - } - }); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("RemotePanel create_search_page: %s\n", e.message); - } - } - - } - - public void add_group_item(string option, ArrayList> lists, KeyFile config_file) { - try { - ArrayList list = new ArrayList(); - list.add(config_file.get_value(option, "Name")); - list.add(option); - lists.add(list); - } catch (Error e) { - print("add_group_item error: %s\n", e.message); - } - } - - public void edit_server(string server_info, UpdatePageAfterEdit func) { - load_config(); - - var remote_server_dialog = new Widgets.RemoteServerDialog(parent_window, this, server_info, config_file); - remote_server_dialog.transient_for_window(parent_window); - remote_server_dialog.delete_server.connect((server, address, username) => { - try { - // First, remove old server info from config file. - if (config_file.has_group(server_info)) { - config_file.remove_group(server_info); - config_file.save_to_file(config_file_path); - } - - func(); - } catch (Error e) { - error ("%s", e.message); - } - }); - remote_server_dialog.edit_server.connect(( - server, address, username, password, private_key, port, - encode, path, command, nickname, groupname, - backspace_key, delete_key) => { - try { - // First, remove old server info from config file. - if (config_file.has_group(server_info)) { - config_file.remove_group(server_info); - config_file.save_to_file(config_file_path); - } - - // Second, add new server info. - add_server(address, username, password, private_key, port, encode, path, - command, nickname, groupname, backspace_key, delete_key); - - func(); - - remote_server_dialog.destroy(); - } catch (Error e) { - error ("%s", e.message); - } - }); - - remote_server_dialog.show_all(); - } - - public Widgets.ServerButton create_server_button(string name, string info) { - var server_button = new Widgets.ServerButton(name, info); - server_button.login_server.connect((w, server_info) => { - login_server(server_info); - }); - return server_button; - } - - public Widgets.ServerGroupButton create_server_group_button(string group_name, int server_number) { - var server_group_button = new Widgets.ServerGroupButton(group_name, server_number); - server_group_button.show_group_servers.connect((w, group_name) => { - show_group_page(group_name, home_page_box, "scroll_to_right"); - }); - - return server_group_button; - } - - public Widgets.AddButton create_add_server_button() { - Widgets.AddButton add_server_button = new Widgets.AddButton(_("Add server")); - add_server_button.clicked.connect((w) => { - var remote_server_dialog = new Widgets.RemoteServerDialog(parent_window, this); - remote_server_dialog.transient_for_window(parent_window); - remote_server_dialog.add_server.connect((server, address, username, password, private_key, port, encode, path, command, nickname, groupname, backspace_key, delete_key) => { - add_server(address, username, password, private_key, port, encode, path, command, nickname, groupname, backspace_key, delete_key); - update_home_page(); - remote_server_dialog.destroy(); - }); - remote_server_dialog.show_all(); - }); - - return add_server_button; - } - - public void update_group_page(string group_name) { - double scroll_value = 0; - if (group_page_scrolledwindow != null) { - scroll_value = group_page_scrolledwindow.get_vadjustment().get_value(); - } - - create_group_page(group_name); - - switcher.add_to_left_box(group_page_box); - - if (group_page_scrolledwindow != null) { - group_page_scrolledwindow.get_vadjustment().set_value(scroll_value); - } - - show_all(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/remote_server_dialog.vala deepin-terminal-5.4.13/widget/remote_server_dialog.vala --- deepin-terminal-5.0.0+ds1/widget/remote_server_dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/remote_server_dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,490 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class RemoteServerDialog : Widgets.Dialog { - public Gtk.Box advanced_options_box; - public Gtk.Box box; - public Gtk.Box server_action_box; - public Widgets.DropdownTextButton backspace_key_box; - public Widgets.DropdownTextButton del_key_box; - public Widgets.DropdownTextButton encode_box; - public Gtk.Grid advanced_grid; - public Gtk.Widget? focus_widget; - public Widgets.ConfigWindow parent_window; - public Widgets.Entry address_entry; - public Widgets.Entry command_entry; - public Widgets.Entry groupname_entry; - public Widgets.Entry name_entry; - public Widgets.Entry path_entry; - public Widgets.Entry user_entry; - public Widgets.FileButton file_button; - public Widgets.PasswordButton password_button; - public Widgets.SpinButton port_spinbutton; - public Widgets.TextButton delete_server_button; - public Widgets.TextButton show_advanced_button; - public int action_button_margin_top = 20; - public int font_size = 11; - public int grid_height = 24; - public int label_margin_left = 14; - public int max_server_name_length = 50; - public int port_label_margin_left = 21; - public int preference_margin_end = 20; - public int preference_margin_start = 20; - public int preference_margin_top = 10; - public int preference_name_margin_left = 10; - public int preference_name_width = 0; - public int preference_widget_width = 100; - public int window_expand_height; - public string? server_info; - - public signal void add_server(string address, - string username, - string password, - string private_key, - int port, - string encode, - string path, - string command, - string nickname, - string groupname, - string backspace_key, - string delete_key - ); - public signal void edit_server(string address, - string username, - string password, - string private_key, - int port, - string encode, - string path, - string command, - string nickname, - string groupname, - string backspace_key, - string delete_key - ); - - public signal void delete_server(string address, string username); - - public RemoteServerDialog(Widgets.ConfigWindow window, Gtk.Widget? widget, string? info=null, KeyFile? config_file=null) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_init_size(480, 360); - - if (!screen_monitor.is_composited()) { - window_expand_height = 530 - window_frame_margin_top - window_frame_margin_bottom; - } else { - window_expand_height = 530; - } - - var font_description = new Pango.FontDescription(); - font_description.set_size((int)(font_size * Pango.SCALE)); - int max_width = 0; - string[] label_names = {_("Server name"), _("Address"), _("Username"), _("Password"), _("Certificate"), _("Path"), _("Command"), _("Group"), _("Encoding"), _("Backspace key"), _("Delete key")}; - foreach (string label_name in label_names) { - var layout = create_pango_layout(label_name); - layout.set_font_description(font_description); - int name_width, name_height; - layout.get_pixel_size(out name_width, out name_height); - - max_width = int.max(max_width, name_width); - } - preference_name_width = max_width + preference_name_margin_left; - - try { - parent_window = window; - focus_widget = widget; - server_info = info; - - string[]? server_infos = null; - if (server_info != null) { - server_infos = server_info.split("@"); - } - - box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - var top_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - top_box.margin_bottom = preference_margin_top; - - var event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - - var overlay = new Gtk.Overlay(); - overlay.add(top_box); - overlay.add_overlay(event_area); - - box.pack_start(overlay, false, false, 0); - - // Make label center of titlebar. - var spacing_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - spacing_box.set_size_request(Constant.CLOSE_BUTTON_WIDTH, -1); - top_box.pack_start(spacing_box, false, false, 0); - - Gtk.Label title_label = new Gtk.Label(null); - title_label.get_style_context().add_class("remote_server_label"); - top_box.pack_start(title_label, true, true, 0); - - if (server_infos != null) { - title_label.set_text(_("Edit Server")); - } else { - title_label.set_text(_("Add Server")); - } - - var close_button = Widgets.create_close_button(); - close_button.clicked.connect((b) => { - this.destroy(); - }); - - top_box.pack_start(close_button, false, false, 0); - - destroy.connect((w) => { - if (focus_widget != null) { - focus_widget.grab_focus(); - } - }); - - var content_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - content_box.set_halign(Gtk.Align.CENTER); - content_box.margin_start = preference_margin_start; - content_box.margin_end = preference_margin_end; - box.pack_start(content_box, false, false, 0); - - var grid = new Gtk.Grid(); - grid.margin_end = label_margin_left; - content_box.pack_start(grid, false, false, 0); - - // Nick name. - Label name_label = new Gtk.Label(null); - name_entry = new Widgets.Entry(); - if (server_infos != null) { - name_entry.set_text(config_file.get_value(server_info, "Name")); - } - name_entry.set_placeholder_text(_("Required")); - create_key_row(name_label, name_entry, _("Server name:"), grid); - - // Address. - Label address_label = create_label(_("Address:")); - address_entry = new Widgets.Entry(); - if (server_infos != null) { - address_entry.set_text(server_infos[1]); - } - address_entry.set_width_chars(label_margin_left); - address_entry.set_placeholder_text(_("Required")); - address_entry.margin_start = label_margin_left; - address_entry.get_style_context().add_class("preference_entry"); - Label port_label = create_label(_("Port:")); - port_spinbutton = new Widgets.SpinButton(); - - port_spinbutton.set_range(0, 65535); - port_spinbutton.set_increments(1, 10); - port_spinbutton.get_style_context().add_class("preference_spinbutton"); - if (server_infos != null) { - if (server_infos.length > 2) { - port_spinbutton.set_value(int.parse(server_infos[2])); - } else { - port_spinbutton.set_value(config_file.get_integer(server_info, "Port")); - } - } else { - port_spinbutton.set_value(22); - } - port_spinbutton.margin_start = label_margin_left; - - var address_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - address_box.pack_start(address_entry, true, true, 0); - address_box.pack_start(port_label, false, false, 0); - address_box.pack_start(port_spinbutton, false, false, 0); - - grid_attach_next_to(grid, address_label, name_label, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - grid_attach_next_to(grid, address_box, address_label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - - adjust_option_widgets(address_label, address_box); - - // Username. - Label user_label = new Gtk.Label(null); - user_entry = new Widgets.Entry(); - if (server_infos != null) { - user_entry.set_text(server_infos[0]); - } - user_entry.set_placeholder_text(_("Required")); - create_follow_key_row(user_label, user_entry, _("Username:"), address_label, grid); - - // Password. - Label password_label = new Gtk.Label(null); - password_button = new Widgets.PasswordButton(); - if (server_infos != null) { - string password = ""; - if (server_infos.length > 2) { - password = Utils.lookup_password(server_infos[0], server_infos[1], server_infos[2]); - } else { - password = Utils.lookup_password(server_infos[0], server_infos[1]); - } - password_button.entry.set_text(password); - } - create_follow_key_row(password_label, password_button, _("Password:"), user_label, grid); - - // File. - Label file_label = new Gtk.Label(null); - file_button = new Widgets.FileButton(); - if (server_infos != null) { - try { - file_button.entry.set_text(config_file.get_value(server_info, "PrivateKey")); - } catch (GLib.KeyFileError e) { - if (FileUtils.test(Utils.get_default_private_key_path(), FileTest.EXISTS)) { - file_button.entry.set_text(Utils.get_default_private_key_path()); - } - } - } - create_follow_key_row(file_label, file_button, _("Certificate:"), password_label, grid); - - // Advanced box. - advanced_options_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - advanced_grid = new Gtk.Grid(); - advanced_grid.margin_end = label_margin_left; - content_box.pack_start(advanced_options_box, false, false, 0); - - // Group name. - Label group_name_label = new Gtk.Label(null); - groupname_entry = new Widgets.Entry(); - if (server_infos != null) { - groupname_entry.set_text(config_file.get_value(server_info, "GroupName")); - } - groupname_entry.set_placeholder_text(_("Optional")); - groupname_entry.set_width_chars(30); // this line is expand width of entry. - create_key_row(group_name_label, groupname_entry, _("Group:"), advanced_grid); - - // Path. - Label path_label = new Gtk.Label(null); - path_entry = new Widgets.Entry(); - if (server_infos != null) { - path_entry.set_text(config_file.get_value(server_info, "Path")); - } - path_entry.set_placeholder_text(_("Optional")); - create_follow_key_row(path_label, path_entry, _("Path:"), group_name_label, advanced_grid); - - // Command. - Label command_label = new Gtk.Label(null); - command_entry = new Widgets.Entry(); - if (server_infos != null) { - command_entry.set_text(config_file.get_value(server_info, "Command")); - } - command_entry.set_placeholder_text(_("Optional")); - create_follow_key_row(command_label, command_entry, _("Command:"), path_label, advanced_grid); - - // Encoding. - Label encode_label = new Gtk.Label(null); - encode_box = new Widgets.DropdownTextButton(); - foreach (string name in parent_window.config.encoding_names) { - encode_box.append(name, name); - } - if (server_infos != null) { - encode_box.set_active(parent_window.config.encoding_names.index_of(config_file.get_value(server_info, "Encode"))); - } else { - encode_box.set_active(parent_window.config.encoding_names.index_of("UTF-8")); - } - create_follow_key_row(encode_label, encode_box, _("Encoding:"), command_label, advanced_grid, "preference_comboboxtext"); - - // Backspace sequence. - Label backspace_key_label = new Gtk.Label(null); - backspace_key_box = new Widgets.DropdownTextButton(); - foreach (string name in parent_window.config.backspace_key_erase_names) { - backspace_key_box.append(name, parent_window.config.erase_map.get(name)); - } - if (server_infos != null) { - backspace_key_box.set_active(parent_window.config.backspace_key_erase_names.index_of(config_file.get_value(server_info, "Backspace"))); - } else { - backspace_key_box.set_active(parent_window.config.backspace_key_erase_names.index_of("ascii-del")); - } - create_follow_key_row(backspace_key_label, backspace_key_box, _("Backspace key:"), encode_label, advanced_grid, "preference_comboboxtext"); - - // Delete sequence. - Label del_key_label = new Gtk.Label(null); - del_key_box = new Widgets.DropdownTextButton(); - foreach (string name in parent_window.config.del_key_erase_names) { - del_key_box.append(name, parent_window.config.erase_map.get(name)); - } - if (server_infos != null) { - del_key_box.set_active(parent_window.config.del_key_erase_names.index_of(config_file.get_value(server_info, "Del"))); - } else { - del_key_box.set_active(parent_window.config.del_key_erase_names.index_of("escape-sequence")); - } - create_follow_key_row(del_key_label, del_key_box, _("Delete key:"), backspace_key_label, advanced_grid, "preference_comboboxtext"); - - server_action_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - show_advanced_button = Widgets.create_link_button(_("Advanced options")); - show_advanced_button.clicked.connect((w) => { - show_advanced_options(); - }); - - server_action_box.pack_start(show_advanced_button, true, true, 0); - content_box.pack_start(server_action_box, true, true, 0); - - Box button_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - button_box.margin_top = action_button_margin_top; - DialogButton cancel_button = new Widgets.DialogButton(_("Cancel"), "left", "text", parent_window.screen_monitor.is_composited()); - string button_name; - if (server_infos != null) { - button_name = _("Save"); - } else { - button_name = _("Add"); - } - DialogButton confirm_button = new Widgets.DialogButton(button_name, "right", "action", parent_window.screen_monitor.is_composited()); - cancel_button.clicked.connect((b) => { - destroy(); - }); - confirm_button.clicked.connect((b) => { - if (server_infos != null) { - if (name_entry.get_text().strip() != "" && address_entry.get_text().strip() != "" && port_spinbutton.get_text().strip() != "" && user_entry.get_text().strip() != "") { - edit_server(address_entry.get_text(), - user_entry.get_text(), - password_button.entry.get_text(), - file_button.entry.get_text(), - (int) port_spinbutton.get_value(), - parent_window.config.encoding_names[encode_box.get_active()], - path_entry.get_text(), - command_entry.get_text(), - name_entry.get_text(), - groupname_entry.get_text(), - parent_window.config.backspace_key_erase_names[backspace_key_box.get_active()], - parent_window.config.del_key_erase_names[del_key_box.get_active()] - ); - } - } else { - if (name_entry.get_text().strip() != "" && address_entry.get_text().strip() != "" && port_spinbutton.get_text().strip() != "" && user_entry.get_text().strip() != "") { - add_server(address_entry.get_text(), - user_entry.get_text(), - password_button.entry.get_text(), - file_button.entry.get_text(), - (int) port_spinbutton.get_value(), - parent_window.config.encoding_names[encode_box.get_active()], - path_entry.get_text(), - command_entry.get_text(), - name_entry.get_text(), - groupname_entry.get_text(), - parent_window.config.backspace_key_erase_names[backspace_key_box.get_active()], - parent_window.config.del_key_erase_names[del_key_box.get_active()] - ); - } - } - }); - - var tab_order_list = new List(); - tab_order_list.append((Gtk.Widget) cancel_button); - tab_order_list.append((Gtk.Widget) confirm_button); - button_box.set_focus_chain(tab_order_list); - button_box.set_focus_child(confirm_button); - - button_box.pack_start(cancel_button, true, true, 0); - button_box.pack_start(confirm_button, true, true, 0); - box.pack_start(button_box, false, false, 0); - - add_widget(box); - } catch (Error e) { - error ("%s", e.message); - } - } - - public void show_advanced_options() { - set_default_geometry(window_init_width, window_expand_height); - - Utils.destroy_all_children(server_action_box); - if (server_info != null) { - delete_server_button = Widgets.create_delete_button(_("Delete server")); - delete_server_button.clicked.connect((w) => { - this.hide(); - - var server_name = name_entry.get_text(); - if (server_name.length > max_server_name_length) { - server_name = server_name.substring(0, max_server_name_length) + " ... "; - } - - var confirm_dialog = new Widgets.ConfirmDialog( - _("Delete server"), - _("Are you sure you want to delete %s?").printf(server_name), - _("Cancel"), - _("Delete")); - confirm_dialog.transient_for_window(parent_window); - confirm_dialog.cancel.connect((w) => { - this.destroy(); - }); - confirm_dialog.confirm.connect((w) => { - delete_server(address_entry.get_text(), user_entry.get_text()); - this.destroy(); - }); - }); - server_action_box.pack_start(delete_server_button, true, true, 0); - } - - advanced_options_box.pack_start(advanced_grid, false, false, 0); - - show_all(); - } - - public Label create_label(string text) { - Label label = new Gtk.Label(null); - label.margin_start = label_margin_left; - label.set_text(text); - label.get_style_context().add_class("preference_label"); - label.set_xalign(0); - - return label; - } - - public void create_key_row(Gtk.Label label, Gtk.Widget widget, string name, Gtk.Grid grid, string class_name="preference_entry") { - label.set_text(name); - label.margin_start = label_margin_left; - label.get_style_context().add_class("preference_label"); - widget.get_style_context().add_class(class_name); - widget.margin_start = label_margin_left; - - adjust_option_widgets(label, widget); - grid_attach(grid, label, 0, 0, preference_name_width, grid_height); - grid_attach_next_to(grid, widget, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void create_follow_key_row(Gtk.Label label, Gtk.Widget widget, string name, Gtk.Label previous_label, Gtk.Grid grid, string class_name="preference_entry") { - label.set_text(name); - label.margin_start = label_margin_left; - label.get_style_context().add_class("preference_label"); - widget.get_style_context().add_class(class_name); - widget.margin_start = label_margin_left; - - adjust_option_widgets(label, widget); - grid_attach_next_to(grid, label, previous_label, Gtk.PositionType.BOTTOM, preference_name_width, grid_height); - grid_attach_next_to(grid, widget, label, Gtk.PositionType.RIGHT, preference_widget_width, grid_height); - } - - public void adjust_option_widgets(Gtk.Label name_widget, Gtk.Widget value_widget) { - name_widget.set_xalign(0); - name_widget.set_size_request(preference_name_width, grid_height); - - value_widget.set_size_request(preference_widget_width, grid_height); - // NOTE: - // set_hexpand is very important to make widget in grid to expand space horizaontally. - value_widget.set_hexpand(true); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/rename_dialog.vala deepin-terminal-5.4.13/widget/rename_dialog.vala --- deepin-terminal-5.0.0+ds1/widget/rename_dialog.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/rename_dialog.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class RenameDialog : Widgets.Dialog { - private DialogButton cancel_button; - private DialogButton rename_button; - private int box_margin_bottom = 24; - private int box_margin_end = 20; - private int box_margin_top = 4; - private int content_margin_top = 3; - private int logo_margin_end = 20; - private int logo_margin_start = 20; - private int title_margin_top = 7; - - public signal void cancel(); - public signal void rename(string new_title); - - public RenameDialog(string title, string content, string cancel_text, string rename_text) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - set_init_size(480, 230); - - // Add widgets. - var overlay = new Gtk.Overlay(); - var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - var close_button = Widgets.create_close_button(); - close_button.clicked.connect((b) => { - this.destroy(); - }); - var close_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - close_button_box.pack_start(close_button, true, true, 0); - - var content_button_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - content_button_box.margin_top = box_margin_top; - content_button_box.margin_bottom = box_margin_bottom; - content_button_box.margin_end = box_margin_end; - - Gtk.Image logo_image = new Gtk.Image.from_file(Utils.get_image_path("dialog_icon.svg")); - logo_image.margin_start = logo_margin_start; - logo_image.margin_end = logo_margin_end; - - var label_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - Label title_label = new Gtk.Label(null); - title_label.set_halign(Gtk.Align.START); - title_label.get_style_context().add_class("dialog_title"); - title_label.set_text(title); - title_label.margin_top = title_margin_top; - - var title_entry = new Widgets.Entry(); - title_entry.set_text(content); - title_entry.margin_top = content_margin_top; - title_entry.get_style_context().add_class("preference_entry"); - - title_entry.activate.connect((entry) => { - rename(entry.get_text()); - destroy(); - }); - - Box button_box = new Box(Gtk.Orientation.HORIZONTAL, 0); - if (cancel_text != "") { - cancel_button = new Widgets.DialogButton(cancel_text, "left", "text", screen_monitor.is_composited()); - cancel_button.clicked.connect((b) => { - cancel(); - destroy(); - }); - } - if (cancel_text != "") { - rename_button = new Widgets.DialogButton(rename_text, "right", "warning", screen_monitor.is_composited()); - } else { - rename_button = new Widgets.DialogButton(rename_text, "middle", "warning", screen_monitor.is_composited()); - } - rename_button.clicked.connect((b) => { - rename(title_entry.get_text()); - destroy(); - }); - - var tab_order_list = new List(); - tab_order_list.append((Gtk.Widget) title_entry); - if (cancel_text != "") { - tab_order_list.append((Gtk.Widget) cancel_button); - } - tab_order_list.append((Gtk.Widget) rename_button); - button_box.set_focus_chain(tab_order_list); - button_box.set_focus_child(title_entry); - - close_button_box.pack_start(close_button, true, true, 0); - label_box.pack_start(title_label, false, false, 0); - label_box.pack_start(title_entry, false, false, 0); - content_button_box.pack_start(logo_image, false, false, 0); - content_button_box.pack_start(label_box, true, true, 0); - if (cancel_text != "") { - button_box.pack_start(cancel_button, true, true, 0); - } - button_box.pack_start(rename_button, true, true, 0); - box.pack_start(close_button_box, false, false, 0); - box.pack_start(content_button_box, true, true, 0); - box.pack_start(button_box, true, true, 0); - - var event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - if (screen_monitor.is_composited()) { - event_area.margin_bottom = window_init_height - window_frame_margin_top - window_frame_margin_bottom - Constant.TITLEBAR_HEIGHT; - } else { - event_area.margin_bottom = window_init_height - Constant.TITLEBAR_HEIGHT; - } - - overlay.add(box); - overlay.add_overlay(event_area); - - add_widget(overlay); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/resize_grip.vala deepin-terminal-5.4.13/widget/resize_grip.vala --- deepin-terminal-5.0.0+ds1/widget/resize_grip.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/resize_grip.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2019 Deepin, Inc. - * 2019 Gary Wang - * - * Author: Gary Wang - * Maintainer: Gary Wang - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -// This is pretty dirty workaround to make the window resizable under not composited window manager. -// Feel free to submit a patch if you have better solution. - -namespace Widgets { - private static int GRIP_WIDTH = 8; - public static int GRIP_HEIGHT = 8; - - public class Grip : Gtk.EventBox { - - public Cairo.ImageSurface resize_grip_surface; - public int surface_y; - - public signal void clicked(Gdk.EventButton event); - - public Grip() { - - resize_grip_surface = Utils.create_image_surface("resize_grip.svg"); - set_size_request(GRIP_WIDTH, GRIP_HEIGHT); - surface_y = (GRIP_HEIGHT - resize_grip_surface.get_height() / get_scale_factor()) / 2; - - draw.connect(on_draw); - - enter_notify_event.connect((w, e) => { - // set cursor. - get_window().set_cursor(new Gdk.Cursor.for_display(Gdk.Display.get_default(), - Gdk.CursorType.BOTTOM_RIGHT_CORNER)); - - return false; - }); - - leave_notify_event.connect((w, e) => { - // set cursor back. - get_window().set_cursor(null); - - return false; - }); - - button_press_event.connect((w, e) => { - get_window().begin_resize_drag(Gdk.WindowEdge.SOUTH_EAST, (int)e.button, (int)e.x_root, (int)e.y_root, e.get_time()); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Draw.draw_surface(cr, resize_grip_surface, 0, surface_y); - - return true; - } - } - - public class ResizeGrip : Gtk.Overlay { - public Widgets.WindowEventArea event_area; - public Widgets.Window window; - public Grip grip; - - public ResizeGrip(Widgets.Window win) { - - window = win; - - grip = new Widgets.Grip(); - grip.set_halign(Gtk.Align.END); - - Box box = new Box(Gtk.Orientation.HORIZONTAL, 0); - box.pack_start(grip, true, true, 0); - - event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - - add(box); - add_overlay(event_area); - - set_size_request(-1, GRIP_HEIGHT); - - Gdk.RGBA background_color = Gdk.RGBA(); - - box.draw.connect((w, cr) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - try { - background_color = Utils.hex_to_rgba(window.config.config_file.get_string("theme", "background")); - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, window.config.config_file.get_double("general", "opacity")); - Draw.draw_rectangle(cr, 0, 0, rect.width, rect.height); - } catch (Error e) { - print("ResizeGrip draw: %s\n", e.message); - } - - Utils.propagate_draw((Container) w, cr); - - return true; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/search_entry.vala deepin-terminal-5.4.13/widget/search_entry.vala --- deepin-terminal-5.0.0+ds1/widget/search_entry.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/search_entry.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Animation; -using Gtk; -using Widgets; - -namespace Widgets { - public class SearchEntry : Gtk.EventBox { - public AnimateTimer timer; - public Gtk.Box box; - public Gtk.Box display_box; - public Gtk.Label search_label; - public ImageButton clear_button; - public Widgets.Entry search_entry; - public Widgets.ImageButton search_image; - public int animation_time = 100; - public int clear_button_margin_right = 12; - public int height = 36; - public int search_image_animate_start_x; - public int search_image_margin_right = 5; - public int search_image_margin_x = 18; - - public SearchEntry() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - this.add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - set_size_request(-1, height); - - timer = new AnimateTimer(AnimateTimer.ease_in_out, animation_time); - timer.animate.connect(on_animate); - - box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - display_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - search_image = new ImageButton("search", true); - search_image.margin_end = search_image_margin_right; - search_image.set_valign(Gtk.Align.CENTER); - search_label = new Gtk.Label(null); - search_label.set_valign(Gtk.Align.CENTER); - search_label.set_text(_("Search")); - search_entry = new Widgets.Entry(); - search_entry.set_placeholder_text(_("Search")); - clear_button = new ImageButton("search_clear", true); - clear_button.margin_right = clear_button_margin_right; - clear_button.set_valign(Gtk.Align.CENTER); - clear_button.clicked.connect((w, e) => { - search_entry.set_text(""); - }); - - switch_to_display(); - - realize.connect((w) => { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - search_entry.get_style_context().add_class("remote_search_light_entry"); - search_label.get_style_context().add_class("remote_search_label_light"); - } else { - search_entry.get_style_context().add_class("remote_search_dark_entry"); - search_label.get_style_context().add_class("remote_search_label_dark"); - } - }); - - button_press_event.connect((w, e) => { - display_box.set_halign(Gtk.Align.START); - display_box.remove(search_label); - - this.translate_coordinates(search_image, 0, 0, out search_image_animate_start_x, null); - search_image_animate_start_x = search_image_animate_start_x.abs() - search_image_margin_x; - search_image.margin_left = search_image_margin_x + search_image_animate_start_x; - - timer.reset(); - - return false; - }); - - key_press_event.connect((w, e) => { - string keyname = Keymap.get_keyevent_name(e); - if (keyname == "Esc") { - switch_to_display(); - } - - return false; - }); - - add(box); - } - - public void on_animate(double progress) { - search_image.margin_left = search_image_margin_x + (int) (search_image_animate_start_x * (1.0 - progress)); - - if (progress >= 1.0) { - timer.stop(); - switch_to_input(); - } - } - - public void switch_to_display() { - Utils.remove_all_children(box); - - search_image.margin_left = 0; - display_box.pack_start(search_image, false, false, 0); - display_box.pack_start(search_label, false, false, 0); - display_box.set_halign(Gtk.Align.CENTER); - box.pack_start(display_box, true, true, 0); - - show_all(); - } - - public void switch_to_input() { - Utils.remove_all_children(box); - Utils.remove_all_children(display_box); - - box.pack_start(search_image, false, false, 0); - box.pack_start(search_entry, true, true, 0); - box.pack_start(clear_button, false, false, 0); - - search_image.margin_left = search_image_margin_x; - search_entry.grab_focus(); - - show_all(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/search_panel.vala deepin-terminal-5.4.13/widget/search_panel.vala --- deepin-terminal-5.0.0+ds1/widget/search_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/search_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class SearchPanel : Gtk.HBox { - public Entry search_entry; - public Gtk.Box clear_button_box; - public ImageButton clear_button; - public ImageButton search_next_button; - public ImageButton search_previous_button; - public Term terminal; - public Widgets.ImageButton search_image; - public int button_margin = 4; - public int margin_horizontal = 10; - public string search_text; - - public signal void quit_search(); - - public SearchPanel(Widgets.ConfigWindow config_window, Term term, string init_search_text) { - terminal = term; - search_text = init_search_text; - - search_image = new ImageButton("search", true); - search_entry = new Widgets.Entry(); - clear_button_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - clear_button = new ImageButton("search_clear", true); - search_next_button = new ImageButton("search_next", true); - search_previous_button = new ImageButton("search_previous", true); - - search_entry.set_text(init_search_text); - - pack_start(search_image, false, false, 0); - pack_start(search_entry, true, true, 0); - pack_start(clear_button_box, false, false, 0); - pack_start(search_previous_button, false, false, 0); - pack_start(search_next_button, false, false, 0); - - search_image.set_valign(Gtk.Align.CENTER); - search_entry.set_valign(Gtk.Align.CENTER); - search_next_button.set_valign(Gtk.Align.CENTER); - search_previous_button.set_valign(Gtk.Align.CENTER); - clear_button_box.set_valign(Gtk.Align.CENTER); - - search_image.margin_start = margin_horizontal; - clear_button_box.margin_end = margin_horizontal; - search_previous_button.margin_end = margin_horizontal; - search_entry.margin_end = button_margin; - search_next_button.margin_end = button_margin; - - set_size_request(Constant.SEARCH_PANEL_WIDTH, Constant.TITLEBAR_HEIGHT); - set_valign(Gtk.Align.START); - set_halign(Gtk.Align.END); - - adjust_css_with_theme(config_window); - realize.connect((w) => { - ((Widgets.ConfigWindow) this.get_toplevel()).config.update.connect((w) => { - adjust_css_with_theme(config_window); - }); - }); - - search_entry.key_press_event.connect((w, e) => { - string keyname = Keymap.get_keyevent_name(e); - - if (keyname == "Esc") { - quit_search(); - } else if (keyname == "Enter") { - update_search_text(); - } - - return false; - }); - search_entry.get_buffer().deleted_text.connect((buffer, p, nc) => { - string entry_text = search_entry.get_text().strip(); - if (entry_text == "") { - hide_clear_button(); - } - - update_search_text(); - }); - search_entry.get_buffer().inserted_text.connect((buffer, p, c, nc) => { - string entry_text = search_entry.get_text().strip(); - if (entry_text != "") { - show_clear_button(); - } - update_search_text(); - }); - clear_button.button_press_event.connect((w, e) => { - search_entry.set_text(""); - update_search_text(); - - return false; - }); - search_entry.activate.connect((w) => { - if (search_text != "") { - terminal.term.search_find_next(); - } - }); - search_next_button.button_press_event.connect((w, e) => { - if (search_text != "") { - update_search_text(); - terminal.term.search_find_next(); - } - - return false; - }); - search_previous_button.button_press_event.connect((w, e) => { - if (search_text != "") { - update_search_text(); - terminal.term.search_find_previous(); - } - - return false; - }); - } - - public void update_search_text() { - string entry_text = search_entry.get_text().strip(); - search_text = entry_text; - - try { - GLib.RegexCompileFlags flags = GLib.RegexCompileFlags.OPTIMIZE; - flags |= GLib.RegexCompileFlags.CASELESS; - string pattern = GLib.Regex.escape_string(search_text); - - var regex = new Regex(pattern, flags, 0); - terminal.term.search_set_gregex(regex, 0); - terminal.term.search_set_wrap_around(true); - } catch (GLib.RegexError e) { - stdout.printf("Got error %s", e.message); - } - - } - - public void adjust_css_with_theme(Widgets.ConfigWindow config_window) { - bool is_light_theme = config_window.is_light_theme(); - - get_style_context().remove_class("search_light_box"); - get_style_context().remove_class("search_dark_box"); - search_entry.get_style_context().remove_class("search_dark_entry"); - search_entry.get_style_context().remove_class("search_light_entry"); - - if (is_light_theme) { - search_entry.get_style_context().add_class("search_light_entry"); - get_style_context().add_class("search_light_box"); - } else { - search_entry.get_style_context().add_class("search_dark_entry"); - get_style_context().add_class("search_dark_box"); - } - } - - public void show_clear_button() { - if (clear_button_box.get_children().length() == 0) { - clear_button_box.add(clear_button); - show_all(); - } - } - - public void hide_clear_button() { - Utils.remove_all_children(clear_button_box); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/server_button.vala deepin-terminal-5.4.13/widget/server_button.vala --- deepin-terminal-5.0.0+ds1/widget/server_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/server_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class ServerButton : Widgets.PanelButton { - public signal void edit_server(string server_info); - public signal void login_server(string server_info); - - public ServerButton(string server_title, string server_content) { - string[] server_infos = server_content.split("@"); - string display_name = ""; - if (server_infos.length > 2) { - display_name = "%s@%s:%s".printf(server_infos[0], server_infos[1], server_infos[2]); - } else { - display_name = "%s@%s".printf(server_infos[0], server_infos[1]); - } - - base(server_title, server_content, display_name, "server"); - - click_edit_button.connect((w) => { - edit_server(server_content); - }); - click_button.connect((w) => { - login_server(server_content); - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/server_group_button.vala deepin-terminal-5.4.13/widget/server_group_button.vala --- deepin-terminal-5.0.0+ds1/widget/server_group_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/server_group_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,176 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class ServerGroupButton : Widgets.ClickEventBox { - public Cairo.ImageSurface arrow_dark_surface; - public Cairo.ImageSurface arrow_light_surface; - public Cairo.ImageSurface server_group_dark_surface; - public Cairo.ImageSurface server_group_light_surface; - public Gdk.RGBA content_dark_color; - public Gdk.RGBA content_light_color; - public Gdk.RGBA hover_dark_color; - public Gdk.RGBA hover_light_color; - public Gdk.RGBA line_dark_color; - public Gdk.RGBA line_light_color; - public Gdk.RGBA press_dark_color; - public Gdk.RGBA press_light_color; - public Gdk.RGBA title_dark_color; - public Gdk.RGBA title_light_color; - public bool display_bottom_line = true; - public bool is_hover = false; - public int arrow_x = Constant.SLIDER_WIDTH - 22; - public int content_size = 10; - public int content_y = 27; - public int height = 56; - public int image_x = 12; - public int server_number; - public int text_width = Constant.SLIDER_PANEL_TEXT_WIDTH; - public int text_x = 72; - public int title_size = 11; - public int title_y = 5; - public int width = Constant.SLIDER_WIDTH; - public string title; - - public signal void show_group_servers(string group_name); - - public ServerGroupButton(string server_title, int number) { - this.add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - - title = server_title; - server_number = number; - - server_group_dark_surface = Utils.create_image_surface("server_group_dark.svg"); - server_group_light_surface = Utils.create_image_surface("server_group_light.svg"); - arrow_dark_surface = Utils.create_image_surface("list_arrow_dark.svg"); - arrow_light_surface = Utils.create_image_surface("list_arrow_light.svg"); - - title_dark_color = Utils.hex_to_rgba("#FFFFFF"); - content_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.5); - press_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.1); - hover_dark_color = Utils.hex_to_rgba("#FFFFFF", 0.1); - title_light_color = Utils.hex_to_rgba("#303030"); - content_light_color = Utils.hex_to_rgba("#000000", 0.5); - press_light_color = Utils.hex_to_rgba("#000000", 0.1); - hover_light_color = Utils.hex_to_rgba("#000000", 0.1); - line_dark_color = Utils.hex_to_rgba("#ffffff", 0.05); - line_light_color = Utils.hex_to_rgba("#000000", 0.05); - - set_size_request(width, height); - - draw.connect(on_draw); - enter_notify_event.connect((w, e) => { - is_hover = true; - queue_draw(); - - return false; - }); - leave_notify_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - button_press_event.connect((w, e) => { - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - clicked.connect((w, e) => { - show_group_servers(server_title); - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - if (is_light_theme) { - Draw.draw_surface(cr, server_group_light_surface, image_x, 0, 0, height); - Draw.draw_surface(cr, arrow_light_surface, arrow_x, 0, 0, height); - } else { - Draw.draw_surface(cr, server_group_dark_surface, image_x, 0, 0, height); - Draw.draw_surface(cr, arrow_dark_surface, arrow_x, 0, 0, height); - } - - - if (is_light_theme) { - Utils.set_context_color(cr, title_light_color); - } else { - Utils.set_context_color(cr, title_dark_color); - } - Draw.draw_text(cr, title, text_x, title_y, text_width, height, title_size, Pango.Alignment.LEFT, "top"); - - if (is_light_theme) { - Utils.set_context_color(cr, content_light_color); - } else { - Utils.set_context_color(cr, content_dark_color); - } - string content; - if (server_number > 1) { - content = "%i servers".printf(server_number); - } else { - content = "1 server"; - } - Draw.draw_text(cr, content, text_x, content_y, text_width, height, content_size, Pango.Alignment.LEFT, "top"); - - if (display_bottom_line) { - if (is_light_theme) { - Utils.set_context_color(cr, line_light_color); - } else { - Utils.set_context_color(cr, line_dark_color); - } - Draw.draw_rectangle(cr, 8, height - 1, width - 16, 1); - } - - if (is_press) { - if (is_light_theme) { - Utils.set_context_color(cr, press_light_color); - } else { - Utils.set_context_color(cr, content_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, width, height); - } else if (is_hover) { - if (is_light_theme) { - Utils.set_context_color(cr, hover_light_color); - } else { - Utils.set_context_color(cr, hover_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, width, height); - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/shortcut_entry.vala deepin-terminal-5.4.13/widget/shortcut_entry.vala --- deepin-terminal-5.0.0+ds1/widget/shortcut_entry.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/shortcut_entry.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; - -namespace Widgets { - public class ShortcutEntry : Gtk.EventBox { - public Cairo.ImageSurface button_left_surface; - public Cairo.ImageSurface button_right_surface; - public Gdk.RGBA active_frame_color; - public Gdk.RGBA background_color; - public Gdk.RGBA hint_color; - public Gdk.RGBA normal_frame_color; - public Gdk.RGBA shortcut_background_color; - public Gdk.RGBA shortcut_font_color; - public Gdk.RGBA shortcut_frame_color; - public bool is_double_clicked = false; - public int double_clicked_max_delay = 150; - public int height = 24; - public int shortcut_font_padding_x = 4; - public int shortcut_font_padding_y = 0; - public int shortcut_font_size = 8; - public int shortcut_key_padding_x = 4; - public int shortcut_key_padding_y = 0; - public int shortcut_key_spacing = 5; - public string shortcut = ""; - - public signal void change_key(string new_key); - - public ShortcutEntry() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - button_left_surface = Utils.create_image_surface("shortcut_button_left.svg"); - button_right_surface = Utils.create_image_surface("shortcut_button_right.svg"); - - set_visible_window(false); - set_can_focus(true); - - set_size_request(-1, 24); - - normal_frame_color = Gdk.RGBA(); - normal_frame_color.red = 0; - normal_frame_color.green = 0; - normal_frame_color.blue = 0; - normal_frame_color.alpha = 0.1; - - active_frame_color = Utils.hex_to_rgba("#2ca7f8"); - background_color = Utils.hex_to_rgba("#ffffff"); - hint_color = Utils.hex_to_rgba("#ADAEAF"); - - shortcut_background_color = Utils.hex_to_rgba("#69AAFF"); - shortcut_background_color.alpha = 0.15; - shortcut_frame_color = Utils.hex_to_rgba("#5F9FD9"); - shortcut_frame_color.alpha = 0.30; - shortcut_font_color = Utils.hex_to_rgba("#303030"); - - draw.connect(on_draw); - button_press_event.connect((w, e) => { - grab_focus(); - - if (e.type == Gdk.EventType.BUTTON_PRESS) { - is_double_clicked = true; - - GLib.Timeout.add(double_clicked_max_delay, () => { - is_double_clicked = false; - - return false; - }); - } else if (e.type == Gdk.EventType.2BUTTON_PRESS) { - if (is_double_clicked) { - shortcut = ""; - change_key(shortcut); - - queue_draw(); - } - } - - queue_draw(); - - return false; - }); - key_press_event.connect((w, e) => { - string keyname = Keymap.get_keyevent_name(e); - - if (keyname == "Backspace") { - shortcut = ""; - change_key(shortcut); - - queue_draw(); - } else if (keyname == "Ctrl + Tab" || keyname == "Ctrl + Shift + Tab" || keyname == "Shift + Tab") { - return false; - } else if (keyname.has_prefix("F") || keyname.contains("+")) { - shortcut = keyname; - change_key(shortcut); - - queue_draw(); - } - - return false; - }); - } - - public void set_text(string text) { - shortcut = text; - - queue_draw(); - } - - public string get_text() { - return shortcut; - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - if (is_focus) { - Draw.stroke_rounded_rectangle(cr, 0, 0, rect.width, rect.height, 4, active_frame_color, background_color); - } else { - Draw.stroke_rounded_rectangle(cr, 0, 0, rect.width, rect.height, 4, normal_frame_color, background_color); - } - - if (shortcut == "") { - cr.set_source_rgba(hint_color.red, hint_color.green, hint_color.blue, hint_color.alpha); - Draw.draw_text( - cr, - _("Please enter a new shortcut"), - shortcut_font_padding_x, - shortcut_font_padding_y, - rect.width - shortcut_font_padding_x * 2, - rect.height - shortcut_font_padding_y * 2, - shortcut_font_size); - } else { - int x = shortcut_font_padding_x; - int y = shortcut_font_padding_y; - var shortcut_keys = shortcut.split(" + "); - foreach (string key in shortcut_keys) { - var font_description = new Pango.FontDescription(); - font_description.set_size((int)(shortcut_font_size * Pango.SCALE)); - - var layout = Pango.cairo_create_layout(cr); - layout.set_font_description(font_description); - layout.set_text(key, key.length); - layout.set_alignment(Pango.Alignment.LEFT); - layout.set_single_paragraph_mode(true); - layout.set_ellipsize(Pango.EllipsizeMode.END); - - int text_width, text_height; - layout.get_pixel_size(out text_width, out text_height); - - int key_width = int.max(text_width, 20); - - int button_width = button_left_surface.get_width() / get_scale_factor(); - int button_height = button_left_surface.get_height() / get_scale_factor(); - int button_y = (height - button_height) / 2; - int shortcut_key_width = key_width + shortcut_key_padding_x * 2; - - Draw.draw_surface(cr, button_left_surface, x, button_y); - Draw.draw_surface(cr, button_right_surface, x + shortcut_key_width - button_width, button_y); - - cr.set_source_rgba(shortcut_background_color.red, shortcut_background_color.green, shortcut_background_color.blue, shortcut_background_color.alpha); - Draw.draw_rectangle(cr, x + button_width, button_y, shortcut_key_width - button_width * 2, button_height); - - cr.set_source_rgba(shortcut_frame_color.red, shortcut_frame_color.green, shortcut_frame_color.blue, shortcut_frame_color.alpha); - Draw.draw_rectangle(cr, x + button_width, button_y, shortcut_key_width - button_width * 2, 1); - Draw.draw_rectangle(cr, x + button_width, button_y + button_height - 1, shortcut_key_width - button_width * 2, 1); - - int render_y = y + int.max(0, (height - text_height) / 2); - - cr.set_source_rgba(shortcut_font_color.red, shortcut_font_color.green, shortcut_font_color.blue, shortcut_font_color.alpha); - cr.move_to(x + (key_width - text_width) / 2 + shortcut_key_padding_x, render_y); - Pango.cairo_update_layout(cr, layout); - Pango.cairo_show_layout(cr, layout); - - x += key_width + shortcut_key_spacing + shortcut_key_padding_x * 2; - } - - } - - return true; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/spinbutton.vala deepin-terminal-5.4.13/widget/spinbutton.vala --- deepin-terminal-5.0.0+ds1/widget/spinbutton.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/spinbutton.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Utils; - -namespace Widgets { - public class SpinButton : Gtk.SpinButton { - public Widgets.EntryMenu menu; - - public SpinButton() { - button_press_event.connect((w, e) => { - if (Utils.is_right_button(e)) { - menu = new Widgets.EntryMenu(); - menu.create_entry_menu(this, (int) e.x_root, (int) e.y_root); - - return true; - } - - return false; - }); - - // Prevent scroll event. - scroll_event.connect((w, e) => { - return true; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/split_line.vala deepin-terminal-5.4.13/widget/split_line.vala --- deepin-terminal-5.0.0+ds1/widget/split_line.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/split_line.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; - -namespace Widgets { - public class SplitLine : Gtk.Box { - public int split_line_margin_left = 1; - - public SplitLine() { - margin_left = split_line_margin_left; - set_size_request(-1, 1); - - draw.connect((w, cr) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - cr.set_source_rgba(0, 0, 0, 0.1); - } else { - cr.set_source_rgba(1, 1, 1, 0.1); - } - Draw.draw_rectangle(cr, 0, 0, rect.width, 1); - - return true; - }); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/switcher.vala deepin-terminal-5.4.13/widget/switcher.vala --- deepin-terminal-5.0.0+ds1/widget/switcher.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/switcher.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Animation; -using Gtk; -using Widgets; - -namespace Widgets { - public class Switcher : Gtk.HBox { - public AnimateTimer scroll_to_left_timer; - public AnimateTimer scroll_to_right_timer; - public Gtk.Box box; - public Gtk.Box left_box; - public Gtk.Box right_box; - public Gtk.ScrolledWindow scrolledwindow; - public int scroll_to_left_end_x; - public int scroll_to_left_interval = 500; - public int scroll_to_left_start_x; - public int scroll_to_right_end_x; - public int scroll_to_right_interval = 500; - public int scroll_to_right_start_x; - public int width; - - public Switcher(int w) { - width = w; - - scroll_to_left_timer = new AnimateTimer(AnimateTimer.ease_out_quint, scroll_to_left_interval); - scroll_to_left_timer.animate.connect(scroll_to_left_animate); - - scroll_to_right_timer = new AnimateTimer(AnimateTimer.ease_out_quint, scroll_to_right_interval); - scroll_to_right_timer.animate.connect(scroll_to_right_animate); - - // NOTE: don's set policy of scrolledwindow to NEVER. - // Otherwise scrolledwindow will increate width with child's size. - scrolledwindow = new ScrolledWindow(null, null); - scrolledwindow.set_shadow_type(Gtk.ShadowType.NONE); - scrolledwindow.get_style_context().add_class("scrolledwindow"); - scrolledwindow.get_vscrollbar().get_style_context().add_class("switcher_scrollbar"); - scrolledwindow.get_hscrollbar().get_style_context().add_class("switcher_scrollbar"); - - box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - left_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - right_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - set_size_request(width, -1); - - box.pack_start(left_box, false, false, 0); - box.pack_start(right_box, false, false, 0); - scrolledwindow.add(box); - pack_start(scrolledwindow, true, true, 0); - } - - public void add_to_left_box(Gtk.Widget start_widget) { - Utils.remove_all_children(left_box); - Utils.remove_all_children(right_box); - - left_box.pack_start(start_widget, true, true, 0); - } - - public void scroll_to_left(Gtk.Widget start_widget, Gtk.Widget end_widget) { - Utils.remove_all_children(left_box); - Utils.remove_all_children(right_box); - - left_box.pack_start(end_widget, true, true, 0); - right_box.pack_start(start_widget, true, true, 0); - - var adjust = scrolledwindow.get_hadjustment(); - adjust.set_value(width); - - scroll_to_left_start_x = width; - scroll_to_left_end_x = 0; - - scroll_to_left_timer.reset(); - } - - public void scroll_to_right(Gtk.Widget start_widget, Gtk.Widget end_widget) { - Utils.remove_all_children(left_box); - Utils.remove_all_children(right_box); - - left_box.pack_start(start_widget, true, true, 0); - right_box.pack_start(end_widget, true, true, 0); - - var adjust = scrolledwindow.get_hadjustment(); - adjust.set_value(0); - - scroll_to_right_start_x = 0; - scroll_to_right_end_x = width; - - scroll_to_right_timer.reset(); - } - - public void scroll_to_left_animate(double progress) { - var adjust = scrolledwindow.get_hadjustment(); - adjust.set_value(scroll_to_left_start_x + (int) (scroll_to_left_end_x - scroll_to_left_start_x) * progress); - - if (progress >= 1.0) { - scroll_to_left_timer.stop(); - } - } - - public void scroll_to_right_animate(double progress) { - var adjust = scrolledwindow.get_hadjustment(); - adjust.set_value(scroll_to_right_start_x + (int) (scroll_to_right_end_x - scroll_to_right_start_x) * progress); - - if (progress >= 1.0) { - scroll_to_right_timer.stop(); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/tabbar.vala deepin-terminal-5.4.13/widget/tabbar.vala --- deepin-terminal-5.0.0+ds1/widget/tabbar.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/tabbar.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,613 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; -using Draw; -using GLib; -using Gee; -using Gtk; -using Utils; -using Widgets; - -namespace Widgets { - public class Tabbar : Gtk.DrawingArea { - public Gdk.RGBA tab_split_dark_color; - public Gdk.RGBA tab_split_light_color; - public HashMap tab_highlight_map; - private Cairo.ImageSurface add_hover_dark_surface; - private Cairo.ImageSurface add_hover_light_surface; - private Cairo.ImageSurface add_normal_dark_surface; - private Cairo.ImageSurface add_normal_light_surface; - private Cairo.ImageSurface add_press_dark_surface; - private Cairo.ImageSurface add_press_light_surface; - private Cairo.ImageSurface close_hover_surface; - private Cairo.ImageSurface close_normal_surface; - private Cairo.ImageSurface close_press_surface; - private bool draw_hover = false; - private bool is_button_press = false; - private double draw_scale = 1.0; - private int add_button_width = 50; - private int button_press_x = 0; - private int button_press_y = 0; - private int close_button_padding_x = 28; - private int hover_x = 0; - private int tab_min_width = 80; - private int tab_split_width = 1; - private int text_padding_x = 20; - public ArrayList tab_list; - public Gdk.RGBA hover_arrow_color; - public Gdk.RGBA inactive_arrow_color; - public Gdk.RGBA tab_text_color; - public Gdk.RGBA text_active_color; - public Gdk.RGBA text_dark_color; - public Gdk.RGBA text_highlight_color; - public Gdk.RGBA text_hover_dark_color; - public Gdk.RGBA text_hover_light_color; - public Gdk.RGBA text_light_color; - public HashMap tab_name_map; - public Pango.FontDescription font_description; - public bool allowed_add_tab = true; - public int font_size = 11; - public int height = Constant.TITLEBAR_HEIGHT; - public int hover_clip_right_offset = 6; - public int min_tab_width = 70; - public int tab_index = 0; - - public signal void press_tab(int tab_index, int tab_id); - public signal void update_tab_underline(int x, int width); - public signal void close_tab(int tab_index, int tab_id); - public signal void new_tab(); - - public Tabbar() { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - add_events (Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - - tab_list = new ArrayList(); - tab_name_map = new HashMap(); - tab_highlight_map = new HashMap(); - - font_description = new Pango.FontDescription(); - font_description.set_size((int)(font_size * Pango.SCALE)); - - set_size_request(-1, height); - - close_normal_surface = Utils.create_image_surface("tab_close_normal.svg"); - close_hover_surface = Utils.create_image_surface("tab_close_hover.svg"); - close_press_surface = Utils.create_image_surface("tab_close_press.svg"); - - add_normal_dark_surface = Utils.create_image_surface("tab_add_dark_normal.svg"); - add_hover_dark_surface = Utils.create_image_surface("tab_add_dark_hover.svg"); - add_press_dark_surface = Utils.create_image_surface("tab_add_dark_press.svg"); - add_normal_light_surface = Utils.create_image_surface("tab_add_light_normal.svg"); - add_hover_light_surface = Utils.create_image_surface("tab_add_light_hover.svg"); - add_press_light_surface = Utils.create_image_surface("tab_add_light_press.svg"); - - inactive_arrow_color = Utils.hex_to_rgba("#393937"); - hover_arrow_color = Utils.hex_to_rgba("#494943"); - text_hover_dark_color = Utils.hex_to_rgba("#ffffff"); - text_hover_light_color = Utils.hex_to_rgba("#000000"); - text_dark_color = Utils.hex_to_rgba("#ffffff", 0.8); - text_light_color = Utils.hex_to_rgba("#000000", 0.8); - text_highlight_color = Utils.hex_to_rgba("#ff9600"); - tab_split_dark_color = Utils.hex_to_rgba("#ffffff", 0.05); - tab_split_light_color = Utils.hex_to_rgba("#000000", 0.05); - text_active_color = Gdk.RGBA(); - tab_text_color = Gdk.RGBA(); - - draw.connect(on_draw); - configure_event.connect(on_configure); - button_press_event.connect(on_button_press); - button_release_event.connect(on_button_release); - motion_notify_event.connect(on_motion_notify); - leave_notify_event.connect(on_leave_notify); - } - - public void init(WorkspaceManager workspace_manager, Widgets.ConfigWindow window) { - press_tab.connect((t, tab_index, tab_id) => { - unhighlight_tab(tab_id); - workspace_manager.switch_workspace(tab_id); - }); - - close_tab.connect((t, tab_index, tab_id) => { - Widgets.Workspace focus_workspace = workspace_manager.workspace_map.get(tab_id); - if (focus_workspace.has_active_term()) { - ConfirmDialog dialog; - dialog = Widgets.create_running_confirm_dialog(window); - - dialog.confirm.connect((d) => { - destroy_tab(tab_index); - workspace_manager.remove_workspace(tab_id); - }); - } else { - destroy_tab(tab_index); - workspace_manager.remove_workspace(tab_id); - } - }); - - new_tab.connect((t) => { - workspace_manager.new_workspace_with_current_directory(); - }); - } - - public void reset() { - tab_list = new ArrayList(); - tab_name_map = new HashMap(); - tab_index = 0; - } - - public void add_tab(string tab_name, int tab_id) { - tab_list.add(tab_id); - tab_name_map.set(tab_id, tab_name); - - update_tab_scale(); - - queue_draw(); - } - - public void rename_tab(int tab_id, string tab_name) { - tab_name_map.set(tab_id, tab_name); - - if (is_focus_tab(tab_id)) { - update_window_title(tab_name); - } - - update_tab_scale(); - - queue_draw(); - } - - public void highlight_tab(int tab_id) { - if (!tab_highlight_map.has_key(tab_id)) { - tab_highlight_map.set(tab_id, true); - - queue_draw(); - } - } - - public void unhighlight_tab(int tab_id) { - if (tab_highlight_map.has_key(tab_id)) { - tab_highlight_map.unset(tab_id); - - queue_draw(); - } - } - - public bool is_focus_tab(int tab_id) { - int? index = tab_list.index_of(tab_id); - if (index != null) { - return tab_index == index; - } else { - return false; - } - } - - public void select_next_tab() { - var index = tab_index + 1; - if (index >= tab_list.size) { - index = 0; - } - switch_tab(index); - } - - public void select_previous_tab() { - var index = tab_index - 1; - if (index < 0) { - index = tab_list.size - 1; - } - switch_tab(index); - } - - public void select_first_tab() { - switch_tab(0); - } - - public void select_end_tab() { - var index = 0; - if (tab_list.size == 0) { - index = 0; - } else { - index = tab_list.size - 1; - } - switch_tab(index); - } - - public void select_nth_tab(int index) { - switch_tab(index); - } - - public void select_tab_with_id(int tab_id) { - switch_tab(tab_list.index_of(tab_id)); - } - - public void close_current_tab() { - close_nth_tab(tab_index); - } - - public void close_nth_tab(int index) { - if (tab_list.size > 0) { - var tab_id = tab_list.get(index); - close_tab(index, tab_id); - } - } - - public void destroy_tab(int index) { - var tab_id = tab_list.get(index); - - tab_list.remove_at(index); - tab_name_map.unset(tab_id); - - if (tab_list.size == 0) { - tab_index = 0; - } else if (tab_index >= tab_list.size) { - tab_index = tab_list.size - 1; - } - - update_tab_scale(); - - queue_draw(); - } - - public bool on_configure(Gtk.Widget widget, Gdk.EventConfigure event) { - update_tab_scale(); - - queue_draw(); - - return false; - } - - public bool on_button_press(Gtk.Widget widget, Gdk.EventButton event) { - is_button_press = true; - - event.device.get_position(null, out button_press_x, out button_press_y); - - return false; - } - - public bool on_button_release(Gtk.Widget widget, Gdk.EventButton event) { - is_button_press = false; - - if (is_action_mouse_button(event)) { - int button_release_x, button_release_y; - event.device.get_position(null, out button_release_x, out button_release_y); - - if (button_release_x == button_press_x && button_release_y == button_press_y) { - var release_x = (int)event.x; - - Gtk.Allocation alloc; - widget.get_allocation(out alloc); - - int draw_x = 0; - int counter = 0; - foreach (int tab_id in tab_list) { - int name_width, name_height; - get_text_size(tab_name_map.get(tab_id), out name_width, out name_height); - int tab_width = get_tab_width(name_width); - - if (release_x > draw_x && release_x < draw_x + tab_width) { - if (release_x > draw_x && release_x < draw_x + tab_width - get_tab_close_button_padding()) { - if(is_left_button(event)) { - select_nth_tab(counter); - - press_tab(counter, tab_id); - return false; - } - - if(is_mouse_wheel(event)) { - close_nth_tab(counter); - return false; - } - } else if (release_x > draw_x + tab_width - get_tab_close_button_padding()) { - close_nth_tab(counter); - return false; - } - } - - draw_x += tab_width; - - counter++; - } - - if (release_x > draw_x && release_x < draw_x + add_button_width) { - new_tab(); - } - - queue_draw(); - } - } - - return false; - } - - public int is_at_tab_close_button(int x) { - Gtk.Allocation alloc; - this.get_allocation(out alloc); - - int draw_x = 0; - int counter = 0; - foreach (int tab_id in tab_list) { - int name_width, name_height; - get_text_size(tab_name_map.get(tab_id), out name_width, out name_height); - int tab_width = get_tab_width(name_width); - - if (x > draw_x && x < draw_x + tab_width) { - if (x > draw_x + tab_width - get_tab_close_button_padding()) { - return counter; - } - } - - draw_x += tab_width; - - counter++; - } - - return -1; - } - - public bool on_motion_notify(Gtk.Widget widget, Gdk.EventMotion event) { - draw_hover = true; - hover_x = (int) event.x; - - queue_draw(); - - return false; - } - - public bool on_leave_notify(Gtk.Widget widget, Gdk.EventCrossing event) { - draw_hover = false; - hover_x = 0; - - queue_draw(); - - return false; - } - - public void update_tab_scale() { - Gtk.Allocation alloc; - this.get_allocation(out alloc); - - int tab_width = 0; - foreach (int tab_id in tab_list) { - int name_width, name_height; - get_text_size(tab_name_map.get(tab_id), out name_width, out name_height); - - tab_width += get_tab_render_width(name_width); - } - - if (tab_width + add_button_width > alloc.width) { - // FIXME: I know 0.97 is magic number, this number avoid add_button render out of area of tabbar. - // Welcome to fix this. - draw_scale = (double) alloc.width / (tab_width + add_button_width) * 0.97; - } else { - draw_scale = 1.0; - } - } - - public bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation alloc; - widget.get_allocation(out alloc); - - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - // Draw tab splitter. - int draw_x = 0; - int counter = 0; - foreach (int tab_id in tab_list) { - int name_width, name_height; - get_text_size(tab_name_map.get(tab_id), out name_width, out name_height); - - int tab_width = get_tab_width(name_width); - - if (is_light_theme) { - Utils.set_context_color(cr, tab_split_light_color); - } else { - Utils.set_context_color(cr, tab_split_dark_color); - } - if (counter < tab_list.size) { - Draw.draw_rectangle(cr, draw_x, 0, tab_split_width, height); - } - - draw_x += tab_width; - - counter++; - } - - draw_x = 0; - counter = 0; - try { - text_active_color = Utils.hex_to_rgba(((Widgets.ConfigWindow) this.get_toplevel()).config.config_file.get_string("theme", "tab")); - } catch (Error e) { - print("Tabbar draw: %s\n", e.message); - } - - int max_tab_width = 0; - int max_tab_height = 0; - foreach (int tab_id in tab_list) { - int name_width, name_height; - var layout = get_text_size(tab_name_map.get(tab_id), out name_width, out name_height); - - int tab_width = get_tab_width(name_width); - - max_tab_height = int.max(max_tab_height, name_height); - - if (tab_highlight_map.has_key(tab_id)) { - tab_text_color = text_highlight_color; - } else { - if (is_light_theme) { - tab_text_color = text_light_color; - } else { - tab_text_color = text_dark_color; - } - } - - if (counter == tab_index) { - cr.save(); - clip_rectangle(cr, draw_x, 0, tab_width, height); - - update_tab_underline(draw_x, tab_width + 1); - - cr.restore(); - - tab_text_color = text_active_color; - } else { - var is_hover = false; - - if (draw_hover) { - if (hover_x > draw_x && hover_x < draw_x + tab_width) { - is_hover = true; - } - } - - if (is_hover) { - cr.save(); - clip_rectangle(cr, draw_x, 0, tab_width + 1, height); - - if (is_light_theme) { - Utils.set_context_color(cr, tab_split_light_color); - } else { - Utils.set_context_color(cr, tab_split_dark_color); - } - Draw.draw_rectangle(cr, draw_x, 0, tab_width + 1, height); - - cr.restore(); - - if (is_light_theme) { - tab_text_color = text_hover_light_color; - } else { - tab_text_color = text_hover_dark_color; - } - } else { - cr.set_source_rgba(0, 0, 0, 0); - Draw.draw_rectangle(cr, draw_x, 0, tab_width, height); - } - } - - if (draw_hover) { - if (hover_x > draw_x && hover_x < draw_x + tab_width) { - if (hover_x > draw_x + tab_width - get_tab_close_button_padding()) { - if (is_button_press) { - Draw.draw_surface(cr, close_press_surface, draw_x + tab_width - get_tab_close_button_padding(), 0, 0, height); - } else { - Draw.draw_surface(cr, close_hover_surface, draw_x + tab_width - get_tab_close_button_padding(), 0, 0, height); - } - } else { - Draw.draw_surface(cr, close_normal_surface, draw_x + tab_width - get_tab_close_button_padding(), 0, 0, height); - } - } - } - - // Draw tab text. - cr.save(); - clip_rectangle(cr, draw_x + get_tab_text_padding(), 0, tab_width - get_tab_text_padding() * 2, height); - - Utils.set_context_color(cr, tab_text_color); - var is_hover = false; - if (draw_hover) { - if (hover_x > draw_x && hover_x < draw_x + tab_width) { - is_hover = true; - } - } - - int text_render_y = (alloc.height - max_tab_height) / 2; - if (is_hover) { - cr.rectangle(draw_x, text_render_y, tab_width - get_tab_close_button_padding() - hover_clip_right_offset, height); - cr.clip(); - } - Draw.draw_layout(cr, layout, draw_x + get_tab_text_padding(), text_render_y); - cr.restore(); - - draw_x += tab_width; - - max_tab_width = int.max(max_tab_width, tab_width); - - counter++; - } - - // Don't allowed add tab when scale too small. - allowed_add_tab = max_tab_width > min_tab_width || draw_scale >= 1.0; - - if (hover_x > draw_x && hover_x < draw_x + add_button_width) { - if (is_button_press) { - if (is_light_theme) { - Draw.draw_surface(cr, add_press_light_surface, draw_x, 0, 0, height); - } else { - Draw.draw_surface(cr, add_press_dark_surface, draw_x, 0, 0, height); - } - } else if (draw_hover) { - if (is_light_theme) { - Draw.draw_surface(cr, add_hover_light_surface, draw_x, 0, 0, height); - } else { - Draw.draw_surface(cr, add_hover_dark_surface, draw_x, 0, 0, height); - } - } - } else { - if (is_light_theme) { - Draw.draw_surface(cr, add_normal_light_surface, draw_x, 0, 0, height); - } else { - Draw.draw_surface(cr, add_normal_dark_surface, draw_x, 0, 0, height); - } - } - - return true; - } - - public int get_tab_render_width(int name_width) { - return int.max(name_width + get_tab_text_padding() * 2, tab_min_width); - } - - public int get_tab_width(int name_width) { - return int.max((int) ((name_width + get_tab_text_padding() * 2) * draw_scale), (int) (tab_min_width * draw_scale)); - } - - public int get_tab_text_padding() { - return text_padding_x; - } - - public int get_tab_close_button_padding() { - return close_button_padding_x; - } - - public void switch_tab(int new_index) { - tab_index = new_index; - - press_tab(tab_index, tab_list.get(tab_index)); - - queue_draw(); - } - - public Pango.Layout get_text_size(string text, out int width, out int height) { - var layout = create_pango_layout(text); - layout.set_font_description(font_description); - layout.get_pixel_size(out width, out height); - - return layout; - } - - public void update_window_title(string title) { - ((Gtk.Window) get_toplevel()).set_title("%s - %s".printf(title, _("Deepin Terminal"))); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/terminal.vala deepin-terminal-5.4.13/widget/terminal.vala --- deepin-terminal-5.0.0+ds1/widget/terminal.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/terminal.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,1591 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Menu; -using Utils; -using Vte; -using Widgets; - -namespace Widgets { - public class Term : Gtk.Overlay { - enum DropTargets { - URILIST, - STRING, - TEXT - } - - private bool enter_sz_command = false; - private string save_file_directory = ""; - public ArrayList command_execute_y_coordinates; - public GLib.Pid child_pid; - public Gdk.RGBA background_color = Gdk.RGBA(); - public Gdk.RGBA foreground_color = Gdk.RGBA(); - public Gtk.Scrollbar scrollbar; - public Menu.Menu menu; - public Terminal term; - public WorkspaceManager workspace_manager; - public bool child_has_exit = false; - public bool has_print_exit_notify = false; - public bool has_select_all = false; - public bool is_first_term; - public bool is_press_scrollbar = false; - public bool login_remote_server = false; - public bool press_anything = false; - public double zoom_factor = 1.0; - public int font_size = 0; - public int hide_scrollbar_offset = 20; - public int show_scrollbar_offset = 15; - public string current_dir = ""; - public string current_title = ""; - public string expect_file_path = ""; - public string? customize_title; - public string? remote_server_title; - public string? uri_at_right_press; - public string? server_info; - public uint launch_idle_id; - public uint? hide_scrollbar_timeout_source_id = null; - - public static string USERCHARS = "-[:alnum:]"; - public static string USERCHARS_CLASS = "[" + USERCHARS + "]"; - public static string PASSCHARS_CLASS = "[-[:alnum:]\\Q,?;.:/!%$^*&~\"#'\\E]"; - public static string HOSTCHARS_CLASS = "[-[:alnum:]]"; - public static string HOST = HOSTCHARS_CLASS + "+(\\." + HOSTCHARS_CLASS + "+)*"; - public static string PORT = "(?:\\:[[:digit:]]{1,5})?"; - public static string PATHCHARS_CLASS = "[-[:alnum:]\\Q_$.+!*,;:@&=?/~#%\\E]"; - public static string PATHTERM_CLASS = "[^\\Q]'.}>) \t\r\n,\"\\E]"; - public static string SCHEME = """(?:news:|telnet:|nntp:|file:\/|https?:|ftps?:|sftp:|webcal:|irc:|sftp:|ldaps?:|nfs:|smb:|rsync:|ssh:|rlogin:|telnet:|git:|git\+ssh:|bzr:|bzr\+ssh:|svn:|svn\+ssh:|hg:|mailto:|magnet:)"""; - public static string USERPASS = USERCHARS_CLASS + "+(?:" + PASSCHARS_CLASS + "+)?"; - public static string URLPATH = "(?:(/" + PATHCHARS_CLASS + "+(?:[(]" + PATHCHARS_CLASS + "*[)])*" + PATHCHARS_CLASS + "*)*" + PATHTERM_CLASS + ")?"; - public static string[] REGEX_STRINGS = { - SCHEME + "//(?:" + USERPASS + "\\@)?" + HOST + PORT + URLPATH, - "(?:www|ftp)" + HOSTCHARS_CLASS + "*\\." + HOST + PORT + URLPATH, - "(?:callto:|h323:|sip:)" + USERCHARS_CLASS + "[" + USERCHARS + ".]*(?:" + PORT + "/[a-z0-9]+)?\\@" + HOST, - "(?:mailto:)?" + USERCHARS_CLASS + "[" + USERCHARS + ".]*\\@" + HOSTCHARS_CLASS + "+\\." + HOST, - "(?:news:|man:|info:)[[:alnum:]\\Q^_{|}~!\"#$%&'()*+,./;:=?`\\E]+", - "git\\@" + HOST + ":" + HOST + URLPATH, - }; - - public KeyFile search_engine_config_file; - public string search_engine_config_file_path = Utils.get_config_file_path("search-engine-config.conf"); - - public signal void change_title(string dir); - public signal void exit(); - public signal void highlight_tab(); - public signal void exit_with_bad_code(int exit_status); - - public Term(bool first_term, string? work_directory, WorkspaceManager manager) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - workspace_manager = manager; - is_first_term = first_term; - command_execute_y_coordinates = new ArrayList(); - - term = new Terminal(); - - search_engine_config_file = new KeyFile(); - - term.child_exited.connect((t, exit_status)=> { - print("Terminal exit with code: %i\n", exit_status); - - // Just reset terminal when exit code match EXIT_CODE_BAD_SMABA (139). - if (exit_status == Constant.EXIT_CODE_BAD_SMABA) { - exit_with_bad_code(exit_status); - } else { - child_has_exit = true; - - // Since vte@0276859 (v0.53.92), the vte terminal always emit the `child-exited` signal - if (term.get_toplevel().get_type().is_a(typeof(ConfigWindow))) { - ConfigWindow window = (ConfigWindow) term.get_toplevel(); - - try { - if (window.config.config_file.get_boolean("advanced", "print_notify_after_script_finish") && is_launch_command() && workspace_manager.is_first_term(this)) { - // Print exit notify if command execute finish. - print_exit_notify(); - } else { - // Just exit terminal if `child_exited' signal emit by shell. - exit(); - } - } catch (Error e) { - print("child_exited: %s\n", e.message); - } - } - } - }); - term.destroy.connect((t) => { - kill_fg(); - }); - term.realize.connect((t) => { - setup_from_config(); - - focus_term(); - }); - term.window_title_changed.connect((t) => { - update_terminal_title(); - - // Command finish will trigger 'window-title-changed' signal emit. - // we will notify user if background terminal command finish. - if (!term.get_toplevel().get_type().is_a(typeof(ConfigWindow))) { - if (press_anything) { - highlight_tab(); - } - } - }); - term.key_press_event.connect(on_key_press); - term.scroll_event.connect(on_scroll); - term.button_press_event.connect((event) => { - has_select_all = false; - - string? uri = term.match_check_event(event, null); - - switch (event.button) { - case Gdk.BUTTON_PRIMARY: - // Grab focus terminal first. - focus_term(); - - int modifiers = Gtk.accelerator_get_default_mod_mask(); - if ((event.state & modifiers) == Gdk.ModifierType.CONTROL_MASK && uri != null) { - try { - Gtk.show_uri(null, (!) uri, Gtk.get_current_event_time()); - - return true; - } catch (GLib.Error error) { - try { - uri = "http://%s".printf(uri); - Gtk.show_uri(null, (!) uri, Gtk.get_current_event_time()); - } catch (GLib.Error error) { - warning("Could Not Open link"); - } - } - } - - return false; - case Gdk.BUTTON_SECONDARY: - // Grab focus terminal first. - focus_term(); - - uri_at_right_press = term.match_check_event(event, null); - show_menu((int) event.x_root, (int) event.y_root); - - return false; - } - - return false; - }); - term.button_release_event.connect((event) => { - try { - Widgets.ConfigWindow window = (Widgets.ConfigWindow) term.get_toplevel(); - - // Like XShell, if user set config option 'copy_on_select' to true, terminal will copy select text to system clipboard when text is selected. - if (window.config.config_file.get_boolean("advanced", "copy_on_select") && term.get_has_selection()) { - term.copy_clipboard(); - } - } catch (Error e) { - print("term button_release_event: %s\n", e.message); - } - - return false; - }); - - /* target entries specify what kind of data the terminal widget accepts */ - Gtk.TargetEntry uri_entry = { "text/uri-list", Gtk.TargetFlags.OTHER_APP, DropTargets.URILIST }; - Gtk.TargetEntry string_entry = { "STRING", Gtk.TargetFlags.OTHER_APP, DropTargets.STRING }; - Gtk.TargetEntry text_entry = { "text/plain", Gtk.TargetFlags.OTHER_APP, DropTargets.TEXT }; - - Gtk.TargetEntry[] targets = { }; - targets += uri_entry; - targets += string_entry; - targets += text_entry; - - Gtk.drag_dest_set(this, Gtk.DestDefaults.ALL, targets, Gdk.DragAction.COPY); - this.drag_data_received.connect(drag_received); - - /* Make Links Clickable */ - this.clickable(REGEX_STRINGS); - - // NOTE: if terminal start with option '-e', use functional 'launch_command' and don't use function 'launch_shell'. - // terminal will crash if we launch_command after launch_shell. - if (is_launch_command() && workspace_manager.is_first_term(this)) { - launch_command(Application.commands, work_directory); - } else { - launch_shell(work_directory); - } - - add(term); - - // Create overlay scrollbar. - // NOTE: Why not use vte in Gtk.ScrolledWindow? - // Because VTE implement Gtk.Scrollable that conflict with Gtk.ScrolledWindow. - // Terminal process will *CRASH* if use Gtk.ScrolledWindow when vte have huge output scroll. - scrollbar = new Gtk.Scrollbar(Gtk.Orientation.VERTICAL, term.get_vadjustment()); - scrollbar.set_halign(Gtk.Align.END); - scrollbar.set_child_visible(false); - - scrollbar.button_press_event.connect((w, e) => { - is_press_scrollbar = true; - - return false; - }); - scrollbar.button_release_event.connect((w, e) => { - is_press_scrollbar = false; - - return false; - }); - scrollbar.value_changed.connect(() => { - // Try to show scrollbar when scroll value changed. - // Don't show scrollbar if scrollbar's height equal to terminal height (such as run aptitude). - var adj = scrollbar.get_adjustment(); - if (adj.get_upper() == adj.get_lower() + adj.get_page_size()) { - scrollbar.set_child_visible(false); - } else { - // Try to run hide scrollbar timer after show scrollbar. - scrollbar.set_child_visible(true); - - try_hide_scrollbar(); - } - }); - term.motion_notify_event.connect((w, e) => { - Gtk.Allocation rect; - w.get_allocation(out rect); - - if (e.x < rect.width - hide_scrollbar_offset) { - try_hide_scrollbar(); - } else if (e.x > rect.width - show_scrollbar_offset) { - var adj = scrollbar.get_adjustment(); - if (adj.get_upper() != adj.get_lower() + adj.get_page_size()) { - scrollbar.set_child_visible(true); - } - } - - return false; - }); - - add_overlay(scrollbar); - } - - public void try_hide_scrollbar() { - if (hide_scrollbar_timeout_source_id != null) { - GLib.Source.remove(hide_scrollbar_timeout_source_id); - hide_scrollbar_timeout_source_id = null; - } - - if (hide_scrollbar_timeout_source_id == null) { - hide_scrollbar_timeout_source_id = GLib.Timeout.add(3000, () => { - // Don't hide scrollbar is user is pressing button. - if (!is_press_scrollbar) { - scrollbar.set_child_visible(false); - } - - hide_scrollbar_timeout_source_id = null; - - return false; - }); - } - } - - public bool is_in_remote_server() { - bool in_remote_server = false; - int foreground_pid; - var has_foreground_process = try_get_foreground_pid(out foreground_pid); - if (has_foreground_process) { - try { - Widgets.ConfigWindow window = (Widgets.ConfigWindow) term.get_toplevel(); - - string command = get_proc_file_content("/proc/%i/comm".printf(foreground_pid)).strip(); - string remote_commands = window.config.config_file.get_string("advanced", "remote_commands"); - if (command in remote_commands.split(";")) { - in_remote_server = true; - } else if (command == "expect") { - string[] cmdline = get_proc_file_content("/proc/%i/cmdline".printf(foreground_pid)).strip().split(" "); - if (cmdline.length == 3 && cmdline[1] == "-f" && cmdline[2] == expect_file_path) { - in_remote_server = true; - } - } - } catch (Error e) { - print("is_in_remote_server: %s\n", e.message); - } - } - - return in_remote_server; - } - - public void show_menu(int x, int y) { - bool in_quake_window = this.get_toplevel().get_type().is_a(typeof(Widgets.QuakeWindow)); - - // Set variable 'show_quake_menu' to true if terminal's window is quake window. - // Avoid quake window hide when config option 'hide_quakewindow_after_lost_focus' is turn on. - if (in_quake_window) { - Widgets.ConfigWindow window = (Widgets.ConfigWindow) term.get_toplevel(); - window.show_quake_menu = true; - } - - bool display_first_spliter = false; - - var menu_content = new GLib.List(); - if (term.get_has_selection()) { - menu_content.append(new Menu.MenuItem("copy", _("Copy"))); - - display_first_spliter = true; - } else if (uri_at_right_press != null) { - menu_content.append(new Menu.MenuItem("open", _("Open link"))); - menu_content.append(new Menu.MenuItem("copy", _("Copy link"))); - - display_first_spliter = true; - } - - if (clipboard_has_context()) { - menu_content.append(new Menu.MenuItem("paste", _("Paste"))); - - display_first_spliter = true; - } - if (term.get_has_selection()) { - var selection_file = get_selection_file(); - if (selection_file != null) { - menu_content.append(new Menu.MenuItem("open", _("Open"))); - } - - display_first_spliter = true; - } - if (get_cwd() != "") { - var dir_file = GLib.File.new_for_path(current_dir); - if (dir_file.query_exists()) { - menu_content.append(new Menu.MenuItem("open_in_filemanager", _("Open in file manager"))); - } - - display_first_spliter = true; - } - - if (display_first_spliter) { - menu_content.append(new Menu.MenuItem("", "")); - } - - menu_content.append(new Menu.MenuItem("horizontal_split", _("Horizontal split"))); - menu_content.append(new Menu.MenuItem("vertical_split", _("Vertical split"))); - menu_content.append(new Menu.MenuItem("close_window", _("Close window"))); - if (workspace_manager.focus_workspace.term_list.size > 1) { - menu_content.append(new Menu.MenuItem("close_other_windows", _("Close other windows"))); - } - menu_content.append(new Menu.MenuItem("", "")); - - menu_content.append(new Menu.MenuItem("new_workspace", _("New workspace"))); - menu_content.append(new Menu.MenuItem("", "")); - - if (!in_quake_window) { - var window = ((Widgets.Window) get_toplevel()); - if (window.window_is_fullscreen()) { - menu_content.append(new Menu.MenuItem("quit_fullscreen", _("Exit fullscreen"))); - } else { - menu_content.append(new Menu.MenuItem("fullscreen", _("Fullscreen"))); - } - } - - menu_content.append(new Menu.MenuItem("find", _("Find"))); - menu_content.append(new Menu.MenuItem("", "")); - if (term.get_has_selection()) { - Menu.MenuItem online_search = new Menu.MenuItem("search", _("Search")); - - online_search.add_submenu_item(new Menu.MenuItem("google", "Google")); - online_search.add_submenu_item(new Menu.MenuItem("bing", "Bing")); - - string? lang = Environment.get_variable("LANG"); - if (lang != null && lang == "zh_CN.UTF-8") { - online_search.add_submenu_item(new Menu.MenuItem("baidu", "Baidu")); - } - - online_search.add_submenu_item(new Menu.MenuItem("github", "Github")); - online_search.add_submenu_item(new Menu.MenuItem("stackoverflow", "Stack Overflow")); - online_search.add_submenu_item(new Menu.MenuItem("duckduckgo", "DuckDuckGo")); - - var file = File.new_for_path(search_engine_config_file_path); - if (file.query_exists()) { - try { - search_engine_config_file.load_from_file(search_engine_config_file_path, KeyFileFlags.NONE); - - foreach (unowned string option in search_engine_config_file.get_groups()) { - string search_engine_name = search_engine_config_file.get_value(option, "name"); - string search_engine_api = search_engine_config_file.get_value(option, "api"); - - if (search_engine_name != "" && search_engine_api != "") { - online_search.add_submenu_item(new Menu.MenuItem(option, search_engine_name)); - } - } - } catch (Error e) { - if (!FileUtils.test(search_engine_config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - } - - menu_content.append(online_search); - } - menu_content.append(new Menu.MenuItem("", "")); - - menu_content.append(new Menu.MenuItem("switch_theme", _("Switch theme"))); - menu_content.append(new Menu.MenuItem("rename_title", _("Rename title"))); - menu_content.append(new Menu.MenuItem("encoding", _("Encoding"))); - menu_content.append(new Menu.MenuItem("custom_commands", _("Custom commands"))); - menu_content.append(new Menu.MenuItem("remote_manage", _("Remote management"))); - if (is_in_remote_server()) { - menu_content.append(new Menu.MenuItem("", "")); - menu_content.append(new Menu.MenuItem("upload_file", _("Upload file"))); - menu_content.append(new Menu.MenuItem("download_file", _("Download file"))); - } - - menu_content.append(new Menu.MenuItem("", "")); - menu_content.append(new Menu.MenuItem("preference", _("Settings"))); - - menu = new Menu.Menu(x, y, menu_content); - menu.click_item.connect(handle_menu_item_click); - menu.destroy.connect(handle_menu_destroy); - - } - - public void handle_menu_item_click(string item_id) { - if (workspace_manager.get_type().is_a(typeof(WorkspaceManager))) { - switch(item_id) { - case "paste": - term.paste_clipboard(); - break; - case "copy": - if (term.get_has_selection()) { - term.copy_clipboard(); - } else if (uri_at_right_press != null) { - var display = ((Gtk.Window) this.get_toplevel()).get_display(); - Gtk.Clipboard.get_for_display(display, Gdk.SELECTION_CLIPBOARD).set_text(uri_at_right_press, uri_at_right_press.length); - Gtk.Clipboard.get_for_display(display, Gdk.SELECTION_PRIMARY).set_text(uri_at_right_press, uri_at_right_press.length); - - } - break; - case "open": - if (term.get_has_selection()) { - open_selection_file(); - } else if (uri_at_right_press != null) { - try { - Gtk.show_uri(null, (!) uri_at_right_press, Gtk.get_current_event_time()); - } catch (GLib.Error error) { - try { - var uri = "http://%s".printf(uri_at_right_press); - Gtk.show_uri(null, (!) uri, Gtk.get_current_event_time()); - } catch (GLib.Error error) { - warning("Could Not Open link"); - } - } - } - break; - case "open_in_filemanager": - open_current_dir_in_file_manager(); - break; - case "fullscreen": - var window = ((Widgets.Window) get_toplevel()); - window.toggle_fullscreen(); - break; - case "quit_fullscreen": - var window = ((Widgets.Window) get_toplevel()); - window.toggle_fullscreen(); - break; - case "find": - workspace_manager.focus_workspace.search(get_selection_text()); - break; - case "horizontal_split": - workspace_manager.focus_workspace.split_horizontal(); - break; - case "vertical_split": - workspace_manager.focus_workspace.split_vertical(); - break; - case "close_window": - workspace_manager.focus_workspace.close_focus_term(); - break; - case "close_other_windows": - workspace_manager.focus_workspace.close_other_terms(); - break; - case "new_workspace": - workspace_manager.new_workspace_with_current_directory(); - break; - case "custom_commands": - workspace_manager.focus_workspace.show_command_panel(workspace_manager.focus_workspace); - break; - case "remote_manage": - workspace_manager.focus_workspace.show_remote_panel(workspace_manager.focus_workspace); - break; - case "switch_theme": - workspace_manager.focus_workspace.show_theme_panel(workspace_manager.focus_workspace); - break; - case "upload_file": - upload_file(); - break; - case "download_file": - download_file(); - break; - case "rename_title": - rename_title(); - break; - case "encoding": - workspace_manager.focus_workspace.show_encoding_panel(workspace_manager.focus_workspace); - break; - case "preference": - var preference = new Widgets.Preference((Widgets.ConfigWindow) this.get_toplevel(), ((Gtk.Window) this.get_toplevel()).get_focus()); - preference.transient_for_window((Widgets.ConfigWindow) this.get_toplevel()); - break; - default: - if (item_id == "google") { - search_text_in_search_engine(get_selection_text(), "http://google.com/search?q=%s"); - } else if (item_id == "bing") { - search_text_in_search_engine(get_selection_text(), "http://cn.bing.com/search?q=%s"); - } else if (item_id == "baidu") { - search_text_in_search_engine(get_selection_text(), "https://www.baidu.com/s?wd=%s"); - } else if (item_id == "github") { - search_text_in_search_engine(get_selection_text(), "https://github.com/search?q=%s"); - } else if (item_id == "stackoverflow") { - search_text_in_search_engine(get_selection_text(), "https://stackoverflow.com/search?q=%s"); - } else if (item_id == "duckduckgo") { - search_text_in_search_engine(get_selection_text(), "https://duckduckgo.com/?q=%s"); - } else { - foreach (unowned string option in search_engine_config_file.get_groups()) { - if (item_id == option) { - try { - string search_engine_api = search_engine_config_file.get_value(option, "api"); - search_text_in_search_engine(get_selection_text(), search_engine_api); - } catch (Error e) { - if (!FileUtils.test(search_engine_config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - - break; - } - } - } - - break; - } - } else { - print("handle_menu_item_click: impossible here!\n"); - } - - } - - - public void upload_file () { - Gtk.FileChooserAction action = Gtk.FileChooserAction.OPEN; - var chooser = new Gtk.FileChooserDialog(_("Select file to upload"), - get_toplevel() as Gtk.Window, action); - chooser.add_button(_("Cancel"), Gtk.ResponseType.CANCEL); - chooser.set_select_multiple(true); - chooser.add_button(_("Upload"), Gtk.ResponseType.ACCEPT); - - if (chooser.run () == Gtk.ResponseType.ACCEPT) { - var file_list = chooser.get_files(); - - press_ctrl_at(); - GLib.Timeout.add(500, () => { - string upload_command = "sz "; - foreach (File file in file_list) { - upload_command = upload_command + "'" + file.get_path() + "' "; - } - upload_command = upload_command + "\n"; - - this.term.feed_child(upload_command.to_utf8()); - - return false; - }); - - } - - chooser.destroy(); - } - - public void download_file() { - Gtk.FileChooserAction action = Gtk.FileChooserAction.SELECT_FOLDER; - var chooser = new Gtk.FileChooserDialog(_("Select directory to save the file"), - get_toplevel() as Gtk.Window, action); - chooser.add_button(_("Cancel"), Gtk.ResponseType.CANCEL); - chooser.add_button(_("Select"), Gtk.ResponseType.ACCEPT); - - if (chooser.run () == Gtk.ResponseType.ACCEPT) { - save_file_directory = chooser.get_filename(); - - press_ctrl_a(); - - GLib.Timeout.add(100, () => { - press_ctrl_k(); - - GLib.Timeout.add(100, () => { - // NOTE: Use quote around $file to avoid escape filepath. - string command = "read -e -a files -p \"%s: \"; sz \"${files[@]}\"\n".printf(_("Type path to download file")); - this.term.feed_child(command.to_utf8()); - - enter_sz_command = true; - - return false; - }); - - return false; - }); - } - - chooser.destroy(); - } - - public void rename_title() { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) term.get_toplevel(); - - var rename_dialog = new Widgets.RenameDialog( - _("Rename title"), - current_title, - _("Cancel"), - _("Rename") - ); - rename_dialog.transient_for_window(parent_window); - rename_dialog.rename.connect((w, new_title) => { - if (new_title.strip() == "") { - customize_title = null; - } else { - customize_title = new_title.strip(); - } - - update_terminal_title(); - }); - } - - public void execute_download() { - // Sleep 1 second to wait sz command execute. - GLib.Timeout.add(1000, () => { - // Switch to zssh local directory. - press_ctrl_at(); - - // Sleep 100 millseconds to wait zssh switch local directory. - GLib.Timeout.add(100, () => { - // Switch directory in zssh. - string switch_command = "cd %s\n".printf(save_file_directory); - this.term.feed_child(switch_command.to_utf8()); - - // Do rz command to download file. - GLib.Timeout.add(100, () => { - string download_command = "rz\n"; - this.term.feed_child(download_command.to_utf8()); - - // Press enter automatically. - GLib.Timeout.add(100, () => { - string enter_command = "\n"; - this.term.feed_child(enter_command.to_utf8()); - - return false; - }); - - return false; - }); - return false; - }); - - return false; - }); - } - - public void press_ctrl_at() { - Gdk.EventKey* event; - event = (Gdk.EventKey*) new Gdk.Event(Gdk.EventType.KEY_PRESS); - var window = term.get_window(); - event->window = window; - event->keyval = 64; - event->state = (Gdk.ModifierType) 33554437; - event->hardware_keycode = (uint16) 11; - ((Gdk.Event*) event)->put(); - } - - public void press_ctrl_k() { - Gdk.EventKey* event; - event = (Gdk.EventKey*) new Gdk.Event(Gdk.EventType.KEY_PRESS); - var window = term.get_window(); - event->window = window; - event->keyval = 75; - event->state = (Gdk.ModifierType) 33554437; - event->hardware_keycode = (uint16) 45; - ((Gdk.Event*) event)->put(); - } - - public void press_ctrl_a() { - Gdk.EventKey* event; - event = (Gdk.EventKey*) new Gdk.Event(Gdk.EventType.KEY_PRESS); - var window = term.get_window(); - event->window = window; - event->keyval = 97; - event->state = (Gdk.ModifierType) 33554436; - event->hardware_keycode = (uint16) 38; - ((Gdk.Event*) event)->put(); - } - - public void press_ctrl_e() { - Gdk.EventKey* event; - event = (Gdk.EventKey*) new Gdk.Event(Gdk.EventType.KEY_PRESS); - var window = term.get_window(); - event->window = window; - event->keyval = 69; - event->state = (Gdk.ModifierType) 33554437; - event->hardware_keycode = (uint16) 26; - ((Gdk.Event*) event)->put(); - } - - public void handle_menu_destroy() { - menu = null; - } - - public void focus_term() { - term.grab_focus(); - update_terminal_title(); - } - - public void update_terminal_title() { - // Clean remote_server_title if logout from remote server. - int foreground_pid; - var has_foreground_process = try_get_foreground_pid(out foreground_pid); - - if (has_foreground_process) { - var command = Utils.get_process_cmdline(foreground_pid); - if (command.index_of("expect -f /tmp/deepin-terminal-") == 0 && !login_remote_server) { - login_remote_server = true; - } - } else if (login_remote_server) { - login_remote_server = false; - - if (remote_server_title != null) { - remote_server_title = null; - } - } - - string title; - // Always use customize title if customize_title is not null. - if (customize_title != null) { - title = customize_title; - } - // Use remote server name if user not customize name and when remote_server_title is not null. - else if (remote_server_title != null) { - title = remote_server_title; - } - else { - string? vte_window_title = term.get_window_title(); - // Use vte window title if vte_window_title is not null. - if (vte_window_title != null) { - title = vte_window_title; - } else { - string? dir_basename = GLib.Path.get_basename(get_cwd()); - if (dir_basename != null) { - title = dir_basename; - current_title = dir_basename; - } else { - title = _("deepin"); - } - } - } - // Change the title. - change_title(title); - current_title = title; - } - - public string get_cwd() { - if (this.term.get_pty() != null) { - int pty_fd = this.term.get_pty().fd; - int fpid = Posix.tcgetpgrp(pty_fd); - if (fpid > 0) { - try { - current_dir = FileUtils.read_link("/proc/%d/cwd".printf(fpid)); - } catch (Error e) { - stderr.printf("Parse cwd of %d failed: %s\n", fpid, e.message); - } - } - } - return current_dir; - } - - public bool on_scroll(Gtk.Widget widget, Gdk.EventScroll scroll_event) { - if ((scroll_event.state & Gdk.ModifierType.CONTROL_MASK) != 0) { - try { - Widgets.ConfigWindow window = (Widgets.ConfigWindow) term.get_toplevel(); - - double old_opacity = window.config.config_file.get_double("general", "opacity"); - double new_opacity = old_opacity; - - if (scroll_event.delta_y < 0) { - new_opacity = double.min(double.max(old_opacity + 0.01, Constant.TERMINAL_MIN_OPACITY), 1); - } else if (scroll_event.delta_y > 0) { - new_opacity = double.min(double.max(old_opacity - 0.01, Constant.TERMINAL_MIN_OPACITY), 1); - } - - if (new_opacity != old_opacity) { - window.config.load_config(); - window.config.config_file.set_double("general", "opacity", new_opacity); - window.config.save(); - - window.config.update(); - } - - return true; - } catch (GLib.KeyFileError e) { - print("Terminal on_scroll: %s\n", e.message); - } - } - - return false; - } - - private bool on_key_press(Gtk.Widget widget, Gdk.EventKey key_event) { - // Exit terminal if got `child_exited' signal by command execute finish. - if (child_has_exit && is_launch_command() && workspace_manager.is_first_term(this)) { - string keyname = Keymap.get_keyevent_name(key_event); - if (keyname == "Enter") { - // Exit key press callback if current terminal has exit. - exit(); - - return true; - } - } - - // This variable use for highlight_tab. - press_anything = true; - - try { - string keyname = Keymap.get_keyevent_name(key_event); - - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) term.get_toplevel(); - - if (keyname == "Menu") { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - int window_width, window_height; - ((ConfigWindow) get_toplevel()).get_size(out window_width, out window_height); - - int window_x, window_y; - ((ConfigWindow) get_toplevel()).get_window().get_origin(out window_x, out window_y); - - if (pointer_x < window_x || pointer_x > window_x + window_width) { - pointer_x = window_x + window_width / 2; - } - - if (pointer_y < window_y || pointer_y > window_y + window_height) { - pointer_y = window_y + window_height / 2; - } - - show_menu(pointer_x, pointer_y); - - return true; - } - - var copy_key = parent_window.config.config_file.get_string("shortcut", "copy"); - if (copy_key != "" && keyname == copy_key) { - term.copy_clipboard(); - return true; - } - - var paste_key = parent_window.config.config_file.get_string("shortcut", "paste"); - if (paste_key != "" && keyname == paste_key) { - term.paste_clipboard(); - return true; - } - - var open_key = parent_window.config.config_file.get_string("shortcut", "open"); - if (open_key != "" && keyname == open_key) { - open_selection_file(); - return true; - } - - var zoom_in_key = parent_window.config.config_file.get_string("shortcut", "zoom_in"); - if (zoom_in_key != "" && keyname == zoom_in_key) { - increment_size(); - return true; - } - - var zoom_out_key = parent_window.config.config_file.get_string("shortcut", "zoom_out"); - if (zoom_out_key != "" && keyname == zoom_out_key) { - decrement_size(); - return true; - } - - var zoom_reset_key = parent_window.config.config_file.get_string("shortcut", "default_size"); - if (zoom_reset_key != "" && keyname == zoom_reset_key) { - set_default_font_size(); - return true; - } - - var jump_to_next_command_key = parent_window.config.config_file.get_string("shortcut", "jump_to_next_command"); - if (jump_to_next_command_key != "" && keyname == jump_to_next_command_key) { - jump_to_next_command(); - return true; - } - - var jump_to_previous_command_key = parent_window.config.config_file.get_string("shortcut", "jump_to_previous_command"); - if (jump_to_previous_command_key != "" && keyname == jump_to_previous_command_key) { - jump_to_previous_command(); - return true; - } - - if (keyname == "Enter" || keyname == "Ctrl + m") { - if (enter_sz_command) { - execute_download(); - enter_sz_command = false; - } else { - // If user press enter or 'ctrl + m' and not foreground(command-line) process exit. - // We consider user execute command. - if (!has_foreground_process()) { - var y_coordinate = (int) scrollbar.get_adjustment().get_value(); - if (command_execute_y_coordinates.size == 0 || y_coordinate != command_execute_y_coordinates[command_execute_y_coordinates.size - 1]) { - command_execute_y_coordinates.add(y_coordinate); - } - } - } - } - - if (keyname == "Ctrl + c" || keyname == "Ctrl + d") { - enter_sz_command = false; - - return false; - } - - // Avoid key single character do command shorcut scan. - if (keyname.length > 1 && keyname != "Enter") { - string command_config_file_path = Utils.get_config_file_path("command-config.conf"); - var file = File.new_for_path(command_config_file_path); - if (file.query_exists()) { - try { - KeyFile command_config_file = new KeyFile(); - command_config_file.load_from_file(command_config_file_path, KeyFileFlags.NONE); - - foreach (unowned string option in command_config_file.get_groups ()) { - if (keyname == command_config_file.get_value(option, "Shortcut")) { - var command_string = "%s\n".printf(command_config_file.get_value(option, "Command")); - term.feed_child(command_string.to_utf8()); - - return true; - } - } - } catch (Error e) { - if (!FileUtils.test(command_config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - } - } - - return false; - } catch (GLib.KeyFileError e) { - print("Terminal on_key_press: %s\n", e.message); - - return false; - } - } - - public void update_font_info() { - try { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) term.get_toplevel(); - var font = parent_window.config.config_file.get_string("general", "font"); - Pango.FontDescription current_font = new Pango.FontDescription(); - current_font.set_family(font); - current_font.set_size((int) (font_size * zoom_factor)); - term.set_font(current_font); - } catch (GLib.KeyFileError e) { - print("Terminal update_font_info: %s\n", e.message); - } - } - - public void increment_size () { - if (zoom_factor < 3) { - zoom_factor += 0.1; - - update_font_info(); - } - } - - public void decrement_size () { - if (zoom_factor > 0.8) { - zoom_factor -= 0.1; - - update_font_info(); - } - } - - public void set_default_font_size () { - zoom_factor = 1.0; - update_font_info(); - } - - public void jump_to_next_command() { - bool jump_once = false; - - var y_coordinate = (int) scrollbar.get_adjustment().get_value(); - foreach (int command_y_coordiante in command_execute_y_coordinates) { - if (y_coordinate < command_y_coordiante) { - jump_once = true; - scrollbar.get_adjustment().set_value(command_y_coordiante); - break; - } - } - - // Jump to bottom if no next position to jump. - if (!jump_once) { - scrollbar.get_adjustment().set_value(scrollbar.get_adjustment().get_upper()); - } - } - - public void jump_to_previous_command() { - var y_coordinate = (int) scrollbar.get_adjustment().get_value(); - for (int count = 0; count < command_execute_y_coordinates.size; count++) { - if (y_coordinate > command_execute_y_coordinates[command_execute_y_coordinates.size - 1 - count]) { - scrollbar.get_adjustment().set_value(command_execute_y_coordinates[command_execute_y_coordinates.size - 1 - count]); - break; - } - } - } - - public void drag_received (Gdk.DragContext context, int x, int y, - Gtk.SelectionData selection_data, uint target_type, uint time_) { - term.grab_focus(); - - switch (target_type) { - case DropTargets.URILIST: - var uris = selection_data.get_uris(); - - string path; - File file; - - // Drag file to remote server if terminal is login. - if (login_remote_server) { - for (var i = 0; i < uris.length; i++) { - file = File.new_for_uri(uris[i]); - if ((path = file.get_path()) != null) { - uris[i] = Shell.quote(path); - } - } - - press_ctrl_at(); - GLib.Timeout.add(500, () => { - string upload_command = "sz "; - foreach (string file_path in uris) { - upload_command = upload_command + "'" + file_path + "' "; - } - upload_command = upload_command + "\n"; - - this.term.feed_child(upload_command.to_utf8()); - - return false; - }); - } - // Just copy file path if terminal at local. - else { - for (var i = 0; i < uris.length; i++) { - file = File.new_for_uri(uris[i]); - if ((path = file.get_path()) != null) { - uris[i] = Shell.quote(path) + " "; - } - } - - string uris_s = string.joinv("", uris); - this.term.feed_child(uris_s.to_utf8()); - } - - break; - case DropTargets.STRING: - case DropTargets.TEXT: - var data = selection_data.get_text (); - - if (data != null) { - this.term.feed_child(data.to_utf8()); - } - - break; - } - } - - private void clickable (string[] str) { - foreach (string exp in str) { - try { - var regex = new GLib.Regex(exp, - GLib.RegexCompileFlags.OPTIMIZE | - GLib.RegexCompileFlags.MULTILINE, - 0); - int id = term.match_add_gregex(regex, 0); - - term.match_set_cursor_type(id, Gdk.CursorType.HAND2); - } catch (GLib.RegexError error) { - warning (error.message); - } - } - } - - public void launch_shell(string? dir) { - string directory; - if (dir == null) { - directory = GLib.Environment.get_current_dir(); - } else { - directory = dir; - } - - string? shell; - - shell = Vte.get_user_shell(); - if (shell == null || shell[0] == '\0') { - shell = Environment.get_variable("SHELL"); - } - if (shell == null || shell[0] == '\0') { - shell = "/bin/sh"; - } - - string[] argv; - - try { - Shell.parse_argv(shell, out argv); - } catch (ShellError e) { - if (!(e is ShellError.EMPTY_STRING)) { - warning("Terminal launch_shell: %s\n", e.message); - } - } - - // Init spawn/pty/argv argument with option 'run_as_login_shell'. - PtyFlags pty_flags = PtyFlags.DEFAULT; - GLib.SpawnFlags spawn_flags = 0; - - try { - // Because terminal haven't realize finish when call 'launch_shell'. - // So we don't use ConfigWindow to get config value, new Config object to get config value. - Config.Config config = new Config.Config(); - bool run_as_login_shell = config.config_file.get_boolean("advanced", "run_as_login_shell"); - - if (run_as_login_shell) { - pty_flags |= PtyFlags.NO_LASTLOG; - spawn_flags |= GLib.SpawnFlags.FILE_AND_ARGV_ZERO; - argv += "-%s".printf(GLib.Path.get_basename(shell)); - } else { - spawn_flags |= GLib.SpawnFlags.SEARCH_PATH; - } - } catch (GLib.KeyFileError e) { - print("terminal launch_shell: %s\n", e.message); - } - - launch_idle_id = GLib.Idle.add(() => { - try { - term.spawn_sync(pty_flags, - directory, - argv, - null, - spawn_flags, - null, /* child setup */ - out child_pid, - null /* cancellable */); - - GLib.Timeout.add(200, () => { - update_terminal_title(); - - return false; - }); - } catch (Error e) { - warning("Terminal launch_idle_id: %s\n", e.message); - } - - launch_idle_id = 0; - return false; - }); - } - - public bool is_launch_command() { - return Application.commands.size > 0; - } - - public void print_exit_notify() { - if (!has_print_exit_notify) { - GLib.Timeout.add(200, () => { - try { - term.spawn_sync(Vte.PtyFlags.DEFAULT, - null, - {"echo", _("\nCommand has been completed, press ENTER to exit the terminal.")}, - null, - GLib.SpawnFlags.SEARCH_PATH, - null, /* child setup */ - null, - null /* cancellable */); - } catch (Error e) { - warning("Terminal print_exit_notify: %s\n", e.message); - } - - return false; - }); - - has_print_exit_notify = true; - } - } - - public void launch_command(ArrayList commands, string? dir) { - string[] argv = {}; - foreach (string arg in commands) { - argv += arg; - } - - // Set tab name when launch command. - GLib.Timeout.add(200, () => { - if (workspace_manager.tabbar.tab_name_map.get(workspace_manager.workspace_index) == "") { - workspace_manager.tabbar.rename_tab(workspace_manager.workspace_index, _("deepin")); - } - - return false; - }); - - launch_idle_id = GLib.Idle.add(() => { - try { - term.spawn_sync(Vte.PtyFlags.DEFAULT, - dir, - argv, - null, - GLib.SpawnFlags.SEARCH_PATH, - null, /* child setup */ - out child_pid, - null /* cancellable */); - } catch (Error e) { - warning("Terminal launch_idle_id: %s\n", e.message); - } - - launch_idle_id = 0; - return false; - }); - } - - public bool try_get_foreground_pid (out int pid) { - if (this.term.get_pty() == null) { - pid = -1; - return false; - } else { - int pty_fd = this.term.get_pty().fd; - int fgpid = Posix.tcgetpgrp(pty_fd); - - if (fgpid != this.child_pid && fgpid > 0) { - pid = (int) fgpid; - return true; - } else { - pid = -1; - return false; - } - } - } - - public bool has_foreground_process () { - return try_get_foreground_pid(null); - } - - public void kill_fg() { - int fg_pid; - if (this.try_get_foreground_pid(out fg_pid)) { - Posix.kill(fg_pid, Posix.SIGKILL); - } - } - - public void toggle_select_all() { - if (has_select_all) { - term.unselect_all(); - } else { - term.select_all(); - } - - has_select_all = !has_select_all; - } - - public void setup_from_config() { - try { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) term.get_toplevel(); - - var is_cursor_blink = parent_window.config.config_file.get_boolean("advanced", "cursor_blink_mode"); - if (is_cursor_blink) { - term.set_cursor_blink_mode(Vte.CursorBlinkMode.ON); - } else { - term.set_cursor_blink_mode(Vte.CursorBlinkMode.OFF); - } - - term.set_bold_is_bright(parent_window.config.config_file.get_boolean("advanced", "bold_is_bright")); - term.set_audible_bell(parent_window.config.config_file.get_boolean("advanced", "audible_bell")); - term.set_mouse_autohide(parent_window.config.config_file.get_boolean("advanced", "cursor_auto_hide")); - - var scroll_lines = parent_window.config.config_file.get_integer("advanced", "scroll_line"); - term.set_scrollback_lines(scroll_lines); - - var cursor_shape = parent_window.config.config_file.get_string("advanced", "cursor_shape"); - if (cursor_shape == "block") { - term.set_cursor_shape(Vte.CursorShape.BLOCK); - } else if (cursor_shape == "ibeam") { - term.set_cursor_shape(Vte.CursorShape.IBEAM); - } else if (cursor_shape == "underline") { - term.set_cursor_shape(Vte.CursorShape.UNDERLINE); - } - - background_color = Utils.hex_to_rgba( - parent_window.config.config_file.get_string("theme", "background"), - parent_window.config.config_file.get_double("general", "opacity")); - foreground_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "foreground")); - var palette = new Gdk.RGBA[16]; - for (int i = 0; i < 16; i++) { - Gdk.RGBA new_color= Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "color_%i".printf(i + 1))); - - palette[i] = new_color; - } - term.set_colors(foreground_color, background_color, palette); - - term.set_scroll_on_output(parent_window.config.config_file.get_boolean("advanced", "scroll_on_output")); - term.set_scroll_on_keystroke(parent_window.config.config_file.get_boolean("advanced", "scroll_on_key")); - - if (parent_window.config.config_file.get_string("theme", "style") == "light") { - scrollbar.get_style_context().remove_class("light_scrollbar"); - scrollbar.get_style_context().remove_class("dark_scrollbar"); - - scrollbar.get_style_context().add_class("light_scrollbar"); - } else { - scrollbar.get_style_context().remove_class("light_scrollbar"); - scrollbar.get_style_context().remove_class("dark_scrollbar"); - - scrollbar.get_style_context().add_class("dark_scrollbar"); - } - - var config_size = parent_window.config.config_file.get_integer("general", "font_size"); - font_size = config_size * Pango.SCALE; - update_font_info(); - } catch (GLib.KeyFileError e) { - stdout.printf(e.message); - } - } - - public bool clipboard_has_context() { - var clipboard_text = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD).wait_for_text(); - return clipboard_text != null && clipboard_text.strip() != ""; - } - - public string? get_selection_file() { - string? clipboard_text = get_selection_text(); - if (clipboard_text != "") { - //TODO: support "~" - var clipboard_file_path = clipboard_text; - if (FileUtils.test(clipboard_file_path, FileTest.EXISTS)) { - return clipboard_file_path; - } - clipboard_file_path = GLib.Path.build_path(Path.DIR_SEPARATOR_S, current_dir, clipboard_text); - if (FileUtils.test(clipboard_file_path, FileTest.EXISTS)) { - return clipboard_file_path; - } else { - return null; - } - } else { - return null; - } - } - - public string get_selection_text() { - if (term.get_has_selection()) { - // FIXME: vte developer private function 'get_selected_text', so i can't get selected text from api. - // So i get selected text from clipboard that i need save clipboard context before i test selection context. - var clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD); - var current_clipboard_text = clipboard.wait_for_text(); - - term.copy_clipboard(); - var clipboard_text = clipboard.wait_for_text(); - - // FIXME: vte developer private function 'get_selected_text', so i can't get selected text from api. - // So i get selected text from clipboard that i need restore clipboard context before i test selection context. - if (current_clipboard_text != null) { - var display = Gdk.Display.get_default(); - Gtk.Clipboard.get_for_display(display, Gdk.SELECTION_CLIPBOARD).set_text(current_clipboard_text, current_clipboard_text.length); - } - if (clipboard_text != null) { - return clipboard_text.strip(); - } else { - return ""; - } - } else { - return ""; - } - } - - public void search_text_in_search_engine(string search_text, string search_engline_api) { - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline( - "xdg-open '%s'".printf(search_engline_api).printf(search_text), - null, GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("Terminal search_in_search_engine: %s\n", e.message); - } - } - - public void open_selection_file() { - var selection_file = get_selection_file(); - if (selection_file != null) { - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline("xdg-open '%s'".printf(selection_file), null, GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("Terminal open_selection_file: %s\n", e.message); - } - } - } - - public void open_current_dir_in_file_manager() { - try { - GLib.AppInfo appinfo = GLib.AppInfo.create_from_commandline("xdg-open '%s'".printf(current_dir), null, GLib.AppInfoCreateFlags.NONE); - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("Terminal open_current_dir_in_file_manager: %s\n", e.message); - } - } - - public void login_server(string info) { - // Record server info. - server_info = info; - - // Load config. - KeyFile config_file = new KeyFile(); - string config_file_path = Utils.get_config_file_path("server-config.conf"); - - var gio_file = File.new_for_path(config_file_path); - if (!gio_file.query_exists()) { - Utils.touch_dir(Utils.get_config_dir()); - Utils.create_file(config_file_path); - } else { - try { - config_file.load_from_file(config_file_path, KeyFileFlags.NONE); - } catch (Error e) { - if (!FileUtils.test(config_file_path, FileTest.EXISTS)) { - print("Config: %s\n", e.message); - } - } - } - - try { - // Build ssh temp file. - var file = File.new_for_path(Utils.get_ssh_script_path()); - - if (!file.query_exists ()) { - stderr.printf("File '%s' doesn't exist.\n", file.get_path()); - } - - var dis = new DataInputStream(file.read()); - string line; - string ssh_script_content = ""; - while ((line = dis.read_line(null)) != null) { - ssh_script_content = ssh_script_content.concat("%s\n".printf(line)); - } - - string[] server_infos = server_info.split("@"); - - string password = ""; - if (server_info.length > 2) { - password = Utils.lookup_password(server_infos[0], server_infos[1], server_infos[2]); - } else { - password = Utils.lookup_password(server_infos[0], server_infos[1]); - } - - ssh_script_content = ssh_script_content.replace("<>", server_infos[0]); - ssh_script_content = ssh_script_content.replace("<>", server_infos[1]); - if (server_infos.length > 2) { - ssh_script_content = ssh_script_content.replace("<>", server_infos[2]); - } else { - ssh_script_content = ssh_script_content.replace("<>", config_file.get_value(server_info, "Port")); - } - - bool use_private_key = true; - string private_key_file = ""; - try { - private_key_file = config_file.get_value(server_info, "PrivateKey"); - use_private_key = FileUtils.test(private_key_file, FileTest.EXISTS); - } catch (GLib.KeyFileError e) { - use_private_key = false; - } - - if (use_private_key) { - ssh_script_content = ssh_script_content.replace("<>", " -i %s".printf(private_key_file)); - ssh_script_content = ssh_script_content.replace("<>", ""); - ssh_script_content = ssh_script_content.replace("<>", "yes"); - } else { - ssh_script_content = ssh_script_content.replace("<>", ""); - string escaped_password = new GLib.Regex("([\"$\\\\])").replace(password, -1, 0, "\\\\\\1"); - ssh_script_content = ssh_script_content.replace("<>", escaped_password); - ssh_script_content = ssh_script_content.replace("<>", "no"); - } - - var path = config_file.get_string(server_info, "Path"); - var command = config_file.get_string(server_info, "Command"); - - string remote_command = "echo %s &&".printf(_("Welcome to Deepin Terminal, please make sure that rz and sz commands have been installed in the server before right clicking to upload and download files.")); - if (path.strip() != "") { - remote_command += "cd %s && ".printf(path); - } - if (command.strip() != "") { - remote_command += "%s && ".printf(command); - } - - ssh_script_content = ssh_script_content.replace("<>", remote_command); - - // Create temporary expect script file, and the file will - // be delete by itself. - FileIOStream iostream; - var tmpfile = File.new_tmp("deepin-terminal-XXXXXX", out iostream); - OutputStream ostream = iostream.output_stream; - DataOutputStream dos = new DataOutputStream(ostream); - dos.put_string(ssh_script_content); - - // Enable for debug. - // print("%s\n", ssh_script_content); - - // Set term server info. - term.set_encoding(config_file.get_value(server_info, "Encode")); - - remote_server_title = config_file.get_value(server_info, "Name"); - - var backspace_binding = config_file.get_value(server_info, "Backspace"); - if (backspace_binding == "auto") { - term.set_backspace_binding(Vte.EraseBinding.AUTO); - } else if (backspace_binding == "escape-sequence") { - term.set_backspace_binding(Vte.EraseBinding.DELETE_SEQUENCE); - } else if (backspace_binding == "ascii-del") { - term.set_backspace_binding(Vte.EraseBinding.ASCII_DELETE); - } else if (backspace_binding == "control-h") { - term.set_backspace_binding(Vte.EraseBinding.ASCII_BACKSPACE); - } else if (backspace_binding == "tty") { - term.set_backspace_binding(Vte.EraseBinding.TTY); - } - - var del_binding = config_file.get_value(server_info, "Del"); - if (del_binding == "auto") { - term.set_delete_binding(Vte.EraseBinding.AUTO); - } else if (del_binding == "escape-sequence") { - term.set_delete_binding(Vte.EraseBinding.DELETE_SEQUENCE); - } else if (del_binding == "ascii-del") { - term.set_delete_binding(Vte.EraseBinding.ASCII_DELETE); - } else if (del_binding == "control-h") { - term.set_delete_binding(Vte.EraseBinding.ASCII_BACKSPACE); - } else if (del_binding == "tty") { - term.set_delete_binding(Vte.EraseBinding.TTY); - } - - if (term != null) { - string login_command = "expect -f " + tmpfile.get_path() + "\n"; - expect_file_path = tmpfile.get_path(); - term.feed_child(login_command.to_utf8()); - } - } catch (Error e) { - stderr.printf("login_server: %s\n", e.message); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/text_button.vala deepin-terminal-5.4.13/widget/text_button.vala --- deepin-terminal-5.0.0+ds1/widget/text_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/text_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class TextButton : Widgets.ClickEventBox { - public bool is_hover = false; - public Gdk.RGBA text_hover_color; - public Gdk.RGBA text_normal_color; - public Gdk.RGBA text_press_color; - public int button_text_size = 10; - public int height = 30; - public string button_text; - - public TextButton(string text, string normal_color_string, string hover_color_string, string press_color_string) { - set_size_request(-1, height); - - button_text = text; - - text_normal_color = Utils.hex_to_rgba(normal_color_string); - text_hover_color = Utils.hex_to_rgba(hover_color_string); - text_press_color = Utils.hex_to_rgba(press_color_string); - - add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - visible_window = false; - - enter_notify_event.connect((w, e) => { - var display = Gdk.Display.get_default(); - get_window().set_cursor(new Gdk.Cursor.for_display(display, Gdk.CursorType.HAND1)); - - is_hover = true; - queue_draw(); - - return false; - }); - leave_notify_event.connect((w, e) => { - get_window().set_cursor(null); - - is_hover = false; - queue_draw(); - - return false; - }); - - button_press_event.connect((w, e) => { - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - clicked.connect((w, e) => { - get_window().set_cursor(null); - }); - - draw.connect(on_draw); - } - - public bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - if (is_hover) { - if (is_press) { - Utils.set_context_color(cr, text_press_color); - Draw.draw_text(cr, button_text, 0, 0, rect.width, rect.height, button_text_size, Pango.Alignment.CENTER); - } else { - Utils.set_context_color(cr, text_hover_color); - Draw.draw_text(cr, button_text, 0, 0, rect.width, rect.height, button_text_size, Pango.Alignment.CENTER); - } - } else { - Utils.set_context_color(cr, text_normal_color); - Draw.draw_text(cr, button_text, 0, 0, rect.width, rect.height, button_text_size, Pango.Alignment.CENTER); - } - - return true; - } - } - - public TextButton create_link_button(string text) { - return new TextButton(text, "#0082FA", "#16B8FF", "#0060B9"); - } - - public TextButton create_delete_button(string text) { - return new TextButton(text, "#FF5A5A", "#FF142D", "#AF0000"); - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/theme_button.vala deepin-terminal-5.4.13/widget/theme_button.vala --- deepin-terminal-5.0.0+ds1/widget/theme_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/theme_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,219 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Widgets; - -namespace Widgets { - public class ThemeButton : Gtk.EventBox { - public Cairo.ImageSurface active_theme_border_surface; - public Cairo.ImageSurface dark_theme_border_surface; - public Cairo.ImageSurface light_theme_border_surface; - public Gdk.RGBA background_color; - public Gdk.RGBA prompt_color_host; - public Gdk.RGBA prompt_color_path; - public Gdk.RGBA foreground_color; - public KeyFile theme_file; - public bool is_active = false; - public bool is_light_color; - public int background_padding = 2; - public int border_padding = 1; - public int button_radius = 5; - public int content_font_size = 11; - public int content_padding_x = 14; - public int content_padding_y = 25; - public int title_font_size = 11; - public int title_padding_x = 14; - public int title_padding_y = 6; - public string theme_name; - - public ThemeButton(string name) { - theme_name = name; - - try { - theme_file = new KeyFile(); - theme_file.load_from_file(Utils.get_theme_path(theme_name), KeyFileFlags.NONE); - background_color = Utils.hex_to_rgba(theme_file.get_string("theme", "background").strip()); - is_light_color = Utils.is_light_color(theme_file.get_string("theme", "background").strip()); - - background_color.alpha = 0.8; - foreground_color = Utils.hex_to_rgba(theme_file.get_string("theme", "foreground").strip()); - prompt_color_host = Utils.hex_to_rgba(theme_file.get_string("theme", "color_11").strip()); - prompt_color_path = Utils.hex_to_rgba(theme_file.get_string("theme", "color_13").strip()); - - dark_theme_border_surface = Utils.create_image_surface("dark_theme_border.svg"); - light_theme_border_surface = Utils.create_image_surface("light_theme_border.svg"); - active_theme_border_surface = Utils.create_image_surface("active_theme_border.svg"); - } catch (Error e) { - print("ThemeButton: %s\n", e.message); - } - - visible_window = false; - - set_size_request(Constant.THEME_BUTTON_WIDTH, Constant.THEME_BUTTON_HEIGHT); - margin_start = (Constant.THEME_SLIDER_WIDTH - Constant.THEME_BUTTON_WIDTH) / 2; - margin_end = (Constant.THEME_SLIDER_WIDTH - Constant.THEME_BUTTON_WIDTH) / 2; - - draw.connect(on_draw); - } - - public void active() { - is_active = true; - - queue_draw(); - } - - public void inactive() { - is_active = false; - - queue_draw(); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - Gtk.Allocation rect; - widget.get_allocation(out rect); - - int clip_width = rect.width - background_padding * 2; - int clip_height = rect.height - background_padding * 2; - - cr.save(); - // Clip round rectangle when DPI > 1, for perfect radius effect. - if (get_scale_factor() > 1) { - Draw.clip_rounded_rectangle( - cr, - background_padding, - background_padding, - clip_width, - clip_height, - button_radius / get_scale_factor() + 1); - } - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, background_color.alpha); - Draw.fill_rounded_rectangle( - cr, - background_padding, - background_padding, - clip_width, - clip_height, - button_radius / get_scale_factor()); - cr.restore(); - - string prompt_host = "dde@linux:", prompt_path = "~/Theme"; - - Draw.set_context_source_color(cr, prompt_color_host); - Draw.draw_text(cr, prompt_host, title_padding_x, title_padding_y, rect.width, rect.height, title_font_size, Pango.Alignment.LEFT, "top"); - int prompt_host_width = Draw.get_text_render_width(cr, prompt_host, clip_width, clip_height, title_font_size); - - Draw.set_context_source_color(cr, prompt_color_path); - Draw.draw_text(cr, prompt_path, title_padding_x + prompt_host_width, title_padding_y, rect.width, rect.height, title_font_size, Pango.Alignment.LEFT, "top"); - int prompt_host_n_path_width = Draw.get_text_render_width(cr, prompt_path, clip_width, clip_height, title_font_size) + prompt_host_width; - - Draw.set_context_source_color(cr, foreground_color); - Draw.draw_text(cr, "$ _", title_padding_x + prompt_host_n_path_width, title_padding_y, rect.width, rect.height, title_font_size, Pango.Alignment.LEFT, "top"); - - Draw.set_context_source_color(cr, foreground_color); - Draw.draw_text(cr, theme_name, content_padding_x, content_padding_y, rect.width, rect.height, content_font_size, Pango.Alignment.LEFT, "top"); - - if (is_active) { - Draw.draw_surface(cr, active_theme_border_surface); - } else if (is_light_color) { - Draw.draw_surface(cr, light_theme_border_surface, border_padding, border_padding); - } else { - Draw.draw_surface(cr, dark_theme_border_surface, border_padding, border_padding); - } - - return true; - } - } - - public class ThemeList : Gtk.VBox { - public int theme_button_padding = Constant.THEME_BUTTON_PADDING; - public HashMap theme_button_map; - public ThemeButton? active_theme_button = null; - - public signal void active_theme(string theme_name); - - public ThemeList(string default_theme) { - theme_button_map = new HashMap(); - - var theme_names = Utils.list_files(Utils.get_theme_dir()); - var additional_theme_names = Utils.list_files(Utils.get_additional_theme_dir()); - theme_names.add_all(additional_theme_names); - theme_names.sort((CompareDataFunc) compare_color_brightness); - foreach (string theme_name in theme_names) { - var button = new Widgets.ThemeButton(theme_name); - pack_start(button, false, false, theme_button_padding); - - button.button_press_event.connect((w, e) => { - if (Utils.is_left_button(e)) { - active_button(theme_name); - active_theme(theme_name); - } - - return false; - }); - - theme_button_map.set(theme_name, button); - } - - active_button(default_theme); - } - - public static int compare_color_brightness(string a, string b) { - try { - var a_theme_file = new KeyFile(); - a_theme_file.load_from_file(Utils.get_theme_path((string) a), KeyFileFlags.NONE); - var a_background_color = Utils.get_color_brightness(a_theme_file.get_string("theme", "background").strip()); - - var b_theme_file = new KeyFile(); - b_theme_file.load_from_file(Utils.get_theme_path((string) b), KeyFileFlags.NONE); - var b_background_color = Utils.get_color_brightness(b_theme_file.get_string("theme", "background").strip()); - - if (a_background_color > b_background_color) { - return 1; - } - - if (a_background_color == b_background_color) { - return 0; - } - } catch (Error e) { - print("compare_color_brightness: %s\n", e.message); - } - - return -1; - } - - public void active_button(string theme_name) { - if (active_theme_button != null) { - active_theme_button.inactive(); - } - - if (theme_button_map.has_key(theme_name)) { - active_theme_button = theme_button_map.get(theme_name); - } else { - active_theme_button = theme_button_map.get("deepin"); - } - active_theme_button.active(); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/theme_panel.vala deepin-terminal-5.4.13/widget/theme_panel.vala --- deepin-terminal-5.0.0+ds1/widget/theme_panel.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/theme_panel.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Utils; -using Widgets; - -namespace Widgets { - public class ThemePanel : Gtk.HBox { - public Widgets.ConfigWindow parent_window; - public Widgets.Switcher switcher; - public WorkspaceManager workspace_manager; - public Workspace workspace; - public Gdk.RGBA background_color; - public Gdk.RGBA line_dark_color; - public Gdk.RGBA line_light_color; - public Gtk.Box home_page_box; - public Gtk.ScrolledWindow scrolledwindow; - public Gtk.Widget focus_widget; - public KeyFile config_file; - public int back_button_margin_left = 8; - public int back_button_margin_top = 6; - public int split_line_margin_left = 1; - public int theme_button_padding = 5; - public int theme_list_margin_bottom = 5; - public int theme_list_margin_top = 5; - public int width = Constant.THEME_SLIDER_WIDTH; - - public delegate void UpdatePageAfterEdit(); - - public ThemePanel(Workspace space, WorkspaceManager manager) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - workspace = space; - workspace_manager = manager; - - config_file = new KeyFile(); - - line_dark_color = Utils.hex_to_rgba("#ffffff", 0.1); - line_light_color = Utils.hex_to_rgba("#000000", 0.1); - - focus_widget = ((Gtk.Window) workspace.get_toplevel()).get_focus(); - parent_window = (Widgets.ConfigWindow) workspace.get_toplevel(); - - switcher = new Widgets.Switcher(width); - - home_page_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - set_size_request(width, -1); - home_page_box.set_size_request(width, -1); - - pack_start(switcher, true, true, 0); - - show_home_page(); - - draw.connect(on_draw); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - - Gtk.Allocation rect; - widget.get_allocation(out rect); - - try { - background_color = Utils.hex_to_rgba(parent_window.config.config_file.get_string("theme", "background")); - } catch (Error e) { - print("ThemePanel init: %s\n", e.message); - } - cr.set_source_rgba(background_color.red, background_color.green, background_color.blue, 0.8); - Draw.draw_rectangle(cr, 1, 0, rect.width - 1, rect.height); - - if (is_light_theme) { - Utils.set_context_color(cr, line_light_color); - } else { - Utils.set_context_color(cr, line_dark_color); - } - Draw.draw_rectangle(cr, 0, 0, 1, rect.height); - - return false; - } - - public void show_home_page(Gtk.Widget? start_widget=null) { - try { - scrolledwindow = new ScrolledWindow(null, null); - scrolledwindow.get_style_context().add_class("scrolledwindow"); - scrolledwindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); - scrolledwindow.set_shadow_type(Gtk.ShadowType.NONE); - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - home_page_box.pack_start(scrolledwindow, true, true, 0); - - realize.connect((w) => { - init_scrollbar(); - }); - - var theme_name = parent_window.config.config_file.get_string("general", "theme"); - var theme_list = new ThemeList(theme_name); - theme_list.margin_top = theme_list_margin_top; - theme_list.margin_bottom = theme_list_margin_bottom; - theme_list.active_theme.connect((active_theme_name) => { - parent_window.config.set_theme(active_theme_name); - - init_scrollbar(); - - queue_draw(); - }); - - scrolledwindow.add(theme_list); - - switcher.add_to_left_box(home_page_box); - - show.connect((w) => { - GLib.Timeout.add(100, () => { - int widget_x, widget_y; - theme_list.active_theme_button.translate_coordinates(theme_list, 0, 0, out widget_x, out widget_y); - - Gtk.Allocation rect; - get_allocation(out rect); - - var adjust = scrolledwindow.get_vadjustment(); - adjust.set_value(widget_y - (rect.height - Constant.THEME_BUTTON_HEIGHT) / 2); - - return false; - }); - }); - - show_all(); - } catch (Error e) { - print("ThemePanel show_home_page: %s\n", e.message); - } - } - - public void init_scrollbar() { - scrolledwindow.get_vscrollbar().get_style_context().remove_class("light_scrollbar"); - scrolledwindow.get_vscrollbar().get_style_context().remove_class("dark_scrollbar"); - bool is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - if (is_light_theme) { - scrolledwindow.get_vscrollbar().get_style_context().add_class("light_scrollbar"); - } else { - scrolledwindow.get_vscrollbar().get_style_context().add_class("dark_scrollbar"); - } - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/titlebar.vala deepin-terminal-5.4.13/widget/titlebar.vala --- deepin-terminal-5.0.0+ds1/widget/titlebar.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/titlebar.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; - -namespace Widgets { - public class Titlebar : Gtk.Overlay { - public Widgets.WindowEventArea event_area; - public WindowButton close_button; - - public Titlebar() { - close_button = Widgets.create_close_button(); - - Box box = new Box(Gtk.Orientation.HORIZONTAL, 0); - box.pack_start(close_button, true, true, 0); - - event_area = new Widgets.WindowEventArea(this); - event_area.margin_end = Constant.CLOSE_BUTTON_WIDTH; - - add(box); - add_overlay(event_area); - - set_size_request(-1, Constant.TITLEBAR_HEIGHT); - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/window_button.vala deepin-terminal-5.4.13/widget/window_button.vala --- deepin-terminal-5.0.0+ds1/widget/window_button.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/window_button.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; -using Draw; -using Gtk; -using Utils; - -namespace Widgets { - public class WindowButton : Widgets.ClickEventBox { - public Cairo.ImageSurface hover_dark_surface; - public Cairo.ImageSurface hover_light_surface; - public Cairo.ImageSurface normal_dark_surface; - public Cairo.ImageSurface normal_light_surface; - public Cairo.ImageSurface press_dark_surface; - public Cairo.ImageSurface press_light_surface; - public bool is_hover = false; - public bool is_theme_button; - public int surface_y; - - public WindowButton(string image_path, bool theme_button=false, int width, int height) { - is_theme_button = theme_button; - - if (is_theme_button) { - normal_dark_surface = Utils.create_image_surface(image_path + "_dark_normal.svg"); - hover_dark_surface = Utils.create_image_surface(image_path + "_dark_hover.svg"); - press_dark_surface = Utils.create_image_surface(image_path + "_dark_press.svg"); - - normal_light_surface = Utils.create_image_surface(image_path + "_light_normal.svg"); - hover_light_surface = Utils.create_image_surface(image_path + "_light_hover.svg"); - press_light_surface = Utils.create_image_surface(image_path + "_light_press.svg"); - } else { - normal_dark_surface = Utils.create_image_surface(image_path + "_normal.svg"); - hover_dark_surface = Utils.create_image_surface(image_path + "_hover.svg"); - press_dark_surface = Utils.create_image_surface(image_path + "_press.svg"); - } - - set_size_request(width, height); - - surface_y = (height - normal_dark_surface.get_height() / get_scale_factor()) / 2; - - draw.connect(on_draw); - enter_notify_event.connect((w, e) => { - is_hover = true; - queue_draw(); - - // set cursor. - get_window().set_cursor(new Gdk.Cursor.for_display(Gdk.Display.get_default(), - Gdk.CursorType.HAND1)); - - return false; - }); - leave_notify_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - get_window().set_cursor(null); - - return false; - }); - button_press_event.connect((w, e) => { - queue_draw(); - - return false; - }); - button_release_event.connect((w, e) => { - is_hover = false; - queue_draw(); - - return false; - }); - } - - private bool on_draw(Gtk.Widget widget, Cairo.Context cr) { - bool is_light_theme = false; - var top_level = get_toplevel(); - if (top_level.get_type().is_a(typeof(Widgets.Dialog))) { - is_light_theme = ((Widgets.Dialog) top_level).transient_window.is_light_theme(); - } else { - is_light_theme = ((Widgets.ConfigWindow) get_toplevel()).is_light_theme(); - } - - if (is_hover) { - if (is_press) { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, press_light_surface, 0, surface_y); - } else { - Draw.draw_surface(cr, press_dark_surface, 0, surface_y); - } - } else { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, hover_light_surface, 0, surface_y); - } else { - Draw.draw_surface(cr, hover_dark_surface, 0, surface_y); - } - } - } else { - if (is_theme_button && is_light_theme) { - Draw.draw_surface(cr, normal_light_surface, 0, surface_y); - } else { - Draw.draw_surface(cr, normal_dark_surface, 0, surface_y); - } - } - - return true; - } - } - - public WindowButton create_close_button() { - var close_button = new WindowButton("titlebar_close", false, Constant.WINDOW_BUTTON_WIDHT + Constant.CLOSE_BUTTON_MARGIN_RIGHT, Constant.TITLEBAR_HEIGHT); - close_button.set_halign(Gtk.Align.END); - - return close_button; - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/window_event_area.vala deepin-terminal-5.4.13/widget/window_event_area.vala --- deepin-terminal-5.0.0+ds1/widget/window_event_area.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/window_event_area.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,208 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gtk; -using Widgets; -using XUtils; - -namespace Widgets { - public class WindowEventArea : Gtk.EventBox { - public FilterDoubleClick? filter_double_click_callback = null; - public Gtk.Container drawing_area; - public Gtk.Widget? child_before_leave; - public bool is_double_clicked = false; - public bool is_press = false; - public double press_x = 0; - public double press_y = 0; - public int double_clicked_max_delay = 150; - - public delegate bool FilterDoubleClick(int x, int y); - - public WindowEventArea(Gtk.Container area) { - drawing_area = area; - - visible_window = false; - - add_events(Gdk.EventMask.BUTTON_PRESS_MASK - | Gdk.EventMask.BUTTON_RELEASE_MASK - | Gdk.EventMask.POINTER_MOTION_MASK - | Gdk.EventMask.LEAVE_NOTIFY_MASK); - - leave_notify_event.connect((w, e) => { - if (child_before_leave != null) { - var e2 = e.copy(); - e2.crossing.window = child_before_leave.get_window(); - - child_before_leave.get_window().ref(); - ((Gdk.Event*) e2)->put(); - - child_before_leave = null; - } - - return false; - }); - - motion_notify_event.connect((w, e) => { - var child = get_child_at_pos(drawing_area, (int) e.x, (int) e.y); - child_before_leave = child; - - if (child != null) { - int x, y; - drawing_area.translate_coordinates(child, (int) e.x, (int) e.y, out x, out y); - - Gdk.EventMotion* event; - event = (Gdk.EventMotion) new Gdk.Event(Gdk.EventType.MOTION_NOTIFY); - event->window = child.get_window(); - event->send_event = 1; - event->time = e.time; - event->x = x; - event->y = y; - event->x_root = e.x_root; - event->y_root = e.y_root; - event->state = e.state; - event->is_hint = e.is_hint; - event->device = e.device; - event->axes = e.axes; - ((Gdk.Event*) event)->put(); - } - - return true; - }); - - button_press_event.connect((w, e) => { - is_press = true; - - e.device.get_position(null, out press_x, out press_y); - - GLib.Timeout.add(10, () => { - // Send 'move_window' event to xserver once find user first do drag. - if (is_press) { - int pointer_x, pointer_y; - e.device.get_position(null, out pointer_x, out pointer_y); - - if (pointer_x != press_x || pointer_y != press_y) { - pointer_x *= get_scale_factor(); - pointer_y *= get_scale_factor(); - move_window(this, pointer_x, pointer_y, (int) e.button); - return false; - } else { - return true; - } - } else { - return false; - } - }); - - - var child = get_child_at_pos(drawing_area, (int) e.x, (int) e.y); - if (child != null) { - int x, y; - drawing_area.translate_coordinates(child, (int) e.x, (int) e.y, out x, out y); - - Gdk.EventButton* event; - event = (Gdk.EventButton) new Gdk.Event(Gdk.EventType.BUTTON_PRESS); - event->window = child.get_window(); - event->send_event = 1; - event->time = e.time; - event->x = x; - event->y = y; - event->x_root = e.x_root; - event->y_root = e.y_root; - event->state = e.state; - event->device = e.device; - event->button = e.button; - ((Gdk.Event*) event)->put(); - } - - if (e.type == Gdk.EventType.BUTTON_PRESS) { - is_double_clicked = true; - - // Add timeout to avoid long-long-long time double clicked to cause toggle maximize action. - GLib.Timeout.add(double_clicked_max_delay, () => { - is_double_clicked = false; - - return false; - }); - } else if (e.type == Gdk.EventType.2BUTTON_PRESS) { - if (is_double_clicked && Utils.is_left_button(e)) { - if (filter_double_click_callback == null || !filter_double_click_callback((int) e.x, (int) e.y)) { - if (this.get_toplevel().get_type().is_a(typeof(Widgets.Window))) { - ((Widgets.Window) this.get_toplevel()).toggle_max(); - } - } - } - } - - return true; - }); - - button_release_event.connect((w, e) => { - is_press = false; - - var child = get_child_at_pos(drawing_area, (int) e.x, (int) e.y); - if (child != null) { - int x, y; - drawing_area.translate_coordinates(child, (int) e.x, (int) e.y, out x, out y); - - Gdk.EventButton* event; - event = (Gdk.EventButton) new Gdk.Event(Gdk.EventType.BUTTON_RELEASE); - event->window = child.get_window(); - event->send_event = 1; - event->time = e.time; - event->x = x; - event->y = y; - event->x_root = e.x_root; - event->y_root = e.y_root; - event->state = e.state; - event->device = e.device; - event->button = e.button; - ((Gdk.Event*) event)->put(); - } - - return true; - }); - } - - public Gtk.Widget? get_child_at_pos(Gtk.Container container, int x, int y) { - if (container.get_children().length() > 0) { - foreach (Gtk.Widget child in container.get_children()) { - Gtk.Allocation child_rect; - child.get_allocation(out child_rect); - - int child_x, child_y; - child.translate_coordinates(container, 0, 0, out child_x, out child_y); - - if (x >= child_x && x <= child_x + child_rect.width && y >= child_y && y <= child_y + child_rect.height) { - if (child.get_type().is_a(typeof(Gtk.Container))) { - return get_child_at_pos((Gtk.Container) child, x - child_x, y - child_y); - } else { - return child; - } - } - } - } - - return null; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/window.vala deepin-terminal-5.4.13/widget/window.vala --- deepin-terminal-5.0.0+ds1/widget/window.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/window.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,827 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Cairo; -using Config; -using Gtk; -using Utils; -using Wnck; -using XUtils; -using Widgets; - -namespace Widgets { - public class Window : Widgets.ConfigWindow { - public Gdk.RGBA top_line_dark_color; - public Gdk.RGBA top_line_light_color; - public Gtk.Box fullscreen_box; - public Gtk.Box spacing_box; - public bool draw_tabbar_line = true; - public double window_default_scale = 0.618; - public int window_frame_margin_bottom = 60; - public int window_frame_margin_end = 50; - public int window_frame_margin_start = 50; - public int window_frame_margin_top = 50; - public bool tabbar_at_the_bottom = false; - public int window_fullscreen_monitor_height = Constant.TITLEBAR_HEIGHT * 2; - public int window_fullscreen_monitor_timeout = 150; - public int window_fullscreen_response_height = 5; - public int window_height; - public int window_widget_margin_bottom = 2; - public int window_widget_margin_end = 2; - public int window_widget_margin_start = 2; - public int window_widget_margin_top = 1; - public int window_width; - - private Widgets.ResizeGrip resize_grip; - - public Window(string? window_mode) { - tabbar_at_the_bottom = config.config_file.get_boolean("advanced", "tabbar_at_the_bottom"); - transparent_window(); - init_window(); - - int monitor = config.get_terminal_monitor(); - Gdk.Rectangle rect; - screen.get_monitor_geometry(monitor, out rect); - - if (tabbar_at_the_bottom) - window_fullscreen_monitor_height = rect.height - window_fullscreen_monitor_height; - - Gdk.Geometry geo = Gdk.Geometry(); - geo.min_width = rect.width / 3; - geo.min_height = rect.height / 3; - this.set_geometry_hints(null, geo, Gdk.WindowHints.MIN_SIZE); - - top_line_dark_color = Utils.hex_to_rgba("#000000", 0.2); - top_line_light_color = Utils.hex_to_rgba("#ffffff", 0.2); - - // Shadow around window will be hidden - if (Utils.is_tiling_wm()) { - window_frame_margin_top = 0; - window_frame_margin_bottom = 0; - window_frame_margin_start = 0; - window_frame_margin_end = 0; - } - - window_frame_box.margin_top = window_frame_margin_top; - window_frame_box.margin_bottom = window_frame_margin_bottom; - window_frame_box.margin_start = window_frame_margin_start; - window_frame_box.margin_end = window_frame_margin_end; - - window_widget_box.margin_top = 2; - window_widget_box.margin_bottom = 2; - window_widget_box.margin_start = 2; - window_widget_box.margin_end = 2; - - realize.connect((w) => { - try { - string window_state = ""; - string[] window_modes = {"normal", "maximize", "fullscreen"}; - if (window_mode != null && window_mode in window_modes) { - window_state = window_mode; - } else { - window_state = config.config_file.get_value("advanced", "use_on_starting"); - } - - if (window_state == "maximize") { - maximize(); - get_window().set_shadow_width(0, 0, 0, 0); - } else if (window_state == "fullscreen") { - toggle_fullscreen(); - get_window().set_shadow_width(0, 0, 0, 0); - } else { - if (screen_monitor.is_composited()) { - get_window().set_shadow_width(window_frame_margin_start, window_frame_margin_end, window_frame_margin_top, window_frame_margin_bottom); - } else { - get_window().set_shadow_width(0, 0, 0, 0); - } - } - - var width = config.config_file.get_integer("advanced", "window_width"); - var height = config.config_file.get_integer("advanced", "window_height"); - if (width == 0 || height == 0) { - if (rect.width == 0 || rect.height == 0) { - set_default_size(800, 600); - } else { - set_default_size((int) (rect.width * window_default_scale), (int) (rect.height * window_default_scale)); - } - } else { - set_default_size(width, height); - } - } catch (GLib.KeyFileError e) { - stdout.printf(e.message); - } - }); - - try{ - set_icon_from_file(Utils.get_image_path("deepin-terminal.svg")); - } catch(Error er) { - stdout.printf(er.message); - } - } - - public void transparent_window() { - set_app_paintable(true); // set_app_paintable is necessary step to make window transparent. - Gdk.Screen screen = Gdk.Screen.get_default(); - set_visual(screen.get_rgba_visual()); - } - - public void init_window() { - if (Utils.is_tiling_wm()) - set_decorated(true); - else - set_decorated(false); - - window_frame_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - window_widget_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - - add(window_frame_box); - window_frame_box.pack_start(window_widget_box, true, true, 0); - - focus_in_event.connect((w) => { - update_style(); - - return false; - }); - - focus_out_event.connect((w) => { - update_style(); - - return false; - }); - - configure_event.connect((w) => { - // Update input shape. - Cairo.RectangleInt rect; - get_window().get_frame_extents(out rect); - rect.x = 0; - rect.y = 0; - if (!window_is_fullscreen() && !window_is_max() && screen_monitor.is_composited()) { - rect.x = window_frame_box.margin_start - Constant.RESPONSE_RADIUS; - rect.y = window_frame_box.margin_top - Constant.RESPONSE_RADIUS; - rect.width += - window_frame_box.margin_start - window_frame_box.margin_end + Constant.RESPONSE_RADIUS * 2; - rect.height += - window_frame_box.margin_top - window_frame_box.margin_bottom + Constant.RESPONSE_RADIUS * 2; - } - - var shape = new Cairo.Region.rectangle(rect); - get_window().input_shape_combine_region(shape, 0, 0); - - // Update blur area. - update_blur_status(); - - return false; - }); - - window_state_event.connect((w, e) => { - update_frame(); - - return false; - }); - - window_frame_box.button_press_event.connect((w, e) => { - if (!screen_monitor.is_composited()) { - if (window_is_normal()) { - int pointer_x, pointer_y; - e.device.get_position(null, out pointer_x, out pointer_y); - - var cursor_type = get_frame_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { - pointer_x *= get_scale_factor(); - pointer_y *= get_scale_factor(); - resize_window(this, pointer_x, pointer_y, (int) e.button, cursor_type); - return true; - } - } - } - - return false; - }); - - button_press_event.connect((w, e) => { - if (window_is_normal()) { - int pointer_x, pointer_y; - e.device.get_position(null, out pointer_x, out pointer_y); - - var cursor_type = get_cursor_type(e.x_root, e.y_root); - if (cursor_type != null) { - pointer_x *= get_scale_factor(); - pointer_y *= get_scale_factor(); - resize_window(this, pointer_x, pointer_y, (int) e.button, cursor_type); - return true; - } - } - - return false; - }); - - draw.connect_after((w, cr) => { - draw_window_below(cr); - - draw_window_widgets(cr); - - draw_window_frame(cr); - - draw_window_above(cr); - - return true; - }); - - config.update.connect((w) => { - update_style(); - - update_blur_status(true); - }); - } - - public void update_style() { - clean_style(); - - bool is_light_theme = is_light_theme(); - - if (is_active) { - if (window_is_normal()) { - if (is_light_theme) { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_light_shadow_active"); - } else { - window_frame_box.get_style_context().add_class("window_light_noshadow_active"); - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_dark_shadow_active"); - } else { - window_frame_box.get_style_context().add_class("window_dark_noshadow_active"); - } - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_noradius_shadow_active"); - } else { - window_frame_box.get_style_context().add_class("window_noradius_noshadow_active"); - } - } - } else { - if (window_is_normal()) { - if (is_light_theme) { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_light_shadow_inactive"); - } else { - window_frame_box.get_style_context().add_class("window_light_noshadow_inactive"); - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_dark_shadow_inactive"); - } else { - window_frame_box.get_style_context().add_class("window_dark_noshadow_inactive"); - } - } - } else { - if (screen_monitor.is_composited()) { - window_frame_box.get_style_context().add_class("window_noradius_shadow_inactive"); - } else { - window_frame_box.get_style_context().add_class("window_noradius_noshadow_inactive"); - } - } - } - } - - public void clean_style() { - window_frame_box.get_style_context().remove_class("window_light_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_dark_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_light_shadow_active"); - window_frame_box.get_style_context().remove_class("window_dark_shadow_active"); - window_frame_box.get_style_context().remove_class("window_noradius_shadow_inactive"); - window_frame_box.get_style_context().remove_class("window_noradius_shadow_active"); - window_frame_box.get_style_context().remove_class("window_light_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_dark_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_light_noshadow_active"); - window_frame_box.get_style_context().remove_class("window_dark_noshadow_active"); - window_frame_box.get_style_context().remove_class("window_noradius_noshadow_inactive"); - window_frame_box.get_style_context().remove_class("window_noradius_noshadow_active"); - } - - public void update_blur_status(bool force_update=false) { - try { - int width, height; - get_size(out width, out height); - - if (width != resize_cache_width || height != resize_cache_height || force_update) { - resize_cache_width = width; - resize_cache_height = height; - - unowned X.Display xdisplay = (get_window().get_display() as Gdk.X11.Display).get_xdisplay(); - var xid = (int)((Gdk.X11.Window) get_window()).get_xid(); - var atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED = xdisplay.intern_atom("_NET_WM_DEEPIN_BLUR_REGION_ROUNDED", false); - var atom_KDE_NET_WM_BLUR_BEHIND_REGION = xdisplay.intern_atom("_KDE_NET_WM_BLUR_BEHIND_REGION", false); - - var blur_background = config.config_file.get_boolean("advanced", "blur_background"); - if (blur_background) { - Cairo.RectangleInt blur_rect; - get_window().get_frame_extents(out blur_rect); - blur_rect.x = 0; - blur_rect.y = 0; - - if (!window_is_fullscreen() && !window_is_max() && screen_monitor.is_composited()) { - blur_rect.x = window_frame_box.margin_start; - blur_rect.y = window_frame_box.margin_top; - blur_rect.width += - window_frame_box.margin_start - window_frame_box.margin_end; - blur_rect.height += - window_frame_box.margin_top - window_frame_box.margin_bottom; - } - - // blumia: not sure why it could just randomly happens, anyway we did this as a workaround. - if (blur_rect.width < 0) { - print("[!!!] blur_rect calc result error! blur_rect.width = %d which is negative!\n", blur_rect.width); - blur_rect.width = width - window_frame_box.get_margin_left() - window_frame_box.get_margin_right(); - blur_rect.height = height - window_frame_box.get_margin_top() - window_frame_box.get_margin_bottom(); - } - - blur_rect.x = (int) (blur_rect.x * Utils.get_default_monitor_scale()); - blur_rect.y = (int) (blur_rect.y * Utils.get_default_monitor_scale()); - blur_rect.width = (int) (blur_rect.width * Utils.get_default_monitor_scale()); - blur_rect.height = (int) (blur_rect.height * Utils.get_default_monitor_scale()); - - ulong[] data = {(ulong) blur_rect.x, (ulong) blur_rect.y, (ulong) blur_rect.width, (ulong) blur_rect.height, 8, 8}; - xdisplay.change_property( - xid, - atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED, - X.XA_CARDINAL, - 32, - X.PropMode.Replace, - (uchar[])data, - ((ulong[]) data).length); - - xdisplay.change_property( - xid, - atom_KDE_NET_WM_BLUR_BEHIND_REGION, - X.XA_CARDINAL, - 32, - X.PropMode.Replace, - (uchar[])data, - ((ulong[]) data).length - 2 - ); - } else { - xdisplay.delete_property(xid, atom_NET_WM_DEEPIN_BLUR_REGION_ROUNDED); - xdisplay.delete_property(xid, atom_KDE_NET_WM_BLUR_BEHIND_REGION); - } - } - } catch (GLib.KeyFileError e) { - print("%s\n", e.message); - } - } - - public void draw_window_widgets(Cairo.Context cr) { - Utils.propagate_draw(this, cr); - } - - public void add_widget(Gtk.Widget widget) { - window_widget_box.pack_start(widget, true, true, 0); - } - - public bool have_terminal_at_same_workspace() { - var screen = Wnck.Screen.get_default(); - screen.force_update(); - - var active_workspace = screen.get_active_workspace(); - foreach (Wnck.Window window in screen.get_windows()) { - var workspace = window.get_workspace(); - if (workspace != null && workspace.get_number() == active_workspace.get_number()) { - int pid = window.get_pid(); - string command = Utils.get_proc_file_content("/proc/%i/comm".printf(pid)).strip(); - if (command == "deepin-terminal") { - return true; - } - } - } - - return false; - } - - public override void toggle_fullscreen() { - if (window_is_fullscreen()) { - unfullscreen(); - } else { - fullscreen(); - } - } - - public override void update_frame() { - update_style(); - - if (Utils.is_tiling_wm() || window_is_fullscreen() || window_is_max()) { - window_widget_box.margin_top = 0; - window_widget_box.margin_bottom = 0; - window_widget_box.margin_start = 0; - window_widget_box.margin_end = 0; - } else if (window_is_tiled()) { - window_widget_box.margin_top = 1; - window_widget_box.margin_bottom = 1; - window_widget_box.margin_start = 1; - window_widget_box.margin_end = 1; - } else { - window_widget_box.margin_top = 2; - window_widget_box.margin_bottom = 2; - window_widget_box.margin_start = 2; - window_widget_box.margin_end = 2; - } - - if (!screen_monitor.is_composited() || window_is_fullscreen() || window_is_max()) { - window_frame_box.margin_top = 0; - window_frame_box.margin_bottom = 0; - window_frame_box.margin_start = 0; - window_frame_box.margin_end = 0; - - get_window().set_shadow_width(0, 0, 0, 0); - } else { - window_frame_box.margin_top = window_frame_margin_top; - window_frame_box.margin_bottom = window_frame_margin_bottom; - window_frame_box.margin_start = window_frame_margin_start; - window_frame_box.margin_end = window_frame_margin_end; - - get_window().set_shadow_width(window_frame_margin_start, window_frame_margin_end, window_frame_margin_top, window_frame_margin_bottom); - } - - if (Utils.is_tiling_wm() || screen_monitor.is_composited() || window_is_fullscreen() || window_is_max() || config.config_file.get_boolean("advanced", "always_hide_resize_grip")) { - resize_grip.hide(); - } else { - resize_grip.show(); - } - } - - public void toggle_max() { - if (window_is_max()) { - unmaximize(); - } else { - maximize(); - } - } - - public virtual void draw_window_below(Cairo.Context cr) { - - } - - public void draw_window_frame(Cairo.Context cr) { - Gtk.Allocation window_frame_rect; - window_frame_box.get_allocation(out window_frame_rect); - - int x = window_frame_box.margin_start; - int y = window_frame_box.margin_top; - int width = window_frame_rect.width; - int height = window_frame_rect.height; - Gdk.RGBA frame_color; - - try { - if (window_is_normal()) { - frame_color = Utils.hex_to_rgba(config.config_file.get_string("theme", "background")); - - if (screen_monitor.is_composited()) { - // Draw line *innner* of window frame. - cr.save(); - cr.set_source_rgba(frame_color.red, frame_color.green, frame_color.blue, config.config_file.get_double("general", "opacity")); - // Bottom. - Draw.draw_rectangle(cr, x + 2, y + height - 2, width - 4, 1); - // Left. - Draw.draw_rectangle(cr, x + 1, y + Constant.TITLEBAR_HEIGHT + 2, 1, height - Constant.TITLEBAR_HEIGHT - 4); - // Right.. - Draw.draw_rectangle(cr, x + width - 2, y + Constant.TITLEBAR_HEIGHT + 2, 1, height - Constant.TITLEBAR_HEIGHT - 4); - cr.restore(); - } else { - // Draw line *innner* of window frame. - cr.save(); - cr.set_source_rgba(frame_color.red, frame_color.green, frame_color.blue, config.config_file.get_double("general", "opacity")); - Draw.draw_rectangle(cr, x, y, width, height, false); - cr.restore(); - } - } - } catch (Error e) { - print("Window draw_window_frame: %s\n", e.message); - } - } - - public void draw_window_above(Cairo.Context cr) { - if (screen_monitor.is_composited()) { - Gtk.Allocation window_frame_rect; - window_frame_box.get_allocation(out window_frame_rect); - - int x = window_frame_box.margin_start; - int y = window_frame_box.margin_top; - int width = window_frame_rect.width; - int height = window_frame_rect.height; - Gdk.RGBA frame_color = Gdk.RGBA(); - - bool is_light_theme = is_light_theme(); - - try { - frame_color = Utils.hex_to_rgba(config.config_file.get_string("theme", "background")); - } catch (GLib.KeyFileError e) { - print("Window draw_window_above: %s\n", e.message); - } - - try { - if (window_is_fullscreen()) { - int titlebar_y = y; - if (get_scale_factor() > 1) { - titlebar_y -= 1; - } - - if (draw_tabbar_line) { - draw_titlebar_underline(cr, x, titlebar_y, width, 1); - if (tabbar_at_the_bottom) - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, titlebar_y + height - Constant.TITLEBAR_HEIGHT - 1); - else - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, titlebar_y + Constant.TITLEBAR_HEIGHT); - } - } else if (window_is_max() || window_is_tiled()) { - int titlebar_y = y; - if (get_scale_factor() > 1) { - titlebar_y -= 1; - } - - draw_titlebar_underline(cr, x + 1, titlebar_y, width - 2, 1); - if (tabbar_at_the_bottom) - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, titlebar_y + height - Constant.TITLEBAR_HEIGHT - 1); - else - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, titlebar_y + Constant.TITLEBAR_HEIGHT + 1); - } else { - // Draw line above at titlebar. - cr.set_source_rgba(frame_color.red, frame_color.green, frame_color.blue, config.config_file.get_double("general", "opacity")); - Draw.draw_rectangle(cr, x + 2, y + 1, width - 4, 1); - - // if (is_light_theme) { - // Utils.set_context_color(cr, top_line_light_color); - // } else { - // Utils.set_context_color(cr, top_line_dark_color); - // } - Draw.draw_rectangle(cr, x + 2, y + 1, width - 4, 1); - - cr.set_source_rgba(1, 1, 1, 0.0625 * config.config_file.get_double("general", "opacity")); // Draw top line at window. - Draw.draw_rectangle(cr, x + 2, y + 1, width - 4, 1); - - // Draw line around titlebar side. - cr.set_source_rgba(frame_color.red, frame_color.green, frame_color.blue, config.config_file.get_double("general", "opacity")); - // Left. - Draw.draw_rectangle(cr, x + 1, y + 2, 1, Constant.TITLEBAR_HEIGHT); - // Right. - Draw.draw_rectangle(cr, x + width - 2, y + 2, 1, Constant.TITLEBAR_HEIGHT); - - // if (is_light_theme) { - // Utils.set_context_color(cr, top_line_light_color); - // } else { - // Utils.set_context_color(cr, top_line_dark_color); - // } - - // Left. - Draw.draw_rectangle(cr, x + 1, y + 2, 1, Constant.TITLEBAR_HEIGHT); - // Right. - Draw.draw_rectangle(cr, x + width - 2, y + 2, 1, Constant.TITLEBAR_HEIGHT); - - int titlebar_y = y; - if (get_scale_factor() > 1) { - titlebar_y += 1; - } - - draw_titlebar_underline(cr, x + 1, titlebar_y, width - 2, 1); - if (tabbar_at_the_bottom) - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, y + height - Constant.TITLEBAR_HEIGHT - 1); - else - draw_active_tab_underline(cr, x + active_tab_underline_x - window_frame_box.margin_start, y + Constant.TITLEBAR_HEIGHT); - } - } catch (Error e) { - print("Window draw_window_above: %s\n", e.message); - } - } - } - - public void init_fullscreen_handler(Appbar appbar) { - fullscreen_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - spacing_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); - - spacing_box.set_size_request(-1, Constant.TITLEBAR_HEIGHT); - fullscreen_box.pack_start(spacing_box, false, false, 0); - - configure_event.connect((w) => { - if (window_is_fullscreen()) { - Utils.remove_all_children(fullscreen_box); - appbar.hide(); - appbar.hide_window_button(); - draw_tabbar_line = false; - } else { - Gtk.Widget? parent = spacing_box.get_parent(); - if (parent == null) { - fullscreen_box.pack_start(spacing_box, false, false, 0); - appbar.show_all(); - appbar.show_window_button(); - draw_tabbar_line = true; - } - } - - return false; - }); - - motion_notify_event.connect((w, e) => { - if (window_is_fullscreen()) { - var receiveEvents = tabbar_at_the_bottom? e.y_root > window_fullscreen_monitor_height : e.y_root < window_fullscreen_monitor_height; - if (receiveEvents) { - GLib.Timeout.add(window_fullscreen_monitor_timeout, () => { - int pointer_x, pointer_y; - Utils.get_pointer_position(out pointer_x, out pointer_y); - - var showAll = tabbar_at_the_bottom? pointer_y > window_fullscreen_monitor_height + Constant.TITLEBAR_HEIGHT : pointer_y < window_fullscreen_response_height; - var hideAll = tabbar_at_the_bottom? pointer_y < window_fullscreen_monitor_height + Constant.TITLEBAR_HEIGHT : pointer_y > Constant.TITLEBAR_HEIGHT; - if (showAll) { - appbar.show_all(); - draw_tabbar_line = true; - - redraw_window(); - } else if (hideAll) { - appbar.hide(); - draw_tabbar_line = false; - - redraw_window(); - } - - return false; - }); - } - } - - return false; - }); - } - - public void show_window(TerminalApp app, WorkspaceManager workspace_manager, Tabbar tabbar, bool has_start=false) { - Appbar appbar = new Appbar(app, this, tabbar, workspace_manager, has_start); - - if (tabbar_at_the_bottom) - appbar.set_valign(Gtk.Align.END); - else - appbar.set_valign(Gtk.Align.START); - appbar.close_window.connect((w) => { - quit(); - }); - appbar.quit_fullscreen.connect((w) => { - toggle_fullscreen(); - }); - - init(workspace_manager, tabbar); - init_fullscreen_handler(appbar); - - window_state_event.connect((w) => { - appbar.update_max_button(); - - return false; - }); - - if (!have_terminal_at_same_workspace()) { - set_position(Gtk.WindowPosition.CENTER); - } - - var overlay = new Gtk.Overlay(); - resize_grip = new Widgets.ResizeGrip(this); - top_box.pack_start(fullscreen_box, false, false, 0); - if (tabbar_at_the_bottom) { - box.pack_start(workspace_manager, true, true, 0); - box.pack_start(top_box, false, false, 0); - } - else { - box.pack_start(top_box, false, false, 0); - box.pack_start(workspace_manager, true, true, 0); - box.pack_start(resize_grip, false, false, 0); - } - - overlay.add(box); - overlay.add_overlay(appbar); - - add_widget(overlay); - show_all(); - } - - public override void window_save_before_quit() { - Cairo.RectangleInt rect; - get_window().get_frame_extents(out rect); - - if (window_is_normal()) { - config.load_config(); - config.config_file.set_integer("advanced", "window_width", rect.width); - config.config_file.set_integer("advanced", "window_height", rect.height); - config.save(); - } - } - - public override Gdk.CursorType? get_cursor_type(double x, double y) { - int window_x, window_y; - get_window().get_origin(out window_x, out window_y); - - int width, height; - get_size(out width, out height); - - var left_side_start = window_x + window_frame_margin_start - Constant.RESPONSE_RADIUS; - var left_side_end = window_x + window_frame_margin_start; - var right_side_start = window_x + width - window_frame_margin_end; - var right_side_end = window_x + width - window_frame_margin_end + Constant.RESPONSE_RADIUS; - var top_side_start = window_y + window_frame_margin_top - Constant.RESPONSE_RADIUS;; - var top_side_end = window_y + window_frame_margin_top; - var bottom_side_start = window_y + height - window_frame_margin_bottom; - var bottom_side_end = window_y + height - window_frame_margin_bottom + Constant.RESPONSE_RADIUS; - - if (x > left_side_start && x < left_side_end) { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_LEFT_CORNER; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_LEFT_CORNER; - } - } else if (x > right_side_start && x < right_side_end) { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_RIGHT_CORNER; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_RIGHT_CORNER; - } - } - - if (x > left_side_start && x < left_side_end) { - if (y > top_side_end && y < bottom_side_start) { - return Gdk.CursorType.LEFT_SIDE; - } - } else if (x > right_side_start && x < right_side_end) { - if (y > top_side_end && y < bottom_side_start) { - return Gdk.CursorType.RIGHT_SIDE; - } - } else { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_SIDE; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_SIDE; - } - } - - return null; - } - - public override Gdk.CursorType? get_frame_cursor_type(double x, double y) { - int window_x, window_y; - get_window().get_origin(out window_x, out window_y); - - int width, height; - get_size(out width, out height); - - var left_side_start = window_x; - var left_side_end = window_x + Constant.RESPONSE_RADIUS; - var right_side_start = window_x + width - Constant.RESPONSE_RADIUS; - var right_side_end = window_x + width; - var top_side_start = window_y; - var top_side_end = window_y + Constant.RESPONSE_RADIUS; - var bottom_side_start = window_y + height - Constant.RESPONSE_RADIUS; - var bottom_side_end = window_y + height; - - if (x > left_side_start && x < left_side_end) { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_LEFT_CORNER; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_LEFT_CORNER; - } - } else if (x > right_side_start && x < right_side_end) { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_RIGHT_CORNER; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_RIGHT_CORNER; - } - } - - if (x > left_side_start && x < left_side_end) { - if (y > top_side_end && y < bottom_side_start) { - return Gdk.CursorType.LEFT_SIDE; - } - } else if (x > right_side_start && x < right_side_end) { - if (y > top_side_end && y < bottom_side_start) { - return Gdk.CursorType.RIGHT_SIDE; - } - } else { - if (y > top_side_start && y < top_side_end) { - return Gdk.CursorType.TOP_SIDE; - } else if (y > bottom_side_start && y < bottom_side_end) { - return Gdk.CursorType.BOTTOM_SIDE; - } - } - - return null; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/workspace_manager.vala deepin-terminal-5.4.13/widget/workspace_manager.vala --- deepin-terminal-5.0.0+ds1/widget/workspace_manager.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/workspace_manager.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,168 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Gee; -using Gtk; -using Widgets; - -namespace Widgets { - public class WorkspaceManager : Gtk.Box { - private Widgets.Term? first_term; - private bool has_first_term_created; - public HashMap workspace_map; - public Tabbar tabbar; - public Workspace focus_workspace; - public int workspace_index; - - public WorkspaceManager(Tabbar t, string? work_directory) { - Intl.bindtextdomain(GETTEXT_PACKAGE, "/usr/share/locale"); - - tabbar = t; - - workspace_index = 0; - workspace_map = new HashMap(); - - has_first_term_created = false; - - new_workspace(work_directory); - } - - public void set_first_term(Widgets.Term term) { - // Set first terminal to make only first create tab terminal execute -e commands, - // all terminals created by user's new_tab action won't execute -e commands. - if (!has_first_term_created) { - first_term = term; - has_first_term_created = true; - } - } - - public bool is_first_term(Widgets.Term term) { - if (first_term == null) { - return true; - } else { - return first_term == term; - } - } - - public void pack_workspace(Workspace workspace) { - focus_workspace = workspace; - pack_start(workspace, true, true, 0); - - workspace.select_focus_terminal(); - } - - public void new_workspace_with_current_directory(bool remote_serve_action=false) { - Term focus_term = focus_workspace.get_focus_term(this); - new_workspace(focus_term.get_cwd(), remote_serve_action); - } - - public void new_workspace(string? work_directory, bool remote_serve_action=false) { - if (tabbar.allowed_add_tab || remote_serve_action) { - Utils.remove_all_children(this); - - workspace_index++; - - tabbar.add_tab("", workspace_index); - Widgets.Workspace workspace = new Widgets.Workspace(workspace_index, work_directory, this); - workspace_map.set(workspace_index, workspace); - workspace.change_title.connect((workspace, index, dir) => { - tabbar.rename_tab(index, dir); - }); - workspace.highlight_tab.connect((workspace, index) => { - tabbar.highlight_tab(index); - }); - workspace.exit.connect((workspace, index) => { - tabbar.close_current_tab(); - }); - - pack_workspace(workspace); - - tabbar.select_tab_with_id(workspace_index); - - show_all(); - } else { - var config_window = (Widgets.ConfigWindow) get_toplevel(); - if (!config_window.quake_mode) { - try { - GLib.AppInfo appinfo; - if (work_directory != null) { - appinfo = GLib.AppInfo.create_from_commandline("deepin-terminal --work-directory=%s".printf(work_directory), null, GLib.AppInfoCreateFlags.NONE); - } else { - appinfo = GLib.AppInfo.create_from_commandline("deepin-terminal", null, GLib.AppInfoCreateFlags.NONE); - } - appinfo.launch(null, null); - } catch (GLib.Error e) { - print("new_workspace: %s\n", e.message); - } - } - } - } - - public void switch_workspace_with_index(int index) { - if (index == 1) { - tabbar.select_first_tab(); - } else if (index == 9) { - tabbar.select_end_tab(); - } else if (index > 0 && index <= tabbar.tab_list.size) { - tabbar.select_nth_tab(index - 1); - } - } - - public void switch_workspace(int workspace_index) { - Utils.remove_all_children(this); - - var workspace = workspace_map.get(workspace_index); - pack_workspace(workspace); - - show_all(); - } - - public void remove_workspace(int index) { - workspace_map.get(index).destroy(); - workspace_map.unset(index); - - if (tabbar.tab_list.size == 0) { - var config_window = (Widgets.ConfigWindow) get_toplevel(); - config_window.quit(); - } else { - int workspace_index = tabbar.tab_list.get(tabbar.tab_index); - Utils.remove_all_children(this); - - var workspace = workspace_map.get(workspace_index); - pack_workspace(workspace); - - show_all(); - } - } - - public bool has_active_term() { - foreach (var workspace_entry in workspace_map.entries) { - if (workspace_entry.value.has_active_term()) { - return true; - } - } - - return false; - } - } -} diff -Nru deepin-terminal-5.0.0+ds1/widget/workspace.vala deepin-terminal-5.4.13/widget/workspace.vala --- deepin-terminal-5.0.0+ds1/widget/workspace.vala 2019-07-08 06:37:52.000000000 +0000 +++ deepin-terminal-5.4.13/widget/workspace.vala 1970-01-01 00:00:00.000000000 +0000 @@ -1,951 +0,0 @@ -/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*- - * -*- coding: utf-8 -*- - * - * Copyright (C) 2011 ~ 2018 Deepin, Inc. - * 2011 ~ 2018 Wang Yong - * - * Author: Wang Yong - * Maintainer: Wang Yong - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -using Animation; -using Gee; -using Gtk; -using Utils; -using Widgets; - -namespace Widgets { - public class Workspace : Gtk.Overlay { - public WorkspaceManager workspace_manager; - public AnimateTimer command_panel_hide_timer; - public AnimateTimer command_panel_show_timer; - public AnimateTimer encoding_panel_hide_timer; - public AnimateTimer encoding_panel_show_timer; - public AnimateTimer remote_panel_hide_timer; - public AnimateTimer remote_panel_show_timer; - public AnimateTimer theme_panel_hide_timer; - public AnimateTimer theme_panel_show_timer; - public ArrayList term_list; - public CommandPanel? command_panel; - public EncodingPanel? encoding_panel; - public RemotePanel? remote_panel; - public SearchPanel? search_panel; - public Term? focus_terminal; - public Term? terminal_before_popup; - public ThemePanel? theme_panel; - public HighlightFrame? highlight_frame; - public int PANED_HANDLE_SIZE = 1; - public int hide_slider_interval = 500; - public int hide_slider_start_x; - public int index; - public int show_slider_interval = 500; - public int show_slider_start_x; - public uint? highlight_frame_timeout_source_id = null; - - private enum WorkspaceResizeKey { - LEFT, RIGHT, UP, DOWN - } - - public signal void change_title(int index, string dir); - public signal void exit(int index); - public signal void highlight_tab(int index); - - public Workspace(int workspace_index, string? work_directory, WorkspaceManager manager) { - index = workspace_index; - term_list = new ArrayList(); - workspace_manager = manager; - - remote_panel_show_timer = new AnimateTimer(AnimateTimer.ease_out_quint, show_slider_interval); - remote_panel_show_timer.animate.connect(remote_panel_show_animate); - - remote_panel_hide_timer = new AnimateTimer(AnimateTimer.ease_in_quint, hide_slider_interval); - remote_panel_hide_timer.animate.connect(remote_panel_hide_animate); - - theme_panel_show_timer = new AnimateTimer(AnimateTimer.ease_out_quint, show_slider_interval); - theme_panel_show_timer.animate.connect(theme_panel_show_animate); - - theme_panel_hide_timer = new AnimateTimer(AnimateTimer.ease_in_quint, hide_slider_interval); - theme_panel_hide_timer.animate.connect(theme_panel_hide_animate); - - encoding_panel_show_timer = new AnimateTimer(AnimateTimer.ease_out_quint, show_slider_interval); - encoding_panel_show_timer.animate.connect(encoding_panel_show_animate); - - encoding_panel_hide_timer = new AnimateTimer(AnimateTimer.ease_in_quint, hide_slider_interval); - encoding_panel_hide_timer.animate.connect(encoding_panel_hide_animate); - - command_panel_show_timer = new AnimateTimer(AnimateTimer.ease_out_quint, show_slider_interval); - command_panel_show_timer.animate.connect(command_panel_show_animate); - - command_panel_hide_timer = new AnimateTimer(AnimateTimer.ease_in_quint, hide_slider_interval); - command_panel_hide_timer.animate.connect(command_panel_hide_animate); - - Term term = new_term(true, work_directory); - workspace_manager.set_first_term(term); - - add(term); - } - - public Term new_term(bool first_term, string? work_directory) { - Term term = new Widgets.Term(first_term, work_directory, workspace_manager); - term.change_title.connect((term, dir) => { - change_title(index, dir); - }); - term.highlight_tab.connect((term) => { - highlight_tab(index); - }); - term.exit.connect((term) => { - remove_all_panels(); - close_term(term); - }); - term.exit_with_bad_code.connect((w, status) => { - reset_term(status); - }); - term.term.button_press_event.connect((w, e) => { - remove_search_panel(); - hide_theme_panel(); - hide_remote_panel(); - hide_encoding_panel(); - hide_command_panel(); - - update_focus_terminal(term); - - return false; - }); - - term_list.add(term); - - return term; - } - - public void reset_term(int exit_status) { - Term focus_term = get_focus_term(this); - string term_dir = focus_term.get_cwd(); - - split_vertical(); - close_term(focus_term); - - GLib.Timeout.add(500, () => { - if (term_dir.length > 0) { - Term new_focus_term = get_focus_term(this); - string switch_command = "cd %s\n".printf(term_dir); - new_focus_term.term.feed_child(switch_command.to_utf8()); - } - - return false; - }); - - print("Reset terminal after got exit status: %i\n", exit_status); - } - - public bool has_active_term() { - foreach (Term term in term_list) { - if (term.has_foreground_process()) { - return true; - } - } - - return false; - } - - public void close_focus_term() { - Term focus_term = get_focus_term(this); - if (focus_term.has_foreground_process()) { - ConfirmDialog dialog = Widgets.create_running_confirm_dialog((Widgets.ConfigWindow) focus_term.get_toplevel()); - dialog.confirm.connect((d) => { - close_term(focus_term); - }); - } else { - close_term(focus_term); - } - } - - public void toggle_select_all() { - Term focus_term = get_focus_term(this); - focus_term.toggle_select_all(); - } - - public void close_other_terms() { - Term focus_term = get_focus_term(this); - - bool has_active_process = false; - foreach (Term term in term_list) { - if (term != focus_term) { - if (term.has_foreground_process()) { - has_active_process = true; - - break; - } - } - } - - if (has_active_process) { - ConfirmDialog dialog = Widgets.create_running_confirm_dialog((Widgets.ConfigWindow) focus_term.get_toplevel()); - dialog.confirm.connect((d) => { - close_term_except(focus_term); - }); - } else { - close_term_except(focus_term); - } - } - - public void close_term_except(Term except_term) { - // We need remove term from it's parent before remove all children from workspace. - Widget parent_widget = except_term.get_parent(); - ((Container) parent_widget).remove(except_term); - - // Destroy all other terminals, wow! ;) - foreach (Widget w in get_children()) { - w.destroy(); - } - - // Re-parent except terminal. - term_list = new ArrayList(); - term_list.add(except_term); - add(except_term); - } - - public void close_term(Term term) { - Container parent_widget = term.get_parent(); - parent_widget.remove(term); - term.destroy(); - term_list.remove(term); - - clean_unused_parent(parent_widget); - } - - public void clean_unused_parent(Gtk.Container container) { - if (container.get_children().length() == 0) { - if (container.get_type().is_a(typeof(Workspace))) { - exit(index); - } else { - Container parent_widget = container.get_parent(); - parent_widget.remove(container); - container.destroy(); - - clean_unused_parent(parent_widget); - } - } else { - if (container.get_type().is_a(typeof(Paned))) { - var first_child = container.get_children().nth_data(0); - if (first_child.get_type().is_a(typeof(Paned))) { - clean_unused_parent((Paned) first_child); - } else { - ((Term) first_child).focus_term(); - } - } - } - } - - public Term get_focus_term(Container container) { - Widget focus_child = container.get_focus_child(); - if (terminal_before_popup != null) { - return terminal_before_popup; - } else if (focus_child.get_type().is_a(typeof(Term))) { - return (Term) focus_child; - } else { - return get_focus_term((Container) focus_child); - } - } - - public void split_vertical() { - // Get current terminal's server info. - string? split_term_server_info = null; - Term focus_term = get_focus_term(this); - if (focus_term.server_info != null && focus_term.login_remote_server) { - split_term_server_info = focus_term.server_info; - } - - // Split terminal. - split(Gtk.Orientation.HORIZONTAL); - update_focus_terminal(get_focus_term(this)); - - // Login server in timeout callback, otherwise login action can't execute. - if (split_term_server_info != null) { - GLib.Timeout.add(50, () => { - get_focus_term(this).login_server(split_term_server_info); - - return false; - }); - } - } - - public void split_horizontal() { - // Get current terminal's server info. - string? split_term_server_info = null; - Term focus_term = get_focus_term(this); - if (focus_term.server_info != null && focus_term.login_remote_server) { - split_term_server_info = focus_term.server_info; - } - - // Split terminal. - split(Gtk.Orientation.VERTICAL); - update_focus_terminal(get_focus_term(this)); - - // Login server in timeout callback, otherwise login action can't execute. - if (split_term_server_info != null) { - GLib.Timeout.add(50, () => { - get_focus_term(this).login_server(split_term_server_info); - - return false; - }); - } - } - - public void split(Orientation orientation) { - Term focus_term = get_focus_term(this); - - // blumia: This fix is a little bit dirty. Here we set the value of `terminal_before_popup` everytime we call split(). - // Otherwish it will crash at get_focus_term(). Try comment the following line, open up a new terminal window, - // and press: Ctrl+Shfit+j > Ctrl+Shfit+q > Ctrl+Shfit+j > Alt+h > Ctrl+Shfit+j > (should crashed now) - terminal_before_popup = focus_term; - - Gtk.Allocation alloc; - focus_term.get_allocation(out alloc); - - Widget parent_widget = focus_term.get_parent(); - ((Container) parent_widget).remove(focus_term); - Paned paned = new Paned(orientation); - paned.draw.connect((w, cr) => { - var paned_widget = (Paned) w; - - Utils.propagate_draw(paned_widget, cr); - - Gtk.Allocation rect; - w.get_allocation(out rect); - - int pos = paned_widget.get_position(); - if (pos != 0 && paned_widget.get_child1() != null && paned_widget.get_child2() != null) { - cr.set_operator(Cairo.Operator.OVER); - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) w.get_toplevel(); - Gdk.RGBA paned_background_color; - try { - paned_background_color = Utils.hex_to_rgba( - parent_window.is_light_theme() ? "#bbbbbb" : "#111111", - parent_window.config.config_file.get_double("general", "opacity")); - Utils.set_context_color(cr, paned_background_color); - } catch (GLib.KeyFileError e) { - print("Workapce split: %s\n", e.message); - } - - if (orientation == Gtk.Orientation.HORIZONTAL) { - Draw.draw_rectangle(cr, pos, 0, 1, rect.height); - } else { - Draw.draw_rectangle(cr, 0, pos, rect.width, 1); - } - - cr.set_source_rgba(1, 1, 1, 0.1); - if (orientation == Gtk.Orientation.HORIZONTAL) { - Draw.draw_rectangle(cr, pos, 0, 1, rect.height); - } else { - Draw.draw_rectangle(cr, 0, pos, rect.width, 1); - } - } - - return true; - }); - - Term term = new_term(false, focus_term.get_cwd()); - paned.pack1(focus_term, true, false); - paned.pack2(term, true, false); - - if (orientation == Gtk.Orientation.HORIZONTAL) { - paned.set_position(alloc.width / 2); - } else { - paned.set_position(alloc.height / 2); - } - - if (parent_widget.get_type().is_a(typeof(Workspace))) { - ((Workspace) parent_widget).add(paned); - } else if (parent_widget.get_type().is_a(typeof(Paned))) { - if (focus_term.is_first_term) { - ((Paned) parent_widget).pack1(paned, true, false); - } else { - focus_term.is_first_term = true; - ((Paned) parent_widget).pack2(paned, true, false); - } - - } - - this.show_all(); - } - - public void select_left_window() { - select_horizontal_terminal(true); - - update_focus_terminal(get_focus_term(this)); - - highlight_select_window(); - } - - public void select_right_window() { - select_horizontal_terminal(false); - - update_focus_terminal(get_focus_term(this)); - - highlight_select_window(); - } - - public void select_up_window() { - select_vertical_terminal(true); - - update_focus_terminal(get_focus_term(this)); - - highlight_select_window(); - } - - public void select_down_window() { - select_vertical_terminal(false); - - update_focus_terminal(get_focus_term(this)); - - highlight_select_window(); - } - - public void highlight_select_window() { - try { - Widgets.ConfigWindow parent_window = (Widgets.ConfigWindow) this.get_toplevel(); - bool show_highlight_frame = parent_window.config.config_file.get_boolean("advanced", "show_highlight_frame"); - if (show_highlight_frame) { - // Get workspace allocation. - Gtk.Allocation rect; - this.get_allocation(out rect); - - // Get terminal allocation and coordinate. - Term focus_term = get_focus_term(this); - - int term_x, term_y; - focus_term.translate_coordinates(this, 0, 0, out term_x, out term_y); - Gtk.Allocation term_rect; - focus_term.get_allocation(out term_rect); - - // Remove temp highlight frame and timeout source id. - if (highlight_frame != null) { - remove(highlight_frame); - highlight_frame = null; - } - if (highlight_frame_timeout_source_id != null) { - GLib.Source.remove(highlight_frame_timeout_source_id); - highlight_frame_timeout_source_id = null; - } - - // Create new highlight frame. - highlight_frame = new HighlightFrame(); - highlight_frame.set_size_request(term_rect.width, term_rect.height); - highlight_frame.margin_start = term_x; - highlight_frame.margin_end = rect.width - term_x - term_rect.width; - highlight_frame.margin_top = term_y; - highlight_frame.margin_bottom = rect.height - term_y - term_rect.height; - add_overlay(highlight_frame); - show_all(); - - // Hide highlight frame when timeout finish. - highlight_frame_timeout_source_id = GLib.Timeout.add(300, () => { - if (highlight_frame != null) { - remove(highlight_frame); - highlight_frame = null; - } - - highlight_frame_timeout_source_id = null; - - return false; - }); - } - } catch (GLib.KeyFileError e) { - print("%s\n", e.message); - } - } - - public ArrayList find_intersects_horizontal_terminals(Gtk.Allocation rect, bool left=true) { - ArrayList intersects_terminals = new ArrayList(); - foreach (Term t in term_list) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t); - - if (alloc.y < rect.y + rect.height + PANED_HANDLE_SIZE && alloc.y + alloc.height + PANED_HANDLE_SIZE > rect.y) { - if (left) { - if (alloc.x + alloc.width + PANED_HANDLE_SIZE == rect.x) { - intersects_terminals.add(t); - } - } else { - if (alloc.x == rect.x + rect.width + PANED_HANDLE_SIZE) { - intersects_terminals.add(t); - } - } - } - } - - return intersects_terminals; - } - - public void select_horizontal_terminal(bool left=true) { - Term focus_term = get_focus_term(this); - - Gtk.Allocation rect = Utils.get_origin_allocation(focus_term); - int y = rect.y; - int h = rect.height; - - ArrayList intersects_terminals = find_intersects_horizontal_terminals(rect, left); - if (intersects_terminals.size > 0) { - ArrayList same_coordinate_terminals = new ArrayList(); - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t); - - if (alloc.y == y) { - same_coordinate_terminals.add(t); - } - } - - if (same_coordinate_terminals.size > 0) { - same_coordinate_terminals[0].focus_term(); - } else { - ArrayList bigger_match_terminals = new ArrayList(); - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t);; - - if (alloc.y < y && alloc.y + alloc.height >= y + h) { - bigger_match_terminals.add(t); - } - } - - if (bigger_match_terminals.size > 0) { - bigger_match_terminals[0].focus_term(); - } else { - Term biggest_intersectant_terminal = null; - int area = 0; - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t);; - - int term_area = alloc.height + h - (alloc.y - y).abs() - (alloc.y + alloc.height - y - h).abs() / 2; - if (term_area > area) { - biggest_intersectant_terminal = t; - } - } - - if (biggest_intersectant_terminal != null) { - biggest_intersectant_terminal.focus_term(); - } - } - } - } - } - - public ArrayList find_intersects_vertical_terminals(Gtk.Allocation rect, bool up=true) { - ArrayList intersects_terminals = new ArrayList(); - foreach (Term t in term_list) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t); - - if (alloc.x < rect.x + rect.width + PANED_HANDLE_SIZE && alloc.x + alloc.width + PANED_HANDLE_SIZE > rect.x) { - if (up) { - if (alloc.y + alloc.height + PANED_HANDLE_SIZE == rect.y) { - intersects_terminals.add(t); - } - } else { - if (alloc.y == rect.y + rect.height + PANED_HANDLE_SIZE) { - intersects_terminals.add(t); - } - } - } - } - - return intersects_terminals; - } - - public void select_vertical_terminal(bool up=true) { - Term focus_term = get_focus_term(this); - - Gtk.Allocation rect = Utils.get_origin_allocation(focus_term); - int x = rect.x; - int w = rect.width; - - ArrayList intersects_terminals = find_intersects_vertical_terminals(rect, up); - if (intersects_terminals.size > 0) { - ArrayList same_coordinate_terminals = new ArrayList(); - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t); - - if (alloc.x == x) { - same_coordinate_terminals.add(t); - } - } - - if (same_coordinate_terminals.size > 0) { - same_coordinate_terminals[0].focus_term(); - } else { - ArrayList bigger_match_terminals = new ArrayList(); - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t);; - - if (alloc.x < x && alloc.x + alloc.width >= x + w) { - bigger_match_terminals.add(t); - } - } - - if (bigger_match_terminals.size > 0) { - bigger_match_terminals[0].focus_term(); - } else { - Term biggest_intersectant_terminal = null; - int area = 0; - foreach (Term t in intersects_terminals) { - Gtk.Allocation alloc = Utils.get_origin_allocation(t);; - - int term_area = alloc.width + w - (alloc.x - x).abs() - (alloc.x + alloc.width - x - w).abs() / 2; - if (term_area > area) { - biggest_intersectant_terminal = t; - } - } - - if (biggest_intersectant_terminal != null) { - biggest_intersectant_terminal.focus_term(); - } - } - } - } - } - - public void search(string search_text="") { - remove_remote_panel(); - remove_theme_panel(); - remove_encoding_panel(); - remove_command_panel(); - - terminal_before_popup = get_focus_term(this); - if (search_panel == null && terminal_before_popup != null) { - - search_panel = new SearchPanel(((Widgets.ConfigWindow) get_toplevel()), terminal_before_popup, search_text); - search_panel.quit_search.connect((w) => { - remove_search_panel(); - }); - add_overlay(search_panel); - show_all(); - } - - search_panel.search_entry.grab_focus(); - } - - public void toggle_remote_panel(Workspace workspace) { - if (remote_panel == null) { - show_remote_panel(workspace); - } else { - hide_remote_panel(); - } - } - - public void toggle_command_panel(Workspace workspace) { - if (command_panel == null) { - show_command_panel(workspace); - } else { - hide_command_panel(); - } - } - - public void show_remote_panel(Workspace workspace) { - remove_search_panel(); - remove_theme_panel(); - remove_encoding_panel(); - remove_command_panel(); - - if (remote_panel == null) { - Gtk.Allocation rect; - get_allocation(out rect); - - remote_panel = new RemotePanel(workspace, workspace_manager); - remote_panel.set_size_request(Constant.SLIDER_WIDTH, rect.height); - add_overlay(remote_panel); - - show_all(); - - remote_panel.margin_left = rect.width; - show_slider_start_x = rect.width; - remote_panel_show_timer.reset(); - } - - terminal_before_popup = get_focus_term(this); - } - - public void show_command_panel(Workspace workspace) { - remove_search_panel(); - remove_theme_panel(); - remove_encoding_panel(); - remove_remote_panel(); - - if (command_panel == null) { - Gtk.Allocation rect; - get_allocation(out rect); - - command_panel = new CommandPanel(workspace, workspace_manager); - command_panel.set_size_request(Constant.SLIDER_WIDTH, rect.height); - add_overlay(command_panel); - - show_all(); - - command_panel.margin_left = rect.width; - show_slider_start_x = rect.width; - command_panel_show_timer.reset(); - } - - terminal_before_popup = get_focus_term(this); - } - - public void show_encoding_panel(Workspace workspace) { - remove_search_panel(); - remove_remote_panel(); - remove_theme_panel(); - remove_command_panel(); - - if (encoding_panel == null) { - Gtk.Allocation rect; - get_allocation(out rect); - - Term focus_term = get_focus_term(this); - encoding_panel = new EncodingPanel(workspace, workspace_manager, focus_term); - encoding_panel.set_size_request(Constant.ENCODING_SLIDER_WIDTH, rect.height); - add_overlay(encoding_panel); - - show_all(); - - encoding_panel.margin_left = rect.width; - show_slider_start_x = rect.width; - encoding_panel_show_timer.reset(); - } - - terminal_before_popup = get_focus_term(this); - } - - public void remote_panel_show_animate(double progress) { - remote_panel.margin_left = (int) (show_slider_start_x - Constant.SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - remote_panel_show_timer.stop(); - } - } - - public void remote_panel_hide_animate(double progress) { - remote_panel.margin_left = (int) (hide_slider_start_x + Constant.SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - remote_panel_hide_timer.stop(); - - remove_remote_panel(); - } - } - - public void show_theme_panel(Workspace workspace) { - remove_search_panel(); - remove_remote_panel(); - remove_encoding_panel(); - remove_command_panel(); - - if (theme_panel == null) { - Gtk.Allocation rect; - get_allocation(out rect); - - theme_panel = new ThemePanel(workspace, workspace_manager); - theme_panel.set_size_request(Constant.THEME_SLIDER_WIDTH, rect.height); - add_overlay(theme_panel); - - show_all(); - - theme_panel.margin_left = rect.width; - show_slider_start_x = rect.width; - theme_panel_show_timer.reset(); - } - - terminal_before_popup = get_focus_term(this); - } - - public void theme_panel_show_animate(double progress) { - theme_panel.margin_left = (int) (show_slider_start_x - Constant.THEME_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - theme_panel_show_timer.stop(); - } - } - - public void theme_panel_hide_animate(double progress) { - theme_panel.margin_left = (int) (hide_slider_start_x + Constant.THEME_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - theme_panel_hide_timer.stop(); - - remove_theme_panel(); - } - } - - public void command_panel_show_animate(double progress) { - command_panel.margin_left = (int) (show_slider_start_x - Constant.COMMAND_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - command_panel_show_timer.stop(); - } - } - - public void command_panel_hide_animate(double progress) { - command_panel.margin_left = (int) (hide_slider_start_x + Constant.COMMAND_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - command_panel_hide_timer.stop(); - - remove_command_panel(); - } - } - - public void encoding_panel_show_animate(double progress) { - encoding_panel.margin_left = (int) (show_slider_start_x - Constant.ENCODING_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - encoding_panel_show_timer.stop(); - } - } - - public void encoding_panel_hide_animate(double progress) { - encoding_panel.margin_left = (int) (hide_slider_start_x + Constant.ENCODING_SLIDER_WIDTH * progress); - - if (progress >= 1.0) { - encoding_panel_hide_timer.stop(); - - remove_encoding_panel(); - } - } - - public void update_focus_terminal(Term term) { - focus_terminal = term; - } - - public void select_focus_terminal() { - if (focus_terminal != null) { - focus_terminal.focus_term(); - } - } - - private void resize_workspace(Term term, WorkspaceResizeKey key) { - Paned paned = (Paned) term.get_parent(); - - // Trying to find needed paned widget with correct orientation. So for left/right keys paned should have horizontal orientation - var correct_paned_found = is_paned_correct(paned, key); - - while (paned.get_parent().get_type().is_a(typeof(Paned)) && !correct_paned_found) { - paned = (Paned) paned.get_parent(); - correct_paned_found = is_paned_correct(paned, key); - } - - if (!correct_paned_found) return; - - int value = 0; - if (key == WorkspaceResizeKey.LEFT || key == WorkspaceResizeKey.UP) - value = -20; - else //key == WorkspaceResizeKey.RIGHT || key == WorkspaceResizeKey.DOWN - value = 20; - - int pos = paned.get_position() + value; - paned.set_position(pos); - } - - private bool is_paned_correct(Paned paned, WorkspaceResizeKey key) { - return ((key == WorkspaceResizeKey.LEFT || key == WorkspaceResizeKey.RIGHT) && paned.get_orientation() == Gtk.Orientation.HORIZONTAL) - || ((key == WorkspaceResizeKey.UP || key == WorkspaceResizeKey.DOWN) && paned.get_orientation() == Gtk.Orientation.VERTICAL); - } - - public void resize_workspace_left() { - resize_workspace (get_focus_term(this), WorkspaceResizeKey.LEFT); - } - - public void resize_workspace_right() { - resize_workspace (get_focus_term(this), WorkspaceResizeKey.RIGHT); - } - - public void resize_workspace_up() { - resize_workspace (get_focus_term(this), WorkspaceResizeKey.UP); - } - - public void resize_workspace_down() { - resize_workspace (get_focus_term(this), WorkspaceResizeKey.DOWN); - } - - public void remove_all_panels() { - remove_search_panel(); - remove_remote_panel(); - remove_theme_panel(); - remove_encoding_panel(); - remove_command_panel(); - } - - public void remove_theme_panel() { - remove_panel(theme_panel); - theme_panel = null; - } - - public void remove_command_panel() { - remove_panel(command_panel); - command_panel = null; - } - - public void remove_encoding_panel() { - remove_panel(encoding_panel); - encoding_panel = null; - } - - public void remove_search_panel() { - remove_panel(search_panel); - search_panel = null; - } - - public void remove_remote_panel() { - remove_panel(remote_panel); - remote_panel = null; - } - - private void remove_panel(Gtk.Widget? panel) { - if (panel != null) { - Gtk.Widget? panel_parent = panel.get_parent(); - if (panel_parent != null) { - ((Gtk.Container) panel_parent).remove(panel); - } - panel.destroy(); - } - - if (terminal_before_popup != null) { - terminal_before_popup.focus_term(); - terminal_before_popup.term.unselect_all(); - terminal_before_popup = null; - } - } - - public void hide_remote_panel() { - hide_panel(remote_panel, Constant.SLIDER_WIDTH, remote_panel_hide_timer); - } - - public void hide_encoding_panel() { - hide_panel(encoding_panel, Constant.ENCODING_SLIDER_WIDTH, encoding_panel_hide_timer); - } - - public void hide_theme_panel() { - hide_panel(theme_panel, Constant.THEME_SLIDER_WIDTH, theme_panel_hide_timer); - } - - public void hide_command_panel() { - hide_panel(command_panel, Constant.COMMAND_SLIDER_WIDTH, command_panel_hide_timer); - } - - private void hide_panel(Gtk.Widget? panel, int panel_width, AnimateTimer timer) { - if (panel != null) { - Gtk.Allocation rect; - get_allocation(out rect); - - hide_slider_start_x = rect.width - panel_width; - timer.reset(); - } - } - } -}