Re: timeout patch for properties - take 2

On Mon, 2003-09-15 at 11:42, Mathieu Lacage wrote:
> hi, 
> here is the patch
> Apologies again for the wrong mail account used in my previuos mail.

+			/* Remove the file from the property dialog */

This comment seems to be in the wrong place. (Not your fault really, it
was in old code too.)

+		unique = 0;

Use NULL, not 0.

+		for (tmp = window->details->changed_files; tmp != NULL; tmp = tmp->next) {
+			if (g_list_find (unique, tmp->data)) {
+				nautilus_file_unref (NAUTILUS_FILE (tmp->data));
+				continue;
+			}

Do the uniqueification when adding the file instead. That way the
changed_files list can't grow unbounded, and uniquification will be

+	directory_contents_value_field_update (window);
[From properties_window_update()]

This is already called in update_contents_callback(), so this means this
code is run twice in the callback.

+	if (files == NULL) {
+		dirty_original = TRUE;
+		dirty_target = TRUE;
+	}

This is used for the initial refresh everything, but it means it does
the whole properties_window_update() even if only
updated_deep_count_in_progress is needed.
I think not refreshing if files == NULL, and instead passing TRUE in a
dirty_all argument when doing the initial properties_window_update()
would work better. To avoid calling
directory_contents_value_field_update() unnecessary there should be a
directory_contents_dirty flag too, which get set by the 
"updated_deep_count_in_progress" signal handler.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a genetically engineered hunchbacked Green Beret with no name. She's a 
scantily clad African-American detective with a flame-thrower. They fight 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]