[gnome-text-editor] languagedialog: fix filtering of hidden syntaxes



commit a5007eaa4eb73b01b3f7a7ed1968b491f14cd3d8
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 6 16:01:05 2021 -0800

    languagedialog: fix filtering of hidden syntaxes

 src/editor-language-dialog.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/editor-language-dialog.c b/src/editor-language-dialog.c
index f0a6571..40e730a 100644
--- a/src/editor-language-dialog.c
+++ b/src/editor-language-dialog.c
@@ -209,13 +209,10 @@ editor_language_dialog_constructed (GObject *object)
   for (guint i = 0; ids[i]; i++)
     {
       const gchar *id = ids[i];
-      GtkSourceLanguage *language;
+      GtkSourceLanguage *language = gtk_source_language_manager_get_language (lm, id);
 
-      if (strcmp (id, "def") == 0)
-        continue;
-
-      language = gtk_source_language_manager_get_language (lm, id);
-      g_list_store_append (store, language);
+      if (!gtk_source_language_get_hidden (language))
+        g_list_store_append (store, language);
     }
 
   gtk_list_box_bind_model (self->list_box,


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