diff --git a/src/tomahawkwindow.cpp b/src/tomahawkwindow.cpp
index ea513d8b8..8137bf2ef 100644
--- a/src/tomahawkwindow.cpp
+++ b/src/tomahawkwindow.cpp
@@ -293,6 +293,16 @@ TomahawkWindow::setupSignals()
connect( ui->actionCreate_New_Station, SIGNAL( triggered() ), SLOT( createStation() ));
connect( ui->actionAboutTomahawk, SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) );
connect( ui->actionExit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
+
+ connect( ui->actionPlay, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( playPause() ) );
+ connect( ui->actionNext, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( previous() ) );
+ connect( ui->actionPrevious, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( next() ) );
+
+ connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), this, SLOT( audioStarted() ) );
+ connect( AudioEngine::instance(), SIGNAL( resumed()), this, SLOT( audioStarted() ) );
+ connect( AudioEngine::instance(), SIGNAL( paused() ), this, SLOT( audioStopped() ) );
+ connect( AudioEngine::instance(), SIGNAL( stopped() ), this, SLOT( audioStopped() ) );
+
#if defined( Q_OS_DARWIN )
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );
@@ -519,6 +529,19 @@ TomahawkWindow::createPlaylist()
}
}
+void
+TomahawkWindow::audioStarted()
+{
+ ui->actionPlay->setText( tr( "Pause" ) );
+}
+
+void
+TomahawkWindow::audioStopped()
+{
+
+ ui->actionPlay->setText( tr( "Play" ) );
+}
+
void
TomahawkWindow::onPlaybackLoading( const Tomahawk::result_ptr& result )
diff --git a/src/tomahawkwindow.h b/src/tomahawkwindow.h
index 2720a4cfd..0d58a5b75 100644
--- a/src/tomahawkwindow.h
+++ b/src/tomahawkwindow.h
@@ -50,7 +50,6 @@ public:
~TomahawkWindow();
AudioControls* audioControls() { return m_audioControls; }
- QStackedWidget* playlistStack();
SourceTreeView* sourceTreeView() const { return m_sourcetree; }
void setWindowTitle( const QString& title );
@@ -83,6 +82,9 @@ private slots:
void onHistoryBackAvailable( bool avail );
void onHistoryForwardAvailable( bool avail );
+ void audioStarted();
+ void audioStopped();
+
void showAboutTomahawk();
void checkForUpdates();
diff --git a/src/tomahawkwindow.ui b/src/tomahawkwindow.ui
index b770211cd..2005cdd5f 100644
--- a/src/tomahawkwindow.ui
+++ b/src/tomahawkwindow.ui
@@ -35,7 +35,7 @@
0
0
1000
- 21
+ 20