[PATCH] Make sidebar track "show number of items" pref



From bug 92862 [1]:

"The 'Show number of items in folders' options under
Edit/Preferences/Performance category is not instant apply on the
nautilus sidepane".

Proposed patch attached.

-- 
Christian Neumair <chris gnome-de org>
Index: src/nautilus-sidebar-title.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v
retrieving revision 1.150
diff -u -p -r1.150 nautilus-sidebar-title.c
--- src/nautilus-sidebar-title.c	21 May 2005 16:13:59 -0000	1.150
+++ src/nautilus-sidebar-title.c	12 Jul 2005 22:55:57 -0000
@@ -73,6 +73,7 @@ static void                update_icon  
 static GtkWidget *         sidebar_title_create_title_label        (void);
 static GtkWidget *         sidebar_title_create_more_info_label    (void);
 static void		   update_all 				   (NautilusSidebarTitle      *sidebar_title);
+static void		   update_more_info			   (NautilusSidebarTitle      *sidebar_title);
 static void		   update_title_font			   (NautilusSidebarTitle      *sidebar_title);
 static void                style_set                               (GtkWidget                 *widget,
 								    GtkStyle                  *previous_style);
@@ -176,6 +177,11 @@ nautilus_sidebar_title_init (NautilusSid
 
 	/* initialize the label colors & fonts */
 	style_set (GTK_WIDGET (sidebar_title), NULL);
+
+	eel_preferences_add_callback_while_alive (
+		NAUTILUS_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS,
+		(EelPreferencesCallback) update_more_info,
+		sidebar_title, G_OBJECT (sidebar_title));
 }
 
 /* destroy by throwing away private storage */

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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