guard against irrelevant args (ie if there was an error)
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 svn path=/trunk/; revision=23032
This commit is contained in:
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user