aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-09-15 06:43:17 +0800
committerIain Holmes <iain@src.gnome.org>2001-09-15 06:43:17 +0800
commit127ee49f7c8e076dd5acb4f0d8c60d5475014fe3 (patch)
tree33e5c50aa6c0a209fee1ac6a02177fcb818f3b7a /my-evolution/e-summary.c
parent8e88e78fbb50309ef2c225e2dcf1466ccfcc49b4 (diff)
downloadgsoc2013-evolution-127ee49f7c8e076dd5acb4f0d8c60d5475014fe3.tar.gz
gsoc2013-evolution-127ee49f7c8e076dd5acb4f0d8c60d5475014fe3.tar.zst
gsoc2013-evolution-127ee49f7c8e076dd5acb4f0d8c60d5475014fe3.zip
Timezone stuff
svn path=/trunk/; revision=12835
Diffstat (limited to 'my-evolution/e-summary.c')
-rw-r--r--my-evolution/e-summary.c36
1 files changed, 31 insertions, 5 deletions
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 0df4dc3bc1..979dd97cd9 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -27,6 +27,10 @@
#include <gal/widgets/e-unicode.h>
#include <bonobo/bonobo-listener.h>
+#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-moniker-util.h>
+#include <bonobo-conf/bonobo-config-database.h>
+
#include <libgnome/gnome-paper.h>
#include <libgnome/gnome-url.h>
@@ -148,7 +152,8 @@ e_summary_draw (ESummary *summary)
g_return_if_fail (IS_E_SUMMARY (summary));
if (summary->mail == NULL || summary->calendar == NULL
- || summary->rdf == NULL || summary->weather == NULL) {
+ || summary->rdf == NULL || summary->weather == NULL
+ || summary->tasks == NULL) {
return;
}
@@ -401,6 +406,8 @@ alarm_fn (gpointer alarm_id,
static void
e_summary_init (ESummary *summary)
{
+ Bonobo_ConfigDatabase db;
+ CORBA_Environment ev;
ESummaryPrivate *priv;
GdkColor bgcolor = {0, 0xffff, 0xffff, 0xffff};
time_t t, day_end;
@@ -438,13 +445,32 @@ e_summary_init (ESummary *summary)
priv->protocol_hash = NULL;
priv->connections = NULL;
+ summary->prefs_window = NULL;
+ e_summary_preferences_init (summary);
+
+ CORBA_exception_init (&ev);
+ db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ CORBA_exception_free (&ev);
+ g_warning ("Error getting Wombat. Using defaults");
+ return;
+ }
+
+ summary->timezone = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL);
+ summary->tz = icaltimezone_get_builtin_timezone (summary->timezone);
+
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+
alarm_init ();
t = time (NULL);
- day_end = time_day_end (t);
- priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
+ if (summary->tz == NULL) {
+ day_end = time_day_end (t);
+ } else {
+ day_end = time_day_end_with_zone (t, summary->tz);
+ }
- summary->prefs_window = NULL;
- e_summary_preferences_init (summary);
+ priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
}
E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init,