aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--my-evolution/ChangeLog12
-rw-r--r--my-evolution/e-summary-calendar.c16
-rw-r--r--my-evolution/e-summary-tasks.c20
3 files changed, 41 insertions, 7 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 036dbefe41..c0bddb947e 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,5 +1,17 @@
2002-08-14 Iain <iain@ximian.com>
+ * e-summary-calendar.c (generate_html): Use the default uris for the
+ links.
+ (e_summary_calendar_init): Get the default uri from bonobo config
+ (e_summary_calendar_free): Free default uri.
+
+ * e-summary-tasks.c (generate_html): Use the default uris for the
+ links.
+ (e_summary_tasks_init): Get the default uri.
+ (e_summary_tasks_free): Free default uri.
+
+2002-08-14 Iain <iain@ximian.com>
+
* e-summary-tasks.c (sort_uids): Sort the tasks in the correct order.
2002-08-14 Iain <iain@ximian.com>
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
index 6ad68427b4..d25bc713d6 100644
--- a/my-evolution/e-summary-calendar.c
+++ b/my-evolution/e-summary-calendar.c
@@ -45,6 +45,8 @@ struct _ESummaryCalendar {
char *html;
gboolean wants24hr;
+
+ char *default_uri;
};
const char *
@@ -366,7 +368,7 @@ generate_html (gpointer data)
s2 = e_utf8_from_locale_string (_("No appointments"));
g_free (calendar->html);
calendar->html = g_strconcat ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">",
+ "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"", calendar->default_uri, "\">",
s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
g_free (s1);
g_free (s2);
@@ -378,8 +380,10 @@ generate_html (gpointer data)
int i;
char *s;
- string = g_string_new ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">");
+ string = g_string_new (NULL);
+ g_string_sprintf (string, "<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
+ "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"%s\">",
+ calendar->default_uri);
s = e_utf8_from_locale_string (_("Appointments"));
g_string_append (string, s);
g_free (s);
@@ -548,6 +552,9 @@ e_summary_calendar_init (ESummary *summary)
e_summary_add_protocol_listener (summary, "calendar", e_summary_calendar_protocol, calendar);
calendar->wants24hr = bonobo_config_get_boolean_with_default (db, "/Calendar/Display/Use24HourFormat", locale_uses_24h_time_format (), NULL);
+ calendar->default_uri = bonobo_config_get_string_with_default (db, "/DefaultFolders/calendar_path", "evolution:/local/Calendar", NULL);
+
+ g_print ("Default folder: %s\n", calendar->default_uri);
bonobo_object_release_unref (db, NULL);
}
@@ -568,7 +575,8 @@ e_summary_calendar_free (ESummary *summary)
calendar = summary->calendar;
gtk_object_unref (GTK_OBJECT (calendar->client));
g_free (calendar->html);
-
+ g_free (calendar->default_uri);
+
g_free (calendar);
summary->calendar = NULL;
}
diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c
index b704ce1cf9..c5e86c2548 100644
--- a/my-evolution/e-summary-tasks.c
+++ b/my-evolution/e-summary-tasks.c
@@ -44,6 +44,8 @@ struct _ESummaryTasks {
char *html;
char *due_today_colour;
char *overdue_colour;
+
+ char *default_uri;
};
const char *
@@ -310,7 +312,7 @@ generate_html (gpointer data)
s2 = e_utf8_from_locale_string (_("No tasks"));
g_free (tasks->html);
tasks->html = g_strconcat ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">",
+ "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"", tasks->default_uri, "\">",
s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
g_free (s1);
g_free (s2);
@@ -321,8 +323,10 @@ generate_html (gpointer data)
char *s;
uids = cal_list_sort (uids, sort_uids, tasks->client);
- string = g_string_new ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">");
+ string = g_string_new (NULL);
+ g_string_sprintf (string, "<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
+ "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"%s\">", tasks->default_uri);
+
s = e_utf8_from_locale_string (_("Tasks"));
g_string_append (string, s);
g_free (s);
@@ -460,9 +464,18 @@ e_summary_tasks_init (ESummary *summary)
/* Get some configuration values from the calendar */
if (db != CORBA_OBJECT_NIL) {
+
+ CORBA_exception_init (&ev);
+
tasks->due_today_colour = bonobo_config_get_string_with_default (db, "/Calendar/Tasks/Colors/TasksDueToday", "blue", NULL);
tasks->overdue_colour = bonobo_config_get_string_with_default (db, "/Calendar/Tasks/Colors/TasksOverdue", "red", NULL);
+ tasks->default_uri = bonobo_config_get_string (db, "/DefaultFolders/tasks_path", &ev);
+ if (BONOBO_EX (&ev)) {
+ tasks->default_uri = g_strdup ("evolution:/local/Tasks");
+ }
+ CORBA_exception_free (&ev);
+
bonobo_object_release_unref (db, NULL);
} else {
tasks->due_today_colour = g_strdup ("blue");
@@ -509,6 +522,7 @@ e_summary_tasks_free (ESummary *summary)
g_free (tasks->html);
g_free (tasks->due_today_colour);
g_free (tasks->overdue_colour);
+ g_free (tasks->default_uri);
g_free (tasks);
summary->tasks = NULL;