aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-02-26 21:48:44 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-02-26 21:48:44 +0800
commitf7d587939d8df919d50fff368ebaffde4276ea25 (patch)
tree603a2bdd1d5198b2954a04f48eab3159ea9fb5cc /calendar
parente0163b782f3c12b72acbe5ade34e88a9a7504e7d (diff)
downloadgsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar.gz
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar.bz2
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar.lz
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar.xz
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.tar.zst
gsoc2013-evolution-f7d587939d8df919d50fff368ebaffde4276ea25.zip
make sure we unref the task pad client and the calendar clients are
2004-02-26 JP Rosevear <jpr@ximian.com> * gui/gnome-cal.c (client_cal_opened_cb): make sure we unref the task pad client and the calendar clients are unreffed by the hash table svn path=/trunk/; revision=24880
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/gnome-cal.c21
2 files changed, 12 insertions, 15 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6fb8396b5a..a27e8d31e4 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-26 JP Rosevear <jpr@ximian.com>
+
+ * gui/gnome-cal.c (client_cal_opened_cb): make sure we unref the
+ task pad client and the calendar clients are unreffed by the hash
+ table
+
2004-02-24 JP Rosevear <jpr@ximian.com>
* gui/migration.c (migrate_calendars): fix float type pane
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 491756bf6b..0ac372548e 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1782,21 +1782,13 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), NULL);
}
} else {
- if (ecal == priv->task_pad_client)
+ if (ecal == priv->task_pad_client) {
+ g_object_unref (priv->task_pad_client);
priv->task_pad_client = NULL;
- else {
- gpointer orig_uid;
- gpointer orig_client;
-
- if (g_hash_table_lookup_extended (priv->clients, e_cal_get_uri (ecal), &orig_uid, &orig_client)) {
- g_hash_table_remove (priv->clients, e_cal_get_uri (ecal));
- g_free (orig_uid);
- }
-
- priv->clients_list = g_list_append (priv->clients_list, ecal);
+ } else {
+ priv->clients_list = g_list_remove (priv->clients_list, ecal);
+ g_hash_table_remove (priv->clients, e_cal_get_uri (ecal));
}
-
- g_object_unref (ecal);
}
}
@@ -1963,9 +1955,8 @@ backend_died_cb (ECal *client, gpointer data)
calendar_component_peek_source_selector (calendar_component_peek ()),
e_cal_get_source (client));
- g_hash_table_remove (priv->clients, e_cal_get_uri (client));
priv->clients_list = g_list_remove (priv->clients_list, client);
- g_object_unref (client);
+ g_hash_table_remove (priv->clients, e_cal_get_uri (client));
}
dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),