[evolution-patches] seek review the patch of bug #45910



hello Rodrigo, JP or HPJ:

          Could you review the patch for bug #45910?
           http://bugzilla.ximian.com/show_bug.cgi?id=45910

I found the calclient in the EMeetingModel is null becasue of it can not be set when it initialize. so, if you use the e_meeting_model_get_cal_client to get the calclient, the client will be null for ever. so, i use the comp_editor_get_cal_client to get the calclient from the CompEditor. In addition, i add the g_return_val_if_fail to check whether the calclient is null.

         And all is ok!


Tnanks
jack
Index: calendar//ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1815
diff -u -r1.1815 ChangeLog
--- calendar//ChangeLog	4 Jul 2003 10:36:23 -0000	1.1815
+++ calendar//ChangeLog	7 Jul 2003 06:55:13 -0000
@@ -1,3 +1,11 @@
+2003-07-07  Jack Jia <jack jia sun com>
+
+	* gui/dialogs/task-editor.c (task_editor_send_comp): use 
+	"comp_editor_get_cal_client" to get the CalClient in place of
+	"e_meeting_model_get_cal_client".
+	* cal-client/cal-client.c (cal_client_get_static_capability): add
+	g_return_val_if_fail to check the input param.
+
 2003-07-03  Rodrigo Moya <rodrigo ximian com>
 
 	* gui/e-tasks.c (setup_widgets): added a paned widget to contain
Index: calendar//cal-client/cal-client.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/cal-client/cal-client.c,v
retrieving revision 1.121
diff -u -r1.121 cal-client.c
--- calendar//cal-client/cal-client.c	2 Jul 2003 13:29:54 -0000	1.121
+++ calendar//cal-client/cal-client.c	7 Jul 2003 06:55:15 -0000
@@ -1254,6 +1254,9 @@
 gboolean
 cal_client_get_static_capability (CalClient *client, const char *cap)
 {
+	g_return_val_if_fail (client != NULL, FALSE);
+	g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+
 	return check_capability (client, cap);
 }
 
Index: calendar//gui/dialogs/task-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-editor.c,v
retrieving revision 1.65
diff -u -r1.65 task-editor.c
--- calendar//gui/dialogs/task-editor.c	2 Jul 2003 13:29:55 -0000	1.65
+++ calendar//gui/dialogs/task-editor.c	7 Jul 2003 06:55:16 -0000
@@ -318,7 +318,7 @@
 		CalClient *client;
 		gboolean result;
 		
-		client = e_meeting_model_get_cal_client (priv->model);
+		client = comp_editor_get_cal_client (editor);
 		result = itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
 		g_object_unref((comp));
 


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