File evolution-bsc930240-a11y-3-12-fixes.patch of Package evolution

From 03ca50dbe3809c7321ab7038b0d62788552d501d Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com>
Date: Wed, 12 Mar 2014 17:22:54 +0100
Subject: [PATCH] Bug #722938 - Adapt a11y code for newest gtk

As of gtk+ 3.2, AtkObjectFactories are no longer used to generate
accessibles for gtk widgets, so our custom atk classes need refactoring.

This is a backport to 3.10 of the original patch and also includes
fixes for some problems fetching accessible children (bgo#738463)..
---
diff -ur evolution-3.10.4.orig/calendar/gui/ea-calendar.c evolution-3.10.4/calendar/gui/ea-calendar.c
--- evolution-3.10.4.orig/calendar/gui/ea-calendar.c	2013-12-07 08:15:08.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-calendar.c	2015-05-08 15:49:49.847067189 -0500
@@ -37,12 +37,9 @@
 #include "calendar/gui/ea-week-view-main-item.h"
 #include "calendar/gui/ea-gnome-calendar.h"
 
-EA_FACTORY (EA_TYPE_CAL_VIEW, ea_cal_view, ea_cal_view_new)
-EA_FACTORY (EA_TYPE_DAY_VIEW, ea_day_view, ea_day_view_new)
 EA_FACTORY_GOBJECT (
 	EA_TYPE_DAY_VIEW_MAIN_ITEM,
 	ea_day_view_main_item, ea_day_view_main_item_new)
-EA_FACTORY (EA_TYPE_WEEK_VIEW, ea_week_view, ea_week_view_new)
 EA_FACTORY_GOBJECT (
 	EA_TYPE_WEEK_VIEW_MAIN_ITEM,
 	ea_week_view_main_item, ea_week_view_main_item_new)
@@ -108,30 +105,12 @@
 }
 
 void
-e_cal_view_a11y_init (void)
-{
-	EA_SET_FACTORY (e_calendar_view_get_type (), ea_cal_view);
-}
-
-void
-e_day_view_a11y_init (void)
-{
-	EA_SET_FACTORY (e_day_view_get_type (), ea_day_view);
-}
-
-void
 e_day_view_main_item_a11y_init (void)
 {
 	EA_SET_FACTORY (e_day_view_main_item_get_type (), ea_day_view_main_item);
 }
 
 void
-e_week_view_a11y_init (void)
-{
-	EA_SET_FACTORY (E_TYPE_WEEK_VIEW, ea_week_view);
-}
-
-void
 e_week_view_main_item_a11y_init (void)
 {
 	EA_SET_FACTORY (e_week_view_main_item_get_type (), ea_week_view_main_item);
diff -ur evolution-3.10.4.orig/calendar/gui/ea-calendar.h evolution-3.10.4/calendar/gui/ea-calendar.h
--- evolution-3.10.4.orig/calendar/gui/ea-calendar.h	2013-12-07 08:15:13.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-calendar.h	2015-05-08 15:49:49.848067189 -0500
@@ -28,10 +28,7 @@
 #define _EA_CALENDAR_H__
 
 void gnome_calendar_a11y_init (void);
-void e_cal_view_a11y_init (void);
-void e_day_view_a11y_init (void);
 void e_day_view_main_item_a11y_init (void);
-void e_week_view_a11y_init (void);
 void e_week_view_main_item_a11y_init (void);
 
 #endif /* _EA_CALENDAR_H__ */
diff -ur evolution-3.10.4.orig/calendar/gui/ea-calendar-helpers.c evolution-3.10.4/calendar/gui/ea-calendar-helpers.c
--- evolution-3.10.4.orig/calendar/gui/ea-calendar-helpers.c	2013-12-07 08:15:05.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-calendar-helpers.c	2015-05-08 15:49:49.881067187 -0500
@@ -90,6 +90,10 @@
 	/* parent of canvas_item->canvas is the EDayView or EWeekView widget */
 	canvas = canvas_item->canvas;
 	view_widget = gtk_widget_get_parent (GTK_WIDGET (canvas));
+
+	if (view_widget && GTK_IS_BOX (view_widget))
+		view_widget = gtk_widget_get_parent (view_widget);
+
 	if (!view_widget || !E_IS_CALENDAR_VIEW (view_widget))
 		return NULL;
 
diff -ur evolution-3.10.4.orig/calendar/gui/ea-cal-view.c evolution-3.10.4/calendar/gui/ea-cal-view.c
--- evolution-3.10.4.orig/calendar/gui/ea-cal-view.c	2013-12-07 08:15:06.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-cal-view.c	2015-05-08 15:49:49.848067189 -0500
@@ -31,8 +31,6 @@
 #include "dialogs/goto-dialog.h"
 #include <glib/gi18n.h>
 
-static void ea_cal_view_class_init (EaCalViewClass *klass);
-
 static AtkObject * ea_cal_view_get_parent (AtkObject *accessible);
 static void ea_cal_view_real_initialize (AtkObject *accessible, gpointer data);
 
@@ -64,57 +62,13 @@
 
 static gpointer parent_class = NULL;
 
-GType
-ea_cal_view_get_type (void)
-{
-	static GType type = 0;
-	AtkObjectFactory *factory;
-	GTypeQuery query;
-	GType derived_atk_type;
-
-	if (!type) {
-		static GTypeInfo tinfo = {
-			sizeof (EaCalViewClass),
-			(GBaseInitFunc) NULL, /* base init */
-			(GBaseFinalizeFunc) NULL, /* base finalize */
-			(GClassInitFunc) ea_cal_view_class_init, /* class init */
-			(GClassFinalizeFunc) NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EaCalView), /* instance size */
-			0, /* nb preallocs */
-			(GInstanceInitFunc) NULL, /* instance init */
-			NULL /* value table */
-		};
-
-		static const GInterfaceInfo atk_action_info = {
-			(GInterfaceInitFunc) atk_action_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		/*
-		 * Figure out the size of the class and instance
-		 * we are run-time deriving from (GailWidget, in this case)
-		 */
-
-		factory = atk_registry_get_factory (
-			atk_get_default_registry (),
-			GTK_TYPE_WIDGET);
-		derived_atk_type = atk_object_factory_get_accessible_type (factory);
-		g_type_query (derived_atk_type, &query);
-
-		tinfo.class_size = query.class_size;
-		tinfo.instance_size = query.instance_size;
-
-		type = g_type_register_static (
-			derived_atk_type,
-			"EaCalView", &tinfo, 0);
-		g_type_add_interface_static (
-			type, ATK_TYPE_ACTION,
-			&atk_action_info);
-	}
+G_DEFINE_TYPE_WITH_CODE (EaCalView, ea_cal_view, GTK_TYPE_CONTAINER_ACCESSIBLE,
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_ACTION, atk_action_interface_init))
 
-	return type;
+static void
+ea_cal_view_init (EaCalView *view)
+{
 }
 
 static void
@@ -196,7 +150,11 @@
 
 	cal_view = E_CALENDAR_VIEW (widget);
 
-	return gtk_widget_get_accessible (gtk_widget_get_parent (GTK_WIDGET (cal_view)));
+	widget = gtk_widget_get_parent (GTK_WIDGET (cal_view));
+	if (!widget)
+		return NULL;
+
+	return gtk_widget_get_accessible (widget);
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/ea-cal-view.h evolution-3.10.4/calendar/gui/ea-cal-view.h
--- evolution-3.10.4.orig/calendar/gui/ea-cal-view.h	2013-12-07 08:15:06.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-cal-view.h	2015-05-08 15:49:49.849067189 -0500
@@ -26,6 +26,7 @@
 
 #include <gtk/gtk.h>
 #include "e-calendar-view.h"
+#include "gtk/gtk-a11y.h"
 
 G_BEGIN_DECLS
 
@@ -41,14 +42,14 @@
 
 struct _EaCalView
 {
-	GtkAccessible parent;
+	GtkContainerAccessible parent;
 };
 
 GType ea_cal_view_get_type (void);
 
 struct _EaCalViewClass
 {
-	GtkAccessibleClass parent_class;
+	GtkContainerAccessibleClass parent_class;
 };
 
 AtkObject * ea_cal_view_new (GtkWidget *widget);
diff -ur evolution-3.10.4.orig/calendar/gui/ea-day-view.c evolution-3.10.4/calendar/gui/ea-day-view.c
--- evolution-3.10.4.orig/calendar/gui/ea-day-view.c	2013-12-07 08:15:02.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-day-view.c	2015-05-08 15:49:49.849067189 -0500
@@ -31,8 +31,6 @@
 #include "ea-gnome-calendar.h"
 #include <glib/gi18n.h>
 
-static void ea_day_view_class_init (EaDayViewClass *klass);
-
 static const gchar * ea_day_view_get_name (AtkObject *accessible);
 static const gchar * ea_day_view_get_description (AtkObject *accessible);
 static gint         ea_day_view_get_n_children      (AtkObject *obj);
@@ -40,51 +38,11 @@
                                                      gint i);
 static gpointer parent_class = NULL;
 
