Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-02-18 09:49:37 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-02-18 09:49:37 (GMT)
commitf7f4a48b0cb3c4268e5eb1d0b639e28dab8fc3f0 (patch)
tree61e4464416ded661f763fdacfdbd9c49dc7bb868
parent2a48d5a2d826240b1439c57621f9f63b2bcdd31a (diff)
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 <gary@lyranthe.org>
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac1
-rw-r--r--shell/ev-window.c5
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3dba808..1002482 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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):
Inverse order printing, bug #320919.
diff --git a/configure.ac b/configure.ac
index 1c2c30d..1789186 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 cd92a57..0a8f6f2 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);