diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2015-03-18 09:59:25 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2015-03-18 09:59:25 -0500 |
commit | b57a76dbe14b16749312a9316124e135c437c353 (patch) | |
tree | 15c8eb7734e980fe8c5f422d9d9e23ae9f367571 | |
parent | e576aee616245907f86c773f75f1ca4b7446f686 (diff) | |
download | epiphany-b57a76dbe14b16749312a9316124e135c437c353.tar.gz |
Revert "Use GtkSettings 'gtk-xft-dpi' property to keep track of DPI changes"
This reverts commit e576aee616245907f86c773f75f1ca4b7446f686.
Just because we're in hard code freeze; we'll push this again after
3.16.0.
-rw-r--r-- | embed/ephy-embed-prefs.c | 48 |
1 files changed, 13 insertions, 35 deletions
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c index e3b91c0b9..dfec800d5 100644 --- a/embed/ephy-embed-prefs.c +++ b/embed/ephy-embed-prefs.c @@ -416,8 +416,12 @@ webkit_pref_callback_cookie_accept_policy (GSettings *settings, } static void -ephy_embed_prefs_update_font_settings (GSettings *ephy_settings, char *key) +webkit_pref_callback_gnome_fonts (GSettings *ephy_settings, + char *key, + gpointer data) { + GSettings *settings; + if (g_settings_get_boolean (ephy_settings, key)) { g_object_set (webkit_settings, "default-font-family", "serif", @@ -428,31 +432,25 @@ ephy_embed_prefs_update_font_settings (GSettings *ephy_settings, char *key) NULL); } else { /* Sync with Epiphany values */ - webkit_pref_callback_font_size (ephy_settings, EPHY_PREFS_WEB_SERIF_FONT, + settings = ephy_settings; + + webkit_pref_callback_font_size (settings, EPHY_PREFS_WEB_SERIF_FONT, "default-font-size"); - webkit_pref_callback_font_size (ephy_settings, EPHY_PREFS_WEB_MONOSPACE_FONT, + webkit_pref_callback_font_size (settings, EPHY_PREFS_WEB_MONOSPACE_FONT, "default-monospace-font-size"); - webkit_pref_callback_font_family (ephy_settings, EPHY_PREFS_WEB_SERIF_FONT, + webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_SERIF_FONT, "default-font-family"); - webkit_pref_callback_font_family (ephy_settings, EPHY_PREFS_WEB_SANS_SERIF_FONT, + webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_SANS_SERIF_FONT, "sans-serif-font-family"); - webkit_pref_callback_font_family (ephy_settings, EPHY_PREFS_WEB_MONOSPACE_FONT, + webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_MONOSPACE_FONT, "monospace-font-family"); - webkit_pref_callback_font_family (ephy_settings, EPHY_PREFS_WEB_SERIF_FONT, + webkit_pref_callback_font_family (settings, EPHY_PREFS_WEB_SERIF_FONT, "serif-font-family"); } } static void -webkit_pref_callback_gnome_fonts (GSettings *ephy_settings, - char *key, - gpointer data) -{ - ephy_embed_prefs_update_font_settings (ephy_settings, key); -} - -static void webkit_pref_callback_enable_spell_checking (GSettings *settings, char *key, gpointer data) @@ -477,15 +475,6 @@ webkit_pref_callback_enable_spell_checking (GSettings *settings, } } -static void -gtk_settings_xft_dpi_changed_cb (GtkSettings *gtk_settings, - GParamSpec *pspec, - gpointer data) -{ - ephy_embed_prefs_update_font_settings (ephy_settings_get (EPHY_PREFS_WEB_SCHEMA), - EPHY_PREFS_WEB_USE_GNOME_FONTS); -} - static const PrefData webkit_pref_entries[] = { /* Epiphany font settings */ @@ -545,7 +534,6 @@ static const PrefData webkit_pref_entries[] = static gpointer ephy_embed_prefs_init (gpointer user_data) { - GtkSettings *gtk_settings; int i; webkit_settings = webkit_settings_new_with_settings ("enable-developer-extras", TRUE, @@ -572,16 +560,6 @@ ephy_embed_prefs_init (gpointer user_data) g_free (key); } - /* Connect to the "notify::gtk-xft-dpi" signal for GtkSettings, so that - * we can update the font size in real time if the screen's resolution - * for font handling changes (e.g. enabled "Large Text" a11y mode). - */ - gtk_settings = gtk_settings_get_default (); - if (gtk_settings) { - g_signal_connect (gtk_settings, "notify::gtk-xft-dpi", - G_CALLBACK (gtk_settings_xft_dpi_changed_cb), NULL); - } - g_settings_bind (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_JAVASCRIPT, webkit_settings, ENABLE_SCRIPTS_SETTING, |