aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-12-07 22:59:47 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-12-07 22:59:47 +0800
commitc74c2ffafded21bc3b583743b7054de65f35eef5 (patch)
tree50077b7704b947343ac629a7ad7bafaa812f6059 /embed
parent7a0f902ad4ab5c34d70897ac3e6cec59baf690ff (diff)
downloadgsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar.gz
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar.bz2
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar.lz
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar.xz
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.tar.zst
gsoc2013-epiphany-c74c2ffafded21bc3b583743b7054de65f35eef5.zip
ephy-embed-prefs: initialize prefs from settings
Settings kept in sync with g_signal_connect were missing an initialization.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-prefs.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 5fd6ba22f..f34ee828b 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -36,7 +36,7 @@ typedef struct
char *schema;
char *key;
char *webkit_pref;
- GCallback callback;
+ void (*callback) (GSettings *settings, char *key, gpointer data);
} PrefData;
static WebKitWebSettings *webkit_settings = NULL;
@@ -328,39 +328,39 @@ static const PrefData webkit_pref_entries[] =
{ "org.gnome.desktop.interface",
"font-name",
"default-font-size",
- G_CALLBACK (webkit_pref_callback_font_size) },
+ webkit_pref_callback_font_size },
{ "org.gnome.desktop.interface",
"font-name",
"default-font-family",
- G_CALLBACK (webkit_pref_callback_font_family) },
+ webkit_pref_callback_font_family },
{ "org.gnome.desktop.interface",
"font-name",
"sans-serif-font-family",
- G_CALLBACK (webkit_pref_callback_font_family) },
+ webkit_pref_callback_font_family },
{ "org.gnome.desktop.interface",
"monospace-font-name",
"default-monospace-font-size",
- G_CALLBACK (webkit_pref_callback_font_size) },
+ webkit_pref_callback_font_size },
{ "org.gnome.desktop.interface",
"monospace-font-name",
"monospace-font-family",
- G_CALLBACK (webkit_pref_callback_font_family) },
+ webkit_pref_callback_font_family },
{ EPHY_PREFS_WEB_SCHEMA,
EPHY_PREFS_WEB_ENABLE_USER_CSS,
"user-stylesheet-uri",
- G_CALLBACK (webkit_pref_callback_user_stylesheet) },
+ webkit_pref_callback_user_stylesheet },
{ EPHY_PREFS_WEB_SCHEMA,
EPHY_PREFS_WEB_LANGUAGE,
"accept-language",
- G_CALLBACK (webkit_pref_callback_accept_languages) },
+ webkit_pref_callback_accept_languages },
{ EPHY_PREFS_SCHEMA,
EPHY_PREFS_USER_AGENT,
"user-agent",
- G_CALLBACK (webkit_pref_callback_user_agent) },
+ webkit_pref_callback_user_agent },
{ EPHY_PREFS_WEB_SCHEMA,
EPHY_PREFS_WEB_COOKIES_POLICY,
"accept-policy",
- G_CALLBACK (webkit_pref_callback_cookie_accept_policy) },
+ webkit_pref_callback_cookie_accept_policy },
};
static void
@@ -394,8 +394,12 @@ ephy_embed_prefs_init (void)
settings = ephy_settings_get (webkit_pref_entries[i].schema);
key = g_strconcat ("changed::", webkit_pref_entries[i].key, NULL);
+ webkit_pref_entries[i].callback (settings,
+ webkit_pref_entries[i].key,
+ webkit_pref_entries[i].webkit_pref);
+
g_signal_connect (settings, key,
- webkit_pref_entries[i].callback,
+ G_CALLBACK (webkit_pref_entries[i].callback),
webkit_pref_entries[i].webkit_pref);
g_free (key);
}