[PATCH] Don't request confirmation for deletion of "burn:" URIs



We already supress confirmation for trashing of "burn:" URIs, but not
for deletion - reported as bug 302607 [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=302607

-- 
Christian Neumair <chris gnome-de org>
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.711
diff -u -p -r1.711 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	27 Sep 2005 08:34:37 -0000	1.711
+++ src/file-manager/fm-directory-view.c	6 Oct 2005 20:20:23 -0000
@@ -348,6 +348,7 @@ static void     activate_activation_uri_
 								gpointer              callback_data);
 static gboolean can_show_default_app                           (FMDirectoryView *view,
 								NautilusFile *file);
+static gboolean can_delete_uri_without_confirm                 (const char           *uri);
 
 static gboolean activate_check_mime_types                      (FMDirectoryView *view,
 								NautilusFile *file,
@@ -833,6 +834,22 @@ action_trash_callback (GtkAction *action
 }
 
 static gboolean
+can_delete_uris_without_confirm (GList *uris)
+{
+	g_assert (uris != NULL);
+
+	while (uris != NULL) {
+		if (!can_delete_uri_without_confirm (uris->data)) {
+			return FALSE;
+		}
+
+		uris = uris->next;
+	}
+
+	return TRUE;
+}
+
+static gboolean
 confirm_delete_directly (FMDirectoryView *view, 
 			 GList *uris)
 {
@@ -851,6 +868,10 @@ confirm_delete_directly (FMDirectoryView
 
 	uri_count = g_list_length (uris);
 	g_assert (uri_count > 0);
+
+	if (can_delete_uris_without_confirm (uris)) {
+		return TRUE;
+	}
 
 	if (uri_count == 1) {
 		file_name = file_name_from_uri ((char *) uris->data);

Attachment: signature.asc
Description: This is a digitally signed message part



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