]> git.sur5r.net Git - minitube/commitdiff
Loading icon
authorFlavio <flavio.tordini@gmail.com>
Tue, 21 Oct 2014 20:11:21 +0000 (22:11 +0200)
committerFlavio <flavio.tordini@gmail.com>
Tue, 21 Oct 2014 20:11:21 +0000 (22:11 +0200)
src/mainwindow.cpp

index 1602b9a594978275af77070a056a80dc02026061..b03d59a8e5ced29be72f7a5bfca84fd7310a04b6 100644 (file)
@@ -287,8 +287,8 @@ void MainWindow::createActions() {
     actions->insert("skip", skipAct);
     connect(skipAct, SIGNAL(triggered()), mediaView, SLOT(skip()));
 
-    pauseAct = new QAction(IconUtils::icon("media-playback-pause"), tr("&Pause"), this);
-    pauseAct->setStatusTip(tr("Pause playback"));
+    pauseAct = new QAction(IconUtils::icon("media-playback-start"), tr("&Play"), this);
+    pauseAct->setStatusTip(tr("Resume playback"));
     pauseAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::Key_Space) << QKeySequence(Qt::Key_MediaPlay));
     pauseAct->setEnabled(false);
     actions->insert("pause", pauseAct);
@@ -1065,6 +1065,9 @@ void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState
 
     case Phonon::StoppedState:
         pauseAct->setEnabled(false);
+        pauseAct->setIcon(IconUtils::icon("media-playback-start"));
+        pauseAct->setText(tr("&Play"));
+        pauseAct->setStatusTip(tr("Resume playback") + " (" +  pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
         // stopAct->setEnabled(false);
         break;
 
@@ -1077,6 +1080,12 @@ void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState
         break;
 
     case Phonon::BufferingState:
+        pauseAct->setEnabled(false);
+        pauseAct->setIcon(IconUtils::icon("content-loading"));
+        pauseAct->setText(tr("&Loading..."));
+        pauseAct->setStatusTip(QString());
+        break;
+
     case Phonon::LoadingState:
         pauseAct->setEnabled(false);
         currentTime->clear();