summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-merged-directory.c
diff options
context:
space:
mode:
authorMaciej Stachowiak <mstachow@src.gnome.org>2000-10-12 06:44:26 +0000
committerMaciej Stachowiak <mstachow@src.gnome.org>2000-10-12 06:44:26 +0000
commit9874534dcf9b15bb6da3297c740d556d9a4dadda (patch)
treec62fe37a4afc3c0919f7179515da0d223c556d33 /libnautilus-private/nautilus-merged-directory.c
parentd3291cbec90ab9dbbb5b100b37d0360286b0c939 (diff)
downloadnautilus-9874534dcf9b15bb6da3297c740d556d9a4dadda.tar.gz
Use `nautilus_file_get_existing', not `nautilus_file_get', to check if a
* libnautilus-extensions/nautilus-directory.c: (nautilus_directory_notify_files_removed, nautilus_directory_notify_files_moved): Use `nautilus_file_get_existing', not `nautilus_file_get', to check if a file is already known. `nautilus_file_get' would have created new NautilusFiles and NautilusDirectories only to do redundant notification later in the function. Also, the old code was a bit silly because `nautilus_file_get' only returns NULL for a NULL URI. Work towards bug 3362, eliminate directory metadata. * libnautilus-extensions/nautilus-file-attributes.h: Added NAUTILUS_FILE_ATTRIBUTE_METADATA attribute. * libnautilus-extensions/nautilus-directory-async.c (set_up_request_by_file_attributes): * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-directory.h, libnautilus-extensions/nautilus-directory.c, libnautilus-extensions/nautilus-file.c (nautilus_directory_call_when_ready, nautilus_directory_wait_until_ready, nautilus_directory_file_monitor_add, nautilus_self_check_directory, nautilus_file_monitor_add, nautilus_file_call_when_ready, nautilus_file_wait_until_ready): Remove monitor_metadata or wait_for_metadata attribtues from these calls; the new way to do it is to monitor or wait for the METADATA file attribute. * libnautilus-extensions/nautilus-directory-private.h libnautilus-extensions/nautilus-directory-async.c: (nautilus_directory_monitor_add_internal, nautilus_directory_call_when_ready_internal, nautilus_directory_check_if_ready_internal): Eliminate monitor_metadata, wait_for_metadata, etc arguments. * libnautilus-extensions/nautilus-merged-directory.c: (merged_callback_connect_directory), (merged_call_when_ready), (merged_file_monitor_add), (monitor_add_directory): * libnautilus-extensions/nautilus-vfs-directory.c: (vfs_call_when_ready), (vfs_file_monitor_add): * libnautilus-extensions/nautilus-directory-background.c (nautilus_connect_background_to_directory_metadata): Monitor metadata the new approved way. * libnautilus-extensions/nautilus-mime-actions.c (nautilus_directory_wait_for_metadata, nautilus_mime_get_default_component_for_uri_internal, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_all_components_for_uri, get_mime_type_from_file): Wait for metadata the new approved way. * src/file-manager/fm-directory-view.c (fm_directory_view_activate_file, fm_directory_view_load_uri, finish_loading_uri, metadata_ready_callback): Monitor/call_when_ready using the new API. * src/file-manager/fm-properties-window.c: (create_properties_window, fm_properties_window_present): Monitor/call_when_ready using the new API. * src/file-manager/fm-search-list-view.c (real_adding_file): Monitor/call_when_ready using the new API. * src/file-manager/nautilus-trash-monitor.c (nautilus_trash_monitor_initialize): Monitor/call_when_ready using the new API. * src/nautilus-applicable-views.c (nautilus_navigation_info_new): Monitor/call_when_ready using the new API. * components/notes/nautilus-notes.c (notes_load_metainfo): Monitor/call_when_ready using the new API. * components/tree/nautilus-tree-model.c: (nautilus_tree_model_monitor_add, nautilus_tree_model_monitor_node): Monitor/call_when_ready using the new API. * src/nautilus-sidebar-title.c, src/nautilus-sidebar-title.h (nautilus_sidebar_title_set_uri): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. * src/nautilus-sidebar.c (nautilus_sidebar_destroy, nautilus_sidebar_add_panel_items, nautilus_sidebar_background_is_default, receive_dropped_uri_list, receive_dropped_color, receive_dropped_keyword, (background_settings_changed_callback, background_appearance_changed_callback, background_reset_callback, open_with_callback, nautilus_sidebar_update_buttons, nautilus_sidebar_update_appearance, nautilus_sidebar_set_uri): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. Keep around a NautilusFile representing the current sidebar location, simplifying bunches of code and hopefully eliminating potential redundant I/O. * src/nautilus-window-manage-views.c (viewed_file_changed_callback, position_and_show_window_callback, nautilus_window_end_location_change_callback): Monitor/call_when_ready using the new API, and use file metadata instead of directory metadata. Keep around a NautilusFile representing the current sidebar location, simplifying bunches of code and hopefully eliminating potential redundant I/O. * src/nautilus-window.c (nautilus_window_save_geometry): Use file metadata instead of directory metadata.
Diffstat (limited to 'libnautilus-private/nautilus-merged-directory.c')
-rw-r--r--libnautilus-private/nautilus-merged-directory.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/libnautilus-private/nautilus-merged-directory.c b/libnautilus-private/nautilus-merged-directory.c
index a38fcf2ba..5f71c4523 100644
--- a/libnautilus-private/nautilus-merged-directory.c
+++ b/libnautilus-private/nautilus-merged-directory.c
@@ -45,7 +45,6 @@ typedef struct {
gpointer callback_data;
GList *wait_for_attributes;
- gboolean wait_for_metadata;
GList *non_ready_directories;
GList *merged_file_list;
@@ -55,7 +54,6 @@ typedef struct {
NautilusMergedDirectory *merged;
GList *monitor_attributes;
- gboolean monitor_metadata;
gboolean force_reload;
} MergedMonitor;
@@ -223,14 +221,12 @@ merged_callback_connect_directory (MergedCallback *merged_callback,
nautilus_directory_call_when_ready
(real_merged,
merged_callback->wait_for_attributes,
- merged_callback->wait_for_metadata,
directory_ready_callback, merged_callback);
}
static void
merged_call_when_ready (NautilusDirectory *directory,
GList *file_attributes,
- gboolean wait_for_metadata,
NautilusDirectoryCallback callback,
gpointer callback_data)
{
@@ -254,7 +250,6 @@ merged_call_when_ready (NautilusDirectory *directory,
merged_callback->callback = callback;
merged_callback->callback_data = callback_data;
merged_callback->wait_for_attributes = nautilus_g_str_list_copy (file_attributes);
- merged_callback->wait_for_metadata = wait_for_metadata;
for (p = merged->details->directories; p != NULL; p = p->next) {
merged_callback->non_ready_directories = g_list_prepend
(merged_callback->non_ready_directories, p->data);
@@ -311,7 +306,6 @@ static void
merged_file_monitor_add (NautilusDirectory *directory,
gconstpointer client,
GList *file_attributes,
- gboolean monitor_metadata,
gboolean force_reload)
{
NautilusMergedDirectory *merged;
@@ -334,14 +328,13 @@ merged_file_monitor_add (NautilusDirectory *directory,
(gpointer) client, monitor);
}
monitor->monitor_attributes = nautilus_g_str_list_copy (file_attributes);
- monitor->monitor_metadata = monitor_metadata;
monitor->force_reload = force_reload;
/* Call through to the real directory add calls. */
for (p = merged->details->directories; p != NULL; p = p->next) {
nautilus_directory_file_monitor_add
(p->data, monitor,
- file_attributes, monitor_metadata, force_reload);
+ file_attributes, force_reload);
}
}
@@ -454,7 +447,6 @@ monitor_add_directory (gpointer key,
nautilus_directory_file_monitor_add
(NAUTILUS_DIRECTORY (callback_data), monitor,
monitor->monitor_attributes,
- monitor->monitor_metadata,
monitor->force_reload);
}