Bug #541167. Emit "object:property-change:accessible-name" when

2008-07-02  Li Yuan  <li.yuan@sun.com>

        * gailoptionmenu.c: (gail_option_menu_real_initialize),
        (gail_option_menu_changed):
        Bug #541167. Emit "object:property-change:accessible-name" when
        GailOptionMenui's name changes.

svn path=/trunk/; revision=20728
This commit is contained in:
Li Yuan 2008-07-02 04:29:33 +00:00 committed by Li Yuan
parent 0d0f9a7fc1
commit 2b5d149c61
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-07-02 Li Yuan <li.yuan@sun.com>
* gailoptionmenu.c: (gail_option_menu_real_initialize),
(gail_option_menu_changed):
Bug #541167. Emit "object:property-change:accessible-name" when
GailOptionMenui's name changes.
2008-06-18 Michael Natterer <mitch@imendio.com>
* gailimage.c (gail_image_get_image_size)

View File

@ -53,6 +53,7 @@ static G_CONST_RETURN gchar* gail_option_menu_action_get_name (AtkAction
static gboolean gail_option_menu_set_description (AtkAction *action,
gint i,
const gchar *desc);
static void gail_option_menu_changed (GtkOptionMenu *option_menu);
G_DEFINE_TYPE_WITH_CODE (GailOptionMenu, gail_option_menu, GAIL_TYPE_BUTTON,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
@ -82,8 +83,15 @@ static void
gail_option_menu_real_initialize (AtkObject *obj,
gpointer data)
{
GtkOptionMenu *option_menu;
ATK_OBJECT_CLASS (gail_option_menu_parent_class)->initialize (obj, data);
option_menu = GTK_OPTION_MENU (data);
g_signal_connect (option_menu, "changed",
G_CALLBACK (gail_option_menu_changed), NULL);
obj->role = ATK_ROLE_COMBO_BOX;
}
@ -332,3 +340,13 @@ gail_option_menu_set_description (AtkAction *action,
else
return FALSE;
}
static void
gail_option_menu_changed (GtkOptionMenu *option_menu)
{
GailOptionMenu *gail_option_menu;
gail_option_menu = GAIL_OPTION_MENU (gtk_widget_get_accessible (GTK_WIDGET (option_menu)));
g_object_notify (G_OBJECT (gail_option_menu), "accessible-name");
}