-GType
-ea_day_view_get_type (void)
-{
-	static GType type = 0;
-	AtkObjectFactory *factory;
-	GTypeQuery query;
-	GType derived_atk_type;
-
-	if (!type) {
-		static GTypeInfo tinfo = {
-			sizeof (EaDayViewClass),
-			(GBaseInitFunc) NULL, /* base init */
-			(GBaseFinalizeFunc) NULL, /* base finalize */
-			(GClassInitFunc) ea_day_view_class_init, /* class init */
-			(GClassFinalizeFunc) NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EaDayView), /* instance size */
-			0, /* nb preallocs */
-			(GInstanceInitFunc) NULL, /* instance init */
-			NULL /* value table */
-		};
-
-		/*
-		 * Figure out the size of the class and instance
-		 * we are run-time deriving from (EaCalView, in this case)
-		 *
-		 * Note: we must still use run-time deriving here, because
-		 * our parent class EaCalView is run-time deriving.
-		 */
-
-		factory = atk_registry_get_factory (
-			atk_get_default_registry (),
-			e_calendar_view_get_type ());
-		derived_atk_type = atk_object_factory_get_accessible_type (factory);
-		g_type_query (derived_atk_type, &query);
+G_DEFINE_TYPE (EaDayView, ea_day_view, EA_TYPE_CAL_VIEW)
 
-		tinfo.class_size = query.class_size;
-		tinfo.instance_size = query.instance_size;
-
-		type = g_type_register_static (
-			derived_atk_type,
-			"EaDayView", &tinfo, 0);
-	}
-
-	return type;
+static void
+ea_day_view_init (EaDayView *view)
+{
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/ea-day-view-main-item.c evolution-3.10.4/calendar/gui/ea-day-view-main-item.c
--- evolution-3.10.4.orig/calendar/gui/ea-day-view-main-item.c	2013-12-07 08:15:02.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-day-view-main-item.c	2015-05-08 15:49:49.850067189 -0500
@@ -33,8 +33,6 @@
 #include "ea-day-view-cell.h"
 
 /* EaDayViewMainItem */
-static void	ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass);
-
 static void	ea_day_view_main_item_finalize	(GObject *object);
 static const gchar *
 		ea_day_view_main_item_get_name	(AtkObject *accessible);
@@ -155,75 +153,17 @@
 
 static gpointer parent_class = NULL;
 
-GType
-ea_day_view_main_item_get_type (void)
-{
-	static GType type = 0;
-	AtkObjectFactory *factory;
-	GTypeQuery query;
-	GType derived_atk_type;
-
-	if (!type) {
-		static GTypeInfo tinfo = {
-			sizeof (EaDayViewMainItemClass),
-			(GBaseInitFunc) NULL, /* base init */
-			(GBaseFinalizeFunc) NULL, /* base finalize */
-			(GClassInitFunc) ea_day_view_main_item_class_init,
-			(GClassFinalizeFunc) NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EaDayViewMainItem), /* instance size */
-			0, /* nb preallocs */
-			(GInstanceInitFunc) NULL, /* instance init */
-			NULL /* value table */
-		};
-
-		static const GInterfaceInfo atk_component_info = {
-			(GInterfaceInitFunc) atk_component_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		static const GInterfaceInfo atk_table_info = {
-			(GInterfaceInitFunc) atk_table_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-		static const GInterfaceInfo atk_selection_info = {
-			(GInterfaceInitFunc) atk_selection_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		/*
-		 * Figure out the size of the class and instance
-		 * we are run-time deriving from (GailCanvasItem, in this case)
-		 *
-		 */
-
-		factory = atk_registry_get_factory (
-			atk_get_default_registry (),
-			e_day_view_main_item_get_type ());
-		derived_atk_type = atk_object_factory_get_accessible_type (factory);
-		g_type_query (derived_atk_type, &query);
-
-		tinfo.class_size = query.class_size;
-		tinfo.instance_size = query.instance_size;
-
-		type = g_type_register_static (
-			derived_atk_type,
-			"EaDayViewMainItem", &tinfo, 0);
-		g_type_add_interface_static (
-			type, ATK_TYPE_COMPONENT,
-			&atk_component_info);
-		g_type_add_interface_static (
-			type, ATK_TYPE_TABLE,
-			&atk_table_info);
-		g_type_add_interface_static (
-			type, ATK_TYPE_SELECTION,
-			&atk_selection_info);
-	}
+G_DEFINE_TYPE_WITH_CODE (EaDayViewMainItem, ea_day_view_main_item, GAIL_TYPE_CANVAS_ITEM,
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_COMPONENT, atk_component_interface_init)
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_SELECTION, atk_selection_interface_init)
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_TABLE, atk_table_interface_init))
 
