From 72797decc12602b181f69dba7c54df7a0d1b9326 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 30 Jan 2010 14:03:19 -0500 Subject: Giant leap towards GSEAL compliance. --- widgets/table/gal-a11y-e-table-click-to-add.c | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'widgets/table/gal-a11y-e-table-click-to-add.c') diff --git a/widgets/table/gal-a11y-e-table-click-to-add.c b/widgets/table/gal-a11y-e-table-click-to-add.c index 8d788a458b..ebec8681ae 100644 --- a/widgets/table/gal-a11y-e-table-click-to-add.c +++ b/widgets/table/gal-a11y-e-table-click-to-add.c @@ -72,26 +72,30 @@ etcta_action_get_name (AtkAction *action, gint i) static gboolean idle_do_action (gpointer data) { - GdkEventButton event; + GtkLayout *layout; + GdkEventButton event; ETableClickToAdd * etcta; - gint finished; + gint finished; g_return_val_if_fail ( data!= NULL, FALSE); - etcta = E_TABLE_CLICK_TO_ADD (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (data))); + etcta = E_TABLE_CLICK_TO_ADD ( + atk_gobject_accessible_get_object ( + ATK_GOBJECT_ACCESSIBLE (data))); g_return_val_if_fail (etcta, FALSE); + layout = GTK_LAYOUT (GNOME_CANVAS_ITEM (etcta)->canvas); + event.x = 0; event.y = 0; - - event.type = GDK_BUTTON_PRESS; - event.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(etcta)->canvas)->bin_window; - event.button = 1; - event.send_event = TRUE; - event.time = GDK_CURRENT_TIME; - event.axes = NULL; - - g_signal_emit_by_name (etcta, "event", &event, &finished); + event.type = GDK_BUTTON_PRESS; + event.window = gtk_layout_get_bin_window (layout); + event.button = 1; + event.send_event = TRUE; + event.time = GDK_CURRENT_TIME; + event.axes = NULL; + + g_signal_emit_by_name (etcta, "event", &event, &finished); return FALSE; } -- cgit