diff options
author | Christian Neumair <cneumair@gnome.org> | 2008-09-10 20:00:01 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2008-09-10 20:00:01 +0000 |
commit | 73489fb432159808a5e99a26a625661e1a96371c (patch) | |
tree | 8a863dea20b639ce750073ab39396271e53ccfec /src | |
parent | 383b822af8ebd26e3a6d891bda7f502fb404be7a (diff) | |
download | nautilus-73489fb432159808a5e99a26a625661e1a96371c.tar.gz |
Use eel_preferences_add_auto_string_array_as_quarks(), instead of
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.
svn path=/trunk/; revision=14613
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-icon-container.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/file-manager/fm-icon-container.c b/src/file-manager/fm-icon-container.c index 5f5765e6d..f815451d7 100644 --- a/src/file-manager/fm-icon-container.c +++ b/src/file-manager/fm-icon-container.c @@ -187,25 +187,6 @@ fm_icon_container_prioritize_thumbnailing (NautilusIconContainer *container, } } -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 @@ fm_icon_container_get_icon_text_attributes_from_preferences (void) 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 |