Re: [PATCH] Fix trash deep count



Am Montag, den 01.08.2005, 22:33 +0200 schrieb Martin Wehner:
> This doesn't quite work though: The deep-count request is set to
> REQUEST_DONE on the first pass through (and all values set to 0), so it
> won't try to count again on the second pass (with the known filetype).

If no MIME type is ready, any_file_was_ready is FALSE and status set to
NAUTILUS_REQUEST_NOT_STARTED. If some of them (but not all) are ready,
the status is set to NAUTILUS_REQUEST_IN_PROGRESS.

> AFAICT it'll always come up with "nothing" for the directories with
> initially unknown types, even after the type is determined.

Yes, the request just seems to set the status to _DONE in these cases.

> You can make it work by setting the request to NOT_STARTED in
> deep_count_start if the file type is unknown.

There is not just one "the file type", there are multiple ones, one for
each trash directory, some of which can be remote system. The trick is
really that as soon as these attributes are ready for any of our trash
directories, we ask the property window to re-read the trash count (cf.
file_type_is_ready).

> I'm not sure it's the
> right fix though, it seems to be a systematic problem (it also applies
> to the mime_list and directory_count requests) - There seems to be no
> guarantee that you got the file type at this point, which will make
> these functions bail out.

Hrm haven't even thought about these. Any other ideas than adding
similar call_when_ready code to the relevant functions?

-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: This is a digitally signed message part



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