Re: [Nautilus-list] [PATCH]: Avoid directory reload when FAM is active.
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Yoann Vandoorselaere <yoann mandrakesoft com>
- Cc: nautilus-list lists eazel com, Ramiro Estrugo <ramiro fateware com>, Darin Adler <darin bentspoon com>
- Subject: Re: [Nautilus-list] [PATCH]: Avoid directory reload when FAM is active.
- Date: Sun, 17 Jun 2001 09:55:45 -0700
On 17Jun2001 02:11PM (+0200), Yoann Vandoorselaere wrote:
>
> Hi,
>
> here is the requested patch that will avoid directory
> reloading if FAM is active.
>
> Can I commit ?
>
Hi Yoann,
The code to this patch looks OK to me (I'm not the designated patch
reviewer so I can't really approve it but I've worked a lot on the
code it's changing). Can you please describe how you tested? I think
it needs to be tested both with and without FAM to make sure
everything works as expected.
Regards,
Maciej
> Index: src/nautilus-window-manage-views.c
> ===================================================================
> RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v
> retrieving revision 1.266
> diff -u -p -r1.266 nautilus-window-manage-views.c
> --- src/nautilus-window-manage-views.c 2001/06/02 19:39:16 1.266
> +++ src/nautilus-window-manage-views.c 2001/06/17 12:10:53
> @@ -57,6 +57,7 @@
> #include <libnautilus-private/nautilus-metadata.h>
> #include <libnautilus-private/nautilus-mime-actions.h>
> #include <libnautilus-private/nautilus-search-uri.h>
> +#include <libnautilus-private/nautilus-monitor.h>
>
> /* FIXME bugzilla.eazel.com 1243:
> * We should use inheritance instead of these special cases
> @@ -1366,8 +1367,9 @@ begin_location_change (NautilusWindow *w
> NautilusLocationChangeType type,
> guint distance)
> {
> - NautilusDirectory *directory;
> NautilusFile *file;
> + gboolean use_monitoring;
> + NautilusDirectory *directory;
>
> g_assert (NAUTILUS_IS_WINDOW (window));
> g_assert (location != NULL);
> @@ -1384,13 +1386,20 @@ begin_location_change (NautilusWindow *w
> window->details->location_change_distance = distance;
>
> directory = nautilus_directory_get (location);
> -
> - /* In all 4 cases, we want fresh information. */
> - nautilus_directory_force_reload (directory);
> - file = nautilus_directory_get_corresponding_file (directory);
> - nautilus_file_invalidate_all_attributes (file);
> - nautilus_file_unref (file);
>
> + /*
> + * If FAM is not active,
> + * reload the directory to avoid missing anything new.
> + */
> + use_monitoring = nautilus_monitor_active ();
> + if ( ! use_monitoring ) {
> + /* In all 4 cases, we want fresh information. */
> + nautilus_directory_force_reload (directory);
> + file = nautilus_directory_get_corresponding_file (directory);
> + nautilus_file_invalidate_all_attributes (file);
> + nautilus_file_unref (file);
> + }
> +
> window->details->determine_view_handle = nautilus_determine_initial_view
> (location,
> determined_initial_view_callback,
>
>
> --
> Yoann Vandoorselaere | C makes it easy to shoot yourself in the foot. C++ makes
> MandrakeSoft | it harder, but when you do, it blows away your whole
> | leg. - Bjarne Stroustrup
>
> _______________________________________________
> Nautilus-list mailing list
> Nautilus-list lists eazel com
> http://lists.eazel.com/mailman/listinfo/nautilus-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]