diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-09-10 18:10:17 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-09-10 18:10:17 +0800 |
commit | 4eb9f5c28b9b656e0efb14e842b98038a136c7cb (patch) | |
tree | 14043a6256d558676b7d0d86ed5e6f63f79dbed2 /calendar/gui | |
parent | 26136b35b7ba15d85be19097a677cc48c76ac3d5 (diff) | |
download | gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar.gz gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar.bz2 gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar.lz gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar.xz gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.tar.zst gsoc2013-evolution-4eb9f5c28b9b656e0efb14e842b98038a136c7cb.zip |
Fixes #24032
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.
svn path=/trunk/; revision=18030
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-itip-control.c | 26 |
1 files changed, 17 insertions, 9 deletions
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: |