Cherry-picking upstream version 0.7.1
* Bumped minimum version libqtermwidget5-0-dev (>= 0.7.1) * Removed build dependencies: - cmake - liblxqt0-dev - libqt5xdg-dev - qttools5-dev - qttools5-dev-tools * Added build dependency lxqt-build-tools
This commit is contained in:
parent
e382624fd2
commit
e4aaacf0d4
20
CHANGELOG
20
CHANGELOG
@ -1,7 +1,25 @@
|
|||||||
|
|
||||||
qterminal-0.7.0 / 2016-09-24
|
qterminal-0.7.1 / 2016-12-21
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
* Bump patch version (#294)
|
||||||
|
* Add common shortcuts for switching tabs (#275)
|
||||||
|
* Fix tabstop order in properties dialog & add buddy relations for labels. (#290)
|
||||||
|
* Add preferences for background images (#273)
|
||||||
|
* Disable menu actions that are not applicable currently (#244)
|
||||||
|
* DEFINES += STR_VERSION=\\\"0.7.0\\\"
|
||||||
|
* Add context menu actions for URLs and E-Mail addresses (#276)
|
||||||
|
* Removed minimum size (#265)
|
||||||
|
* Set maxval of dropdown spinboxen to 100, instead of 99
|
||||||
|
* Use the new lxqt-build-tools package
|
||||||
|
* Fix context menu actions being applied to the window opened last (#235)
|
||||||
|
* Show exit confirmation dialog when closing the last window tab (#242)
|
||||||
|
* remove "building with cpack" from CMakeLists.txt - not used anymore Added very basic .gitattributes
|
||||||
|
|
||||||
|
0.7.0 / 2016-09-24
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Release 0.7.0: Add changelog
|
||||||
* Bump version to 0.7.0 (#262)
|
* Bump version to 0.7.0 (#262)
|
||||||
* Update README.md
|
* Update README.md
|
||||||
* Collapse splitter hierarchies containing a single terminal (#254)
|
* Collapse splitter hierarchies containing a single terminal (#254)
|
||||||
|
@ -4,7 +4,8 @@ project(qterminal)
|
|||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
set(STR_VERSION "0.7.0")
|
set(STR_VERSION "0.7.1")
|
||||||
|
set(LXQTBT_MINIMUM_VERSION "0.3.0")
|
||||||
|
|
||||||
|
|
||||||
# additional cmake files
|
# additional cmake files
|
||||||
@ -35,8 +36,7 @@ elseif(UNIX)
|
|||||||
find_package(Qt5X11Extras REQUIRED)
|
find_package(Qt5X11Extras REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
find_package(QTermWidget5 REQUIRED)
|
find_package(QTermWidget5 REQUIRED)
|
||||||
#Note: no run-time dependency on liblxqt, just a build dependency for lxqt_translate_ts/desktop
|
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
|
||||||
find_package(lxqt REQUIRED)
|
|
||||||
include(LXQtTranslateTs)
|
include(LXQtTranslateTs)
|
||||||
message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}")
|
message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}")
|
||||||
|
|
||||||
@ -235,14 +235,3 @@ add_custom_target(lupdate
|
|||||||
COMMAND ${QT_LUPDATE_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/qterminal.pro"
|
COMMAND ${QT_LUPDATE_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/qterminal.pro"
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# make dist custom target
|
|
||||||
set(CPACK_PACKAGE_NAME "qterminal")
|
|
||||||
set(CPACK_PACKAGE_VERSION ${STR_VERSION})
|
|
||||||
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
|
|
||||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
|
||||||
set(CPACK_IGNORE_FILES "/CVS/;/\\\\.svn/;/\\\\.git/;\\\\.swp$;\\\\.#;/#;\\\\.tar.gz$;/CMakeFiles/;CMakeCache.txt;\\\\.qm$;/build/;\\\\.diff$;.DS_Store'")
|
|
||||||
set(CPACK_SOURCE_IGNORE_FILES ${CPACK_IGNORE_FILES})
|
|
||||||
include(CPack)
|
|
||||||
# simulate autotools' "make dist"
|
|
||||||
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
|
||||||
|
14
debian/changelog
vendored
14
debian/changelog
vendored
@ -1,3 +1,17 @@
|
|||||||
|
qterminal (0.7.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking upstream version 0.7.1
|
||||||
|
* Bumped minimum version libqtermwidget5-0-dev (>= 0.7.1)
|
||||||
|
* Removed build dependencies:
|
||||||
|
- cmake
|
||||||
|
- liblxqt0-dev
|
||||||
|
- libqt5xdg-dev
|
||||||
|
- qttools5-dev
|
||||||
|
- qttools5-dev-tools
|
||||||
|
* Added build dependency lxqt-build-tools
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Thu, 22 Dec 2016 00:35:57 +0100
|
||||||
|
|
||||||
qterminal (0.7.0-2) unstable; urgency=medium
|
qterminal (0.7.0-2) unstable; urgency=medium
|
||||||
|
|
||||||
* Cherry-picking upstream release 0.7.0
|
* Cherry-picking upstream release 0.7.0
|
||||||
|
10
debian/control
vendored
10
debian/control
vendored
@ -6,17 +6,13 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
|
|||||||
Section: x11
|
Section: x11
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>= 10),
|
Build-Depends: debhelper (>= 10),
|
||||||
cmake (>= 3.0.2),
|
|
||||||
libkf5windowsystem-dev,
|
libkf5windowsystem-dev,
|
||||||
liblxqt0-dev (>= 0.11.0),
|
libqtermwidget5-0-dev (>= 0.7.1),
|
||||||
libqtermwidget5-0-dev (>= 0.7.0),
|
|
||||||
libqt5svg5-dev,
|
libqt5svg5-dev,
|
||||||
libqt5x11extras5-dev,
|
libqt5x11extras5-dev,
|
||||||
libqt5xdg-dev (>= 2.0.0),
|
|
||||||
libx11-dev,
|
libx11-dev,
|
||||||
qtbase5-private-dev,
|
lxqt-build-tools,
|
||||||
qttools5-dev,
|
qtbase5-private-dev
|
||||||
qttools5-dev-tools
|
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/qterminal.git/?h=debian/sid
|
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/qterminal.git/?h=debian/sid
|
||||||
Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/qterminal.git -b debian/sid
|
Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/qterminal.git -b debian/sid
|
||||||
|
@ -8,7 +8,7 @@ CONFIG += link_pkgconfig \
|
|||||||
|
|
||||||
PKGCONFIG += qtermwidget5
|
PKGCONFIG += qtermwidget5
|
||||||
|
|
||||||
DEFINES += STR_VERSION=\\\"0.6.0\\\"
|
DEFINES += STR_VERSION=\\\"0.7.0\\\"
|
||||||
|
|
||||||
SOURCES += $$files(src/*.cpp)
|
SOURCES += $$files(src/*.cpp)
|
||||||
HEADERS += $$files(src/*.h)
|
HEADERS += $$files(src/*.h)
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
|
|
||||||
// ACTIONS
|
// ACTIONS
|
||||||
#define CLEAR_TERMINAL_SHORTCUT "Ctrl+Shift+X"
|
#define CLEAR_TERMINAL_SHORTCUT "Ctrl+Shift+X"
|
||||||
#define TAB_PREV_SHORTCUT "Shift+Left"
|
#define TAB_PREV_SHORTCUT "Shift+Left|Ctrl+PgUp|Ctrl+Shift+Tab"
|
||||||
#define TAB_NEXT_SHORTCUT "Shift+Right"
|
#define TAB_NEXT_SHORTCUT "Shift+Right|Ctrl+PgDown|Ctrl+Tab"
|
||||||
#define SUB_PREV_SHORTCUT "Shift+Down"
|
#define SUB_PREV_SHORTCUT "Shift+Down"
|
||||||
#define SUB_NEXT_SHORTCUT "Shift+Up"
|
#define SUB_NEXT_SHORTCUT "Shift+Up"
|
||||||
|
|
||||||
@ -100,8 +100,8 @@
|
|||||||
#define ZOOM_OUT_SHORTCUT "Ctrl+-"
|
#define ZOOM_OUT_SHORTCUT "Ctrl+-"
|
||||||
#define ZOOM_RESET_SHORTCUT "Ctrl+0"
|
#define ZOOM_RESET_SHORTCUT "Ctrl+0"
|
||||||
|
|
||||||
#define MOVE_LEFT_SHORTCUT "Shift+Alt+Left"
|
#define MOVE_LEFT_SHORTCUT "Shift+Alt+Left|Ctrl+Shift+PgUp"
|
||||||
#define MOVE_RIGHT_SHORTCUT "Shift+Alt+Right"
|
#define MOVE_RIGHT_SHORTCUT "Shift+Alt+Right|Ctrl+Shift+PgDown"
|
||||||
|
|
||||||
#define RENAME_SESSION_SHORTCUT "Shift+Alt+S"
|
#define RENAME_SESSION_SHORTCUT "Shift+Alt+S"
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>715</width>
|
<width>746</width>
|
||||||
<height>495</height>
|
<height>634</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="lookAndFeelPage">
|
<widget class="QWidget" name="appearancePage">
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="8" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QCheckBox" name="hideTabBarCheckBox">
|
<widget class="QCheckBox" name="hideTabBarCheckBox">
|
||||||
@ -99,6 +99,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Color scheme</string>
|
<string>Color scheme</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>colorSchemaCombo</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
@ -106,15 +109,24 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Scrollbar position</string>
|
<string>Scrollbar position</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>scrollBarPos_comboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="0">
|
<item row="16" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start with preset:</string>
|
<string>Start with preset:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>terminalPresetComboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="scrollBarPos_comboBox"/>
|
||||||
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QComboBox" name="tabsPos_comboBox"/>
|
<widget class="QComboBox" name="tabsPos_comboBox"/>
|
||||||
</item>
|
</item>
|
||||||
@ -125,14 +137,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="scrollBarPos_comboBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0">
|
<item row="13" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Terminal transparency</string>
|
<string>Terminal transparency</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>termTransparencyBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="12" column="0">
|
||||||
@ -145,7 +157,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="16" column="1">
|
||||||
<widget class="QComboBox" name="terminalPresetComboBox">
|
<widget class="QComboBox" name="terminalPresetComboBox">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -205,6 +217,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Font</string>
|
<string>Font</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>changeFontButton</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -243,15 +258,21 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="styleComboBox"/>
|
||||||
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Tabs position</string>
|
<string>Tabs position</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>tabsPos_comboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QComboBox" name="styleComboBox"/>
|
<widget class="QComboBox" name="keybCursorShape_comboBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="13" column="1">
|
||||||
<widget class="QSpinBox" name="termTransparencyBox">
|
<widget class="QSpinBox" name="termTransparencyBox">
|
||||||
@ -269,17 +290,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QComboBox" name="keybCursorShape_comboBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Widget style</string>
|
<string>Widget style</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>styleComboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="0" colspan="2">
|
<item row="17" column="0" colspan="2">
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -304,6 +325,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keyboard cursor shape</string>
|
<string>Keyboard cursor shape</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>keybCursorShape_comboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0" colspan="2">
|
<item row="10" column="0" colspan="2">
|
||||||
@ -320,9 +344,30 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="15" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Background image:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="backgroundImageLineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="chooseBackgroundImageButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="historyPage">
|
<widget class="QWidget" name="behaviorPage">
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
@ -373,6 +418,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Action after paste</string>
|
<string>Action after paste</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>motionAfterPasting_comboBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
@ -470,6 +518,9 @@
|
|||||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
<number>105</number>
|
<number>105</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
<attribute name="verticalHeaderVisible">
|
<attribute name="verticalHeaderVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -487,7 +538,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page">
|
<widget class="QWidget" name="dropdownPage">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="dropShowOnStartCheckBox">
|
<widget class="QCheckBox" name="dropShowOnStartCheckBox">
|
||||||
@ -512,6 +563,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Height</string>
|
<string>Height</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>dropHeightSpinBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
@ -526,6 +580,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Width</string>
|
<string>Width</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>dropWidthSpinBox</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
@ -547,6 +604,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Shortcut:</string>
|
<string>Shortcut:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>dropShortCutEdit</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
@ -569,7 +629,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page_2">
|
<widget class="QWidget" name="bookmarksPage">
|
||||||
<layout class="QGridLayout" name="gridLayout_9">
|
<layout class="QGridLayout" name="gridLayout_9">
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
<widget class="QGroupBox" name="groupBox_5">
|
||||||
@ -607,6 +667,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bookmark file</string>
|
<string>Bookmark file</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>bookmarksLineEdit</cstring>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -637,6 +700,43 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>listWidget</tabstop>
|
||||||
|
<tabstop>changeFontButton</tabstop>
|
||||||
|
<tabstop>colorSchemaCombo</tabstop>
|
||||||
|
<tabstop>styleComboBox</tabstop>
|
||||||
|
<tabstop>scrollBarPos_comboBox</tabstop>
|
||||||
|
<tabstop>tabsPos_comboBox</tabstop>
|
||||||
|
<tabstop>keybCursorShape_comboBox</tabstop>
|
||||||
|
<tabstop>showMenuCheckBox</tabstop>
|
||||||
|
<tabstop>hideTabBarCheckBox</tabstop>
|
||||||
|
<tabstop>highlightCurrentCheckBox</tabstop>
|
||||||
|
<tabstop>changeWindowTitleCheckBox</tabstop>
|
||||||
|
<tabstop>changeWindowIconCheckBox</tabstop>
|
||||||
|
<tabstop>appTransparencyBox</tabstop>
|
||||||
|
<tabstop>termTransparencyBox</tabstop>
|
||||||
|
<tabstop>backgroundImageLineEdit</tabstop>
|
||||||
|
<tabstop>chooseBackgroundImageButton</tabstop>
|
||||||
|
<tabstop>terminalPresetComboBox</tabstop>
|
||||||
|
<tabstop>historyLimited</tabstop>
|
||||||
|
<tabstop>historyLimitedTo</tabstop>
|
||||||
|
<tabstop>historyUnlimited</tabstop>
|
||||||
|
<tabstop>motionAfterPasting_comboBox</tabstop>
|
||||||
|
<tabstop>askOnExitCheckBox</tabstop>
|
||||||
|
<tabstop>savePosOnExitCheckBox</tabstop>
|
||||||
|
<tabstop>saveSizeOnExitCheckBox</tabstop>
|
||||||
|
<tabstop>useCwdCheckBox</tabstop>
|
||||||
|
<tabstop>emulationComboBox</tabstop>
|
||||||
|
<tabstop>shortcutsWidget</tabstop>
|
||||||
|
<tabstop>dropShowOnStartCheckBox</tabstop>
|
||||||
|
<tabstop>dropHeightSpinBox</tabstop>
|
||||||
|
<tabstop>dropWidthSpinBox</tabstop>
|
||||||
|
<tabstop>dropShortCutEdit</tabstop>
|
||||||
|
<tabstop>useBookmarksCheckBox</tabstop>
|
||||||
|
<tabstop>bookmarksLineEdit</tabstop>
|
||||||
|
<tabstop>bookmarksButton</tabstop>
|
||||||
|
<tabstop>bookmarkPlainEdit</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
@ -32,12 +32,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="TabWidget" name="consoleTabulator">
|
<widget class="TabWidget" name="consoleTabulator">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>320</width>
|
|
||||||
<height>200</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="tabPosition">
|
<property name="tabPosition">
|
||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "tabwidget.h"
|
#include "tabwidget.h"
|
||||||
@ -30,6 +31,9 @@
|
|||||||
#include "bookmarkswidget.h"
|
#include "bookmarkswidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef std::function<bool(MainWindow&)> checkfn;
|
||||||
|
Q_DECLARE_METATYPE(checkfn)
|
||||||
|
|
||||||
// TODO/FXIME: probably remove. QSS makes it unusable on mac...
|
// TODO/FXIME: probably remove. QSS makes it unusable on mac...
|
||||||
#define QSS_DROP "MainWindow {border: 1px solid rgba(0, 0, 0, 50%);}\n"
|
#define QSS_DROP "MainWindow {border: 1px solid rgba(0, 0, 0, 50%);}\n"
|
||||||
|
|
||||||
@ -94,6 +98,8 @@ MainWindow::MainWindow(const QString& work_dir,
|
|||||||
setupCustomDirs();
|
setupCustomDirs();
|
||||||
|
|
||||||
connect(consoleTabulator, &TabWidget::currentTitleChanged, this, &MainWindow::onCurrentTitleChanged);
|
connect(consoleTabulator, &TabWidget::currentTitleChanged, this, &MainWindow::onCurrentTitleChanged);
|
||||||
|
connect(menu_Actions, SIGNAL(aboutToShow()), this, SLOT(aboutToShowActionsMenu()));
|
||||||
|
|
||||||
/* The tab should be added after all changes are made to
|
/* The tab should be added after all changes are made to
|
||||||
the main window; otherwise, the initial prompt might
|
the main window; otherwise, the initial prompt might
|
||||||
get jumbled because of changes in internal geometry. */
|
get jumbled because of changes in internal geometry. */
|
||||||
@ -131,140 +137,102 @@ void MainWindow::setDropShortcut(QKeySequence dropShortCut)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setup_ActionsMenu_Actions()
|
void MainWindow::setup_Action(const char *name, QAction *action, const char *defaultShortcut, const QObject *receiver,
|
||||||
|
const char *slot, QMenu *menu, const QVariant &data)
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
settings.beginGroup("Shortcuts");
|
settings.beginGroup("Shortcuts");
|
||||||
|
|
||||||
QKeySequence seq;
|
QList<QKeySequence> shortcuts;
|
||||||
|
|
||||||
Properties::Instance()->actions[CLEAR_TERMINAL] = new QAction(QIcon::fromTheme("edit-clear"), tr("&Clear Current Tab"), this);
|
Properties::Instance()->actions[name] = action;
|
||||||
seq = QKeySequence::fromString(settings.value(CLEAR_TERMINAL, CLEAR_TERMINAL_SHORTCUT).toString());
|
foreach (const QString &sequenceString, settings.value(name, defaultShortcut).toString().split('|'))
|
||||||
Properties::Instance()->actions[CLEAR_TERMINAL]->setShortcut(seq);
|
shortcuts.append(QKeySequence::fromString(sequenceString));
|
||||||
connect(Properties::Instance()->actions[CLEAR_TERMINAL], SIGNAL(triggered()), consoleTabulator, SLOT(clearActiveTerminal()));
|
Properties::Instance()->actions[name]->setShortcuts(shortcuts);
|
||||||
menu_Actions->addAction(Properties::Instance()->actions[CLEAR_TERMINAL]);
|
|
||||||
addAction(Properties::Instance()->actions[CLEAR_TERMINAL]);
|
if (receiver)
|
||||||
|
{
|
||||||
|
connect(Properties::Instance()->actions[name], SIGNAL(triggered(bool)), receiver, slot);
|
||||||
|
addAction(Properties::Instance()->actions[name]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menu)
|
||||||
|
menu->addAction(Properties::Instance()->actions[name]);
|
||||||
|
|
||||||
|
if (!data.isNull())
|
||||||
|
Properties::Instance()->actions[name]->setData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::setup_ActionsMenu_Actions()
|
||||||
|
{
|
||||||
|
QVariant data;
|
||||||
|
|
||||||
|
const checkfn checkTabs = &MainWindow::hasMultipleTabs;
|
||||||
|
const checkfn checkSubterminals = &MainWindow::hasMultipleSubterminals;
|
||||||
|
|
||||||
|
setup_Action(CLEAR_TERMINAL, new QAction(QIcon::fromTheme("edit-clear"), tr("&Clear Current Tab"), this),
|
||||||
|
CLEAR_TERMINAL_SHORTCUT, consoleTabulator, SLOT(clearActiveTerminal()), menu_Actions);
|
||||||
|
|
||||||
menu_Actions->addSeparator();
|
menu_Actions->addSeparator();
|
||||||
|
|
||||||
Properties::Instance()->actions[TAB_NEXT] = new QAction(QIcon::fromTheme("go-next"), tr("&Next Tab"), this);
|
data.setValue(checkTabs);
|
||||||
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);
|
setup_Action(TAB_NEXT, new QAction(QIcon::fromTheme("go-next"), tr("&Next Tab"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(TAB_PREV, TAB_PREV_SHORTCUT).toString() );
|
TAB_NEXT_SHORTCUT, consoleTabulator, SLOT(switchToRight()), menu_Actions, data);
|
||||||
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);
|
setup_Action(TAB_PREV, new QAction(QIcon::fromTheme("go-previous"), tr("&Previous Tab"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(MOVE_LEFT, MOVE_LEFT_SHORTCUT).toString() );
|
TAB_PREV_SHORTCUT, consoleTabulator, SLOT(switchToLeft()), menu_Actions, data);
|
||||||
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);
|
setup_Action(MOVE_LEFT, new QAction(tr("Move Tab &Left"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(MOVE_RIGHT, MOVE_RIGHT_SHORTCUT).toString() );
|
MOVE_LEFT_SHORTCUT, consoleTabulator, SLOT(moveLeft()), menu_Actions, data);
|
||||||
Properties::Instance()->actions[MOVE_RIGHT]->setShortcut(seq);
|
|
||||||
connect(Properties::Instance()->actions[MOVE_RIGHT], SIGNAL(triggered()), consoleTabulator, SLOT(moveRight()));
|
setup_Action(MOVE_RIGHT, new QAction(tr("Move Tab &Right"), this),
|
||||||
menu_Actions->addAction(Properties::Instance()->actions[MOVE_RIGHT]);
|
MOVE_RIGHT_SHORTCUT, consoleTabulator, SLOT(moveRight()), menu_Actions, data);
|
||||||
addAction(Properties::Instance()->actions[MOVE_RIGHT]);
|
|
||||||
|
|
||||||
menu_Actions->addSeparator();
|
menu_Actions->addSeparator();
|
||||||
|
|
||||||
Properties::Instance()->actions[SPLIT_HORIZONTAL] = new QAction(tr("Split Terminal &Horizontally"), this);
|
setup_Action(SPLIT_HORIZONTAL, new QAction(tr("Split Terminal &Horizontally"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(SPLIT_HORIZONTAL).toString() );
|
NULL, consoleTabulator, SLOT(splitHorizontally()), menu_Actions);
|
||||||
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);
|
setup_Action(SPLIT_VERTICAL, new QAction(tr("Split Terminal &Vertically"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(SPLIT_VERTICAL).toString() );
|
NULL, consoleTabulator, SLOT(splitVertically()), menu_Actions);
|
||||||
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);
|
data.setValue(checkSubterminals);
|
||||||
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("N&ext Subterminal"), this);
|
setup_Action(SUB_COLLAPSE, new QAction(tr("&Collapse Subterminal"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(SUB_NEXT, SUB_NEXT_SHORTCUT).toString() );
|
NULL, consoleTabulator, SLOT(splitCollapse()), menu_Actions, data);
|
||||||
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("P&revious Subterminal"), this);
|
setup_Action(SUB_NEXT, new QAction(QIcon::fromTheme("go-up"), tr("N&ext Subterminal"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(SUB_PREV, SUB_PREV_SHORTCUT).toString() );
|
SUB_NEXT_SHORTCUT, consoleTabulator, SLOT(switchNextSubterminal()), menu_Actions, data);
|
||||||
Properties::Instance()->actions[SUB_PREV]->setShortcut(seq);
|
|
||||||
connect(Properties::Instance()->actions[SUB_PREV], SIGNAL(triggered()), consoleTabulator, SLOT(switchPrevSubterminal()));
|
setup_Action(SUB_PREV, new QAction(QIcon::fromTheme("go-down"), tr("P&revious Subterminal"), this),
|
||||||
menu_Actions->addAction(Properties::Instance()->actions[SUB_PREV]);
|
SUB_PREV_SHORTCUT, consoleTabulator, SLOT(switchPrevSubterminal()), menu_Actions, data);
|
||||||
addAction(Properties::Instance()->actions[SUB_PREV]);
|
|
||||||
|
|
||||||
menu_Actions->addSeparator();
|
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.
|
// 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);
|
setup_Action(COPY_SELECTION, new QAction(QIcon::fromTheme("edit-copy"), tr("Copy &Selection"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(COPY_SELECTION, COPY_SELECTION_SHORTCUT).toString() );
|
COPY_SELECTION_SHORTCUT, consoleTabulator, SLOT(copySelection()), menu_Edit);
|
||||||
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 Clip&board"), this);
|
setup_Action(PASTE_CLIPBOARD, new QAction(QIcon::fromTheme("edit-paste"), tr("Paste Clip&board"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(PASTE_CLIPBOARD, PASTE_CLIPBOARD_SHORTCUT).toString() );
|
PASTE_CLIPBOARD_SHORTCUT, consoleTabulator, SLOT(pasteClipboard()), menu_Edit);
|
||||||
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 S&election"), this);
|
setup_Action(PASTE_SELECTION, new QAction(QIcon::fromTheme("edit-paste"), tr("Paste S&election"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(PASTE_SELECTION, PASTE_SELECTION_SHORTCUT).toString() );
|
PASTE_SELECTION_SHORTCUT, consoleTabulator, SLOT(pasteSelection()), menu_Edit);
|
||||||
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);
|
setup_Action(ZOOM_IN, new QAction(QIcon::fromTheme("zoom-in"), tr("Zoom &in"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(ZOOM_IN, ZOOM_IN_SHORTCUT).toString() );
|
ZOOM_IN_SHORTCUT, consoleTabulator, SLOT(zoomIn()), menu_Edit);
|
||||||
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);
|
setup_Action(ZOOM_OUT, new QAction(QIcon::fromTheme("zoom-out"), tr("Zoom &out"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(ZOOM_OUT, ZOOM_OUT_SHORTCUT).toString() );
|
ZOOM_OUT_SHORTCUT, consoleTabulator, SLOT(zoomOut()), menu_Edit);
|
||||||
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 rese&t"), this);
|
setup_Action(ZOOM_RESET, new QAction(QIcon::fromTheme("zoom-original"), tr("Zoom rese&t"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(ZOOM_RESET, ZOOM_RESET_SHORTCUT).toString() );
|
ZOOM_RESET_SHORTCUT, consoleTabulator, SLOT(zoomReset()), menu_Edit);
|
||||||
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();
|
menu_Actions->addSeparator();
|
||||||
|
|
||||||
Properties::Instance()->actions[FIND] = new QAction(QIcon::fromTheme("edit-find"), tr("&Find..."), this);
|
setup_Action(FIND, new QAction(QIcon::fromTheme("edit-find"), tr("&Find..."), this),
|
||||||
seq = QKeySequence::fromString( settings.value(FIND, FIND_SHORTCUT).toString() );
|
FIND_SHORTCUT, this, SLOT(find()), menu_Actions);
|
||||||
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
|
#if 0
|
||||||
act = new QAction(this);
|
act = new QAction(this);
|
||||||
@ -284,39 +252,22 @@ void MainWindow::setup_ActionsMenu_Actions()
|
|||||||
connect(act, SIGNAL(triggered()), consoleTabulator, SLOT(loadSession()));
|
connect(act, SIGNAL(triggered()), consoleTabulator, SLOT(loadSession()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Properties::Instance()->actions[TOGGLE_MENU] = new QAction(tr("&Toggle Menu"), this);
|
setup_Action(TOGGLE_MENU, new QAction(tr("&Toggle Menu"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(TOGGLE_MENU, TOGGLE_MENU_SHORTCUT).toString() );
|
TOGGLE_MENU_SHORTCUT, this, SLOT(find()));
|
||||||
Properties::Instance()->actions[TOGGLE_MENU]->setShortcut(seq);
|
|
||||||
connect(Properties::Instance()->actions[TOGGLE_MENU], SIGNAL(triggered()), this, SLOT(toggleMenu()));
|
|
||||||
addAction(Properties::Instance()->actions[TOGGLE_MENU]);
|
|
||||||
// this is correct - add action to main window - not to menu to keep toggle working
|
// this is correct - add action to main window - not to menu to keep toggle working
|
||||||
|
|
||||||
// Add global rename current session shortcut
|
// Add global rename current session shortcut
|
||||||
Properties::Instance()->actions[RENAME_SESSION] = new QAction(tr("Rename session"), this);
|
setup_Action(RENAME_SESSION, new QAction(tr("Rename session"), this),
|
||||||
seq = QKeySequence::fromString(settings.value(RENAME_SESSION, RENAME_SESSION_SHORTCUT).toString());
|
RENAME_SESSION_SHORTCUT, consoleTabulator, SLOT(renameCurrentSession()));
|
||||||
Properties::Instance()->actions[RENAME_SESSION]->setShortcut(seq);
|
|
||||||
connect(Properties::Instance()->actions[RENAME_SESSION], SIGNAL(triggered()), consoleTabulator, SLOT(renameCurrentSession()));
|
|
||||||
addAction(Properties::Instance()->actions[RENAME_SESSION]);
|
|
||||||
// this is correct - add action to main window - not to menu
|
// this is correct - add action to main window - not to menu
|
||||||
|
|
||||||
settings.endGroup();
|
|
||||||
|
|
||||||
// apply props
|
// apply props
|
||||||
propertiesChanged();
|
propertiesChanged();
|
||||||
}
|
}
|
||||||
void MainWindow::setup_FileMenu_Actions()
|
void MainWindow::setup_FileMenu_Actions()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
setup_Action(ADD_TAB, new QAction(QIcon::fromTheme("list-add"), tr("&New Tab"), this),
|
||||||
settings.beginGroup("Shortcuts");
|
ADD_TAB_SHORTCUT, this, SLOT(addNewTab()), menu_File);
|
||||||
|
|
||||||
QKeySequence seq;
|
|
||||||
|
|
||||||
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()), this, SLOT(addNewTab()));
|
|
||||||
menu_File->addAction(Properties::Instance()->actions[ADD_TAB]);
|
|
||||||
addAction(Properties::Instance()->actions[ADD_TAB]);
|
|
||||||
|
|
||||||
QMenu *presetsMenu = new QMenu(tr("New Tab From &Preset"), this);
|
QMenu *presetsMenu = new QMenu(tr("New Tab From &Preset"), this);
|
||||||
presetsMenu->addAction(QIcon(), tr("1 &Terminal"),
|
presetsMenu->addAction(QIcon(), tr("1 &Terminal"),
|
||||||
@ -329,56 +280,28 @@ void MainWindow::setup_FileMenu_Actions()
|
|||||||
consoleTabulator, SLOT(preset4Terminals()));
|
consoleTabulator, SLOT(preset4Terminals()));
|
||||||
menu_File->addMenu(presetsMenu);
|
menu_File->addMenu(presetsMenu);
|
||||||
|
|
||||||
Properties::Instance()->actions[CLOSE_TAB] = new QAction(QIcon::fromTheme("list-remove"), tr("&Close Tab"), this);
|
setup_Action(CLOSE_TAB, new QAction(QIcon::fromTheme("list-remove"), tr("&Close Tab"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(CLOSE_TAB, CLOSE_TAB_SHORTCUT).toString() );
|
CLOSE_TAB_SHORTCUT, consoleTabulator, SLOT(removeCurrentTab()), menu_File);
|
||||||
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);
|
setup_Action(NEW_WINDOW, new QAction(QIcon::fromTheme("window-new"), tr("&New Window"), this),
|
||||||
seq = QKeySequence::fromString( settings.value(NEW_WINDOW, NEW_WINDOW_SHORTCUT).toString() );
|
NEW_WINDOW_SHORTCUT, this, SLOT(newTerminalWindow()), menu_File);
|
||||||
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();
|
menu_File->addSeparator();
|
||||||
|
|
||||||
Properties::Instance()->actions[PREFERENCES] = actProperties;
|
setup_Action(PREFERENCES, actProperties, "", this, SLOT(actProperties_triggered()), menu_File);
|
||||||
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();
|
menu_File->addSeparator();
|
||||||
|
|
||||||
Properties::Instance()->actions[QUIT] = actQuit;
|
setup_Action(QUIT, actQuit, "", this, SLOT(close()), menu_File);
|
||||||
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()
|
void MainWindow::setup_ViewMenu_Actions()
|
||||||
{
|
{
|
||||||
QKeySequence seq;
|
|
||||||
QSettings settings;
|
|
||||||
settings.beginGroup("Shortcuts");
|
|
||||||
|
|
||||||
QAction *hideBordersAction = new QAction(tr("&Hide Window Borders"), this);
|
QAction *hideBordersAction = new QAction(tr("&Hide Window Borders"), this);
|
||||||
hideBordersAction->setCheckable(true);
|
hideBordersAction->setCheckable(true);
|
||||||
hideBordersAction->setVisible(!m_dropMode);
|
hideBordersAction->setVisible(!m_dropMode);
|
||||||
seq = QKeySequence::fromString( settings.value(HIDE_WINDOW_BORDERS).toString() );
|
setup_Action(HIDE_WINDOW_BORDERS, hideBordersAction,
|
||||||
hideBordersAction->setShortcut(seq);
|
NULL, this, SLOT(toggleBorderless()), menu_Window);
|
||||||
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");
|
//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
|
// 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);
|
// Properties::Instance()->actions[HIDE_WINDOW_BORDERS]->setChecked(Properties::Instance()->borderless);
|
||||||
@ -389,29 +312,18 @@ void MainWindow::setup_ViewMenu_Actions()
|
|||||||
//toggleTabbar->setObjectName("toggle_TabBar");
|
//toggleTabbar->setObjectName("toggle_TabBar");
|
||||||
showTabBarAction->setCheckable(true);
|
showTabBarAction->setCheckable(true);
|
||||||
showTabBarAction->setChecked(!Properties::Instance()->tabBarless);
|
showTabBarAction->setChecked(!Properties::Instance()->tabBarless);
|
||||||
seq = QKeySequence::fromString( settings.value(SHOW_TAB_BAR).toString() );
|
setup_Action(SHOW_TAB_BAR, showTabBarAction,
|
||||||
showTabBarAction->setShortcut(seq);
|
NULL, this, SLOT(toggleTabBar()), menu_Window);
|
||||||
menu_Window->addAction(showTabBarAction);
|
|
||||||
addAction(showTabBarAction);
|
|
||||||
Properties::Instance()->actions[SHOW_TAB_BAR] = showTabBarAction;
|
|
||||||
toggleTabBar();
|
toggleTabBar();
|
||||||
connect(showTabBarAction, SIGNAL(triggered()), this, SLOT(toggleTabBar()));
|
|
||||||
|
|
||||||
QAction *toggleFullscreen = new QAction(tr("Fullscreen"), this);
|
QAction *toggleFullscreen = new QAction(tr("Fullscreen"), this);
|
||||||
toggleFullscreen->setCheckable(true);
|
toggleFullscreen->setCheckable(true);
|
||||||
toggleFullscreen->setChecked(false);
|
toggleFullscreen->setChecked(false);
|
||||||
seq = QKeySequence::fromString(settings.value(FULLSCREEN, FULLSCREEN_SHORTCUT).toString());
|
setup_Action(FULLSCREEN, toggleFullscreen,
|
||||||
toggleFullscreen->setShortcut(seq);
|
FULLSCREEN_SHORTCUT, this, SLOT(showFullscreen(bool)), menu_Window);
|
||||||
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();
|
setup_Action(TOGGLE_BOOKMARKS, m_bookmarksDock->toggleViewAction(),
|
||||||
seq = QKeySequence::fromString( settings.value(TOGGLE_BOOKMARKS, TOGGLE_BOOKMARKS_SHORTCUT).toString() );
|
TOGGLE_BOOKMARKS_SHORTCUT, NULL, NULL, menu_Window);
|
||||||
Properties::Instance()->actions[TOGGLE_BOOKMARKS]->setShortcut(seq);
|
|
||||||
menu_Window->addAction(Properties::Instance()->actions[TOGGLE_BOOKMARKS]);
|
|
||||||
settings.endGroup();
|
|
||||||
|
|
||||||
menu_Window->addSeparator();
|
menu_Window->addSeparator();
|
||||||
|
|
||||||
@ -506,6 +418,25 @@ void MainWindow::setup_ViewMenu_Actions()
|
|||||||
menu_Window->addMenu(keyboardCursorShapeMenu);
|
menu_Window->addMenu(keyboardCursorShapeMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setup_ContextMenu_Actions(QMenu* contextMenu) const
|
||||||
|
{
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[COPY_SELECTION]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[PASTE_CLIPBOARD]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[PASTE_SELECTION]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[ZOOM_IN]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[ZOOM_OUT]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[ZOOM_RESET]);
|
||||||
|
contextMenu->addSeparator();
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[CLEAR_TERMINAL]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[SPLIT_HORIZONTAL]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[SPLIT_VERTICAL]);
|
||||||
|
#warning TODO/FIXME: disable the action when there is only one terminal
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[SUB_COLLAPSE]);
|
||||||
|
contextMenu->addSeparator();
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[TOGGLE_MENU]);
|
||||||
|
contextMenu->addAction(Properties::Instance()->actions[PREFERENCES]);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setupCustomDirs()
|
void MainWindow::setupCustomDirs()
|
||||||
{
|
{
|
||||||
const QSettings settings;
|
const QSettings settings;
|
||||||
@ -753,3 +684,24 @@ void MainWindow::onCurrentTitleChanged(int index)
|
|||||||
setWindowTitle(title.isEmpty() || !Properties::Instance()->changeWindowTitle ? QStringLiteral("QTerminal") : title);
|
setWindowTitle(title.isEmpty() || !Properties::Instance()->changeWindowTitle ? QStringLiteral("QTerminal") : title);
|
||||||
setWindowIcon(icon.isNull() || !Properties::Instance()->changeWindowIcon ? QIcon::fromTheme("utilities-terminal") : icon);
|
setWindowIcon(icon.isNull() || !Properties::Instance()->changeWindowIcon ? QIcon::fromTheme("utilities-terminal") : icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::hasMultipleTabs()
|
||||||
|
{
|
||||||
|
return consoleTabulator->findChildren<TermWidgetHolder*>().count() > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MainWindow::hasMultipleSubterminals()
|
||||||
|
{
|
||||||
|
return consoleTabulator->terminalHolder()->findChildren<TermWidget*>().count() > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::aboutToShowActionsMenu()
|
||||||
|
{
|
||||||
|
const QList<QAction*> actions = menu_Actions->actions();
|
||||||
|
for (QAction *action : actions) {
|
||||||
|
if (!action->data().isNull()) {
|
||||||
|
const checkfn check = action->data().value<checkfn>();
|
||||||
|
action->setEnabled(check(*this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -36,7 +36,8 @@ public:
|
|||||||
QWidget * parent = 0, Qt::WindowFlags f = 0);
|
QWidget * parent = 0, Qt::WindowFlags f = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
bool dropMode() { return m_dropMode; }
|
bool dropMode() const { return m_dropMode; }
|
||||||
|
void setup_ContextMenu_Actions(QMenu* contextMenu) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent* event);
|
bool event(QEvent* event);
|
||||||
@ -50,6 +51,8 @@ private:
|
|||||||
|
|
||||||
QDockWidget *m_bookmarksDock;
|
QDockWidget *m_bookmarksDock;
|
||||||
|
|
||||||
|
void setup_Action(const char *name, QAction *action, const char *defaultShortcut, const QObject *receiver,
|
||||||
|
const char *slot, QMenu *menu = NULL, const QVariant &data = QVariant());
|
||||||
void setup_FileMenu_Actions();
|
void setup_FileMenu_Actions();
|
||||||
void setup_ActionsMenu_Actions();
|
void setup_ActionsMenu_Actions();
|
||||||
void setup_ViewMenu_Actions();
|
void setup_ViewMenu_Actions();
|
||||||
@ -64,6 +67,9 @@ private:
|
|||||||
void realign();
|
void realign();
|
||||||
void setDropShortcut(QKeySequence dropShortCut);
|
void setDropShortcut(QKeySequence dropShortCut);
|
||||||
|
|
||||||
|
bool hasMultipleTabs();
|
||||||
|
bool hasMultipleSubterminals();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_consoleTabulator_currentChanged(int);
|
void on_consoleTabulator_currentChanged(int);
|
||||||
void propertiesChanged();
|
void propertiesChanged();
|
||||||
@ -86,5 +92,7 @@ private slots:
|
|||||||
|
|
||||||
void addNewTab();
|
void addNewTab();
|
||||||
void onCurrentTitleChanged(int index);
|
void onCurrentTitleChanged(int index);
|
||||||
|
|
||||||
|
void aboutToShowActionsMenu();
|
||||||
};
|
};
|
||||||
#endif //MAINWINDOW_H
|
#endif //MAINWINDOW_H
|
||||||
|
@ -104,6 +104,7 @@ void Properties::loadSettings()
|
|||||||
|
|
||||||
appTransparency = m_settings->value("MainWindow/ApplicationTransparency", 0).toInt();
|
appTransparency = m_settings->value("MainWindow/ApplicationTransparency", 0).toInt();
|
||||||
termTransparency = m_settings->value("TerminalTransparency", 0).toInt();
|
termTransparency = m_settings->value("TerminalTransparency", 0).toInt();
|
||||||
|
backgroundImage = m_settings->value("TerminalBackgroundImage", QString()).toString();
|
||||||
|
|
||||||
/* default to Right. see qtermwidget.h */
|
/* default to Right. see qtermwidget.h */
|
||||||
scrollBarPos = m_settings->value("ScrollbarPosition", 2).toInt();
|
scrollBarPos = m_settings->value("ScrollbarPosition", 2).toInt();
|
||||||
@ -154,8 +155,10 @@ void Properties::saveSettings()
|
|||||||
while( it.hasNext() )
|
while( it.hasNext() )
|
||||||
{
|
{
|
||||||
it.next();
|
it.next();
|
||||||
QKeySequence shortcut = it.value()->shortcut();
|
QStringList sequenceStrings;
|
||||||
m_settings->setValue( it.key(), shortcut.toString() );
|
foreach (QKeySequence shortcut, it.value()->shortcuts())
|
||||||
|
sequenceStrings.append(shortcut.toString());
|
||||||
|
m_settings->setValue(it.key(), sequenceStrings.join('|'));
|
||||||
}
|
}
|
||||||
m_settings->endGroup();
|
m_settings->endGroup();
|
||||||
|
|
||||||
@ -184,6 +187,7 @@ void Properties::saveSettings()
|
|||||||
|
|
||||||
m_settings->setValue("MainWindow/ApplicationTransparency", appTransparency);
|
m_settings->setValue("MainWindow/ApplicationTransparency", appTransparency);
|
||||||
m_settings->setValue("TerminalTransparency", termTransparency);
|
m_settings->setValue("TerminalTransparency", termTransparency);
|
||||||
|
m_settings->setValue("TerminalBackgroundImage", backgroundImage);
|
||||||
m_settings->setValue("ScrollbarPosition", scrollBarPos);
|
m_settings->setValue("ScrollbarPosition", scrollBarPos);
|
||||||
m_settings->setValue("TabsPosition", tabsPos);
|
m_settings->setValue("TabsPosition", tabsPos);
|
||||||
m_settings->setValue("KeyboardCursorShape", keyboardCursorShape);
|
m_settings->setValue("KeyboardCursorShape", keyboardCursorShape);
|
||||||
|
@ -61,6 +61,7 @@ class Properties
|
|||||||
|
|
||||||
int appTransparency;
|
int appTransparency;
|
||||||
int termTransparency;
|
int termTransparency;
|
||||||
|
QString backgroundImage;
|
||||||
|
|
||||||
int scrollBarPos;
|
int scrollBarPos;
|
||||||
int tabsPos;
|
int tabsPos;
|
||||||
|
@ -37,6 +37,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent)
|
|||||||
this, SLOT(apply()));
|
this, SLOT(apply()));
|
||||||
connect(changeFontButton, SIGNAL(clicked()),
|
connect(changeFontButton, SIGNAL(clicked()),
|
||||||
this, SLOT(changeFontButton_clicked()));
|
this, SLOT(changeFontButton_clicked()));
|
||||||
|
connect(chooseBackgroundImageButton, &QPushButton::clicked,
|
||||||
|
this, &PropertiesDialog::chooseBackgroundImageButton_clicked);
|
||||||
|
|
||||||
QStringList emulations = QTermWidget::availableKeyBindings();
|
QStringList emulations = QTermWidget::availableKeyBindings();
|
||||||
QStringList colorSchemes = QTermWidget::availableColorSchemes();
|
QStringList colorSchemes = QTermWidget::availableColorSchemes();
|
||||||
@ -49,6 +51,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent)
|
|||||||
if (csix != -1)
|
if (csix != -1)
|
||||||
colorSchemaCombo->setCurrentIndex(csix);
|
colorSchemaCombo->setCurrentIndex(csix);
|
||||||
|
|
||||||
|
backgroundImageLineEdit->setText(Properties::Instance()->backgroundImage);
|
||||||
|
|
||||||
emulationComboBox->addItems(emulations);
|
emulationComboBox->addItems(emulations);
|
||||||
int eix = emulationComboBox->findText(Properties::Instance()->emulation);
|
int eix = emulationComboBox->findText(Properties::Instance()->emulation);
|
||||||
emulationComboBox->setCurrentIndex(eix != -1 ? eix : 0 );
|
emulationComboBox->setCurrentIndex(eix != -1 ? eix : 0 );
|
||||||
@ -114,8 +118,12 @@ PropertiesDialog::PropertiesDialog(QWidget *parent)
|
|||||||
historyLimitedTo->setValue(Properties::Instance()->historyLimitedTo);
|
historyLimitedTo->setValue(Properties::Instance()->historyLimitedTo);
|
||||||
|
|
||||||
dropShowOnStartCheckBox->setChecked(Properties::Instance()->dropShowOnStart);
|
dropShowOnStartCheckBox->setChecked(Properties::Instance()->dropShowOnStart);
|
||||||
|
|
||||||
dropHeightSpinBox->setValue(Properties::Instance()->dropHeight);
|
dropHeightSpinBox->setValue(Properties::Instance()->dropHeight);
|
||||||
|
dropHeightSpinBox->setMaximum(100);
|
||||||
dropWidthSpinBox->setValue(Properties::Instance()->dropWidht);
|
dropWidthSpinBox->setValue(Properties::Instance()->dropWidht);
|
||||||
|
dropWidthSpinBox->setMaximum(100);
|
||||||
|
|
||||||
dropShortCutEdit->setText(Properties::Instance()->dropShortCut.toString());
|
dropShortCutEdit->setText(Properties::Instance()->dropShortCut.toString());
|
||||||
|
|
||||||
useBookmarksCheckBox->setChecked(Properties::Instance()->useBookmarks);
|
useBookmarksCheckBox->setChecked(Properties::Instance()->useBookmarks);
|
||||||
@ -158,6 +166,7 @@ void PropertiesDialog::apply()
|
|||||||
|
|
||||||
Properties::Instance()->termTransparency = termTransparencyBox->value();
|
Properties::Instance()->termTransparency = termTransparencyBox->value();
|
||||||
Properties::Instance()->highlightCurrentTerminal = highlightCurrentCheckBox->isChecked();
|
Properties::Instance()->highlightCurrentTerminal = highlightCurrentCheckBox->isChecked();
|
||||||
|
Properties::Instance()->backgroundImage = backgroundImageLineEdit->text();
|
||||||
|
|
||||||
Properties::Instance()->askOnExit = askOnExitCheckBox->isChecked();
|
Properties::Instance()->askOnExit = askOnExitCheckBox->isChecked();
|
||||||
|
|
||||||
@ -214,6 +223,15 @@ void PropertiesDialog::changeFontButton_clicked()
|
|||||||
setFontSample(f);
|
setFontSample(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertiesDialog::chooseBackgroundImageButton_clicked()
|
||||||
|
{
|
||||||
|
QString filename = QFileDialog::getOpenFileName(
|
||||||
|
this, tr("Open or create bookmarks file"),
|
||||||
|
QString(), tr("Images (*.bmp *.png *.xpm *.jpg)"));
|
||||||
|
if (!filename.isNull())
|
||||||
|
backgroundImageLineEdit->setText(filename);
|
||||||
|
}
|
||||||
|
|
||||||
void PropertiesDialog::saveShortcuts()
|
void PropertiesDialog::saveShortcuts()
|
||||||
{
|
{
|
||||||
QList< QString > shortcutKeys = Properties::Instance()->actions.keys();
|
QList< QString > shortcutKeys = Properties::Instance()->actions.keys();
|
||||||
@ -230,7 +248,10 @@ void PropertiesDialog::saveShortcuts()
|
|||||||
QKeySequence sequence = QKeySequence(item->text());
|
QKeySequence sequence = QKeySequence(item->text());
|
||||||
QString sequenceString = sequence.toString();
|
QString sequenceString = sequence.toString();
|
||||||
|
|
||||||
keyAction->setShortcut(sequenceString);
|
QList<QKeySequence> shortcuts;
|
||||||
|
foreach (sequenceString, item->text().split('|'))
|
||||||
|
shortcuts.append(QKeySequence(sequenceString));
|
||||||
|
keyAction->setShortcuts(shortcuts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,9 +266,13 @@ void PropertiesDialog::setupShortcuts()
|
|||||||
{
|
{
|
||||||
QString keyValue = shortcutKeys.at(x);
|
QString keyValue = shortcutKeys.at(x);
|
||||||
QAction *keyAction = Properties::Instance()->actions[keyValue];
|
QAction *keyAction = Properties::Instance()->actions[keyValue];
|
||||||
|
QStringList sequenceStrings;
|
||||||
|
|
||||||
|
foreach (QKeySequence shortcut, keyAction->shortcuts())
|
||||||
|
sequenceStrings.append(shortcut.toString());
|
||||||
|
|
||||||
QTableWidgetItem *itemName = new QTableWidgetItem( tr(keyValue.toStdString().c_str()) );
|
QTableWidgetItem *itemName = new QTableWidgetItem( tr(keyValue.toStdString().c_str()) );
|
||||||
QTableWidgetItem *itemShortcut = new QTableWidgetItem( keyAction->shortcut().toString() );
|
QTableWidgetItem *itemShortcut = new QTableWidgetItem( sequenceStrings.join('|') );
|
||||||
|
|
||||||
itemName->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
itemName->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ class PropertiesDialog : public QDialog, Ui::PropertiesDialog
|
|||||||
void accept();
|
void accept();
|
||||||
|
|
||||||
void changeFontButton_clicked();
|
void changeFontButton_clicked();
|
||||||
|
void chooseBackgroundImageButton_clicked();
|
||||||
void bookmarksButton_clicked();
|
void bookmarksButton_clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -253,6 +253,7 @@ void TabWidget::removeFinished()
|
|||||||
|
|
||||||
void TabWidget::removeTab(int index)
|
void TabWidget::removeTab(int index)
|
||||||
{
|
{
|
||||||
|
if (count() > 1) {
|
||||||
setUpdatesEnabled(false);
|
setUpdatesEnabled(false);
|
||||||
|
|
||||||
QWidget * w = widget(index);
|
QWidget * w = widget(index);
|
||||||
@ -265,12 +266,12 @@ void TabWidget::removeTab(int index)
|
|||||||
{
|
{
|
||||||
qobject_cast<TermWidgetHolder*>(widget(current))->setInitialFocus();
|
qobject_cast<TermWidgetHolder*>(widget(current))->setInitialFocus();
|
||||||
}
|
}
|
||||||
// do not decrease it as renaming is disabled in renameTabsAfterRemove
|
// do not decrease it as renaming is disabled in renameTabsAfterRemove
|
||||||
// tabNumerator--;
|
// tabNumerator--;
|
||||||
setUpdatesEnabled(true);
|
setUpdatesEnabled(true);
|
||||||
|
} else {
|
||||||
if (count() == 0)
|
|
||||||
emit closeTabNotification();
|
emit closeTabNotification();
|
||||||
|
}
|
||||||
|
|
||||||
renameTabsAfterRemove();
|
renameTabsAfterRemove();
|
||||||
showHideTabBar();
|
showHideTabBar();
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "termwidget.h"
|
#include "termwidget.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
static int TermWidgetCount = 0;
|
static int TermWidgetCount = 0;
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ TermWidgetImpl::TermWidgetImpl(const QString & wdir, const QString & shell, QWid
|
|||||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
|
||||||
this, SLOT(customContextMenuCall(const QPoint &)));
|
this, SLOT(customContextMenuCall(const QPoint &)));
|
||||||
|
|
||||||
connect(this, SIGNAL(urlActivated(QUrl)), this, SLOT(activateUrl(const QUrl&)));
|
connect(this, &QTermWidget::urlActivated, this, &TermWidgetImpl::activateUrl);
|
||||||
|
|
||||||
startShellProgram();
|
startShellProgram();
|
||||||
}
|
}
|
||||||
@ -90,6 +91,7 @@ void TermWidgetImpl::propertiesChanged()
|
|||||||
|
|
||||||
setKeyBindings(Properties::Instance()->emulation);
|
setKeyBindings(Properties::Instance()->emulation);
|
||||||
setTerminalOpacity(1.0 - Properties::Instance()->termTransparency/100.0);
|
setTerminalOpacity(1.0 - Properties::Instance()->termTransparency/100.0);
|
||||||
|
setTerminalBackgroundImage(Properties::Instance()->backgroundImage);
|
||||||
|
|
||||||
/* be consequent with qtermwidget.h here */
|
/* be consequent with qtermwidget.h here */
|
||||||
switch(Properties::Instance()->scrollBarPos) {
|
switch(Properties::Instance()->scrollBarPos) {
|
||||||
@ -123,23 +125,20 @@ void TermWidgetImpl::propertiesChanged()
|
|||||||
|
|
||||||
void TermWidgetImpl::customContextMenuCall(const QPoint & pos)
|
void TermWidgetImpl::customContextMenuCall(const QPoint & pos)
|
||||||
{
|
{
|
||||||
QMenu menu;
|
QMenu* contextMenu = new QMenu(this);
|
||||||
menu.addAction(Properties::Instance()->actions[COPY_SELECTION]);
|
|
||||||
menu.addAction(Properties::Instance()->actions[PASTE_CLIPBOARD]);
|
QList<QAction*> actions = filterActions(pos);
|
||||||
menu.addAction(Properties::Instance()->actions[PASTE_SELECTION]);
|
for (auto& action : actions)
|
||||||
menu.addAction(Properties::Instance()->actions[ZOOM_IN]);
|
{
|
||||||
menu.addAction(Properties::Instance()->actions[ZOOM_OUT]);
|
contextMenu->addAction(action);
|
||||||
menu.addAction(Properties::Instance()->actions[ZOOM_RESET]);
|
}
|
||||||
menu.addSeparator();
|
|
||||||
menu.addAction(Properties::Instance()->actions[CLEAR_TERMINAL]);
|
contextMenu->addSeparator();
|
||||||
menu.addAction(Properties::Instance()->actions[SPLIT_HORIZONTAL]);
|
|
||||||
menu.addAction(Properties::Instance()->actions[SPLIT_VERTICAL]);
|
const MainWindow *main = qobject_cast<MainWindow*>(window());
|
||||||
#warning TODO/FIXME: disable the action when there is only one terminal
|
main->setup_ContextMenu_Actions(contextMenu);
|
||||||
menu.addAction(Properties::Instance()->actions[SUB_COLLAPSE]);
|
|
||||||
menu.addSeparator();
|
contextMenu->exec(mapToGlobal(pos));
|
||||||
menu.addAction(Properties::Instance()->actions[TOGGLE_MENU]);
|
|
||||||
menu.addAction(Properties::Instance()->actions[PREFERENCES]);
|
|
||||||
menu.exec(mapToGlobal(pos));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TermWidgetImpl::zoomIn()
|
void TermWidgetImpl::zoomIn()
|
||||||
@ -166,8 +165,8 @@ void TermWidgetImpl::zoomReset()
|
|||||||
// Properties::Instance()->saveSettings();
|
// Properties::Instance()->saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TermWidgetImpl::activateUrl(const QUrl & url) {
|
void TermWidgetImpl::activateUrl(const QUrl & url, bool fromContextMenu) {
|
||||||
if (QApplication::keyboardModifiers() & Qt::ControlModifier) {
|
if (QApplication::keyboardModifiers() & Qt::ControlModifier || fromContextMenu) {
|
||||||
QDesktopServices::openUrl(url);
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class TermWidgetImpl : public QTermWidget
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void customContextMenuCall(const QPoint & pos);
|
void customContextMenuCall(const QPoint & pos);
|
||||||
void activateUrl(const QUrl& url);
|
void activateUrl(const QUrl& url, bool fromContextMenu);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user