Only set the accesible label if it is non-empty

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=599446
This commit is contained in:
Christian Dywan 2009-10-27 00:30:54 +01:00 committed by Javier Jardón
parent d0f2cd73b0
commit 57af1cdb8c

View File

@ -916,11 +916,14 @@ gtk_tool_button_set_label (GtkToolButton *button,
button->priv->label_text = g_strdup (label);
button->priv->contents_invalid = TRUE;
if (label)
{
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");