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 ) :
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();
......
......@@ -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();
......
......@@ -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;
......
......@@ -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>
......@@ -160,21 +160,21 @@
<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>
......
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