]> git.saurik.com Git - wxWidgets.git/commitdiff
Revert previous commit.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Fri, 2 Jun 2006 10:20:13 +0000 (10:20 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Fri, 2 Jun 2006 10:20:13 +0000 (10:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/filepickerg.cpp

index ce5efc0d4cefc8006eb89a4f0d9e36f009bb8c87..32f76b8633b9c3beecd6fbcf08e469e18bea950f 100644 (file)
@@ -45,8 +45,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericDirButton, wxButton)
 // wxGenericFileButton
 // ----------------------------------------------------------------------------
 
-static wxString s_message, s_wildcard;
-
 bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
                         const wxString &label, const wxString &path,
                         const wxString &message, const wxString &wildcard,
@@ -68,17 +66,11 @@ bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
 
     // create the dialog associated with this button
     m_path = path;
-    s_message = message;
-    s_wildcard = wildcard;
-
-    m_dialog = NULL;
-    return true;
+    return CreateDialog(message, wildcard);
 }
 
 void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
 {
-    CreateDialog(s_message, s_wildcard);
-
     if (m_dialog->ShowModal() == wxID_OK)
     {
         // save the path
@@ -88,8 +80,6 @@ void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev))
         wxFileDirPickerEvent event(GetEventType(), this, GetId(), m_path);
         GetEventHandler()->ProcessEvent(event);
     }
-
-    wxDELETE(m_dialog);
 }
 
 #endif      // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL