aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-10-01 15:26:27 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-10-01 15:26:27 +0800
commit820e1591fd4d6248dbea6d9e2b010373299cbaf5 (patch)
tree5678a876b6a1d2c5b1655eb1d229f9dbbe0f0015 /calendar/gui
parent6e14da5c593d08a8edf1155cd4378c889425c423 (diff)
downloadgsoc2013-evolution-820e1591fd4d6248dbea6d9e2b010373299cbaf5.tar.gz
gsoc2013-evolution-820e1591fd4d6248dbea6d9e2b010373299cbaf5.tar.zst
gsoc2013-evolution-820e1591fd4d6248dbea6d9e2b010373299cbaf5.zip
2007-10-01 mcrha Fix for bug #230339
svn path=/trunk/; revision=34338
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/print.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index e1f07de8aa..845ae146ba 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -1040,7 +1040,7 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
double left, double right, double top, double bottom,
EDayViewEvent *event, struct pdinfo *pdi, ECalModel *model)
{
- const gchar *summary;
+ const gchar *summary, *location;
double x1, x2, y1, y2, col_width, row_height;
int start_offset, end_offset, start_row, end_row;
char *text, start_buffer[32], end_buffer[32];
@@ -1082,9 +1082,16 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
summary = icalcomponent_get_summary (event->comp_data->icalcomp);
text = summary ? (char*) summary : "";
-
+
+ location = icalcomponent_get_location (event->comp_data->icalcomp);
+ if (location && *location) {
+ text = g_strdup_printf ("%s (%s)", text, location);
+ free_text = TRUE;
+ }
if (display_times) {
+ gchar *t = NULL;
+
date_tm.tm_year = 2001;
date_tm.tm_mon = 0;
date_tm.tm_mday = 1;
@@ -1102,10 +1109,16 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
e_time_format_time (&date_tm, pdi->use_24_hour_format, FALSE,
end_buffer, sizeof (end_buffer));
+ if (free_text)
+ t = text;
+
text = g_strdup_printf ("%s - %s %s ", start_buffer,
end_buffer, text);
free_text = TRUE;
+
+ if (t)
+ g_free (t);
}
bound_text (context, font, text, x1 + 2, y1, x2 - 2, y2);