-	return type;
+static void
+ea_day_view_main_item_init (EaDayViewMainItem *item)
+{
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/ea-day-view-main-item.h evolution-3.10.4/calendar/gui/ea-day-view-main-item.h
--- evolution-3.10.4.orig/calendar/gui/ea-day-view-main-item.h	2013-12-07 08:15:05.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-day-view-main-item.h	2015-05-08 15:49:49.851067189 -0500
@@ -26,6 +26,7 @@
 
 #include <atk/atkgobjectaccessible.h>
 #include "e-day-view-main-item.h"
+#include <libgnomecanvas/gailcanvasitem.h>
 
 G_BEGIN_DECLS
 
@@ -41,14 +42,14 @@
 
 struct _EaDayViewMainItem
 {
-	AtkGObjectAccessible parent;
+	GailCanvasItem parent;
 };
 
 GType ea_day_view_main_item_get_type (void);
 
 struct _EaDayViewMainItemClass
 {
-	AtkGObjectAccessibleClass parent_class;
+	GailCanvasItemClass parent_class;
 };
 
 AtkObject *     ea_day_view_main_item_new         (GObject *obj);
diff -ur evolution-3.10.4.orig/calendar/gui/ea-week-view.c evolution-3.10.4/calendar/gui/ea-week-view.c
--- evolution-3.10.4.orig/calendar/gui/ea-week-view.c	2013-12-07 08:15:03.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-week-view.c	2015-05-08 15:49:49.852067189 -0500
@@ -32,8 +32,6 @@
 #include "ea-calendar-helpers.h"
 #include "ea-gnome-calendar.h"
 
-static void ea_week_view_class_init (EaWeekViewClass *klass);
-
 static const gchar * ea_week_view_get_name (AtkObject *accessible);
 static const gchar * ea_week_view_get_description (AtkObject *accessible);
 static gint         ea_week_view_get_n_children      (AtkObject *obj);
@@ -42,52 +40,11 @@
 
 static gpointer parent_class = NULL;
 
-GType
-ea_week_view_get_type (void)
-{
-	static GType type = 0;
-	AtkObjectFactory *factory;
-	GTypeQuery query;
-	GType derived_atk_type;
-
-	if (!type) {
-		static GTypeInfo tinfo = {
-			sizeof (EaWeekViewClass),
-			(GBaseInitFunc) NULL, /* base init */
-			(GBaseFinalizeFunc) NULL, /* base finalize */
-			(GClassInitFunc) ea_week_view_class_init, /* class init */
-			(GClassFinalizeFunc) NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EaWeekView), /* instance size */
-			0, /* nb preallocs */
-			(GInstanceInitFunc) NULL, /* instance init */
-			NULL /* value table */
-		};
-
-		/*
-		 * Figure out the size of the class and instance
-		 * we are run-time deriving from (EaCalView, in this case)
-		 *
-		 * Note: we must still use run-time deriving here, because
-		 * our parent class EaCalView is run-time deriving.
-		 */
-
-		factory = atk_registry_get_factory (
-			atk_get_default_registry (),
-			e_calendar_view_get_type ());
-		derived_atk_type = atk_object_factory_get_accessible_type (factory);
-		g_type_query (derived_atk_type, &query);
+G_DEFINE_TYPE (EaWeekView, ea_week_view, EA_TYPE_CAL_VIEW)
 
-		tinfo.class_size = query.class_size;
-		tinfo.instance_size = query.instance_size;
-
-		type = g_type_register_static (
-			derived_atk_type,
-			"EaWeekView", &tinfo, 0);
-
-	}
-
-	return type;
+static void
+ea_week_view_init (EaWeekView *view)
+{
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/ea-week-view-main-item.c evolution-3.10.4/calendar/gui/ea-week-view-main-item.c
--- evolution-3.10.4.orig/calendar/gui/ea-week-view-main-item.c	2013-12-07 08:15:07.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-week-view-main-item.c	2015-05-08 15:49:49.853067189 -0500
@@ -33,8 +33,6 @@
 #include "ea-week-view-cell.h"
 
 /* EaWeekViewMainItem */
-static void	ea_week_view_main_item_class_init
-						(EaWeekViewMainItemClass *class);
 static void	ea_week_view_main_item_finalize	(GObject *object);
 static const gchar *
 		ea_week_view_main_item_get_name	(AtkObject *accessible);
@@ -185,75 +183,17 @@
 
 static gpointer parent_class = NULL;
 
-GType
-ea_week_view_main_item_get_type (void)
-{
-	static GType type = 0;
-	AtkObjectFactory *factory;
-	GTypeQuery query;
-	GType derived_atk_type;
-
-	if (!type) {
-		static GTypeInfo tinfo = {
-			sizeof (EaWeekViewMainItemClass),
-			(GBaseInitFunc) NULL, /* base init */
-			(GBaseFinalizeFunc) NULL, /* base finalize */
-			(GClassInitFunc) ea_week_view_main_item_class_init,
-			(GClassFinalizeFunc) NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EaWeekViewMainItem), /* instance size */
-			0, /* nb preallocs */
-			(GInstanceInitFunc) NULL, /* instance init */
-			NULL /* value table */
-		};
-
-		static const GInterfaceInfo atk_component_info = {
-			(GInterfaceInitFunc) atk_component_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		static const GInterfaceInfo atk_table_info = {
-			(GInterfaceInitFunc) atk_table_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-		static const GInterfaceInfo atk_selection_info = {
-			(GInterfaceInitFunc) atk_selection_interface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		/*
-		 * Figure out the size of the class and instance
-		 * we are run-time deriving from (GailCanvasItem, in this case)
-		 *
-		 */
-
-		factory = atk_registry_get_factory (
-			atk_get_default_registry (),
-			e_week_view_main_item_get_type ());
-		derived_atk_type = atk_object_factory_get_accessible_type (factory);
-		g_type_query (derived_atk_type, &query);
-
-		tinfo.class_size = query.class_size;
-		tinfo.instance_size = query.instance_size;
-
-		type = g_type_register_static (
-			derived_atk_type,
-			"EaWeekViewMainItem", &tinfo, 0);
-		g_type_add_interface_static (
-			type, ATK_TYPE_COMPONENT,
-			&atk_component_info);
-		g_type_add_interface_static (
-			type, ATK_TYPE_TABLE,
-			&atk_table_info);
-		g_type_add_interface_static (
-			type, ATK_TYPE_SELECTION,
-			&atk_selection_info);
-	}
+G_DEFINE_TYPE_WITH_CODE (EaWeekViewMainItem, ea_week_view_main_item, GAIL_TYPE_CANVAS_ITEM,
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_COMPONENT, atk_component_interface_init)
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_SELECTION, atk_selection_interface_init)
+	G_IMPLEMENT_INTERFACE (
+		ATK_TYPE_TABLE, atk_table_interface_init))
 
-	return type;
+static void
+ea_week_view_main_item_init (EaWeekViewMainItem *item)
+{
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/ea-week-view-main-item.h evolution-3.10.4/calendar/gui/ea-week-view-main-item.h
--- evolution-3.10.4.orig/calendar/gui/ea-week-view-main-item.h	2013-12-07 08:15:06.000000000 -0600
+++ evolution-3.10.4/calendar/gui/ea-week-view-main-item.h	2015-05-08 15:49:49.854067189 -0500
@@ -27,6 +27,7 @@
 
 #include <atk/atkgobjectaccessible.h>
 #include "e-week-view-main-item.h"
+#include <libgnomecanvas/gailcanvasitem.h>
 
 G_BEGIN_DECLS
 
@@ -42,14 +43,14 @@
 
 struct _EaWeekViewMainItem
 {
-	AtkGObjectAccessible parent;
+	GailCanvasItem parent;
 };
 
 GType ea_week_view_main_item_get_type (void);
 
 struct _EaWeekViewMainItemClass
 {
-	AtkGObjectAccessibleClass parent_class;
+	GailCanvasItemClass parent_class;
 };
 
 AtkObject *     ea_week_view_main_item_new         (GObject *obj);
diff -ur evolution-3.10.4.orig/calendar/gui/e-calendar-view.c evolution-3.10.4/calendar/gui/e-calendar-view.c
--- evolution-3.10.4.orig/calendar/gui/e-calendar-view.c	2013-12-07 08:15:08.000000000 -0600
+++ evolution-3.10.4/calendar/gui/e-calendar-view.c	2015-05-08 15:49:49.855067189 -0500
@@ -38,6 +38,7 @@
 #include "ea-calendar.h"
 #include "e-cal-model-calendar.h"
 #include "e-calendar-view.h"
+#include "ea-cal-view.h"
 #include "itip-utils.h"
 #include "dialogs/comp-editor-util.h"
 #include "dialogs/delete-comp.h"
@@ -362,6 +363,8 @@
 		g_object_unref (keyboard);
 	}
 
+	g_clear_object (&priv->calendar);
+
 	/* Chain up to parent's dispose() method. */
 	G_OBJECT_CLASS (e_calendar_view_parent_class)->dispose (object);
 }
@@ -858,6 +861,7 @@
 e_calendar_view_class_init (ECalendarViewClass *class)
 {
 	GObjectClass *object_class;
+	GtkWidgetClass *widget_class;
 	GtkBindingSet *binding_set;
 
 	g_type_class_add_private (class, sizeof (ECalendarViewPrivate));
@@ -1013,7 +1017,8 @@
 		binding_set, GDK_KEY_o, GDK_CONTROL_MASK, "open-event", 0);
 
 	/* init the accessibility support for e_day_view */
-	e_cal_view_a11y_init ();
+	widget_class = GTK_WIDGET_CLASS (class);
+	gtk_widget_class_set_accessible_type (widget_class, EA_TYPE_CAL_VIEW);
 }
 
 static void
@@ -1214,6 +1219,12 @@
 {
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
+	if (calendar)
+		g_object_ref (calendar);
+
+	if (cal_view->priv->calendar)
+		g_object_unref (cal_view->priv->calendar);
+
 	cal_view->priv->calendar = calendar;
 }
 
diff -ur evolution-3.10.4.orig/calendar/gui/e-day-view.c evolution-3.10.4/calendar/gui/e-day-view.c
--- evolution-3.10.4.orig/calendar/gui/e-day-view.c	2014-02-09 20:05:52.000000000 -0600
+++ evolution-3.10.4/calendar/gui/e-day-view.c	2015-05-08 15:49:49.857067189 -0500
@@ -55,6 +55,7 @@
 #include "itip-utils.h"
 #include "misc.h"
 #include "print.h"
+#include "ea-day-view.h"
 
 #define E_DAY_VIEW_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -1891,7 +1892,7 @@
 		"is-editing");
 
 	/* init the accessibility support for e_day_view */
