aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/gnome-cal.c30
2 files changed, 14 insertions, 22 deletions
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 <rodrigo@ximian.com>
+
+ * 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 <danw@ximian.com>
* 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);