[vlc-commits] Qt: capture panel: Disable advanced options instead of being silent on
Francois Cartegnie
git at videolan.org
Fri Jan 25 14:24:08 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 25 14:19:55 2013 +0100| [8972d2f2083810e33951c0b0c7995e77b3c2c951] | committer: Francois Cartegnie
Qt: capture panel: Disable advanced options instead of being silent on
late failure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8972d2f2083810e33951c0b0c7995e77b3c2c951
---
modules/gui/qt4/components/open_panels.cpp | 9 +++++++++
modules/gui/qt4/components/open_panels.hpp | 1 +
2 files changed, 10 insertions(+)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 423deef..9248085 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -746,6 +746,7 @@ void CaptureOpenPanel::initialize()
ui.setupUi( this );
BUTTONACT( ui.advancedButton, advancedDialog() );
+ CONNECT( ui.deviceCombo, currentIndexChanged(int), this, enableAdvancedDialog(int) );
/* Create two stacked layouts in the main comboBoxes */
QStackedLayout *stackedDevLayout = new QStackedLayout;
@@ -1292,6 +1293,14 @@ void CaptureOpenPanel::updateButtons()
advMRL.clear();
}
+void CaptureOpenPanel::enableAdvancedDialog( int i_index )
+{
+ int i_devicetype = ui.deviceCombo->itemData( i_index ).toInt();
+ module_t *p_module =
+ module_find( psz_devModule[i_devicetype] );
+ ui.advancedButton->setEnabled( NULL != p_module );
+}
+
void CaptureOpenPanel::advancedDialog()
{
/* Get selected device type */
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index 5a8a46a..218c875 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -227,6 +227,7 @@ public slots:
void initialize();
private slots:
void updateButtons();
+ void enableAdvancedDialog( int );
void advancedDialog();
};
More information about the vlc-commits
mailing list