[evolution-patches] 41230



The -1 check stuff was necessary because in the not found error
condition we were some how getting the cal-client signal before call
gtk_main (change in orbit i guess).

-JP
-- 
JP Rosevear <jpr ximian com>
Ximian, Inc.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1734
diff -u -r1.1734 ChangeLog
--- ChangeLog	15 Apr 2003 22:26:09 -0000	1.1734
+++ ChangeLog	16 Apr 2003 16:22:02 -0000
@@ -1,3 +1,13 @@
+2003-04-16  JP Rosevear  <jpr ximian com>
+
+	Fixes #41230
+	
+	* gui/e-itip-control.c (show_current): make sure to pass TRUE for
+	tasks
+	(start_calendar_server): make sure we don't gtk_main_quit if we
+	haven't gtk_main'ed
+	(start_calendar_server_cb): ditto
+
 2003-04-15  Hans Petter Jansson  <hpj ximian com>
 
 	* gui/calendar-component.c (owner_set_cb): If we already have an
Index: gui/e-itip-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-itip-control.c,v
retrieving revision 1.117
diff -u -r1.117 e-itip-control.c
--- gui/e-itip-control.c	4 Apr 2003 17:37:02 -0000	1.117
+++ gui/e-itip-control.c	16 Apr 2003 16:22:03 -0000
@@ -139,32 +139,36 @@
 			  CalClientOpenStatus status,
 			  gpointer data)
 {
-	gboolean *success = data;
-
+	int *success = data;
+	int orig = *success;
+	
 	if (status == CAL_CLIENT_OPEN_SUCCESS)
-		*success = TRUE;
+		*success = 1;
 	else
-		*success = FALSE;
+		*success = 0;
 
-	gtk_main_quit (); /* end the sub event loop */
+	if (orig != -1)
+		gtk_main_quit (); /* end the sub event loop */
 }
 
 static CalClient *
 start_calendar_server (EItipControl *itip, char *uri)
 {
 	CalClient *client;
-	gboolean success = FALSE;
+	int success = -1;
 
 	client = cal_client_new ();
 
 	g_signal_connect (client, "cal_opened", G_CALLBACK (start_calendar_server_cb), &success);
 
- 	if (!cal_client_open_calendar (client, uri, TRUE))
+	if (!cal_client_open_calendar (client, uri, TRUE))
  		goto error;
 	
 	/* run a sub event loop to turn cal-client's async load
 	   notification into a synchronous call */
- 	if (!itip->priv->destroyed) {
+ 	if (success == -1 && !itip->priv->destroyed) {
+		success = 0;
+		
  		gtk_signal_connect (GTK_OBJECT (itip), "destroy",
  				    gtk_main_quit, NULL);
 	
@@ -174,7 +178,7 @@
  					       gtk_main_quit, NULL);
  	}
 
-	if (success)
+	if (success == 1)
 		return client;
 
 error:
@@ -1594,7 +1598,7 @@
 		break;
 	case CAL_COMPONENT_TODO:
 		if (!priv->task_clients)
-			priv->task_clients = get_servers (itip, global_shell_client, tasks_types, FALSE);
+			priv->task_clients = get_servers (itip, global_shell_client, tasks_types, TRUE);
 		show_current_todo (itip);
 		break;
 	case CAL_COMPONENT_FREEBUSY:


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