[gnome-text-editor] gsettings: take use-system-font into account



commit e117a4d44b765ae2ad3246c72847ba9c049de103
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 28 18:55:37 2021 -0700

    gsettings: take use-system-font into account

 src/editor-page-gsettings.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-page-gsettings.c b/src/editor-page-gsettings.c
index 435bdb3..e3bc2e9 100644
--- a/src/editor-page-gsettings.c
+++ b/src/editor-page-gsettings.c
@@ -139,7 +139,13 @@ static gboolean
 editor_page_gsettings_get_custom_font (EditorPageSettingsProvider  *provider,
                                        gchar                      **custom_font)
 {
-  *custom_font = g_settings_get_string (EDITOR_PAGE_GSETTINGS (provider)->settings, "custom-font");
+  EditorPageGsettings *self = EDITOR_PAGE_GSETTINGS (provider);
+
+  if (!g_settings_get_boolean (self->settings, "use-system-font"))
+    *custom_font = g_settings_get_string (EDITOR_PAGE_GSETTINGS (provider)->settings, "custom-font");
+  else
+    *custom_font = NULL;
+
   return TRUE;
 }
 


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