[evolution-patches] Fix an invalid cast warning



Hi, JPR,
   This patch can fix the invalid cast warning you mentioned in irc.
   Please review it.
   Thanks!
      Harry
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2633
diff -u -r1.2633 ChangeLog
--- ChangeLog	26 Jan 2005 12:38:05 -0000	1.2633
+++ ChangeLog	27 Jan 2005 03:45:17 -0000
@@ -1,3 +1,10 @@
+2005-01-27  Harry Lu <harry lu sun com>
+
+	Fix a runtime invalid cast warning.
+
+	* gui/e-calendar-table.c: (e_calendar_table_init): only set
+	a11y name if atk is enabled.
+
 2005-01-26  Rodrigo Moya <rodrigo novell com>
 
 	* gui/dialogs/recurrence-page.c (sensitize_buttons): objects returned
Index: gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.132
diff -u -r1.132 e-calendar-table.c
--- gui/e-calendar-table.c	25 Jan 2005 11:18:16 -0000	1.132
+++ gui/e-calendar-table.c	27 Jan 2005 03:45:23 -0000
@@ -294,7 +294,6 @@
 	gint i;
 	GdkPixbuf *pixbuf;
 	GList *strings;
-	AtkObject *a11y;
 
 	/* Create the model */
 
@@ -511,9 +510,9 @@
 	g_signal_connect (e_table, "key_press", G_CALLBACK (e_calendar_table_on_key_press), cal_table);
 	g_signal_connect (e_table, "popup_menu", G_CALLBACK (e_calendar_table_on_popup_menu), cal_table);
 
-	a11y = gtk_widget_get_accessible (e_table);
-	if (a11y)
-		atk_object_set_name (a11y, _("Task Table"));
+	/* only set a11y name if a11y is enabled */
+	if (atk_get_root ())
+		atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (e_table)), _("Task Table"));
 }
 
 


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