[gimp/metadata-browser] app: make gimp_suggest_modifiers() work on OSX
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: make gimp_suggest_modifiers() work on OSX
- Date: Fri, 2 Dec 2011 02:12:17 +0000 (UTC)
commit fcea138704372f46b52b0690b3c3781f0fdc8b22
Author: Michael Natterer <mitch gimp org>
Date: Thu Oct 6 22:53:42 2011 +0200
app: make gimp_suggest_modifiers() work on OSX
by checking for gimp_get_toggle_behavior_mask() instead of
GDK_CONTROL_MASK. This is a total hack but happens to simply
do the right thing on all platforms.
app/widgets/gimpwidgets-utils.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 9d668da..526eab2 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -556,23 +556,29 @@ gimp_suggest_modifiers (const gchar *message,
}
else
{
- g_strlcpy (msg_buf[num_msgs], gimp_get_mod_string (GDK_SHIFT_MASK), BUF_SIZE);
+ g_strlcpy (msg_buf[num_msgs],
+ gimp_get_mod_string (GDK_SHIFT_MASK), BUF_SIZE);
try = TRUE;
}
num_msgs++;
}
- if (modifiers & GDK_CONTROL_MASK)
+ /* FIXME: using toggle_behavior_mask is such a hack. The fact that
+ * it happens to do the right thing on all platforms doesn't make it
+ * any better.
+ */
+ if (modifiers & gimp_get_toggle_behavior_mask ())
{
if (control_format && *control_format)
{
g_snprintf (msg_buf[num_msgs], BUF_SIZE, control_format,
- gimp_get_mod_string (GDK_CONTROL_MASK));
+ gimp_get_mod_string (gimp_get_toggle_behavior_mask ()));
}
else
{
- g_strlcpy (msg_buf[num_msgs], gimp_get_mod_string (GDK_CONTROL_MASK), BUF_SIZE);
+ g_strlcpy (msg_buf[num_msgs],
+ gimp_get_mod_string (gimp_get_toggle_behavior_mask ()), BUF_SIZE);
try = TRUE;
}
@@ -588,7 +594,8 @@ gimp_suggest_modifiers (const gchar *message,
}
else
{
- g_strlcpy (msg_buf[num_msgs], gimp_get_mod_string (GDK_MOD1_MASK), BUF_SIZE);
+ g_strlcpy (msg_buf[num_msgs],
+ gimp_get_mod_string (GDK_MOD1_MASK), BUF_SIZE);
try = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]