diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-02-04 20:30:54 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-02-04 20:30:54 +0800 |
commit | c92c8d466dc18ea950965e476eb21bae95347eb8 (patch) | |
tree | b23b01f2ce9ce95b45cfa76150a53395f72b172d | |
parent | 52b83ce3105897f0a87f648f71110e5a1a0a5492 (diff) | |
download | gsoc2013-evolution-c92c8d466dc18ea950965e476eb21bae95347eb8.tar.gz gsoc2013-evolution-c92c8d466dc18ea950965e476eb21bae95347eb8.tar.zst gsoc2013-evolution-c92c8d466dc18ea950965e476eb21bae95347eb8.zip |
don't update the date navigator query nor the internal lists here...
2004-02-04 Rodrigo Moya <rodrigo@ximian.com>
* gui/gnome-cal.c (gnome_calendar_add_event_source): don't update the
date navigator query nor the internal lists here...
(client_cal_opened_cb): do it here.
svn path=/trunk/; revision=24612
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 25 |
2 files changed, 15 insertions, 16 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6cc383c4c1..9f08b44ef8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2004-02-04 Rodrigo Moya <rodrigo@ximian.com> + * gui/gnome-cal.c (gnome_calendar_add_event_source): don't update the + date navigator query nor the internal lists here... + (client_cal_opened_cb): do it here. + +2004-02-04 Rodrigo Moya <rodrigo@ximian.com> + * gui/main.c (launch_alarm_daemon_cb): display the exception message on error. diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3ad93b85c3..3091545104 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1757,23 +1757,23 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) } else { int i; + /* add the client to internal structure */ + g_hash_table_insert (priv->clients, g_strdup (e_cal_get_uri (ecal)), ecal); + priv->clients_list = g_list_prepend (priv->clients_list, ecal); + + /* add client to the views */ for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) { ECalModel *model; model = e_calendar_view_get_model (priv->views[i]); e_cal_model_add_client (model, ecal); } - } - } else { - if (ecal != priv->task_pad_client) { - priv->clients_list = g_list_remove (priv->clients_list, ecal); - g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_DATA, - 0, 0, NULL, NULL, gcal); - /* Do this last because it unrefs the client */ - g_hash_table_remove (priv->clients, e_cal_get_uri (ecal)); + /* update date navigator query */ + update_query (gcal); } - } + } else + g_object_unref (ecal); } static gboolean @@ -2118,10 +2118,6 @@ gnome_calendar_add_event_source (GnomeCalendar *gcal, ESource *source) client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); if (!client) return FALSE; - - str_uri = e_source_get_uri (source); - g_hash_table_insert (priv->clients, str_uri, client); - priv->clients_list = g_list_prepend (priv->clients_list, client); g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), gcal); g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), gcal); @@ -2129,9 +2125,6 @@ gnome_calendar_add_event_source (GnomeCalendar *gcal, ESource *source) open_ecal (gcal, client, FALSE); - /* update date navigator query */ - update_query (gcal); - return TRUE; } |