Commit 58049342 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Preferences: Add an option and the code needed to start with the...

Qt4 - Preferences: Add an option and the code needed to start with the advanced preferences. 1337 function.

parent cd0a847e
...@@ -100,7 +100,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -100,7 +100,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
tree_panel_l->setMargin( 1 ); tree_panel_l->setMargin( 1 );
main_panel_l->setMargin( 3 ); main_panel_l->setMargin( 3 );
setSmall(); if( config_GetInt( p_intf, "qt-advanced-pref") == 1 )
{
setAll();
}
else
{
setSmall();
}
BUTTONACT( save, save() ); BUTTONACT( save, save() );
BUTTONACT( cancel, cancel() ); BUTTONACT( cancel, cancel() );
...@@ -137,6 +144,7 @@ void PrefsDialog::setAll() ...@@ -137,6 +144,7 @@ void PrefsDialog::setAll()
if( !advanced_panel ) if( !advanced_panel )
advanced_panel = new PrefsPanel( main_panel ); advanced_panel = new PrefsPanel( main_panel );
main_panel_l->addWidget( advanced_panel ); main_panel_l->addWidget( advanced_panel );
all->setChecked( true );
advanced_panel->show(); advanced_panel->show();
} }
...@@ -165,6 +173,7 @@ void PrefsDialog::setSmall() ...@@ -165,6 +173,7 @@ void PrefsDialog::setSmall()
if( !simple_panel ) if( !simple_panel )
simple_panel = new SPrefsPanel( p_intf, main_panel, SPrefsDefaultCat ); simple_panel = new SPrefsPanel( p_intf, main_panel, SPrefsDefaultCat );
main_panel_l->addWidget( simple_panel ); main_panel_l->addWidget( simple_panel );
small->setChecked( true );
simple_panel->show(); simple_panel->show();
} }
......
...@@ -43,6 +43,11 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -43,6 +43,11 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * 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(); vlc_module_begin();
set_shortname( (char *)"Qt" ); set_shortname( (char *)"Qt" );
set_description( (char*)_("Qt interface") ); set_description( (char*)_("Qt interface") );
...@@ -57,7 +62,10 @@ vlc_module_begin(); ...@@ -57,7 +62,10 @@ vlc_module_begin();
add_submodule(); add_submodule();
set_description( "Dialogs provider" ); set_description( "Dialogs provider" );
set_capability( "dialogs provider", 51 ); 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 ); set_callbacks( OpenDialogs, Close );
vlc_module_end(); vlc_module_end();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment