]> git.sesse.net Git - vlc/commitdiff
Qt4 - Preferences: Add an option and the code needed to start with the advanced prefe...
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 30 Apr 2007 18:09:34 +0000 (18:09 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 30 Apr 2007 18:09:34 +0000 (18:09 +0000)
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/qt4.cpp

index efd47007a957f7589d7c7ce020d48e6bb2a4e33e..7a3e99a0b0553ec1dee33fcfe288c301ed2fd8b7 100644 (file)
@@ -100,7 +100,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     tree_panel_l->setMargin( 1 );
     main_panel_l->setMargin( 3 );
 
-    setSmall();
+    if( config_GetInt( p_intf, "qt-advanced-pref") == 1 )
+    {
+        setAll();
+    }
+    else
+    {
+        setSmall();
+    }
 
     BUTTONACT( save, save() );
     BUTTONACT( cancel, cancel() );
@@ -137,6 +144,7 @@ void PrefsDialog::setAll()
     if( !advanced_panel )
          advanced_panel = new PrefsPanel( main_panel );
     main_panel_l->addWidget( advanced_panel );
+    all->setChecked( true );
     advanced_panel->show();
 }
 
@@ -165,6 +173,7 @@ void PrefsDialog::setSmall()
     if( !simple_panel )
         simple_panel = new SPrefsPanel( p_intf, main_panel, SPrefsDefaultCat );
     main_panel_l->addWidget( simple_panel );
+    small->setChecked( true );
     simple_panel->show();
 }
 
index 851d4c0c7938579dca8be806530481a2368b601b..d4fc16640a0530691e4086d5b4c4f60a3777500a 100644 (file)
@@ -43,6 +43,11 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
+#define ADVANCED_PREFS_TEXT N_("Show advanced prefs over simple")
+#define ADVANCED_PREFS_LONGTEXT N_("Show advanced preferences and not simple" \
+                                   "preferences when opening the preferences " \
+                                   "dialog.")
+
 vlc_module_begin();
     set_shortname( (char *)"Qt" );
     set_description( (char*)_("Qt interface") );
@@ -57,7 +62,10 @@ vlc_module_begin();
     add_submodule();
         set_description( "Dialogs provider" );
         set_capability( "dialogs provider", 51 );
-        add_bool( "qt-always-video", VLC_FALSE, NULL, "FIXME", "FIXME", VLC_TRUE );
+        add_bool( "qt-always-video", VLC_FALSE, NULL, "FIXME", "FIXME",
+                VLC_TRUE );
+        add_bool( "qt-advanced-pref", VLC_FALSE, NULL, ADVANCED_PREFS_TEXT,
+                ADVANCED_PREFS_LONGTEXT, VLC_FALSE );
         set_callbacks( OpenDialogs, Close );
 vlc_module_end();