summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-05 16:48:07 +0200
committerStefano Karapetsas <[email protected]>2012-09-05 16:48:07 +0200
commit46925062b04255e723ff931ac82aefda9cfc516d (patch)
treefa84d02512e584fdbf73f34d5d1ea999cefa169f /libcaja-private
parentf0ca3e5a0329fa0c4a2fe5b6b941e660b547e113 (diff)
downloadcaja-46925062b04255e723ff931ac82aefda9cfc516d.tar.bz2
caja-46925062b04255e723ff931ac82aefda9cfc516d.tar.xz
convert show-text-in-icons to gsettings
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-directory.c7
-rw-r--r--libcaja-private/caja-file.c9
-rw-r--r--libcaja-private/caja-global-preferences.c7
-rw-r--r--libcaja-private/caja-global-preferences.h2
4 files changed, 10 insertions, 15 deletions
diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c
index cedd1a59..2318e409 100644
--- a/libcaja-private/caja-directory.c
+++ b/libcaja-private/caja-directory.c
@@ -331,9 +331,10 @@ add_preferences_callbacks (void)
"changed::" CAJA_PREFERENCES_SHOW_HIDDEN_FILES,
G_CALLBACK(filtering_changed_callback),
NULL);
- eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
- async_data_preference_changed_callback,
- NULL);
+ g_signal_connect_swapped (caja_preferences,
+ "changed::" CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
+ G_CALLBACK (async_data_preference_changed_callback),
+ NULL);
eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS,
async_data_preference_changed_callback,
NULL);
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 988ff2e7..e923e895 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -4694,7 +4694,7 @@ static CajaSpeedTradeoffValue show_text_in_icons;
static void
show_text_in_icons_changed_callback (gpointer callback_data)
{
- show_text_in_icons = eel_preferences_get_enum (CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS);
+ show_text_in_icons = g_settings_get_enum (caja_preferences, CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS);
}
static void
@@ -4790,9 +4790,10 @@ caja_file_should_get_top_left_text (CajaFile *file)
/* Add the callback once for the life of our process */
if (!show_text_in_icons_callback_added) {
- eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
- show_text_in_icons_changed_callback,
- NULL);
+ g_signal_connect_swapped (caja_preferences,
+ "changed::" CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
+ G_CALLBACK (show_text_in_icons_changed_callback),
+ NULL);
show_text_in_icons_callback_added = TRUE;
/* Peek for the first time */
diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c
index d2c68b0a..ee7edb54 100644
--- a/libcaja-private/caja-global-preferences.c
+++ b/libcaja-private/caja-global-preferences.c
@@ -187,13 +187,6 @@ typedef struct
*/
static const PreferenceDefault preference_defaults[] =
{
- {
- CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS,
- PREFERENCE_STRING,
- "local_only",
- NULL, NULL,
- "speed_tradeoff"
- },
/* Don't show remote directory item counts by default
* because computing them can be annoyingly slow, especially
* for FTP. If we make this fast enough for FTP in particular,
diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h
index 050ae054..6ffa0fdf 100644
--- a/libcaja-private/caja-global-preferences.h
+++ b/libcaja-private/caja-global-preferences.h
@@ -198,7 +198,7 @@ G_BEGIN_DECLS
CAJA_SPEED_TRADEOFF_NEVER
} CajaSpeedTradeoffValue;
-#define CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS "preferences/show_icon_text"
+#define CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS "show-icon-text"
#define CAJA_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS "preferences/show_directory_item_counts"
#define CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS "preferences/show_image_thumbnails"
#define CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT "preferences/thumbnail_limit"