Commit 2d38cb09 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - make the Browse Device button to actually do something. Fix Trax#49....

Qt4 - make the Browse Device button to actually do something. Fix Trax#49. This has to be checked when you want to open a VIDEO_TS folder (reading V_T or V_T/.. ?)

parent c854ce9a
...@@ -247,10 +247,11 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -247,10 +247,11 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#endif /* Disc Probing under Windows */ #endif /* Disc Probing under Windows */
/* CONNECTs */ /* CONNECTs */
BUTTONACT( ui.dvdRadioButton, updateButtons()); BUTTONACT( ui.dvdRadioButton, updateButtons() );
BUTTONACT( ui.vcdRadioButton, updateButtons()); BUTTONACT( ui.vcdRadioButton, updateButtons() );
BUTTONACT( ui.audioCDRadioButton, updateButtons()); BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons()); BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() );
CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL()); CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL()); CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
...@@ -348,6 +349,15 @@ void DiscOpenPanel::updateMRL() ...@@ -348,6 +349,15 @@ void DiscOpenPanel::updateMRL()
emit mrlUpdated( mrl ); emit mrlUpdated( mrl );
} }
void DiscOpenPanel::browseDevice()
{
QString dir = QFileDialog::getExistingDirectory( 0,
qtr("Open a device or a VIDEO_TS directory") );
if (!dir.isEmpty()) {
ui.deviceCombo->setEditText( dir );
}
updateMRL();
}
/************************************************************************** /**************************************************************************
* Open Network streams and URL pages * * Open Network streams and URL pages *
......
...@@ -139,6 +139,8 @@ private: ...@@ -139,6 +139,8 @@ private:
public slots: public slots:
virtual void updateMRL() ; virtual void updateMRL() ;
virtual void updateButtons() ; virtual void updateButtons() ;
private slots:
void browseDevice();
}; };
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="7" > <item row="3" column="7" >
<widget class="QToolButton" name="toolButton" > <widget class="QPushButton" name="browseDiscButton" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Select the device")</string> <string>_("Select the device")</string>
</property> </property>
......
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