aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-01-06 21:26:34 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:15 +0800
commit96f515318489ed04b1383b252ee0d0aed237e4f0 (patch)
treeba3069ea0571f61ff693f6e1789eae8b3a521d65
parent10a155fd9fb8697970678c698c1d8f397a6f9758 (diff)
downloadgsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar.gz
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar.bz2
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar.lz
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar.xz
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.tar.zst
gsoc2013-evolution-96f515318489ed04b1383b252ee0d0aed237e4f0.zip
Bug #638245 - Crash when printing Work Week view
-rw-r--r--calendar/gui/print.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 051dbc7cce..5c62d3c111 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -1356,7 +1356,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
EDayViewEvent *event;
PangoFontDescription *font;
time_t start, end;
- struct pdinfo pdi;
+ struct pdinfo pdi = { 0 };
gint rows_in_top_display, i;
gdouble font_size, max_font_size;
cairo_t *cr;
@@ -1908,7 +1908,7 @@ print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal,
{
icaltimezone *zone;
EWeekViewEvent *event;
- struct psinfo psi;
+ struct psinfo psi = { 0 };
time_t day_start;
gint rows_per_day[E_WEEK_VIEW_MAX_WEEKS * 7], day, event_num;
GArray *spans;
@@ -2431,7 +2431,7 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
EDayViewEvent *event;
PangoFontDescription *font;
time_t start, end;
- struct pdinfo pdi;
+ struct pdinfo pdi = { 0 };
gint rows_in_top_display, i;
gdouble font_size, max_font_size;
cairo_t *cr;
@@ -2459,6 +2459,7 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
pdi.start_minute_offset = pdi.start_hour * 60;
pdi.end_minute_offset = pdi.end_hour * 60;
pdi.use_24_hour_format = e_cal_model_get_use_24_hour_format (model);
+ pdi.zone = e_cal_model_get_timezone (model);
/* Get the events from the server. */
e_cal_model_generate_instances (model, start, end, print_day_details_cb, &pdi);
@@ -2627,7 +2628,7 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
gint i, days = 5;
gchar buf[100];
const gint LONG_EVENT_OFFSET = 6;
- struct pdinfo pdi;
+ struct pdinfo pdi = { 0 };
struct tm tm;
gdouble day_width, day_x;
ECalModel *model;
@@ -2648,6 +2649,7 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
pdi.days_shown = days;
pdi.start_hour = e_cal_model_get_work_day_start_hour (model);
pdi.end_hour = e_cal_model_get_work_day_end_hour (model);
+ pdi.zone = zone;
e_cal_model_generate_instances (model, start, end,
print_work_week_view_cb, &pdi);