From: Jean-Baptiste Kempf Date: Mon, 11 Feb 2008 08:01:51 +0000 (+0000) Subject: Qt4 - Open Disk. Provide a button to eject the disk drive. has been requested twice... X-Git-Tag: 0.9.0-test0~2697 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=daebd34f56afba8df79d2ddc396950cb13cf0930;p=vlc 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... --- diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 181ec1c8a2..61798d28f7 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -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() {} diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp index dab1288bb7..2f9cdd595b 100644 --- a/modules/gui/qt4/components/open_panels.hpp +++ b/modules/gui/qt4/components/open_panels.hpp @@ -151,6 +151,7 @@ public slots: private slots: void browseDevice(); void updateButtons() ; + void eject(); }; diff --git a/modules/gui/qt4/ui/open_disk.ui b/modules/gui/qt4/ui/open_disk.ui index 8b2e01f3d0..f3782f6b2a 100644 --- a/modules/gui/qt4/ui/open_disk.ui +++ b/modules/gui/qt4/ui/open_disk.ui @@ -20,7 +20,7 @@ _("Disc selection") - + Qt::Horizontal @@ -53,7 +53,7 @@ - + _("Select the device or the VIDEO_TS folder") @@ -143,6 +143,13 @@ + + + + E + + +