nautilus r14613 - in trunk: . src/file-manager



Author: cneumair
Date: Wed Sep 10 20:00:01 2008
New Revision: 14613
URL: http://svn.gnome.org/viewvc/nautilus?rev=14613&view=rev

Log:
2008-09-10  Christian Neumair  <cneumair gnome org>

	* src/file-manager/fm-icon-container.c
	(fm_icon_container_get_icon_text_attributes_from_preferences):
	Use eel_preferences_add_auto_string_array_as_quarks(), instead of
	registering a custom callback function - which is not guaranteed to be
	run before other (instance) callbacks. Thanks to Cosimo Cecchi for the
	problem analysis. Fixes #551576.

	* configure.in:
	Depend on eel 2.24.0.


Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/file-manager/fm-icon-container.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Sep 10 20:00:01 2008
@@ -4,7 +4,7 @@
 
 m4_define(bonobo_activation_minver,    2.1.0)
 m4_define(bonobo_minver,               2.1.0)
-m4_define(eel_minver,                  2.23.91)
+m4_define(eel_minver,                  2.24.0)
 m4_define(glib_minver,                 2.17.5)
 m4_define(gnome_desktop_minver,        2.9.91)
 m4_define(gnome_minver,                2.14.0)

Modified: trunk/src/file-manager/fm-icon-container.c
==============================================================================
--- trunk/src/file-manager/fm-icon-container.c	(original)
+++ trunk/src/file-manager/fm-icon-container.c	Wed Sep 10 20:00:01 2008
@@ -187,25 +187,6 @@
 	}
 }
 
-static void
-update_captions (GQuark **attributes_p)
-{
-	char **attribute_names;
-	int i;
-
-	attribute_names = eel_preferences_get_string_array (NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS);
-
-	g_free (*attributes_p);
-	*attributes_p = g_new (GQuark, g_strv_length (attribute_names) + 1);
-
-	for (i = 0; attribute_names[i] != NULL; ++i) {
-		(*attributes_p)[i] = g_quark_from_string (attribute_names[i]);
-	}
-	(*attributes_p)[i] = 0;
-	
-	g_strfreev (attribute_names);
-}
-
 /*
  * Get the preference for which caption text should appear
  * beneath icons.
@@ -216,10 +197,8 @@
 	static GQuark *attributes = NULL;
 
 	if (attributes == NULL) {
-		eel_preferences_add_callback (NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS,
-					      (EelPreferencesCallback)update_captions,
-					      &attributes);
-		update_captions (&attributes);
+		eel_preferences_add_auto_string_array_as_quarks (NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS,
+								 &attributes);
 	}
 	
 	/* We don't need to sanity check the attributes list even though it came



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