]> www.fi.muni.cz Git - evince.git/commitdiff
Ask filechooser to confirm overwrite. Fix for the bug #328266. Thanks to
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sat, 18 Feb 2006 09:49:37 +0000 (09:49 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sat, 18 Feb 2006 09:49:37 +0000 (09:49 +0000)
* configure.ac:
* shell/ev-window.c: (ev_window_cmd_save_as):

Ask filechooser to confirm overwrite. Fix for the bug #328266.
Thanks to Gary Coady <gary@lyranthe.org>

ChangeLog
configure.ac
shell/ev-window.c

index 3dba8080d0ab385de00e6f0026d24a005176ab4f..10024826fe3943e8f843fa755d6f2a4df4f06332 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-18  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * configure.ac:
+       * shell/ev-window.c: (ev_window_cmd_save_as):
+       
+       Ask filechooser to confirm overwrite. Fix for the bug #328266.
+       Thanks to Gary Coady <gary@lyranthe.org>
+
 2006-02-18  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-print-job.c: (idle_print_handler):
index 1c2c30d01d88211fafeb7039e985de45079a7a96..1789186d1ed0ae1f917e8251fa023c04dbcd5ec3 100644 (file)
@@ -145,6 +145,7 @@ LIBS="$LIBS $FRONTEND_CORE_LIBS"
 AC_CHECK_FUNCS(gtk_icon_view_get_visible_range)
 AC_CHECK_FUNCS(gtk_window_present_with_time)
 AC_CHECK_FUNCS(g_file_set_contents)
+AC_CHECK_FUNCS(gtk_file_chooser_set_do_overwrite_confirmation)
 LIBS=$evince_save_LIBS
 
 dnl GConf configuration
index cd92a571cacec62c0fc20a89a05f2159470f398a..0a8f6f285a7a8969f3947ffb2f74f40fd9c58d95 100644 (file)
@@ -1251,7 +1251,10 @@ ev_window_cmd_save_as (GtkAction *action, EvWindow *ev_window)
 
        ev_document_types_add_filters (fc, ev_window->priv->document);
        gtk_dialog_set_default_response (GTK_DIALOG (fc), GTK_RESPONSE_OK);
-       
+
+#ifdef HAVE_GTK_FILE_CHOOSER_SET_DO_OVERWRITE_CONFIRMATION
+       gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (fc), TRUE);    
+#endif 
        file_name = gnome_vfs_format_uri_for_display (ev_window->priv->uri);
        base_name = g_path_get_basename (file_name);
        gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc), base_name);