]> git.sesse.net Git - vlc/commitdiff
Adds a pause pixmap for the play/pause button
authorRafaël Carré <funman@videolan.org>
Sat, 8 Sep 2007 00:46:40 +0000 (00:46 +0000)
committerRafaël Carré <funman@videolan.org>
Sat, 8 Sep 2007 00:46:40 +0000 (00:46 +0000)
Fix play/pause toggle
Removes 2 unused signals

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/pixmaps/pause.png [new file with mode: 0644]
modules/gui/qt4/res.qrc

index a6859752ddcbdec8f18919fe942460794bf1f826..6188f368d5f46a3c93485c011af84f87a8df0e04 100644 (file)
@@ -586,19 +586,12 @@ void ControlsWidget::updateOnTimer()
     enableVideo( THEMIM->getIM()->hasVideo() );
 }
 
-/* FIXME */
 void ControlsWidget::setStatus( int status )
 {
-    if( status == 1 ) // Playing
-    {
-        msg_Dbg( p_intf, "I was here %i", status );
-        // playButton->setIcon( QIcon( ":/pixmaps/pause.png" ) );
-    }
+    if( status == PLAYING_S ) // Playing
+        playButton->setIcon( QIcon( ":/pixmaps/pause.png" ) );
     else
-    {
-        msg_Dbg( p_intf, "I was here %i", status );
-        // playButton->setIcon( QIcon( ":/pixmaps/play.png" ) );
-    }
+        playButton->setIcon( QIcon( ":/pixmaps/play.png" ) );
 }
 
 /**
index 254ac289ae18efa590b49a33a1f1ccf9e2756fa9..18ddc5ca37d6c0babc21fb97c0c7c1752c8a9700 100644 (file)
@@ -88,16 +88,11 @@ void InputManager::update()
         emit positionUpdated( 0.0, 0, 0 );
         emit navigationChanged( 0 );
         i_old_playing_status = 0;
-        emit statusChanged( 0 ); // 0 = STOPPED, 1 = PLAY, 2 = PAUSE
+        emit statusChanged( END_S ); // see vlc_input.h, input_state_e enum
         delInput();
         return;
     }
 
-    if( !b_had_audio && b_has_audio )
-        emit audioStarted();
-    if( !b_had_video && b_has_video )
-        emit videoStarted();
-
     /* Update position */
     mtime_t i_length, i_time;
     float f_pos;
index da6a8fdc83bcf2e2290b4b33478fb85f820abb61..816504246ce5a72a846d7f70d4899d80880b66eb 100644 (file)
@@ -65,8 +65,6 @@ signals:
     void navigationChanged( int );
     /// Play/pause status
     void statusChanged( int );
-    void audioStarted();
-    void videoStarted();
 };
 
 class MainInputManager : public QObject
diff --git a/modules/gui/qt4/pixmaps/pause.png b/modules/gui/qt4/pixmaps/pause.png
new file mode 100644 (file)
index 0000000..bf01571
Binary files /dev/null and b/modules/gui/qt4/pixmaps/pause.png differ
index 4353868b48089f4b1f3e931e83f1d1a123f8f24d..9cf67fb3f93c7956bd9c6a21f6b81f978c6e5d1f 100644 (file)
@@ -2,6 +2,7 @@
 <RCC version="1.0">
  <qresource>
   <file>pixmaps/play.png</file>
+  <file>pixmaps/pause.png</file>
   <file>pixmaps/stop.png</file>
   <file>pixmaps/previous.png</file>
   <file>pixmaps/next.png</file>