summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-05 17:20:48 +0200
committerStefano Karapetsas <[email protected]>2012-09-05 17:20:48 +0200
commit16be9e9816c2201c049c411572343b0c4c408552 (patch)
tree3ee9e8ae6fd4f15defc83e3bf3aacca151aeb0c2 /libcaja-private/caja-file.c
parent562875c2ed80bd7501fb161564ab88c731ac497c (diff)
downloadcaja-16be9e9816c2201c049c411572343b0c4c408552.tar.bz2
caja-16be9e9816c2201c049c411572343b0c4c408552.tar.xz
convert preview settings to gsettings
Diffstat (limited to 'libcaja-private/caja-file.c')
-rw-r--r--libcaja-private/caja-file.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 52bfaa50..0a2d8833 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -4041,7 +4041,7 @@ get_custom_icon (CajaFile *file)
}
-static guint cached_thumbnail_limit;
+static guint64 cached_thumbnail_limit;
int cached_thumbnail_size;
static int show_image_thumbs;
@@ -8160,7 +8160,9 @@ caja_extract_top_left_text (const char *text,
static void
thumbnail_limit_changed_callback (gpointer user_data)
{
- cached_thumbnail_limit = eel_preferences_get_uint (CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT);
+ g_settings_get (caja_preferences,
+ CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
+ "t", &cached_thumbnail_limit);
/* Tell the world that icons might have changed. We could invent a narrower-scope
* signal to mean only "thumbnails might have changed" if this ends up being slow
@@ -8184,7 +8186,7 @@ thumbnail_size_changed_callback (gpointer user_data)
static void
show_thumbnails_changed_callback (gpointer user_data)
{
- show_image_thumbs = eel_preferences_get_enum (CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS);
+ show_image_thumbs = g_settings_get_enum (caja_preferences, CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS);
/* Tell the world that icons might have changed. We could invent a narrower-scope
* signal to mean only "thumbnails might have changed" if this ends up being slow
@@ -8281,17 +8283,19 @@ caja_file_class_init (CajaFileClass *class)
&date_format_pref);
thumbnail_limit_changed_callback (NULL);
- eel_preferences_add_callback (CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
- thumbnail_limit_changed_callback,
- NULL);
+ g_signal_connect_swapped (caja_preferences,
+ "changed::" CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT,
+ G_CALLBACK (thumbnail_limit_changed_callback),
+ NULL);
thumbnail_size_changed_callback (NULL);
eel_preferences_add_callback (CAJA_PREFERENCES_ICON_VIEW_THUMBNAIL_SIZE,
thumbnail_size_changed_callback,
NULL);
show_thumbnails_changed_callback (NULL);
- eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS,
- show_thumbnails_changed_callback,
- NULL);
+ g_signal_connect_swapped (caja_preferences,
+ "changed::" CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS,
+ G_CALLBACK (show_thumbnails_changed_callback),
+ NULL);
icon_theme = gtk_icon_theme_get_default ();
g_signal_connect_object (icon_theme,