diff options
author | Eitan Isaacson <eitan@ascender.com> | 2009-10-06 12:28:23 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@ascender.com> | 2009-10-10 18:11:00 -0700 |
commit | 76997ab57d6af3a08507755dd654d2e71d4c39ac (patch) | |
tree | 2488a05a40f775fb279dbd6748b0b9aef1260ec5 /gtk/gtktoolbutton.c | |
parent | 59f2a62e9c2fd0377ca19326800b15a0b7962a46 (diff) | |
download | gtk+-76997ab57d6af3a08507755dd654d2e71d4c39ac.tar.gz |
Explicitly set the accessible name of GtkToolButton.
GAIL is not able to retrieve the correct button name alone, so it must be set in gtktoolbutton.c
https://bugzilla.gnome.org/show_bug.cgi?id=597596
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r-- | gtk/gtktoolbutton.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 89231ea3ac..6db835861d 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -906,6 +906,8 @@ gtk_tool_button_set_label (GtkToolButton *button, const gchar *label) { gchar *old_label; + gchar *elided_label; + AtkObject *accessible; g_return_if_fail (GTK_IS_TOOL_BUTTON (button)); @@ -914,6 +916,11 @@ gtk_tool_button_set_label (GtkToolButton *button, button->priv->label_text = g_strdup (label); button->priv->contents_invalid = TRUE; + elided_label = _gtk_toolbar_elide_underscores (label); + accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button)); + atk_object_set_name (accessible, elided_label); + + g_free (elided_label); g_free (old_label); g_object_notify (G_OBJECT (button), "label"); |