vlc/vlc-2.0 | branch: master | Erwan Tulou <[email protected]> | Tue Oct 11 16:16:56 2011 +0200| [095c9ba8e46233b368bb25e6fdb4a7fa2b207088] | committer: Jean-Baptiste Kempf
qt4: fix logo selection dialog box not working right away This patch ensures that, as soon as the user comes back from the filename selection dialog box, the filter is updated accordingly and the expected result (logo insertion or deletion) can be seen right away. (cherry picked from commit 8fc17f107d6dc63f88cbb6f56279732b0c5d5079) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=095c9ba8e46233b368bb25e6fdb4a7fa2b207088 --- modules/gui/qt4/components/extended_panels.cpp | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp index 1fd21ea..9315dd3 100644 --- a/modules/gui/qt4/components/extended_panels.cpp +++ b/modules/gui/qt4/components/extended_panels.cpp @@ -407,20 +407,30 @@ void ExtVideo::updateFilters() : groupbox->isChecked() ); } +#define UPDATE_AND_APPLY_TEXT( widget, file ) \ + CONNECT( ui.widget, textChanged( const QString& ), \ + this, updateFilterOptions() ); \ + ui.widget->setText( toNativeSeparators( file ) ); \ + ui.widget->disconnect( SIGNAL( textChanged( const QString& ) ) ); + void ExtVideo::browseLogo() { QString file = QFileDialog::getOpenFileName( NULL, qtr( "Logo filenames" ), p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" ); - ui.logoFileText->setText( toNativeSeparators( file ) ); + + UPDATE_AND_APPLY_TEXT( logoFileText, file ); } void ExtVideo::browseEraseFile() { QString file = QFileDialog::getOpenFileName( NULL, qtr( "Image mask" ), p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" ); - ui.eraseMaskText->setText( toNativeSeparators( file ) ); + + UPDATE_AND_APPLY_TEXT( eraseMaskText, file ); } +#undef UPDATE_AND_APPLY_TEXT + void ExtVideo::initComboBoxItems( QObject *widget ) { QComboBox *combobox = qobject_cast<QComboBox*>( widget ); _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
