]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filepicker.cpp
fixes SetFirstItem, Thanks to David Wright
[wxWidgets.git] / src / gtk / filepicker.cpp
index f457717e8af886c147e7f7695991ea0b9a9982f5..62ee1f45117abbcc8544ce4972aae41666f4da9e 100644 (file)
@@ -80,9 +80,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id,
 
         //       use as label the currently selected file
         m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget );
-
         g_object_ref(m_widget);
-        gtk_widget_show(m_widget);
 
         // we need to know when the dialog has been dismissed clicking OK...
         // NOTE: the "clicked" signal is not available for a GtkFileChooserButton
@@ -144,7 +142,9 @@ void wxFileButton::SetInitialDirectory(const wxString& dir)
 
 #if wxUSE_DIRPICKERCTRL && defined(__WXGTK26__)
 
+#ifdef __UNIX__
 #include <unistd.h> // chdir
+#endif
 
 //-----------------------------------------------------------------------------
 // "current-folder-changed"
@@ -235,9 +235,6 @@ bool wxDirButton::Create( wxWindow *parent, wxWindowID id,
         m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget );
         g_object_ref(m_widget);
 
-
-        gtk_widget_show(m_widget);
-
         // GtkFileChooserButton signals
         g_signal_connect(m_widget, "current-folder-changed",
                          G_CALLBACK(gtk_dirbutton_currentfolderchanged_callback), this);