-	e_day_view_a11y_init ();
+	gtk_widget_class_set_accessible_type (widget_class, EA_TYPE_DAY_VIEW);
 }
 
 static void
diff -ur evolution-3.10.4.orig/calendar/gui/e-week-view.c evolution-3.10.4/calendar/gui/e-week-view.c
--- evolution-3.10.4.orig/calendar/gui/e-week-view.c	2014-02-09 20:05:52.000000000 -0600
+++ evolution-3.10.4/calendar/gui/e-week-view.c	2015-05-08 15:49:49.860067189 -0500
@@ -55,6 +55,7 @@
 #include "itip-utils.h"
 #include "misc.h"
 #include "print.h"
+#include "ea-week-view.h"
 
 /* Images */
 #include "art/jump.xpm"
@@ -1490,7 +1491,7 @@
 		"is-editing");
 
 	/* init the accessibility support for e_week_view */
-	e_week_view_a11y_init ();
+	gtk_widget_class_set_accessible_type (widget_class, EA_TYPE_WEEK_VIEW);
 }
 
 static void
diff -ur evolution-3.10.4.orig/configure evolution-3.10.4/configure
--- evolution-3.10.4.orig/configure	2014-02-09 20:22:04.000000000 -0600
+++ evolution-3.10.4/configure	2015-05-08 15:49:49.866067188 -0500
@@ -14758,8 +14758,8 @@
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14769,8 +14769,8 @@
   ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14783,8 +14783,8 @@
   pkg_cv_GNOME_PLATFORM_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14805,8 +14805,8 @@
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14816,8 +14816,8 @@
   ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14830,8 +14830,8 @@
   pkg_cv_GNOME_PLATFORM_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14861,8 +14861,8 @@
 	        GNOME_PLATFORM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14873,8 +14873,8 @@
 	        GNOME_PLATFORM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
@@ -14888,8 +14888,8 @@
 	as_fn_error $? "Package requirements (gio-2.0 >= 2.34.0
 	 gmodule-2.0 >= 2.34.0
 	 cairo-gobject
-	 gtk+-3.0 >= 3.4.0
-	 gail-3.0 >= 3.4.0
+	 gtk+-3.0 >= 3.8.0
+	 gail-3.0 >= 3.8.0
 	 gdk-pixbuf-2.0 >= 2.24.0
 	 libxml-2.0 >= 2.7.3
 	 shared-mime-info >= 0.22
diff -ur evolution-3.10.4.orig/configure.ac evolution-3.10.4/configure.ac
--- evolution-3.10.4.orig/configure.ac	2013-12-18 07:41:33.000000000 -0600
+++ evolution-3.10.4/configure.ac	2015-05-08 15:49:49.869067188 -0500
@@ -37,7 +37,7 @@
 m4_define([glib_encoded_version], [GLIB_VERSION_2_34])
 
 dnl Keep these two definitions in agreement.
-m4_define([gdk_minimum_version], [3.4.0])
+m4_define([gdk_minimum_version], [3.8.0])
 m4_define([gdk_encoded_version], [GDK_VERSION_3_4])
 
 dnl Keep these two definitions in agreement.
