]> git.sesse.net Git - vlc/commitdiff
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 af2ee71b1ab8bd1c038056d4008cdd5506b14bf8..7857869c6ed4d407ae33280400c1c238e4f0cf10 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 3cef64411d8f0aae19062bdaf627089fee5c833b..832a5505dd7dbf24fed5b18ecd4a132708731c31 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();