aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-05-12 01:31:30 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-05-12 01:31:30 +0800
commitd509f47a95ddc37b4ee566eb5980c27f6626c8dc (patch)
tree6d3a28f5a616835ad0f81a308606850b47ace2e6 /calendar/gui/calendar-commands.c
parentd91a0645f9f595cbfa953187c366dc569f5e8e41 (diff)
downloadgsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar.gz
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar.bz2
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar.lz
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar.xz
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.tar.zst
gsoc2013-evolution-d509f47a95ddc37b4ee566eb5980c27f6626c8dc.zip
Removed unused arguments. Load the initial alarms here. (load_alarms): New
2000-05-11 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (gnome_calendar_update_all): Removed unused arguments. Load the initial alarms here. (load_alarms): New function to load a day's worth of alarms. (gnome_calendar_class_init): Eeeek! This was taking in an incorrect argument type. (gnome_calendar_init): Now the calendar keeps a hash table of UIDs->queued alarms. Create the hash table here. (gnome_calendar_destroy): Destroy the alarms hash table. (gnome_calendar_object_updated_cb): Remove the alarms for the object and regenerate them. (gnome_calendar_object_removed_cb): Remove the alarms for the object. * gui/alarm.c (alarm_add): Do not take in a CalendarAlarm, just the trigger time, the callback and the closure data. Return an opaque identifier for the alarm so that it can be removed by the client code if needed. Use the queue_alarm() helper function. (queue_alarm): Helper function to actually queue the alarm and set up the itimer. Deal with a nonzero return value from setitimer(). (alarm_remove): New function to remove an alarm based on its ID. (pop_alarm): New helper function; pops the first alarm of the queue and resets the timer as appropriate. (alarm_ready): Simplified a lot by using pop_alarm(). * idl/evolution-calendar.idl (Cal): Added get_alarms_in_range(). * pcs/cal.c (build_instance_seq): New function to build a CORBA sequence from the internal list of instances. (Cal_get_events_in_range): Use build_instance_seq(). (Cal_get_alarms_in_range): Implemented new method. * pcs/cal-backend.c (cal_backend_get_alarms_in_range): New function with the get_alarms_in_range() engine. * pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_in_range): Implemented the get_alarms_in_range() method. * cal-client/cal-client.c (cal_client_get_alarms_in_range): New client-side function for getting the alarms. (build_instance_list): New helper function to build the CalObjInstance list from the CORBA sequence. (cal_client_get_events_in_range): Use build_instance_list(). * gui/calendar-commands.h: #include <cal-util/calobj.h>. #include "gnome-cal.h". * gui/e-week-view.c: #include "calendar-commands.h" instead of main.h; the latter is an obsolete file and will be killed. * gui/evolution-calendar-control.c (main): Call init_bonobo() before anything else. We need the GTK+ object system initialized. * gui/Makefile.am (evolution_calendar_SOURCES): Do not use main.h. * cal-util/cal-util.c (cal_alarm_instance_list_free): New function. svn path=/trunk/; revision=2987
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index e6d5adedb8..73994d4302 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -20,7 +20,6 @@
#include <libgnorba/gnorba.h>
#include <bonobo.h>
#include <cal-util/timeutil.h>
-#include "alarm.h"
#include "eventedit.h"
#include "gnome-cal.h"
#include "calendar-commands.h"
@@ -46,9 +45,6 @@ int day_begin, day_end;
/* Whether weeks starts on Sunday or Monday */
int week_starts_on_monday;
-/* If true, enable debug output for alarms */
-int debug_alarms = 0;
-
/* If AM/PM indicators should be used. This may not be supported by the new
views. */
int am_pm_flag = 0;
@@ -381,7 +377,7 @@ open_ok (GtkWidget *widget, GtkFileSelection *fs)
ret = gnome_dialog_run (GNOME_DIALOG (error_dialog));
} else {
/* FIXME: find out who owns this calendar and use that name */
-#warning "fix me: find out who owns this calendar and use that name"
+#warning "FIXME: find out who owns this calendar and use that name"
/*
new_calendar ("Somebody", gtk_file_selection_get_filename (fs), NULL, NULL, FALSE);
*/
@@ -731,7 +727,8 @@ void calendar_set_uri (GnomeCalendar *gcal, char *calendar_file)
/*
* Initializes the calendar internal variables, loads defaults
*/
-void init_calendar (void)
+void
+init_calendar (void)
{
int i;
char *cspec, *color;