summaryrefslogtreecommitdiff
path: root/src/eom-scroll-view.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-29 18:26:49 +0200
committerinfirit <[email protected]>2014-07-29 18:26:49 +0200
commitfb511ab67fa5072f674a9fc0d43916fb99792e6b (patch)
tree6a430a6e5583d9cd630a5ee57ef1939a8daf3400 /src/eom-scroll-view.c
parentf1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15 (diff)
downloadeom-fb511ab67fa5072f674a9fc0d43916fb99792e6b.tar.bz2
eom-fb511ab67fa5072f674a9fc0d43916fb99792e6b.tar.xz
Have GSettings use enum for transparency style
Based on eog commit e8f2f6ecdd99dc5dce35a044e84738fe73f937e0 From Felix Riemann <[email protected]> ps infirit: eom never had this value in the convert file
Diffstat (limited to 'src/eom-scroll-view.c')
-rw-r--r--src/eom-scroll-view.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 6d8e1eb..d1d22c5 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -2440,32 +2440,6 @@ sv_color_to_string_mapping (const GValue *value,
return variant;
}
-static gboolean
-sv_string_to_transp_mapping (GValue *value,
- GVariant *variant,
- gpointer user_data)
-{
- const gchar *str;
-
- g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING), FALSE);
-
- str = g_variant_get_string (variant, NULL);
-
- if (!str)
- return FALSE;
-
- if (g_ascii_strcasecmp (str, "COLOR") == 0)
- g_value_set_enum (value, EOM_TRANSP_COLOR);
- else if (g_ascii_strcasecmp (str, "CHECK_PATTERN") == 0)
- g_value_set_enum (value, EOM_TRANSP_CHECKED);
- else if (g_ascii_strcasecmp (str, "NONE") == 0)
- g_value_set_enum (value, EOM_TRANSP_BACKGROUND);
- else
- return FALSE;
-
- return TRUE;
-}
-
static void
eom_scroll_view_init (EomScrollView *view)
{
@@ -2587,11 +2561,9 @@ eom_scroll_view_init (EomScrollView *view)
G_SETTINGS_BIND_GET,
sv_string_to_color_mapping,
sv_color_to_string_mapping, NULL, NULL);
- g_settings_bind_with_mapping (settings, EOM_CONF_VIEW_TRANSPARENCY,
- view, "transparency-style",
- G_SETTINGS_BIND_GET,
- sv_string_to_transp_mapping,
- NULL, NULL, NULL);
+ g_settings_bind (settings, EOM_CONF_VIEW_TRANSPARENCY, view,
+ "transparency-style", G_SETTINGS_BIND_GET);
+
g_object_unref (settings);
priv->override_bg_color = NULL;