aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view-main-item.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-08-31 04:50:55 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-08-31 04:50:55 +0800
commitb7f6c874fd5b630fab571462978029cd306e9f74 (patch)
treec7b1a20d90ff49fbf5d658f19ca5c57b31419831 /calendar/gui/e-week-view-main-item.c
parentc03e143c6cf5cbcf5b3408a81071d064bf0cb4df (diff)
downloadgsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar.gz
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar.bz2
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar.lz
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar.xz
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.tar.zst
gsoc2013-evolution-b7f6c874fd5b630fab571462978029cd306e9f74.zip
switched to using new ECalendar widget, and a few other fixes.
2000-08-30 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.[hc]: * gui/e-day-view-main-item.c: * gui/e-week-view.[hc]: * gui/e-week-view-main-item.c: * gui/calendar-commands.c: * gui/gnome-cal.[hc]: switched to using new ECalendar widget, and a few other fixes. svn path=/trunk/; revision=5121
Diffstat (limited to 'calendar/gui/e-week-view-main-item.c')
-rw-r--r--calendar/gui/e-week-view-main-item.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 49c2ca3d7d..d30404305d 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -193,7 +193,7 @@ e_week_view_main_item_draw (GnomeCanvasItem *canvas_item,
if (!g_date_valid (&date))
g_date_set_dmy (&date, 27, 12, 1999);
- num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7;
+ num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
for (day = 0; day < num_days; day++) {
e_week_view_get_day_position (week_view, day,
&day_x, &day_y,
@@ -246,6 +246,8 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
selected_bg_gc = style->bg_gc[GTK_STATE_SELECTED];
gc = week_view->main_gc;
+ g_return_if_fail (gc != NULL);
+
month = g_date_month (date);
day_of_month = g_date_day (date);
line_y = y + E_WEEK_VIEW_DATE_T_PAD + font->ascent
@@ -256,7 +258,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
month starts (defaults are white for odd - January, March, ... and
light gray for even). In the week view the background is always the
same color, the color used for the odd months in the month view. */
- if (week_view->display_month && (month % 2 == 0))
+ if (week_view->multi_week_view && (month % 2 == 0))
bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS];
else
bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS];
@@ -283,7 +285,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
|| week_view->selection_end_day < day)
selected = FALSE;
if (selected) {
- if (week_view->display_month)
+ if (week_view->multi_week_view)
gdk_draw_rectangle (drawable, selected_bg_gc, TRUE,
x + 2, y + 1,
width - 5,
@@ -302,7 +304,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
the 1st of each month, otherwise use "10". */
show_day_name = FALSE;
show_month_name = FALSE;
- if (!week_view->display_month) {
+ if (!week_view->multi_week_view) {
show_day_name = TRUE;
show_month_name = TRUE;
} else if (day == 0 || day_of_month == 1) {
@@ -342,7 +344,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
buffer);
/* Draw the line under the date. */
- if (!week_view->display_month) {
+ if (!week_view->multi_week_view) {
gdk_draw_line (drawable, fg_gc,
x + E_WEEK_VIEW_DATE_LINE_L_PAD, line_y,
right_edge, line_y);