diff options
author | Bastien Nocera <hadess@hadess.net> | 2004-06-17 10:19:34 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@src.gnome.org> | 2004-06-17 10:19:34 +0000 |
commit | 3aa33a47aa8ed436b7380b642dd4a635e7e655da (patch) | |
tree | f178c7b5c36f15ba1ee5b57c55870197ea739344 | |
parent | b1ed4540d8e765b8544e0744b19ced3116ec1613 (diff) | |
download | nautilus-3aa33a47aa8ed436b7380b642dd4a635e7e655da.tar.gz |
reviewed by: Alexander Larsson <alexl@redhat.com>
2004-06-17 Bastien Nocera <hadess@hadess.net>
reviewed by: Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c:
(can_delete_uri_without_confirm), (trash_or_delete_files_common):
do not ask for deletion confirmation when the files are in the burn:
scheme (Closes: #114340)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 21 |
2 files changed, 29 insertions, 1 deletions
@@ -1,3 +1,12 @@ +2004-06-17 Bastien Nocera <hadess@hadess.net> + + reviewed by: Alexander Larsson <alexl@redhat.com> + + * src/file-manager/fm-directory-view.c: + (can_delete_uri_without_confirm), (trash_or_delete_files_common): + do not ask for deletion confirmation when the files are in the burn: + scheme (Closes: #114340) + 2004-06-14 Martin Wehner <martin.wehner@epost.de> * libnautilus-private/nautilus-file-operations-progress.c: diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index dfa45ba63..1835a0e18 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -3214,6 +3214,16 @@ can_move_uri_to_trash (FMDirectoryView *view, const char *file_uri_string) return result; } +static gboolean +can_delete_uri_without_confirm (const char *file_uri_string) +{ + if (eel_istr_has_prefix (file_uri_string, "burn:") != FALSE) { + return TRUE; + } + + return FALSE; +} + static char * file_name_from_uri (const char *uri) { @@ -3333,6 +3343,7 @@ trash_or_delete_files_common (FMDirectoryView *view, GList *moveable_uris; GList *unmoveable_uris; GList *in_trash_uris; + GList *no_confirm_uris; g_assert (FM_IS_DIRECTORY_VIEW (view)); @@ -3349,12 +3360,15 @@ trash_or_delete_files_common (FMDirectoryView *view, moveable_uris = NULL; unmoveable_uris = NULL; in_trash_uris = NULL; + no_confirm_uris = NULL; for (file_node = file_uris; file_node != NULL; file_node = file_node->next) { file_uri = (char *) file_node->data; if (delete_if_all_already_in_trash && eel_uri_is_in_trash (file_uri)) { in_trash_uris = g_list_prepend (in_trash_uris, g_strdup (file_uri)); + } else if (can_delete_uri_without_confirm (file_uri)) { + no_confirm_uris = g_list_prepend (no_confirm_uris, g_strdup (file_uri)); } else if (can_move_uri_to_trash (view, file_uri)) { moveable_uris = g_list_prepend (moveable_uris, g_strdup (file_uri)); } else { @@ -3365,8 +3379,12 @@ trash_or_delete_files_common (FMDirectoryView *view, if (in_trash_uris != NULL && moveable_uris == NULL && unmoveable_uris == NULL) { if (confirm_delete_from_trash (view, in_trash_uris)) { nautilus_file_operations_delete (in_trash_uris, GTK_WIDGET (view)); - } + } } else { + if (no_confirm_uris != NULL) { + nautilus_file_operations_delete (no_confirm_uris, + GTK_WIDGET (view)); + } if (moveable_uris != NULL) { nautilus_file_operations_copy_move (moveable_uris, relative_item_points, EEL_TRASH_URI, GDK_ACTION_MOVE, GTK_WIDGET (view), @@ -3384,6 +3402,7 @@ trash_or_delete_files_common (FMDirectoryView *view, eel_g_list_free_deep (in_trash_uris); eel_g_list_free_deep (moveable_uris); eel_g_list_free_deep (unmoveable_uris); + eel_g_list_free_deep (no_confirm_uris); } static void |