]> git.sur5r.net Git - minitube/commitdiff
Show native shortcut text representations. Mac fix
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 31 Aug 2009 10:02:36 +0000 (12:02 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 31 Aug 2009 10:02:36 +0000 (12:02 +0200)
src/MainWindow.cpp
src/MediaView.cpp

index ac100872ab62503b6bce039fa324d85b0c903382..7243ae1b91b8fa0821e104c62d47b989259b9bff 100755 (executable)
@@ -212,7 +212,7 @@ void MainWindow::createActions() {
 
         // show keyboard shortcuts in the status bar
         if (!action->shortcut().isEmpty())
-            action->setStatusTip(action->statusTip() + " (" + action->shortcut().toString() + ")");
+            action->setStatusTip(action->statusTip() + " (" + action->shortcut().toString(QKeySequence::NativeText) + ")");
 
         // make the actions work when video is fullscreen
         action->setShortcutContext(Qt::ApplicationShortcut);
@@ -466,7 +466,7 @@ void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState
         pauseAct->setEnabled(true);
         pauseAct->setIcon(QtIconLoader::icon("media-pause", QIcon(":/images/pause.png")));
         pauseAct->setText(tr("&Pause"));
-        pauseAct->setStatusTip(tr("Pause playback") + " (" +  pauseAct->shortcut().toString() + ")");
+        pauseAct->setStatusTip(tr("Pause playback") + " (" +  pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
         skipAct->setEnabled(true);
         break;
 
@@ -480,7 +480,7 @@ void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState
         pauseAct->setEnabled(true);
         pauseAct->setIcon(QtIconLoader::icon("media-play", QIcon(":/images/play.png")));
         pauseAct->setText(tr("&Play"));
-        pauseAct->setStatusTip(tr("Resume playback") + " (" +  pauseAct->shortcut().toString() + ")");
+        pauseAct->setStatusTip(tr("Resume playback") + " (" +  pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
         break;
 
          case Phonon::BufferingState:
index 22163bdef32c42a83457f010681a052622b07574..5b294dabff10dd53349207417326250231c8ee17 100644 (file)
@@ -22,21 +22,21 @@ MediaView::MediaView(QWidget *parent) : QWidget(parent) {
     mostRelevantAction = new QAction(tr("Most relevant"), this);
     QKeySequence keySequence(Qt::CTRL + Qt::Key_1);
     mostRelevantAction->setShortcut(keySequence);
-    mostRelevantAction->setStatusTip(keySequence.toString());
+    mostRelevantAction->setStatusTip(keySequence.toString(QKeySequence::NativeText));
     addAction(mostRelevantAction);
     connect(mostRelevantAction, SIGNAL(triggered()), this, SLOT(searchMostRelevant()), Qt::QueuedConnection);
     sortBar->addAction(mostRelevantAction);
     mostRecentAction = new QAction(tr("Most recent"), this);
     keySequence = QKeySequence(Qt::CTRL + Qt::Key_2);
     mostRecentAction->setShortcut(keySequence);
-    mostRecentAction->setStatusTip(keySequence.toString());
+    mostRecentAction->setStatusTip(keySequence.toString(QKeySequence::NativeText));
     addAction(mostRecentAction);
     connect(mostRecentAction, SIGNAL(triggered()), this, SLOT(searchMostRecent()), Qt::QueuedConnection);
     sortBar->addAction(mostRecentAction);
     mostViewedAction = new QAction(tr("Most viewed"), this);
     keySequence = QKeySequence(Qt::CTRL + Qt::Key_3);
     mostViewedAction->setShortcut(keySequence);
-    mostViewedAction->setStatusTip(keySequence.toString());
+    mostViewedAction->setStatusTip(keySequence.toString(QKeySequence::NativeText));
     addAction(mostViewedAction);
     connect(mostViewedAction, SIGNAL(triggered()), this, SLOT(searchMostViewed()), Qt::QueuedConnection);
     sortBar->addAction(mostViewedAction);