From: Jean-Baptiste Kempf Date: Sat, 31 Mar 2007 01:17:14 +0000 (+0000) Subject: Qt4 - Remove the enqueue button and regroup it under the play button, since it is... X-Git-Tag: 0.9.0-test0~7936 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ef3ddcbd1d236a32ab8d9e57af1500118914a341;p=vlc Qt4 - Remove the enqueue button and regroup it under the play button, since it is far less used. KEEP IT SIMPLE :D xtophe, is that what you wanted ? Stream() does not do anything yet. --- diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp index 58bf84f513..58d890857e 100644 --- a/modules/gui/qt4/dialogs/open.cpp +++ b/modules/gui/qt4/dialogs/open.cpp @@ -25,7 +25,7 @@ #include #include #include - +#include #include "dialogs/open.hpp" #include "components/open.hpp" @@ -57,6 +57,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) : ui.advancedFrame->hide(); + QMenu * openButtonMenu = new QMenu( "Open" ); + openButtonMenu->addAction( qtr("&Enqueue"), this, SLOT( enqueue() ), + QKeySequence( "Alt+E") ); + openButtonMenu->addAction( qtr("&Stream"), this, SLOT( stream() ) , + QKeySequence( "Alt+T" ) ); + + ui.playButton->setMenu( openButtonMenu ); /* Force MRL update on tab change */ CONNECT( ui.Tab, currentChanged(int), this, signalCurrent()); @@ -77,9 +84,8 @@ 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, play()); + BUTTONACT( ui.playButton, play()); BUTTONACT( ui.cancelButton, cancel()); - BUTTONACT( ui.enqueueButton, enqueue()); BUTTONACT( ui.advancedCheckBox , toggleAdvancedPanel() ); /* Initialize caching */ @@ -165,6 +171,11 @@ void OpenDialog::playOrEnqueue( bool b_enqueue = false ) accept(); } +void OpenDialog::stream() +{ +//TODO. Policy not yet defined +} + void OpenDialog::toggleAdvancedPanel() { //FIXME does not work under Windows diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp index 26440e851b..fded8fb440 100644 --- a/modules/gui/qt4/dialogs/open.hpp +++ b/modules/gui/qt4/dialogs/open.hpp @@ -53,6 +53,7 @@ public: QString mainMRL; public slots: void play(); + void stream(); private: static OpenDialog *instance; input_thread_t *p_input; diff --git a/modules/gui/qt4/ui/open.ui b/modules/gui/qt4/ui/open.ui index 40cbf32778..cb0d33dcc1 100644 --- a/modules/gui/qt4/ui/open.ui +++ b/modules/gui/qt4/ui/open.ui @@ -174,35 +174,56 @@ Qt::Horizontal + + QSizePolicy::Minimum + - 241 + 240 20 - + + + + 7 + 1 + 0 + 0 + + &Cancel - - - &Enqueue + + + + 7 + 0 + 0 + 0 + + + + + 90 + 0 + - - - - &Play - - true + + QToolButton::MenuButtonPopup + + + Qt::ToolButtonTextOnly @@ -214,7 +235,7 @@ cacheSpinBox advancedLineInput Tab - closeButton + playButton cancelButton