diff -ur evolution-3.10.4.orig/e-util/ea-calendar-cell.c evolution-3.10.4/e-util/ea-calendar-cell.c
--- evolution-3.10.4.orig/e-util/ea-calendar-cell.c	2013-12-07 08:14:51.000000000 -0600
+++ evolution-3.10.4/e-util/ea-calendar-cell.c	2015-05-08 15:49:49.870067188 -0500
@@ -183,6 +183,7 @@
 	atk_state_set_add_state (a11y->state_set, ATK_STATE_SENSITIVE);
 	atk_state_set_add_state (a11y->state_set, ATK_STATE_SELECTABLE);
 	atk_state_set_add_state (a11y->state_set, ATK_STATE_SHOWING);
+	atk_state_set_add_state (a11y->state_set, ATK_STATE_VISIBLE);
 	atk_state_set_add_state (a11y->state_set, ATK_STATE_FOCUSABLE);
 }
 
diff -ur evolution-3.10.4.orig/e-util/e-table.c evolution-3.10.4/e-util/e-table.c
--- evolution-3.10.4.orig/e-util/e-table.c	2013-12-07 08:14:32.000000000 -0600
+++ evolution-3.10.4/e-util/e-table.c	2015-05-08 15:49:49.871067188 -0500
@@ -3468,7 +3468,8 @@
 	g_object_class_override_property (
 		object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
 
-	gal_a11y_e_table_init ();
+	gtk_widget_class_set_accessible_type (widget_class,
+		GAL_A11Y_TYPE_E_TABLE);
 }
 
 void
diff -ur evolution-3.10.4.orig/e-util/e-tree.c evolution-3.10.4/e-util/e-tree.c
--- evolution-3.10.4.orig/e-util/e-tree.c	2013-12-07 08:14:49.000000000 -0600
+++ evolution-3.10.4/e-util/e-tree.c	2015-05-08 15:49:49.873067188 -0500
@@ -3145,7 +3145,8 @@
 	g_object_class_override_property (
 		object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
 
-	gal_a11y_e_tree_init ();
+	gtk_widget_class_set_accessible_type (widget_class,
+		GAL_A11Y_TYPE_E_TREE);
 }
 
 static void
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table.c evolution-3.10.4/e-util/gal-a11y-e-table.c
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table.c	2013-12-07 08:14:28.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table.c	2015-05-08 15:49:49.883067187 -0500
@@ -36,16 +36,16 @@
 #include "gal-a11y-util.h"
 
 #define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableClass))
-static AtkObjectClass *parent_class;
-static GType parent_type;
-static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETablePrivate *) (((gchar *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
 
 struct _GalA11yETablePrivate {
 	AtkObject *child_item;
 };
 
+static void et_atk_component_iface_init (AtkComponentIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (GalA11yETable, gal_a11y_e_table, GTK_TYPE_CONTAINER_ACCESSIBLE,
+                         G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, et_atk_component_iface_init))
+
 /* Static functions */
 static ETableItem *
 find_first_table_item (ETableGroup *group)
@@ -118,9 +118,9 @@
                             AtkCoordType coord_type)
 {
 	GalA11yETable *a11y = GAL_A11Y_E_TABLE (component);
-	if (GET_PRIVATE (a11y)->child_item)
-		g_object_ref (GET_PRIVATE (a11y)->child_item);
-	return GET_PRIVATE (a11y)->child_item;
+	if (a11y->priv->child_item)
+		g_object_ref (a11y->priv->child_item);
+	return a11y->priv->child_item;
 }
 
 static gint
@@ -133,9 +133,10 @@
 	et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
 
 	if (et && et->group) {
-		if (E_IS_TABLE_GROUP_LEAF (et->group))
-			n = 1;
-		else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) {
+		if (E_IS_TABLE_GROUP_LEAF (et->group)) {
+			if (find_first_table_item (et->group))
+				n++;
+		} else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) {
 			ETableGroupContainer *etgc = (ETableGroupContainer *) et->group;
 			n = g_list_length (etgc->children);
 		}
@@ -163,11 +164,13 @@
 	if (i == 0 || i < child_no - 1) {
 		if (E_IS_TABLE_GROUP_LEAF (et->group)) {
 			ETableItem *eti = find_first_table_item (et->group);
-			AtkObject *aeti = eti_get_accessible (eti, accessible);
-			if (aeti)
-				g_object_ref (aeti);
-			return aeti;
-
+			AtkObject *aeti;
+			if (eti) {
+				aeti = eti_get_accessible (eti, accessible);
+				if (aeti)
+					g_object_ref (aeti);
+				return aeti;
+			}
 		} else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) {
 			ETableGroupContainer *etgc =  (ETableGroupContainer *) et->group;
 			ETableGroupContainerChildNode *child_node = g_list_nth_data (etgc->children, i);
@@ -180,7 +183,9 @@
 				return aeti;
 			}
 		}
-	} else if (i == child_no -1) {
+	}
+
+	if (i == child_no -1) {
 		ETableClickToAdd * etcta;
 
 		if (et && et->use_click_to_add && et->click_to_add) {
@@ -202,14 +207,14 @@
 }
 
 static void
-et_class_init (GalA11yETableClass *class)
+gal_a11y_e_table_class_init (GalA11yETableClass *class)
 {
 	AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (class);
 
-	parent_class                              = g_type_class_ref (PARENT_TYPE);
-
 	atk_object_class->get_n_children          = et_get_n_children;
 	atk_object_class->ref_child               = et_ref_child;
+
+	g_type_class_add_private (class, sizeof (GalA11yETablePrivate));
 }
 
 static void
@@ -220,61 +225,10 @@
 }
 
 static void
-et_init (GalA11yETable *a11y)
+gal_a11y_e_table_init (GalA11yETable *a11y)
 {
-	GalA11yETablePrivate *priv;
-
-	priv = GET_PRIVATE (a11y);
-
-	priv->child_item = NULL;
-}
-
-/**
- * gal_a11y_e_table_get_type:
- * @void:
- *
- * Registers the &GalA11yETable class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETable class.
- **/
-GType
-gal_a11y_e_table_get_type (void)
-{
-	static GType type = 0;
-
-	if (!type) {
-		AtkObjectFactory *factory;
-
-		GTypeInfo info = {
-			sizeof (GalA11yETableClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) et_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL, /* class_data */
-			sizeof (GalA11yETable),
-			0,
-			(GInstanceInitFunc) et_init,
-			NULL /* value_table */
-		};
-
-		static const GInterfaceInfo atk_component_info = {
-			(GInterfaceInitFunc) et_atk_component_iface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
-		parent_type = atk_object_factory_get_accessible_type (factory);
-
-		type = gal_a11y_type_register_static_with_private (
-			PARENT_TYPE, "GalA11yETable", &info, 0,
-			sizeof (GalA11yETablePrivate), &priv_offset);
-		g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
-	}
-
-	return type;
+	a11y->priv = G_TYPE_INSTANCE_GET_PRIVATE (a11y, GAL_A11Y_TYPE_E_TABLE, GalA11yETablePrivate);
+	a11y->priv->child_item = NULL;
 }
 
 AtkObject *
@@ -301,15 +255,3 @@
 
 	return ATK_OBJECT (a11y);
 }
