diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index d6dd123ac7..9f5ae2beb9 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -151,21 +151,6 @@ static void gtk_filedialog_update_preview_callback(GtkFileChooser *chooser, } // extern "C" -extern "C" -{ -static gboolean gtk_frame_map_callback( GtkFileChooser *file_chooser, - GdkEvent * WXUNUSED(event), - wxFileDialog *dlg ) -{ -/* if ( dlg->GetWindowStyle() & wxFD_SHOW_HIDDEN ) - gtk_file_chooser_set_show_hidden( file_chooser, TRUE ); - else - gtk_file_chooser_set_show_hidden( file_chooser, FALSE );*/ - gtk_file_chooser_set_show_hidden(file_chooser, dlg->HasFlag(wxFD_SHOW_HIDDEN)); - return FALSE; -} -} - void wxFileDialog::AddChildGTK(wxWindowGTK* child) { // allow dialog to be resized smaller horizontally @@ -290,8 +275,6 @@ bool wxFileDialog::Create(wxWindow *parent, const wxString& message, g_signal_connect (m_widget, "selection-changed", G_CALLBACK (gtk_filedialog_selchanged_callback), this); - g_signal_connect (m_widget, "map_event", - G_CALLBACK (gtk_frame_map_callback), this); // deal with extensions/filters SetWildcard(wildCard); @@ -367,6 +350,9 @@ bool wxFileDialog::Create(wxWindow *parent, const wxString& message, previewImage); } + gtk_file_chooser_set_show_hidden(file_chooser, + style & wxFD_SHOW_HIDDEN ? TRUE : FALSE); + return true; }