[gnome-calendar] year-view: add class tagging to events
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] year-view: add class tagging to events
- Date: Thu, 22 Jan 2015 18:52:14 +0000 (UTC)
commit 5aace8e060fa3a40968eba0960e335f181567ede
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Jan 22 13:44:25 2015 -0500
year-view: add class tagging to events
We add three classes:
+ slanted-start
+ slanted-end
+ slanted
Those mean an event who does not start on the first cell is drawn, and event
who does not end on the last cell its drawn and bot things at the same time.
src/gcal-year-view.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index b71aa0c..3ed330f 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -308,11 +308,12 @@ update_sidebar (GcalYearView *year_view)
cloned_child,
(GCompareFunc)
gcal_event_widget_compare_for_single_day);
- if (start_comparison == -1)
- gtk_style_context_add_class (gtk_widget_get_style_context (cloned_child), "slanted-start");
-
end_comparison = icaltime_compare (second_date, *dt_end);
- if (end_comparison == -1)
+ if (start_comparison == -1 && end_comparison == -1)
+ gtk_style_context_add_class (gtk_widget_get_style_context (cloned_child), "slanted");
+ else if (start_comparison == -1)
+ gtk_style_context_add_class (gtk_widget_get_style_context (cloned_child), "slanted-start");
+ else if (end_comparison == -1)
gtk_style_context_add_class (gtk_widget_get_style_context (cloned_child), "slanted-end");
else
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]