[gnome-terminal] profile: editor: Only show font family and size in the font chooser



commit e5c0b4f5836141903137a7887e948b23ef66b75a
Author: Christian Persch <chpe src gnome org>
Date:   Sat Aug 8 21:57:15 2020 +0200

    profile: editor: Only show font family and size in the font chooser

 configure.ac         | 2 +-
 src/profile-editor.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/configure.ac b/configure.ac
index 6c1a2a23..5341aac9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ case "$with_gtk" in
   3.0) GTK_API_VERSION=3.0
        GTK_REQUIRED=3.22.27
        GTK_MIN_REQUIRED=3.18
-       GTK_MAX_ALLOWED=3.22
+       GTK_MAX_ALLOWED=3.24
        VTE_API_VERSION=2.91
        VTE_REQUIRED=0.61.0
        ;;
diff --git a/src/profile-editor.c b/src/profile-editor.c
index dbc8c66a..6ce73c29 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -1293,6 +1293,11 @@ profile_prefs_load (const char *uuid, GSettings *profile)
                                             terminal_exit_action_get_type, NULL);
   w = (GtkWidget*) gtk_builder_get_object (builder, "font-selector");
   gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (w), monospace_filter, NULL, NULL);
+#if GTK_CHECK_VERSION (3, 24, 0)
+  gtk_font_chooser_set_level (GTK_FONT_CHOOSER (w), GTK_FONT_CHOOSER_LEVEL_FAMILY |
+                                                    GTK_FONT_CHOOSER_LEVEL_SIZE);
+#endif
+
   profile_prefs_settings_bind (profile, TERMINAL_PROFILE_FONT_KEY,
                                w,
                                "font-name", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);


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