Commit 9f9dda51 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt4 - Add an advanced option for whiners to have by default the open dialog extended.

parent 788d3b65
......@@ -42,6 +42,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
setModal( modal );
i_action_flag = _action_flag;
/* Basic Creation of the Window */
ui.setupUi( this );
setWindowTitle( qtr("Open" ) );
resize( 410, 300);
......@@ -52,6 +53,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
netOpenPanel = new NetOpenPanel( ui.Tab, p_intf );
captureOpenPanel = new CaptureOpenPanel( ui.Tab, p_intf );
/* Insert the tabs */
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, qtr( "&File" ) );
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, qtr( "&Disc" ) );
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, qtr( "&Network" ) );
......@@ -59,7 +61,10 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
qtr( "Capture &Device" ) );
/* Hide the advancedPanel */
ui.advancedFrame->hide();
if(! config_GetInt( p_intf, "qt-adv-options") )
{
ui.advancedFrame->hide();
}
/* Buttons Creation */
QSizePolicy buttonSizePolicy( static_cast<QSizePolicy::Policy>(7),
......@@ -108,7 +113,8 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
this, newMethod(QString) );
CONNECT( discOpenPanel, methodChanged( QString ),
this, newMethod(QString) );
/* FIXME CAPTURE */
CONNECT( captureOpenPanel, methodChanged( QString ),
this, newMethod(QString) );
/* Advanced frame Connects */
CONNECT( ui.slaveText, textChanged(QString), this, updateMRL());
......
......@@ -65,6 +65,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define FILEDIALOG_PATH_TEXT N_("path to use in file dialog")
#define FILEDIALOG_PATH_LONGTEXT N_("path to use in file dialog")
#define ADVANCED_OPTIONS_TEXT N_("Advanced options")
#define ADVANCED_OPTIONS_LONGTEXT N_("Activate by default all the" \
"Advanced options for geeks")
vlc_module_begin();
set_shortname( (char *)"Qt" );
set_description( (char*)_("Qt interface") );
......@@ -93,6 +97,8 @@ vlc_module_begin();
FILEDIALOG_PATH_LONGTEXT, VLC_TRUE);
change_autosave();
change_internal();
add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
set_callbacks( OpenDialogs, Close );
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