aboutsummaryrefslogtreecommitdiffstats
path: root/a11y/calendar/ea-calendar.c
diff options
context:
space:
mode:
Diffstat (limited to 'a11y/calendar/ea-calendar.c')
-rw-r--r--a11y/calendar/ea-calendar.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c
index f2510bbcf9..614f81e4c8 100644
--- a/a11y/calendar/ea-calendar.c
+++ b/a11y/calendar/ea-calendar.c
@@ -50,13 +50,25 @@ static gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
const GValue *param_values,
gpointer data);
+static gpointer e_text_type, pixbuf_type, e_day_view_type, e_week_view_type;
+static gpointer e_day_view_main_item_type, e_week_view_main_item_type;
+
void
gnome_calendar_a11y_init (void)
{
- EA_SET_FACTORY (gnome_calendar_get_type(), ea_gnome_calendar);
/* we only add focus watcher when accessibility is enabled
*/
if (atk_get_root ()) {
+ EA_SET_FACTORY (gnome_calendar_get_type(), ea_gnome_calendar);
+
+ /* force loading some types */
+ e_text_type = g_type_class_ref (E_TYPE_TEXT);
+ pixbuf_type = g_type_class_ref (GNOME_TYPE_CANVAS_PIXBUF);
+ e_day_view_type = g_type_class_ref (e_day_view_get_type ());
+ e_week_view_type = g_type_class_ref (e_week_view_get_type ());
+ e_day_view_main_item_type = g_type_class_ref (e_day_view_main_item_get_type ());
+ e_week_view_main_item_type = g_type_class_ref (e_week_view_main_item_get_type ());
+
g_signal_add_emission_hook (g_signal_lookup ("event", E_TYPE_TEXT),
0, ea_calendar_focus_watcher,
NULL, (GDestroyNotify) NULL);