diff options
author | Christian Neumair <cneumair@gnome.org> | 2008-05-13 12:50:09 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2008-05-13 12:50:09 +0000 |
commit | fe27bb31d5a5c6302c941c2388785a295cd295cc (patch) | |
tree | 0b7fabf18e4f226dd691c60b6c15f2694a5cd0eb | |
parent | 071a06f083664c2c7e12351190cc20b5ea9002aa (diff) | |
download | nautilus-fe27bb31d5a5c6302c941c2388785a295cd295cc.tar.gz |
Never move to "burn:///". Fixes #531750.
2008-05-13 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-file-operations.c
(nautilus_file_operations_copy_move):
Never move to "burn:///". Fixes #531750.
* src/file-manager/fm-properties-window.c (real_destroy):
Free permission_combos list.
svn path=/branches/gnome-2-22/; revision=14160
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file-operations.c | 33 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 3 |
3 files changed, 43 insertions, 2 deletions
@@ -1,5 +1,14 @@ 2008-05-13 Christian Neumair <cneumair@gnome.org> + * libnautilus-private/nautilus-file-operations.c + (nautilus_file_operations_copy_move): + Never move to "burn:///". Fixes #531750. + + * src/file-manager/fm-properties-window.c (real_destroy): + Free permission_combos list. + +2008-05-13 Christian Neumair <cneumair@gnome.org> + * src/file-manager/fm-directory-view.c (action_self_properties_callback): * src/file-manager/nautilus-directory-view-ui.xml: diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c index 849ad6f0a..e502e059f 100644 --- a/libnautilus-private/nautilus-file-operations.c +++ b/libnautilus-private/nautilus-file-operations.c @@ -4779,15 +4779,44 @@ nautilus_file_operations_copy_move (const GList *item_uris, gpointer done_callback_data) { GList *locations; + GList *p; GFile *dest, *src_dir; GtkWindow *parent_window; - + gboolean target_is_mapping; + gboolean have_nonmapping_source; + char *file_scheme; + dest = NULL; + target_is_mapping = FALSE; + have_nonmapping_source = FALSE; + if (target_dir) { dest = g_file_new_for_uri (target_dir); + file_scheme = g_file_get_uri_scheme (dest); + if (strcmp (file_scheme, "burn") == 0) { + target_is_mapping = TRUE; + } + g_free (file_scheme); } locations = location_list_from_uri_list (item_uris); - + + for (p = location_list_from_uri_list (item_uris); p != NULL; p = p->next) { + file_scheme = g_file_get_uri_scheme ((GFile *)p->data); + + if (strcmp (file_scheme, "burn") != 0) { + have_nonmapping_source = TRUE; + } + + g_free (file_scheme); + } + + if (target_is_mapping && have_nonmapping_source && copy_action == GDK_ACTION_MOVE) { + /* never move to "burn:///", but fall back to copy. + * This is a workaround, because otherwise the source files would be removed. + */ + copy_action = GDK_ACTION_COPY; + } + parent_window = NULL; if (parent_view) { parent_window = (GtkWindow *)gtk_widget_get_ancestor (parent_view, GTK_TYPE_WINDOW); diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index c8fad63e5..f3c7fab35 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -5416,6 +5416,9 @@ real_destroy (GtkObject *object) g_list_free (window->details->permission_buttons); window->details->permission_buttons = NULL; + g_list_free (window->details->permission_combos); + window->details->permission_combos = NULL; + if (window->details->initial_permissions) { g_hash_table_destroy (window->details->initial_permissions); window->details->initial_permissions = NULL; |