aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-08-15 00:16:41 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-08-15 00:16:41 +0800
commit3e208eabe5395ae452b99b5ba9fd27e7128ee1b2 (patch)
tree5583fff842f477424971d80f5cce64fac0a4a7c9 /calendar/gui/e-day-view-main-item.c
parent1c5f4cda4f80598409b6649b802d010430f0cf0f (diff)
downloadgsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar
gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.gz
gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.bz2
gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.lz
gsoc2013-evolution-3e208eabe5395ae452b99b5ba9fd27e7128ee1b2.tar.xz
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-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 201f0cbc52..ebdac5c2de 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -187,7 +187,6 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
GdkFont *font;
gint row, row_y, grid_x1, grid_x2;
gint day, grid_y1, grid_y2;
- gint work_day_start_row, work_day_end_row;
gint work_day_start_y, work_day_end_y;
gint day_x, day_w, work_day;
gint start_row, end_row, rect_x, rect_y, rect_width, rect_height;
@@ -207,10 +206,8 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
/* Paint the background colors. */
gc = day_view->main_gc;
- work_day_start_row = e_day_view_convert_time_to_row (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute);
- work_day_start_y = work_day_start_row * day_view->row_height - y;
- work_day_end_row = e_day_view_convert_time_to_row (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute);
- work_day_end_y = work_day_end_row * day_view->row_height - y;
+ work_day_start_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute) - y;
+ work_day_end_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute) - y;
for (day = 0; day < day_view->days_shown; day++) {
day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, day_view->zone);