event: Receive and operate on GcalCalendar

Instead of receiving an ESource, receive a GcalCalendar
and operate on it. Many places needed to be adjusted for
that.

Tests need to be rethinked.
This commit is contained in:
Georges Basile Stavracas Neto
2019-05-04 12:05:39 -03:00
parent 810ef7956b
commit 1118c74881
16 changed files with 168 additions and 107 deletions
+5 -5
View File
@@ -77,14 +77,14 @@ gcal_search_hit_event_get_icon_surface (DzlSuggestion *suggestion,
{
GcalSearchHitEvent *self;
cairo_surface_t *surface;
ESource *source;
GdkRGBA color;
const GdkRGBA *color;
GcalCalendar *calendar;
self = GCAL_SEARCH_HIT_EVENT (suggestion);
source = gcal_event_get_source (self->event);
calendar = gcal_event_get_calendar (self->event);
get_color_name_from_source (source, &color);
surface = get_circle_surface_from_color (&color, 16);
color = gcal_calendar_get_color (calendar);
surface = get_circle_surface_from_color (color, 16);
/* Inject our custom style class into the given widget */
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "calendar-color-image");