// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/gtk/private.h"
-#include "wx/filepicker.h"
+#if wxUSE_FILEPICKERCTRL && defined(__WXGTK26__)
+#include "wx/filepicker.h"
-#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
-#endif
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <unistd.h> // chdir
// implementation
// ============================================================================
-#if wxUSE_FILEPICKERCTRL && defined(__WXGTK26__)
-
//-----------------------------------------------------------------------------
// wxFileButton
//-----------------------------------------------------------------------------
}
// 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':
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);
// 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':