aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-calendar.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2002-08-14 21:57:06 +0800
committerIain Holmes <iain@src.gnome.org>2002-08-14 21:57:06 +0800
commit1c5f4cda4f80598409b6649b802d010430f0cf0f (patch)
treef24785caec78870990720b1736ab1b8ca0d6e127 /my-evolution/e-summary-calendar.c
parent89aa08c07bebf3e3b901b5e27735ad72f35154d8 (diff)
downloadgsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar.gz
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar.bz2
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar.lz
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar.xz
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.tar.zst
gsoc2013-evolution-1c5f4cda4f80598409b6649b802d010430f0cf0f.zip
Use the default uris instead of always changing to local
svn path=/trunk/; revision=17775
Diffstat (limited to 'my-evolution/e-summary-calendar.c')
-rw-r--r--my-evolution/e-summary-calendar.c16
1 files changed, 12 insertions, 4 deletions
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;
}