vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Oct 14 19:39:49 2010 +0300| [fe4011fd1505c3535eafca5865debb35360d92f8] | committer: Rémi Denis-Courmont
Qt4: use open file dialog for loadfile items (fix #4247) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe4011fd1505c3535eafca5865debb35360d92f8 --- modules/gui/qt4/components/preferences_widgets.cpp | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index 88a99e4..718c187 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -345,8 +345,15 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this, void FileConfigControl::updateField() { - QString file = QFileDialog::getSaveFileName( NULL, - qtr( "Select File" ), QVLCUserDir( VLC_HOME_DIR ) ); + QString file; + + if (p_item->i_type == CONFIG_ITEM_SAVEFILE) + file = QFileDialog::getSaveFileName( NULL, qtr( "Save File" ), + QVLCUserDir( VLC_HOME_DIR ) ); + else + file = QFileDialog::getOpenFileName( NULL, qtr( "Select File" ), + QVLCUserDir( VLC_HOME_DIR ) ); + if( file.isNull() ) return; text->setText( toNativeSeparators( file ) ); } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
