[vlc-devel] commit: Qt4: win32 native open dialog. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sun Sep 21 09:59:34 CEST 2008
vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep 21 01:02:30 2008 -0700| [c520abe5046de2068079db8837a3687b72fe0292] | committer: Jean-Baptiste Kempf
Qt4: win32 native open dialog.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c520abe5046de2068079db8837a3687b72fe0292
---
modules/gui/qt4/dialogs_provider.cpp | 4 ++--
modules/gui/qt4/menus.cpp | 6 +++++-
modules/gui/qt4/qt4.cpp | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 6715116..a38a62e 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -370,8 +370,8 @@ QStringList DialogsProvider::showSimpleOpen( QString help,
fileTypes.replace(QString(";*"), QString(" *"));
return QFileDialog::getOpenFileNames( NULL,
- help.isNull() ? qfu(I_OP_SEL_FILES ) : help,
- path.isNull() ? qfu( p_intf->p_sys->psz_filepath ) : path,
+ help.isEmpty() ? qfu(I_OP_SEL_FILES ) : help,
+ path.isEmpty() ? qfu( p_intf->p_sys->psz_filepath ) : path,
fileTypes );
}
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 86f9a5e..fb36e6f 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -287,7 +287,11 @@ QMenu *QVLCMenu::FileMenu()
QMenu *menu = new QMenu();
addDPStaticEntry( menu, qtr( "&Open File..." ), "",
- ":/file-asym", SLOT( openFileDialog() ), "Ctrl+O" );
+#ifdef WIN32
+ ":/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
+ addDPStaticEntry( menu, qtr( "Advanced" ) + qtr( "Open File..." ), "",
+#endif
+ ":/file-asym", SLOT( openFileDialog() ), "" );
addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "",
":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ), "",
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 4edd3c9..b5d18f9 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -424,8 +424,8 @@ static void *Init( vlc_object_t *obj )
/* Retrieve last known path used in file browsing */
char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
- p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
- : config_GetHomeDir();
+ p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? config_GetHomeDir()
+ : psz_path;
/* Launch */
app->exec();
More information about the vlc-devel
mailing list