aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorSuman Manjunath <msuman@src.gnome.org>2009-01-07 12:07:10 +0800
committerSuman Manjunath <msuman@src.gnome.org>2009-01-07 12:07:10 +0800
commitb3c048bed92ef986192cfe60926d8110fffb1299 (patch)
tree618b8053d952776f1c2101d915f0a399ced575a8 /calendar/gui
parent7ee6b47dbca198102e63956e1d8f78cdd750a234 (diff)
downloadgsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar.gz
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar.bz2
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar.lz
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar.xz
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.tar.zst
gsoc2013-evolution-b3c048bed92ef986192cfe60926d8110fffb1299.zip
Part of fix for bug #443544 (bugzilla.novell.com) - Handle E_MEETING_FREE_BUSY_FREE.
svn path=/trunk/; revision=37005
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-meeting-attendee.c11
-rw-r--r--calendar/gui/e-meeting-store.c4
-rw-r--r--calendar/gui/e-meeting-time-sel.c1
-rw-r--r--calendar/gui/e-meeting-types.h5
4 files changed, 17 insertions, 4 deletions
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index 3ecee9dd78..413c83894a 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -845,6 +845,10 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
if (compare_times (&period.start, &period.end) > 0)
return FALSE;
+ /* If the busy_type is FREE, then there is no need to render it in UI */
+ if (busy_type == E_MEETING_FREE_BUSY_FREE)
+ goto done;
+
/* If the busy range is not set elsewhere, track it as best we can */
if (!priv->start_busy_range_set) {
if (!g_date_valid (&priv->busy_periods_start.date)) {
@@ -871,6 +875,7 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
}
}
}
+
if (!priv->end_busy_range_set) {
if (!g_date_valid (&priv->busy_periods_end.date)) {
priv->busy_periods_end.date = period.end.date;
@@ -898,12 +903,14 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
}
g_array_append_val (priv->busy_periods, period);
- priv->has_calendar_info = TRUE;
- priv->busy_periods_sorted = FALSE;
period_in_days = g_date_get_julian (&period.end.date) - g_date_get_julian (&period.start.date) + 1;
priv->longest_period_in_days = MAX (priv->longest_period_in_days, period_in_days);
+done:
+ priv->has_calendar_info = TRUE;
+ priv->busy_periods_sorted = FALSE;
+
return TRUE;
}
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 218dbad7e3..e8788f0454 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -1017,6 +1017,10 @@ process_free_busy_comp (EMeetingAttendee *attendee,
busy_type = E_MEETING_FREE_BUSY_TENTATIVE;
break;
+ case ICAL_FBTYPE_FREE:
+ busy_type = E_MEETING_FREE_BUSY_FREE;
+ break;
+
default:
break;
}
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index c3e3bd9104..f9c66449b2 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -649,6 +649,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
e_meeting_time_selector_alloc_named_color (mts, "white", &mts->attendee_list_bg_color);
e_meeting_time_selector_alloc_named_color (mts, "snow4", &mts->meeting_time_bg_color);
+ e_meeting_time_selector_alloc_named_color (mts, "snow", &mts->busy_colors[E_MEETING_FREE_BUSY_FREE]);
e_meeting_time_selector_alloc_named_color (mts, "yellow", &mts->busy_colors[E_MEETING_FREE_BUSY_TENTATIVE]);
e_meeting_time_selector_alloc_named_color (mts, "blue", &mts->busy_colors[E_MEETING_FREE_BUSY_BUSY]);
e_meeting_time_selector_alloc_named_color (mts, "orange4", &mts->busy_colors[E_MEETING_FREE_BUSY_OUT_OF_OFFICE]);
diff --git a/calendar/gui/e-meeting-types.h b/calendar/gui/e-meeting-types.h
index 86c0edc04e..4f7d41eabf 100644
--- a/calendar/gui/e-meeting-types.h
+++ b/calendar/gui/e-meeting-types.h
@@ -48,11 +48,12 @@ typedef struct _EMeetingFreeBusyPeriod EMeetingFreeBusyPeriod;
used as for loop counters, so they should start at 0 and be ordered. */
typedef enum
{
- E_MEETING_FREE_BUSY_TENTATIVE = 0,
+ E_MEETING_FREE_BUSY_TENTATIVE = 0,
E_MEETING_FREE_BUSY_OUT_OF_OFFICE = 1,
E_MEETING_FREE_BUSY_BUSY = 2,
+ E_MEETING_FREE_BUSY_FREE = 3,
- E_MEETING_FREE_BUSY_LAST = 3
+ E_MEETING_FREE_BUSY_LAST = 4
} EMeetingFreeBusyType;
/* This is our representation of a time. We use a GDate to store the day,