evolution-data-server r10002 - in trunk/calendar: . libecal



Author: pchen
Date: Fri Jan 30 07:50:46 2009
New Revision: 10002
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=10002&view=rev

Log:
Fixes #347287.

Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/libecal/e-cal.c

Modified: trunk/calendar/libecal/e-cal.c
==============================================================================
--- trunk/calendar/libecal/e-cal.c	(original)
+++ trunk/calendar/libecal/e-cal.c	Fri Jan 30 07:50:46 2009
@@ -60,6 +60,7 @@
 	gboolean bool;
 	char *string;
 
+	char *op_str;
 	ECalView *query;
 	ECalViewListener *listener;
 } ECalendarOp;
@@ -300,13 +301,14 @@
 /* EBookOp calls */
 
 static ECalendarOp*
-e_calendar_new_op (ECal *ecal)
+e_calendar_new_op (ECal *ecal, const char *str)
 {
 	ECalendarOp *op = g_new0 (ECalendarOp, 1);
 
 	op->done = e_flag_new ();
 
 	ecal->priv->current_op = op;
+	op->op_str = g_strdup (str);
 
 	return op;
 }
@@ -327,6 +329,7 @@
 {
 	/* XXX more stuff here */
 	e_flag_free (op->done);
+	g_free (op->op_str);
 	g_free (op);
 }
 
@@ -1643,7 +1646,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 	/* start the open operation */
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "open_calendar");
 
 	g_mutex_unlock (priv->mutex);
 
@@ -1898,7 +1901,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "cal_remove");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2153,7 +2156,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_read_only");
 
 	/* set it to true so that op does not emit cond signals for all notifications
 	   from the backend */
@@ -2226,7 +2229,7 @@
 			E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 		}
 
-		our_op = e_calendar_new_op (ecal);
+		our_op = e_calendar_new_op (ecal, "get_cal_address");
 
 		g_mutex_unlock (ecal->priv->mutex);
 
@@ -2297,7 +2300,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_alarm_address");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2364,7 +2367,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_ldap_attribute");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2421,7 +2424,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "load_static_capabilities");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2654,7 +2657,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_default_object");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2729,7 +2732,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_attachments_for_comp");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2800,7 +2803,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_object");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -2911,7 +2914,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_objects_for_uid");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -3054,7 +3057,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_changes");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -3148,7 +3151,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_object_list");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -3275,7 +3278,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_freebusy");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -3744,6 +3747,7 @@
 	ECalComponentDateTime datetime;
 	icaltimezone *start_zone;
 	struct instances_info *instances_hold;
+	gboolean is_single_instance = FALSE;
 
 	g_return_if_fail (E_IS_CAL (ecal));
 	g_return_if_fail (start >= 0);
@@ -3755,9 +3759,12 @@
 	comp = e_cal_component_new ();
 	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
 
+	if (!e_cal_component_has_recurrences (comp))
+		is_single_instance = TRUE;
+
 	/*If the backend stores it as individual instances and does not
 	 * have a master object - do not expand*/
-	if (e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
+	if (is_single_instance || e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
 
 		/*return the same instance */
 		result = (* cb)  (comp, icaltime_as_timet_with_zone (icalcomponent_get_dtstart (icalcomp), ecal->priv->default_zone),
@@ -4024,7 +4031,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "discard_alarm");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4265,7 +4272,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "create_object");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4346,7 +4353,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "modify_object");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4424,7 +4431,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "remove_object_with_mod");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4513,7 +4520,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "receive_objects");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4585,7 +4592,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "send_objects");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4672,7 +4679,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_timezone");
 
 	g_mutex_unlock (priv->mutex);
 
@@ -4836,7 +4843,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "add_timezone");
 
 	g_mutex_unlock (priv->mutex);
 
@@ -4923,7 +4930,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "get_query");
 
 	g_mutex_unlock (ecal->priv->mutex);
 
@@ -4995,7 +5002,7 @@
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);
 	}
 
-	our_op = e_calendar_new_op (ecal);
+	our_op = e_calendar_new_op (ecal, "set_default_timezone");
 
 	g_mutex_unlock (priv->mutex);
 



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