]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Fix behaviour of the button logic for teletext and use the images.
[vlc] / modules / gui / qt4 / qt4.cpp
index f22fc7bcb049542623c19dcdb95df77bca03dfe0..154b57104993c2bad4920b931a598b8d51ae8866 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "../../../share/vlc32x32.xpm"
 #include "../../../share/vlc32x32-christmas.xpm"
+#include <vlc_plugin.h>
 
 /*****************************************************************************
  * Local prototypes.
@@ -130,14 +131,14 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
 #define QT_ALWAYS_VIDEO_MODE_TEXT N_( "Complete look with information area" )
 #define QT_MINIMAL_MODE_TEXT N_( "Minimal look with no menus" )
 
-static int i_mode_list[] =
+static const int i_mode_list[] =
     { QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
-static const char *psz_mode_list_text[] =
+static const char *const psz_mode_list_text[] =
     { QT_NORMAL_MODE_TEXT, QT_ALWAYS_VIDEO_MODE_TEXT, QT_MINIMAL_MODE_TEXT };
 
 vlc_module_begin();
-    set_shortname( (char *)"Qt" );
-    set_description( (char*)_("Qt interface") );
+    set_shortname( "Qt" );
+    set_description( N_("Qt interface") );
     set_category( CAT_INTERFACE ) ;
     set_subcategory( SUBCAT_INTERFACE_MAIN );
     set_capability( "interface", 151 );
@@ -232,10 +233,7 @@ static int Open( vlc_object_t *p_this )
     p_intf->pf_run = Run;
 
     p_intf->p_sys->p_playlist = pl_Yield( p_intf );
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
-
-    /* We support play on start */
-    p_intf->b_play = true;
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     return VLC_SUCCESS;
 }
@@ -255,9 +253,9 @@ static void Close( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
 
-    vlc_mutex_lock( &p_intf->object_lock );
+    vlc_object_lock( p_intf );
     p_intf->b_dead = true;
-    vlc_mutex_unlock( &p_intf->object_lock );
+    vlc_object_unlock( p_intf );
 
     if( p_intf->p_sys->b_isDialogProvider )
     {
@@ -352,12 +350,6 @@ static void Init( intf_thread_t *p_intf )
     app->installTranslator( &qtTranslator );
 #endif  //ENABLE_NLS
 
-    /* Start playing if needed */
-    if( !p_intf->pf_show_dialog && p_intf->b_play )
-    {
-        playlist_Control( THEPL, PLAYLIST_PLAY, false );
-    }
-
     /* Explain to the core how to show a dialog :D */
     p_intf->pf_show_dialog = ShowDialog;
 
@@ -367,7 +359,7 @@ static void Init( intf_thread_t *p_intf )
     /*        retrieve last known path used in file browsing */
     char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
     p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
-                           : p_intf->p_libvlc->psz_homedir;
+                           : config_GetHomeDir();
 
 #ifdef UPDATE_CHECK
     /* Checking for VLC updates */