diff options
author | JP Rosevear <jpr@ximian.com> | 2002-08-15 00:16:41 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-08-15 00:16:41 +0800 |
commit | 3e208eabe5395ae452b99b5ba9fd27e7128ee1b2 (patch) | |
tree | 5583fff842f477424971d80f5cce64fac0a4a7c9 /calendar/gui/e-meeting-time-sel.c | |
parent | 1c5f4cda4f80598409b6649b802d010430f0cf0f (diff) | |
download | gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.gz gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.zst gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.zip |
listen for the time editors to change
2002-08-14 JP Rosevear <jpr@ximian.com>
* gui/dialogs/cal-prefs-dialog.c (init_widgets): listen for the
time editors to change
(cal_prefs_dialog_start_of_day_changed): make sure the start is
never after the end
(cal_prefs_dialog_end_of_day_changed): make sure the end is never
after the start
* gui/e-meeting-time-sel.c
(e_meeting_time_selector_set_working_hours): make sure to show a
minimum of 1 hour for work day
* gui/e-day-view-main-item.c (e_day_view_main_item_draw):
calculate the work/not working color boxes to the nearest pixel,
rather the the nearest time division
Fixes #10286, #26285
svn path=/trunk/; revision=17776
Diffstat (limited to 'calendar/gui/e-meeting-time-sel.c')
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index dbe8a58c6d..7df2996013 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -1202,9 +1202,16 @@ e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts, mts->day_start_hour = day_start_hour; mts->day_start_minute = day_start_minute; - mts->day_end_hour = day_end_hour; - mts->day_end_minute = day_end_minute; + /* Make sure we always show atleast an hour */ + if (day_start_hour * 60 + day_start_minute + 60 < day_end_hour * 60 + day_end_minute) { + mts->day_end_hour = day_end_hour; + mts->day_end_minute = day_end_minute; + } else { + mts->day_end_hour = day_start_hour + 1; + mts->day_end_minute = day_start_minute; + } + e_meeting_time_selector_save_position (mts, &saved_time); e_meeting_time_selector_recalc_grid (mts); e_meeting_time_selector_restore_position (mts, &saved_time); |