aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-04-11 03:47:13 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-04-11 03:47:13 +0800
commit09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8 (patch)
tree8a69700139a6e9cba02163c48f22b18bd6856b57 /calendar
parentf6b7c9d6e591549bcea385dc08e6b70cafacf742 (diff)
downloadgsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar.gz
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar.bz2
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar.lz
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar.xz
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.tar.zst
gsoc2013-evolution-09a4db1fde85e39bcd0e288a040ddab2e0f9e4a8.zip
use the default uri for tasks (as stored in the configuration) when the
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). svn path=/trunk/; revision=16427
Diffstat (limited to 'calendar')
-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);