[glade/glade-3-20] Add GDK_SUPER_MASK accelerator handling



commit 619aea075f44bbb8e3f486641c33ed6a7bf7443f
Author: Sebastian Stang <sebastian.stang@chair.audio>
Date:   Wed Feb 28 09:02:16 2018 +0100

    Add GDK_SUPER_MASK accelerator handling

 plugins/gtk+/glade-accels.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gtk+/glade-accels.c b/plugins/gtk+/glade-accels.c
index 3d389ec..5e0e486 100644
--- a/plugins/gtk+/glade-accels.c
+++ b/plugins/gtk+/glade-accels.c
@@ -626,6 +626,11 @@ glade_gtk_parse_modifiers (const gchar * string)
               modifiers |= GDK_SHIFT_MASK;
               pos += 10;
             }
+          else if (!strncmp (pos, "SUPER_MASK", 10))
+            {
+              modifiers |= GDK_SUPER_MASK;
+              pos += 10;
+            }            
           else if (!strncmp (pos, "LOCK_MASK", 9))
             {
               modifiers |= GDK_LOCK_MASK;
@@ -708,6 +713,13 @@ glade_gtk_modifier_string_from_bits (GdkModifierType modifiers)
       g_string_append (string, "GDK_SHIFT_MASK");
     }
 
+  if (modifiers & GDK_SUPER_MASK)
+    {
+      if (string->len > 0)
+        g_string_append (string, " | ");
+      g_string_append (string, "GDK_SUPER_MASK");
+    }
+
   if (modifiers & GDK_LOCK_MASK)
     {
       if (string->len > 0)


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