diff --git a/livesupport/products/gLiveSupport/src/NowPlaying.cxx b/livesupport/products/gLiveSupport/src/NowPlaying.cxx index 36b2497d1..f497a597e 100644 --- a/livesupport/products/gLiveSupport/src/NowPlaying.cxx +++ b/livesupport/products/gLiveSupport/src/NowPlaying.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/NowPlaying.cxx,v $ ------------------------------------------------------------------------------*/ @@ -81,6 +81,7 @@ NowPlaying :: NowPlaying(Ptr::Ref gLiveSupport, &NowPlaying::onStopButtonClicked )); isActive = false; + isPaused = false; label = Gtk::manage(new Gtk::Label); label->set_ellipsize(Pango::ELLIPSIZE_END); @@ -101,6 +102,7 @@ NowPlaying :: setPlayable(Ptr::Ref playable) throw () stopButton->show(); pauseButton->show(); isActive = true; + isPaused = false; } Ptr::Ref infoString(new Glib::ustring); @@ -124,7 +126,11 @@ NowPlaying :: setPlayable(Ptr::Ref playable) throw () label->set_text(""); if (isActive) { remove(*stopButton); - remove(*pauseButton); + if (isPaused) { + remove(*playButton); + } else { + remove(*pauseButton); + } isActive = false; } this->playable.reset(); @@ -142,7 +148,9 @@ NowPlaying :: onPlayButtonClicked(void) throw () remove(*playButton); pack_end(*pauseButton, Gtk::PACK_SHRINK, 2); - pauseButton->show(); + pauseButton->show(); + + isPaused = false; } @@ -157,6 +165,8 @@ NowPlaying :: onPauseButtonClicked(void) throw () remove(*pauseButton); pack_end(*playButton, Gtk::PACK_SHRINK, 2); playButton->show(); + + isPaused = true; } diff --git a/livesupport/products/gLiveSupport/src/NowPlaying.h b/livesupport/products/gLiveSupport/src/NowPlaying.h index eec30fd50..8ab179336 100644 --- a/livesupport/products/gLiveSupport/src/NowPlaying.h +++ b/livesupport/products/gLiveSupport/src/NowPlaying.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/NowPlaying.h,v $ ------------------------------------------------------------------------------*/ @@ -66,7 +66,7 @@ using namespace LiveSupport::Widgets; * The box displaying "now playing" in the master panel. * * @author $Author: fgerlits $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ class NowPlaying : public Gtk::HBox, public LocalizedObject @@ -78,6 +78,11 @@ class NowPlaying : public Gtk::HBox, */ bool isActive; + /** + * Whether the pause button has been clicked. + */ + bool isPaused; + /** * The playable which is shown in the widget. */