From 580493428a56359722291aab55a47cd51bebe89a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 30 Apr 2007 18:09:34 +0000 Subject: [PATCH] Qt4 - Preferences: Add an option and the code needed to start with the advanced preferences. 1337 function. --- modules/gui/qt4/dialogs/preferences.cpp | 11 ++++++++++- modules/gui/qt4/qt4.cpp | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp index efd47007a9..7a3e99a0b0 100644 --- a/modules/gui/qt4/dialogs/preferences.cpp +++ b/modules/gui/qt4/dialogs/preferences.cpp @@ -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(); } diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 851d4c0c79..d4fc16640a 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -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(); -- 2.39.2