diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-04-16 10:50:55 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-04-16 10:50:55 +0800 |
commit | 819a11d2fc2b50868787edd3760f902020b59a99 (patch) | |
tree | 6f36ba0b8be6f801d802d4b9d848249136ea0a7a /calendar/gui/alarm-notify | |
parent | e1a2f6999ae81f87585f84bbe25a609bf52b9d6b (diff) | |
download | gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar.gz gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar.bz2 gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar.lz gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar.xz gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.tar.zst gsoc2013-evolution-819a11d2fc2b50868787edd3760f902020b59a99.zip |
Create the ESearchBar thingy. (search_bar_query_changed_cb): Build the
2001-04-15 Federico Mena Quintero <federico@ximian.com>
* gui/gnome-cal.c (setup_widgets): Create the ESearchBar thingy.
(search_bar_query_changed_cb): Build the different queries based
on the type and string.
* pcs/query.c (backend_obj_updated_cb): Ref the query while we are
notifying the listener so that it will not disappear from under us.
(backend_obj_removed_cb): Likewise.
(process_component_cb): Likewise.
(func_contains): New function to match text fields.
(matches_comment): New function to match comment lists.
(matches_description): New function to match description lists.
(matches_summary): New function to match summaries.
(matches_any): New function to match any text field.
(func_has_categories): New function to match categories.
svn path=/trunk/; revision=9340
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index ec43738e96..9c1d04b739 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -31,6 +31,8 @@ #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-generic-factory.h> #include <liboaf/liboaf.h> +#include "alarm.h" +#include "alarm-queue.h" #include "alarm-notify.h" @@ -40,6 +42,31 @@ static BonoboGenericFactory *factory; static AlarmNotify *alarm_notify_service; +/* La de da */ +static void +funny_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data) +{ + char *msg; + char str[256]; + struct tm *tm; + + tm = localtime (&trigger); + strftime (str, sizeof (str), "%Y/%m/%d %H:%M:%S", tm); + + msg = g_strdup_printf (_("It is %s. The Unix time is %ld right now. We just thought " + "you may like to know."), str, (long) trigger); + gnome_ok_dialog (msg); + g_free (msg); +} + +/* Dum de dum */ +static void +funny_times_init (void) +{ + alarm_add ((time_t) 987654321L, funny_trigger_cb, NULL, NULL); /* Apr 19 04:25:21 2001 UTC */ + alarm_add ((time_t) 999999999L, funny_trigger_cb, NULL, NULL); /* Sep 9 01:46:39 2001 UTC */ +} + /* Factory function for the alarm notify service; just creates and references a * singleton service object. */ @@ -71,6 +98,11 @@ main (int argc, char **argv) if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); + alarm_init (); + alarm_queue_init (); + + funny_times_init (); + factory = bonobo_generic_factory_new ("OAFID:GNOME_Evolution_Calendar_AlarmNotify_Factory", alarm_notify_factory_fn, NULL); if (!factory) @@ -81,5 +113,8 @@ main (int argc, char **argv) bonobo_object_unref (BONOBO_OBJECT (factory)); factory = NULL; + alarm_queue_done (); + alarm_done (); + return 0; } |