cally: Use the proper role for password entries

https://bugzilla.gnome.org/show_bug.cgi?id=663332
This commit is contained in:
Matthias Clasen 2011-11-04 07:14:47 -04:00 committed by Emmanuele Bassi
parent 7b5e5b7727
commit d596401a3c

View File

@ -344,7 +344,10 @@ cally_text_real_initialize(AtkObject *obj,
_check_activate_action (cally_text, clutter_text); _check_activate_action (cally_text, clutter_text);
obj->role = ATK_ROLE_TEXT; if (clutter_text_get_password_char (clutter_text) != 0)
obj->role = ATK_ROLE_PASSWORD_TEXT;
else
obj->role = ATK_ROLE_TEXT;
} }
static const gchar * static const gchar *
@ -1091,6 +1094,13 @@ cally_text_notify_clutter (GObject *obj,
{ {
_check_activate_action (cally_text, clutter_text); _check_activate_action (cally_text, clutter_text);
} }
else if (g_strcmp0 (pspec->name, "password-char") == 0)
{
if (clutter_text_get_password_char (clutter_text) != 0)
atk_object_set_role (atk_obj, ATK_ROLE_PASSWORD_TEXT);
else
atk_object_set_role (atk_obj, ATK_ROLE_TEXT);
}
else else
{ {
CALLY_ACTOR_CLASS (cally_text_parent_class)->notify_clutter (obj, pspec); CALLY_ACTOR_CLASS (cally_text_parent_class)->notify_clutter (obj, pspec);