diff options
author | JP Rosevear <jpr@ximian.com> | 2001-12-12 11:22:50 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-12-12 11:22:50 +0800 |
commit | 29f8216c4cb227d1169710dbf994391fbda1cb9a (patch) | |
tree | 2bdd72bca5c69a3cade03cdb55dd570d0f2fa596 /calendar/gui/e-meeting-time-sel.c | |
parent | 49546f4de20b49563afddc6b344ba55c26aa1eaa (diff) | |
download | gsoc2013-evolution-29f8216c4cb227d1169710dbf994391fbda1cb9a.tar.gz gsoc2013-evolution-29f8216c4cb227d1169710dbf994391fbda1cb9a.tar.zst gsoc2013-evolution-29f8216c4cb227d1169710dbf994391fbda1cb9a.zip |
properly convert the dtstart and dtend times if they are UTC (cursor_cb):
2001-12-11 JP Rosevear <jpr@ximian.com>
* gui/e-meeting-model.c (process_free_busy_comp): properly convert
the dtstart and dtend times if they are UTC
(cursor_cb): if we don't have anybody to get f/b info for, process
the callbacks immediately
(e_meeting_model_refresh_busy_periods): take start/end times,
calculate the timet values with object timezone
(e_meeting_model_etable_model_to_view_row): proper cast
(e_meeting_model_etable_view_to_model_row): ditto
(async_open): bail out if we couldn't open properly
* gui/e-meeting-time-sel.c
(e_meeting_time_selector_on_update_free_busy): use defines for
determining the number of days before and after of free busy to
request
(e_meeting_time_selector_update_dates_shown): use defines for the
number of days shown
* gui/e-meeting-model.h: update proto
svn path=/trunk/; revision=15000
Diffstat (limited to 'calendar/gui/e-meeting-time-sel.c')
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 4456ccafed..feee217129 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -84,6 +84,9 @@ const gchar *EMeetingTimeSelectorHours12[24] = { /* The number of days shown in the entire canvas. */ #define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 365 +#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 60 +#define E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE 7 +#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28 /* This is the number of pixels between the mouse has to move before the scroll speed is incremented. */ @@ -1445,13 +1448,24 @@ static void e_meeting_time_selector_on_update_free_busy (GtkWidget *button, EMeetingTimeSelector *mts) { - + EMeetingTime start, end; + /* Make sure the menu pops down, which doesn't happen by default if keyboard accelerators are used. */ if (GTK_WIDGET_VISIBLE (mts->options_menu)) gtk_menu_popdown (GTK_MENU (mts->options_menu)); - e_meeting_model_refresh_busy_periods (mts->model, e_meeting_time_selector_refresh_cb, mts); + + start = mts->meeting_start_time; + g_date_subtract_days (&start.date, E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE); + start.hour = 0; + start.minute = 0; + end = mts->meeting_end_time; + g_date_add_days (&end.date, E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER); + end.hour = 0; + end.minute = 0; + e_meeting_model_refresh_busy_periods (mts->model, &start, &end, + e_meeting_time_selector_refresh_cb, mts); } @@ -2692,10 +2706,12 @@ static void e_meeting_time_selector_update_dates_shown (EMeetingTimeSelector *mts) { mts->first_date_shown = mts->meeting_start_time.date; - g_date_subtract_days (&mts->first_date_shown, 60); + g_date_subtract_days (&mts->first_date_shown, + E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE); mts->last_date_shown = mts->first_date_shown; - g_date_add_days (&mts->last_date_shown, E_MEETING_TIME_SELECTOR_DAYS_SHOWN - 1); + g_date_add_days (&mts->last_date_shown, + E_MEETING_TIME_SELECTOR_DAYS_SHOWN - 1); } |