[vlc-commits] commit: InputManager: Rename the status property to playingStatus and add a getter. ( Jakub Wieczorek )

git at videolan.org git at videolan.org
Sun Dec 26 13:13:51 CET 2010


vlc | branch: master | Jakub Wieczorek <fawek at fawek.net> | Fri Dec 24 19:39:29 2010 +0100| [627feeb61ad0cf76ec27befe48ebfb68eb68b110] | committer: Jean-Baptiste Kempf 

InputManager: Rename the status property to playingStatus and add a getter.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=627feeb61ad0cf76ec27befe48ebfb68eb68b110
---

 modules/gui/qt4/components/controller.cpp |    2 +-
 modules/gui/qt4/dialogs/extended.cpp      |    2 +-
 modules/gui/qt4/extensions_manager.cpp    |    2 +-
 modules/gui/qt4/input_manager.cpp         |    9 +++++++--
 modules/gui/qt4/input_manager.hpp         |    3 ++-
 modules/gui/qt4/main_interface.cpp        |    2 +-
 modules/gui/qt4/main_interface_win32.cpp  |    2 +-
 7 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 0874915..c3775a3 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -67,7 +67,7 @@ AbstractController::AbstractController( intf_thread_t * _p_i, QWidget *_parent )
     toolbarActionsMapper = new QSignalMapper( this );
     CONNECT( toolbarActionsMapper, mapped( int ),
              ActionsManager::getInstance( p_intf  ), doAction( int ) );
-    CONNECT( THEMIM->getIM(), statusChanged( int ), this, setStatus( int ) );
+    CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, setStatus( int ) );
 
     setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
 }
diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp
index 6f107fb..b5e484b 100644
--- a/modules/gui/qt4/dialogs/extended.cpp
+++ b/modules/gui/qt4/dialogs/extended.cpp
@@ -111,7 +111,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
             move ( 450 , 0 );
     }
 
-    CONNECT( THEMIM->getIM(), statusChanged( int ), this, changedItem( int ) );
+    CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, changedItem( int ) );
 }
 
 ExtendedDialog::~ExtendedDialog()
diff --git a/modules/gui/qt4/extensions_manager.cpp b/modules/gui/qt4/extensions_manager.cpp
index 98e3b8f..84594ab 100644
--- a/modules/gui/qt4/extensions_manager.cpp
+++ b/modules/gui/qt4/extensions_manager.cpp
@@ -48,7 +48,7 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
 
     menuMapper = new QSignalMapper( this );
     CONNECT( menuMapper, mapped( int ), this, triggerMenu( int ) );
-    CONNECT( THEMIM->getIM(), statusChanged( int ), this, playingChanged( int ) );
+    CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, playingChanged( int ) );
     DCONNECT( THEMIM, inputChanged( input_thread_t* ),
               this, inputChanged( input_thread_t* ) );
     b_unloading = false;
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 1cefa87..539279c 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -157,7 +157,7 @@ void InputManager::delInput()
     emit nameChanged( "" );
     emit chapterChanged( 0 );
     emit titleChanged( 0 );
-    emit statusChanged( END_S );
+    emit playingStatusChanged( END_S );
 
     emit teletextPossible( false );
     emit AtoBchanged( false, false );
@@ -436,7 +436,7 @@ void InputManager::UpdateStatus()
     if( i_old_playing_status != state )
     {
         i_old_playing_status = state;
-        emit statusChanged( state );
+        emit playingStatusChanged( state );
     }
 }
 
@@ -498,6 +498,11 @@ void InputManager::UpdateName()
     }
 }
 
+int InputManager::playingStatus()
+{
+    return i_old_playing_status;
+}
+
 bool InputManager::hasAudio()
 {
     if( hasInput() )
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 65a32e1..e56eca5 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -130,6 +130,7 @@ public:
             && vlc_object_alive (p_input); /* and the VLC object is alive */
     }
 
+    int playingStatus();
     bool hasAudio();
     bool hasVideo() { return hasInput() && b_video; }
     void requestArtUpdate();
@@ -218,7 +219,7 @@ signals:
     void metaChanged( input_item_t *);
     void artChanged( QString );
     /// Play/pause status
-    void statusChanged( int );
+    void playingStatusChanged( int );
     void recordingStateChanged( bool );
     /// Teletext
     void teletextPossible( bool );
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 88bf4d4..4444ad1 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -193,7 +193,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
 #ifndef HAVE_MAEMO
     if( sysTray )
     {
-        CONNECT( THEMIM->getIM(), statusChanged( int ),
+        CONNECT( THEMIM->getIM(), playingStatusChanged( int ),
                  this, updateSystrayTooltipStatus( int ) );
     }
 #endif
diff --git a/modules/gui/qt4/main_interface_win32.cpp b/modules/gui/qt4/main_interface_win32.cpp
index e751aa5..9fc67a9 100644
--- a/modules/gui/qt4/main_interface_win32.cpp
+++ b/modules/gui/qt4/main_interface_win32.cpp
@@ -142,7 +142,7 @@ void MainInterface::createTaskBarButtons()
             if(S_OK != hr)
                 msg_Err( p_intf, "ThumbBarAddButtons failed with error %08x", hr );
         }
-        CONNECT( THEMIM->getIM(), statusChanged( int ), this, changeThumbbarButtons( int ) );
+        CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, changeThumbbarButtons( int ) );
     }
     else
     {



More information about the vlc-commits mailing list