summaryrefslogtreecommitdiff
path: root/gtk/gtkaccelgroup.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-07-01 19:36:53 +0000
committerTim Janik <timj@src.gnome.org>1998-07-01 19:36:53 +0000
commit2e8e686caec9b31b5b1aa72b8a642c4b883f0f14 (patch)
treeb3cfd800fcd824157acebd0f207da567a897abc3 /gtk/gtkaccelgroup.c
parent09de6fb1d4f02cb8d968d3048c12aa5dfc79b2bb (diff)
downloadgtk+-2e8e686caec9b31b5b1aa72b8a642c4b883f0f14.tar.gz
temporary implementation of action signal "debug_msg"
Wed Jul 1 20:58:46 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.h: * gtk/gtkwidget.c: temporary implementation of action signal "debug_msg" * gtk/gtkbindings.c (gtk_binding_entry_add_signal): fixed an off-by-one error that prevented signal to entry addition for signals with parameters.
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r--gtk/gtkaccelgroup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index c8c3e908f4..9a65f07318 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -965,9 +965,9 @@ gchar*
gtk_accelerator_name (guint accelerator_key,
GdkModifierType accelerator_mods)
{
+ static const gchar text_release[] = "<Release>";
static const gchar text_shift[] = "<Shift>";
static const gchar text_control[] = "<Control>";
- static const gchar text_release[] = "<Release>";
static const gchar text_mod1[] = "<Alt>";
static const gchar text_mod2[] = "<Mod2>";
static const gchar text_mod3[] = "<Mod3>";
@@ -984,12 +984,12 @@ gtk_accelerator_name (guint accelerator_key,
keyval_name = "";
l = 0;
+ if (accelerator_mods & GDK_RELEASE_MASK)
+ l += sizeof (text_release) - 1;
if (accelerator_mods & GDK_SHIFT_MASK)
l += sizeof (text_shift) - 1;
if (accelerator_mods & GDK_CONTROL_MASK)
l += sizeof (text_control) - 1;
- if (accelerator_mods & GDK_RELEASE_MASK)
- l += sizeof (text_release) - 1;
if (accelerator_mods & GDK_MOD1_MASK)
l += sizeof (text_mod1) - 1;
if (accelerator_mods & GDK_MOD2_MASK)
@@ -1006,6 +1006,11 @@ gtk_accelerator_name (guint accelerator_key,
l = 0;
accelerator[l] = 0;
+ if (accelerator_mods & GDK_RELEASE_MASK)
+ {
+ strcpy (accelerator + l, text_release);
+ l += sizeof (text_release) - 1;
+ }
if (accelerator_mods & GDK_SHIFT_MASK)
{
strcpy (accelerator + l, text_shift);
@@ -1016,11 +1021,6 @@ gtk_accelerator_name (guint accelerator_key,
strcpy (accelerator + l, text_control);
l += sizeof (text_control) - 1;
}
- if (accelerator_mods & GDK_RELEASE_MASK)
- {
- strcpy (accelerator + l, text_release);
- l += sizeof (text_release) - 1;
- }
if (accelerator_mods & GDK_MOD1_MASK)
{
strcpy (accelerator + l, text_mod1);