summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-03-08 19:53:30 +0000
committerDarin Adler <darin@src.gnome.org>2001-03-08 19:53:30 +0000
commit4536e0f5b38e7c97b8dc63b1acf33c1b8c077d1a (patch)
tree1e8f4651da548ff0a02f3ae33210a9b70fd6aa1f /src
parent85b8adc30922f83a35889ea4094f363a332e7309 (diff)
downloadnautilus-4536e0f5b38e7c97b8dc63b1acf33c1b8c077d1a.tar.gz
reviewed by: John Sullivan <sullivan@eazel.com>
Fix another part of bug 7494 (History sidebar component spews assertions when closing nautilus window [and sometimes crashes]): * libnautilus/nautilus-idle-queue.c: (execute_queued_functions): Change logic so that queued functions no longer execute once the caller destroys the queue. Fix bug 7564 (opening and quickly closing window in list view leads to core dump): * src/file-manager/fm-directory-view.c: (fm_directory_view_destroy): Remove code to empty lists now that stop handles that. (load_error_callback): Added a FIXME about the fact that we throw away some pending files on an error. (fm_directory_view_stop): Don't display pending files any more. This is a problem when trying to destroy, and also the old code displayed only one "batch" of pending files, so it wasn't really making sure all the files were displayed anyway. If we re-add the code to display pending files here, we'll have to make sure it doesn't do this for the destroy case. * src/file-manager/fm-list-view.c: Added FIXME asking why the "add 100 items at a time" logic is only needed for list view, and not for icon view. If both kinds of views had it, it could be done more simply at the FMDirectoryView level. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_get_icon_size_for_zoom_level): Fix this code so that it doesn't do a core dump if it gets a bad size. This is not the cause of the problem, but it's good to fix this too, because a core dump is overreacting to a bad parameter.
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-directory-view.c25
-rw-r--r--src/file-manager/fm-list-view.c1
2 files changed, 13 insertions, 13 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 64f0aa1f4..fd0d94c13 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1099,13 +1099,6 @@ fm_directory_view_destroy (GtkObject *object)
monitor_file_for_activation (view, NULL);
- nautilus_file_list_free (view->details->pending_files_added);
- view->details->pending_files_added = NULL;
- nautilus_file_list_free (view->details->pending_files_changed);
- view->details->pending_files_changed = NULL;
- nautilus_g_list_free_deep (view->details->pending_uris_selected);
- view->details->pending_uris_selected = NULL;
-
monitor_file_for_open_with (view, NULL);
fm_directory_view_stop (view);
@@ -1384,7 +1377,6 @@ stop_loading_callback (NautilusView *nautilus_view,
fm_directory_view_stop (view);
}
-
static void
fm_directory_view_file_limit_reached (FMDirectoryView *view)
{
@@ -2005,11 +1997,16 @@ load_error_callback (NautilusDirectory *directory,
view = FM_DIRECTORY_VIEW (callback_data);
+ /* FIXME: By doing a stop, we discard some pending files. Is
+ * that OK?
+ */
fm_directory_view_stop (view);
- /* Emit a signal to tell subclasses that a load
- error has occurred, so they can handle it in the
- UI */
- gtk_signal_emit (GTK_OBJECT (view), signals[LOAD_ERROR], load_error_code);
+
+ /* Emit a signal to tell subclasses that a load error has
+ * occurred, so they can handle it in the UI.
+ */
+ gtk_signal_emit (GTK_OBJECT (view),
+ signals[LOAD_ERROR], load_error_code);
}
static void
@@ -4120,12 +4117,14 @@ fm_directory_view_stop (FMDirectoryView *view)
g_return_if_fail (FM_IS_DIRECTORY_VIEW (view));
unschedule_display_of_pending_files (view);
- display_pending_files (view);
+
/* Free extra undisplayed files */
nautilus_file_list_free (view->details->pending_files_added);
view->details->pending_files_added = NULL;
nautilus_file_list_free (view->details->pending_files_changed);
view->details->pending_files_changed = NULL;
+ nautilus_g_list_free_deep (view->details->pending_uris_selected);
+ view->details->pending_uris_selected = NULL;
if (view->details->model != NULL) {
nautilus_directory_file_monitor_remove (view->details->model, view);
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 0217ba613..e7fc59a32 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -60,6 +60,7 @@ struct FMListViewDetails {
in chunks, to improve responsiveness during loading.
This is the number of files we add to the list, or change
at once. */
+/* FIXME: Why doesn't the icon view need the same thing. */
#define LIST_VIEW_DISPLAY_PENDING_FILES_GROUP_SIZE 100
/*