diff options
Diffstat (limited to 'calendar/gui/print.c')
-rw-r--r-- | calendar/gui/print.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c index a3e9af3bdd..ab2f784c33 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -1092,6 +1092,9 @@ print_day_long_event (GtkPrintContext *context, struct tm date_tm; gdouble red, green, blue; + if (!is_comp_data_valid (event)) + return; + /* If the event starts before the first day being printed, draw a triangle. (Note that I am assuming we are just showing 1 day at the moment.) */ @@ -1172,6 +1175,9 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font, struct tm date_tm; gdouble red, green, blue; + if (!is_comp_data_valid (event)) + return; + if ((event->start_minute >= pdi->end_minute_offset) || (event->end_minute <= pdi->start_minute_offset)) return; @@ -1561,6 +1567,9 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, gdouble red, green, blue; GdkPixbuf *pixbuf = NULL; + if (!is_comp_data_valid (event)) + return; + text = get_summary_with_location (event->comp_data->icalcomp); for (span_num = 0; span_num < event->num_spans; span_num++) { @@ -2414,21 +2423,36 @@ print_date_label (GtkPrintContext *context, ECalComponent *comp, ECal *client, if (start > 0) write_label_piece (start, buffer, 1024, NULL, NULL); - if (end > 0 && start > 0) + if (end > 0 && start > 0) { + /* Translators: This is part of "START to END" text, + * where START and END are date/times. */ write_label_piece (end, buffer, 1024, _(" to "), NULL); + } if (complete > 0) { - if (start > 0) + if (start > 0) { + /* Translators: This is part of "START to END + * (Completed COMPLETED)", where COMPLETED is a + * completed date/time. */ write_label_piece (complete, buffer, 1024, _(" (Completed "), ")"); - else + } else { + /* Translators: This is part of "Completed COMPLETED", + * where COMPLETED is a completed date/time. */ write_label_piece (complete, buffer, 1024, _("Completed "), NULL); + } } if (due > 0 && complete == 0) { - if (start > 0) + if (start > 0) { + /* Translators: This is part of "START (Due DUE)", + * where START and DUE are dates/times. */ write_label_piece (due, buffer, 1024, _(" (Due "), ")"); - else + } else { + /* Translators: This is part of "Due DUE", + * where DUE is a date/time due the event + * should be finished. */ write_label_piece (due, buffer, 1024, _("Due "), NULL); + } } print_text_size_bold (context, buffer, PANGO_ALIGN_LEFT, |