[epiphany/mcatanzaro/font-cleanups: 2/3] Cleanup font preference callbacks
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/font-cleanups: 2/3] Cleanup font preference callbacks
- Date: Sun, 14 Jun 2020 07:21:17 +0000 (UTC)
commit fceb6df9c912d5fbb04c25b3b12c443aec62d37a
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 58f6668ef..95f552813 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]