Qt4 - Open and menus links, cleaning, etc..
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 14 Mar 2007 00:12:16 +0000 (00:12 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 14 Mar 2007 00:12:16 +0000 (00:12 +0000)
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/menus.cpp
modules/gui/qt4/ui/open.ui

index d0f3209..9ae4d5e 100644 (file)
@@ -47,10 +47,10 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) :
     netOpenPanel = new NetOpenPanel( this , p_intf );
     captureOpenPanel = new CaptureOpenPanel( this, p_intf );
 
-    ui.Tab->addTab( fileOpenPanel, qtr( "File" ) );
-    ui.Tab->addTab( diskOpenPanel, qtr( "Disc" ) );
-    ui.Tab->addTab( netOpenPanel, qtr( "Network" ) );
-    ui.Tab->addTab( captureOpenPanel, qtr( "Capture" ) );
+    ui.Tab->addTab( fileOpenPanel, qtr( "&File" ) );
+    ui.Tab->addTab( diskOpenPanel, qtr( "&Disc" ) );
+    ui.Tab->addTab( netOpenPanel, qtr( "&Network" ) );
+    ui.Tab->addTab( captureOpenPanel, qtr( "Capture &Device" ) );
 
     ui.advancedFrame->hide();
 
@@ -74,9 +74,9 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) :
     CONNECT( ui.slaveText, textChanged(QString), this, updateMRL());
     CONNECT( ui.cacheSpinBox, valueChanged(int), this, updateMRL());
 
-    BUTTONACT( ui.closeButton, playOrEnqueue());
+    BUTTONACT( ui.closeButton, play());
     BUTTONACT( ui.cancelButton, cancel());
-    BUTTONACT( ui.enqueueButton, playOrEnqueue( true ));
+    BUTTONACT( ui.enqueueButton, enqueue());
     BUTTONACT( ui.advancedCheckBox , toggleAdvancedPanel() );
 
     /* Initialize caching */
@@ -111,7 +111,17 @@ void OpenDialog::cancel()
         reject();
 }
 
-void OpenDialog::playOrEnqueue(bool b_enqueue = false )
+void OpenDialog::play()
+{
+    playOrEnqueue( false );
+}
+
+void OpenDialog::enqueue()
+{
+    playOrEnqueue( true );
+}
+
+void OpenDialog::playOrEnqueue( bool b_enqueue = false )
 {
     this->toggleVisible();
     mrl = ui.advancedLineInput->text();
index 8198cb3..39c1a18 100644 (file)
@@ -64,11 +64,14 @@ private:
 
     QString storedMethod;
     int advHeight, mainHeight;
+
+    void playOrEnqueue( bool );
 private slots:
     void cancel();
-    void playOrEnqueue(bool);
+    void play();
+    void enqueue();
     void toggleAdvancedPanel();
-    void updateMRL(QString);
+    void updateMRL( QString );
     void updateMRL();
     void newMethod(QString);
     void signalCurrent();
index 31f800a..132e74a 100644 (file)
@@ -145,9 +145,9 @@ QMenu *QVLCMenu::FileMenu()
     DP_SADD( qtr("Open &File..." ), "", "", openFileDialog() );
     DP_SADD( qtr("Open &Disc..." ), "", "", openDiscDialog());
     DP_SADD( qtr("Open &Network..." ), "", "", openNetDialog());
-    DP_SADD( qtr("Open &Network..." ), "", "", openCaptureDialog());
+    DP_SADD( qtr("Open &Capture Device..." ), "", "", openCaptureDialog());
     menu->addSeparator();
-    DP_SADD( qtr("Streaming..."), "", "", streamingDialog() );
+    DP_SADD( qtr("&Streaming..."), "", "", streamingDialog() );
     menu->addSeparator();
     DP_SADD( qtr("&Quit") , "", "", quit() );
     return menu;
index b3c6775..0981a68 100644 (file)
@@ -33,7 +33,7 @@
    <item>
     <widget class="QCheckBox" name="advancedCheckBox" >
      <property name="text" >
-      <string>Show more options</string>
+      <string>&amp;Show more options</string>
      </property>
     </widget>
    </item>
      <item>
       <widget class="QPushButton" name="cancelButton" >
        <property name="text" >
-        <string>Cancel</string>
+        <string>&amp;Cancel</string>
        </property>
       </widget>
      </item>
      <item>
       <widget class="QPushButton" name="enqueueButton" >
        <property name="text" >
-        <string>Enqueue</string>
+        <string>&amp;Enqueue</string>
        </property>
       </widget>
      </item>
      <item>
       <widget class="QPushButton" name="closeButton" >
        <property name="text" >
-        <string>Play</string>
+        <string>&amp;Play</string>
        </property>
        <property name="default" >
         <bool>true</bool>