]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Quit correctly(?) from the interface/DP. Should fix #1598.
[vlc] / modules / gui / qt4 / qt4.cpp
index f22fc7bcb049542623c19dcdb95df77bca03dfe0..97ea6266bd8901fde3f6c1b261cece1abf0f4363 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,7 +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 );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     /* We support play on start */
     p_intf->b_play = true;
@@ -367,7 +368,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 */