]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK.
[wxWidgets.git] / src / gtk / filedlg.cpp
index 85118048ed0c0f70e5a6139042dd113425b39fed..b1a370e37606f43a4b9901064d5bf9eb54dc9770 100644 (file)
@@ -174,13 +174,24 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
                            const wxSize& sz,
                            const wxString& name)
     : wxFileDialogBase()
+{
+    Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name);
+}
+
+bool wxFileDialog::Create(wxWindow *parent, const wxString& message,
+                           const wxString& defaultDir,
+                           const wxString& defaultFileName,
+                           const wxString& wildCard,
+                           long style, const wxPoint& pos,
+                           const wxSize& sz,
+                           const wxString& name)
 {
     parent = GetParentForModalDialog(parent, style);
 
     if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName,
                                   wildCard, style, pos, sz, name))
     {
-        return;
+        return false;
     }
 
     if (!PreCreation(parent, pos, wxDefaultSize) ||
@@ -188,7 +199,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
                 wxDefaultValidator, wxT("filedialog")))
     {
         wxFAIL_MSG( wxT("wxFileDialog creation failed") );
-        return;
+        return false;
     }
 
     GtkFileChooserAction gtk_action;
@@ -311,6 +322,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
                          G_CALLBACK(gtk_filedialog_update_preview_callback),
                          previewImage);
     }
+
+    return true;
 }
 
 wxFileDialog::~wxFileDialog()