-
-void
-gal_a11y_e_table_init (void)
-{
-	if (atk_get_root ())
-		atk_registry_set_factory_type (
-			atk_get_default_registry (),
-						E_TYPE_TABLE,
-						gal_a11y_e_table_factory_get_type ());
-
-}
-
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table-click-to-add.c evolution-3.10.4/e-util/gal-a11y-e-table-click-to-add.c
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table-click-to-add.c	2013-12-07 08:14:38.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table-click-to-add.c	2015-05-08 15:49:49.882067187 -0500
@@ -146,7 +146,13 @@
 static gint
 etcta_get_n_children (AtkObject *accessible)
 {
-	return 1;
+	ETableClickToAdd * etcta;
+
+	etcta = E_TABLE_CLICK_TO_ADD (
+		atk_gobject_accessible_get_object (
+		ATK_GOBJECT_ACCESSIBLE (accessible)));
+
+	return (etcta->rect || etcta->row) ? 1 : 0;
 }
 
 static AtkObject *
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table-column-header.c evolution-3.10.4/e-util/gal-a11y-e-table-column-header.c
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table-column-header.c	2013-12-07 08:14:46.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table-column-header.c	2015-05-08 15:49:49.875067188 -0500
@@ -216,7 +216,8 @@
 
 AtkObject *
 gal_a11y_e_table_column_header_new (ETableCol *ecol,
-                                    ETableItem *item)
+                                    ETableItem *item,
+                                    AtkObject *parent)
 {
 	GalA11yETableColumnHeader *a11y;
 	AtkObject *accessible;
@@ -238,6 +239,7 @@
 	if (ecol->text)
 		atk_object_set_name (accessible, ecol->text);
 	atk_object_set_role (accessible, ATK_ROLE_TABLE_COLUMN_HEADER);
+	atk_object_set_parent (accessible, parent);
 
-	return ATK_OBJECT (a11y);
+	return accessible;
 }
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table-column-header.h evolution-3.10.4/e-util/gal-a11y-e-table-column-header.h
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table-column-header.h	2013-12-07 08:14:39.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table-column-header.h	2015-05-08 15:49:49.876067188 -0500
@@ -53,7 +53,7 @@
 
 /* Standard Glib function */
 GType      gal_a11y_e_table_column_header_get_type  (void);
-AtkObject *gal_a11y_e_table_column_header_new       (ETableCol *etc, ETableItem *item);
+AtkObject *gal_a11y_e_table_column_header_new       (ETableCol *etc, ETableItem *item, AtkObject *parent);
 void gal_a11y_e_table_column_header_init (void);
 
 #endif /* __GAL_A11Y_E_TABLE_COLUMN_HEADER_H__ */
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table.h evolution-3.10.4/e-util/gal-a11y-e-table.h
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table.h	2013-12-07 08:14:43.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table.h	2015-05-08 15:49:49.876067188 -0500
@@ -29,6 +29,7 @@
 #define __GAL_A11Y_E_TABLE_H__
 
 #include <gtk/gtk.h>
+#include <gtk/gtk-a11y.h>
 #include <atk/atkobject.h>
 #include <atk/atkcomponent.h>
 
@@ -42,21 +43,17 @@
 typedef struct _GalA11yETableClass GalA11yETableClass;
 typedef struct _GalA11yETablePrivate GalA11yETablePrivate;
 
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETablePrivate comes right after the parent class structure.
- **/
 struct _GalA11yETable {
-	GtkAccessible object;
+	GtkContainerAccessible object;
+	GalA11yETablePrivate *priv;
 };
 
 struct _GalA11yETableClass {
-	GtkAccessibleClass parent_class;
+	GtkContainerAccessibleClass parent_class;
 };
 
 /* Standard Glib function */
 GType      gal_a11y_e_table_get_type  (void);
 AtkObject *gal_a11y_e_table_new       (GObject *table);
 
-void       gal_a11y_e_table_init (void);
-
 #endif /* __GAL_A11Y_E_TABLE_H__ */
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-table-item.c evolution-3.10.4/e-util/gal-a11y-e-table-item.c
--- evolution-3.10.4.orig/e-util/gal-a11y-e-table-item.c	2013-12-07 08:14:46.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-table-item.c	2015-05-08 15:49:49.882067187 -0500
@@ -277,7 +277,7 @@
 		AtkObject *child;
 
 		ecol = e_table_header_get_column (item->header, index);
-		child = gal_a11y_e_table_column_header_new (ecol, item);
+		child = gal_a11y_e_table_column_header_new (ecol, item, accessible);
 		return child;
 	}
 	index -= item->cols;
@@ -580,7 +580,7 @@
 
 	ecol = e_table_header_get_column (item->header, column);
 	if (ecol) {
-		atk_obj = gal_a11y_e_table_column_header_new (ecol, item);
+		atk_obj = gal_a11y_e_table_column_header_new (ecol, item, ATK_OBJECT (table));
 	}
 
 	return atk_obj;
@@ -1117,14 +1117,14 @@
 	AtkObject *parent;
 	const gchar *name;
 
-	g_return_val_if_fail (item && item->cols >= 0 && item->rows >= 0, NULL);
+	g_return_val_if_fail (item && item->cols >= 0, NULL);
 	a11y = g_object_new (gal_a11y_e_table_item_get_type (), NULL);
 
 	atk_object_initialize (ATK_OBJECT (a11y), item);
 
 	GET_PRIVATE (a11y)->state_set = atk_state_set_new ();
 
-	atk_state_set_add_state (GET_PRIVATE (a11y)->state_set, ATK_STATE_TRANSIENT);
+	atk_state_set_add_state (GET_PRIVATE (a11y)->state_set, ATK_STATE_MANAGES_DESCENDANTS);
 	atk_state_set_add_state (GET_PRIVATE (a11y)->state_set, ATK_STATE_ENABLED);
 	atk_state_set_add_state (GET_PRIVATE (a11y)->state_set, ATK_STATE_SENSITIVE);
 	atk_state_set_add_state (GET_PRIVATE (a11y)->state_set, ATK_STATE_SHOWING);
@@ -1135,7 +1135,7 @@
 	GET_PRIVATE (a11y)->item = item;
 	/* Initialize cell data. */
 	GET_PRIVATE (a11y)->cols = item->cols;
