Re: PATCH: use gnome-vfs for monitoring files
- From: Alex Larsson <alexl redhat com>
- To: Alex Graveley <alex ximian com>
- Cc: nautilus-list lists eazel com
- Subject: Re: PATCH: use gnome-vfs for monitoring files
- Date: Tue, 21 May 2002 12:15:42 -0400 (EDT)
On 21 May 2002, Alex Graveley wrote:
> Hi,
>
> This patch uses the gnome-vfs monitoring API to watch files for changes,
> instead of that of libnautilus-private/nautilus-monitor.[ch]. This is
> needed so that I can implement monitors for the applications:// and
> start-here:// vfs methods, and have the nautilus view refresh nicely.
>
> nautilus-monitor.[ch] is left around only for nautilus_monitor_active(),
> which is needed so nautilus can tell if it manually needs to refresh the
> newly changed-to directory, or let FAM deal with notifying it. It works
> by creating a monitor for the user's desktop directory, and immediately
> removing it. If this was successful, FAM is assumed to be operational.
>
> This also adds an idle handler so as to avoid calling
> nautilus_file_changes_consume_changes() after every change event, so we
> aren't overrun with refresh operations.
>
> Monitoring seems to work just as well as the current code for me, but
> this patch could probably use some extra eyes.
I have two issues with this patch.
a) The natuilus_monitor_active() implementation calls out to the fam
daemon on every call. This is to slow. I'd prefer if there was a way to
ask gnome-vfs if monitoring is active, but barring that I would like to
cache the return value.
b) We lost the special-cased handling of read-only devices. That means you
won't be able to unmount your cd, since fam will keep open file
descriptors on it. This is a regression.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a bookish umbrella-wielding househusband fleeing from a secret government
programme. She's a disco-crazy Buddhist fairy princess from out of town. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]