mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
GtkAccelLabel: Add a setter for manual accels
This is needed to keep the a11y keybinding code working.
This commit is contained in:
parent
29cd52c854
commit
7e3f68d950
@ -140,6 +140,7 @@ gtk_accel_label_get_accel_widget
|
||||
gtk_accel_label_set_accel_widget
|
||||
gtk_accel_label_get_accel_width
|
||||
gtk_accel_label_set_accel
|
||||
gtk_accel_label_get_accel
|
||||
gtk_accel_label_refetch
|
||||
<SUBSECTION Standard>
|
||||
GTK_ACCEL_LABEL
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -101,6 +101,10 @@ GDK_AVAILABLE_IN_3_6
|
||||
void gtk_accel_label_set_accel (GtkAccelLabel *accel_label,
|
||||
guint accelerator_key,
|
||||
GdkModifierType accelerator_mods);
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
void gtk_accel_label_get_accel (GtkAccelLabel *accel_label,
|
||||
guint *accelerator_key,
|
||||
GdkModifierType *accelerator_mods);
|
||||
|
||||
/* private */
|
||||
gchar * _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
|
||||
|
Loading…
Reference in New Issue
Block a user