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) )
GtkFileChooserAction gtk_action;
GtkWindow* gtk_parent = NULL;
if (parent)
- gtk_parent = GTK_WINDOW(parent->m_widget);
+ gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
gchar* ok_btn_stock;
if ( style & wxSAVE )
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
wxConvFileName->cWX2MB(defaultFileName));
+
+#if GTK_CHECK_VERSION(2,7,3)
+ if (!gtk_check_version(2,7,3))
+ gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(m_widget), TRUE);
+#endif
}
else
{