summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnt Gulbrandsen <arnt@gulbrandsen.priv.no>2011-01-06 15:07:40 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-01-13 23:27:10 (GMT)
commita400bc47e66d18d0d6a2ed195e8ace5697515fcb (patch)
treef5407f1657afcb468c03816a7519daa9be3b6deb /Swift/QtUI
parent694ff33145467a9d8a0f87317124bc5c4251d18d (diff)
downloadswift-a400bc47e66d18d0d6a2ed195e8ace5697515fcb.zip
swift-a400bc47e66d18d0d6a2ed195e8ace5697515fcb.tar.bz2
Start adding keyboard accelerators for swift commands.
This is not complete, just a start with some of the low-hanging fruit. Eventually it should be possible to use swift without a mouse. License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp24
-rw-r--r--Swift/QtUI/QtMainWindow.cpp26
2 files changed, 25 insertions, 25 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 4a54152..42a8f49 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -114,7 +114,7 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
certificateButton_->setIcon(QIcon(":/icons/certificate.png"));
certificateButton_->setToolTip("Click if you have a personal certificate used for login to the service.");
certificateButton_->setWhatsThis("Click if you have a personal certificate used for login to the service.");
-
+
credentialsLayout->addWidget(certificateButton_);
connect(certificateButton_, SIGNAL(clicked(bool)), SLOT(handleCertficateChecked(bool)));
@@ -143,29 +143,29 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
menuBar_ = menuBar();
#endif
QApplication::setQuitOnLastWindowClosed(false);
-
- swiftMenu_ = new QMenu(tr("Swift"), this);
+
+ swiftMenu_ = new QMenu(tr("&Swift"), this);
#ifdef SWIFTEN_PLATFORM_MACOSX
- generalMenu_ = new QMenu(tr("General"), this);
+ generalMenu_ = new QMenu(tr("&General"), this);
#else
generalMenu_ = swiftMenu_;
#endif
-
- QAction* aboutAction = new QAction("About Swift", this);
+
+ QAction* aboutAction = new QAction("&About Swift", this);
connect(aboutAction, SIGNAL(triggered()), SLOT(handleAbout()));
swiftMenu_->addAction(aboutAction);
- QAction* xmlConsoleAction = new QAction(tr("Show Debug Console"), this);
+ QAction* xmlConsoleAction = new QAction(tr("&Show Debug Console"), this);
connect(xmlConsoleAction, SIGNAL(triggered()), SLOT(handleShowXMLConsole()));
generalMenu_->addAction(xmlConsoleAction);
- toggleSoundsAction_ = new QAction(tr("Play Sounds"), this);
+ toggleSoundsAction_ = new QAction(tr("&Play Sounds"), this);
toggleSoundsAction_->setCheckable(true);
toggleSoundsAction_->setChecked(true);
connect(toggleSoundsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleSounds(bool)));
generalMenu_->addAction(toggleSoundsAction_);
- toggleNotificationsAction_ = new QAction(tr("Show Notifications"), this);
+ toggleNotificationsAction_ = new QAction(tr("Show &Notifications"), this);
toggleNotificationsAction_->setCheckable(true);
toggleNotificationsAction_->setChecked(true);
connect(toggleNotificationsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleNotifications(bool)));
@@ -176,8 +176,8 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
#ifndef SWIFTEN_PLATFORM_MACOSX
swiftMenu_->addSeparator();
#endif
-
- QAction* quitAction = new QAction("Quit", this);
+
+ QAction* quitAction = new QAction("&Quit", this);
connect(quitAction, SIGNAL(triggered()), SLOT(handleQuit()));
swiftMenu_->addAction(quitAction);
@@ -392,7 +392,7 @@ void QtLoginWindow::resizeEvent(QResizeEvent*) {
}
void QtLoginWindow::moveEvent(QMoveEvent*) {
- emit geometryChanged();
+ emit geometryChanged();
}
bool QtLoginWindow::askUserToTrustCertificatePermanently(const String& message, Certificate::ref certificate) {
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 325fab9..21d1474 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -54,25 +54,25 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS
contactsTabWidget_->setLayout(contactTabLayout);
contactTabLayout->setSpacing(0);
contactTabLayout->setContentsMargins(0, 0, 0, 0);
-
+
treeWidget_ = new QtTreeWidget(uiEventStream_);
contextMenu_ = new QtRosterContextMenu(uiEventStream_, treeWidget_);
treeWidget_->setContextMenu(contextMenu_);
contactTabLayout->addWidget(treeWidget_);
- tabs_->addTab(contactsTabWidget_, "Contacts");
-
+ tabs_->addTab(contactsTabWidget_, "&Contacts");
+
eventWindow_ = new QtEventWindow(uiEventStream_);
connect(eventWindow_, SIGNAL(onNewEventCountUpdated(int)), this, SLOT(handleEventCountUpdated(int)));
-
+
chatListWindow_ = new QtChatListWindow(uiEventStream_);
- tabs_->addTab(eventWindow_, "Notices");
- tabs_->addTab(chatListWindow_, "Chats");
+ tabs_->addTab(eventWindow_, "&Notices");
+ tabs_->addTab(chatListWindow_, "C&hats");
this->setLayout(mainLayout);
-
- QMenu* viewMenu = new QMenu(tr("View"), this);
+
+ QMenu* viewMenu = new QMenu(tr("&View"), this);
menus_.push_back(viewMenu);
showOfflineAction_ = new QAction("Show offline contacts", this);
showOfflineAction_->setCheckable(true);
@@ -80,19 +80,19 @@ QtMainWindow::QtMainWindow(QtSettingsProvider* settings, UIEventStream* uiEventS
connect(showOfflineAction_, SIGNAL(toggled(bool)), SLOT(handleShowOfflineToggled(bool)));
viewMenu->addAction(showOfflineAction_);
- QMenu* actionsMenu = new QMenu(tr("Actions"), this);
+ QMenu* actionsMenu = new QMenu(tr("&Actions"), this);
menus_.push_back(actionsMenu);
- QAction* joinMUCAction = new QAction("Join Room", this);
+ QAction* joinMUCAction = new QAction("&Join Room", this);
connect(joinMUCAction, SIGNAL(triggered()), SLOT(handleJoinMUCAction()));
actionsMenu->addAction(joinMUCAction);
- addUserAction_ = new QAction("Add Contact", this);
+ addUserAction_ = new QAction("&Add Contact", this);
connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool)));
actionsMenu->addAction(addUserAction_);
- chatUserAction_ = new QAction("Start Chat", this);
+ chatUserAction_ = new QAction("Start &Chat", this);
connect(chatUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleChatUserActionTriggered(bool)));
actionsMenu->addAction(chatUserAction_);
actionsMenu->addSeparator();
- QAction* signOutAction = new QAction("Sign Out", this);
+ QAction* signOutAction = new QAction("&Sign Out", this);
connect(signOutAction, SIGNAL(triggered()), SLOT(handleSignOutAction()));
actionsMenu->addAction(signOutAction);