diff options
author | Michael Natterer <mitch@lanedo.com> | 2011-10-07 20:58:58 +0200 |
---|---|---|
committer | Michael Natterer <mitch@gimp.org> | 2011-10-07 20:58:58 +0200 |
commit | 5327034c31e2236d01f18cc678d7da6de9bd22b5 (patch) | |
tree | addfed36dcbb4307bd124fa59d65bcc14c876777 /gtk/gtkaccelgroup.c | |
parent | 5b74ee38e87c60e32de2053eec48dd3f67655a46 (diff) | |
download | gtk+-5327034c31e2236d01f18cc678d7da6de9bd22b5.tar.gz |
gtk: remove the private GTK_DEFAULT_ACCEL_MOD_MASK define
and finish the port to using the new modifier abstraction API.
This commit has some evilness, it uses the default display for
the lack of a widget context, and the change to gtkstock.c
is very ugly, but I can't think of anything better given
GtkStockItem needs an accel mask instead of a proper accel
string.
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r-- | gtk/gtkaccelgroup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index b134aa1a72..929cb038ee 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -1219,7 +1219,7 @@ gtk_accelerator_parse (const gchar *accelerator, { accelerator += 9; len -= 9; - mods |= GTK_DEFAULT_ACCEL_MOD_MASK; + mods |= _gtk_get_primary_accel_mod (); } else if (len >= 9 && is_control (accelerator)) { @@ -1360,10 +1360,10 @@ gtk_accelerator_name (guint accelerator_key, l = 0; if (accelerator_mods & GDK_RELEASE_MASK) l += sizeof (text_release) - 1; - if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK) + if (accelerator_mods & _gtk_get_primary_accel_mod ()) { l += sizeof (text_primary) - 1; - accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK; /* consume the default accel */ + accelerator_mods &= ~_gtk_get_primary_accel_mod (); /* consume the default accel */ } if (accelerator_mods & GDK_SHIFT_MASK) l += sizeof (text_shift) - 1; @@ -1397,11 +1397,11 @@ gtk_accelerator_name (guint accelerator_key, strcpy (accelerator + l, text_release); l += sizeof (text_release) - 1; } - if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK) + if (accelerator_mods & _gtk_get_primary_accel_mod ()) { strcpy (accelerator + l, text_primary); l += sizeof (text_primary) - 1; - accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK; /* consume the default accel */ + accelerator_mods &= ~_gtk_get_primary_accel_mod (); /* consume the default accel */ } if (accelerator_mods & GDK_SHIFT_MASK) { |