diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-01-05 11:12:09 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-01-05 11:12:09 -0500 |
commit | 7e3f68d950c3d29bcf2e630a0ebeaec67b4f5901 (patch) | |
tree | 1ba14c9f19bf176b4e6b1d7713c3840fdbed23ee /gtk/gtkaccellabel.c | |
parent | 29cd52c8549dc1b41e29c5a2bbdad3701e751aeb (diff) | |
download | gtk+-7e3f68d950c3d29bcf2e630a0ebeaec67b4f5901.tar.gz |
GtkAccelLabel: Add a setter for manual accels
This is needed to keep the a11y keybinding code working.
Diffstat (limited to 'gtk/gtkaccellabel.c')
-rw-r--r-- | gtk/gtkaccellabel.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 0747f574e2..3dbfeb8b9b 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -981,8 +981,32 @@ gtk_accel_label_set_accel (GtkAccelLabel *accel_label, guint accelerator_key, GdkModifierType accelerator_mods) { + g_return_if_fail (GTK_IS_ACCEL_LABEL (accel_label)); + accel_label->priv->accel_key = accelerator_key; accel_label->priv->accel_mods = accelerator_mods; gtk_accel_label_reset (accel_label); } + +/** + * gtk_accel_label_get_accel: + * @accel_label: a #GtkAccelLabel + * @accelerator_key: return location for the keyval + * @accelerator_mods: return location for the modifier mask + * + * Returns the keyval and modifier mask set with + * gtk_accel_label_set_accel(). + * + * Since: 3.12 + */ +void +gtk_accel_label_get_accel (GtkAccelLabel *accel_label, + guint *accelerator_key, + GdkModifierType *accelerator_mods) +{ + g_return_if_fail (GTK_IS_ACCEL_LABEL (accel_label)); + + *accelerator_key = accel_label->priv->accel_key; + *accelerator_mods = accel_label->priv->accel_mods; +} |