]> git.sesse.net Git - vlc/commitdiff
Emit event to check inputchange in maininputmanager startup so
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 20 Jun 2008 08:15:14 +0000 (11:15 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 20 Jun 2008 08:15:14 +0000 (11:15 +0300)
if playlist/item starts before that, it's noticed. Should
fix #1614 for qt4 part

modules/gui/qt4/input_manager.cpp

index 0ee8e0d56066e1cde37a4a938fe787b45fd2d6fd..a5140a96580b399f4a236659640aee39e6ca599b 100644 (file)
@@ -505,6 +505,13 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
     /* Warn our embedded IM about input changes */
     CONNECT( this, inputChanged( input_thread_t * ),
              im, setInput( input_thread_t * ) );
+
+    /* emit check if playlist has allready started playing */
+    vlc_value_t val;
+    var_Change( THEPL, "playlist-current", VLC_VAR_CHOICESCOUNT, &val, NULL );
+    IMEvent *event = new IMEvent( ItemChanged_Type, val.i_int);
+    QApplication::postEvent( this, static_cast<QEvent*>(event) );
+
 }
 
 MainInputManager::~MainInputManager()