]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
Set the value passed to wxComboBox ctor in wxOSX/Cocoa.
[wxWidgets.git] / src / gtk / filedlg.cpp
index fb0bfa7735710ea50372246fd529bd7d46000a04..3e63c532434a725617a0d6d6dd037cd9d57f6fac 100644 (file)
@@ -51,7 +51,7 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
 
                 msg.Printf(
                     _("File '%s' already exists, do you really want to overwrite it?"),
-                    wxString(filename, *wxConvFileName));
+                    wxString::FromUTF8(filename));
 
                 wxMessageDialog dlg(dialog, msg, _("Confirm"),
                                    wxYES_NO | wxICON_QUESTION);
@@ -369,8 +369,11 @@ void wxFileDialog::SetMessage(const wxString& message)
 
 void wxFileDialog::SetPath(const wxString& path)
 {
-    wxCHECK_RET(wxIsAbsolutePath(path), " wxFileDialog::SetPath requires an absolute filepath");
-    m_fc.SetPath( path );
+    // we need an absolute path for GTK native chooser so ensure that we have
+    // it
+    wxFileName fn(path);
+    fn.MakeAbsolute();
+    m_fc.SetPath(fn.GetFullPath());
 }
 
 void wxFileDialog::SetDirectory(const wxString& dir)