[gimp] app: add gimp_get_primary_accelerator_mask() to gimpwidgets-utils



commit 65066ff46b228e5c0e1c06d652a89a4f9e412261
Author: Michael Natterer <mitch gimp org>
Date:   Fri Nov 8 10:00:20 2013 +0100

    app: add gimp_get_primary_accelerator_mask() to gimpwidgets-utils

 app/widgets/gimpwidgets-utils.c |    9 +++++++++
 app/widgets/gimpwidgets-utils.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index f24a1c9..8eed9b8 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -663,6 +663,15 @@ gimp_replace_virtual_modifiers (GdkModifierType modifiers)
 }
 
 GdkModifierType
+gimp_get_primary_accelerator_mask (void)
+{
+  GdkDisplay *display = gdk_display_get_default ();
+
+  return gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+                                       GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR);
+}
+
+GdkModifierType
 gimp_get_extend_selection_mask (void)
 {
   GdkDisplay *display = gdk_display_get_default ();
diff --git a/app/widgets/gimpwidgets-utils.h b/app/widgets/gimpwidgets-utils.h
index 1929dd5..e6390be 100644
--- a/app/widgets/gimpwidgets-utils.h
+++ b/app/widgets/gimpwidgets-utils.h
@@ -59,6 +59,7 @@ gchar           * gimp_suggest_modifiers           (const gchar          *messag
                                                     const gchar          *alt_format);
 GimpChannelOps    gimp_modifiers_to_channel_op     (GdkModifierType       modifiers);
 GdkModifierType   gimp_replace_virtual_modifiers   (GdkModifierType       modifiers);
+GdkModifierType   gimp_get_primary_accelerator_mask(void);
 GdkModifierType   gimp_get_extend_selection_mask   (void);
 GdkModifierType   gimp_get_modify_selection_mask   (void);
 GdkModifierType   gimp_get_toggle_behavior_mask    (void);


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