-	GET_PRIVATE (a11y)->rows = item->rows;
+	GET_PRIVATE (a11y)->rows = item->rows >= 0 ? item->rows : 0;
 
 	GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
 	if (GET_PRIVATE (a11y)->columns == NULL)
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-tree.c evolution-3.10.4/e-util/gal-a11y-e-tree.c
--- evolution-3.10.4.orig/e-util/gal-a11y-e-tree.c	2013-12-07 08:14:44.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-tree.c	2015-05-08 15:49:49.878067187 -0500
@@ -33,22 +33,21 @@
 #include "gal-a11y-util.h"
 
 #define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETreeClass))
-static AtkObjectClass *parent_class;
-static GType parent_type;
-static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETreePrivate *) (((gchar *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
 struct _GalA11yETreePrivate {
 	AtkObject *child_item;
 };
 
+static void et_atk_component_iface_init (AtkComponentIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (GalA11yETree, gal_a11y_e_tree, GTK_TYPE_CONTAINER_ACCESSIBLE,
+                         G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, et_atk_component_iface_init))
+
 /* Static functions */
 
 static void
 init_child_item (GalA11yETree *a11y)
 {
-	GalA11yETreePrivate *priv = GET_PRIVATE (a11y);
+	GalA11yETreePrivate *priv = a11y->priv;
 	ETree *tree;
 	ETableItem * eti;
 
@@ -69,7 +68,7 @@
 {
 	GalA11yETree *a11y = GAL_A11Y_E_TREE (component);
 	init_child_item (a11y);
-	return GET_PRIVATE (a11y)->child_item;
+	return a11y->priv->child_item;
 }
 
 static gint
@@ -86,8 +85,8 @@
 	if (i != 0)
 		return NULL;
 	init_child_item (a11y);
-	g_object_ref (GET_PRIVATE (a11y)->child_item);
-	return GET_PRIVATE (a11y)->child_item;
+	g_object_ref (a11y->priv->child_item);
+	return a11y->priv->child_item;
 }
 
 static AtkLayer
@@ -97,14 +96,14 @@
 }
 
 static void
-et_class_init (GalA11yETreeClass *class)
+gal_a11y_e_tree_class_init (GalA11yETreeClass *class)
 {
 	AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (class);
 
-	parent_class                              = g_type_class_ref (PARENT_TYPE);
-
 	atk_object_class->get_n_children          = et_get_n_children;
 	atk_object_class->ref_child               = et_ref_child;
+
+	g_type_class_add_private (class, sizeof (GalA11yETreePrivate));
 }
 
 static void
@@ -115,61 +114,10 @@
 }
 
 static void
-et_init (GalA11yETree *a11y)
+gal_a11y_e_tree_init (GalA11yETree *a11y)
 {
-	GalA11yETreePrivate *priv;
-
-	priv = GET_PRIVATE (a11y);
-
-	priv->child_item = NULL;
-}
-
-/**
- * gal_a11y_e_tree_get_type:
- * @void:
- *
- * Registers the &GalA11yETree class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETree class.
- **/
-GType
-gal_a11y_e_tree_get_type (void)
-{
-	static GType type = 0;
-
-	if (!type) {
-		AtkObjectFactory *factory;
-
-		GTypeInfo info = {
-			sizeof (GalA11yETreeClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) et_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL, /* class_data */
-			sizeof (GalA11yETree),
-			0,
-			(GInstanceInitFunc) et_init,
-			NULL /* value_tree */
-		};
-
-		static const GInterfaceInfo atk_component_info = {
-			(GInterfaceInitFunc) et_atk_component_iface_init,
-			(GInterfaceFinalizeFunc) NULL,
-			NULL
-		};
-
-		factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
-		parent_type = atk_object_factory_get_accessible_type (factory);
-
-		type = gal_a11y_type_register_static_with_private (
-			PARENT_TYPE, "GalA11yETree", &info, 0,
-			sizeof (GalA11yETreePrivate), &priv_offset);
-		g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
-	}
-
-	return type;
+	a11y->priv = G_TYPE_INSTANCE_GET_PRIVATE (a11y, GAL_A11Y_TYPE_E_TREE, GalA11yETreePrivate);
+	a11y->priv->child_item = NULL;
 }
 
 AtkObject *
@@ -184,13 +132,3 @@
 	return ATK_OBJECT (a11y);
 }
 
-void
-gal_a11y_e_tree_init (void)
-{
-	if (atk_get_root ())
-		atk_registry_set_factory_type (
-			atk_get_default_registry (),
-			E_TYPE_TREE,
-			gal_a11y_e_tree_factory_get_type ());
-}
-
diff -ur evolution-3.10.4.orig/e-util/gal-a11y-e-tree.h evolution-3.10.4/e-util/gal-a11y-e-tree.h
--- evolution-3.10.4.orig/e-util/gal-a11y-e-tree.h	2013-12-07 08:14:43.000000000 -0600
+++ evolution-3.10.4/e-util/gal-a11y-e-tree.h	2015-05-08 15:49:49.878067187 -0500
@@ -28,6 +28,7 @@
 #define __GAL_A11Y_E_TREE_H__
 
 #include <gtk/gtk.h>
+#include <gtk/gtk-a11y.h>
 #include <atk/atkobject.h>
 #include <atk/atkcomponent.h>
 
@@ -41,21 +42,17 @@
 typedef struct _GalA11yETreeClass GalA11yETreeClass;
 typedef struct _GalA11yETreePrivate GalA11yETreePrivate;
 
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETablePrivate comes right after the parent class structure.
- **/
 struct _GalA11yETree {
-	GtkAccessible object;
+	GtkContainerAccessible object;
+	GalA11yETreePrivate *priv;
 };
 
 struct _GalA11yETreeClass {
-	GtkAccessibleClass parent_class;
+	GtkContainerAccessibleClass parent_class;
 };
 
 /* Standard Glib function */
 GType      gal_a11y_e_tree_get_type  (void);
 AtkObject *gal_a11y_e_tree_new       (GObject *tree);
 
-void       gal_a11y_e_tree_init      (void);
-
 #endif /* __GAL_A11Y_E_TREE_H__ */
diff -ur evolution-3.10.4.orig/libgnomecanvas/gailcanvas.c evolution-3.10.4/libgnomecanvas/gailcanvas.c
--- evolution-3.10.4.orig/libgnomecanvas/gailcanvas.c	2013-12-07 08:14:05.000000000 -0600
+++ evolution-3.10.4/libgnomecanvas/gailcanvas.c	2015-05-08 15:49:49.879067187 -0500
@@ -32,7 +32,6 @@
 #include "gailcanvasitemfactory.h"
 #include "gailcanvaswidgetfactory.h"
 
-static void       gail_canvas_class_init          (GailCanvasClass *klass);
 static void       gail_canvas_real_initialize     (AtkObject       *obj,
                                                    gpointer        data);
 
@@ -43,91 +42,20 @@
 static void       adjustment_changed              (GtkAdjustment   *adjustment,
                                                    GnomeCanvas     *canvas);
 
