X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ce7b1e43fdf835a77a78765fe73de707b89e85f..eaba6eba3a1ca393e6ecbafa601cc3b54e705901:/src/gtk/filepicker.cpp diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index a32f2cc185..6784f90430 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -21,13 +21,8 @@ #include "wx/filepicker.h" -#include "wx/gtk/private.h" +#include "wx/tooltip.h" -#if wxUSE_TOOLTIPS - #include "wx/tooltip.h" -#endif - -#include #include #include // chdir @@ -66,9 +61,13 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id, } // create the dialog associated with this button + // NB: unlike generic implementation, native GTK implementation needs to create + // the filedialog here as it needs to use gtk_file_chooser_button_new_with_dialog() SetWindowStyle(style); m_path = path; - if (!CreateDialog(message, wildcard)) + m_message = message; + m_wildcard = wildcard; + if ((m_dialog = CreateDialog()) == NULL) return false; // little trick used to avoid problems when there are other GTK windows 'grabbed': @@ -122,7 +121,7 @@ void wxFileButton::OnDialogOK(wxCommandEvent& ev) if (ev.GetId() == wxID_OK) { // ...update our path - UpdatePathFromDialog(); + UpdatePathFromDialog(m_dialog); // ...and fire an event wxFileDirPickerEvent event(wxEVT_COMMAND_FILEPICKER_CHANGED, this, GetId(), m_path); @@ -199,8 +198,9 @@ bool wxDirButton::Create( wxWindow *parent, wxWindowID id, // create the dialog associated with this button SetWindowStyle(style); - m_path = path; - if (!CreateDialog(message, wildcard)) + m_message = message; + m_wildcard = wildcard; + if ((m_dialog = CreateDialog()) == NULL) return false; // little trick used to avoid problems when there are other GTK windows 'grabbed':