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
This commit is contained in:
@ -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
|
||||
|
||||
@ -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))),
|
||||
|
||||
Reference in New Issue
Block a user