diff options
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-itip-control.c | 26 |
2 files changed, 26 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 4e0aa71578..a4d0356cee 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2002-09-10 Rodrigo Moya <rodrigo@ximian.com> + + Fixes #24032 + + * gui/e-itip-control.c (init): don't get servers here, since we don't + know the type of the component(s) to be loaded. + (show_current): get servers here. + (destroy): only free stuff that needs to be freed. + 2002-09-09 Rodrigo Moya <rodrigo@ximian.com> * gui/gnome-cal.c (client_cal_opened_cb): display status messages for diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 3f808c8e7c..a38fd70dcf 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -306,10 +306,10 @@ init (EItipControl *itip) /* Addresses */ priv->addresses = itip_addresses_get (); - /* Get the cal clients */ - priv->event_clients = get_servers (global_shell_client, calendar_types, FALSE); + /* Initialize the cal clients */ + priv->event_clients = NULL; priv->event_client = NULL; - priv->task_clients = get_servers (global_shell_client, tasks_types, TRUE); + priv->task_clients = NULL; priv->task_client = NULL; /* Html Widget */ @@ -381,12 +381,16 @@ destroy (GtkObject *obj) itip_addresses_free (priv->addresses); priv->addresses = NULL; - for (i = 0; i < priv->event_clients->len; i++) - gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->event_clients, i))); - g_ptr_array_free (priv->event_clients, TRUE); - for (i = 0; i < priv->task_clients->len; i++) - gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->task_clients, i))); - g_ptr_array_free (priv->task_clients, TRUE); + if (priv->event_clients) { + for (i = 0; i < priv->event_clients->len; i++) + gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->event_clients, i))); + g_ptr_array_free (priv->event_clients, TRUE); + } + if (priv->task_clients) { + for (i = 0; i < priv->task_clients->len; i++) + gtk_object_unref (GTK_OBJECT (g_ptr_array_index (priv->task_clients, i))); + g_ptr_array_free (priv->task_clients, TRUE); + } g_free (priv); @@ -1236,9 +1240,13 @@ show_current (EItipControl *itip) switch (type) { case CAL_COMPONENT_EVENT: + if (!priv->event_clients) + priv->event_clients = get_servers (global_shell_client, calendar_types, FALSE); show_current_event (itip); break; case CAL_COMPONENT_TODO: + if (!priv->task_clients) + priv->task_clients = get_servers (global_shell_client, tasks_types, FALSE); show_current_todo (itip); break; case CAL_COMPONENT_FREEBUSY: |