diff options
author | Tobias Markmann <tm@ayena.de> | 2015-03-17 15:00:02 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-04-10 15:12:53 (GMT) |
commit | 6a2e6d58233cbf40b34f962f2b2f9b1589969e13 (patch) | |
tree | b0a62c32adc64fda30fc024f38acfb2a6da6351e /Swift/QtUI/QtSwift.cpp | |
parent | b4e3ecf40ee5fda0ba46f714bd24a6d9f3a4cb5e (diff) | |
download | swift-6a2e6d58233cbf40b34f962f2b2f9b1589969e13.zip swift-6a2e6d58233cbf40b34f962f2b2f9b1589969e13.tar.bz2 |
Fix keyboard shortcuts for --no-tabs mode
This commit enables the following shortcuts for --no-tabs mode:
- CTRL + Tab or CTRL/CMD + PageDown to switch to the next chat window
- CTRL + Shift + Tab or CTRL/CMD + PageUp to switch to the previous chat window
- CTRL/CMD + W to close the current chat window
- ALT + A to switch to the next chat window with active messages
Test-Information:
Verified that the new shortcuts work as expected and verified that
standard mode and netbook mode still work as usual.
Change-Id: I3831b6c02f5d664cc8b21d7571e20aed00de89b4
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index bce3ca4..20d7bc9 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -38,7 +38,9 @@ #include <Swift/Controllers/StatusCache.h> #include <Swift/QtUI/QtLoginWindow.h> +#include <Swift/QtUI/QtChatTabsBase.h> #include <Swift/QtUI/QtChatTabs.h> +#include <Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h> #include <Swift/QtUI/QtSystemTray.h> #include <Swift/QtUI/QtSoundPlayer.h> #include <Swift/QtUI/QtSwiftUtil.h> @@ -165,7 +167,13 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa } bool enableAdHocCommandOnJID = options.count("enable-jid-adhocs") > 0; - tabs_ = options.count("no-tabs") && !splitter_ ? NULL : new QtChatTabs(splitter_ != NULL, settingsHierachy_, options.count("trellis")); + tabs_ = NULL; + if (options.count("no-tabs") && !splitter_) { + tabs_ = new QtChatTabsShortcutOnlySubstitute(); + } + else { + tabs_ = new QtChatTabs(splitter_ != NULL, settingsHierachy_, options.count("trellis")); + } bool startMinimized = options.count("start-minimized") > 0; applicationPathProvider_ = new PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME); storagesFactory_ = new FileStoragesFactory(applicationPathProvider_->getDataDir(), networkFactories_.getCryptoProvider()); |