+ win->Close();
+
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------
+// "clicked" for OK-button
+//-----------------------------------------------------------------------------
+
+static
+void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dialog )
+{
+ if (g_isIdle) wxapp_install_idle_handler();
+
+ int style = dialog->GetStyle();
+
+ GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
+ char *filename = gtk_file_selection_get_filename(filedlg);
+
+ if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
+ {
+ if (wxFileExists( filename ))
+ {
+ wxString msg;
+ msg.Printf( _("File '%s' already exists, do you really want to "
+ "overwrite it?"), filename);
+
+ if (wxMessageBox(msg, _("Confirm"), wxYES_NO) != wxYES)
+ return;
+ }
+ }
+ else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )