[gtk+] widget: Set widget in accessible's constructor
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: Set widget in accessible's constructor
- Date: Mon, 19 Dec 2011 15:51:17 +0000 (UTC)
commit 0c1f2f2fc104478e680e8c2d1e077f1152996cb1
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 18 20:21:50 2011 +0100
widget: Set widget in accessible's constructor
No need to add t manually later.
gtk/a11y/gtkwidgetaccessible.c | 3 ---
gtk/gtkwidget.c | 4 +++-
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index 16b33f2..bf5adb6 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -112,13 +112,10 @@ static void
gtk_widget_accessible_initialize (AtkObject *obj,
gpointer data)
{
- GtkAccessible *accessible;
GtkWidget *widget;
widget = GTK_WIDGET (data);
- accessible = GTK_ACCESSIBLE (obj);
- gtk_accessible_set_widget (accessible, widget);
g_signal_connect_after (widget, "focus-in-event", G_CALLBACK (focus_cb), NULL);
g_signal_connect_after (widget, "focus-out-event", G_CALLBACK (focus_cb), NULL);
g_signal_connect (widget, "notify", G_CALLBACK (notify_cb), NULL);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a003cfb..9626333 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11409,7 +11409,9 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
}
else
{
- accessible = g_object_new (priv->accessible_type, NULL);
+ accessible = g_object_new (priv->accessible_type,
+ "widget", widget,
+ NULL);
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]