From f7f4a48b0cb3c4268e5eb1d0b639e28dab8fc3f0 Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Sat, 18 Feb 2006 09:49:37 +0000 Subject: [PATCH] Ask filechooser to confirm overwrite. Fix for the bug #328266. Thanks to * 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 --- ChangeLog | 8 ++++++++ configure.ac | 1 + shell/ev-window.c | 5 ++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3dba8080..10024826 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-02-18 Nickolay V. Shmyrev + + * 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 + 2006-02-18 Nickolay V. Shmyrev * shell/ev-print-job.c: (idle_print_handler): diff --git a/configure.ac b/configure.ac index 1c2c30d0..1789186d 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/shell/ev-window.c b/shell/ev-window.c index cd92a571..0a8f6f28 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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); -- 2.43.5