From 09129f6072fa280f989afd1bc1320215c8b30302 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 17 Jun 2002 20:46:36 +0000 Subject: Fixes wombat crash (for JP and myself) 2002-06-17 Rodrigo Moya Fixes wombat crash (for JP and myself) * gui/gnome-cal.c (gnome_calendar_open): don't call add_alarms here, since the client is not yet attached to the backend, and the alarm daemon does unref the client before creating a new one. (client_cal_opened_cb): call add_alarms here. svn path=/trunk/; revision=17215 --- calendar/gui/gnome-cal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 5501744863..ff3f37dbc9 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -188,6 +188,7 @@ static void gnome_calendar_on_date_navigator_selection_changed (ECalendarItem GnomeCalendar *gcal); static void gnome_calendar_notify_dates_shown_changed (GnomeCalendar *gcal); +static void add_alarms (const char *uri); static void update_query (GnomeCalendar *gcal); @@ -1568,6 +1569,9 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da if (priv->zone) { cal_client_set_default_timezone (client, priv->zone); } + + /* add the alarms for this client */ + add_alarms (cal_client_get_uri (client)); break; case CAL_CLIENT_OPEN_ERROR: @@ -1923,8 +1927,6 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) return FALSE; } - add_alarms (real_uri); - /* Open the appropriate Tasks folder to show in the TaskPad */ if (!uri) { @@ -1946,9 +1948,7 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) g_free (real_uri); e_uri_free (uri); - if (success) - add_alarms (cal_client_get_uri (priv->task_pad_client)); - else { + if (!success) { g_message ("gnome_calendar_open(): Could not issue the request"); return FALSE; } -- cgit