Qt4 - Add an advanced option for whiners to have by default the open dialog extended.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 21 May 2007 22:09:44 +0000 (22:09 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 21 May 2007 22:09:44 +0000 (22:09 +0000)
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/qt4.cpp

index af2ee71..7857869 100644 (file)
@@ -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());
index 3cef644..832a550 100644 (file)
@@ -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();