From 72cc581e8c60c00544473b4b923e2340575997ad Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 4 Oct 2007 09:27:37 +0000 Subject: 2007-10-04 mcrha Fix for bug #325685 svn path=/trunk/; revision=34353 --- calendar/ChangeLog | 7 +++++++ calendar/gui/print.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index df79689212..42747afd70 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2007-10-04 Milan Crha + + ** Fix for bug #325685 + + * gui/print.c: (print_week_day_event): Show end time of the event only + when printing week view with less than 3 weeks (because of no space). + 2007-10-02 Matthew Barnes ** Fixes part of bug #469657 diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 845ae146ba..41d002df79 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -1362,14 +1362,17 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font, x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3 ) + 4; print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3); - date_tm.tm_hour = event->end_minute / 60; - date_tm.tm_min = event->end_minute % 60; + if (psi->weeks_shown <= 2) { + date_tm.tm_hour = event->end_minute / 60; + date_tm.tm_min = event->end_minute % 60; - e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE, - buffer, sizeof (buffer)); + e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE, + buffer, sizeof (buffer)); + + print_rectangle (context, x1, y1, (x2 + 6) - x1, (y2 + 4) - y1, red, green, blue); + x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3) + 4; + } - print_rectangle (context, x1, y1, (x2 + 6) - x1, (y2 + 4) - y1, red, green, blue); - x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3) + 4; print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3); } -- cgit