[epiphany] ephy-embed-prefs: initialize prefs from settings
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-embed-prefs: initialize prefs from settings
- Date: Tue, 7 Dec 2010 18:09:36 +0000 (UTC)
commit c74c2ffafded21bc3b583743b7054de65f35eef5
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Tue Dec 7 15:59:47 2010 +0100
ephy-embed-prefs: initialize prefs from settings
Settings kept in sync with g_signal_connect were missing an initialization.
embed/ephy-embed-prefs.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 5fd6ba2..f34ee82 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]