Revision: 3508 http://geany.svn.sourceforge.net/geany/?rev=3508&view=rev Author: eht16 Date: 2009-01-24 19:39:35 +0000 (Sat, 24 Jan 2009)
Log Message: ----------- Use the stock overwrite confirmation dialog provided by GTK 2.8 in the Save As dialog.
Modified Paths: -------------- trunk/ChangeLog trunk/src/dialogs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-01-24 19:39:10 UTC (rev 3507) +++ trunk/ChangeLog 2009-01-24 19:39:35 UTC (rev 3508) @@ -11,6 +11,9 @@ utils_write_file() for better error checking and to avoid corruption of config files when there is no more free disk space. This is not used for saving documents (part of Debian bug #503391). + * src/dialogs.c: + Use the stock overwrite confirmation dialog provided by GTK 2.8 + in the Save As dialog.
2009-01-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2009-01-24 19:39:10 UTC (rev 3507) +++ trunk/src/dialogs.c 2009-01-24 19:39:35 UTC (rev 3508) @@ -438,18 +438,7 @@ return; } utf8_filename = utils_get_utf8_from_locale(new_filename); - /* check if file exists and ask whether to overwrite or not */ - if (g_file_test(new_filename, G_FILE_TEST_EXISTS)) - { - if (dialogs_show_question( - _("The file '%s' already exists. Do you want to overwrite it?"), - utf8_filename) == FALSE) - { - g_free(utf8_filename); - g_free(new_filename); - return; - } - } + handle_save_as(utf8_filename, open_new_tab, rename_file);
g_free(utf8_filename); @@ -491,6 +480,7 @@ gtk_box_pack_start(GTK_BOX(vbox), check_open_new_tab, FALSE, FALSE, 0); gtk_widget_show_all(vbox); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(ui_widgets.save_filesel), vbox); + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(ui_widgets.save_filesel), TRUE); #if GTK_CHECK_VERSION(2, 14, 0) gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(ui_widgets.save_filesel), FALSE); #endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.