Commit daebd34f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt4 - Open Disk. Provide a button to eject the disk drive. has been requested...

Qt4 - Open Disk. Provide a button to eject the disk drive. has been requested twice on the forum. Maybe should be moved somewhere else. The intf_eject doesn't seem to work on my computer now...

parent 424ebcf3
...@@ -104,7 +104,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -104,7 +104,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
listLabel[2]->setText( qtr( "Filter:" ) ); listLabel[2]->setText( qtr( "Filter:" ) );
dialogBox->layout()->setMargin( 0 ); dialogBox->layout()->setMargin( 0 );
dialogBox->layout()->setSizeConstraint( QLayout::SetMinimumSize ); dialogBox->layout()->setSizeConstraint( QLayout::SetNoConstraint );
/** END of QFileDialog tweaking **/ /** END of QFileDialog tweaking **/
...@@ -248,6 +248,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -248,6 +248,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
BUTTONACT( ui.audioCDRadioButton, updateButtons() ); BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons() ); BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() ); BUTTONACT( ui.browseDiscButton, browseDevice() );
BUTTONACT( ui.ejectButton, eject() );
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());
...@@ -390,6 +391,11 @@ void DiscOpenPanel::browseDevice() ...@@ -390,6 +391,11 @@ void DiscOpenPanel::browseDevice()
updateMRL(); updateMRL();
} }
void DiscOpenPanel::eject()
{
intf_Eject( p_intf, qtu( ui.deviceCombo->currentText() ) );
}
void DiscOpenPanel::accept() void DiscOpenPanel::accept()
{} {}
......
...@@ -151,6 +151,7 @@ public slots: ...@@ -151,6 +151,7 @@ public slots:
private slots: private slots:
void browseDevice(); void browseDevice();
void updateButtons() ; void updateButtons() ;
void eject();
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<string>_("Disc selection")</string> <string>_("Disc selection")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="7" > <item row="0" column="8" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="7" > <item row="3" column="8" >
<widget class="QPushButton" name="browseDiscButton" > <widget class="QPushButton" name="browseDiscButton" >
<property name="toolTip" > <property name="toolTip" >
<string>_("Select the device or the VIDEO_TS folder")</string> <string>_("Select the device or the VIDEO_TS folder")</string>
...@@ -143,6 +143,13 @@ ...@@ -143,6 +143,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="7" >
<widget class="QToolButton" name="ejectButton" >
<property name="text" >
<string>E</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
Supports Markdown
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