[evolution-patches] 72088, force loading some types in calendar a11y code



JP and Rodrigo,
When I run CVS head version of evolution, I found some calendar a11y functions don't work. There are also some warnings in the output: (evolution-2.2:31757): GLib-GObject-WARNING **: gsignal.c:1019: unable to lookup signal "event" of unloaded type `EText' (evolution-2.2:31757): GLib-GObject-CRITICAL **: file gsignal.c: line 822 (g_signal_add_emission_hook): assertion `signal_id > 0' failed (evolution-2.2:31757): GLib-GObject-WARNING **: gsignal.c:1019: unable to lookup signal "event" of unloaded type `GnomeCanvasPixbuf' (evolution-2.2:31757): GLib-GObject-CRITICAL **: file gsignal.c: line 822 (g_signal_add_emission_hook): assertion `signal_id > 0' failed (evolution-2.2:31757): GLib-GObject-WARNING **: gsignal.c:1019: unable to lookup signal "event" of unloaded type `EDayViewMainItem' (evolution-2.2:31757): GLib-GObject-CRITICAL **: file gsignal.c: line 822 (g_signal_add_emission_hook): assertion `signal_id > 0' failed (evolution-2.2:31757): GLib-GObject-WARNING **: gsignal.c:1019: unable to lookup signal "event" of unloaded type `EWeekViewMainItem' (evolution-1.2:31757): GLib-GObject-CRITICAL **: file gsignal.c: line 822 (g_signal_add_emission_hook): assertion `signal_id > 0' failed

As I checked, this might due to the changes in gobject. Some object types are not loaded when we use them.
   Here is a patch to force loading some types. Please review it.
   Thanks!
      Harry
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/a11y/ChangeLog,v
retrieving revision 1.31
diff -u -r1.31 ChangeLog
--- ChangeLog	2 Feb 2005 02:10:08 -0000	1.31
+++ ChangeLog	2 Feb 2005 05:22:55 -0000
@@ -1,3 +1,10 @@
+2005-02-02  Harry Lu <harry lu sun com>
+
+	Fix for 72088.
+
+	* calendar/ea-calendar.c: (gnome_calendar_a11y_init): force
+	loading some types so that we can use them.
+
 2005-02-01  Harry Lu <harry lu sun com>
 
 	Fix for 71924, 71926, 71932 
Index: calendar/ea-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution/a11y/calendar/ea-calendar.c,v
retrieving revision 1.5
diff -u -r1.5 ea-calendar.c
--- calendar/ea-calendar.c	9 Dec 2003 07:09:24 -0000	1.5
+++ calendar/ea-calendar.c	2 Feb 2005 05:22:55 -0000
@@ -50,6 +50,9 @@
 					   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)
 {
@@ -57,6 +60,14 @@
 	/* we only add focus watcher when accessibility is enabled
 	 */
 	if (atk_get_root ()) {
+		/* 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]