Commit f49d815a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open and menus links, cleaning, etc..

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