summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-container.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-05 21:59:16 +0200
committerStefano Karapetsas <[email protected]>2012-09-05 21:59:16 +0200
commitbe3f666650c0da1aac5232291d83a51e127b005e (patch)
tree2d862d6db5c40d7957921e264469cc5dba57c88e /libcaja-private/caja-icon-container.c
parent45742f8351e2991d54b00189f6e0c772e257f395 (diff)
downloadcaja-be3f666650c0da1aac5232291d83a51e127b005e.tar.bz2
caja-be3f666650c0da1aac5232291d83a51e127b005e.tar.xz
remove latest mateconf stuff
Diffstat (limited to 'libcaja-private/caja-icon-container.c')
-rw-r--r--libcaja-private/caja-icon-container.c27
1 files changed, 15 insertions, 12 deletions
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 <eel/eel-editable-label.h>
#include <eel/eel-marshal.h>
#include <eel/eel-string.h>
-#include <eel/eel-preferences.h>
-#include <eel/eel-enumeration.h>
#include <eel/eel-canvas-rect-ellipse.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -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;
}
}