From be3f666650c0da1aac5232291d83a51e127b005e Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 5 Sep 2012 21:59:16 +0200 Subject: remove latest mateconf stuff --- libcaja-private/caja-icon-container.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'libcaja-private/caja-icon-container.c') diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 787c1785..e3457f31 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -45,8 +45,6 @@ #include #include #include -#include -#include #include #include #include @@ -6816,14 +6814,22 @@ get_text_ellipsis_limit_for_zoom (char **strs, return success; } +static const char * zoom_level_names[] = { + "smallest", + "smaller", + "small", + "standard", + "large", + "larger", + "largest" +}; + static void text_ellipsis_limit_changed_callback (gpointer callback_data) { char **pref; unsigned int i; int one_limit; - const EelEnumeration *eenum; - const EelEnumerationEntry *entry; pref = g_settings_get_strv (caja_icon_view_preferences, CAJA_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT); @@ -6835,14 +6841,11 @@ text_ellipsis_limit_changed_callback (gpointer callback_data) } /* override for each zoom level */ - eenum = eel_enumeration_lookup ("default_zoom_level"); - g_assert (eenum != NULL); - for (i = 0; i < eel_enumeration_get_length (eenum); i++) - { - entry = eel_enumeration_get_nth_entry (eenum, i); - if (get_text_ellipsis_limit_for_zoom (pref, entry->name, &one_limit)) - { - text_ellipsis_limits[entry->value] = one_limit; + for (i = 0; i < G_N_ELEMENTS(zoom_level_names); i++) { + if (get_text_ellipsis_limit_for_zoom (pref, + zoom_level_names[i], + &one_limit)) { + text_ellipsis_limits[i] = one_limit; } } -- cgit v1.2.1