]> git.sesse.net Git - vlc/commitdiff
Qt4 - Various comments and unimportant fixes.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 15 Oct 2007 08:29:53 +0000 (08:29 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 15 Oct 2007 08:29:53 +0000 (08:29 +0000)
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp

index a009f483e148701eb182ddd549aafab587a2e734..c27ba2ae992b4b2217eacdecf5e27f48ff6316c4 100644 (file)
@@ -82,7 +82,11 @@ void InputManager::delInput()
 void InputManager::update()
 {
     /// \todo Emit the signals only if it changed
-    if( !p_input ) return;
+    if( !p_input )
+    {
+        emit nameChanged( "" );
+        return;
+    }
 
     if( p_input->b_dead || p_input->b_die )
     {
@@ -101,7 +105,7 @@ void InputManager::update()
     i_time = var_GetTime( p_input, "time") / 1000000;
     f_pos = var_GetFloat( p_input, "position" );
     emit positionUpdated( f_pos, i_time, i_length );
+
     int i_new_rate = var_GetInteger( p_input, "rate");
     if( i_new_rate != i_rate )
     {
@@ -162,6 +166,7 @@ void InputManager::update()
         emit nameChanged( text );
         old_name=text;
     }
+
     /* Update playing status */
     var_Get( p_input, "state", &val );
     val.i_int = val.i_int == PAUSE_S ? PAUSE_S : PLAYING_S;
index a9b92e72d24cc6653dd78d9e007afa3fa24bab6a..a5f97af407a8bbc9db73774e7dfc66be4bf8f4ea 100644 (file)
@@ -218,28 +218,32 @@ static void Init( intf_thread_t *p_intf )
     int argc = 1;
 
     Q_INIT_RESOURCE( vlc );
+
 #ifndef WIN32
     /* KLUDGE:
-     * disables icon theme use because that makes cleanlook style bug
+     * disables icon theme use because that makes Cleanlooks style bug
+     * because it asks gconf for some settings that timeout because of threads
      * see commits 21610 21622 21654 for reference */
     QApplication::setDesktopSettingsAware(false);
 #endif
+
+    /* Start the QApplication here */
     QApplication *app = new QApplication( argc, argv , true );
     app->setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );
     p_intf->p_sys->p_app = app;
 
-    // Initialize timers
+    // Initialize timers and the Dialog Provider
     DialogsProvider::getInstance( p_intf );
 
-    // Normal interface
+    // Create the normal interface
     if( !p_intf->pf_show_dialog )
     {
         MainInterface *p_mi = new MainInterface( p_intf );
         p_intf->p_sys->p_mi = p_mi;
         p_mi->show();
     }
-
-    if( p_intf->pf_show_dialog )
+    else
+    /*if( p_intf->pf_show_dialog )*/
         vlc_thread_ready( p_intf );
 
     /* Start playing if needed */
@@ -248,10 +252,16 @@ static void Init( intf_thread_t *p_intf )
         playlist_Control( THEPL, PLAYLIST_AUTOPLAY, VLC_FALSE );
     }
 
+    /* Explain to the core how to show a dialog :D */
     p_intf->pf_show_dialog = ShowDialog;
 
+    /* Last settings */
     app->setQuitOnLastWindowClosed( false );
+
+    /* Launch */
     app->exec();
+
+    /* And quit */
     MainInputManager::killInstance();
     DialogsProvider::killInstance();
     delete p_intf->p_sys->p_mi;
index ff3079cafe5fe5fe7d3118e9dd663fef59170b32..218fc4f142b51933d0e6b466981d22ccec0f2a93 100644 (file)
@@ -5,6 +5,7 @@
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
+ *          Jean-Baptiste Kempf <jb@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -93,8 +94,8 @@ struct intf_sys_t
             else  x->show(); }
 
 static int DialogEvent_Type = QEvent::User + 1;
-static int PLUndockEvent_Type = QEvent::User + 2;
-static int PLDockEvent_Type = QEvent::User + 3;
+//static int PLUndockEvent_Type = QEvent::User + 2;
+//static int PLDockEvent_Type = QEvent::User + 3;
 static int SetVideoOnTopEvent_Type = QEvent::User + 4;
 
 class DialogEvent : public QEvent