From 9f9dda51e1f5c5eb4565b883acdcb6955fefc985 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 21 May 2007 22:09:44 +0000 Subject: [PATCH] Qt4 - Add an advanced option for whiners to have by default the open dialog extended. --- modules/gui/qt4/dialogs/open.cpp | 10 ++++++++-- modules/gui/qt4/qt4.cpp | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp index af2ee71b1a..7857869c6e 100644 --- a/modules/gui/qt4/dialogs/open.cpp +++ b/modules/gui/qt4/dialogs/open.cpp @@ -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(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()); diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 3cef64411d..832a5505dd 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -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(); -- 2.39.2