[epiphany] Ask for confirmation when replacing files, in save as



commit f007602b631fee9ac23c909abb75bd606f501a4f
Author: Jorge Kalmbach <kalmbach gmail com>
Date:   Wed Jan 20 23:05:57 2010 -0200

    Ask for confirmation when replacing files, in save as
    
    Bug #605480

 embed/ephy-web-view.c |   10 ++++++----
 src/window-commands.c |    2 ++
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 62bad1e..27eddba 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3410,10 +3410,12 @@ ephy_web_view_save_sub_resources (EphyWebView *view, const char *uri, GList *sub
 
   file = g_file_new_for_uri (destination_uri);
   if (!g_file_make_directory (file, NULL, &error)) {
-    g_warning ("Could not create directory: %s", error->message);
-    g_error_free (error);
-    g_object_unref (file);
-    return;
+    if (error->code != G_IO_ERROR_EXISTS) {
+      g_warning ("Could not create directory: %s", error->message);
+      g_error_free (error);
+      g_object_unref (file);
+      return;
+    }
   }
   g_object_unref (file);
 
diff --git a/src/window-commands.c b/src/window-commands.c
index e4c7998..d26331b 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -337,6 +337,8 @@ window_cmd_file_save_as (GtkAction *action,
 					CONF_STATE_SAVE_DIR,
 					EPHY_FILE_FILTER_ALL_SUPPORTED);
 
+	gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);		
+	
 	g_signal_connect (dialog, "response",
 			  G_CALLBACK (save_response_cb), embed);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]