#include "wx/filepicker.h"
#include "wx/tooltip.h"
-#include <gtk/gtk.h>
-
-
+#include "wx/gtk/private.h"
// ============================================================================
// implementation
m_parent->DoAddChild( this );
PostCreation(size);
- SetBestSize(size);
+ SetInitialSize(size);
}
else
return wxGenericFileButton::Create(parent, id, label, path, message, wildcard,
// NB: it's important to use gtk_file_chooser_get_filename instead of
// gtk_file_chooser_get_current_folder (see GTK docs) !
- gchar* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
+ wxGtkString filename(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)));
p->UpdatePath(filename);
// since GtkFileChooserButton when used to pick directories also uses a combobox,
// style was given.
if (p->HasFlag(wxDIRP_CHANGE_DIR))
chdir(filename);
- g_free(filename);
// ...and fire an event
wxFileDirPickerEvent event(wxEVT_COMMAND_DIRPICKER_CHANGED, p, p->GetId(), p->GetPath());
m_parent->DoAddChild( this );
PostCreation(size);
- SetBestSize(size);
+ SetInitialSize(size);
}
else
return wxGenericDirButton::Create(parent, id, label, path, message, wildcard,