[gimp/metadata-browser] libgimpwidgets: don't hardcode GDK_MOD2_MASK for extended clicked
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] libgimpwidgets: don't hardcode GDK_MOD2_MASK for extended clicked
- Date: Fri, 2 Dec 2011 02:16:08 +0000 (UTC)
commit bfcd349620dc0d076ec4e623badd4cd6d5b8cacb
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 9 23:59:40 2011 +0200
libgimpwidgets: don't hardcode GDK_MOD2_MASK for extended clicked
Instead, check for all sorts of modifiers from the new
gtk_widget_get_modifier_mask(), which are always right
on the current platform.
libgimpwidgets/gimpbutton.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libgimpwidgets/gimpbutton.c b/libgimpwidgets/gimpbutton.c
index 92e9f7c..ccc8987 100644
--- a/libgimpwidgets/gimpbutton.c
+++ b/libgimpwidgets/gimpbutton.c
@@ -26,6 +26,7 @@
#include "gimpwidgetstypes.h"
#include "gimpbutton.h"
+#include "gimp3migration.h"
/**
@@ -144,7 +145,13 @@ static void
gimp_button_clicked (GtkButton *button)
{
if (GIMP_BUTTON (button)->press_state &
- (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD2_MASK))
+ (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK |
+ gtk_widget_get_modifier_mask (GTK_WIDGET (button),
+ GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR) |
+ gtk_widget_get_modifier_mask (GTK_WIDGET (button),
+ GDK_MODIFIER_INTENT_EXTEND_SELECTION) |
+ gtk_widget_get_modifier_mask (GTK_WIDGET (button),
+ GDK_MODIFIER_INTENT_MODIFY_SELECTION)))
{
g_signal_stop_emission_by_name (button, "clicked");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]