Make keyboard shortcuts independent from translations
authorDaniel Albers <daniel@lbers.com>
Tue, 9 Mar 2010 23:33:01 +0000 (00:33 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 10 Mar 2010 10:51:34 +0000 (11:51 +0100)
src/qtui/bufferwidget.cpp
src/qtui/inputwidget.cpp
src/qtui/mainwin.cpp

index e6990aa..ecfdceb 100644 (file)
@@ -85,7 +85,7 @@ BufferWidget::BufferWidget(QWidget *parent)
   Action *zoomOriginalChatview = coll->add<Action>("ZoomOriginalChatView", this, SLOT(zoomOriginal()));
   zoomOriginalChatview->setIcon(SmallIcon("zoom-original"));
   zoomOriginalChatview->setText(tr("Actual Size"));
-  //zoomOriginalChatview->setShortcut(tr("Ctrl+0")); // used for RTS switching
+  //zoomOriginalChatview->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_0)); // used for RTS switching
 }
 
 BufferWidget::~BufferWidget() {
index cd57627..814f4f4 100644 (file)
@@ -129,7 +129,7 @@ InputWidget::InputWidget(QWidget *parent)
   Action *activateInputline = coll->add<Action>("FocusInputLine");
   connect(activateInputline, SIGNAL(triggered()), SLOT(setFocus()));
   activateInputline->setText(tr("Focus Input Line"));
-  activateInputline->setShortcut(tr("Ctrl+L"));
+  activateInputline->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
 
   connect(inputLine(), SIGNAL(currentCharFormatChanged(QTextCharFormat)), this, SLOT(currentCharFormatChanged(QTextCharFormat)));
 }
index 75f2c83..dce01f3 100644 (file)
@@ -314,7 +314,7 @@ void MainWin::setupActions() {
   coll->addAction("ConfigureNetworks", new Action(SmallIcon("configure"), tr("Configure &Networks..."), coll,
                                               this, SLOT(on_actionConfigureNetworks_triggered())));
   coll->addAction("Quit", new Action(SmallIcon("application-exit"), tr("&Quit"), coll,
-                                      this, SLOT(quit()), tr("Ctrl+Q")));
+                                      this, SLOT(quit()), QKeySequence::Quit));
 
   // View
   coll->addAction("ConfigureBufferViews", new Action(tr("&Configure Chat Lists..."), coll,
@@ -329,14 +329,14 @@ void MainWin::setupActions() {
   coll->addAction("ShowAwayLog", new Action(tr("Show Away Log"), coll,
                                             this, SLOT(showAwayLog())));
   coll->addAction("ToggleMenuBar", new Action(SmallIcon("show-menu"), tr("Show &Menubar"), coll,
-                                                0, 0, tr("Ctrl+M")))->setCheckable(true);
+                                                0, 0, QKeySequence(Qt::CTRL + Qt::Key_M)))->setCheckable(true);
 
   coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
                                                 0, 0))->setCheckable(true);
 
   // Settings
   coll->addAction("ConfigureQuassel", new Action(SmallIcon("configure"), tr("&Configure Quassel..."), coll,
-                                                  this, SLOT(showSettingsDlg()), tr("F7")));
+                                                  this, SLOT(showSettingsDlg()), QKeySequence(Qt::Key_F7)));
 
   // Help
   coll->addAction("AboutQuassel", new Action(SmallIcon("quassel"), tr("&About Quassel"), coll,