From 4ffc49d7b98f4693991b2cf48d564219217e5307 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 20 Sep 2001 19:52:58 +0000 Subject: gets a config db (cal_backend_file_destroy): release config db 2001-09-20 JP Rosevear * pcs/cal-backend-file.c (load_db): gets a config db (cal_backend_file_destroy): release config db (cal_backend_file_init): use load_db (mail_account_get): gets a mail account by number (mail_account_get_default): gets the default mail account (mail_account_is_valid): looks to see if any accounts have the given address (create_user_free_busy): modularize so we can call multiple times if necessary, set organizer (cal_backend_file_get_free_busy): if the list of users is null, use the default account otherwise get the same info for each address that is an identity in the mailer * gui/itip-utils.c (itip_addresses_get): s/gint/glong/ for bonobo conf returns * gui/calendar-commands.c (publish_freebusy_cmd): fix problems from a merge so that we publish 6 weeks of free/busy information again svn path=/trunk/; revision=13015 --- calendar/gui/calendar-commands.c | 9 ++++++--- calendar/gui/itip-utils.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 5de5b0091f..366026dc96 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -333,13 +333,16 @@ publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) GnomeCalendar *gcal; CalClient *client; GList *comp_list; - time_t start, end; + icaltimezone *utc; + time_t start = time (NULL), end; gcal = GNOME_CALENDAR (data); - gnome_calendar_get_current_time_range (gcal, &start, &end); + + utc = icaltimezone_get_utc_timezone (); + start = time_day_begin_with_zone (start, utc); + end = time_add_week_with_zone (start, 6, utc); client = gnome_calendar_get_cal_client (gcal); - /* FIXME: use the "users" parameter */ comp_list = cal_client_get_free_busy (client, NULL, start, end); if (comp_list) { GList *l; diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 7a5411d752..8fdbe1648e 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -84,7 +84,7 @@ itip_addresses_get (void) static Bonobo_ConfigDatabase db = NULL; CORBA_Environment ev; GList *addresses = NULL; - gint len, def, i; + glong len, def, i; if (db == NULL) { CORBA_exception_init (&ev); -- cgit v1.2.3