]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/filedlg.cpp
use popen() instead of wxExecute(), it works inside wxYield() unlike the latter
[wxWidgets.git] / src / gtk1 / filedlg.cpp
index 3c909e79bfc7e4360174862106198191955baad6..c2dc478759e39805a9ec3c3407a4e4ced82fc674 100644 (file)
@@ -44,7 +44,7 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
 {
     int style = dialog->GetStyle();
     gchar* text = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
-    wxString filename(wxGTK_CONV_BACK(text));
+    wxString filename = wxConvFileName->cMB2WX( text );
     if ( filename.empty() )
     {
         // this is totally lame but better than silent error
@@ -299,7 +299,8 @@ void wxFileDialog::GetPaths(wxArrayString& paths) const
             if (gpaths)
                 g_slist_free(gpaths);
         }
-        else
+
+        if ( paths.IsEmpty() )
         {
             paths.Add(m_fileName);
         }