From f3d04e4c34b61ed75defe4929a5cb624dc989b49 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Mon, 31 Aug 2009 12:02:36 +0200 Subject: [PATCH] Show native shortcut text representations. Mac fix --- src/MainWindow.cpp | 6 +++--- src/MediaView.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index ac10087..7243ae1 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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: diff --git a/src/MediaView.cpp b/src/MediaView.cpp index 22163bd..5b294da 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -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); -- 2.39.5