aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-10 06:50:10 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-10 06:50:10 +0800
commit76f4fb9c001b1682b39cb7f2c8e97c030f143ec1 (patch)
tree41b5eeafc7f89a486e93fdc7c7cf9f5f5750f80e
parent2489c736ec4a49ed4396837be2e3b4bcb4803007 (diff)
downloadgsoc2013-evolution-76f4fb9c001b1682b39cb7f2c8e97c030f143ec1.tar.gz
gsoc2013-evolution-76f4fb9c001b1682b39cb7f2c8e97c030f143ec1.tar.zst
gsoc2013-evolution-76f4fb9c001b1682b39cb7f2c8e97c030f143ec1.zip
Alarm! Alarm!
svn path=/trunk/; revision=10937
-rw-r--r--my-evolution/ChangeLog7
-rw-r--r--my-evolution/Makefile.am1
-rw-r--r--my-evolution/e-summary.c26
3 files changed, 34 insertions, 0 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 5ff8803b45..d630692761 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,5 +1,12 @@
2001-07-09 Iain Holmes <iain@ximian.com>
+ * e-summary.c (e_summary_init): Connect a calendar alarm to be notified
+ of when the day changes.
+
+ * Makefile.am: Link with libalarm.a
+
+2001-07-09 Iain Holmes <iain@ximian.com>
+
* e-summary-weather.c (weather_make_html): Get an icon for the weather.
* metar.[ch] (icon_from_weather): Work out what icon for a specific
diff --git a/my-evolution/Makefile.am b/my-evolution/Makefile.am
index 5033ccbd32..81eadaa2dd 100644
--- a/my-evolution/Makefile.am
+++ b/my-evolution/Makefile.am
@@ -59,6 +59,7 @@ evolution_executive_summary_SOURCES = \
weather.h
evolution_executive_summary_LDADD = \
+ $(top_builddir)/calendar/gui/alarm-notify/libalarm.a \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/widgets/misc/libemiscwidgets.a \
$(top_builddir)/e-util/libeutil.la \
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 833073c94c..db9257f8f1 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -32,6 +32,8 @@
#include <libgnomeprint/gnome-print-master.h>
#include <libgnomeprint/gnome-print-master-preview.h>
+#include <gui/alarm-notify/alarm.h>
+
#include "e-summary.h"
#include "e-summary-preferences.h"
#include "my-evolution-html.h"
@@ -72,6 +74,8 @@ struct _ESummaryPrivate {
GHashTable *protocol_hash;
GList *connections;
+
+ gpointer alarm;
};
typedef struct _ProtocolListener {
@@ -330,6 +334,22 @@ e_summary_class_init (GtkObjectClass *object_class)
e_summary_parent_class = gtk_type_class (PARENT_TYPE);
}
+static void
+alarm_fn (gpointer alarm_id,
+ time_t trigger,
+ gpointer data)
+{
+ ESummary *summary;
+ time_t t, day_end;
+
+ summary = data;
+ t = time (NULL);
+ day_end = time_day_end (t);
+ summary->priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
+
+ e_summary_reconfigure (summary);
+}
+
#define DEFAULT_HTML "<html><head><title>My Evolution</title></head><body bgcolor=\"#ffffff\">hello</body></html>"
static void
@@ -337,6 +357,8 @@ e_summary_init (ESummary *summary)
{
ESummaryPrivate *priv;
GdkColor bgcolor = {0, 0xffff, 0xffff, 0xffff};
+ time_t t, day_end;
+
summary->priv = g_new (ESummaryPrivate, 1);
priv = summary->priv;
@@ -370,6 +392,10 @@ e_summary_init (ESummary *summary)
priv->protocol_hash = NULL;
priv->connections = NULL;
+ t = time (NULL);
+ day_end = time_day_end (t);
+ priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
+
summary->prefs_window = NULL;
e_summary_preferences_init (summary);
}