From af868dc105fcc0675c901728477acc22d2fb4ccd Mon Sep 17 00:00:00 2001 From: Harry Lu Date: Fri, 4 Feb 2005 05:09:10 +0000 Subject: Fix for 72088. 2005-02-02 Harry Lu Fix for 72088. * calendar/ea-calendar.c: (gnome_calendar_a11y_init): force loading some types so that we can use them. svn path=/trunk/; revision=28704 --- a11y/calendar/ea-calendar.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'a11y/calendar') 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); -- cgit v1.2.3