- int style = dialog->GetStyle();
- gchar* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
-
- // gtk version numbers must be identical with the one in ctor (that calls set_do_overwrite_confirmation)
-#if GTK_CHECK_VERSION(2,7,3)
- if(gtk_check_version(2,7,3) != NULL)
-#endif
- if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
- {
- if ( g_file_test(filename, G_FILE_TEST_EXISTS) )
- {
- wxString msg;
-
- msg.Printf(
- _("File '%s' already exists, do you really want to overwrite it?"),
- wxString(wxConvFileName->cMB2WX(filename)).c_str());
-
- wxMessageDialog dlg(dialog, msg, _("Confirm"),
- wxYES_NO | wxICON_QUESTION);
- if (dlg.ShowModal() != wxID_YES)
- return;
- }
- }
-