aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog35
-rw-r--r--calendar/cal-client/cal-client.c4
-rw-r--r--calendar/gui/comp-util.c10
-rw-r--r--calendar/gui/e-cal-list-view.c9
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/e-week-view.c2
-rw-r--r--calendar/pcs/cal-backend-sync.c16
-rw-r--r--calendar/pcs/cal.c6
8 files changed, 64 insertions, 20 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index fed0011a6d..f81c038e93 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -8,6 +8,41 @@
of g_signal_handlers_disconnect_by_func, so that all handlers are
disconnected.
+2003-10-23 JP Rosevear <jpr@ximian.com>
+
+ * pcs/cal.c (cal_notify_object_modified): guard against irrelevant
+ args (ie if there was an error)
+ (cal_notify_object_removed): ditto
+ (cal_notify_timezone_added): ditto
+
+ * pcs/cal-backend-sync.c (_cal_backend_is_read_only): init value
+ to something known
+ (_cal_backend_get_cal_address): ditto
+ (_cal_backend_get_alarm_email_address): ditto
+ (_cal_backend_get_ldap_attribute): ditto
+ (_cal_backend_get_static_capabilities): ditto
+ (_cal_backend_modify_object): ditto
+ (_cal_backend_remove_object): ditto
+ (_cal_backend_get_object_list): ditto
+
+2003-10-22 JP Rosevear <jpr@ximian.com>
+
+ * gui/e-cal-list-view.c (e_cal_list_view_new): create a model and
+ pass it as an arg during creation
+
+ * gui/e-day-view.c (e_day_view_new): unref the model
+
+ * gui/e-week-view.c (e_week_view_new): ditto
+
+2003-10-22 JP Rosevear <jpr@ximian.com>
+
+ * cal-client/cal-client.c (cal_client_get_object): only change to
+ invalid object error code if we got the object but couldn't parse
+ it, and only check for timezones if we had success
+
+ * gui/comp-util.c (cal_comp_is_on_server): don't throw a warning
+ if the object simply does not exist
+
2003-10-22 Rodrigo Moya <rodrigo@ximian.com>
* gui/gnome-cal.[ch] (gnome_calendar_remove_event_uri): new
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 95efdd6d5d..a77d7731dd 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -2171,9 +2171,9 @@ cal_client_get_object (CalClient *client, const char *uid, const char *rid, ical
*icalcomp = icalparser_parse_string (our_op->string);
g_free (our_op->string);
- if (!*icalcomp) {
+ if (status == E_CALENDAR_STATUS_OK && !*icalcomp) {
status = E_CALENDAR_STATUS_INVALID_OBJECT;
- } else {
+ } else if (status == E_CALENDAR_STATUS_OK){
CalClientGetTimezonesData cb_data;
/* Now make sure we have all timezones needed for this object.
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index aceff667c2..45d9dc1f27 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -227,11 +227,11 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client)
return TRUE;
}
- if (error) {
- g_warning ("cal_comp_is_on_server(): %s", error->message);
- g_error_free (error);
- }
-
+ if (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND)
+ g_warning (G_STRLOC ": %s", error->message);
+
+ g_clear_error (&error);
+
return FALSE;
}
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 9fce533917..720f378ac7 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -334,14 +334,19 @@ GtkWidget *
e_cal_list_view_new (const gchar *table_state_path)
{
ECalListView *cal_list_view;
+ ECalModel *model;
+
+ model = E_CAL_MODEL (e_cal_model_calendar_new ());
- cal_list_view = g_object_new (e_cal_list_view_get_type (), NULL);
+ cal_list_view = g_object_new (e_cal_list_view_get_type (), "model", model, NULL);
if (!e_cal_list_view_construct (cal_list_view, table_state_path)) {
- g_message ("e_cal_list_view(): Could not construct the calendar list GUI");
+ g_message (G_STRLOC ": Could not construct the calendar list GUI");
g_object_unref (cal_list_view);
return NULL;
}
+ g_object_unref (model);
+
return GTK_WIDGET (cal_list_view);
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index b4ec9faea0..08c7ef2fa3 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -855,6 +855,8 @@ e_day_view_new (void)
day_view = GTK_WIDGET (g_object_new (e_day_view_get_type (), "model", model, NULL));
+ g_object_unref (model);
+
return day_view;
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 1be94fc1de..9e622ff381 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -428,6 +428,8 @@ e_week_view_new (void)
week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), "model", model, NULL));
+ g_object_unref (model);
+
return week_view;
}
diff --git a/calendar/pcs/cal-backend-sync.c b/calendar/pcs/cal-backend-sync.c
index 2a807ef689..9e7aec67e0 100644
--- a/calendar/pcs/cal-backend-sync.c
+++ b/calendar/pcs/cal-backend-sync.c
@@ -263,7 +263,7 @@ static void
_cal_backend_is_read_only (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- gboolean read_only;
+ gboolean read_only = TRUE;
status = cal_backend_sync_is_read_only (CAL_BACKEND_SYNC (backend), cal, &read_only);
@@ -274,7 +274,7 @@ static void
_cal_backend_get_cal_address (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *address;
+ char *address = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &address);
@@ -287,7 +287,7 @@ static void
_cal_backend_get_alarm_email_address (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *address;
+ char *address = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &address);
@@ -300,7 +300,7 @@ static void
_cal_backend_get_ldap_attribute (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *attribute;
+ char *attribute = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &attribute);
@@ -313,7 +313,7 @@ static void
_cal_backend_get_static_capabilities (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *capabilities;
+ char *capabilities = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &capabilities);
@@ -360,7 +360,7 @@ static void
_cal_backend_modify_object (CalBackend *backend, Cal *cal, const char *calobj, CalObjModType mod)
{
CalBackendSyncStatus status;
- char *old_object;
+ char *old_object = NULL;
status = cal_backend_sync_modify_object (CAL_BACKEND_SYNC (backend), cal,
calobj, mod, &old_object);
@@ -372,7 +372,7 @@ static void
_cal_backend_remove_object (CalBackend *backend, Cal *cal, const char *uid, const char *rid, CalObjModType mod)
{
CalBackendSyncStatus status;
- char *object;
+ char *object = NULL;
status = cal_backend_sync_remove_object (CAL_BACKEND_SYNC (backend), cal, uid, rid, mod, &object);
@@ -441,7 +441,7 @@ static void
_cal_backend_get_object_list (CalBackend *backend, Cal *cal, const char *sexp)
{
CalBackendSyncStatus status;
- GList *objects, *l;
+ GList *objects = NULL, *l;
status = cal_backend_sync_get_object_list (CAL_BACKEND_SYNC (backend), cal, sexp, &objects);
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index a88e9a146c..2651f0898e 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -826,7 +826,7 @@ cal_notify_object_modified (Cal *cal, GNOME_Evolution_Calendar_CallStatus status
queries = cal_backend_get_queries (priv->backend);
iter = e_list_get_iterator (queries);
- while (e_iterator_is_valid (iter)) {
+ while (object && old_object && e_iterator_is_valid (iter)) {
Query *query = QUERY (e_iterator_get (iter));
gboolean old_match, new_match;
@@ -881,7 +881,7 @@ cal_notify_object_removed (Cal *cal, GNOME_Evolution_Calendar_CallStatus status,
queries = cal_backend_get_queries (priv->backend);
iter = e_list_get_iterator (queries);
- while (e_iterator_is_valid (iter)) {
+ while (uid && object && e_iterator_is_valid (iter)) {
Query *query = QUERY (e_iterator_get (iter));
bonobo_object_dup_ref (BONOBO_OBJREF (query), NULL);
@@ -1127,7 +1127,7 @@ cal_notify_timezone_added (Cal *cal, GNOME_Evolution_Calendar_CallStatus status,
g_return_if_fail (priv->listener != CORBA_OBJECT_NIL);
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyTimezoneAdded (priv->listener, status, tzid, &ev);
+ GNOME_Evolution_Calendar_Listener_notifyTimezoneAdded (priv->listener, status, tzid ? tzid : "", &ev);
if (BONOBO_EX (&ev))
g_warning (G_STRLOC ": could not notify the listener of timezone added");