aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:11:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:11:48 +0800
commit31fd01398cc76d3c00abbc05d419dfe873bc04c6 (patch)
tree35c238cdb2a8a68936fa659e5269e75ee0042b49 /calendar/gui/e-week-view.c
parentf9049cded460a9e316fa83ff1941970abfe0fd09 (diff)
parent10fef4ac0f4ef7dc907e8bfae9844d4e8be3d80d (diff)
downloadgsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.gz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.bz2
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.lz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.xz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.zst
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.zip
Merge branch 'master' into kill-bonobo
Conflicts: addressbook/util/addressbook.h calendar/gui/e-week-view-main-item.c configure.ac e-util/Makefile.am mail/em-account-editor.c mail/em-folder-selection-button.c shell/e-shell.c
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 1e84aeaea3..6397ce94d1 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -741,6 +741,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)
{
@@ -755,6 +776,8 @@ 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_TODAY_BACKGROUND] = get_today_background (week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]);
+ week_view->colors[E_WEEK_VIEW_COLOR_MONTH_NONWORKING_DAY] = color_inc (week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS], -0x0A0A);
}
static void
@@ -4061,7 +4084,7 @@ e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *
return FALSE;
/* Add a new event covering the selected range. */
- icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)));
+ icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), TRUE);
if (!icalcomp)
return FALSE;
uid = icalcomponent_get_uid (icalcomp);