From 8f703a0b08fbb91f1091cb7ac3941fb8b0e011ee Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Mon, 16 Aug 2004 03:36:31 +0000 Subject: initialize priv->default_lcient (default_client_cal_opened_cb) : unref 2004-08-14 Sivaiah Nallagatla * gui/e-tasks.c (e_tasks_init) : initialize priv->default_lcient (default_client_cal_opened_cb) : unref priv->default_client and make it NULL (client_cal_opened_cb) : don't unref client explicitly as removing from priv->clients already does that. Remove client based on uid instead of uri (backend_died_cb) : Remove client based on uid insted of uri Fixes #62869 svn path=/trunk/; revision=26943 --- calendar/ChangeLog | 11 +++++++++++ calendar/gui/e-tasks.c | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 63e1c8ca76..ae06230f62 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,14 @@ +2004-08-14 Sivaiah Nallagatla + + * gui/e-tasks.c (e_tasks_init) : initialize priv->default_lcient + (default_client_cal_opened_cb) : unref priv->default_client + and make it NULL + (client_cal_opened_cb) : don't unref client + explicitly as removing from priv->clients already does that. + Remove client based on uid instead of uri + (backend_died_cb) : Remove client based on uid insted of uri + Fixes #62869 + 2004-08-12 JP Rosevear * gui/dialogs/calendar-setup.glade: make the button say Add Task diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 80ae78142a..b90ced8a6e 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -610,7 +610,7 @@ e_tasks_init (ETasks *tasks) priv->view_menus = NULL; priv->current_uid = NULL; priv->sexp = g_strdup ("#t"); - + priv->default_client = NULL; update_view (tasks); } @@ -761,7 +761,7 @@ backend_died_cb (ECal *client, gpointer data) source = g_object_ref (e_cal_get_source (client)); priv->clients_list = g_list_remove (priv->clients_list, client); - g_hash_table_remove (priv->clients, e_cal_get_uri (client)); + g_hash_table_remove (priv->clients, e_source_peek_uid (source)); gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source); @@ -807,12 +807,11 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks) 0, 0, NULL, NULL, tasks); /* Do this last because it unrefs the client */ - g_hash_table_remove (priv->clients, e_cal_get_uri (ecal)); + g_hash_table_remove (priv->clients, e_source_peek_uid (source)); gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source); set_status_message (tasks, NULL); - g_object_unref (ecal); g_object_unref (source); break; @@ -849,12 +848,13 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks) 0, 0, NULL, NULL, tasks); /* Do this last because it unrefs the client */ - g_hash_table_remove (priv->clients, e_cal_get_uri (ecal)); + g_hash_table_remove (priv->clients, e_source_peek_uid (source)); gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source); set_status_message (tasks, NULL); - g_object_unref (ecal); + g_object_unref (priv->default_client); + priv->default_client = NULL; g_object_unref (source); break; -- cgit v1.2.3