aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-top-item.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-29 09:01:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-29 09:33:01 +0800
commit41569bb778e228d4f5a04cb1e15bfa5b49bb044b (patch)
tree3cd61379dbfcca4a9998800bbe9680b87fcb9692 /calendar/gui/e-day-view-top-item.c
parent7bebc31932e74db65e3720f32ab2f6664fd9e58b (diff)
downloadgsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.gz
gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.zst
gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.zip
Trimming redundancy.
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r--calendar/gui/e-day-view-top-item.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 09ed59e6e4..dd497e0f7b 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -369,6 +369,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gint start_day, end_day;
gint item_x, item_y, item_w, item_h;
gint text_x, icon_x, icon_y, icon_x_inc;
+ ECalModel *model;
ECalComponent *comp;
gchar buffer[16];
gint hour, display_hour, minute, offset, time_width, time_x;
@@ -389,6 +390,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdouble x0, y0, rect_height, rect_width, radius;
day_view = dvtitem->day_view;
+ model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
+
cr = gdk_cairo_create (drawable);
gconf_client = gconf_client_get_default ();
@@ -568,7 +571,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
e_day_view_convert_time_to_display (day_view, hour,
&display_hour,
&suffix, &suffix_width);
- if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
+ if (e_cal_model_get_use_24_hour_format (model)) {
g_snprintf (buffer, sizeof (buffer), "%i:%02i",
display_hour, minute);
} else {
@@ -617,7 +620,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
&display_hour,
&suffix,
&suffix_width);
- if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
+ if (e_cal_model_get_use_24_hour_format (model)) {
g_snprintf (buffer, sizeof (buffer),
"%i:%02i", display_hour, minute);
} else {