[epiphany/mcatanzaro/font-cleanups: 1/2] Cleanup font preference callbacks



commit ac5e38f7c1c5a7450f206ba4f06804c5df3f677f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jun 13 14:02:11 2020 -0500

    Cleanup font preference callbacks
    
    There's a bunch of unused code here designed to prevent this function
    from doing anything if called for a non-Epiphany settings schema, but
    this never happens. Maybe in the past it was hooked up to watch for
    changes to system settings, but if so, that was probably long, long ago.
    
    Also, default font size should be 12.

 embed/ephy-embed-prefs.c | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 358bbe393..7a3be12b8 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -279,19 +279,7 @@ webkit_pref_callback_font_size (GSettings  *settings,
 {
   char *webkit_pref = data;
   char *value = NULL;
-  int size = 9; /* FIXME: What to use here? */
-
-  char *schema = NULL;
-  g_object_get (settings, "schema-id", &schema, NULL);
-
-  /* If we are changing a GNOME font value and we are not using GNOME fonts in
-   * Epiphany, return. */
-  if (g_strcmp0 (schema, EPHY_PREFS_WEB_SCHEMA) != 0 &&
-      g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_USE_GNOME_FONTS) != TRUE) {
-    g_free (schema);
-    return;
-  }
-  g_free (schema);
+  int size = 12;
 
   value = g_settings_get_string (settings, key);
 
@@ -317,18 +305,6 @@ webkit_pref_callback_font_family (GSettings  *settings,
   char *webkit_pref = data;
   char *value = NULL;
 
-  char *schema = NULL;
-  g_object_get (settings, "schema-id", &schema, NULL);
-
-  /* If we are changing a GNOME font value and we are not using GNOME fonts in
-   * Epiphany, return. */
-  if (g_strcmp0 (schema, EPHY_PREFS_WEB_SCHEMA) != 0 &&
-      g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_USE_GNOME_FONTS) != TRUE) {
-    g_free (schema);
-    return;
-  }
-  g_free (schema);
-
   value = g_settings_get_string (settings, key);
 
   if (value) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]