aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-09-10 18:10:17 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-09-10 18:10:17 +0800
commit4eb9f5c28b9b656e0efb14e842b98038a136c7cb (patch)
tree14043a6256d558676b7d0d86ed5e6f63f79dbed2 /calendar
parent26136b35b7ba15d85be19097a677cc48c76ac3d5 (diff)
downloadgsoc2013-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')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-itip-control.c26
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: