Re: [Nautilus-list] [PATCH]: avoid re-layouting when it's not needed.
- From: Yoann Vandoorselaere <yoann mandrakesoft com>
- To: migras atlas uvigo es
- Cc: nautilus-list lists eazel com, Ramiro Estrugo <ramiro fateware com>, Darin Adler <darin bentspoon com>
- Subject: Re: [Nautilus-list] [PATCH]: avoid re-layouting when it's not needed.
- Date: 17 Jun 2001 15:02:19 +0200
Yoann Vandoorselaere <yoann mandrakesoft com> writes:
> Miguel Rodríguez Pérez <migrax terra es> writes:
>
> > Yoann Vandoorselaere wrote:
> >
> > >On directory load, we do relayout several time before it's needed
> > >(before any file get added or changed). In fact, in this case, the
> > >files_changed signal should only be hooked after finish_loading is
> > >called (when the view is loaded and we are starting monitoring the
> > >directory), and disconnected as soon as the directory load is done.
> > >
> > >This work fine on my local tree, and seem to help with latency.
> > >
> > I have tried your patch and I am not longer able to see directory
> > counts for any directory under it's icon untill I enter one and go
> > back again.
>
> I did not have directory count enabled on my system at testing time,
> I'll look at the problem later (short on time right now)...
Finally did it now...
This one should work and still bring the improvment.
Please give feedback...
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.459
diff -u -p -r1.459 fm-directory-view.c
--- src/file-manager/fm-directory-view.c 2001/05/19 11:56:42 1.459
+++ src/file-manager/fm-directory-view.c 2001/06/17 13:02:08
@@ -4651,8 +4651,6 @@ load_directory (FMDirectoryView *view,
*/
schedule_update_menus (view);
- disconnect_model_handlers (view);
-
old_directory = view->details->model;
nautilus_directory_ref (directory);
view->details->model = directory;
@@ -4700,6 +4698,12 @@ load_directory (FMDirectoryView *view,
}
static void
+load_directory_done (NautilusDirectory *directory, GList *files, gpointer callback_data)
+{
+ disconnect_model_handlers (callback_data);
+}
+
+static void
finish_loading (FMDirectoryView *view)
{
GList *attributes;
@@ -4756,6 +4760,11 @@ finish_loading (FMDirectoryView *view)
view->details->show_backup_files,
attributes);
+ nautilus_directory_call_when_ready(view->details->model,
+ attributes,
+ TRUE,
+ load_directory_done, view);
+
g_list_free (attributes);
}
--
Yoann Vandoorselaere | <Iambe> conning the most intellegent people on the
MandrakeSoft | planet is not easy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]