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

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