summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-file.h
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2000-08-17 01:47:54 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2000-08-17 01:47:54 +0000
commitc78bf1a53d4433374fea6313a2d5204765180e15 (patch)
tree95d96c9a5027739876f44ecdbfab2b13a6f93d24 /libnautilus-extensions/nautilus-file.h
parent56de1e566a1a0b5e033223f1c3e39131bf93d2fe (diff)
downloadnautilus-c78bf1a53d4433374fea6313a2d5204765180e15.tar.gz
Fixed bug 2169 ("Move to Trash" menu item needs refinement)
Fixed bug 1742 ("Move to Trash" in search view should work) Fixed bug 1745 ("Delete from Trash" in search view should work) * libnautilus-extensions/nautilus-file.h, * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_parent_uri), (nautilus_file_get_string_attribute): made nautilus_file_get_parent_uri, and changed its name (was nautilus_file_get_parent_uri_as_string) * src/file-manager/fm-directory-view.h: (contents_share_parent): New function pointer for subclasses to optionally override. Subclasses should override to return FALSE if their contents might be from different directories. * src/file-manager/fm-directory-view.c: (fm_directory_view_initialize_class): Wire up contents_share_parent function pointer (get_nautilus_file_from_directory): New helper function to get a NautilusFile from a NautilusDirectory (fm_directory_is_trash): Reimplemented to call existing function nautilus_file_is_in_trash and avoid duplicating code. (fm_directory_view_contents_share_parent): New function, calls the virtual function (real_contents_share_parent): New function, default implementation that returns TRUE since normal directory views' contents are all in the same parent directory. (all_files_in_trash): New function, checks if every file in a list is in the trash (fm_directory_all_selected_items_in_trash): New function, calls all_files_in_trash on selection or uses shortcut if fm_directory_view_contents_share_parent is true. (fm_directory_view_can_move_file_to_trash): Renamed from fm_directory_can_move_to_trash, and now takes a file parameter since the answer might vary on a file-by-file basis. (fm_directory_view_confirm_deletion): Spruced up wording, and now takes a list of uris instead of a list of files, and now separately handles the case where only some of the selected files had to be deleted immediately. (fm_directory_view_trash_or_delete_selection): Rewrote to handle three types of files separately: files that can be moved to the trash, files already in the trash, and files that have to be deleted in place. (compute_menu_item_info): Changed "Delete..." to "Delete from Trash". (fm_directory_view_real_create_selection_context_menu_items), (reset_bonobo_trash_delete_menu): use "Delete from Trash" only if all selected items in trash. (fm_directory_view_real_update_menus): Update "Delete from Trash" menu item also. Its sensitivity wasn't updating properly due to this missing line. * src/file-manager/fm-search-list-view.c: (real_contents_share_parent): Overridden to return FALSE. (fm_search_list_view_initialize_class): wire up function pointer for contents_share_parent
Diffstat (limited to 'libnautilus-extensions/nautilus-file.h')
-rw-r--r--libnautilus-extensions/nautilus-file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-file.h b/libnautilus-extensions/nautilus-file.h
index e4e1bb71c..910a00aa8 100644
--- a/libnautilus-extensions/nautilus-file.h
+++ b/libnautilus-extensions/nautilus-file.h
@@ -114,6 +114,7 @@ gboolean nautilus_file_check_if_ready (NautilusFile *file,
/* Basic attributes for file objects. */
char * nautilus_file_get_name (NautilusFile *file);
char * nautilus_file_get_uri (NautilusFile *file);
+char * nautilus_file_get_parent_uri (NautilusFile *file);
GnomeVFSFileSize nautilus_file_get_size (NautilusFile *file);
GnomeVFSFileType nautilus_file_get_file_type (NautilusFile *file);
char * nautilus_file_get_mime_type (NautilusFile *file);