diff options
author | Benjamin Otte <otte@redhat.com> | 2012-07-09 03:11:01 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-07-09 03:12:13 +0200 |
commit | b900016a05b9bdb3736fe79ce8413b6e5ba2efa3 (patch) | |
tree | 01749d89d36f3116a88c2b9759575c1f7a626d7e /gtk/gtklockbutton.c | |
parent | 58cf6dfaaf3f7c6360881709b2cdf995c6666dc6 (diff) | |
download | gtk+-b900016a05b9bdb3736fe79ce8413b6e5ba2efa3.tar.gz |
a11y: Make lockbutton notify about state changes
In particular, ensure that the name of the lockbutton gets updated as
the displayed text of the lockbutton changes.
https://bugzilla.gnome.org/show_bug.cgi?id=677347
Diffstat (limited to 'gtk/gtklockbutton.c')
-rw-r--r-- | gtk/gtklockbutton.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c index 9cb828b843..6121adef23 100644 --- a/gtk/gtklockbutton.c +++ b/gtk/gtklockbutton.c @@ -185,10 +185,12 @@ gtk_lock_button_set_property (GObject *object, case PROP_TEXT_LOCK: gtk_label_set_text (GTK_LABEL (priv->label_lock), g_value_get_string (value)); + _gtk_lock_button_accessible_name_changed (button); break; case PROP_TEXT_UNLOCK: gtk_label_set_text (GTK_LABEL (priv->label_unlock), g_value_get_string (value)); + _gtk_lock_button_accessible_name_changed (button); break; case PROP_TOOLTIP_LOCK: @@ -388,8 +390,12 @@ update_state (GtkLockButton *button) } gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon, GTK_ICON_SIZE_MENU); - gtk_widget_set_visible (priv->label_lock, allowed); - gtk_widget_set_visible (priv->label_unlock, !allowed); + if (gtk_widget_get_visible (priv->label_lock) != allowed) + { + gtk_widget_set_visible (priv->label_lock, allowed); + gtk_widget_set_visible (priv->label_unlock, !allowed); + _gtk_lock_button_accessible_name_changed (button); + } gtk_widget_set_tooltip_markup (GTK_WIDGET (button), tooltip); gtk_widget_set_sensitive (GTK_WIDGET (button), sensitive); gtk_widget_set_visible (GTK_WIDGET (button), visible); |