diff options
author | Darin Adler <darin@src.gnome.org> | 2001-05-11 17:46:20 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-05-11 17:46:20 +0000 |
commit | 106bf09a008d04c92b932e404faba384ed05a9dc (patch) | |
tree | 3ea1ca571ff939d83ea382a81754d85d56e22ba2 /libnautilus-private/nautilus-merged-directory.c | |
parent | a82f36072d4aa2321b57b6f430dccd35f24ba7f1 (diff) | |
download | nautilus-106bf09a008d04c92b932e404faba384ed05a9dc.tar.gz |
Yoann Vandoorselaere <yoann@mandrakesoft.com> discovered that the
code to load a directory was accidentally waiting for all the
files to be read in before displaying anything. This fixes the two
problems that caused that, but there are remaining loose ends
(it's not entirely clear why View As Music is still showing
properly in the View menu).
* libnautilus-private/nautilus-directory-private.h:
* libnautilus-private/nautilus-directory-async.c:
(nautilus_directory_call_when_ready_internal): Take a parameter to
say whether to wait for all the files in the file list, instead of
deducing it from other parameters.
* libnautilus-private/nautilus-directory.h:
* libnautilus-private/nautilus-directory.c:
(nautilus_directory_call_when_ready): Take a parameter to say
whether to wait for all the files in the file list, instead of
deducing it from other parameters.
(nautilus_self_check_directory): Pass TRUE so we wait for the file
list.
* libnautilus-private/nautilus-merged-directory.c:
(merged_call_when_ready): Pass through the new boolean.
* libnautilus-private/nautilus-trash-file.c:
(real_call_when_ready): Pass FALSE since there is no file list for
a single file.
* libnautilus-private/nautilus-vfs-directory.c:
(vfs_call_when_ready): Pass through the new boolean.
* libnautilus-private/nautilus-vfs-file.c:
(vfs_file_call_when_ready): Pass FALSE since there is no file list
for a single file.
* src/nautilus-applicable-views.c:
(nautilus_determine_initial_view),
(nautilus_determine_initial_view_cancel): Removed the code to get
full file attributes after getting the minimum required if
nautilus_mime_actions_file_needs_full_file_attributes return
TRUE. We want to make the choice fast, and it's OK if we choose
poorly as a result. The question is whether this will cause any
real end-user problems.
* src/file-manager/fm-directory-view.c:
(call_when_ready_on_scripts_directory): Pass TRUE so we read the
entire scripts directory.
(load_directory): Pass FALSE so we don't wait for all the files to
be loaded before starting to display them. This is the core of the
fix.
* components/tree/nautilus-tree-change-queue.c:
(nautilus_tree_change_queue_enqueue): A place where we can use
g_slist_prepend instead of g_slist_append.
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_initialize): A place where we can use
g_slist_prepend instead of g_slist_append.
Diffstat (limited to 'libnautilus-private/nautilus-merged-directory.c')
-rw-r--r-- | libnautilus-private/nautilus-merged-directory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-merged-directory.c b/libnautilus-private/nautilus-merged-directory.c index 0101938ab..5695cdd0a 100644 --- a/libnautilus-private/nautilus-merged-directory.c +++ b/libnautilus-private/nautilus-merged-directory.c @@ -46,6 +46,7 @@ typedef struct { gpointer callback_data; GList *wait_for_attributes; + gboolean wait_for_file_list; GList *non_ready_directories; GList *merged_file_list; @@ -205,6 +206,7 @@ directory_ready_callback (NautilusDirectory *directory, static void merged_call_when_ready (NautilusDirectory *directory, GList *file_attributes, + gboolean wait_for_file_list, NautilusDirectoryCallback callback, gpointer callback_data) { @@ -228,6 +230,7 @@ merged_call_when_ready (NautilusDirectory *directory, merged_callback->callback = callback; merged_callback->callback_data = callback_data; merged_callback->wait_for_attributes = eel_g_str_list_copy (file_attributes); + merged_callback->wait_for_file_list = wait_for_file_list; for (node = merged->details->directories; node != NULL; node = node->next) { merged_callback->non_ready_directories = g_list_prepend (merged_callback->non_ready_directories, node->data); @@ -247,6 +250,7 @@ merged_call_when_ready (NautilusDirectory *directory, nautilus_directory_call_when_ready (node->data, merged_callback->wait_for_attributes, + merged_callback->wait_for_file_list, directory_ready_callback, merged_callback); } } |