From 700b907056d6f2d16c08c47fc7a32514fbdcae9d Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sun, 6 Sep 2015 13:36:09 +0200 Subject: [PATCH] Adding upstream version 0.6.0+20150802. --- AUTHORS | 1 + CMakeLists.txt | 83 ++- INSTALL | 5 +- NEWS | 0 cmake/modules/FindQxt.cmake | 62 -- qterminal.appdata.xml | 42 ++ qterminal.desktop | 6 +- qterminal_drop.desktop | 14 +- src/bookmarkswidget.cpp | 59 +- src/bookmarkswidget.h | 18 + src/config.h | 10 +- src/fontdialog.cpp | 17 + src/fontdialog.h | 18 + src/forms/propertiesdialog.ui | 587 +++++++++--------- src/forms/qterminal.ui | 28 +- src/main.cpp | 4 +- src/mainwindow.cpp | 245 +++++--- src/mainwindow.h | 49 +- src/properties.cpp | 274 +++++--- src/properties.h | 39 +- src/propertiesdialog.cpp | 61 +- src/propertiesdialog.h | 18 + src/tabwidget.cpp | 48 +- src/tabwidget.h | 11 +- src/termwidget.cpp | 23 +- src/termwidget.h | 18 + src/termwidgetholder.cpp | 25 +- src/termwidgetholder.h | 18 + src/third-party/qxtglobalshortcut.cpp | 17 +- src/third-party/qxtglobalshortcut_p.h | 14 +- src/third-party/qxtglobalshortcut_win.cpp | 11 +- src/third-party/qxtglobalshortcut_x11.cpp | 45 +- src/translations/qterminal_cs.ts | 42 ++ src/translations/qterminal_de.ts | 524 ++++++++-------- src/translations/qterminal_es.ts | 36 +- src/translations/qterminal_et.ts | 42 ++ src/translations/qterminal_hu.ts | 643 +++++++++++++++++++ src/translations/qterminal_it.ts | 42 ++ src/translations/qterminal_ja.ts | 658 ++++++++++++++++++++ src/translations/qterminal_pt.ts | 643 +++++++++++++++++++ src/translations/qterminal_ru.ts | 721 ++++++++++++---------- src/translations/qterminal_tr.ts | 609 ++++++++++++++++++ src/translations/qterminal_zh_CN.ts | 658 ++++++++++++++++++++ 43 files changed, 5135 insertions(+), 1353 deletions(-) delete mode 100644 NEWS delete mode 100644 cmake/modules/FindQxt.cmake create mode 100644 qterminal.appdata.xml create mode 100644 src/translations/qterminal_hu.ts create mode 100644 src/translations/qterminal_ja.ts create mode 100644 src/translations/qterminal_pt.ts create mode 100644 src/translations/qterminal_tr.ts create mode 100644 src/translations/qterminal_zh_CN.ts diff --git a/AUTHORS b/AUTHORS index 2834917..67a3a69 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,3 +20,4 @@ Vladimir Kuznetsov Matteo Pasotti @kulti @pisculichi +Sérgio Marques diff --git a/CMakeLists.txt b/CMakeLists.txt index 16d0d44..ec5c826 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,41 +2,29 @@ cmake_minimum_required(VERSION 2.8) project(qterminal) -option(USE_SYSTEM_QXT "Use system Qxt Library for global shortcuts" ON) -option(USE_QT5 "Build using Qt5. Default OFF." OFF) +include(GNUInstallDirs) set(STR_VERSION "0.6.0") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") -if(USE_QT5 AND USE_SYSTEM_QXT) - message(FATAL_ERROR "Unable to use system qxt with qt5 now") -endif() - -if(USE_QT5) - find_package(Qt5Widgets REQUIRED) - find_package(Qt5LinguistTools REQUIRED) - find_package(QTermWidget5 REQUIRED) - message(STATUS "Qt5 version: ${Qt5Core_VERSION_STRING}") -else() - find_package(QTermWidget4 REQUIRED) +# we need qpa/qplatformnativeinterface.h for global shortcut +find_package(Qt5Gui REQUIRED) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5LinguistTools REQUIRED) +if(APPLE) +elseif(UNIX) + find_package(Qt5X11Extras REQUIRED) endif() +find_package(QTermWidget5 REQUIRED) +message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}") include(${QTERMWIDGET_USE_FILE}) -if(USE_SYSTEM_QXT) - message(STATUS "Using system Qxt...") - find_package(Qxt REQUIRED COMPONENTS QxtCore QxtGui) - if(NOT QXT_FOUND) - message(FATAL_ERROR "System Qxt not found. Install Qxt devel package or use -DUSE_SYSTEM_QXT=0 to build with internal copy of this library") - endif() - - set(QXT_INCLUDE_DIRS "${QXT_INCLUDE_PATH}/QxtCore" "${QXT_INCLUDE_PATH}/QxtGui") -else() - message(STATUS "Using bundled Qxt...") - set(QXT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/third-party") -endif() +# TODO remove Qxt +message(STATUS "Using bundled Qxt...") +set(QXT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/third-party") if(APPLE) @@ -45,9 +33,10 @@ if(APPLE) elseif(UNIX) find_package(X11 REQUIRED) message(STATUS "X11_X11_LIB: ${X11_X11_LIB}") -endif () +endif() add_definitions(-DSTR_VERSION=\"${STR_VERSION}\") +add_definitions(${Qt5X11Extras_DEFINITIONS}) set(EXE_NAME qterminal) @@ -104,24 +93,19 @@ set(QTERM_TS src/translations/qterminal_es.ts src/translations/qterminal_et.ts src/translations/qterminal_it.ts + src/translations/qterminal_pt.ts + src/translations/qterminal_hu.ts src/translations/qterminal_ru.ts + src/translations/qterminal_ja.ts + src/translations/qterminal_zh_CN.ts ) -if(USE_QT5) - qt5_wrap_ui( QTERM_UI ${QTERM_UI_SRC} ) - qt5_wrap_cpp( QTERM_MOC ${QTERM_MOC_SRC} ) - qt5_add_resources( QTERM_RCC ${QTERM_RCC_SRC} ) - qt5_add_translation( QTERM_QM ${QTERM_TS} ) - # bundled qt5 version of libqxt requires private headers (as for 2014-05-27) - include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -else() - qt4_wrap_ui(QTERM_UI ${QTERM_UI_SRC}) - qt4_wrap_cpp(QTERM_MOC ${QTERM_MOC_SRC}) - qt4_add_resources(QTERM_RCC ${QTERM_RCC_SRC}) - qt4_add_translation(QTERM_QM ${QTERM_TS}) -endif() +qt5_wrap_ui( QTERM_UI ${QTERM_UI_SRC} ) +qt5_wrap_cpp( QTERM_MOC ${QTERM_MOC_SRC} ) +qt5_add_resources( QTERM_RCC ${QTERM_RCC_SRC} ) +qt5_add_translation( QTERM_QM ${QTERM_TS} ) -include_directories ( +include_directories( "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}" @@ -156,7 +140,7 @@ if(APPLEBUNDLE) # use icon for app bundle to be visible in finder set(APPLE_BUNDLE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/macosx/qterminal.icns") else() - set(TRANSLATIONS_DIR "${CMAKE_INSTALL_PREFIX}/share/qterminal/translations") + set(TRANSLATIONS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/qterminal/translations") add_definitions(-DTRANSLATIONS_DIR=\"${TRANSLATIONS_DIR}\") endif() @@ -179,6 +163,8 @@ endif() if(APPLE) target_link_libraries(${EXE_NAME} ${CARBON_LIBRARY}) +elseif(UNIX) + target_link_libraries(${EXE_NAME} Qt5::X11Extras) endif() if(X11_FOUND) @@ -186,14 +172,21 @@ if(X11_FOUND) endif() -install(FILES qterminal.desktop DESTINATION share/applications) -install(FILES qterminal_drop.desktop DESTINATION share/applications) +install(FILES + qterminal.desktop + qterminal_drop.desktop + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" +) +install(FILES + qterminal.appdata.xml + DESTINATION "${CMAKE_INSTALL_DATADIR}/appdata" +) if(NOT APPLEBUNDLE) - install(TARGETS ${EXE_NAME} RUNTIME DESTINATION bin) + install(TARGETS ${EXE_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") install(FILES ${QTERM_QM} DESTINATION ${TRANSLATIONS_DIR}) - install(FILES src/icons/qterminal.png DESTINATION share/pixmaps) + install(FILES src/icons/qterminal.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps") else() message(STATUS "APPLEBUNDLE") diff --git a/INSTALL b/INSTALL index 6f3d270..c2654d9 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ Requirements: - Qt4 or Qt5 + Qt >= 5.2 cmake qtermwidget (https://github.com/qterminal/qtermwidget) @@ -8,8 +8,7 @@ Build: http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees 1) mkdir -p build && cd build - 2a) cmake path/to/source -DUSE_QT5=true # Qt 5 - 2b) cmake path/to/source # Qt 4 only + 2) cmake path/to/source 3) make 4) optional: make install diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29..0000000 diff --git a/cmake/modules/FindQxt.cmake b/cmake/modules/FindQxt.cmake deleted file mode 100644 index b50508f..0000000 --- a/cmake/modules/FindQxt.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# QXT_FOUND -# QXT_INCLUDE_PATH -# QXT_CORE_LIB -# QXT_GUI_LIB - -IF (WIN32) - FIND_PATH( QXT_INCLUDE_PATH QxtCore - $ENV{PROGRAMFILES}/QxtCore - PATHS/include/ - DOC "The directory where QxtCore resides") - FIND_LIBRARY( QXT_CORE_LIB - NAMES QxtCore - PATHS/lib - $ENV{PROGRAMFILES}/lib - DOC "The Qxt core library") - FIND_LIBRARY( QXT_GUI_LIB - NAMES QxtGui - PATHS/lib - $ENV{PROGRAMFILES}/lib - DOC "The Qxt gui library") -ELSE (WIN32) - FIND_PATH( QXT_INCLUDE_PATH QxtCore - /usr/include - /usr/include/qxt - /usr/local/include - /sw/include - /opt/local/include - DOC "The directory where QxtCore resides") - FIND_LIBRARY( QXT_CORE_LIB - NAMES QxtCore - PATHS - /usr/lib64 - /usr/lib - /usr/local/lib64 - /usr/local/lib - /sw/lib - /opt/local/lib - DOC "The Qxt core library") - FIND_LIBRARY( QXT_GUI_LIB - NAMES QxtGui - PATHS - /usr/lib64 - /usr/lib - /usr/local/lib64 - /usr/local/lib - /sw/lib - /opt/local/lib - DOC "The Qxt gui library") -ENDIF (WIN32) - -message(STATUS "Qxt includes: ${QXT_INCLUDE_PATH}") -message(STATUS "Qxt libs: ${QXT_CORE_LIB} ${QXT_GUI_LIB}") -IF (QXT_INCLUDE_PATH) - SET( QXT_FOUND 1 CACHE STRING "Set to 1 if QXT is found, 0 otherwise") -ELSE (QXT_INCLUDE_PATH) - SET( QXT_FOUND 0 CACHE STRING "Set to 1 if QXT is found, 0 otherwise") -ENDIF (QXT_INCLUDE_PATH) - -SET( QXT_LIBS ${QXT_CORE_LIB} ${QXT_GUI_LIB} ) - -MARK_AS_ADVANCED( QXT_FOUND ) - diff --git a/qterminal.appdata.xml b/qterminal.appdata.xml new file mode 100644 index 0000000..f289d02 --- /dev/null +++ b/qterminal.appdata.xml @@ -0,0 +1,42 @@ + + + qterminal.desktop + CC0-1.0 + GPL-2 + QTerminal + A lightweight multiplatform terminal emulator. + +

+ QTerminal is a lightweight multiplatform terminal emulator. +

+ Its main features are: +

+
    +
  • Multiple tabs
  • +
  • Layout terminals side-by-side
  • +
  • Dropdown mode
  • +
  • Text search
  • +
  • Configurable uster interface
  • +
  • Integration of system clipboard
  • +
+
+ + + http://worblehat.github.io/storage/qterminal_1.png + The default QTerminal window. + + + + + http://worblehat.github.io/storage/qterminal_2.png + QTerminal with multiple tabs, splitted terminals and highlighted text. + + + + + http://worblehat.github.io/storage/qterminal_3.png + Find bar and highlighted match. + + + https://github.com/qterminal/qterminal +
diff --git a/qterminal.desktop b/qterminal.desktop index 6b34a58..92f8511 100644 --- a/qterminal.desktop +++ b/qterminal.desktop @@ -4,8 +4,10 @@ Type=Application GenericName=Terminal emulator Comment=Terminal emulator -Comment[ru_RU]=Эмулятор терминала +Comment[de]=Befehlszeile verwenden Comment[fr]=Terminal +Comment[pt]=Emulador de terminal +Comment[ru_RU]=Эмулятор терминала Icon=utilities-terminal Exec=qterminal @@ -38,7 +40,7 @@ Name[nb]=Nedtrekksterminal Name[nds]=Utklapp-Konsool Name[nl]=Uitvouwbare terminalemulator Name[pa]=ਲਟਕਦਾ ਟਰਮੀਨਲ -Name[pt]=Terminal Deslizante +Name[pt]=Terminal suspenso Name[pt_BR]=Terminal suspenso Name[ro]=Terminal derulant Name[ru]=Выпадающий терминал diff --git a/qterminal_drop.desktop b/qterminal_drop.desktop index 3c0e182..baf3603 100644 --- a/qterminal_drop.desktop +++ b/qterminal_drop.desktop @@ -6,8 +6,10 @@ Categories=Qt;System;TerminalEmulator; Icon=qterminal Name=QTerminal drop down -GenericName=Drop-down Terminal +Name[de]=QTerminal herabhängend +Name[pt]=QTerminal suspenso +GenericName=Drop-down Terminal GenericName[bg]=Падащ терминал GenericName[ca]=Terminal desplegable GenericName[ca@valencia]=Terminal desplegable @@ -28,13 +30,10 @@ GenericName[nb]=Nedtrekksterminal GenericName[nds]=Utklapp-Konsool GenericName[nl]=Uitvouwbare terminalemulator GenericName[pa]=ਲਟਕਦਾ ਟਰਮੀਨਲ -GenericName[pt]=Terminal Deslizante +GenericName[pt]=Terminal suspenso GenericName[pt_BR]=Terminal suspenso GenericName[ro]=Terminal derulant - GenericName[ru]=Выпадающий терминал -Comment[ru]=Вападающий эмулятор терминала. - GenericName[sk]=Rozbaľovací terminál GenericName[sv]=Rullgardinsterminal GenericName[th]=เทอร์มินัลแบบหย่อนลง @@ -45,5 +44,6 @@ GenericName[zh_CN]=拉幕式终端 GenericName[zh_TW]=下拉式終端機 Comment=A drop-down terminal emulator. - - +Comment[de]=Ein Ausklapp-Terminalemulator. +Comment[pt]=Um emulador de terminal suspenso. +Comment[ru]=Вападающий эмулятор терминала. diff --git a/src/bookmarkswidget.cpp b/src/bookmarkswidget.cpp index e202922..5d22a87 100644 --- a/src/bookmarkswidget.cpp +++ b/src/bookmarkswidget.cpp @@ -1,10 +1,23 @@ -#if QT_VERSION < 0x050000 -#include -#else -#include -#endif +/*************************************************************************** + * Copyright (C) 2014 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ #include +#include #include "bookmarkswidget.h" #include "properties.h" @@ -96,39 +109,6 @@ public: BookmarkLocalGroupItem(AbstractBookmarkItem *parent) : BookmarkGroupItem(QObject::tr("Local Bookmarks"), parent) { -#if QT_VERSION < 0x050000 - QList locations; - locations << QDesktopServices::DesktopLocation - << QDesktopServices::DocumentsLocation - << QDesktopServices::TempLocation - << QDesktopServices::HomeLocation - << QDesktopServices::MusicLocation - << QDesktopServices::PicturesLocation; - - QString path; - QString name; - QString cmd; - QDir d; - - // standard $HOME subdirs - foreach (QDesktopServices::StandardLocation i, locations) - { - path = QDesktopServices::storageLocation(i); - if (!d.exists(path)) - { - //qDebug() << "Dir:" << path << "does not exist. Skipping."; - continue; - } - // it works in Qt5, not in Qt4 - // name = QDesktopServices::displayName(i); - name = path; - - path.replace(" ", "\\ "); - cmd = "cd " + path; - - addChild(new BookmarkCommandItem(name, cmd, this)); - } -#else QList locations; locations << QStandardPaths::DesktopLocation << QStandardPaths::DocumentsLocation @@ -148,7 +128,6 @@ public: path = QStandardPaths::writableLocation(i); if (!d.exists(path)) { - //qDebug() << "Dir:" << path << "does not exist. Skipping."; continue; } name = QStandardPaths::displayName(i); @@ -158,7 +137,6 @@ public: addChild(new BookmarkCommandItem(name, cmd, this)); } -#endif // system env - include dirs in the tree QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); @@ -167,7 +145,6 @@ public: path = env.value(i); if (!d.exists(path) || !QFileInfo(path).isDir()) { - //qDebug() << "Env Dir:" << path << "does not exist. Skipping."; continue; } path.replace(" ", "\\ "); diff --git a/src/bookmarkswidget.h b/src/bookmarkswidget.h index b5e3415..c0b0f88 100644 --- a/src/bookmarkswidget.h +++ b/src/bookmarkswidget.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2014 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef BOOKMARKSWIDGET_H #define BOOKMARKSWIDGET_H diff --git a/src/config.h b/src/config.h index 7997e74..a36adf7 100644 --- a/src/config.h +++ b/src/config.h @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ @@ -58,6 +56,10 @@ #define TOGGLE_MENU "Toggle Menu" #define TOGGLE_BOOKMARKS "Toggle Bookmarks" +#define HIDE_WINDOW_BORDERS "Hide Window Borders" +#define SHOW_TAB_BAR "Show Tab Bar" +#define FULLSCREEN "Fullscreen" + /* Some defaults for QTerminal application */ #define DEFAULT_WIDTH 800 @@ -102,6 +104,8 @@ #define RENAME_SESSION_SHORTCUT "Shift+Alt+S" +#define FULLSCREEN_SHORTCUT "F11" + // XON/XOFF features: #define FLOW_CONTROL_ENABLED false diff --git a/src/fontdialog.cpp b/src/fontdialog.cpp index 183ad16..30fc914 100644 --- a/src/fontdialog.cpp +++ b/src/fontdialog.cpp @@ -1,3 +1,20 @@ +/*************************************************************************** + * Copyright (C) 2014 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ #include "fontdialog.h" diff --git a/src/fontdialog.h b/src/fontdialog.h index 7522173..9441e3f 100644 --- a/src/fontdialog.h +++ b/src/fontdialog.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2014 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef FONT_DIALOG #define FONT_DIALOG diff --git a/src/forms/propertiesdialog.ui b/src/forms/propertiesdialog.ui index 296724d..144ff05 100644 --- a/src/forms/propertiesdialog.ui +++ b/src/forms/propertiesdialog.ui @@ -6,15 +6,15 @@ 0 0 - 463 - 386 + 715 + 487 - QTerminal Properties + Terminal settings - + Qt::Horizontal @@ -40,28 +40,21 @@ - 100 + 180 16777215 + + Qt::ScrollBarAlwaysOff + - Terminal Font + Appearance - Look and Feel - - - - - History - - - - - Emulation + Behavior @@ -71,7 +64,7 @@ - DropDown + Dropdown @@ -81,109 +74,158 @@ - + QFrame::StyledPanel - 1 + 0 - - - - - - Font - - - - - - QFrame::StyledPanel - - - - - - true - - - - - - - Qt::Horizontal - - - - 117 - 20 - - - - - - - - &Set Font... - - - - - - - - - - Qt::Vertical - - - - 20 - 3 - - - - - - - - Note: only fixed width font are allowed to be used in terminal - - - true - - - - - - + - - - - - - - Action after paste clipboard - - - - + - Color Scheme: + Color scheme - + + + + + + + Widget style + + + + - - + + + + Scrollbar position + + - + + + + + + + Tabs position + + + + + + + + + + Show the menu bar + + + + + + + Hide tab bar with only one tab + + + + + + + Show a border around the current terminal + + + + + + + Application transparency + + + appTransparencyBox + + + + + + + Terminal transparency + + + + + + + % + + + 0 + + + 99 + + + 0 + + + + + + + Start with preset: + + + + + + + % + + + 0 + + + 100 + + + 0 + + + + + + + + None (single terminal) + + + + + 2 terminals horizontally + + + + + 2 terminals vertically + + + + + 4 terminals + + + + + Qt::Vertical @@ -196,175 +238,85 @@ - - - - Tabs Position: - - - - - - - GUI Style: - - - - - - - % - - - 1 - - - 99 - - - - - - - Terminal Transparency: - - - - - - - % - - - 1 - - - 100 - - - 100 - - - - - - - Scrollbar Position: - - - - - - - &Application Transparency: - - - appOpacityBox - - - - - - - - - - &Highlight Current Terminal With Border - - - - - - - Ask for Window Closing Confirmation - - - - - - - - - - Open New Sub-Terminals in Current Working Dir - - - - - - - Show Main Menu - - - - - - - Always Show Tabs - - - - - - - - - - - History - - - - + + + + + 0 + + + 0 + + + 0 + + + 0 + + + - Limited to: + Font - - - - 100 - - - 1000000 - - - 1000 - - - - - - - Unlimited - - - - - + + - Qt::Vertical + Qt::Horizontal - 150 - 139 + 40 + 20 + + + + QFrame::StyledPanel + + + + + + false + + + + + + + &Change... + + + - - - + + + + + + Qt::Vertical + + + + 20 + 57 + + + + + - Emulation Type + Emulation @@ -373,7 +325,7 @@ - Select emulation behaviour. It does not mean that for example "linux" has to be used only on Linux OS. Feel free to use it on Mac too etc.<p>Default is the failback type with minimal feature set. + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> Qt::RichText @@ -386,18 +338,92 @@ - - - - Qt::Vertical + + + + Behavior - - - 20 - 57 - - - + + + + + Action after paste + + + + + + + 100 + + + 1000000 + + + 1000 + + + + + + + Qt::Vertical + + + + 150 + 139 + + + + + + + + Open new terminals in current working directory + + + + + + + Save Size when closing + + + + + + + Save Position when closing + + + + + + + Ask for confirmation when closing + + + + + + + + + + Unlimited history + + + + + + + History size (in lines) + + + + + @@ -454,25 +480,36 @@ + + QFormLayout::ExpandingFieldsGrow + - Height %: + Height - + + + % + + - Width %: + Width - + + + % + + @@ -513,7 +550,7 @@ - Edit File Content + Edit bookmark file contents @@ -535,7 +572,7 @@ - Use Bookmarks + Enable bookmarks @@ -544,7 +581,7 @@ - Bookmark FIle: + Bookmark file diff --git a/src/forms/qterminal.ui b/src/forms/qterminal.ui index f44ddde..f98ef5e 100644 --- a/src/forms/qterminal.ui +++ b/src/forms/qterminal.ui @@ -60,12 +60,12 @@ 0 0 600 - 19 + 26 - File + &File @@ -73,24 +73,24 @@ - Actions + &Actions - Help + &Help - View + &View - Edit + &Edit @@ -101,15 +101,17 @@ - + + + - About... + &About... - About Qt... + About &Qt... @@ -119,7 +121,9 @@ - + + + &Quit @@ -134,8 +138,6 @@ 1 - - - + diff --git a/src/main.cpp b/src/main.cpp index af996a6..b4dbfe8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ #include diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fc85cce..74de0d5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ #include @@ -46,11 +44,14 @@ MainWindow::MainWindow(const QString& work_dir, m_dropLockButton(0), m_dropMode(dropMode) { + setAttribute(Qt::WA_TranslucentBackground); + setupUi(this); + Properties::Instance()->migrate_settings(); Properties::Instance()->loadSettings(); - migrate_settings(); m_bookmarksDock = new QDockWidget(tr("Bookmarks"), this); + m_bookmarksDock->setObjectName("BookmarksDockWidget"); BookmarksWidget *bookmarksWidget = new BookmarksWidget(m_bookmarksDock); m_bookmarksDock->setWidget(bookmarksWidget); addDockWidget(Qt::LeftDockWidgetArea, m_bookmarksDock); @@ -70,10 +71,16 @@ MainWindow::MainWindow(const QString& work_dir, setStyleSheet(QSS_DROP); } else { - restoreGeometry(Properties::Instance()->mainWindowGeometry); + if (Properties::Instance()->saveSizeOnExit) { + resize(Properties::Instance()->mainWindowSize); + } + if (Properties::Instance()->savePosOnExit) { + move(Properties::Instance()->mainWindowPosition); + } restoreState(Properties::Instance()->mainWindowState); } + consoleTabulator->setAutoFillBackground(true); connect(consoleTabulator, SIGNAL(closeTabNotification()), SLOT(close())); consoleTabulator->setWorkDirectory(work_dir); consoleTabulator->setTabPosition((QTabWidget::TabPosition)Properties::Instance()->tabsPos); @@ -97,28 +104,6 @@ MainWindow::~MainWindow() { } -void MainWindow::migrate_settings() -{ - // Deal with rearrangements of settings. - // If this method becomes unbearably huge we should look at the config-update - // system used by kde and razor. - QSettings settings; - QString last_version = settings.value("version", "0.0.0").toString(); - // Handle configchanges in 0.4.0 (renaming 'Paste Selection' -> 'Paste Clipboard') - if (last_version < "0.4.0") - { - qDebug() << "Migrating settings from" << last_version << "to 0.4.0"; - settings.beginGroup("Shortcuts"); - QString tmp = settings.value("Paste Selection", PASTE_CLIPBOARD_SHORTCUT).toString(); - settings.setValue(PASTE_CLIPBOARD, tmp); - settings.remove("Paste Selection"); - settings.endGroup(); - - settings.setValue("version", "0.4.0"); - } -} - - void MainWindow::enableDropMode() { setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint); @@ -154,139 +139,157 @@ void MainWindow::setup_ActionsMenu_Actions() QKeySequence seq; - Properties::Instance()->actions[CLEAR_TERMINAL] = new QAction(QIcon::fromTheme("edit-clear"), tr("Clear Current Tab"), this); + Properties::Instance()->actions[CLEAR_TERMINAL] = new QAction(QIcon::fromTheme("edit-clear"), tr("&Clear Current Tab"), this); seq = QKeySequence::fromString(settings.value(CLEAR_TERMINAL, CLEAR_TERMINAL_SHORTCUT).toString()); Properties::Instance()->actions[CLEAR_TERMINAL]->setShortcut(seq); connect(Properties::Instance()->actions[CLEAR_TERMINAL], SIGNAL(triggered()), consoleTabulator, SLOT(clearActiveTerminal())); menu_Actions->addAction(Properties::Instance()->actions[CLEAR_TERMINAL]); + addAction(Properties::Instance()->actions[CLEAR_TERMINAL]); menu_Actions->addSeparator(); - Properties::Instance()->actions[TAB_NEXT] = new QAction(QIcon::fromTheme("go-next"), tr("Next Tab"), this); + Properties::Instance()->actions[TAB_NEXT] = new QAction(QIcon::fromTheme("go-next"), tr("&Next Tab"), this); seq = QKeySequence::fromString( settings.value(TAB_NEXT, TAB_NEXT_SHORTCUT).toString() ); Properties::Instance()->actions[TAB_NEXT]->setShortcut(seq); connect(Properties::Instance()->actions[TAB_NEXT], SIGNAL(triggered()), consoleTabulator, SLOT(switchToRight())); menu_Actions->addAction(Properties::Instance()->actions[TAB_NEXT]); + addAction(Properties::Instance()->actions[TAB_NEXT]); - Properties::Instance()->actions[TAB_PREV] = new QAction(QIcon::fromTheme("go-previous"), tr("Previous Tab"), this); + Properties::Instance()->actions[TAB_PREV] = new QAction(QIcon::fromTheme("go-previous"), tr("&Previous Tab"), this); seq = QKeySequence::fromString( settings.value(TAB_PREV, TAB_PREV_SHORTCUT).toString() ); Properties::Instance()->actions[TAB_PREV]->setShortcut(seq); connect(Properties::Instance()->actions[TAB_PREV], SIGNAL(triggered()), consoleTabulator, SLOT(switchToLeft())); menu_Actions->addAction(Properties::Instance()->actions[TAB_PREV]); + addAction(Properties::Instance()->actions[TAB_PREV]); - Properties::Instance()->actions[MOVE_LEFT] = new QAction(tr("Move Tab Left"), this); + Properties::Instance()->actions[MOVE_LEFT] = new QAction(tr("Move Tab &Left"), this); seq = QKeySequence::fromString( settings.value(MOVE_LEFT, MOVE_LEFT_SHORTCUT).toString() ); Properties::Instance()->actions[MOVE_LEFT]->setShortcut(seq); connect(Properties::Instance()->actions[MOVE_LEFT], SIGNAL(triggered()), consoleTabulator, SLOT(moveLeft())); menu_Actions->addAction(Properties::Instance()->actions[MOVE_LEFT]); + addAction(Properties::Instance()->actions[MOVE_LEFT]); - Properties::Instance()->actions[MOVE_RIGHT] = new QAction(tr("Move Tab Right"), this); + Properties::Instance()->actions[MOVE_RIGHT] = new QAction(tr("Move Tab &Right"), this); seq = QKeySequence::fromString( settings.value(MOVE_RIGHT, MOVE_RIGHT_SHORTCUT).toString() ); Properties::Instance()->actions[MOVE_RIGHT]->setShortcut(seq); connect(Properties::Instance()->actions[MOVE_RIGHT], SIGNAL(triggered()), consoleTabulator, SLOT(moveRight())); menu_Actions->addAction(Properties::Instance()->actions[MOVE_RIGHT]); + addAction(Properties::Instance()->actions[MOVE_RIGHT]); menu_Actions->addSeparator(); - Properties::Instance()->actions[SPLIT_HORIZONTAL] = new QAction(tr("Split Terminal Horizontally"), this); + Properties::Instance()->actions[SPLIT_HORIZONTAL] = new QAction(tr("Split Terminal &Horizontally"), this); seq = QKeySequence::fromString( settings.value(SPLIT_HORIZONTAL).toString() ); Properties::Instance()->actions[SPLIT_HORIZONTAL]->setShortcut(seq); connect(Properties::Instance()->actions[SPLIT_HORIZONTAL], SIGNAL(triggered()), consoleTabulator, SLOT(splitHorizontally())); menu_Actions->addAction(Properties::Instance()->actions[SPLIT_HORIZONTAL]); + addAction(Properties::Instance()->actions[SPLIT_HORIZONTAL]); - Properties::Instance()->actions[SPLIT_VERTICAL] = new QAction(tr("Split Terminal Vertically"), this); + Properties::Instance()->actions[SPLIT_VERTICAL] = new QAction(tr("Split Terminal &Vertically"), this); seq = QKeySequence::fromString( settings.value(SPLIT_VERTICAL).toString() ); Properties::Instance()->actions[SPLIT_VERTICAL]->setShortcut(seq); connect(Properties::Instance()->actions[SPLIT_VERTICAL], SIGNAL(triggered()), consoleTabulator, SLOT(splitVertically())); menu_Actions->addAction(Properties::Instance()->actions[SPLIT_VERTICAL]); + addAction(Properties::Instance()->actions[SPLIT_VERTICAL]); - Properties::Instance()->actions[SUB_COLLAPSE] = new QAction(tr("Collapse Subterminal"), this); + Properties::Instance()->actions[SUB_COLLAPSE] = new QAction(tr("&Collapse Subterminal"), this); seq = QKeySequence::fromString( settings.value(SUB_COLLAPSE).toString() ); Properties::Instance()->actions[SUB_COLLAPSE]->setShortcut(seq); connect(Properties::Instance()->actions[SUB_COLLAPSE], SIGNAL(triggered()), consoleTabulator, SLOT(splitCollapse())); menu_Actions->addAction(Properties::Instance()->actions[SUB_COLLAPSE]); + addAction(Properties::Instance()->actions[SUB_COLLAPSE]); - Properties::Instance()->actions[SUB_NEXT] = new QAction(QIcon::fromTheme("go-up"), tr("Next Subterminal"), this); + Properties::Instance()->actions[SUB_NEXT] = new QAction(QIcon::fromTheme("go-up"), tr("N&ext Subterminal"), this); seq = QKeySequence::fromString( settings.value(SUB_NEXT, SUB_NEXT_SHORTCUT).toString() ); Properties::Instance()->actions[SUB_NEXT]->setShortcut(seq); connect(Properties::Instance()->actions[SUB_NEXT], SIGNAL(triggered()), consoleTabulator, SLOT(switchNextSubterminal())); menu_Actions->addAction(Properties::Instance()->actions[SUB_NEXT]); + addAction(Properties::Instance()->actions[SUB_NEXT]); - Properties::Instance()->actions[SUB_PREV] = new QAction(QIcon::fromTheme("go-down"), tr("Previous Subterminal"), this); + Properties::Instance()->actions[SUB_PREV] = new QAction(QIcon::fromTheme("go-down"), tr("P&revious Subterminal"), this); seq = QKeySequence::fromString( settings.value(SUB_PREV, SUB_PREV_SHORTCUT).toString() ); Properties::Instance()->actions[SUB_PREV]->setShortcut(seq); connect(Properties::Instance()->actions[SUB_PREV], SIGNAL(triggered()), consoleTabulator, SLOT(switchPrevSubterminal())); menu_Actions->addAction(Properties::Instance()->actions[SUB_PREV]); + addAction(Properties::Instance()->actions[SUB_PREV]); menu_Actions->addSeparator(); // Copy and Paste are only added to the table for the sake of bindings at the moment; there is no Edit menu, only a context menu. - Properties::Instance()->actions[COPY_SELECTION] = new QAction(QIcon::fromTheme("edit-copy"), tr("Copy Selection"), this); + Properties::Instance()->actions[COPY_SELECTION] = new QAction(QIcon::fromTheme("edit-copy"), tr("Copy &Selection"), this); seq = QKeySequence::fromString( settings.value(COPY_SELECTION, COPY_SELECTION_SHORTCUT).toString() ); Properties::Instance()->actions[COPY_SELECTION]->setShortcut(seq); connect(Properties::Instance()->actions[COPY_SELECTION], SIGNAL(triggered()), consoleTabulator, SLOT(copySelection())); menu_Edit->addAction(Properties::Instance()->actions[COPY_SELECTION]); + addAction(Properties::Instance()->actions[COPY_SELECTION]); - Properties::Instance()->actions[PASTE_CLIPBOARD] = new QAction(QIcon::fromTheme("edit-paste"), tr("Paste Clipboard"), this); + Properties::Instance()->actions[PASTE_CLIPBOARD] = new QAction(QIcon::fromTheme("edit-paste"), tr("Paste Clip&board"), this); seq = QKeySequence::fromString( settings.value(PASTE_CLIPBOARD, PASTE_CLIPBOARD_SHORTCUT).toString() ); Properties::Instance()->actions[PASTE_CLIPBOARD]->setShortcut(seq); connect(Properties::Instance()->actions[PASTE_CLIPBOARD], SIGNAL(triggered()), consoleTabulator, SLOT(pasteClipboard())); menu_Edit->addAction(Properties::Instance()->actions[PASTE_CLIPBOARD]); + addAction(Properties::Instance()->actions[PASTE_CLIPBOARD]); - Properties::Instance()->actions[PASTE_SELECTION] = new QAction(QIcon::fromTheme("edit-paste"), tr("Paste Selection"), this); + Properties::Instance()->actions[PASTE_SELECTION] = new QAction(QIcon::fromTheme("edit-paste"), tr("Paste S&election"), this); seq = QKeySequence::fromString( settings.value(PASTE_SELECTION, PASTE_SELECTION_SHORTCUT).toString() ); Properties::Instance()->actions[PASTE_SELECTION]->setShortcut(seq); connect(Properties::Instance()->actions[PASTE_SELECTION], SIGNAL(triggered()), consoleTabulator, SLOT(pasteSelection())); menu_Edit->addAction(Properties::Instance()->actions[PASTE_SELECTION]); + addAction(Properties::Instance()->actions[PASTE_SELECTION]); - Properties::Instance()->actions[ZOOM_IN] = new QAction(QIcon::fromTheme("zoom-in"), tr("Zoom in"), this); + Properties::Instance()->actions[ZOOM_IN] = new QAction(QIcon::fromTheme("zoom-in"), tr("Zoom &in"), this); seq = QKeySequence::fromString( settings.value(ZOOM_IN, ZOOM_IN_SHORTCUT).toString() ); Properties::Instance()->actions[ZOOM_IN]->setShortcut(seq); connect(Properties::Instance()->actions[ZOOM_IN], SIGNAL(triggered()), consoleTabulator, SLOT(zoomIn())); menu_Edit->addAction(Properties::Instance()->actions[ZOOM_IN]); + addAction(Properties::Instance()->actions[ZOOM_IN]); - Properties::Instance()->actions[ZOOM_OUT] = new QAction(QIcon::fromTheme("zoom-out"), tr("Zoom out"), this); + Properties::Instance()->actions[ZOOM_OUT] = new QAction(QIcon::fromTheme("zoom-out"), tr("Zoom &out"), this); seq = QKeySequence::fromString( settings.value(ZOOM_OUT, ZOOM_OUT_SHORTCUT).toString() ); Properties::Instance()->actions[ZOOM_OUT]->setShortcut(seq); connect(Properties::Instance()->actions[ZOOM_OUT], SIGNAL(triggered()), consoleTabulator, SLOT(zoomOut())); menu_Edit->addAction(Properties::Instance()->actions[ZOOM_OUT]); + addAction(Properties::Instance()->actions[ZOOM_OUT]); - Properties::Instance()->actions[ZOOM_RESET] = new QAction(QIcon::fromTheme("zoom-original"), tr("Zoom reset"), this); + Properties::Instance()->actions[ZOOM_RESET] = new QAction(QIcon::fromTheme("zoom-original"), tr("Zoom rese&t"), this); seq = QKeySequence::fromString( settings.value(ZOOM_RESET, ZOOM_RESET_SHORTCUT).toString() ); Properties::Instance()->actions[ZOOM_RESET]->setShortcut(seq); connect(Properties::Instance()->actions[ZOOM_RESET], SIGNAL(triggered()), consoleTabulator, SLOT(zoomReset())); menu_Edit->addAction(Properties::Instance()->actions[ZOOM_RESET]); + addAction(Properties::Instance()->actions[ZOOM_RESET]); menu_Actions->addSeparator(); - Properties::Instance()->actions[FIND] = new QAction(QIcon::fromTheme("edit-find"), tr("Find..."), this); + Properties::Instance()->actions[FIND] = new QAction(QIcon::fromTheme("edit-find"), tr("&Find..."), this); seq = QKeySequence::fromString( settings.value(FIND, FIND_SHORTCUT).toString() ); Properties::Instance()->actions[FIND]->setShortcut(seq); connect(Properties::Instance()->actions[FIND], SIGNAL(triggered()), this, SLOT(find())); menu_Actions->addAction(Properties::Instance()->actions[FIND]); + addAction(Properties::Instance()->actions[FIND]); #if 0 act = new QAction(this); act->setSeparator(true); // TODO/FIXME: unimplemented for now - act = new QAction(tr("Save Session"), this); + act = new QAction(tr("&Save Session"), this); // do not use sequences for this task - it collides with eg. mc shorcuts // and mainly - it's not used too often //act->setShortcut(QKeySequence::Save); connect(act, SIGNAL(triggered()), consoleTabulator, SLOT(saveSession())); - act = new QAction(tr("Load Session"), this); + act = new QAction(tr("&Load Session"), this); // do not use sequences for this task - it collides with eg. mc shorcuts // and mainly - it's not used too often //act->setShortcut(QKeySequence::Open); connect(act, SIGNAL(triggered()), consoleTabulator, SLOT(loadSession())); #endif - Properties::Instance()->actions[TOGGLE_MENU] = new QAction(tr("Toggle Menu"), this); + Properties::Instance()->actions[TOGGLE_MENU] = new QAction(tr("&Toggle Menu"), this); seq = QKeySequence::fromString( settings.value(TOGGLE_MENU, TOGGLE_MENU_SHORTCUT).toString() ); Properties::Instance()->actions[TOGGLE_MENU]->setShortcut(seq); connect(Properties::Instance()->actions[TOGGLE_MENU], SIGNAL(triggered()), this, SLOT(toggleMenu())); + addAction(Properties::Instance()->actions[TOGGLE_MENU]); // tis is correct - add action to main window - not to menu to keep toggle working settings.endGroup(); @@ -301,64 +304,104 @@ void MainWindow::setup_FileMenu_Actions() QKeySequence seq; - Properties::Instance()->actions[ADD_TAB] = new QAction(QIcon::fromTheme("list-add"), tr("New Tab"), this); + Properties::Instance()->actions[ADD_TAB] = new QAction(QIcon::fromTheme("list-add"), tr("&New Tab"), this); seq = QKeySequence::fromString( settings.value(ADD_TAB, ADD_TAB_SHORTCUT).toString() ); Properties::Instance()->actions[ADD_TAB]->setShortcut(seq); - connect(Properties::Instance()->actions[ADD_TAB], SIGNAL(triggered()), consoleTabulator, SLOT(addNewTab())); + connect(Properties::Instance()->actions[ADD_TAB], SIGNAL(triggered()), this, SLOT(addNewTab())); menu_File->addAction(Properties::Instance()->actions[ADD_TAB]); + addAction(Properties::Instance()->actions[ADD_TAB]); - Properties::Instance()->actions[CLOSE_TAB] = new QAction(QIcon::fromTheme("list-remove"), tr("Close Tab"), this); + QMenu *presetsMenu = new QMenu(tr("New Tab From &Preset"), this); + presetsMenu->addAction(QIcon(), tr("1 &Terminal"), + consoleTabulator, SLOT(addNewTab())); + presetsMenu->addAction(QIcon(), tr("2 &Horizontal Terminals"), + consoleTabulator, SLOT(preset2Horizontal())); + presetsMenu->addAction(QIcon(), tr("2 &Vertical Terminals"), + consoleTabulator, SLOT(preset2Vertical())); + presetsMenu->addAction(QIcon(), tr("4 Terminal&s"), + consoleTabulator, SLOT(preset4Terminals())); + menu_File->addMenu(presetsMenu); + + Properties::Instance()->actions[CLOSE_TAB] = new QAction(QIcon::fromTheme("list-remove"), tr("&Close Tab"), this); seq = QKeySequence::fromString( settings.value(CLOSE_TAB, CLOSE_TAB_SHORTCUT).toString() ); Properties::Instance()->actions[CLOSE_TAB]->setShortcut(seq); connect(Properties::Instance()->actions[CLOSE_TAB], SIGNAL(triggered()), consoleTabulator, SLOT(removeCurrentTab())); menu_File->addAction(Properties::Instance()->actions[CLOSE_TAB]); + addAction(Properties::Instance()->actions[CLOSE_TAB]); - Properties::Instance()->actions[NEW_WINDOW] = new QAction(QIcon::fromTheme("window-new"), tr("New Window"), this); + Properties::Instance()->actions[NEW_WINDOW] = new QAction(QIcon::fromTheme("window-new"), tr("&New Window"), this); seq = QKeySequence::fromString( settings.value(NEW_WINDOW, NEW_WINDOW_SHORTCUT).toString() ); Properties::Instance()->actions[NEW_WINDOW]->setShortcut(seq); connect(Properties::Instance()->actions[NEW_WINDOW], SIGNAL(triggered()), this, SLOT(newTerminalWindow())); menu_File->addAction(Properties::Instance()->actions[NEW_WINDOW]); + addAction(Properties::Instance()->actions[NEW_WINDOW]); menu_File->addSeparator(); Properties::Instance()->actions[PREFERENCES] = actProperties; + seq = QKeySequence::fromString( settings.value(PREFERENCES).toString() ); + Properties::Instance()->actions[PREFERENCES]->setShortcut(seq); connect(actProperties, SIGNAL(triggered()), SLOT(actProperties_triggered())); menu_File->addAction(Properties::Instance()->actions[PREFERENCES]); + addAction(Properties::Instance()->actions[PREFERENCES]); menu_File->addSeparator(); Properties::Instance()->actions[QUIT] = actQuit; + seq = QKeySequence::fromString( settings.value(QUIT).toString() ); + Properties::Instance()->actions[QUIT]->setShortcut(seq); connect(actQuit, SIGNAL(triggered()), SLOT(close())); menu_File->addAction(Properties::Instance()->actions[QUIT]); + addAction(Properties::Instance()->actions[QUIT]); settings.endGroup(); } void MainWindow::setup_ViewMenu_Actions() { - toggleBorder = new QAction(tr("Hide Window Borders"), this); - //toggleBorder->setObjectName("toggle_Borderless"); - toggleBorder->setCheckable(true); -// TODO/FIXME: it's broken somehow. When I call toggleBorderless() here the non-responsive window appear -// toggleBorder->setChecked(Properties::Instance()->borderless); -// if (Properties::Instance()->borderless) -// toggleBorderless(); - connect(toggleBorder, SIGNAL(triggered()), this, SLOT(toggleBorderless())); - menu_Window->addAction(toggleBorder); - toggleBorder->setVisible(!m_dropMode); - - toggleTabbar = new QAction(tr("Show Tab Bar"), this); - //toggleTabbar->setObjectName("toggle_TabBar"); - toggleTabbar->setCheckable(true); - toggleTabbar->setChecked(!Properties::Instance()->tabBarless); - toggleTabBar(); - connect(toggleTabbar, SIGNAL(triggered()), this, SLOT(toggleTabBar())); - menu_Window->addAction(toggleTabbar); - + QKeySequence seq; QSettings settings; settings.beginGroup("Shortcuts"); + + QAction *hideBordersAction = new QAction(tr("&Hide Window Borders"), this); + hideBordersAction->setCheckable(true); + hideBordersAction->setVisible(!m_dropMode); + seq = QKeySequence::fromString( settings.value(HIDE_WINDOW_BORDERS).toString() ); + hideBordersAction->setShortcut(seq); + connect(hideBordersAction, SIGNAL(triggered()), this, SLOT(toggleBorderless())); + menu_Window->addAction(hideBordersAction); + addAction(hideBordersAction); + Properties::Instance()->actions[HIDE_WINDOW_BORDERS] = hideBordersAction; + //Properties::Instance()->actions[HIDE_WINDOW_BORDERS]->setObjectName("toggle_Borderless"); +// TODO/FIXME: it's broken somehow. When I call toggleBorderless() here the non-responsive window appear +// Properties::Instance()->actions[HIDE_WINDOW_BORDERS]->setChecked(Properties::Instance()->borderless); +// if (Properties::Instance()->borderless) +// toggleBorderless(); + + QAction *showTabBarAction = new QAction(tr("&Show Tab Bar"), this); + //toggleTabbar->setObjectName("toggle_TabBar"); + showTabBarAction->setCheckable(true); + showTabBarAction->setChecked(!Properties::Instance()->tabBarless); + seq = QKeySequence::fromString( settings.value(SHOW_TAB_BAR).toString() ); + showTabBarAction->setShortcut(seq); + menu_Window->addAction(showTabBarAction); + addAction(showTabBarAction); + Properties::Instance()->actions[SHOW_TAB_BAR] = showTabBarAction; + toggleTabBar(); + connect(showTabBarAction, SIGNAL(triggered()), this, SLOT(toggleTabBar())); + + QAction *toggleFullscreen = new QAction(tr("Fullscreen"), this); + toggleFullscreen->setCheckable(true); + toggleFullscreen->setChecked(false); + seq = QKeySequence::fromString(settings.value(FULLSCREEN, FULLSCREEN_SHORTCUT).toString()); + toggleFullscreen->setShortcut(seq); + menu_Window->addAction(toggleFullscreen); + addAction(toggleFullscreen); + connect(toggleFullscreen, SIGNAL(triggered(bool)), this, SLOT(showFullscreen(bool))); + Properties::Instance()->actions[FULLSCREEN] = toggleFullscreen; + Properties::Instance()->actions[TOGGLE_BOOKMARKS] = m_bookmarksDock->toggleViewAction(); - QKeySequence seq = QKeySequence::fromString( settings.value(TOGGLE_BOOKMARKS, TOGGLE_BOOKMARKS_SHORTCUT).toString() ); + seq = QKeySequence::fromString( settings.value(TOGGLE_BOOKMARKS, TOGGLE_BOOKMARKS_SHORTCUT).toString() ); Properties::Instance()->actions[TOGGLE_BOOKMARKS]->setShortcut(seq); menu_Window->addAction(Properties::Instance()->actions[TOGGLE_BOOKMARKS]); settings.endGroup(); @@ -367,10 +410,10 @@ void MainWindow::setup_ViewMenu_Actions() /* tabs position */ tabPosition = new QActionGroup(this); - QAction *tabBottom = new QAction(tr("Bottom"), this); - QAction *tabTop = new QAction(tr("Top"), this); - QAction *tabRight = new QAction(tr("Right"), this); - QAction *tabLeft = new QAction(tr("Left"), this); + QAction *tabBottom = new QAction(tr("&Bottom"), this); + QAction *tabTop = new QAction(tr("&Top"), this); + QAction *tabRight = new QAction(tr("&Right"), this); + QAction *tabLeft = new QAction(tr("&Left"), this); tabPosition->addAction(tabTop); tabPosition->addAction(tabBottom); tabPosition->addAction(tabLeft); @@ -385,7 +428,7 @@ void MainWindow::setup_ViewMenu_Actions() connect(tabPosition, SIGNAL(triggered(QAction *)), consoleTabulator, SLOT(changeTabPosition(QAction *)) ); - tabPosMenu = new QMenu(tr("Tabs Layout"), menu_Window); + tabPosMenu = new QMenu(tr("&Tabs Layout"), menu_Window); tabPosMenu->setObjectName("tabPosMenu"); for(int i=0; i < tabPosition->actions().size(); ++i) { @@ -399,9 +442,9 @@ void MainWindow::setup_ViewMenu_Actions() /* Scrollbar */ scrollBarPosition = new QActionGroup(this); - QAction *scrollNone = new QAction(tr("None"), this); - QAction *scrollRight = new QAction(tr("Right"), this); - QAction *scrollLeft = new QAction(tr("Left"), this); + QAction *scrollNone = new QAction(tr("&None"), this); + QAction *scrollRight = new QAction(tr("&Right"), this); + QAction *scrollLeft = new QAction(tr("&Left"), this); /* order of insertion is dep. on QTermWidget::ScrollBarPosition enum */ scrollBarPosition->addAction(scrollNone); @@ -417,7 +460,7 @@ void MainWindow::setup_ViewMenu_Actions() connect(scrollBarPosition, SIGNAL(triggered(QAction *)), consoleTabulator, SLOT(changeScrollPosition(QAction *)) ); - scrollPosMenu = new QMenu(tr("Scrollbar Layout"), menu_Window); + scrollPosMenu = new QMenu(tr("S&crollbar Layout"), menu_Window); scrollPosMenu->setObjectName("scrollPosMenu"); for(int i=0; i < scrollBarPosition->actions().size(); ++i) { @@ -433,7 +476,8 @@ void MainWindow::on_consoleTabulator_currentChanged(int) void MainWindow::toggleTabBar() { - Properties::Instance()->tabBarless = !toggleTabbar->isChecked(); + Properties::Instance()->tabBarless + = !Properties::Instance()->actions[SHOW_TAB_BAR]->isChecked(); consoleTabulator->showHideTabBar(); } @@ -442,8 +486,8 @@ void MainWindow::toggleBorderless() setWindowFlags(windowFlags() ^ Qt::FramelessWindowHint); show(); setWindowState(Qt::WindowActive); /* don't loose focus on the window */ - Properties::Instance()->borderless = toggleBorder->isChecked(); - realign(); + Properties::Instance()->borderless + = Properties::Instance()->actions[HIDE_WINDOW_BORDERS]->isChecked(); realign(); } void MainWindow::toggleMenu() @@ -452,15 +496,27 @@ void MainWindow::toggleMenu() Properties::Instance()->menuVisible = m_menuBar->isVisible(); } +void MainWindow::showFullscreen(bool fullscreen) +{ + if(fullscreen) + setWindowState(windowState() | Qt::WindowFullScreen); + else + setWindowState(windowState() & ~Qt::WindowFullScreen); +} + void MainWindow::closeEvent(QCloseEvent *ev) { if (!Properties::Instance()->askOnExit || !consoleTabulator->count()) { // #80 - do not save state and geometry in drop mode - if (!m_dropMode) - { - Properties::Instance()->mainWindowGeometry = saveGeometry(); + if (!m_dropMode) { + if (Properties::Instance()->savePosOnExit) { + Properties::Instance()->mainWindowPosition = pos(); + } + if (Properties::Instance()->saveSizeOnExit) { + Properties::Instance()->mainWindowSize = size(); + } Properties::Instance()->mainWindowState = saveState(); } Properties::Instance()->saveSettings(); @@ -486,7 +542,8 @@ void MainWindow::closeEvent(QCloseEvent *ev) dia->setLayout(lay); if (dia->exec() == QDialog::Accepted) { - Properties::Instance()->mainWindowGeometry = saveGeometry(); + Properties::Instance()->mainWindowPosition = pos(); + Properties::Instance()->mainWindowSize = size(); Properties::Instance()->mainWindowState = saveState(); Properties::Instance()->askOnExit = !dontAskCheck->isChecked(); Properties::Instance()->saveSettings(); @@ -513,7 +570,7 @@ void MainWindow::actProperties_triggered() void MainWindow::propertiesChanged() { QApplication::setStyle(Properties::Instance()->guiStyle); - setWindowOpacity(Properties::Instance()->appOpacity/100.0); + setWindowOpacity(1.0 - Properties::Instance()->appTransparency/100.0); consoleTabulator->setTabPosition((QTabWidget::TabPosition)Properties::Instance()->tabsPos); consoleTabulator->propertiesChanged(); setDropShortcut(Properties::Instance()->dropShortCut); @@ -619,3 +676,15 @@ void MainWindow::bookmarksDock_visibilityChanged(bool visible) { Properties::Instance()->bookmarksVisible = visible; } + +void MainWindow::addNewTab() +{ + if (Properties::Instance()->terminalsPreset == 3) + consoleTabulator->preset4Terminals(); + else if (Properties::Instance()->terminalsPreset == 2) + consoleTabulator->preset2Vertical(); + else if (Properties::Instance()->terminalsPreset == 1) + consoleTabulator->preset2Horizontal(); + else + consoleTabulator->addNewTab(); +} diff --git a/src/mainwindow.h b/src/mainwindow.h index 070158a..0dd6b44 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ #ifndef MAINWINDOW_H @@ -40,25 +38,6 @@ public: bool dropMode() { return m_dropMode; } -protected slots: - void on_consoleTabulator_currentChanged(int); - void propertiesChanged(); - void actAbout_triggered(); - void actProperties_triggered(); - void updateActionGroup(QAction *); - - void toggleBorderless(); - void toggleTabBar(); - void toggleMenu(); - - void showHide(); - void setKeepOpen(bool value); - void find(); - - void newTerminalWindow(); - void bookmarksWidget_callCommand(const QString&); - void bookmarksDock_visibilityChanged(bool visible); - protected: bool event(QEvent* event); @@ -66,15 +45,13 @@ private: QActionGroup *tabPosition, *scrollBarPosition; QMenu *tabPosMenu, *scrollPosMenu; - QAction *toggleBorder, *toggleTabbar, *renameSession; + QAction *renameSession; QString m_initWorkDir; QString m_initShell; QDockWidget *m_bookmarksDock; - void migrate_settings(); - void setup_FileMenu_Actions(); void setup_ActionsMenu_Actions(); void setup_ViewMenu_Actions(); @@ -87,5 +64,27 @@ private: QxtGlobalShortcut m_dropShortcut; void realign(); void setDropShortcut(QKeySequence dropShortCut); + +private slots: + void on_consoleTabulator_currentChanged(int); + void propertiesChanged(); + void actAbout_triggered(); + void actProperties_triggered(); + void updateActionGroup(QAction *); + + void toggleBorderless(); + void toggleTabBar(); + void toggleMenu(); + + void showFullscreen(bool fullscreen); + void showHide(); + void setKeepOpen(bool value); + void find(); + + void newTerminalWindow(); + void bookmarksWidget_callCommand(const QString&); + void bookmarksDock_visibilityChanged(bool visible); + + void addNewTab(); }; #endif //MAINWINDOW_H diff --git a/src/properties.cpp b/src/properties.cpp index cbf7964..ac4c13c 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #include #include "properties.h" @@ -14,12 +32,13 @@ Properties * Properties::Instance(const QString& filename) return m_instance; } -Properties::Properties(const QString& filename) : filename(filename) +Properties::Properties(const QString& filename) + : filename(filename) { - if (filename.isEmpty()) { - QSettings settings; - this->filename = settings.fileName(); - } + if (filename.isEmpty()) + m_settings = new QSettings(); + else + m_settings = new QSettings(filename); qDebug("Properties constructor called"); } @@ -27,6 +46,7 @@ Properties::~Properties() { qDebug("Properties destructor called"); saveSettings(); + m_settings->deleteLater(); delete m_instance; m_instance = 0; } @@ -42,145 +62,225 @@ QFont Properties::defaultFont() void Properties::loadSettings() { - QSettings settings(filename, QSettings::IniFormat); - - guiStyle = settings.value("guiStyle", QString()).toString(); + guiStyle = m_settings->value("guiStyle", QString()).toString(); if (!guiStyle.isNull()) QApplication::setStyle(guiStyle); - colorScheme = settings.value("colorScheme", "Linux").toString(); + colorScheme = m_settings->value("colorScheme", "Linux").toString(); - highlightCurrentTerminal = settings.value("highlightCurrentTerminal", true).toBool(); + highlightCurrentTerminal = m_settings->value("highlightCurrentTerminal", true).toBool(); - font = qvariant_cast(settings.value("font", defaultFont())); + font = qvariant_cast(m_settings->value("font", defaultFont())); - settings.beginGroup("Shortcuts"); - QStringList keys = settings.childKeys(); + m_settings->beginGroup("Shortcuts"); + QStringList keys = m_settings->childKeys(); foreach( QString key, keys ) { - QKeySequence sequence = QKeySequence( settings.value( key ).toString() ); + QKeySequence sequence = QKeySequence( m_settings->value( key ).toString() ); if( Properties::Instance()->actions.contains( key ) ) Properties::Instance()->actions[ key ]->setShortcut( sequence ); } - settings.endGroup(); + m_settings->endGroup(); - mainWindowGeometry = settings.value("MainWindow/geometry").toByteArray(); - mainWindowState = settings.value("MainWindow/state").toByteArray(); + mainWindowSize = m_settings->value("MainWindow/size").toSize(); + mainWindowPosition = m_settings->value("MainWindow/pos").toPoint(); + mainWindowState = m_settings->value("MainWindow/state").toByteArray(); + historyLimited = m_settings->value("HistoryLimited", true).toBool(); + historyLimitedTo = m_settings->value("HistoryLimitedTo", 1000).toUInt(); - historyLimited = settings.value("HistoryLimited", true).toBool(); - historyLimitedTo = settings.value("HistoryLimitedTo", 1000).toUInt(); - - emulation = settings.value("emulation", "default").toString(); + emulation = m_settings->value("emulation", "default").toString(); // sessions - int size = settings.beginReadArray("Sessions"); + int size = m_settings->beginReadArray("Sessions"); for (int i = 0; i < size; ++i) { - settings.setArrayIndex(i); - QString name(settings.value("name").toString()); + m_settings->setArrayIndex(i); + QString name(m_settings->value("name").toString()); if (name.isEmpty()) continue; - sessions[name] = settings.value("state").toByteArray(); + sessions[name] = m_settings->value("state").toByteArray(); } - settings.endArray(); + m_settings->endArray(); - appOpacity = settings.value("MainWindow/appOpacity", 100).toInt(); - termOpacity = settings.value("termOpacity", 100).toInt(); + appTransparency = m_settings->value("MainWindow/ApplicationTransparency", 0).toInt(); + termTransparency = m_settings->value("TerminalTransparency", 0).toInt(); /* default to Right. see qtermwidget.h */ - scrollBarPos = settings.value("ScrollbarPosition", 2).toInt(); + scrollBarPos = m_settings->value("ScrollbarPosition", 2).toInt(); /* default to North. I'd prefer South but North is standard (they say) */ - tabsPos = settings.value("TabsPosition", 0).toInt(); - alwaysShowTabs = settings.value("AlwaysShowTabs", true).toBool(); - m_motionAfterPaste = settings.value("MotionAfterPaste", 0).toInt(); + tabsPos = m_settings->value("TabsPosition", 0).toInt(); + hideTabBarWithOneTab = m_settings->value("HideTabBarWithOneTab", false).toBool(); + m_motionAfterPaste = m_settings->value("MotionAfterPaste", 0).toInt(); /* toggles */ - borderless = settings.value("Borderless", false).toBool(); - tabBarless = settings.value("TabBarless", false).toBool(); - menuVisible = settings.value("MenuVisible", true).toBool(); - askOnExit = settings.value("AskOnExit", true).toBool(); - useCWD = settings.value("UseCWD", false).toBool(); + borderless = m_settings->value("Borderless", false).toBool(); + tabBarless = m_settings->value("TabBarless", false).toBool(); + menuVisible = m_settings->value("MenuVisible", true).toBool(); + askOnExit = m_settings->value("AskOnExit", true).toBool(); + saveSizeOnExit = m_settings->value("SaveSizeOnExit", true).toBool(); + savePosOnExit = m_settings->value("SavePosOnExit", true).toBool(); + useCWD = m_settings->value("UseCWD", false).toBool(); // bookmarks - useBookmarks = settings.value("UseBookmarks", false).toBool(); - bookmarksVisible = settings.value("BookmarksVisible", true).toBool(); - bookmarksFile = settings.value("BookmarksFile", QFileInfo(settings.fileName()).canonicalPath()+"/qterminal_bookmarks.xml").toString(); + useBookmarks = m_settings->value("UseBookmarks", false).toBool(); + bookmarksVisible = m_settings->value("BookmarksVisible", true).toBool(); + bookmarksFile = m_settings->value("BookmarksFile", QFileInfo(m_settings->fileName()).canonicalPath()+"/qterminal_bookmarks.xml").toString(); - settings.beginGroup("DropMode"); - dropShortCut = QKeySequence(settings.value("ShortCut", "F12").toString()); - dropKeepOpen = settings.value("KeepOpen", false).toBool(); - dropShowOnStart = settings.value("ShowOnStart", true).toBool(); - dropWidht = settings.value("Width", 70).toInt(); - dropHeight = settings.value("Height", 45).toInt(); - settings.endGroup(); + terminalsPreset = m_settings->value("TerminalsPreset", 0).toInt(); + + m_settings->beginGroup("DropMode"); + dropShortCut = QKeySequence(m_settings->value("ShortCut", "F12").toString()); + dropKeepOpen = m_settings->value("KeepOpen", false).toBool(); + dropShowOnStart = m_settings->value("ShowOnStart", true).toBool(); + dropWidht = m_settings->value("Width", 70).toInt(); + dropHeight = m_settings->value("Height", 45).toInt(); + m_settings->endGroup(); } void Properties::saveSettings() { - QSettings settings(filename, QSettings::IniFormat); + m_settings->setValue("guiStyle", guiStyle); + m_settings->setValue("colorScheme", colorScheme); + m_settings->setValue("highlightCurrentTerminal", highlightCurrentTerminal); + m_settings->setValue("font", font); - settings.setValue("guiStyle", guiStyle); - settings.setValue("colorScheme", colorScheme); - settings.setValue("highlightCurrentTerminal", highlightCurrentTerminal); - settings.setValue("font", font); - - settings.beginGroup("Shortcuts"); + m_settings->beginGroup("Shortcuts"); QMapIterator< QString, QAction * > it(actions); while( it.hasNext() ) { it.next(); QKeySequence shortcut = it.value()->shortcut(); - settings.setValue( it.key(), shortcut.toString() ); + m_settings->setValue( it.key(), shortcut.toString() ); } - settings.endGroup(); + m_settings->endGroup(); - settings.setValue("MainWindow/geometry", mainWindowGeometry); - settings.setValue("MainWindow/state", mainWindowState); + m_settings->setValue("MainWindow/size", mainWindowSize); + m_settings->setValue("MainWindow/pos", mainWindowPosition); + m_settings->setValue("MainWindow/state", mainWindowState); - settings.setValue("HistoryLimited", historyLimited); - settings.setValue("HistoryLimitedTo", historyLimitedTo); + m_settings->setValue("HistoryLimited", historyLimited); + m_settings->setValue("HistoryLimitedTo", historyLimitedTo); - settings.setValue("emulation", emulation); + m_settings->setValue("emulation", emulation); // sessions - settings.beginWriteArray("Sessions"); + m_settings->beginWriteArray("Sessions"); int i = 0; Sessions::iterator sit = sessions.begin(); while (sit != sessions.end()) { - settings.setArrayIndex(i); - settings.setValue("name", sit.key()); - settings.setValue("state", sit.value()); + m_settings->setArrayIndex(i); + m_settings->setValue("name", sit.key()); + m_settings->setValue("state", sit.value()); ++sit; ++i; } - settings.endArray(); + m_settings->endArray(); - settings.setValue("MainWindow/appOpacity", appOpacity); - settings.setValue("termOpacity", termOpacity); - settings.setValue("ScrollbarPosition", scrollBarPos); - settings.setValue("TabsPosition", tabsPos); - settings.setValue("AlwaysShowTabs", alwaysShowTabs); - settings.setValue("MotionAfterPaste", m_motionAfterPaste); - settings.setValue("Borderless", borderless); - settings.setValue("TabBarless", tabBarless); - settings.setValue("MenuVisible", menuVisible); - settings.setValue("AskOnExit", askOnExit); - settings.setValue("UseCWD", useCWD); + m_settings->setValue("MainWindow/ApplicationTransparency", appTransparency); + m_settings->setValue("TerminalTransparency", termTransparency); + m_settings->setValue("ScrollbarPosition", scrollBarPos); + m_settings->setValue("TabsPosition", tabsPos); + m_settings->setValue("HideTabBarWithOneTab", hideTabBarWithOneTab); + m_settings->setValue("MotionAfterPaste", m_motionAfterPaste); + m_settings->setValue("Borderless", borderless); + m_settings->setValue("TabBarless", tabBarless); + m_settings->setValue("MenuVisible", menuVisible); + m_settings->setValue("AskOnExit", askOnExit); + m_settings->setValue("SavePosOnExit", savePosOnExit); + m_settings->setValue("SaveSizeOnExit", saveSizeOnExit); + m_settings->setValue("UseCWD", useCWD); // bookmarks - settings.setValue("UseBookmarks", useBookmarks); - settings.setValue("BookmarksVisible", bookmarksVisible); - settings.setValue("BookmarksFile", bookmarksFile); + m_settings->setValue("UseBookmarks", useBookmarks); + m_settings->setValue("BookmarksVisible", bookmarksVisible); + m_settings->setValue("BookmarksFile", bookmarksFile); - settings.beginGroup("DropMode"); - settings.setValue("ShortCut", dropShortCut.toString()); - settings.setValue("KeepOpen", dropKeepOpen); - settings.setValue("ShowOnStart", dropShowOnStart); - settings.setValue("Width", dropWidht); - settings.setValue("Height", dropHeight); - settings.endGroup(); + m_settings->setValue("TerminalsPreset", terminalsPreset); + + m_settings->beginGroup("DropMode"); + m_settings->setValue("ShortCut", dropShortCut.toString()); + m_settings->setValue("KeepOpen", dropKeepOpen); + m_settings->setValue("ShowOnStart", dropShowOnStart); + m_settings->setValue("Width", dropWidht); + m_settings->setValue("Height", dropHeight); + m_settings->endGroup(); } +void Properties::migrate_settings() +{ + // Deal with rearrangements of settings. + // If this method becomes unbearably huge we should look at the config-update + // system used by kde and razor. + QSettings settings; + QString lastVersion = settings.value("version", "0.0.0").toString(); + QString currentVersion = STR_VERSION; + if (currentVersion < lastVersion) + { + qDebug() << "Warning: Configuration file was written by a newer version " + << "of QTerminal. Some settings might be incompatible"; + } + + if (lastVersion < "0.4.0") + { + // ===== Paste Selection -> Paste Clipboard ===== + settings.beginGroup("Shortcuts"); + if(!settings.contains(PASTE_CLIPBOARD)) + { + QString value = settings.value("Paste Selection", PASTE_CLIPBOARD_SHORTCUT).toString(); + settings.setValue(PASTE_CLIPBOARD, value); + } + settings.remove("Paste Selection"); + settings.endGroup(); + } + + if (lastVersion <= "0.6.0") + { + // ===== AlwaysShowTabs -> HideTabBarWithOneTab ===== + if(!settings.contains("HideTabBarWithOneTab")) + { + QString hideValue = settings.value("AlwaysShowTabs", false).toString(); + settings.setValue("HideTabBarWithOneTab", hideValue); + } + settings.remove("AlwaysShowTabs"); + + // ===== appOpacity -> ApplicationTransparency ===== + // + // Note: In 0.6.0 the opacity values had been erroneously + // restricted to [0,99] instead of [1,100]. We fix this here by + // setting the opacity to 100 if it was 99 and to 1 if it was 0. + // + if(!settings.contains("MainWindow/ApplicationTransparency")) + { + int appOpacityValue = settings.value("MainWindow/appOpacity", 100).toInt(); + appOpacityValue = appOpacityValue == 99 ? 100 : appOpacityValue; + appOpacityValue = appOpacityValue == 0 ? 1 : appOpacityValue; + settings.setValue("MainWindow/ApplicationTransparency", 100 - appOpacityValue); + } + settings.remove("MainWindow/appOpacity"); + + // ===== termOpacity -> TerminalTransparency ===== + if(!settings.contains("TerminalTransparency")) + { + int termOpacityValue = settings.value("termOpacity", 100).toInt(); + termOpacityValue = termOpacityValue == 99 ? 100 : termOpacityValue; + settings.setValue("TerminalTransparency", 100 - termOpacityValue); + } + settings.remove("termOpacity"); + // geometry -> size, pos + if (!settings.contains("MainWindow/size")) + { + QWidget geom; + geom.restoreGeometry(settings.value("MainWindow/geometry").toByteArray()); + settings.setValue("MainWindow/size", geom.size()); + settings.setValue("MainWindow/pos", geom.pos()); + settings.remove("MainWindow/geometry"); + } + } + + if (currentVersion > lastVersion) + settings.setValue("version", currentVersion); +} + diff --git a/src/properties.h b/src/properties.h index dcde366..6eeae62 100644 --- a/src/properties.h +++ b/src/properties.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef PROPERTIES_H #define PROPERTIES_H @@ -16,12 +34,15 @@ typedef QMap ShortcutMap; class Properties { public: - static Properties *Instance(const QString& filename = QString("")); + static Properties *Instance(const QString& filename = QString()); QFont defaultFont(); void saveSettings(); + void loadSettings(); + void migrate_settings(); - QByteArray mainWindowGeometry; + QSize mainWindowSize; + QPoint mainWindowPosition; QByteArray mainWindowState; //ShortcutMap shortcuts; QString shell; @@ -37,12 +58,12 @@ class Properties Sessions sessions; - int appOpacity; - int termOpacity; + int appTransparency; + int termTransparency; int scrollBarPos; int tabsPos; - bool alwaysShowTabs; + bool hideTabBarWithOneTab; int m_motionAfterPaste; bool borderless; @@ -51,12 +72,17 @@ class Properties bool askOnExit; + bool saveSizeOnExit; + bool savePosOnExit; + bool useCWD; bool useBookmarks; bool bookmarksVisible; QString bookmarksFile; + int terminalsPreset; + QKeySequence dropShortCut; bool dropKeepOpen; bool dropShowOnStart; @@ -65,7 +91,6 @@ class Properties QMap< QString, QAction * > actions; - void loadSettings(); private: @@ -78,6 +103,8 @@ class Properties Properties(const Properties &) {}; ~Properties(); + QSettings *m_settings; + }; #endif diff --git a/src/propertiesdialog.cpp b/src/propertiesdialog.cpp index 16d66f6..e93477a 100644 --- a/src/propertiesdialog.cpp +++ b/src/propertiesdialog.cpp @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #include #include @@ -24,6 +42,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) QStringList colorSchemes = QTermWidget::availableColorSchemes(); listWidget->setCurrentRow(0); + listWidget->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow); colorSchemaCombo->addItems(colorSchemes); int csix = colorSchemaCombo->findText(Properties::Instance()->colorScheme); @@ -33,34 +52,34 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) emulationComboBox->addItems(emulations); int eix = emulationComboBox->findText(Properties::Instance()->emulation); emulationComboBox->setCurrentIndex(eix != -1 ? eix : 0 ); - + /* shortcuts */ setupShortcuts(); /* scrollbar position */ QStringList scrollBarPosList; - scrollBarPosList << "No scrollbar" << "Left" << "Right"; + scrollBarPosList << tr("No scrollbar") << tr("Left") << tr("Right"); scrollBarPos_comboBox->addItems(scrollBarPosList); scrollBarPos_comboBox->setCurrentIndex(Properties::Instance()->scrollBarPos); /* tabs position */ QStringList tabsPosList; - tabsPosList << "Top" << "Bottom" << "Left" << "Right"; + tabsPosList << tr("Top") << tr("Bottom") << tr("Left") << tr("Right"); tabsPos_comboBox->addItems(tabsPosList); tabsPos_comboBox->setCurrentIndex(Properties::Instance()->tabsPos); - alwaysShowTabsCheckBox->setChecked(Properties::Instance()->alwaysShowTabs); + hideTabBarCheckBox->setChecked(Properties::Instance()->hideTabBarWithOneTab); // show main menu bar showMenuCheckBox->setChecked(Properties::Instance()->menuVisible); /* actions by motion after paste */ - + QStringList motionAfter; - motionAfter << "No move" << "Move start" << "Move end"; + motionAfter << tr("No move") << tr("Move start") << tr("Move end"); motionAfterPasting_comboBox->addItems(motionAfter); motionAfterPasting_comboBox->setCurrentIndex(Properties::Instance()->m_motionAfterPaste); - + // Setting windows style actions styleComboBox->addItem(tr("System Default")); styleComboBox->addItems(QStyleFactory::keys()); @@ -68,19 +87,20 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) int ix = styleComboBox->findText(Properties::Instance()->guiStyle); if (ix != -1) styleComboBox->setCurrentIndex(ix); - + setFontSample(Properties::Instance()->font); - appOpacityBox->setValue(Properties::Instance()->appOpacity); - //connect(appOpacityBox, SIGNAL(valueChanged(int)), this, SLOT(apply())); + appTransparencyBox->setValue(Properties::Instance()->appTransparency); - termOpacityBox->setValue(Properties::Instance()->termOpacity); - //connect(termOpacityBox, SIGNAL(valueChanged(int)), this, SLOT(apply())); + termTransparencyBox->setValue(Properties::Instance()->termTransparency); highlightCurrentCheckBox->setChecked(Properties::Instance()->highlightCurrentTerminal); askOnExitCheckBox->setChecked(Properties::Instance()->askOnExit); + savePosOnExitCheckBox->setChecked(Properties::Instance()->savePosOnExit); + saveSizeOnExitCheckBox->setChecked(Properties::Instance()->saveSizeOnExit); + useCwdCheckBox->setChecked(Properties::Instance()->useCWD); historyLimited->setChecked(Properties::Instance()->historyLimited); @@ -97,6 +117,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) openBookmarksFile(Properties::Instance()->bookmarksFile); connect(bookmarksButton, SIGNAL(clicked()), this, SLOT(bookmarksButton_clicked())); + + terminalPresetComboBox->setCurrentIndex(Properties::Instance()->terminalsPreset); } @@ -120,21 +142,24 @@ void PropertiesDialog::apply() Properties::Instance()->emulation = emulationComboBox->currentText(); /* do not allow to go above 99 or we lose transparency option */ - (appOpacityBox->value() >= 100) ? - Properties::Instance()->appOpacity = 99 + (appTransparencyBox->value() >= 100) ? + Properties::Instance()->appTransparency = 99 : - Properties::Instance()->appOpacity = appOpacityBox->value(); + Properties::Instance()->appTransparency = appTransparencyBox->value(); - Properties::Instance()->termOpacity = termOpacityBox->value(); + Properties::Instance()->termTransparency = termTransparencyBox->value(); Properties::Instance()->highlightCurrentTerminal = highlightCurrentCheckBox->isChecked(); Properties::Instance()->askOnExit = askOnExitCheckBox->isChecked(); + Properties::Instance()->savePosOnExit = savePosOnExitCheckBox->isChecked(); + Properties::Instance()->saveSizeOnExit = saveSizeOnExitCheckBox->isChecked(); + Properties::Instance()->useCWD = useCwdCheckBox->isChecked(); Properties::Instance()->scrollBarPos = scrollBarPos_comboBox->currentIndex(); Properties::Instance()->tabsPos = tabsPos_comboBox->currentIndex(); - Properties::Instance()->alwaysShowTabs = alwaysShowTabsCheckBox->isChecked(); + Properties::Instance()->hideTabBarWithOneTab = hideTabBarCheckBox->isChecked(); Properties::Instance()->menuVisible = showMenuCheckBox->isChecked(); Properties::Instance()->m_motionAfterPaste = motionAfterPasting_comboBox->currentIndex(); @@ -154,6 +179,8 @@ void PropertiesDialog::apply() Properties::Instance()->bookmarksFile = bookmarksLineEdit->text(); saveBookmarksFile(Properties::Instance()->bookmarksFile); + Properties::Instance()->terminalsPreset = terminalPresetComboBox->currentIndex(); + emit propertiesChanged(); } diff --git a/src/propertiesdialog.h b/src/propertiesdialog.h index 2ea43c0..e8a7157 100644 --- a/src/propertiesdialog.h +++ b/src/propertiesdialog.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef PROPERTIESDIALOG_H #define PROPERTIESDIALOG_H diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 1a3197c..0e2d423 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ #include @@ -51,6 +49,7 @@ TabWidget::TabWidget(QWidget* parent) : QTabWidget(parent), tabNumerator(0) tabBar()->installEventFilter(this); connect(this, SIGNAL(tabCloseRequested(int)), this, SLOT(removeTab(int))); + connect(tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(updateTabIndices())); } TermWidgetHolder * TabWidget::terminalHolder() @@ -84,7 +83,7 @@ int TabWidget::addNewTab(const QString & shell_program) connect(console, SIGNAL(renameSession()), this, SLOT(renameSession())); int index = addTab(console, label); - recountIndexes(); + updateTabIndices(); setCurrentIndex(index); console->setInitialFocus(); @@ -148,7 +147,7 @@ void TabWidget::zoomReset() terminalHolder()->currentTerminal()->impl()->zoomReset(); } -void TabWidget::recountIndexes() +void TabWidget::updateTabIndices() { for(int i = 0; i < count(); i++) widget(i)->setProperty(TAB_INDEX_PROPERTY, i); @@ -210,7 +209,7 @@ void TabWidget::removeFinished() if(prop.isValid() && prop.canConvert(QVariant::Int)) { int index = prop.toInt(); - removeTab(index); + removeTab(index); // if (count() == 0) // emit closeTabNotification(); } @@ -224,7 +223,7 @@ void TabWidget::removeTab(int index) QTabWidget::removeTab(index); w->deleteLater(); - recountIndexes(); + updateTabIndices(); int current = currentIndex(); if (current >= 0 ) { @@ -307,7 +306,7 @@ void TabWidget::move(Direction dir) setUpdatesEnabled(true); setCurrentIndex(newIndex); child->setFocus(); - recountIndexes(); + updateTabIndices(); } } @@ -377,10 +376,41 @@ void TabWidget::loadSession() reinterpret_cast(widget(currentIndex()))->loadSession(); } +void TabWidget::preset2Horizontal() +{ + int ix = TabWidget::addNewTab(); + TermWidgetHolder* term = reinterpret_cast(widget(ix)); + term->splitHorizontal(term->currentTerminal()); + // switch to the 1st terminal + term->switchNextSubterminal(); +} + +void TabWidget::preset2Vertical() +{ + int ix = TabWidget::addNewTab(); + TermWidgetHolder* term = reinterpret_cast(widget(ix)); + term->splitVertical(term->currentTerminal()); + // switch to the 1st terminal + term->switchNextSubterminal(); +} + +void TabWidget::preset4Terminals() +{ + int ix = TabWidget::addNewTab(); + TermWidgetHolder* term = reinterpret_cast(widget(ix)); + term->splitVertical(term->currentTerminal()); + term->splitHorizontal(term->currentTerminal()); + term->switchNextSubterminal(); + term->switchNextSubterminal(); + term->splitHorizontal(term->currentTerminal()); + // switch to the 1st terminal + term->switchNextSubterminal(); +} + void TabWidget::showHideTabBar() { if (Properties::Instance()->tabBarless) tabBar()->setVisible(false); else - tabBar()->setVisible(Properties::Instance()->alwaysShowTabs || count() > 1); + tabBar()->setVisible(!Properties::Instance()->hideTabBarWithOneTab || count() > 1); } diff --git a/src/tabwidget.h b/src/tabwidget.h index 868fc35..1140c61 100644 --- a/src/tabwidget.h +++ b/src/tabwidget.h @@ -13,9 +13,7 @@ * GNU 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. * + * along with this program. If not, see . * ***************************************************************************/ #ifndef TAB_WIDGET @@ -75,13 +73,16 @@ public slots: void saveSession(); void loadSession(); + void preset2Horizontal(); + void preset2Vertical(); + void preset4Terminals(); + signals: void closeTabNotification(); protected: enum Direction{Left = 1, Right}; void contextMenuEvent(QContextMenuEvent * event); - void recountIndexes(); void move(Direction); /*! Event filter for TabWidget's QTabBar. It's installed on tabBar() in the constructor. @@ -89,6 +90,8 @@ protected: renaming or new tab opening */ bool eventFilter(QObject *obj, QEvent *event); +protected slots: + void updateTabIndices(); private: int tabNumerator; diff --git a/src/termwidget.cpp b/src/termwidget.cpp index 82455a7..ded6f1a 100644 --- a/src/termwidget.cpp +++ b/src/termwidget.cpp @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #include #include #include @@ -72,7 +90,7 @@ void TermWidgetImpl::propertiesChanged() qDebug() << "TermWidgetImpl::propertiesChanged" << this << "emulation:" << Properties::Instance()->emulation; setKeyBindings(Properties::Instance()->emulation); - setTerminalOpacity(Properties::Instance()->termOpacity/100.0); + setTerminalOpacity(1.0 - Properties::Instance()->termTransparency/100.0); /* be consequent with qtermwidget.h here */ switch(Properties::Instance()->scrollBarPos) { @@ -106,6 +124,9 @@ void TermWidgetImpl::customContextMenuCall(const QPoint & pos) menu.addAction(Properties::Instance()->actions[SPLIT_VERTICAL]); #warning TODO/FIXME: disable the action when there is only one terminal menu.addAction(Properties::Instance()->actions[SUB_COLLAPSE]); + menu.addSeparator(); + menu.addAction(Properties::Instance()->actions[TOGGLE_MENU]); + menu.addAction(Properties::Instance()->actions[PREFERENCES]); menu.exec(mapToGlobal(pos)); } diff --git a/src/termwidget.h b/src/termwidget.h index f2e0178..df72669 100644 --- a/src/termwidget.h +++ b/src/termwidget.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef TERMWIDGET_H #define TERMWIDGET_H diff --git a/src/termwidgetholder.cpp b/src/termwidgetholder.cpp index 1aeadad..c8aab13 100644 --- a/src/termwidgetholder.cpp +++ b/src/termwidgetholder.cpp @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #include #include #include @@ -98,7 +116,6 @@ void TermWidgetHolder::saveSession(const QString & name) TermWidget* TermWidgetHolder::currentTerminal() { - qDebug() << m_currentTerm << "current terminal"; return m_currentTerm; } @@ -115,8 +132,6 @@ void TermWidgetHolder::switchNextSubterminal() foreach (TermWidget * w, l) { ++ix; -// qDebug() << ix << w << w->impl() << w->impl()->hasFocus() << QApplication::focusWidget(); -// qDebug() << "parent: " << w->parent(); if (w->impl()->hasFocus()) { break; @@ -141,14 +156,11 @@ void TermWidgetHolder::switchPrevSubterminal() foreach (TermWidget * w, l) { ++ix; -// qDebug() << ix << w << w->impl() << w->impl()->hasFocus() << QApplication::focusWidget(); -// qDebug() << "parent: " << w->parent(); if (w->impl()->hasFocus()) { break; } } - //qDebug() << ix << l.at(ix)->impl() << QApplication::focusWidget() << l; if (ix > 0) { @@ -274,7 +286,6 @@ TermWidget *TermWidgetHolder::newTerm(const QString & wdir, const QString & shel void TermWidgetHolder::setCurrentTerminal(TermWidget* term) { - qDebug() << "set current term:" << term; m_currentTerm = term; } diff --git a/src/termwidgetholder.h b/src/termwidgetholder.h index 586eef1..4c1b640 100644 --- a/src/termwidgetholder.h +++ b/src/termwidgetholder.h @@ -1,3 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2010 by Petr Vanek * + * petr@scribus.info * + * * + * This program is free software; you can 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, see . * + ***************************************************************************/ + #ifndef TERMWIDGETHOLDER_H #define TERMWIDGETHOLDER_H diff --git a/src/third-party/qxtglobalshortcut.cpp b/src/third-party/qxtglobalshortcut.cpp index 44b9f91..46cfe4b 100644 --- a/src/third-party/qxtglobalshortcut.cpp +++ b/src/third-party/qxtglobalshortcut.cpp @@ -35,24 +35,17 @@ #ifndef Q_OS_MAC int QxtGlobalShortcutPrivate::ref = 0; -# if QT_VERSION < QT_VERSION_CHECK(5,0,0) -QAbstractEventDispatcher::EventFilter QxtGlobalShortcutPrivate::prevEventFilter = 0; -# endif -#endif // Q_OS_MAC +#endif QHash, QxtGlobalShortcut*> QxtGlobalShortcutPrivate::shortcuts; QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate() : enabled(true), key(Qt::Key(0)), mods(Qt::NoModifier) { #ifndef Q_OS_MAC if (ref == 0) { -# if QT_VERSION < QT_VERSION_CHECK(5,0,0) - prevEventFilter = QAbstractEventDispatcher::instance()->setEventFilter(eventFilter); -# else QAbstractEventDispatcher::instance()->installNativeEventFilter(this); -#endif } ++ref; -#endif // Q_OS_MAC +#endif } QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate() @@ -62,14 +55,10 @@ QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate() if (ref == 0) { QAbstractEventDispatcher *ed = QAbstractEventDispatcher::instance(); if (ed != 0) { -# if QT_VERSION < QT_VERSION_CHECK(5,0,0) - ed->setEventFilter(prevEventFilter); -# else ed->removeNativeEventFilter(this); -# endif } } -#endif // Q_OS_MAC +#endif } bool QxtGlobalShortcutPrivate::setShortcut(const QKeySequence& shortcut) diff --git a/src/third-party/qxtglobalshortcut_p.h b/src/third-party/qxtglobalshortcut_p.h index 112988d..9539a2d 100644 --- a/src/third-party/qxtglobalshortcut_p.h +++ b/src/third-party/qxtglobalshortcut_p.h @@ -33,16 +33,13 @@ #include "qxtglobalshortcut.h" #include +#include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) -#include -#endif - class QxtGlobalShortcutPrivate : public QxtPrivate -#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) && !defined(Q_OS_MAC) +#if !defined(Q_OS_MAC) ,public QAbstractNativeEventFilter #endif { @@ -61,13 +58,8 @@ public: static bool error; #ifndef Q_OS_MAC static int ref; -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) - static QAbstractEventDispatcher::EventFilter prevEventFilter; - static bool eventFilter(void* message); -#else virtual bool nativeEventFilter(const QByteArray & eventType, void * message, long * result); -#endif // QT_VERSION < QT_VERSION_CHECK(5,0,0) -#endif // Q_OS_MAC +#endif static void activateShortcut(quint32 nativeKey, quint32 nativeMods); diff --git a/src/third-party/qxtglobalshortcut_win.cpp b/src/third-party/qxtglobalshortcut_win.cpp index aee7934..c8745b7 100644 --- a/src/third-party/qxtglobalshortcut_win.cpp +++ b/src/third-party/qxtglobalshortcut_win.cpp @@ -32,16 +32,11 @@ #include -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) -bool QxtGlobalShortcutPrivate::eventFilter(void* message) -{ -#else bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, void * message, long * result) { Q_UNUSED(eventType); Q_UNUSED(result); -#endif MSG* msg = static_cast(message); if (msg->message == WM_HOTKEY) { @@ -50,11 +45,7 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, activateShortcut(keycode, modifiers); } -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) - return prevEventFilter ? prevEventFilter(message) : false; -#else - return false; -#endif + return false; } diff --git a/src/third-party/qxtglobalshortcut_x11.cpp b/src/third-party/qxtglobalshortcut_x11.cpp index 87b1198..60969ac 100644 --- a/src/third-party/qxtglobalshortcut_x11.cpp +++ b/src/third-party/qxtglobalshortcut_x11.cpp @@ -29,16 +29,18 @@ ** *****************************************************************************/ -#include -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) -# include -#else -# include -# include -# include -#endif -#include +/**************************************************************************** + * + * Note: This file is a modified version for QTerminal! + * + ****************************************************************************/ + +#include +#include + +#include +#include namespace { @@ -92,14 +94,7 @@ class QxtX11Data { public: QxtX11Data() { -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) m_display = QX11Info::display(); -#else - QPlatformNativeInterface *native = qApp->platformNativeInterface(); - void *display = native->nativeResourceForScreen(QByteArray("display"), - QGuiApplication::primaryScreen()); - m_display = reinterpret_cast(display); -#endif } bool isValid() @@ -152,16 +147,6 @@ private: } // namespace -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) -bool QxtGlobalShortcutPrivate::eventFilter(void *message) -{ - XEvent *event = static_cast(message); - if (event->type == KeyPress) - { - XKeyEvent *key = reinterpret_cast(event); - unsigned int keycode = key->keycode; - unsigned int keystate = key->state; -#else bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, void *message, long *result) { @@ -185,16 +170,12 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, keystate |= Mod4Mask; if(kev->state & XCB_MOD_MASK_SHIFT) keystate |= ShiftMask; -#endif activateShortcut(keycode, // Mod1Mask == Alt, Mod4Mask == Meta keystate & (ShiftMask | ControlMask | Mod1Mask | Mod4Mask)); } -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) - return prevEventFilter ? prevEventFilter(message) : false; -#else - return false; -#endif + + return false; } quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers) diff --git a/src/translations/qterminal_cs.ts b/src/translations/qterminal_cs.ts index 5a0ef4e..f13ae62 100644 --- a/src/translations/qterminal_cs.ts +++ b/src/translations/qterminal_cs.ts @@ -437,6 +437,48 @@ Key + + + No scrollbar + + + + + + Left + + + + + + Right + + + + + Top + + + + + Bottom + + + + + No move + + + + + Move start + + + + + Move end + + diff --git a/src/translations/qterminal_de.ts b/src/translations/qterminal_de.ts index 5c6adf5..01d49f4 100644 --- a/src/translations/qterminal_de.ts +++ b/src/translations/qterminal_de.ts @@ -1,6 +1,6 @@ - + BookmarksWidget @@ -36,129 +36,154 @@ MainWindow - + Close Tab - Tab schließen + Reiter schließen - + Split Terminal Horizontally Terminal horizontal teilen - + Split Terminal Vertically Terminal vertikal teilen - + Collapse Subterminal Unterterminal schließen - + Next Subterminal - Nächster Unterterminal + Nächstes Unterterminal - + Previous Subterminal - Voriger Unterterminal + Voriges Unterterminal - + Next Tab - Nächster Tab + Nächster Reiter - + Previous Tab - Voriger Tab + Voriger Reiter - + Move Tab Left - Tab nach links verschieben + Reiter nach links verschieben - + Move Tab Right - Tab nach rechts verschieben + Reiter nach rechts verschieben - + Copy Selection Textauswahl kopieren - + Paste Selection Textauswahl einfügen - + Save Session Sitzung speichern - + Load Session Sitzung laden - + + New Tab From Preset + Neuer Reiter von Vorlage + + + + 1 Terminal + 1 Terminal + + + + 2 Horizontal Terminals + 2 horizontale Terminals + + + + 2 Vertical Terminals + 2 vertikale Terminals + + + + 4 Terminals + 4 Terminals + + + Bottom Unten - + Top Oben - - + + Right Rechts - - + + Left Links - + Tabs Layout - Anzeige Tableiste + Anzeige Reiterleiste - + None Keine - + Scrollbar Layout Anzeige Bildlaufleiste - + Exit QTerminal QTerminal beenden - + Do not ask again Nicht erneut nachfragen - + Are you sure you want to exit? Sind Sie sicher, dass Sie QTerminal beenden wollen? - + A lightweight multiplatform terminal emulator Ein schlanker plattformunabhängiger Terminalemulator @@ -168,285 +193,343 @@ Lesezeichen - + Rename Session Sitzung umbenennen - + Press "%1" to see the terminal. - Tippen Sie "%1", um den Terminal zu sehen. + Tippen Sie "%1", um das Terminal zu sehen. - + Clear Current Tab - Aktuellen Tab leeren + Aktuellen Reiter leeren - + Paste Clipboard Zwischenablage einfügen - + Zoom in Vergrößern - + Zoom out Verkleinern - + Zoom reset Zurücksetzen - + Find... Suchen... - + Toggle Menu Menü ein-/ausblenden - + New Tab - Neuer Tab + Neuer Reiter - + New Window Neues Fenster - + Hide Window Borders Fensterrahmen ausblenden - + Show Tab Bar - Tabzeile anzeigen + Reiterleiste anzeigen PropertiesDialog - - QTerminal Properties - QTerminal-Einstellungen - - - - Terminal Font - Terminalschrift - - - - Look and Feel - Aussehen - - - - - History - Historie - - - + Emulation Emulation - + Shortcuts Tastenkürzel - + + Terminal settings + Terminaleinstellungen + + + + Appearance + Erscheinungsbild + + + + + Behavior + Verhalten + + + + Dropdown + Aufklappen + + + + Color scheme + Farbschema + + + + Widget style + Stil der Bedienelemente + + + + Scrollbar position + Position der Bildlaufleiste + + + + Tabs position + Position der Reiter + + + + Show the menu bar + Menüleiste anzeigen + + + + Show a border around the current terminal + Aktuelles Terminal einrahmen + + + + Application transparency + Transparenz der Anwendung + + + + Terminal transparency + Transparenz des Terminals + + + + Start with preset: + Start mit Vorlage: + + + + None (single terminal) + Keine (ein Terminal) + + + + 2 terminals horizontally + 2 horizontale Terminals + + + + 2 terminals vertically + 2 vertikale Terminals + + + + 4 terminals + 4 Terminals + + + Font Schriftart - - &Set Font... - &Schriftart wählen... + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>Verhalten des Emulators wählen. Hinweis: Emulationsarten können auch unter anderen Systemen genutzt werden (z.B. "linux" unter OS X).</p><p>Die Standardemulation ist <span style=" font-weight:600;">default</span> mit minimalem Funktionsumfang.</p></body></html> - - Color Scheme: - Farbschema: + + Action after paste + Aktion nach Einfügen aus der Zwischenablage - - GUI Style: - GUI-Stil: + + Open new terminals in current working directory + Neues Terminal im aktuellen Verzeichnis öffnen - - Scrollbar Position: - Position der Bildlaufleiste: + + Ask for confirmation when closing + Beim Schließen eines Fensters nachfragen - - Tabs Position: - Position der Tabs: + + Unlimited history + Uneingeschränkte Historie - - &Application Transparency: - &Transparenz der Anwendung: + + History size (in lines) + Historie (Zeilen) - - + + Height + Höhe + + + + + % + % + + + + Width + Breite + + + + Edit bookmark file contents + Lesezeichendatei bearbeiten + + + + Enable bookmarks + Lesezeichen verwenden + + + + Bookmark file + Lesezeichendatei + + + + % % - - Terminal Transparency: - Transparenz des Terminals: - - - - Limited to: - Eingeschränkt auf: - - - - Unlimited - keine Einschränkung - - - - Emulation Type - Emulationsart - - - - Select emulation behaviour. It does not mean that for example "linux" has to be used only on Linux OS. Feel free to use it on Mac too etc.<p>Default is the failback type with minimal feature set. - Verhalten des Emulators wählen. Hinweis: Emulationsarten können auch unter anderen Systemen genutzt werden (z.B. "linux" unter OS X).<p>Die Standardemulation ist "default" mit minimalem Funktionsumfang. - - - + Shortcut Tastenkürzel - + Key Taste - - DropDown - Aufklappen - - - + Bookmarks Lesezeichen - - Note: only fixed width font are allowed to be used in terminal - Anmerkung: nur Festbreit-Schriften können im Terminal verwendet werden. - - - - Action after paste clipboard - Aktion nach Einfügen aus der Zwischenablage - - - - &Highlight Current Terminal With Border - Aktuellen Terminal einrahmen - - - - Ask for Window Closing Confirmation - Beim Schließen eines Fensters nachfragen + + Hide tab bar with only one tab + Reiterleiste bei nur einem Reiter vergergen - Open New Sub-Terminals in Current Working Dir - Neuen Unterterminal im aktuellen Verzeichnis öffnen + &Change... + &Ändern... - - Show Main Menu - Hauptmenü anzeigen - - - - Always Show Tabs - Tabs immer anzeigen - - - + Show on start Beim Start anzeigen - + Size Größe - - Height %: - Höhe in %: - - - - Width %: - Breite in %: - - - + Shortcut: Tastenkürzel: - - Edit File Content - Datei bearbeiten - - - - Use Bookmarks - Lesezeichen verwenden - - - - Bookmark FIle: - Lesezeichendatei: - - - + Find... Suchen... - + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. Sie können eine Datei für eigene Lesezeichen angeben. Das erlaubt einfachen Austausch mit Werkzeugen wie OwnCloud oder DropBox. - - + + No scrollbar + Keine Bildlaufleiste + + + + + Left + Links + + + + + Right + Rechts + + + + Top + Oben + + + + Bottom + Unten + + + + No move + Nicht bewegen + + + + Move start + An den Anfang bewegen + + + + Move end + An das Ende bewegen + + + + System Default Systemstandard - + Open or create bookmarks file - Lesezeichendatei öffnen + Lesezeichendatei öffnen oder erstellen @@ -457,7 +540,7 @@ Lokale Lesezeichen - + Synchronized Bookmarks Synchronisierte Lesezeichen @@ -473,12 +556,12 @@ Tab name - Tabbezeichnung + Reiterbezeichnung New tab name: - Neue Tabbezeichnung: + Neue Reiterbezeichnung: @@ -504,49 +587,6 @@ Liste der gespeicherten Sitzungen: - - TermWidgetImpl - - Copy Selection - Textauswahl kopieren - - - Paste Clipboard - Zwischenablage einfügen - - - Paste Selection - Textauswahl einfügen - - - Zoom in - Vergrößern - - - Zoom out - Verkleinern - - - Zoom reset - Zurücksetzen - - - Clear Active Terminal - Aktiven Terminal leeren - - - Split Terminal Horizontally - Terminal horizontal teilen - - - Split Terminal Vertically - Terminal vertikal teilen - - - Collapse Subterminal - Unterterminal schließen - - mainWindow @@ -562,7 +602,7 @@ Edit - + Bearbeiten @@ -597,7 +637,7 @@ &Quit - Beenden + &Beenden diff --git a/src/translations/qterminal_es.ts b/src/translations/qterminal_es.ts index 4529d01..ffc5bde 100644 --- a/src/translations/qterminal_es.ts +++ b/src/translations/qterminal_es.ts @@ -442,16 +442,46 @@ Acceso rápido + + No scrollbar + + + + + + Left + Izquierda + + + + + Right + Derecha + + + + Top + Arriba + + + + Bottom + Abajo + + + No move - No mover + No mover + Move start - Mover al inicio + Mover al inicio + Move end - Mover al final + Mover al final diff --git a/src/translations/qterminal_et.ts b/src/translations/qterminal_et.ts index 238b670..720ddf4 100644 --- a/src/translations/qterminal_et.ts +++ b/src/translations/qterminal_et.ts @@ -449,6 +449,48 @@ Key Klahv + + + No scrollbar + + + + + + Left + Vasakul + + + + + Right + Paremal + + + + Top + Ülal + + + + Bottom + All + + + + No move + + + + + Move start + + + + + Move end + + diff --git a/src/translations/qterminal_hu.ts b/src/translations/qterminal_hu.ts new file mode 100644 index 0000000..02476c7 --- /dev/null +++ b/src/translations/qterminal_hu.ts @@ -0,0 +1,643 @@ + + + + + BookmarksWidget + + + Filter: + Szűrő: + + + + FontDialog + + + + Select Terminal Font + Terminál-betűválasztás + + + + Font: + Betű: + + + + Size: + Méret: + + + + Preview + Előkép + + + + MainWindow + + + Close Tab + Lap bezárás + + + + Split Terminal Horizontally + Terminál vízszintes felosztás + + + + Split Terminal Vertically + Terminál függélyes felosztás + + + + Collapse Subterminal + Alterminál bezárás + + + + Next Subterminal + Következő alterminál + + + + Previous Subterminal + Előző alterminál + + + + Next Tab + Következő lap + + + + Previous Tab + Előző lap + + + + Move Tab Left + Lap balra + + + + Move Tab Right + Lap jobbra + + + + Copy Selection + Másolás + + + + Paste Selection + Beillesztés + + + + Save Session + Helyzet mentés + + + + Load Session + Helyzet betöltés + + + + New Tab From Preset + Új lap beállítása + + + + 1 Terminal + 1 terminál + + + + 2 Horizontal Terminals + 2 vízszintes terminál + + + + 2 Vertical Terminals + 2 függőleges terminál + + + + 4 Terminals + 4 terminál + + + + Bottom + Alul + + + + Top + Felül + + + + + Right + Jobbra + + + + + Left + Balra + + + + Tabs Layout + Lapfül + + + + None + Nincs + + + + Scrollbar Layout + Gördítősáv + + + + Exit QTerminal + QTerminal befejezése + + + + Do not ask again + Többé nem kérdez + + + + Are you sure you want to exit? + Biztosan kilép? + + + + A lightweight multiplatform terminal emulator + Könnyed általános terminál emulátor + + + + Bookmarks + Könyvjelzők + + + + Rename Session + Helyzet átnevezés + + + + Press "%1" to see the terminal. + Billentyűzzön "%1"-t, hogy lássa a terminált. + + + + Clear Current Tab + Aktuális lap törlése + + + + Paste Clipboard + Vágólapról beillesztés + + + + Zoom in + Nagyít + + + + Zoom out + Kicsinyít + + + + Zoom reset + Visszaállít + + + + Find... + Keres... + + + + Toggle Menu + Menü ki/be + + + + New Tab + Új lap + + + + New Window + Új ablak + + + + Hide Window Borders + Ablakkeret ki + + + + Show Tab Bar + Fülsáv látszik + + + + PropertiesDialog + + + Emulation + Emuláció + + + + Shortcuts + Gyorsbillentyűk + + + + Terminal settings + Terminál beállítások + + + + Appearance + Megjelenés + + + + + Behavior + Viselkedés + + + + Dropdown + Felgördítés + + + + Color scheme + Színséma + + + + Widget style + Elemstílus + + + + Scrollbar position + Gördítősáv helyzete + + + + Tabs position + Lapfülek helyzete + + + + Show the menu bar + Menüsáv + + + + Show a border around the current terminal + Aktuális terminál bekeretezése + + + + Application transparency + Alkalmazás áttetszősége + + + + Terminal transparency + Terminál áttetszősége + + + + Start with preset: + Új terminál indulási beállítás: + + + + None (single terminal) + Nincs (1 terminál) + + + + 2 terminals horizontally + 2 vízszintes terminál + + + + 2 terminals vertically + 2 függőleges terminál + + + + 4 terminals + 4 terminál + + + + Font + Betűtípus + + + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>Az emulátor viselkedésének kiválasztása, mivel egyes emulátorok más rendszerek alatt is használatosak.</p><p>Az alapemuláció az <span style=" font-weight:600;">alapértelmezett</span> a legkevesebb lehetőséggel.</p></body></html> + + + + Action after paste + Beillesztés utáni teendő + + + + Open new terminals in current working directory + Új terminál a munkakönyvtárban nyílik + + + + Ask for confirmation when closing + Ablakbecsukáskor megerősítés kérés + + + + Unlimited history + Korlátlan naplózás + + + + History size (in lines) + Naplóméret (sorok) + + + + Height + Magasság + + + + + % + % + + + + Width + Szélesség + + + + Edit bookmark file contents + Könyvjelzőfájl szerkesztés + + + + Enable bookmarks + Könyvjelzőhasználat + + + + Bookmark file + Könyvjelzőfájl + + + + + % + % + + + + Shortcut + Gyorsbillentyű + + + + Key + Billentyű + + + + Bookmarks + Könyvjelzők + + + + Hide tab bar with only one tab + Egy lapnál nincs lapfülsáv + + + + &Change... + &Változtat... + + + + Show on start + Induláskor látszik + + + + Size + Méret + + + + Shortcut: + Gyorsbillentyű: + + + + Find... + Keres... + + + + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. + Saját könyvjelzőfájl adható meg, ezáltal más eszözök is könnyedén használhatók, mint például az OwnCloud vagy a DropBox. + + + + No scrollbar + Nincs gördítősáv + + + + + Left + Balra + + + + + Right + Jobbra + + + + Top + Felül + + + + Bottom + Alul + + + + No move + Áll + + + + Move start + Kezdetre + + + + Move end + Végére + + + + + System Default + Rendszer alapértelmezett. + + + + Open or create bookmarks file + Könyvjelzőfájl nyitás + + + + QObject + + + Local Bookmarks + Helyi könyvjelzők + + + + Synchronized Bookmarks + Szinkronizált könyvjelzők + + + + TabWidget + + + + Shell No. %1 + Héj Nr. %1 + + + + Tab name + Lapnév + + + + New tab name: + Új lapnév: + + + + Close session + Menet bezárása + + + + Rename session + Menet átnevezése + + + + TermWidgetHolder + + + Load Session + Munkamenet betöltés + + + + List of saved sessions: + Tárolt munkamenet lista: + + + + mainWindow + + + Actions + Művelet + + + + Help + Segítség + + + + Edit + Szerkeszt + + + + About... + Névjegy... + + + + About Qt... + A Qt-ról... + + + + &Preferences... + &Beállítások... + + + + MainWindow + Főablak + + + + File + Fájl + + + + View + Nézet + + + + &Quit + &Kilép + + + diff --git a/src/translations/qterminal_it.ts b/src/translations/qterminal_it.ts index 633105a..877086f 100644 --- a/src/translations/qterminal_it.ts +++ b/src/translations/qterminal_it.ts @@ -445,6 +445,48 @@ Key Chiave + + + No scrollbar + + + + + + Left + Sinistra + + + + + Right + Destra + + + + Top + Alto + + + + Bottom + Basso + + + + No move + + + + + Move start + + + + + Move end + + diff --git a/src/translations/qterminal_ja.ts b/src/translations/qterminal_ja.ts new file mode 100644 index 0000000..107b0d8 --- /dev/null +++ b/src/translations/qterminal_ja.ts @@ -0,0 +1,658 @@ + + + + + BookmarksWidget + + + Filter: + フィルタ: + + + + FontDialog + + + + Select Terminal Font + ターミナルフォントの選択 + + + + Font: + フォント: + + + + Size: + サイズ: + + + + Preview + プレビュー + + + + MainWindow + + + &Close Tab + タブを閉じる(&C) + + + + Split Terminal &Horizontally + ターミナルの上下分割(&H) + + + + Split Terminal &Vertically + ターミナルの左右分割(&V) + + + + &Collapse Subterminal + サブターミナルを折りたたむ(&C) + + + + N&ext Subterminal + 次のサブターミナル(&E) + + + + P&revious Subterminal + 前のサブターミナル(&R) + + + + &Next Tab + 次のタブ(&N) + + + + &Previous Tab + 前のタブ(&P) + + + + Move Tab &Left + タブを左へ移動(&L) + + + + Move Tab &Right + タブを右へ移動(&R) + + + + Copy &Selection + 選択部分をコピー(&S) + + + + Paste S&election + 選択部分を貼り付け(&E) + + + + &Save Session + セッションを保存(&S) + + + + &Load Session + セッションを読出(&L) + + + + New Tab From &Preset + 新規タブをプリセットで開く(&P) + + + + 1 &Terminal + 画面分割なし(&T) + + + + 2 &Horizontal Terminals + 上下2分割(&H) + + + + 2 &Vertical Terminals + 左右2分割(&V) + + + + 4 Terminal&s + 4分割(&S) + + + + &Bottom + 下(&B) + + + + &Top + 上(&T) + + + + + &Right + 右(&R) + + + + + &Left + 左(&L) + + + + &Tabs Layout + タブの位置(&T) + + + + &None + なし(&N) + + + + S&crollbar Layout + スクロールバーの位置(&C) + + + + Exit QTerminal + QTerminal終了 + + + + Do not ask again + 次から確認しない + + + + Are you sure you want to exit? + 終了してもよろしいですか? + + + + A lightweight multiplatform terminal emulator + 軽量マルチプラットフォーム ターミナルエミュレータ + + + + Bookmarks + ブックマーク + + + + Rename Session + タブ名の変更 + + + + Press "%1" to see the terminal. + "%1"を押すとそのターミナルを見ることができます + + + + &Clear Current Tab + 現在のタブをクリア(&C) + + + + Paste Clip&board + クリップボードの貼り付け(&B) + + + + Zoom &in + ズームイン(&I) + + + + Zoom &out + ズームアウト(&O) + + + + Zoom rese&t + ズームリセット(&T) + + + + &Find... + 検索(&F)... + + + + &Toggle Menu + トグルメニュー(&T) + + + + &New Tab + 新規タブ(&N) + + + + &New Window + 新規ウィンドウ(&N) + + + + &Hide Window Borders + ウィンドウ枠を隠す(&H) + + + + &Show Tab Bar + タブを表示(&S) + + + + Fullscreen + フルスクリーン + + + + PropertiesDialog + + + Emulation + エミュレーション + + + + Shortcuts + ショートカット + + + + Terminal settings + ターミナルの設定 + + + + Appearance + 外観 + + + + + Behavior + 挙動 + + + + Dropdown + ドロップダウン + + + + Color scheme + 配色 + + + + Widget style + ウィジェットのスタイル + + + + Scrollbar position + スクロールバーの位置 + + + + Tabs position + タブの位置 + + + + Show the menu bar + メニューバーの表示 + + + + Show a border around the current terminal + カレントターミナルの境界を表示 + + + + Application transparency + アプリケーションの透過 + + + + Terminal transparency + ターミナルの透過 + + + + Start with preset: + プリセットでスタート + + + + None (single terminal) + 画面分割なし + + + + 2 terminals horizontally + 上下2分割 + + + + 2 terminals vertically + 左右2分割 + + + + 4 terminals + 4分割 + + + + Font + フォント + + + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>エミュレータの挙動の選択。注意して頂きたいのは、この選択はオペレーティングシステムと適合する必要はありません。</p><p> <span style=" font-weight:600;">default</span>エミュレーションは最小の機能にフォールバックしたものです。</p></body></html> + + + + Action after paste + 貼り付け後の挙動 + + + + Open new terminals in current working directory + カレントディレクトリに新しいターミナルを開く + + + + Save Size when closing + 閉じるときにサイズを保存する + + + + Save Position when closing + 閉じるときに位置を保存する + + + + Ask for confirmation when closing + 閉じるときに確認する + + + + Unlimited history + 履歴を制限しない + + + + History size (in lines) + 履歴 (行数) + + + + Height + 高さ + + + + + % + % + + + + Width + + + + + Edit bookmark file contents + ブックマークの内容を編集する + + + + Enable bookmarks + ブックマークを利用可能にする + + + + Bookmark file + ブックマークファイル + + + + + % + % + + + + Shortcut + ショートカット + + + + Key + キー割当 + + + + Bookmarks + ブックマーク + + + + Hide tab bar with only one tab + 1つのタブしか使用していない場合、タブバーを隠す + + + + &Change... + 変更(&C)... + + + + Show on start + 起動時に表示します + + + + Size + サイズ + + + + Shortcut: + ショートカット: + + + + Find... + 検索... + + + + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. + ブックマークファイルの場所を指定することができます。OwnCloudやDropboxのようなツールとブックマークを共有することが容易にできます。 + + + + No scrollbar + スクロールバーなし + + + + + Left + + + + + + Right + + + + + Top + + + + + Bottom + + + + + No move + 無動作 + + + + Move start + 動作開始 + + + + Move end + 動作終了 + + + + + System Default + システムの既定 + + + + Open or create bookmarks file + ブックマークファイルを開く、または新規作成 + + + + QObject + + + Local Bookmarks + ローカルブックマーク + + + + Synchronized Bookmarks + ブックマークの同期 + + + + TabWidget + + + + Shell No. %1 + Shell No. %1 + + + + Tab name + タブの名前 + + + + New tab name: + タブの新しい名前: + + + + Close session + タブを閉じる + + + + Rename session + タブ名の変更 + + + + TermWidgetHolder + + + Load Session + セッションの読込 + + + + List of saved sessions: + 保存されたセッションリスト: + + + + mainWindow + + + &Actions + 操作(&A) + + + + &Help + ヘルプ(&H) + + + + &Edit + 編集(&E) + + + + &About... + QTerminalについて(&A)... + + + + About &Qt... + Qtについて(&Q)... + + + + &Preferences... + 設定(&P)... + + + + MainWindow + + + + + &File + ファイル(&F) + + + + &View + 表示(&V) + + + + &Quit + 終了(&Q) + + + diff --git a/src/translations/qterminal_pt.ts b/src/translations/qterminal_pt.ts new file mode 100644 index 0000000..3711f6b --- /dev/null +++ b/src/translations/qterminal_pt.ts @@ -0,0 +1,643 @@ + + + + + BookmarksWidget + + + Filter: + Filtrar: + + + + FontDialog + + + + Select Terminal Font + Escolha o tipo de letra + + + + Font: + Tipo de letra: + + + + Size: + Tamanho: + + + + Preview + Pré-visualização + + + + MainWindow + + + Close Tab + Fechar separador + + + + Split Terminal Horizontally + Separar na horizontal + + + + Split Terminal Vertically + Separar na vertical + + + + Collapse Subterminal + Recolher subterminal + + + + Next Subterminal + Próximo subterminal + + + + Previous Subterminal + Subterminal anterior + + + + Next Tab + Novo separador + + + + Bookmarks + Marcadores + + + + Rename Session + Renomear sessão + + + + Press "%1" to see the terminal. + Prima %1 para ver o terminal. + + + + Clear Current Tab + Fechar separador atual + + + + Previous Tab + Separador anterior + + + + Move Tab Left + Mover separador para a esquerda + + + + Move Tab Right + Mover separador para a direita + + + + Copy Selection + Copiar seleção + + + + Paste Clipboard + Colar da área de transferência + + + + Paste Selection + Colar da seleção + + + + Zoom in + Ampliar + + + + Zoom out + Reduzir + + + + Zoom reset + Repor ampliação + + + + Find... + Localizar... + + + + Save Session + Guardar sessão + + + + Load Session + Carregar sessão + + + + Toggle Menu + Alternar menu + + + + New Tab + Novo separador + + + + New Tab From Preset + Novo separador de pré-ajuste + + + + 1 Terminal + 1 terminal + + + + 2 Horizontal Terminals + 2 terminais horizontais + + + + 2 Vertical Terminals + 2 terminais verticais + + + + 4 Terminals + 4 terminais + + + + New Window + Nova janela + + + + Hide Window Borders + Ocultar contornos da janela + + + + Show Tab Bar + Mostrar barra de separadores + + + + Bottom + Baixo + + + + Top + Cima + + + + + Right + Direita + + + + + Left + Esquerda + + + + Tabs Layout + Posição dos separadores + + + + None + Nenhum + + + + Scrollbar Layout + Posição da barra de deslocação + + + + Exit QTerminal + Sair do QTerminal + + + + Do not ask again + Não perguntar novamente + + + + Are you sure you want to exit? + Tem a certeza de que deseja sair? + + + + A lightweight multiplatform terminal emulator + Um emulador de terminal multiplataforma + + + + PropertiesDialog + + + Emulation + Emulação + + + + Shortcuts + Atalhos + + + + Terminal settings + Definições do terminal + + + + Appearance + Aparência + + + + + Behavior + Comportamento + + + + Dropdown + Suspenso + + + + Bookmarks + Marcadores + + + + Color scheme + Esquema de cores + + + + Widget style + Estilo do widget + + + + Scrollbar position + Posição da barra de deslocação + + + + Tabs position + Posição dos separadores + + + + Show the menu bar + Mostrar barra de menu + + + + Always show the tab bar + Mostrar sempre a barra de separadores + + + + Show a border around the current terminal + Mostrar contornos do terminal + + + + Application transparency + Transparência da aplicação + + + + Terminal transparency + Transparência do terminal + + + + Start with preset: + Iniciar com pré-ajuste: + + + + None (single terminal) + Não (um terminal) + + + + 2 terminals horizontally + 2 terminais horizontais + + + + 2 terminals vertically + 2 terminais verticais + + + + 4 terminals + 4 terminais + + + + Font + Tipo de letra + + + + &Set Font... + &Definir tipo de letra... + + + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>O comportamento a emular. Tenha em atenção que esta opção não tem que ser igual à do sistema operativo.</p><p>A emulação <span style=" font-weight:600;">pré-definida</span> possui um conjunto mínimo de funcionalidades.</p></body></html> + + + + Action after paste + Ação depois de colar + + + + Open new terminals in current working directory + Abrir novos terminais no diretório de trabalho atual + + + + Ask for confirmation when closing + Confirmar antes de fechar + + + + Unlimited history + Histórico ilimitado + + + + History size (in lines) + Limitar histórico (linhas) + + + + Height + Altura + + + + + % + % + + + + Width + Largura + + + + Edit bookmark file contents + Editar conteúdo do ficheiro de marcadores + + + + Enable bookmarks + Ativar marcadores + + + + Bookmark file + Ficheiro de marcadores + + + + Show on start + Mostrar ao iniciar + + + + Size + Tamanho + + + + Shortcut: + Atalho: + + + + Find... + Localizar... + + + + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. + Pode especificar a localização do ficheiro de marcadores. Permite a partilha de marcadores através do Own Cloud, Dropbox e mais serviços. + + + + + % + % + + + + Shortcut + Atalho + + + + Key + Tecla + + + + No scrollbar + Sem barra de deslocação + + + + + Left + Esquerda + + + + + Right + Direita + + + + Top + Cima + + + + Bottom + Baixo + + + + No move + Não mover + + + + Move start + Mover para o inicio + + + + Move end + Mover para o fim + + + + + System Default + Predefinições + + + + Open or create bookmarks file + Abrir ou criar um ficheiro de marcadores + + + + QObject + + + Local Bookmarks + Marcadores locais + + + + Synchronized Bookmarks + Marcadores sincronizados + + + + TabWidget + + + + Shell No. %1 + Consola n.º %1 + + + + Tab name + Nome do separador + + + + New tab name: + Nome do novo separador: + + + + Close session + Fechar sessão + + + + Rename session + Renomear sessão + + + + TermWidgetHolder + + + Load Session + Carregar sessão + + + + List of saved sessions: + Lista de sessões guardadas: + + + + mainWindow + + + MainWindow + Janela principal + + + + File + Ficheiro + + + + Actions + Ações + + + + Help + Ajuda + + + + View + Ver + + + + Edit + Editar + + + + &Quit + &Sair + + + + About... + Sobre... + + + + About Qt... + Sobre Qt... + + + + &Preferences... + &Preferências... + + + diff --git a/src/translations/qterminal_ru.ts b/src/translations/qterminal_ru.ts index 0fad9cd..11d8eec 100644 --- a/src/translations/qterminal_ru.ts +++ b/src/translations/qterminal_ru.ts @@ -35,212 +35,230 @@ MainWindow - - Add Tab - Новая вкладка - - - - Close Tab - Закрыть вкладку - - - - Split Terminal Horizontally - Разделить терминал по горизонтали - - - - Split Terminal Vertically - Разделить терминал по вертикали - - - - Collapse Subterminal - Закрыть подтерминал - - - - Next Subterminal - Следующий подтерминал - - - - Previous Subterminal - Предыдущий подтерминал - - - - Next Tab - Следующая вкладка - Bookmarks Закладки - + Rename Session Переименовать сессию - + Press "%1" to see the terminal. Нажмите "%1" чтобы увидеть терминал. + + + &Clear Current Tab + &Очистить текущую вкладку + + + + &Next Tab + &Следующая вкладка + - Clear Current Tab - Очистить текущую вкладку + &Previous Tab + &Предыдущая вкладка + + + + Move Tab &Left + Сдвинуть вкладку &влево - Previous Tab - Предыдущая вкладка + Move Tab &Right + Сдвинуть вкладку &вправо - - Move Tab Left - Сдвинуть вкладку влево + + Split Terminal &Horizontally + Разделить терминал по &горизонтали - - Move Tab Right - Сдвинуть вкладку вправо + + Split Terminal &Vertically + Разделить терминал по &вертикали - - Copy Selection - Скопировать выделенное + + &Collapse Subterminal + &Закрыть подтерминал - - Paste Clipboard - Вставить из буфера + + N&ext Subterminal + С&ледующий подтерминал - - Paste Selection - Вставить выделенное + + P&revious Subterminal + П&редыдущий подтерминал - - Zoom in - Увеличить + + Copy &Selection + Скопировать &выделенное - - Zoom out - Уменьшить + + Paste Clip&board + Вставить из буф&ера - - Zoom reset - Сбросить увеличение + + Paste S&election + Вставить в&ыделенное + + + + Zoom &in + &Увеличить + + + + Zoom &out + &Уменьшить + + + + Zoom rese&t + &Сбросить увеличение - Find... - Найти... + &Find... + &Найти... - - Save Session - Сохранить сессию + + &Save Session + &Сохранить сеанс - - Load Session - Загрузить сессию + + &Load Session + &Загрузить сеанс - - Toggle Menu - Показать строку меню + + &Toggle Menu + &Показать строку меню - - New Tab - Новая вкладка + + &New Tab + &Новая вкладка + + + + New Tab From &Preset + Новая вкладка из &шаблонов + + + + 1 &Terminal + 1 &терминал - New Window - Новое окно + 2 &Horizontal Terminals + 2 &горизонтальных терминала - - Hide Window Borders - Спрятать рамку окна + + 2 &Vertical Terminals + 2 &вертикальных терминала - - Show Tab Bar - Показать панель вкладок + + 4 Terminal&s + 4 терминал&а - Toggle Borderless - Без рамки + + &Close Tab + &Закрыть вкладку - Toggle TabBar - Без панели вкладок + + &New Window + &Новое окно - - Bottom - Снизу + + &Hide Window Borders + &Спрятать рамку окна - - Top - Сверху + + &Show Tab Bar + &Показать панель вкладок - - - Right - Справа + + Fullscreen + Во весь экран - - - Left - Слева + + &Bottom + &Снизу - - Tabs Layout - Расположение вкладок + + &Top + &Сверху - - None - Убрать + + + &Right + &Справа - - Scrollbar Layout - Расположение полосы прокрутки + + + &Left + &Слева - + + &Tabs Layout + Расположение &вкладок + + + + &None + &Убрать + + + + S&crollbar Layout + Расположение по&лосы прокрутки + + + Exit QTerminal Выйти из QTerminal - + Do not ask again Не справшивать снова - + Are you sure you want to exit? Вы уверены, что хотите выйти? - + A lightweight multiplatform terminal emulator Лёгкий мультиплатформенный эмулятор терминала @@ -248,222 +266,286 @@ PropertiesDialog - - QTerminal Properties - Настройки QTerminal - - - - Terminal Font - Шрифт терминала - - - - Look and Feel - Внешний вид - - - - - History - История - - - + Emulation Эмуляция - + Shortcuts Сочетания клавиш - - DropDown - Выпадающий + + Terminal settings + Настройки терминала - + + Appearance + Внешний вид + + + + + Behavior + Поведение + + + + Dropdown + Выпадающий терминал + + + Bookmarks Закладки - + + Color scheme + Цветовая схема + + + + Widget style + Графический стиль + + + + Scrollbar position + Расположение полосы прокрутки + + + + Tabs position + Расположение вкладок + + + + Show the menu bar + Показать панель меню + + + + Show a border around the current terminal + Показывать границу вокруг текущего терминала + + + + Application transparency + Прозрачность приложения + + + + Terminal transparency + Прозрачность терминала + + + + Start with preset: + Начинать с предустановкой: + + + + None (single terminal) + Нет (один терминал) + + + + 2 terminals horizontally + 2 горизонтальных терминала + + + + 2 terminals vertically + 2 вертикальных терминала + + + + 4 terminals + 4 терминала + + + Font Шрифт - - &Set Font... - &Выбрать шрифт... + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>Какое поведение эмулировать. Обратите внимание, что это не обязательно должн осоответствовать вашей операционной системе.</p><p>Эмуляция <span style=" font-weight:600;">по умолчанию</span> — это запасной режим с минимальным набором функций.</p></body></html> - - Note: only fixed width font are allowed to be used in terminal - Заметка: для использования в терминале разрешены только шрифты фиксированной ширины + + Action after paste + Действие после вставки - - Action after paste clipboard - Действие после вставки из буфера + + Open new terminals in current working directory + Открывать новые терминалы в текущей рабочей папке - - Color Scheme: - Цветовая схема: + + Save Size when closing + Запоминать размер при закрытии - - GUI Style: - Стиль GUI: + + Save Position when closing + Запоминать расположение при закрытии - - Scrollbar Position: - Расположение полосы прокрутки: + + Ask for confirmation when closing + Запрашивать подтверждение при закрытии - - Always Show Tabs - Всегда показывать вкладки + + Unlimited history + Неограниченная история - + + History size (in lines) + Размер истории (в строках) + + + + Height + Высота + + + + + % + + + + + Width + Ширина + + + + Edit bookmark file contents + Изменить содержимое файла закладок + + + + Enable bookmarks + Включить закладки + + + + Bookmark file + Файл закладок + + + Show on start Показать при запуске - + + Hide tab bar with only one tab + Прятать панель вкладок только с одной вкладкой + + + + &Change... + &Изменить... + + + Size Размер - - Height %: - Высота %: - - - - Width %: - Ширина %: - - - + Shortcut: Сочетание клавиш: - - Edit File Content - Изменить содержимое файла - - - - Use Bookmarks - Использовать закладки - - - - Bookmark FIle: - Файл закладок: - - - + Find... Найти... - + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. Вы можете выбрать ваше собственное место для хранения закладок. Это позволит легко делиться закладками с помощью таких инструментов как OwnCloud или Dropbox. - - Tabs Position: - Расположение вкладок: - - - - &Application Transparency: - &Прозрачность приложения: - - - - + + % % - - Terminal Transparency: - Прозрачность терминала: - - - - &Highlight Current Terminal With Border - &Выделять текущий терминал границами - - - - Ask for Window Closing Confirmation - Подтверждать закрыте окна - - - - Open New Sub-Terminals in Current Working Dir - Открыть новый подтерминал в текущей папке - - - - Show Main Menu - Показать главное меню - - - - Limited to: - Ограничение: - - - - Unlimited - Без ограничения - - - - Emulation Type - Тип эмуляции - - - - Select emulation behaviour. It does not mean that for example "linux" has to be used only on Linux OS. Feel free to use it on Mac too etc.<p>Default is the failback type with minimal feature set. - Выбрать вид эмуляции. Это не означает, что, например, «linux» должно быть использовано только в ОС Linux. Вы можете использовать его на Mac и др.<p>По умолчанию — это запасной режим с минимальным набором функций. - - - + Shortcut Сочетание клавиш - + Key Клавиши - - + + No scrollbar + Без полосы прокрутки + + + + + Left + Слева + + + + + Right + Справа + + + + Top + Сверху + + + + Bottom + Снизу + + + + No move + + + + + Move start + + + + + Move end + + + + + System Default Системный - + Open or create bookmarks file Открыть или создать файл закладок - - Select Terminal Font - Выбрать шрифт терминала - QObject @@ -473,7 +555,7 @@ Локальные закладки - + Synchronized Bookmarks Синхронизированные закладки @@ -481,28 +563,28 @@ TabWidget - - + + Shell No. %1 Оболочка № %1 - + Tab name Имя вкладки - + New tab name: Имя новой вкладки: - + Close session Закрыть сессию - + Rename session Переименовать сессию @@ -520,45 +602,6 @@ Список сохранённых сессий: - - TermWidgetImpl - - Copy Selection - Копировать выделение - - - Paste Clipboard - Вставить из буфера - - - Paste Selection - Вставить выделение - - - Zoom in - Увеличить - - - Zoom out - Уменьшить - - - Zoom reset - Сбросить увеличение - - - Split Terminal Horizontally - Разделить терминал по горизонтали - - - Split Terminal Vertically - Разделить терминал по вертикали - - - Collapse Subterminal - Закрыть подтерминал - - mainWindow @@ -568,56 +611,48 @@ - File - Файл + &File + &Файл - Actions - Действия + &Actions + &Действия - Help - Помощь + &Help + &Справка - View - Вид + &View + &Вид - Edit - Правка + &Edit + &Правка - + + &About... + О &программе... + + + + About &Qt... + О &Qt... + + + &Quit &Выход - &Window - &Окно - - - - About... - О программе... - - - - About Qt... - О QT... - - - + &Preferences... &Настройки... - - &Quit... - &Выйти... - diff --git a/src/translations/qterminal_tr.ts b/src/translations/qterminal_tr.ts new file mode 100644 index 0000000..145bb87 --- /dev/null +++ b/src/translations/qterminal_tr.ts @@ -0,0 +1,609 @@ + + + + + BookmarksWidget + + + Filter: + Süzgeç: + + + + FontDialog + + + + Select Terminal Font + Terminal yazıtipini seç + + + + Font: + Yazıtipi: + + + + Size: + Boyut: + + + + Preview + Önizle + + + + MainWindow + + + Close Tab + Sekmeyi Kapat + + + + Split Terminal Horizontally + Terminali Yatay Olarak Böl + + + + Split Terminal Vertically + Terminali Dikey Olarak Böl + + + + Collapse Subterminal + Altterminali Kapat + + + + Next Subterminal + Sonraki Altterminal + + + + Previous Subterminal + Önceki Altterminal + + + + Next Tab + Sonraki Sekme + + + + Bookmarks + Yer İmleri + + + + Rename Session + Oturumu Yeniden Adlandır + + + + Press "%1" to see the terminal. + Terminali görmek için "%1" e basın. + + + + Clear Current Tab + Mevcut sekmeyi temizle + + + + Previous Tab + Önceki Sekme + + + + Move Tab Left + Sekmeyi Sola Taşı + + + + Move Tab Right + Sekmeyi Sağa Taşı + + + + Copy Selection + Seçimi Kopyala + + + + Paste Clipboard + Panoyu Yapıştır + + + + Paste Selection + Seçimi Yapıştır + + + + Zoom in + Büyüt + + + + Zoom out + Küçült + + + + Zoom reset + Sıfırla + + + + Find... + Bul... + + + + Save Session + Oturumu Kaydet + + + + Load Session + Oturum Yükle + + + + Toggle Menu + Menüyü Değiştir + + + + New Tab + Yeni Sekme + + + + New Window + Yeni Pencere + + + + Hide Window Borders + Pencere Kenarlıklarını Gizle + + + + Show Tab Bar + Sekme Çubuğunu Göster + + + + Bottom + En Aşağı + + + + Top + En Yukarı + + + + + Right + Sağ + + + + + Left + Sol + + + + Tabs Layout + Sekme Düzeni + + + + None + Hiç + + + + Scrollbar Layout + Kaydırma Çubuğu Düzeni + + + + Exit QTerminal + QTerminalden Çık + + + + Do not ask again + Tekrar Sorma + + + + Are you sure you want to exit? + Çıkmak istediğinizden emin misiniz? + + + + A lightweight multiplatform terminal emulator + Hafif bir çok platformlu terminal öykünücüsü + + + + PropertiesDialog + + + QTerminal Properties + Qterminal özellikleri + + + + Terminal Font + Terminal Yazıtipi + + + + Look and Feel + Görünüm + + + + + History + Geçmiş + + + + Emulation + Öykünme + + + + Shortcuts + Kısayollar + + + + DropDown + + + + + Bookmarks + Yer İmleri + + + + Font + Yazıtipi + + + + &Set Font... + Yazıtipini Ay&arla... + + + + Note: only fixed width font are allowed to be used in terminal + Not: Sadece sabit genişlikteki yazıtiplerinin terminalde kullanılmasına müsade edilmiştir + + + + Action after paste clipboard + Panoyu yapıştırdıktan sonraki eylem + + + + Color Scheme: + Renk Şeması: + + + + GUI Style: + GUI Biçemi: + + + + Scrollbar Position: + Kaydırma Çubuğu Konumu: + + + + Show on start + Başlangıçta göster + + + + Size + Boyut + + + + Height %: + Yükseklik %: + + + + Width %: + Genişlik %: + + + + Shortcut: + Kısayol: + + + + Edit File Content + Dosya İçeriğini Düzenle + + + + Use Bookmarks + Yerimleri Kullan + + + + Bookmark FIle: + Yerimi Dosyası: + + + + Find... + Bul... + + + + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. + Kendi yerimleri dosya yolunuzu berlirleyebilirsiniz. OwnCloud veya Dropbox gibi araçlarla yerimlerinizi paylaşmayı kolaylaştırır. + + + + Tabs Position: + Sekmelerin Konumu: + + + + &Application Transparency: + &Uygulama Saydamlığı: + + + + + % + % + + + + Terminal Transparency: + Terminal Saydamlığı: + + + + &Highlight Current Terminal With Border + Mevcut Terminali Kenarlık ile Vurgula + + + + Ask for Window Closing Confirmation + Pencere Kapatma İçin Onay Sor + + + + Open New Sub-Terminals in Current Working Dir + Mecut Çalışma Dizininde Yeni Bir Altterminal Aç + + + + Show Main Menu + Ana Menüyü Göster + + + + Always Show Tabs + Sekmeleri Daima Göster + + + + Limited to: + Sınırla: + + + + Unlimited + Sınırsız + + + + Emulation Type + Öykünme Türü + + + + Select emulation behaviour. It does not mean that for example "linux" has to be used only on Linux OS. Feel free to use it on Mac too etc.<p>Default is the failback type with minimal feature set. + + + + + Shortcut + Kısayol + + + + Key + Anahtar + + + + No scrollbar + Kaydırma çubuğu yok + + + + + Left + Sol + + + + + Right + Sağ + + + + Top + En Yukarı + + + + Bottom + En Aşağı + + + + No move + Taşıma yok + + + + Move start + + + + + Move end + + + + + + System Default + Sistem Varsayılanı + + + + Open or create bookmarks file + Yerimleri dosyası aç ya da oluştur + + + + QObject + + + Local Bookmarks + Yerel Yerimleri + + + + Synchronized Bookmarks + Yerimlerini Eşitle + + + + TabWidget + + + + Shell No. %1 + Kabuk No. %1 + + + + Tab name + Sekme adı + + + + New tab name: + Yeni sekme adı: + + + + Close session + Oturumu kapat + + + + Rename session + Oturumu yeniden adlandır + + + + TermWidgetHolder + + + Load Session + Oturum Yükle + + + + List of saved sessions: + Kaydedilmiş oturum listesi: + + + + TermWidgetImpl + + Split Terminal Horizontally + Rozdělit Terminál Horizontálně + + + + mainWindow + + + MainWindow + Ana Pencere + + + + File + Dosya + + + + Actions + Eylemler + + + + Help + Yardım + + + + View + Görünüm + + + + Edit + Düzenle + + + + &Quit + &Çık + + + + About... + Hakkında... + + + + About Qt... + Qt Hakkında... + + + + &Preferences... + &Tercihler... + + + diff --git a/src/translations/qterminal_zh_CN.ts b/src/translations/qterminal_zh_CN.ts new file mode 100644 index 0000000..4b09960 --- /dev/null +++ b/src/translations/qterminal_zh_CN.ts @@ -0,0 +1,658 @@ + + + + + BookmarksWidget + + + Filter: + 过滤: + + + + FontDialog + + + + Select Terminal Font + 选择终端字体 + + + + Font: + 字体: + + + + Size: + 字体大小: + + + + Preview + 预览 + + + + MainWindow + + + &Close Tab + 关闭标签页(&C) + + + + Split Terminal &Horizontally + 水平布局终端(&H) + + + + Split Terminal &Vertically + 垂直布局终端(&V) + + + + &Collapse Subterminal + 折叠布局终端(&C) + + + + N&ext Subterminal + 弹出终端(&E) + + + + P&revious Subterminal + 上个终端(&R) + + + + &Next Tab + 下个标签页(&N) + + + + &Previous Tab + 最前终端页(&P) + + + + Move Tab &Left + 往左边移动标签页(&L) + + + + Move Tab &Right + 往右边移动标签页(&R) + + + + Copy &Selection + 复制选区(&S) + + + + Paste S&election + 粘贴选区(&E) + + + + &Save Session + 保存会话(&S) + + + + &Load Session + 载入会话(&L) + + + + New Tab From &Preset + 新标签窗口く(&P) + + + + 1 &Terminal + 单个终端窗口(&T) + + + + 2 &Horizontal Terminals + 水平分割为2(&H) + + + + 2 &Vertical Terminals + 垂直分割为2(&V) + + + + 4 Terminal&s + 分割4块(&S) + + + + &Bottom + 下(&B) + + + + &Top + 上(&T) + + + + + &Right + 右(&R) + + + + + &Left + 左(&L) + + + + &Tabs Layout + 标签位置(&T) + + + + &None + 空(&N) + + + + S&crollbar Layout + 滚动条位置(&C) + + + + Exit QTerminal + 退出程序 + + + + Do not ask again + 不要再次问我 + + + + Are you sure you want to exit? + 您真的要关闭本程序吗? + + + + A lightweight multiplatform terminal emulator + 轻量级多平台支持的终端模拟器 + + + + Bookmarks + 书签 + + + + Rename Session + 重命名会话 + + + + Press "%1" to see the terminal. + 按下"%1"显示该终端 + + + + &Clear Current Tab + 清理当前标签(&C) + + + + Paste Clip&board + 粘贴剪切板内容(&B) + + + + Zoom &in + 缩小(&I) + + + + Zoom &out + 放大(&O) + + + + Zoom rese&t + 重置大小(&T) + + + + &Find... + 搜索(&F)... + + + + &Toggle Menu + 下拉菜单(&T) + + + + &New Tab + 新建标签页(&N) + + + + &New Window + 新建窗口(&N) + + + + &Hide Window Borders + 隐藏窗口边框(&H) + + + + &Show Tab Bar + 显示标签栏(&S) + + + + Fullscreen + 全屏显示 + + + + PropertiesDialog + + + Emulation + 模拟器 + + + + Shortcuts + 快捷键 + + + + Terminal settings + 终端设置 + + + + Appearance + 界面设置 + + + + + Behavior + 行为 + + + + Dropdown + 下拉菜单 + + + + Color scheme + 终端颜色 + + + + Widget style + 控件样式 + + + + Scrollbar position + 滚动栏位置 + + + + Tabs position + 标签页位置 + + + + Show the menu bar + 显示菜单栏 + + + + Show a border around the current terminal + 显示当前终端周围的边框 + + + + Application transparency + 透明设置 + + + + Terminal transparency + 终端透明度 + + + + Start with preset: + 默认配置 + + + + None (single terminal) + 为空或者单终端模式 + + + + 2 terminals horizontally + 水平分割为2块 + + + + 2 terminals vertically + 垂直分割为2块 + + + + 4 terminals + 4分割为4块 + + + + Font + 字体 + + + + <html><head/><body><p>Which behavior to emulate. Note that this does not have to match your operating system.</p><p>The <span style=" font-weight:600;">default</span> emulation is a fallback with a minimal featureset.</p></body></html> + <html><head/><body><p>终端行为: 注意! 它可能不适合您的操作系统. </p><p> <span style=" font-weight:600;">default</span>模拟器可能回退到一个最基础的功能模式。</p></body></html> + + + + Action after paste + 粘贴之后的动作 + + + + Open new terminals in current working directory + 在当前工作路径打开新的终端 + + + + Save Size when closing + 关闭时保存窗口尺寸 + + + + Save Position when closing + 关闭时保存窗口位置 + + + + Ask for confirmation when closing + 关闭窗口需要确认 + + + + Unlimited history + 不限制历史记录条数 + + + + History size (in lines) + 历史记录大小 (行数) + + + + Height + 高度 + + + + + % + % + + + + Width + 宽度 + + + + Edit bookmark file contents + 编辑书签文件内容 + + + + Enable bookmarks + 启用书签功能 + + + + Bookmark file + 书签文件 + + + + + % + % + + + + Shortcut + 快捷键 + + + + Key + 按键 + + + + Bookmarks + 书签 + + + + Hide tab bar with only one tab + 标签栏只显示一个页面 + + + + &Change... + 修改设置(&C)... + + + + Show on start + 启动时显示 + + + + Size + 尺寸 + + + + Shortcut: + 快捷键: + + + + Find... + 搜索... + + + + You can specify your own bookmarks file location. It allows easy bookmark sharing with tools like OwnCloud or Dropbox. + 您可以指定书签保存位置, 它可以很容易通过私有云或者Dropbox分享。 + + + + No scrollbar + 无滚动栏 + + + + + Left + + + + + + Right + + + + + Top + + + + + Bottom + + + + + No move + 无动作 + + + + Move start + 开始移动 + + + + Move end + 移动完成 + + + + + System Default + 系统默认 + + + + Open or create bookmarks file + 打开或者创建书签文件 + + + + QObject + + + Local Bookmarks + 本地书签 + + + + Synchronized Bookmarks + 书签同步 + + + + TabWidget + + + + Shell No. %1 + Shell No. %1 + + + + Tab name + 标签名 + + + + New tab name: + 新的标签名: + + + + Close session + 关闭会话 + + + + Rename session + 重命名会话 + + + + TermWidgetHolder + + + Load Session + 载入会话 + + + + List of saved sessions: + 列出保存的会话: + + + + mainWindow + + + &Actions + 动作(&A) + + + + &Help + 帮助(&H) + + + + &Edit + 编辑(&E) + + + + &About... + 关于本程序(&A)... + + + + About &Qt... + 关于Qt(&Q)... + + + + &Preferences... + 参数配置(&P)... + + + + MainWindow + + + + + &File + 文件(&F) + + + + &View + 查看(&V) + + + + &Quit + 退出(&Q) + + +