]> git.sesse.net Git - vlc/commitdiff
Qt4 win32 native open dialog.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Sep 2008 08:08:27 +0000 (01:08 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 21 Sep 2008 08:09:16 +0000 (01:09 -0700)
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/menus.cpp
modules/gui/qt4/qt4.cpp

index e3be94e952214e582e6392ffe2eb54ffcd3d09b3..3f861327596951b8f644b8872a17ed4610ce8e47 100644 (file)
@@ -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 );
 }
 
index 40dc4aa34177a576aeddb09558405994b3c64ef6..f9af79f55f987121ca6ffbf38cf401a1a36090cb 100644 (file)
@@ -297,7 +297,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 Open File..." ), "",
+#endif
+        ":/file-asym", SLOT( openFileDialog() ), "" );
     addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "",
         ":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
     addDPStaticEntry( menu, qtr( "Open &Disc..." ), "",
index 2109367e32de9534a59394d84a772c06ba155d0d..b6c95f4f5390b32e6301168875cb0fac4f0f872e 100644 (file)
@@ -427,8 +427,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();