From 09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 10 Apr 2002 19:47:13 +0000 Subject: use the default uri for tasks (as stored in the configuration) when the 2002-04-10 Rodrigo Moya * gui/gnome-cal.c (gnome_calendar_open): use the default uri for tasks (as stored in the configuration) when the calendar URI is not a local one (connector, etc). svn path=/trunk/; revision=16427 --- calendar/ChangeLog | 6 ++++++ calendar/gui/gnome-cal.c | 30 ++++++++---------------------- 2 files changed, 14 insertions(+), 22 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0f1cadafbb..f62b5ffbcd 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2002-04-10 Rodrigo Moya + + * gui/gnome-cal.c (gnome_calendar_open): use the default uri for + tasks (as stored in the configuration) when the calendar URI is not + a local one (connector, etc). + 2002-04-10 Dan Winship * cal-client/cal-client.c (get_default_uri): Use new-and-improved diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 165f79c70a..97cbc9292a 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1902,32 +1902,18 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) else { if (!g_strncasecmp (uri->protocol, "file", 4)) { tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir); - success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE); - - add_alarms (tasks_uri); - g_free (tasks_uri); } else { - CalendarModel *model; - - /* we use the same CalClient for tasks than for events */ - gtk_object_unref (GTK_OBJECT (priv->task_pad_client)); - gtk_object_ref (GTK_OBJECT (priv->client)); - priv->task_pad_client = priv->client; - - gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "cal_opened", - GTK_SIGNAL_FUNC (client_cal_opened_cb), gcal); - gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "categories_changed", - GTK_SIGNAL_FUNC (client_categories_changed_cb), gcal); - - model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)); - g_assert (model != NULL); - - calendar_model_set_cal_client (model, priv->task_pad_client, CALOBJ_TYPE_TODO); - - success = TRUE; + /* we use the default uri for tasks */ + tasks_uri = calendar_config_get_default_tasks_uri (); + if (!tasks_uri) + tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir); } + success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE); + add_alarms (tasks_uri); + g_free (tasks_uri); + } g_free (real_uri); -- cgit v1.2.3