aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-03 20:15:16 +0800
committerMilan Crha <mcrha@redhat.com>2009-07-03 20:15:16 +0800
commit044adbe76a1bf09d83ece2ad7944d1d549fa4f34 (patch)
tree97a5b673130fc4dd4d001d2bc2e264684fc0a34f /calendar/gui/e-week-view.c
parentd1f3e3514e8a35b62950aff3ffd7beceff94c807 (diff)
downloadgsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar.gz
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar.bz2
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar.lz
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar.xz
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.tar.zst
gsoc2013-evolution-044adbe76a1bf09d83ece2ad7944d1d549fa4f34.zip
Bug #236996 - Calendar display for weekends in month view
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 7853adda5a..3db7e85e06 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -740,6 +740,27 @@ e_week_view_realize (GtkWidget *widget)
week_view->meeting_icon = e_icon_factory_get_icon ("stock_people", GTK_ICON_SIZE_MENU);
}
+static GdkColor
+color_inc (GdkColor c, gint amount)
+{
+ #define dec(x) \
+ if (x + amount >= 0 \
+ && x + amount <= 0xFFFF) \
+ x += amount; \
+ else if (amount <= 0) \
+ x = 0; \
+ else \
+ x = 0xFFFF;
+
+ dec (c.red);
+ dec (c.green);
+ dec (c.blue);
+
+ #undef dec
+
+ return c;
+}
+
static void
e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget)
{
@@ -754,6 +775,7 @@ e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget)
week_view->colors[E_WEEK_VIEW_COLOR_DATES] = widget->style->text[GTK_STATE_NORMAL];
week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED] = widget->style->text[GTK_STATE_SELECTED];
week_view->colors[E_WEEK_VIEW_COLOR_TODAY] = widget->style->base[GTK_STATE_SELECTED];
+ week_view->colors[E_WEEK_VIEW_COLOR_MONTH_NONWORKING_DAY] = color_inc (week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS], -0x0A0A);
}
static void