-static AtkObject * gail_canvas_factory_create_accessible (GObject *obj);
-
-static GType      gail_canvas_factory_get_accessible_type (void);
-
-G_DEFINE_TYPE (GailCanvasFactory,
-               gail_canvas_factory,
-               ATK_TYPE_OBJECT_FACTORY);
-
-static void
-gail_canvas_factory_init (GailCanvasFactory *foo)
-{
-  ;
-}
+G_DEFINE_TYPE (GailCanvas, gail_canvas, GTK_TYPE_CONTAINER_ACCESSIBLE)
 
 static void
-gail_canvas_factory_class_init (GailCanvasFactoryClass *klass)
-{
-  AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
-  class->create_accessible = gail_canvas_factory_create_accessible;
-  class->get_accessible_type = gail_canvas_factory_get_accessible_type;
-}
-
-static AtkObject *
-gail_canvas_factory_create_accessible (GObject *obj)
+gail_canvas_init (GailCanvas *canvas)
 {
-  return gail_canvas_new (GTK_WIDGET (obj));
 }
 
-static GType
-gail_canvas_factory_get_accessible_type (void)
-{
-  return GAIL_TYPE_CANVAS;
-}
-
-GType
-gail_canvas_get_type (void)
-{
-  static GType type = 0;
-
-  if (!type)
-    {
-      GType parent_type = g_type_parent (GNOME_TYPE_CANVAS);
-      AtkObjectFactory *factory = atk_registry_get_factory (
-				   atk_get_default_registry (),
-				   parent_type);
-      GType atkobject_parent_type = atk_object_factory_get_accessible_type (factory);
-      GTypeQuery query;
-      static GTypeInfo tinfo =
-      {
-	0, /* class size */
-	(GBaseInitFunc) NULL, /* base init */
-	(GBaseFinalizeFunc) NULL, /* base finalize */
-	(GClassInitFunc) gail_canvas_class_init, /* class init */
-	(GClassFinalizeFunc) NULL, /* class finalize */
-	NULL, /* class data */
-	0, /* instance size */
-	0, /* nb preallocs */
-	(GInstanceInitFunc) NULL, /* instance init */
-	NULL /* value table */
-      };
-      g_type_query (atkobject_parent_type, &query);
-      tinfo.class_size = query.class_size;
-      tinfo.instance_size = query.instance_size;
-
-      /* use the size obtained from the parent type factory */
-      type = g_type_register_static (atkobject_parent_type,
-				     "GailCanvas", &tinfo, 0);
-    }
-
-  return type;
-}
-
-static AtkObjectClass *parent_atk_object_class;
-
 /**
  * Tell ATK how to create the appropriate AtkObject peers
  **/
 void
-gail_canvas_init (void)
+gail_canvas_a11y_init (void)
 {
   atk_registry_set_factory_type (atk_get_default_registry (),
-				 GNOME_TYPE_CANVAS,
-				 gail_canvas_factory_get_type ());
-  atk_registry_set_factory_type (atk_get_default_registry (),
 				 GNOME_TYPE_CANVAS_GROUP,
 				 gail_canvas_group_factory_get_type ());
   atk_registry_set_factory_type (atk_get_default_registry (),
@@ -145,7 +73,6 @@
 gail_canvas_class_init (GailCanvasClass *klass)
 {
   AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-  parent_atk_object_class = g_type_class_peek_parent (klass);
 
   class->get_n_children = gail_canvas_get_n_children;
   class->ref_child = gail_canvas_ref_child;
@@ -175,7 +102,7 @@
 	GnomeCanvas *canvas;
 	GtkAdjustment *adj;
 
-	parent_atk_object_class->initialize (obj, data);
+	ATK_OBJECT_CLASS (gail_canvas_parent_class)->initialize (obj, data);
 
 	canvas = GNOME_CANVAS (data);
 
diff -ur evolution-3.10.4.orig/libgnomecanvas/gailcanvas.h evolution-3.10.4/libgnomecanvas/gailcanvas.h
--- evolution-3.10.4.orig/libgnomecanvas/gailcanvas.h	2013-12-07 08:14:04.000000000 -0600
+++ evolution-3.10.4/libgnomecanvas/gailcanvas.h	2015-05-08 15:49:49.880067187 -0500
@@ -22,6 +22,7 @@
 #define __GAIL_CANVAS_H__
 
 #include <gtk/gtk.h>
+#include <gtk/gtk-a11y.h>
 
 /* This code provides the ATK implementation for gnome-canvas widgets. */
 
@@ -34,39 +35,23 @@
 #define GAIL_IS_CANVAS_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CANVAS))
 #define GAIL_CANVAS_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CANVAS, GailCanvasClass))
 
-#define GAIL_TYPE_CANVAS_FACTORY            (gail_canvas_factory_get_type ())
-#define GAIL_CANVAS_FACTORY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactory))
-#define GAIL_CANVAS_FACTORY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactoryClass))
-#define GAIL_IS_CANVAS_FACTORY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_CANVAS_FACTORY))
-#define GAIL_IS_CANVAS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CANVAS_FACTORY))
-#define GAIL_CANVAS_FACTORY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CANVAS_FACTORY, GailCanvasFactoryClass))
-
 typedef struct _GailCanvas                 GailCanvas;
 typedef struct _GailCanvasClass            GailCanvasClass;
-typedef struct _GailCanvasFactory          GailCanvasFactory;
-typedef struct _GailCanvasFactoryClass     GailCanvasFactoryClass;
+GType gail_canvas_get_type (void);
 
-struct _GailCanvasFactory
+struct _GailCanvas
 {
-  AtkObjectFactory parent;
+  GtkContainerAccessible parent;
 };
 
-struct _GailCanvasFactoryClass
+struct _GailCanvasClass
 {
-  AtkObjectFactoryClass parent_class;
+  GtkContainerAccessibleClass parent_class;
 };
 
-GType gail_canvas_get_type (void);
-
-struct _GailCanvas;
-
-struct _GailCanvasClass;
-
 AtkObject * gail_canvas_new (GtkWidget *widget);
 
-void gail_canvas_init (void);
-
-GType gail_canvas_factory_get_type (void);
+void gail_canvas_a11y_init (void);
 
 G_END_DECLS
 
diff -ur evolution-3.10.4.orig/libgnomecanvas/gnome-canvas.c evolution-3.10.4/libgnomecanvas/gnome-canvas.c
--- evolution-3.10.4.orig/libgnomecanvas/gnome-canvas.c	2013-12-07 08:14:05.000000000 -0600
+++ evolution-3.10.4/libgnomecanvas/gnome-canvas.c	2015-05-08 15:49:49.880067187 -0500
@@ -1914,7 +1914,8 @@
 		G_TYPE_INT,
 		G_TYPE_INT);
 
-	gail_canvas_init ();
+	gtk_widget_class_set_accessible_type (widget_class, GAIL_TYPE_CANVAS);
+	gail_canvas_a11y_init ();
 }
 
 /* Callback used when the root item of a canvas is destroyed.  The user should
openSUSE Build Service is sponsored by