diff options
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r-- | calendar/gui/e-day-view.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index bfe848103a..c429f5771f 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1752,6 +1752,38 @@ e_day_view_remove_event_cb (EDayView *day_view, return TRUE; } +/* Checks if the users participation status is Needs action and shows the summary as bold text*/ +static void +set_text_as_bold (EDayViewEvent *event) +{ + ECalComponent *comp; + char *address; + GSList *attendees, *l; + ECalComponentAttendee *at = NULL; + + comp = e_cal_component_new (); + e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp)); + address = itip_get_comp_attendee (comp, event->comp_data->client); + e_cal_component_get_attendee_list (comp, &attendees); + + for (l = attendees; l; l = l->next) { + ECalComponentAttendee *attendee = l->data; + + if (g_str_equal (itip_strip_mailto (attendee->value), address)) { + at = attendee; + break; + } + } + + /* The attendee has not yet accepted the meeting, display the summary as bolded */ + if (at && (at->status == ICAL_PARTSTAT_NEEDSACTION)) { + gnome_canvas_item_set (event->canvas_item, "bold", TRUE, NULL); + } + + e_cal_component_free_attendee_list (attendees); + g_object_unref (comp); + g_free (address); +} /* This updates the text shown for an event. If the event start or end do not lie on a row boundary, the time is displayed before the summary. */ @@ -1847,6 +1879,10 @@ e_day_view_update_event_label (EDayView *day_view, "text", text, NULL); + if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) + && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) + set_text_as_bold (event); + if (free_text) g_free (text); } @@ -1870,6 +1906,10 @@ e_day_view_update_long_event_label (EDayView *day_view, gnome_canvas_item_set (event->canvas_item, "text", summary ? summary : "", NULL); + + if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) + && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) + set_text_as_bold (event); } @@ -5613,7 +5653,6 @@ e_day_view_ensure_rows_visible (EDayView *day_view, } } - static void e_day_view_start_editing_event (EDayView *day_view, gint day, |