[Xfce4-commits] [apps/mousepad] 01/01: Don't show hidden GSV languages

noreply at xfce.org noreply at xfce.org
Tue Jul 7 04:50:06 CEST 2015


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit 720cf91f7b21864b4d3bb0ce18d96cfa719877ca
Author: André Miranda <andreldm1989 at gmail.com>
Date:   Mon Jul 6 19:45:06 2015 -0700

    Don't show hidden GSV languages
    
    Some like "Defaults" aren't meant to be exposed to users and can
    even cause crashes. Closes bug #12043.
---
 mousepad/mousepad-action-group.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/mousepad/mousepad-action-group.c b/mousepad/mousepad-action-group.c
index 156ebbb..71b37f2 100644
--- a/mousepad/mousepad-action-group.c
+++ b/mousepad/mousepad-action-group.c
@@ -617,6 +617,13 @@ mousepad_action_group_get_sorted_section_names (void)
       language = gtk_source_language_manager_get_language (manager, *languages);
       if (G_LIKELY (GTK_SOURCE_IS_LANGUAGE (language)))
         {
+          /* ignore hidden languages */
+          if(gtk_source_language_get_hidden(language))
+            {
+              languages++;
+              continue;
+            }
+
           /* ensure no duplicates in list */
           if (!g_slist_find_custom (list,
                                     gtk_source_language_get_section (language),
@@ -651,6 +658,13 @@ mousepad_action_group_get_sorted_languages_for_section (const gchar *section)
       language = gtk_source_language_manager_get_language (manager, *languages);
       if (G_LIKELY (GTK_SOURCE_IS_LANGUAGE (language)))
         {
+          /* ignore hidden languages */
+          if(gtk_source_language_get_hidden(language))
+            {
+              languages++;
+              continue;
+            }
+
           /* only get languages in the specified section */
           if (g_strcmp0 (gtk_source_language_get_section (language), section) == 0)
             list = g_slist_prepend (list, language);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list