/* EventRow.c generated by valac 0.56.19, the Vala compiler
 * generated from EventRow.vala, do not modify */

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <libical-glib/libical-glib.h>
#include <libedataserver/libedataserver.h>
#include <glib.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include "planify.h"
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <pango/pango.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define WIDGETS_TYPE_EVENT_ROW (widgets_event_row_get_type ())
#define WIDGETS_EVENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_EVENT_ROW, WidgetsEventRow))
#define WIDGETS_EVENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_EVENT_ROW, WidgetsEventRowClass))
#define WIDGETS_IS_EVENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_EVENT_ROW))
#define WIDGETS_IS_EVENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_EVENT_ROW))
#define WIDGETS_EVENT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_EVENT_ROW, WidgetsEventRowClass))

typedef struct _WidgetsEventRow WidgetsEventRow;
typedef struct _WidgetsEventRowClass WidgetsEventRowClass;
typedef struct _WidgetsEventRowPrivate WidgetsEventRowPrivate;
enum  {
	WIDGETS_EVENT_ROW_0_PROPERTY,
	WIDGETS_EVENT_ROW_COMPONENT_PROPERTY,
	WIDGETS_EVENT_ROW_CAL_PROPERTY,
	WIDGETS_EVENT_ROW_SOURCE_PROPERTY,
	WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY,
	WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY,
	WIDGETS_EVENT_ROW_START_TIME_PROPERTY,
	WIDGETS_EVENT_ROW_END_TIME_PROPERTY,
	WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY,
	WIDGETS_EVENT_ROW_NUM_PROPERTIES
};
static GParamSpec* widgets_event_row_properties[WIDGETS_EVENT_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _Block118Data Block118Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))

struct _WidgetsEventRow {
	GtkListBoxRow parent_instance;
	WidgetsEventRowPrivate * priv;
};

struct _WidgetsEventRowClass {
	GtkListBoxRowClass parent_class;
};

struct _WidgetsEventRowPrivate {
	ICalComponent* _component;
	ESourceCalendar* _cal;
	ESource* _source;
	gboolean _show_date;
	GDateTime* _display_date;
	GDateTime* _start_time;
	GDateTime* _end_time;
	gboolean _is_allday;
	GtkGrid* color_grid;
	GtkLabel* time_label;
	GtkLabel* name_label;
	GtkPopover* popover;
	GeeHashMap* signal_map;
};

struct _Block118Data {
	int _ref_count_;
	WidgetsEventRow* self;
	gchar* url;
};

static gint WidgetsEventRow_private_offset;
static gpointer widgets_event_row_parent_class = NULL;

VALA_EXTERN GType widgets_event_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEventRow, g_object_unref)
VALA_EXTERN WidgetsEventRow* widgets_event_row_new (ICalComponent* component,
                                        ESource* source,
                                        gboolean show_date,
                                        GDateTime* display_date);
VALA_EXTERN WidgetsEventRow* widgets_event_row_construct (GType object_type,
                                              ICalComponent* component,
                                              ESource* source,
                                              gboolean show_date,
                                              GDateTime* display_date);
static void widgets_event_row_update_timelabel (WidgetsEventRow* self);
VALA_EXTERN gboolean widgets_event_row_get_show_date (WidgetsEventRow* self);
VALA_EXTERN gboolean widgets_event_row_get_is_allday (WidgetsEventRow* self);
VALA_EXTERN GDateTime* widgets_event_row_get_start_time (WidgetsEventRow* self);
VALA_EXTERN GDateTime* widgets_event_row_get_display_date (WidgetsEventRow* self);
static gchar* widgets_event_row_get_time_range_for_day (WidgetsEventRow* self,
                                                 GDateTime* day,
                                                 const gchar* time_format);
VALA_EXTERN GDateTime* widgets_event_row_get_end_time (WidgetsEventRow* self);
static void widgets_event_row_update_color (WidgetsEventRow* self);
VALA_EXTERN ESourceCalendar* widgets_event_row_get_cal (WidgetsEventRow* self);
static void widgets_event_row_update_times (WidgetsEventRow* self,
                                     ICalComponent* comp);
static void widgets_event_row_set_start_time (WidgetsEventRow* self,
                                       GDateTime* value);
static void widgets_event_row_set_end_time (WidgetsEventRow* self,
                                     GDateTime* value);
static void widgets_event_row_set_is_allday (WidgetsEventRow* self,
                                      gboolean value);
VALA_EXTERN void widgets_event_row_update (WidgetsEventRow* self,
                               ICalComponent* new_component);
static void widgets_event_row_create_popover (WidgetsEventRow* self);
VALA_EXTERN ICalComponent* widgets_event_row_get_component (WidgetsEventRow* self);
static GtkWidget* widgets_event_row_create_info_widget (WidgetsEventRow* self,
                                                 const gchar* icon_name,
                                                 const gchar* header_text,
                                                 GtkWidget* content_widget);
VALA_EXTERN ESource* widgets_event_row_get_source (WidgetsEventRow* self);
static gchar* widgets_event_row_extract_meet_url (WidgetsEventRow* self,
                                           const gchar* description);
static GtkWidget* widgets_event_row_create_meeting_widget (WidgetsEventRow* self,
                                                    const gchar* title,
                                                    const gchar* url);
static gchar* widgets_event_row_extract_teams_url (WidgetsEventRow* self,
                                            const gchar* description);
static gchar* widgets_event_row_extract_zoom_url (WidgetsEventRow* self,
                                           const gchar* description);
static Block118Data* block118_data_ref (Block118Data* _data118_);
static void block118_data_unref (void * _userdata_);
static void __lambda787_ (Block118Data* _data118_);
static void ___lambda787__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN void widgets_event_row_clean_up (WidgetsEventRow* self);
static void widgets_event_row_set_component (WidgetsEventRow* self,
                                      ICalComponent* value);
static void widgets_event_row_set_cal (WidgetsEventRow* self,
                                ESourceCalendar* value);
static void widgets_event_row_set_source (WidgetsEventRow* self,
                                   ESource* value);
static void widgets_event_row_set_show_date (WidgetsEventRow* self,
                                      gboolean value);
static void widgets_event_row_set_display_date (WidgetsEventRow* self,
                                         GDateTime* value);
static GObject * widgets_event_row_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static void _widgets_event_row___lambda788_ (WidgetsEventRow* self);
static void __widgets_event_row___lambda788__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                  gint n_press,
                                                                  gdouble x,
                                                                  gdouble y,
                                                                  gpointer self);
static void _widgets_event_row_update_color_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self);
static void _widgets_event_row_update_timelabel_g_settings_changed (GSettings* _sender,
                                                             const gchar* key,
                                                             gpointer self);
static void widgets_event_row_finalize (GObject * obj);
static GType widgets_event_row_get_type_once (void);
static void _vala_widgets_event_row_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_widgets_event_row_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static GRegex* _tmp_regex_0 = NULL;
static GRegex* _tmp_regex_1 = NULL;
static GRegex* _tmp_regex_2 = NULL;

static inline gpointer
widgets_event_row_get_instance_private (WidgetsEventRow* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsEventRow_private_offset);
}

WidgetsEventRow*
widgets_event_row_construct (GType object_type,
                             ICalComponent* component,
                             ESource* source,
                             gboolean show_date,
                             GDateTime* display_date)
{
	WidgetsEventRow * self = NULL;
	ESourceExtension* _tmp0_;
	g_return_val_if_fail (component != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = e_source_get_extension (source, E_SOURCE_EXTENSION_CALENDAR);
	self = (WidgetsEventRow*) g_object_new (object_type, "component", component, "cal", G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, e_source_calendar_get_type (), ESourceCalendar), "source", source, "show-date", show_date, "display-date", display_date, NULL);
	return self;
}

WidgetsEventRow*
widgets_event_row_new (ICalComponent* component,
                       ESource* source,
                       gboolean show_date,
                       GDateTime* display_date)
{
	return widgets_event_row_construct (WIDGETS_TYPE_EVENT_ROW, component, source, show_date, display_date);
}

static void
widgets_event_row_update_timelabel (WidgetsEventRow* self)
{
	const gchar* _tmp0_ = NULL;
	gchar* time_format = NULL;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	if (utils_datetime_is_clock_format_12h ()) {
		_tmp0_ = "%I:%M %p";
	} else {
		_tmp0_ = "%H:%M";
	}
	_tmp1_ = g_strdup (_tmp0_);
	time_format = _tmp1_;
	_tmp2_ = self->priv->_show_date;
	if (_tmp2_) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_is_allday;
		if (_tmp3_) {
			GtkLabel* _tmp4_;
			GDateTime* _tmp5_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp4_ = self->priv->time_label;
			_tmp5_ = self->priv->_start_time;
			_tmp6_ = g_date_time_format (_tmp5_, "%d %b");
			_tmp7_ = _tmp6_;
			gtk_label_set_label (_tmp4_, _tmp7_);
			_g_free0 (_tmp7_);
		} else {
			GDateTime* _tmp8_ = NULL;
			GDateTime* _tmp9_;
			GtkLabel* _tmp11_;
			GDateTime* _tmp12_;
			gchar* _tmp13_;
			gchar* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			_tmp9_ = self->priv->_display_date;
			_tmp8_ = _tmp9_;
			if (_tmp8_ == NULL) {
				GDateTime* _tmp10_;
				_tmp10_ = self->priv->_start_time;
				_tmp8_ = _tmp10_;
			}
			_tmp11_ = self->priv->time_label;
			_tmp12_ = self->priv->_start_time;
			_tmp13_ = g_date_time_format (_tmp12_, "%d %b · ");
			_tmp14_ = _tmp13_;
			_tmp15_ = time_format;
			_tmp16_ = widgets_event_row_get_time_range_for_day (self, _tmp8_, _tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strconcat (_tmp14_, _tmp17_, NULL);
			_tmp19_ = _tmp18_;
			gtk_label_set_label (_tmp11_, _tmp19_);
			_g_free0 (_tmp19_);
			_g_free0 (_tmp17_);
			_g_free0 (_tmp14_);
		}
	} else {
		gboolean _tmp20_;
		GDateTime* _tmp21_ = NULL;
		GDateTime* _tmp22_;
		GtkLabel* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp20_ = self->priv->_is_allday;
		if (_tmp20_) {
			_g_free0 (time_format);
			return;
		}
		_tmp22_ = self->priv->_display_date;
		_tmp21_ = _tmp22_;
		if (_tmp21_ == NULL) {
			GDateTime* _tmp23_;
			_tmp23_ = self->priv->_start_time;
			_tmp21_ = _tmp23_;
		}
		_tmp24_ = self->priv->time_label;
		_tmp25_ = time_format;
		_tmp26_ = widgets_event_row_get_time_range_for_day (self, _tmp21_, _tmp25_);
		_tmp27_ = _tmp26_;
		gtk_label_set_label (_tmp24_, _tmp27_);
		_g_free0 (_tmp27_);
	}
	_g_free0 (time_format);
}

static gchar*
widgets_event_row_get_time_range_for_day (WidgetsEventRow* self,
                                          GDateTime* day,
                                          const gchar* time_format)
{
	gboolean _tmp0_ = FALSE;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* day_normalized = NULL;
	GDateTime* _tmp7_;
	GDateTime* start_normalized = NULL;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	GDateTime* end_normalized = NULL;
	GDateTime* _tmp12_;
	GDateTime* _tmp13_;
	GDateTime* _tmp14_;
	GDateTime* _tmp15_;
	gboolean is_first_day = FALSE;
	GDateTime* _tmp16_;
	GDateTime* _tmp17_;
	gboolean is_last_day = FALSE;
	GDateTime* _tmp18_;
	GDateTime* _tmp19_;
	const gchar* _tmp20_ = NULL;
	gchar* end_of_day = NULL;
	gchar* _tmp21_;
	const gchar* _tmp22_ = NULL;
	gchar* start_of_day = NULL;
	gchar* _tmp23_;
	gchar* _result_ = NULL;
	gboolean _tmp24_ = FALSE;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (day != NULL, NULL);
	g_return_val_if_fail (time_format != NULL, NULL);
	_tmp1_ = self->priv->_start_time;
	_tmp2_ = self->priv->_end_time;
	if (g_date_time_get_day_of_year (_tmp1_) == g_date_time_get_day_of_year (_tmp2_)) {
		GDateTime* _tmp3_;
		GDateTime* _tmp4_;
		_tmp3_ = self->priv->_start_time;
		_tmp4_ = self->priv->_end_time;
		_tmp0_ = g_date_time_get_year (_tmp3_) == g_date_time_get_year (_tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GDateTime* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = self->priv->_start_time;
		_tmp6_ = g_date_time_format (_tmp5_, time_format);
		result = _tmp6_;
		return result;
	}
	_tmp7_ = g_date_time_new_local (g_date_time_get_year (day), g_date_time_get_month (day), g_date_time_get_day_of_month (day), 0, 0, (gdouble) 0);
	day_normalized = _tmp7_;
	_tmp8_ = self->priv->_start_time;
	_tmp9_ = self->priv->_start_time;
	_tmp10_ = self->priv->_start_time;
	_tmp11_ = g_date_time_new_local (g_date_time_get_year (_tmp8_), g_date_time_get_month (_tmp9_), g_date_time_get_day_of_month (_tmp10_), 0, 0, (gdouble) 0);
	start_normalized = _tmp11_;
	_tmp12_ = self->priv->_end_time;
	_tmp13_ = self->priv->_end_time;
	_tmp14_ = self->priv->_end_time;
	_tmp15_ = g_date_time_new_local (g_date_time_get_year (_tmp12_), g_date_time_get_month (_tmp13_), g_date_time_get_day_of_month (_tmp14_), 0, 0, (gdouble) 0);
	end_normalized = _tmp15_;
	_tmp16_ = day_normalized;
	_tmp17_ = start_normalized;
	is_first_day = g_date_time_equal (_tmp16_, _tmp17_);
	_tmp18_ = day_normalized;
	_tmp19_ = end_normalized;
	is_last_day = g_date_time_equal (_tmp18_, _tmp19_);
	if (utils_datetime_is_clock_format_12h ()) {
		_tmp20_ = "11:59 PM";
	} else {
		_tmp20_ = "23:59";
	}
	_tmp21_ = g_strdup (_tmp20_);
	end_of_day = _tmp21_;
	if (utils_datetime_is_clock_format_12h ()) {
		_tmp22_ = "12:00 AM";
	} else {
		_tmp22_ = "00:00";
	}
	_tmp23_ = g_strdup (_tmp22_);
	start_of_day = _tmp23_;
	if (is_first_day) {
		_tmp24_ = is_last_day;
	} else {
		_tmp24_ = FALSE;
	}
	if (_tmp24_) {
		GDateTime* _tmp25_;
		gchar* _tmp26_;
		_tmp25_ = self->priv->_start_time;
		_tmp26_ = g_date_time_format (_tmp25_, time_format);
		_g_free0 (_result_);
		_result_ = _tmp26_;
	} else {
		if (is_first_day) {
			GDateTime* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp27_ = self->priv->_start_time;
			_tmp28_ = g_date_time_format (_tmp27_, time_format);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_strconcat (_tmp29_, " - ", NULL);
			_tmp31_ = _tmp30_;
			_tmp32_ = end_of_day;
			_tmp33_ = g_strconcat (_tmp31_, _tmp32_, NULL);
			_g_free0 (_result_);
			_result_ = _tmp33_;
			_g_free0 (_tmp31_);
			_g_free0 (_tmp29_);
		} else {
			if (is_last_day) {
				const gchar* _tmp34_;
				gchar* _tmp35_;
				gchar* _tmp36_;
				GDateTime* _tmp37_;
				gchar* _tmp38_;
				gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp34_ = start_of_day;
				_tmp35_ = g_strconcat (_tmp34_, " - ", NULL);
				_tmp36_ = _tmp35_;
				_tmp37_ = self->priv->_end_time;
				_tmp38_ = g_date_time_format (_tmp37_, time_format);
				_tmp39_ = _tmp38_;
				_tmp40_ = g_strconcat (_tmp36_, _tmp39_, NULL);
				_g_free0 (_result_);
				_result_ = _tmp40_;
				_g_free0 (_tmp39_);
				_g_free0 (_tmp36_);
			} else {
				GDateTime* _tmp41_;
				gchar* _tmp42_;
				gchar* _tmp43_;
				GDateTime* _tmp44_;
				gchar* _tmp45_;
				gchar* _tmp46_;
				gchar* _tmp47_;
				gchar* _tmp48_;
				gchar* _tmp49_;
				gchar* _tmp50_;
				GDateTime* _tmp51_;
				gchar* _tmp52_;
				gchar* _tmp53_;
				gchar* _tmp54_;
				gchar* _tmp55_;
				GDateTime* _tmp56_;
				gchar* _tmp57_;
				gchar* _tmp58_;
				gchar* _tmp59_;
				_tmp41_ = self->priv->_start_time;
				_tmp42_ = g_date_time_format (_tmp41_, "%d %b ");
				_tmp43_ = _tmp42_;
				_tmp44_ = self->priv->_start_time;
				_tmp45_ = g_date_time_format (_tmp44_, time_format);
				_tmp46_ = _tmp45_;
				_tmp47_ = g_strconcat (_tmp43_, _tmp46_, NULL);
				_tmp48_ = _tmp47_;
				_tmp49_ = g_strconcat (_tmp48_, " - ", NULL);
				_tmp50_ = _tmp49_;
				_tmp51_ = self->priv->_end_time;
				_tmp52_ = g_date_time_format (_tmp51_, "%d %b ");
				_tmp53_ = _tmp52_;
				_tmp54_ = g_strconcat (_tmp50_, _tmp53_, NULL);
				_tmp55_ = _tmp54_;
				_tmp56_ = self->priv->_end_time;
				_tmp57_ = g_date_time_format (_tmp56_, time_format);
				_tmp58_ = _tmp57_;
				_tmp59_ = g_strconcat (_tmp55_, _tmp58_, NULL);
				_g_free0 (_result_);
				_result_ = _tmp59_;
				_g_free0 (_tmp58_);
				_g_free0 (_tmp55_);
				_g_free0 (_tmp53_);
				_g_free0 (_tmp50_);
				_g_free0 (_tmp48_);
				_g_free0 (_tmp46_);
				_g_free0 (_tmp43_);
			}
		}
	}
	result = _result_;
	_g_free0 (start_of_day);
	_g_free0 (end_of_day);
	_g_date_time_unref0 (end_normalized);
	_g_date_time_unref0 (start_normalized);
	_g_date_time_unref0 (day_normalized);
	return result;
}

static void
widgets_event_row_update_color (WidgetsEventRow* self)
{
	Util* _tmp0_;
	Util* _tmp1_;
	ESourceCalendar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkGrid* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = util_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_cal;
	_tmp3_ = e_source_selectable_dup_color ((ESourceSelectable*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->color_grid;
	util_set_widget_color (_tmp1_, _tmp4_, (GtkWidget*) _tmp5_);
	_g_free0 (_tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
widgets_event_row_update_times (WidgetsEventRow* self,
                                ICalComponent* comp)
{
	ICalTime* dt_start = NULL;
	ICalTime* _tmp0_;
	ICalTime* dt_end = NULL;
	ICalTime* _tmp1_;
	ICalTime* _tmp2_;
	ICalTime* _tmp11_;
	gboolean _tmp20_ = FALSE;
	GDateTime* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (comp != NULL);
	_tmp0_ = i_cal_component_get_dtstart (comp);
	dt_start = _tmp0_;
	_tmp1_ = i_cal_component_get_dtend (comp);
	dt_end = _tmp1_;
	_tmp2_ = dt_start;
	if (i_cal_time_is_date (_tmp2_)) {
		ICalTime* _tmp3_;
		GDateTime* _tmp4_;
		GDateTime* _tmp5_;
		_tmp3_ = dt_start;
		_tmp4_ = calendar_events_util_ical_to_date_time (_tmp3_);
		_tmp5_ = _tmp4_;
		widgets_event_row_set_start_time (self, _tmp5_);
		_g_date_time_unref0 (_tmp5_);
	} else {
		ICalTime* _tmp6_;
		GDateTime* _tmp7_;
		GDateTime* _tmp8_;
		GDateTime* _tmp9_;
		GDateTime* _tmp10_;
		_tmp6_ = dt_start;
		_tmp7_ = calendar_events_util_ical_to_date_time (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_date_time_to_local (_tmp8_);
		_tmp10_ = _tmp9_;
		widgets_event_row_set_start_time (self, _tmp10_);
		_g_date_time_unref0 (_tmp10_);
		_g_date_time_unref0 (_tmp8_);
	}
	_tmp11_ = dt_end;
	if (i_cal_time_is_date (_tmp11_)) {
		ICalTime* _tmp12_;
		GDateTime* _tmp13_;
		GDateTime* _tmp14_;
		_tmp12_ = dt_end;
		_tmp13_ = calendar_events_util_ical_to_date_time (_tmp12_);
		_tmp14_ = _tmp13_;
		widgets_event_row_set_end_time (self, _tmp14_);
		_g_date_time_unref0 (_tmp14_);
	} else {
		ICalTime* _tmp15_;
		GDateTime* _tmp16_;
		GDateTime* _tmp17_;
		GDateTime* _tmp18_;
		GDateTime* _tmp19_;
		_tmp15_ = dt_end;
		_tmp16_ = calendar_events_util_ical_to_date_time (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_date_time_to_local (_tmp17_);
		_tmp19_ = _tmp18_;
		widgets_event_row_set_end_time (self, _tmp19_);
		_g_date_time_unref0 (_tmp19_);
		_g_date_time_unref0 (_tmp17_);
	}
	_tmp21_ = self->priv->_end_time;
	if (_tmp21_ != NULL) {
		GDateTime* _tmp22_;
		GDateTime* _tmp23_;
		_tmp22_ = self->priv->_start_time;
		_tmp23_ = self->priv->_end_time;
		_tmp20_ = calendar_events_util_is_the_all_day (_tmp22_, _tmp23_);
	} else {
		_tmp20_ = FALSE;
	}
	widgets_event_row_set_is_allday (self, _tmp20_);
	_g_object_unref0 (dt_end);
	_g_object_unref0 (dt_start);
}

void
widgets_event_row_update (WidgetsEventRow* self,
                          ICalComponent* new_component)
{
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_component != NULL);
	widgets_event_row_update_times (self, new_component);
	_tmp0_ = self->priv->name_label;
	_tmp1_ = i_cal_component_get_summary (new_component);
	gtk_label_set_label (_tmp0_, _tmp1_);
	widgets_event_row_update_timelabel (self);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
widgets_event_row_create_popover (WidgetsEventRow* self)
{
	GtkLabel* title_label = NULL;
	ICalComponent* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	gchar* date_text = NULL;
	gboolean _tmp5_;
	GtkLabel* date_label = NULL;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar** _tmp55_;
	GtkLabel* _tmp56_ = NULL;
	GtkBox* header_box = NULL;
	GtkBox* _tmp57_;
	GtkBox* _tmp58_;
	GtkLabel* _tmp59_;
	GtkBox* _tmp60_;
	GtkLabel* _tmp61_;
	GDateTime* now = NULL;
	GDateTime* _tmp62_;
	gboolean _tmp63_ = FALSE;
	gboolean _tmp64_ = FALSE;
	gboolean _tmp65_;
	GtkBox* popover_box = NULL;
	GtkBox* _tmp88_ = NULL;
	GtkBox* _tmp89_;
	GtkBox* _tmp90_;
	GtkBox* _tmp91_;
	GtkSeparator* _tmp92_ = NULL;
	GtkSeparator* _tmp93_;
	gchar* location = NULL;
	ICalComponent* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	gboolean _tmp97_ = FALSE;
	const gchar* _tmp98_;
	ICalProperty* organizer_prop = NULL;
	ICalComponent* _tmp106_;
	ICalProperty* _tmp107_;
	ICalProperty* _tmp108_;
	ICalProperty* url_prop = NULL;
	ICalComponent* _tmp124_;
	ICalProperty* _tmp125_;
	ICalProperty* _tmp126_;
	GtkLabel* calendar_label = NULL;
	ESource* _tmp139_;
	gchar* _tmp140_;
	gchar* _tmp141_;
	GtkLabel* _tmp142_ = NULL;
	GtkLabel* _tmp143_;
	GtkBox* _tmp144_;
	GtkLabel* _tmp145_;
	GtkWidget* _tmp146_;
	GtkWidget* _tmp147_;
	gchar* description = NULL;
	ICalComponent* _tmp148_;
	const gchar* _tmp149_;
	gchar* _tmp150_;
	gboolean _tmp151_ = FALSE;
	const gchar* _tmp152_;
	GtkScrolledWindow* popover_scrolled_window = NULL;
	GtkBox* _tmp190_;
	GtkWidget* _tmp191_;
	GtkScrolledWindow* _tmp192_ = NULL;
	GtkWidget* _tmp193_;
	GtkPopover* _tmp194_ = NULL;
	GtkPopover* _tmp195_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_component;
	_tmp1_ = i_cal_component_get_summary (_tmp0_);
	_tmp2_ = g_strdup ("title-4");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new (_tmp1_);
	gtk_label_set_xalign (_tmp4_, (gfloat) 0);
	gtk_label_set_wrap (_tmp4_, TRUE);
	gtk_label_set_selectable (_tmp4_, TRUE);
	gtk_widget_set_can_focus ((GtkWidget*) _tmp4_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	title_label = _tmp4_;
	_tmp5_ = self->priv->_is_allday;
	if (_tmp5_) {
		GDateTime* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = self->priv->_start_time;
		_tmp7_ = g_date_time_format (_tmp6_, "%A, %e de %B");
		_g_free0 (date_text);
		date_text = _tmp7_;
	} else {
		const gchar* _tmp8_ = NULL;
		gchar* time_format = NULL;
		gchar* _tmp9_;
		gboolean _tmp10_ = FALSE;
		GDateTime* _tmp11_;
		GDateTime* _tmp12_;
		if (utils_datetime_is_clock_format_12h ()) {
			_tmp8_ = "%I:%M %p";
		} else {
			_tmp8_ = "%H:%M";
		}
		_tmp9_ = g_strdup (_tmp8_);
		time_format = _tmp9_;
		_tmp11_ = self->priv->_start_time;
		_tmp12_ = self->priv->_end_time;
		if (g_date_time_get_day_of_year (_tmp11_) == g_date_time_get_day_of_year (_tmp12_)) {
			GDateTime* _tmp13_;
			GDateTime* _tmp14_;
			_tmp13_ = self->priv->_start_time;
			_tmp14_ = self->priv->_end_time;
			_tmp10_ = g_date_time_get_year (_tmp13_) == g_date_time_get_year (_tmp14_);
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			GDateTime* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			GDateTime* _tmp18_;
			const gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			GDateTime* _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			_tmp15_ = self->priv->_start_time;
			_tmp16_ = g_date_time_format (_tmp15_, "%A, %e de %B · ");
			_tmp17_ = _tmp16_;
			_tmp18_ = self->priv->_start_time;
			_tmp19_ = time_format;
			_tmp20_ = g_date_time_format (_tmp18_, _tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_strconcat (_tmp17_, _tmp21_, NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = g_strconcat (_tmp23_, " - ", NULL);
			_tmp25_ = _tmp24_;
			_tmp26_ = self->priv->_end_time;
			_tmp27_ = time_format;
			_tmp28_ = g_date_time_format (_tmp26_, _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_strconcat (_tmp25_, _tmp29_, NULL);
			_g_free0 (date_text);
			date_text = _tmp30_;
			_g_free0 (_tmp29_);
			_g_free0 (_tmp25_);
			_g_free0 (_tmp23_);
			_g_free0 (_tmp21_);
			_g_free0 (_tmp17_);
		} else {
			GDateTime* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			GDateTime* _tmp34_;
			const gchar* _tmp35_;
			gchar* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
			gchar* _tmp39_;
			gchar* _tmp40_;
			gchar* _tmp41_;
			GDateTime* _tmp42_;
			gchar* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			gchar* _tmp46_;
			GDateTime* _tmp47_;
			const gchar* _tmp48_;
			gchar* _tmp49_;
			gchar* _tmp50_;
			gchar* _tmp51_;
			_tmp31_ = self->priv->_start_time;
			_tmp32_ = g_date_time_format (_tmp31_, "%e %b ");
			_tmp33_ = _tmp32_;
			_tmp34_ = self->priv->_start_time;
			_tmp35_ = time_format;
			_tmp36_ = g_date_time_format (_tmp34_, _tmp35_);
			_tmp37_ = _tmp36_;
			_tmp38_ = g_strconcat (_tmp33_, _tmp37_, NULL);
			_tmp39_ = _tmp38_;
			_tmp40_ = g_strconcat (_tmp39_, " - ", NULL);
			_tmp41_ = _tmp40_;
			_tmp42_ = self->priv->_end_time;
			_tmp43_ = g_date_time_format (_tmp42_, "%e %b ");
			_tmp44_ = _tmp43_;
			_tmp45_ = g_strconcat (_tmp41_, _tmp44_, NULL);
			_tmp46_ = _tmp45_;
			_tmp47_ = self->priv->_end_time;
			_tmp48_ = time_format;
			_tmp49_ = g_date_time_format (_tmp47_, _tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = g_strconcat (_tmp46_, _tmp50_, NULL);
			_g_free0 (date_text);
			date_text = _tmp51_;
			_g_free0 (_tmp50_);
			_g_free0 (_tmp46_);
			_g_free0 (_tmp44_);
			_g_free0 (_tmp41_);
			_g_free0 (_tmp39_);
			_g_free0 (_tmp37_);
			_g_free0 (_tmp33_);
		}
		_g_free0 (time_format);
	}
	_tmp52_ = date_text;
	_tmp53_ = g_strdup ("dimmed");
	_tmp54_ = g_strdup ("caption");
	_tmp55_ = g_new0 (gchar*, 2 + 1);
	_tmp55_[0] = _tmp53_;
	_tmp55_[1] = _tmp54_;
	_tmp56_ = (GtkLabel*) gtk_label_new (_tmp52_);
	gtk_label_set_xalign (_tmp56_, (gfloat) 0);
	gtk_label_set_wrap (_tmp56_, TRUE);
	gtk_label_set_selectable (_tmp56_, TRUE);
	gtk_widget_set_can_focus ((GtkWidget*) _tmp56_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp56_, _tmp55_);
	_tmp55_ = (_vala_array_free (_tmp55_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp56_);
	date_label = _tmp56_;
	_tmp57_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
	g_object_ref_sink (_tmp57_);
	header_box = _tmp57_;
	_tmp58_ = header_box;
	_tmp59_ = title_label;
	gtk_box_append (_tmp58_, (GtkWidget*) _tmp59_);
	_tmp60_ = header_box;
	_tmp61_ = date_label;
	gtk_box_append (_tmp60_, (GtkWidget*) _tmp61_);
	_tmp62_ = g_date_time_new_now_local ();
	now = _tmp62_;
	_tmp65_ = self->priv->_is_allday;
	if (!_tmp65_) {
		GDateTime* _tmp66_;
		GDateTime* _tmp67_;
		_tmp66_ = self->priv->_start_time;
		_tmp67_ = now;
		_tmp64_ = g_date_time_get_day_of_year (_tmp66_) == g_date_time_get_day_of_year (_tmp67_);
	} else {
		_tmp64_ = FALSE;
	}
	if (_tmp64_) {
		GDateTime* _tmp68_;
		GDateTime* _tmp69_;
		_tmp68_ = self->priv->_start_time;
		_tmp69_ = now;
		_tmp63_ = g_date_time_get_year (_tmp68_) == g_date_time_get_year (_tmp69_);
	} else {
		_tmp63_ = FALSE;
	}
	if (_tmp63_) {
		GTimeSpan time_diff = 0LL;
		GDateTime* _tmp70_;
		GDateTime* _tmp71_;
		gchar* time_status = NULL;
		gchar* _tmp72_;
		const gchar* _tmp80_;
		_tmp70_ = self->priv->_start_time;
		_tmp71_ = now;
		time_diff = g_date_time_difference (_tmp70_, _tmp71_) / G_TIME_SPAN_MINUTE;
		_tmp72_ = g_strdup ("");
		time_status = _tmp72_;
		if (time_diff > ((GTimeSpan) 0)) {
			if (time_diff < ((GTimeSpan) 60)) {
				gchar* _tmp73_;
				_tmp73_ = g_strdup_printf (ngettext ("In %d minute", "In %d minutes", (gulong) time_diff), (gint) time_diff);
				_g_free0 (time_status);
				time_status = _tmp73_;
			} else {
				gchar* _tmp74_;
				_tmp74_ = g_strdup_printf (ngettext ("In %d hour", "In %d hours", (gulong) (time_diff / 60)), (gint) (time_diff / 60));
				_g_free0 (time_status);
				time_status = _tmp74_;
			}
		} else {
			gboolean _tmp75_ = FALSE;
			if (time_diff > ((GTimeSpan) -60)) {
				GDateTime* _tmp76_;
				_tmp76_ = self->priv->_end_time;
				_tmp75_ = _tmp76_ != NULL;
			} else {
				_tmp75_ = FALSE;
			}
			if (_tmp75_) {
				GTimeSpan end_diff = 0LL;
				GDateTime* _tmp77_;
				GDateTime* _tmp78_;
				_tmp77_ = self->priv->_end_time;
				_tmp78_ = now;
				end_diff = g_date_time_difference (_tmp77_, _tmp78_) / G_TIME_SPAN_MINUTE;
				if (end_diff > ((GTimeSpan) 0)) {
					gchar* _tmp79_;
					_tmp79_ = g_strdup (_ ("Happening now"));
					_g_free0 (time_status);
					time_status = _tmp79_;
				}
			}
		}
		_tmp80_ = time_status;
		if (g_strcmp0 (_tmp80_, "") != 0) {
			GtkLabel* time_status_label = NULL;
			const gchar* _tmp81_;
			gchar* _tmp82_;
			gchar* _tmp83_;
			gchar** _tmp84_;
			GtkLabel* _tmp85_ = NULL;
			GtkBox* _tmp86_;
			GtkLabel* _tmp87_;
			_tmp81_ = time_status;
			_tmp82_ = g_strdup ("caption");
			_tmp83_ = g_strdup ("accent");
			_tmp84_ = g_new0 (gchar*, 2 + 1);
			_tmp84_[0] = _tmp82_;
			_tmp84_[1] = _tmp83_;
			_tmp85_ = (GtkLabel*) gtk_label_new (_tmp81_);
			gtk_label_set_xalign (_tmp85_, (gfloat) 0);
			gtk_widget_set_css_classes ((GtkWidget*) _tmp85_, _tmp84_);
			_tmp84_ = (_vala_array_free (_tmp84_, 2, (GDestroyNotify) g_free), NULL);
			g_object_ref_sink (_tmp85_);
			time_status_label = _tmp85_;
			_tmp86_ = header_box;
			_tmp87_ = time_status_label;
			gtk_box_append (_tmp86_, (GtkWidget*) _tmp87_);
			_g_object_unref0 (time_status_label);
		}
		_g_free0 (time_status);
	}
	_tmp88_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp88_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp88_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp88_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp88_, 12);
	g_object_ref_sink (_tmp88_);
	popover_box = _tmp88_;
	_tmp89_ = popover_box;
	_tmp90_ = header_box;
	gtk_box_append (_tmp89_, (GtkWidget*) _tmp90_);
	_tmp91_ = popover_box;
	_tmp92_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp92_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp92_, 3);
	g_object_ref_sink (_tmp92_);
	_tmp93_ = _tmp92_;
	gtk_box_append (_tmp91_, (GtkWidget*) _tmp93_);
	_g_object_unref0 (_tmp93_);
	_tmp94_ = self->priv->_component;
	_tmp95_ = i_cal_component_get_location (_tmp94_);
	_tmp96_ = g_strdup (_tmp95_);
	location = _tmp96_;
	_tmp98_ = location;
	if (_tmp98_ != NULL) {
		const gchar* _tmp99_;
		_tmp99_ = location;
		_tmp97_ = g_strcmp0 (_tmp99_, "") != 0;
	} else {
		_tmp97_ = FALSE;
	}
	if (_tmp97_) {
		GtkLabel* location_label = NULL;
		const gchar* _tmp100_;
		GtkLabel* _tmp101_ = NULL;
		GtkBox* _tmp102_;
		GtkLabel* _tmp103_;
		GtkWidget* _tmp104_;
		GtkWidget* _tmp105_;
		_tmp100_ = location;
		_tmp101_ = (GtkLabel*) gtk_label_new (_tmp100_);
		gtk_label_set_xalign (_tmp101_, (gfloat) 0);
		gtk_label_set_wrap (_tmp101_, TRUE);
		gtk_label_set_selectable (_tmp101_, TRUE);
		gtk_widget_set_can_focus ((GtkWidget*) _tmp101_, FALSE);
		g_object_ref_sink (_tmp101_);
		location_label = _tmp101_;
		_tmp102_ = popover_box;
		_tmp103_ = location_label;
		_tmp104_ = widgets_event_row_create_info_widget (self, "map-marker-symbolic", _ ("Location"), (GtkWidget*) _tmp103_);
		_tmp105_ = _tmp104_;
		gtk_box_append (_tmp102_, _tmp105_);
		_g_object_unref0 (_tmp105_);
		_g_object_unref0 (location_label);
	}
	_tmp106_ = self->priv->_component;
	_tmp107_ = i_cal_component_get_first_property (_tmp106_, I_CAL_ORGANIZER_PROPERTY);
	organizer_prop = _tmp107_;
	_tmp108_ = organizer_prop;
	if (_tmp108_ != NULL) {
		gchar* organizer = NULL;
		ICalProperty* _tmp109_;
		const gchar* _tmp110_;
		gchar* _tmp111_;
		gboolean _tmp112_ = FALSE;
		const gchar* _tmp113_;
		_tmp109_ = organizer_prop;
		_tmp110_ = i_cal_property_get_organizer (_tmp109_);
		_tmp111_ = g_strdup (_tmp110_);
		organizer = _tmp111_;
		_tmp113_ = organizer;
		if (_tmp113_ != NULL) {
			const gchar* _tmp114_;
			_tmp114_ = organizer;
			_tmp112_ = g_strcmp0 (_tmp114_, "") != 0;
		} else {
			_tmp112_ = FALSE;
		}
		if (_tmp112_) {
			GtkLabel* organizer_label = NULL;
			const gchar* _tmp115_;
			gchar* _tmp116_;
			gchar* _tmp117_;
			GtkLabel* _tmp118_ = NULL;
			GtkLabel* _tmp119_;
			GtkBox* _tmp120_;
			GtkLabel* _tmp121_;
			GtkWidget* _tmp122_;
			GtkWidget* _tmp123_;
			_tmp115_ = organizer;
			_tmp116_ = string_replace (_tmp115_, "mailto:", "");
			_tmp117_ = _tmp116_;
			_tmp118_ = (GtkLabel*) gtk_label_new (_tmp117_);
			gtk_label_set_xalign (_tmp118_, (gfloat) 0);
			gtk_label_set_wrap (_tmp118_, TRUE);
			gtk_label_set_selectable (_tmp118_, TRUE);
			gtk_widget_set_can_focus ((GtkWidget*) _tmp118_, FALSE);
			g_object_ref_sink (_tmp118_);
			_tmp119_ = _tmp118_;
			_g_free0 (_tmp117_);
			organizer_label = _tmp119_;
			_tmp120_ = popover_box;
			_tmp121_ = organizer_label;
			_tmp122_ = widgets_event_row_create_info_widget (self, "people-symbolic", _ ("Organizer"), (GtkWidget*) _tmp121_);
			_tmp123_ = _tmp122_;
			gtk_box_append (_tmp120_, _tmp123_);
			_g_object_unref0 (_tmp123_);
			_g_object_unref0 (organizer_label);
		}
		_g_free0 (organizer);
	}
	_tmp124_ = self->priv->_component;
	_tmp125_ = i_cal_component_get_first_property (_tmp124_, I_CAL_URL_PROPERTY);
	url_prop = _tmp125_;
	_tmp126_ = url_prop;
	if (_tmp126_ != NULL) {
		gchar* url = NULL;
		ICalProperty* _tmp127_;
		const gchar* _tmp128_;
		gchar* _tmp129_;
		gboolean _tmp130_ = FALSE;
		const gchar* _tmp131_;
		_tmp127_ = url_prop;
		_tmp128_ = i_cal_property_get_url (_tmp127_);
		_tmp129_ = g_strdup (_tmp128_);
		url = _tmp129_;
		_tmp131_ = url;
		if (_tmp131_ != NULL) {
			const gchar* _tmp132_;
			_tmp132_ = url;
			_tmp130_ = g_strcmp0 (_tmp132_, "") != 0;
		} else {
			_tmp130_ = FALSE;
		}
		if (_tmp130_) {
			GtkLabel* url_label = NULL;
			const gchar* _tmp133_;
			GtkLabel* _tmp134_ = NULL;
			GtkBox* _tmp135_;
			GtkLabel* _tmp136_;
			GtkWidget* _tmp137_;
			GtkWidget* _tmp138_;
			_tmp133_ = url;
			_tmp134_ = (GtkLabel*) gtk_label_new (_tmp133_);
			gtk_label_set_xalign (_tmp134_, (gfloat) 0);
			gtk_label_set_wrap (_tmp134_, TRUE);
			gtk_label_set_selectable (_tmp134_, TRUE);
			gtk_widget_set_can_focus ((GtkWidget*) _tmp134_, FALSE);
			g_object_ref_sink (_tmp134_);
			url_label = _tmp134_;
			_tmp135_ = popover_box;
			_tmp136_ = url_label;
			_tmp137_ = widgets_event_row_create_info_widget (self, "external-link-symbolic", _ ("URL"), (GtkWidget*) _tmp136_);
			_tmp138_ = _tmp137_;
			gtk_box_append (_tmp135_, _tmp138_);
			_g_object_unref0 (_tmp138_);
			_g_object_unref0 (url_label);
		}
		_g_free0 (url);
	}
	_tmp139_ = self->priv->_source;
	_tmp140_ = e_source_dup_display_name (_tmp139_);
	_tmp141_ = _tmp140_;
	_tmp142_ = (GtkLabel*) gtk_label_new (_tmp141_);
	gtk_label_set_xalign (_tmp142_, (gfloat) 0);
	gtk_label_set_wrap (_tmp142_, TRUE);
	gtk_label_set_selectable (_tmp142_, TRUE);
	gtk_widget_set_can_focus ((GtkWidget*) _tmp142_, FALSE);
	g_object_ref_sink (_tmp142_);
	_tmp143_ = _tmp142_;
	_g_free0 (_tmp141_);
	calendar_label = _tmp143_;
	_tmp144_ = popover_box;
	_tmp145_ = calendar_label;
	_tmp146_ = widgets_event_row_create_info_widget (self, "work-week-symbolic", _ ("Calendar"), (GtkWidget*) _tmp145_);
	_tmp147_ = _tmp146_;
	gtk_box_append (_tmp144_, _tmp147_);
	_g_object_unref0 (_tmp147_);
	_tmp148_ = self->priv->_component;
	_tmp149_ = i_cal_component_get_description (_tmp148_);
	_tmp150_ = g_strdup (_tmp149_);
	description = _tmp150_;
	_tmp152_ = description;
	if (_tmp152_ != NULL) {
		const gchar* _tmp153_;
		_tmp153_ = description;
		_tmp151_ = g_strcmp0 (_tmp153_, "") != 0;
	} else {
		_tmp151_ = FALSE;
	}
	if (_tmp151_) {
		gboolean content_added = FALSE;
		gboolean _tmp154_ = FALSE;
		const gchar* _tmp155_;
		content_added = FALSE;
		_tmp155_ = description;
		if (string_contains (_tmp155_, "meet.google.com")) {
			_tmp154_ = TRUE;
		} else {
			const gchar* _tmp156_;
			_tmp156_ = description;
			_tmp154_ = string_contains (_tmp156_, "Google Meet");
		}
		if (_tmp154_) {
			gchar* meet_url = NULL;
			const gchar* _tmp157_;
			gchar* _tmp158_;
			const gchar* _tmp159_;
			_tmp157_ = description;
			_tmp158_ = widgets_event_row_extract_meet_url (self, _tmp157_);
			meet_url = _tmp158_;
			_tmp159_ = meet_url;
			if (_tmp159_ != NULL) {
				GtkBox* _tmp160_;
				const gchar* _tmp161_;
				GtkWidget* _tmp162_;
				GtkWidget* _tmp163_;
				_tmp160_ = popover_box;
				_tmp161_ = meet_url;
				_tmp162_ = widgets_event_row_create_meeting_widget (self, "Google Meet", _tmp161_);
				_tmp163_ = _tmp162_;
				gtk_box_append (_tmp160_, _tmp163_);
				_g_object_unref0 (_tmp163_);
				content_added = TRUE;
			}
			_g_free0 (meet_url);
		} else {
			gboolean _tmp164_ = FALSE;
			const gchar* _tmp165_;
			_tmp165_ = description;
			if (string_contains (_tmp165_, "teams.microsoft.com")) {
				_tmp164_ = TRUE;
			} else {
				const gchar* _tmp166_;
				_tmp166_ = description;
				_tmp164_ = string_contains (_tmp166_, "Microsoft Teams");
			}
			if (_tmp164_) {
				gchar* teams_url = NULL;
				const gchar* _tmp167_;
				gchar* _tmp168_;
				const gchar* _tmp169_;
				_tmp167_ = description;
				_tmp168_ = widgets_event_row_extract_teams_url (self, _tmp167_);
				teams_url = _tmp168_;
				_tmp169_ = teams_url;
				if (_tmp169_ != NULL) {
					GtkBox* _tmp170_;
					const gchar* _tmp171_;
					GtkWidget* _tmp172_;
					GtkWidget* _tmp173_;
					_tmp170_ = popover_box;
					_tmp171_ = teams_url;
					_tmp172_ = widgets_event_row_create_meeting_widget (self, "Microsoft Teams", _tmp171_);
					_tmp173_ = _tmp172_;
					gtk_box_append (_tmp170_, _tmp173_);
					_g_object_unref0 (_tmp173_);
					content_added = TRUE;
				}
				_g_free0 (teams_url);
			} else {
				gboolean _tmp174_ = FALSE;
				const gchar* _tmp175_;
				_tmp175_ = description;
				if (string_contains (_tmp175_, "zoom.us")) {
					_tmp174_ = TRUE;
				} else {
					const gchar* _tmp176_;
					_tmp176_ = description;
					_tmp174_ = string_contains (_tmp176_, "Zoom");
				}
				if (_tmp174_) {
					gchar* zoom_url = NULL;
					const gchar* _tmp177_;
					gchar* _tmp178_;
					const gchar* _tmp179_;
					_tmp177_ = description;
					_tmp178_ = widgets_event_row_extract_zoom_url (self, _tmp177_);
					zoom_url = _tmp178_;
					_tmp179_ = zoom_url;
					if (_tmp179_ != NULL) {
						GtkBox* _tmp180_;
						const gchar* _tmp181_;
						GtkWidget* _tmp182_;
						GtkWidget* _tmp183_;
						_tmp180_ = popover_box;
						_tmp181_ = zoom_url;
						_tmp182_ = widgets_event_row_create_meeting_widget (self, "Zoom", _tmp181_);
						_tmp183_ = _tmp182_;
						gtk_box_append (_tmp180_, _tmp183_);
						_g_object_unref0 (_tmp183_);
						content_added = TRUE;
					}
					_g_free0 (zoom_url);
				}
			}
		}
		if (!content_added) {
			GtkLabel* description_label = NULL;
			const gchar* _tmp184_;
			GtkLabel* _tmp185_ = NULL;
			GtkBox* _tmp186_;
			GtkLabel* _tmp187_;
			GtkWidget* _tmp188_;
			GtkWidget* _tmp189_;
			_tmp184_ = description;
			_tmp185_ = (GtkLabel*) gtk_label_new (_tmp184_);
			gtk_label_set_xalign (_tmp185_, (gfloat) 0);
			gtk_label_set_wrap (_tmp185_, TRUE);
			gtk_label_set_selectable (_tmp185_, TRUE);
			gtk_widget_set_can_focus ((GtkWidget*) _tmp185_, FALSE);
			gtk_label_set_use_markup (_tmp185_, FALSE);
			g_object_ref_sink (_tmp185_);
			description_label = _tmp185_;
			_tmp186_ = popover_box;
			_tmp187_ = description_label;
			_tmp188_ = widgets_event_row_create_info_widget (self, "text-justify-left-symbolic", _ ("Description"), (GtkWidget*) _tmp187_);
			_tmp189_ = _tmp188_;
			gtk_box_append (_tmp186_, _tmp189_);
			_g_object_unref0 (_tmp189_);
			_g_object_unref0 (description_label);
		}
	}
	_tmp190_ = popover_box;
	_tmp191_ = _g_object_ref0 ((GtkWidget*) _tmp190_);
	_tmp192_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp192_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp192_, TRUE);
	g_object_set (_tmp192_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	g_object_set (_tmp192_, "vscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_child (_tmp192_, _tmp191_);
	_g_object_unref0 (_tmp191_);
	g_object_ref_sink (_tmp192_);
	popover_scrolled_window = _tmp192_;
	_tmp193_ = _g_object_ref0 ((GtkWidget*) popover_scrolled_window);
	_tmp194_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_child (_tmp194_, _tmp193_);
	_g_object_unref0 (_tmp193_);
	g_object_set ((GtkWidget*) _tmp194_, "width-request", 275, NULL);
	g_object_ref_sink (_tmp194_);
	_g_object_unref0 (self->priv->popover);
	self->priv->popover = _tmp194_;
	_tmp195_ = self->priv->popover;
	gtk_widget_set_parent ((GtkWidget*) _tmp195_, (GtkWidget*) self);
	_g_object_unref0 (popover_scrolled_window);
	_g_free0 (description);
	_g_object_unref0 (calendar_label);
	_g_object_unref0 (url_prop);
	_g_object_unref0 (organizer_prop);
	_g_free0 (location);
	_g_object_unref0 (popover_box);
	_g_date_time_unref0 (now);
	_g_object_unref0 (header_box);
	_g_object_unref0 (date_label);
	_g_free0 (date_text);
	_g_object_unref0 (title_label);
}

static GtkWidget*
widgets_event_row_create_info_widget (WidgetsEventRow* self,
                                      const gchar* icon_name,
                                      const gchar* header_text,
                                      GtkWidget* content_widget)
{
	GtkGrid* grid = NULL;
	GtkGrid* _tmp0_ = NULL;
	GtkImage* icon = NULL;
	GtkImage* _tmp1_ = NULL;
	GtkLabel* header = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	GtkLabel* _tmp5_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (icon_name != NULL, NULL);
	g_return_val_if_fail (header_text != NULL, NULL);
	g_return_val_if_fail (content_widget != NULL, NULL);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp0_, 6);
	gtk_grid_set_row_spacing (_tmp0_, 6);
	g_object_ref_sink (_tmp0_);
	grid = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name (icon_name);
	gtk_image_set_pixel_size (_tmp1_, 12);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	icon = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) icon, "dimmed");
	_tmp2_ = g_strdup ("caption");
	_tmp3_ = g_strdup ("dimmed");
	_tmp4_ = g_new0 (gchar*, 2 + 1);
	_tmp4_[0] = _tmp2_;
	_tmp4_[1] = _tmp3_;
	_tmp5_ = (GtkLabel*) gtk_label_new (header_text);
	gtk_label_set_xalign (_tmp5_, (gfloat) 0);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp5_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp5_);
	header = _tmp5_;
	gtk_grid_attach (grid, (GtkWidget*) icon, 0, 0, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) header, 1, 0, 1, 1);
	gtk_grid_attach (grid, content_widget, 1, 1, 1, 1);
	result = (GtkWidget*) grid;
	_g_object_unref0 (header);
	_g_object_unref0 (icon);
	return result;
}

static Block118Data*
block118_data_ref (Block118Data* _data118_)
{
	g_atomic_int_inc (&_data118_->_ref_count_);
	return _data118_;
}

static void
block118_data_unref (void * _userdata_)
{
	Block118Data* _data118_;
	_data118_ = (Block118Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data118_->_ref_count_)) {
		WidgetsEventRow* self;
		self = _data118_->self;
		_g_free0 (_data118_->url);
		_g_object_unref0 (self);
		g_slice_free (Block118Data, _data118_);
	}
}

static void
__lambda787_ (Block118Data* _data118_)
{
	WidgetsEventRow* self;
	GError* _inner_error0_ = NULL;
	self = _data118_->self;
	{
		g_app_info_launch_default_for_uri (_data118_->url, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_warning ("EventRow.vala:424: Error opening URL: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda787__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda787_ (self);
}

static GtkWidget*
widgets_event_row_create_meeting_widget (WidgetsEventRow* self,
                                         const gchar* title,
                                         const gchar* url)
{
	Block118Data* _data118_;
	gchar* _tmp0_;
	GtkLabel* header = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	GtkText* url_entry = NULL;
	gchar* _tmp5_;
	GtkText* _tmp6_ = NULL;
	GtkButton* join_button = NULL;
	GtkButton* _tmp7_ = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp8_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (url != NULL, NULL);
	_data118_ = g_slice_new0 (Block118Data);
	_data118_->_ref_count_ = 1;
	_data118_->self = g_object_ref (self);
	_tmp0_ = g_strdup (url);
	_g_free0 (_data118_->url);
	_data118_->url = _tmp0_;
	_tmp1_ = g_strdup ("caption");
	_tmp2_ = g_strdup ("dim-label");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new (title);
	gtk_label_set_xalign (_tmp4_, (gfloat) 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	header = _tmp4_;
	_tmp5_ = g_strdup (_data118_->url);
	_tmp6_ = (GtkText*) gtk_text_new ();
	gtk_editable_set_text ((GtkEditable*) _tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	gtk_editable_set_editable ((GtkEditable*) _tmp6_, FALSE);
	gtk_widget_set_can_focus ((GtkWidget*) _tmp6_, FALSE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, TRUE);
	g_object_ref_sink (_tmp6_);
	url_entry = _tmp6_;
	gtk_widget_add_css_class ((GtkWidget*) url_entry, "caption");
	gtk_widget_add_css_class ((GtkWidget*) url_entry, "accent");
	_tmp7_ = (GtkButton*) gtk_button_new_with_label (_ ("Join"));
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp7_);
	join_button = _tmp7_;
	g_signal_connect_data (join_button, "clicked", (GCallback) ___lambda787__gtk_button_clicked, block118_data_ref (_data118_), (GClosureNotify) block118_data_unref, 0);
	_tmp8_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp8_, 24);
	gtk_grid_set_row_spacing (_tmp8_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 12);
	g_object_ref_sink (_tmp8_);
	grid = _tmp8_;
	gtk_grid_attach (grid, (GtkWidget*) header, 0, 0, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) url_entry, 0, 1, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) join_button, 1, 0, 1, 2);
	result = (GtkWidget*) grid;
	_g_object_unref0 (join_button);
	_g_object_unref0 (url_entry);
	_g_object_unref0 (header);
	block118_data_unref (_data118_);
	_data118_ = NULL;
	return result;
}

static inline GRegex*
_thread_safe_regex_init (GRegex** re,
                         const gchar * pattern,
                         GRegexCompileFlags compile_flags)
{
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, compile_flags, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}

static gpointer
_g_regex_ref0 (gpointer self)
{
	return self ? g_regex_ref (self) : NULL;
}

static gchar*
widgets_event_row_extract_meet_url (WidgetsEventRow* self,
                                    const gchar* description)
{
	GRegex* regex = NULL;
	GRegex* _tmp0_;
	GMatchInfo* match_info = NULL;
	GRegex* _tmp1_;
	GMatchInfo* _tmp2_ = NULL;
	gboolean _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	_tmp0_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_0, "https:\\/\\/meet\\.google\\.com\\/[a-z\\-]+", 0));
	regex = _tmp0_;
	_tmp1_ = regex;
	_tmp3_ = g_regex_match (_tmp1_, description, 0, &_tmp2_);
	_g_match_info_unref0 (match_info);
	match_info = _tmp2_;
	if (_tmp3_) {
		GMatchInfo* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = match_info;
		_tmp5_ = g_match_info_fetch (_tmp4_, 0);
		result = _tmp5_;
		_g_match_info_unref0 (match_info);
		_g_regex_unref0 (regex);
		return result;
	}
	result = NULL;
	_g_match_info_unref0 (match_info);
	_g_regex_unref0 (regex);
	return result;
}

static gchar*
widgets_event_row_extract_teams_url (WidgetsEventRow* self,
                                     const gchar* description)
{
	GRegex* regex = NULL;
	GRegex* _tmp0_;
	GMatchInfo* match_info = NULL;
	GRegex* _tmp1_;
	GMatchInfo* _tmp2_ = NULL;
	gboolean _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	_tmp0_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_1, "https:\\/\\/teams\\.microsoft\\.com\\/l\\/meetup-join\\/[^>\\s]+", 0));
	regex = _tmp0_;
	_tmp1_ = regex;
	_tmp3_ = g_regex_match (_tmp1_, description, 0, &_tmp2_);
	_g_match_info_unref0 (match_info);
	match_info = _tmp2_;
	if (_tmp3_) {
		gchar* url = NULL;
		GMatchInfo* _tmp4_;
		gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = match_info;
		_tmp5_ = g_match_info_fetch (_tmp4_, 0);
		url = _tmp5_;
		_tmp6_ = url;
		_tmp7_ = string_replace (_tmp6_, "&amp;", "&");
		result = _tmp7_;
		_g_free0 (url);
		_g_match_info_unref0 (match_info);
		_g_regex_unref0 (regex);
		return result;
	}
	result = NULL;
	_g_match_info_unref0 (match_info);
	_g_regex_unref0 (regex);
	return result;
}

static gchar*
widgets_event_row_extract_zoom_url (WidgetsEventRow* self,
                                    const gchar* description)
{
	GRegex* regex = NULL;
	GRegex* _tmp0_;
	GMatchInfo* match_info = NULL;
	GRegex* _tmp1_;
	GMatchInfo* _tmp2_ = NULL;
	gboolean _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	_tmp0_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_2, "https:\\/\\/[a-z0-9]+\\.zoom\\.us\\/[^\\s]+", 0));
	regex = _tmp0_;
	_tmp1_ = regex;
	_tmp3_ = g_regex_match (_tmp1_, description, 0, &_tmp2_);
	_g_match_info_unref0 (match_info);
	match_info = _tmp2_;
	if (_tmp3_) {
		GMatchInfo* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = match_info;
		_tmp5_ = g_match_info_fetch (_tmp4_, 0);
		result = _tmp5_;
		_g_match_info_unref0 (match_info);
		_g_regex_unref0 (regex);
		return result;
	}
	result = NULL;
	_g_match_info_unref0 (match_info);
	_g_regex_unref0 (regex);
	return result;
}

void
widgets_event_row_clean_up (WidgetsEventRow* self)
{
	GeeHashMap* _tmp15_;
	GtkPopover* _tmp16_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->signal_map;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_value (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_key (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_handler_disconnect ((GObject*) _tmp11_, (gulong) ((guintptr) _tmp14_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp15_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
	_tmp16_ = self->priv->popover;
	if (_tmp16_ != NULL) {
		GtkPopover* _tmp17_;
		_tmp17_ = self->priv->popover;
		gtk_widget_unparent ((GtkWidget*) _tmp17_);
	}
}

ICalComponent*
widgets_event_row_get_component (WidgetsEventRow* self)
{
	ICalComponent* result;
	ICalComponent* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_component;
	result = _tmp0_;
	return result;
}

static void
widgets_event_row_set_component (WidgetsEventRow* self,
                                 ICalComponent* value)
{
	ICalComponent* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_component (self);
	if (old_value != value) {
		self->priv->_component = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_COMPONENT_PROPERTY]);
	}
}

ESourceCalendar*
widgets_event_row_get_cal (WidgetsEventRow* self)
{
	ESourceCalendar* result;
	ESourceCalendar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_cal;
	result = _tmp0_;
	return result;
}

static void
widgets_event_row_set_cal (WidgetsEventRow* self,
                           ESourceCalendar* value)
{
	ESourceCalendar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_cal (self);
	if (old_value != value) {
		self->priv->_cal = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_CAL_PROPERTY]);
	}
}

ESource*
widgets_event_row_get_source (WidgetsEventRow* self)
{
	ESource* result;
	ESource* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

static void
widgets_event_row_set_source (WidgetsEventRow* self,
                              ESource* value)
{
	ESource* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_source (self);
	if (old_value != value) {
		ESource* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_SOURCE_PROPERTY]);
	}
}

gboolean
widgets_event_row_get_show_date (WidgetsEventRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_date;
	return result;
}

static void
widgets_event_row_set_show_date (WidgetsEventRow* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_show_date (self);
	if (old_value != value) {
		self->priv->_show_date = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY]);
	}
}

GDateTime*
widgets_event_row_get_display_date (WidgetsEventRow* self)
{
	GDateTime* result;
	GDateTime* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_date;
	result = _tmp0_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static void
widgets_event_row_set_display_date (WidgetsEventRow* self,
                                    GDateTime* value)
{
	GDateTime* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_display_date (self);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_display_date);
		self->priv->_display_date = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY]);
	}
}

GDateTime*
widgets_event_row_get_start_time (WidgetsEventRow* self)
{
	GDateTime* result;
	GDateTime* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_start_time;
	result = _tmp0_;
	return result;
}

static void
widgets_event_row_set_start_time (WidgetsEventRow* self,
                                  GDateTime* value)
{
	GDateTime* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_start_time (self);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_start_time);
		self->priv->_start_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_START_TIME_PROPERTY]);
	}
}

GDateTime*
widgets_event_row_get_end_time (WidgetsEventRow* self)
{
	GDateTime* result;
	GDateTime* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_end_time;
	result = _tmp0_;
	return result;
}

static void
widgets_event_row_set_end_time (WidgetsEventRow* self,
                                GDateTime* value)
{
	GDateTime* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_end_time (self);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_end_time);
		self->priv->_end_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_END_TIME_PROPERTY]);
	}
}

gboolean
widgets_event_row_get_is_allday (WidgetsEventRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_allday;
	return result;
}

static void
widgets_event_row_set_is_allday (WidgetsEventRow* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_event_row_get_is_allday (self);
	if (old_value != value) {
		self->priv->_is_allday = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_event_row_properties[WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY]);
	}
}

static void
_widgets_event_row___lambda788_ (WidgetsEventRow* self)
{
	GtkPopover* _tmp0_;
	GtkPopover* _tmp1_;
	_tmp0_ = self->priv->popover;
	if (_tmp0_ == NULL) {
		widgets_event_row_create_popover (self);
	}
	_tmp1_ = self->priv->popover;
	gtk_popover_popup (_tmp1_);
}

static void
__widgets_event_row___lambda788__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                             gint n_press,
                                                             gdouble x,
                                                             gdouble y,
                                                             gpointer self)
{
	_widgets_event_row___lambda788_ ((WidgetsEventRow*) self);
}

static void
_widgets_event_row_update_color_g_object_notify (GObject* _sender,
                                                 GParamSpec* pspec,
                                                 gpointer self)
{
	widgets_event_row_update_color ((WidgetsEventRow*) self);
}

static void
_widgets_event_row_update_timelabel_g_settings_changed (GSettings* _sender,
                                                        const gchar* key,
                                                        gpointer self)
{
	widgets_event_row_update_timelabel ((WidgetsEventRow*) self);
}

static GObject *
widgets_event_row_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsEventRow * self;
	ICalComponent* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	GtkGrid* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkLabel* _tmp7_ = NULL;
	ICalComponent* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	GtkLabel* _tmp12_ = NULL;
	GtkBox* grid = NULL;
	GtkBox* _tmp13_ = NULL;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_;
	GtkBox* _tmp19_;
	GtkGrid* _tmp20_;
	GtkBox* _tmp21_;
	GtkLabel* _tmp22_;
	gchar* description = NULL;
	ICalComponent* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_;
	GtkBox* _tmp36_;
	GtkGestureClick* click_gesture = NULL;
	GtkGestureClick* _tmp37_;
	GtkGestureClick* _tmp38_;
	GtkGestureClick* _tmp39_;
	GtkEventController* _tmp40_;
	GeeHashMap* _tmp41_;
	ESourceCalendar* _tmp42_;
	gulong _tmp43_;
	ESourceCalendar* _tmp44_;
	GeeHashMap* _tmp45_;
	ServicesSettings* _tmp46_;
	ServicesSettings* _tmp47_;
	GSettings* _tmp48_;
	gulong _tmp49_;
	ServicesSettings* _tmp50_;
	ServicesSettings* _tmp51_;
	parent_class = G_OBJECT_CLASS (widgets_event_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_EVENT_ROW, WidgetsEventRow);
	gtk_widget_add_css_class ((GtkWidget*) self, "no-selectable");
	gtk_widget_add_css_class ((GtkWidget*) self, "transition");
	_tmp0_ = self->priv->_component;
	widgets_event_row_update_times (self, _tmp0_);
	_tmp1_ = g_strdup ("event-bar");
	_tmp2_ = g_new0 (gchar*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = (GtkGrid*) gtk_grid_new ();
	g_object_set ((GtkWidget*) _tmp3_, "width-request", 3, NULL);
	g_object_set ((GtkWidget*) _tmp3_, "height-request", 12, NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->color_grid);
	self->priv->color_grid = _tmp3_;
	_tmp4_ = g_strdup ("dimmed");
	_tmp5_ = g_strdup ("caption");
	_tmp6_ = g_new0 (gchar*, 2 + 1);
	_tmp6_[0] = _tmp4_;
	_tmp6_[1] = _tmp5_;
	_tmp7_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp7_, (gfloat) 0);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->time_label);
	self->priv->time_label = _tmp7_;
	_tmp8_ = self->priv->_component;
	_tmp9_ = i_cal_component_get_summary (_tmp8_);
	_tmp10_ = g_strdup ("caption");
	_tmp11_ = g_new0 (gchar*, 1 + 1);
	_tmp11_[0] = _tmp10_;
	_tmp12_ = (GtkLabel*) gtk_label_new (_tmp9_);
	gtk_widget_set_valign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	gtk_label_set_ellipsize (_tmp12_, PANGO_ELLIPSIZE_END);
	gtk_label_set_wrap (_tmp12_, TRUE);
	gtk_label_set_use_markup (_tmp12_, TRUE);
	gtk_label_set_wrap_mode (_tmp12_, PANGO_WRAP_WORD_CHAR);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp12_, 3);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp12_, _tmp11_);
	_tmp11_ = (_vala_array_free (_tmp11_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp12_;
	_tmp13_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp13_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 3);
	g_object_ref_sink (_tmp13_);
	grid = _tmp13_;
	_tmp15_ = self->priv->_is_allday;
	if (!_tmp15_) {
		_tmp14_ = TRUE;
	} else {
		gboolean _tmp16_;
		_tmp16_ = self->priv->_show_date;
		_tmp14_ = _tmp16_;
	}
	if (_tmp14_) {
		GtkBox* _tmp17_;
		GtkLabel* _tmp18_;
		_tmp17_ = grid;
		_tmp18_ = self->priv->time_label;
		gtk_box_append (_tmp17_, (GtkWidget*) _tmp18_);
	}
	_tmp19_ = grid;
	_tmp20_ = self->priv->color_grid;
	gtk_box_append (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = grid;
	_tmp22_ = self->priv->name_label;
	gtk_box_append (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = self->priv->_component;
	_tmp24_ = i_cal_component_get_description (_tmp23_);
	_tmp25_ = g_strdup (_tmp24_);
	description = _tmp25_;
	_tmp27_ = description;
	if (_tmp27_ != NULL) {
		gboolean _tmp28_ = FALSE;
		gboolean _tmp29_ = FALSE;
		const gchar* _tmp30_;
		_tmp30_ = description;
		if (string_contains (_tmp30_, "meet.google.com")) {
			_tmp29_ = TRUE;
		} else {
			const gchar* _tmp31_;
			_tmp31_ = description;
			_tmp29_ = string_contains (_tmp31_, "teams.microsoft.com");
		}
		if (_tmp29_) {
			_tmp28_ = TRUE;
		} else {
			const gchar* _tmp32_;
			_tmp32_ = description;
			_tmp28_ = string_contains (_tmp32_, "zoom.us");
		}
		_tmp26_ = _tmp28_;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		GtkImage* video_icon = NULL;
		GtkImage* _tmp33_ = NULL;
		GtkBox* _tmp34_;
		GtkImage* _tmp35_;
		_tmp33_ = (GtkImage*) gtk_image_new_from_icon_name ("video-camera-symbolic");
		gtk_image_set_pixel_size (_tmp33_, 12);
		gtk_widget_set_valign ((GtkWidget*) _tmp33_, GTK_ALIGN_CENTER);
		gtk_widget_set_margin_top ((GtkWidget*) _tmp33_, 3);
		g_object_ref_sink (_tmp33_);
		video_icon = _tmp33_;
		_tmp34_ = grid;
		_tmp35_ = video_icon;
		gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
		_g_object_unref0 (video_icon);
	}
	_tmp36_ = grid;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp36_);
	_tmp37_ = (GtkGestureClick*) gtk_gesture_click_new ();
	click_gesture = _tmp37_;
	_tmp38_ = click_gesture;
	g_signal_connect_object (_tmp38_, "released", (GCallback) __widgets_event_row___lambda788__gtk_gesture_click_released, self, 0);
	_tmp39_ = click_gesture;
	_tmp40_ = _g_object_ref0 ((GtkEventController*) _tmp39_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp40_);
	widgets_event_row_update_color (self);
	_tmp41_ = self->priv->signal_map;
	_tmp42_ = self->priv->_cal;
	_tmp43_ = g_signal_connect_object ((GObject*) _tmp42_, "notify::color", (GCallback) _widgets_event_row_update_color_g_object_notify, self, 0);
	_tmp44_ = self->priv->_cal;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp41_, (gpointer) ((guintptr) _tmp43_), (GObject*) _tmp44_);
	widgets_event_row_update_timelabel (self);
	_tmp45_ = self->priv->signal_map;
	_tmp46_ = services_settings_get_default ();
	_tmp47_ = _tmp46_;
	_tmp48_ = _tmp47_->settings;
	_tmp49_ = g_signal_connect_object (_tmp48_, "changed::clock-format", (GCallback) _widgets_event_row_update_timelabel_g_settings_changed, self, 0);
	_tmp50_ = services_settings_get_default ();
	_tmp51_ = _tmp50_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp45_, (gpointer) ((guintptr) _tmp49_), (GObject*) _tmp51_);
	_g_object_unref0 (_tmp51_);
	_g_object_unref0 (_tmp47_);
	_g_object_unref0 (click_gesture);
	_g_free0 (description);
	_g_object_unref0 (grid);
	return obj;
}

static void
widgets_event_row_class_init (WidgetsEventRowClass * klass,
                              gpointer klass_data)
{
	widgets_event_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsEventRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_event_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_event_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_event_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_event_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_COMPONENT_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_COMPONENT_PROPERTY] = g_param_spec_object ("component", "component", "component", i_cal_component_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_CAL_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_CAL_PROPERTY] = g_param_spec_object ("cal", "cal", "cal", e_source_calendar_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_SOURCE_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_SOURCE_PROPERTY] = g_param_spec_object ("source", "source", "source", e_source_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY] = g_param_spec_boolean ("show-date", "show-date", "show-date", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY] = g_param_spec_boxed ("display-date", "display-date", "display-date", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_START_TIME_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_START_TIME_PROPERTY] = g_param_spec_boxed ("start-time", "start-time", "start-time", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_END_TIME_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_END_TIME_PROPERTY] = g_param_spec_boxed ("end-time", "end-time", "end-time", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY, widgets_event_row_properties[WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY] = g_param_spec_boolean ("is-allday", "is-allday", "is-allday", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
widgets_event_row_instance_init (WidgetsEventRow * self,
                                 gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = widgets_event_row_get_instance_private (self);
	self->priv->_show_date = FALSE;
	self->priv->_display_date = NULL;
	self->priv->_is_allday = FALSE;
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
}

static void
widgets_event_row_finalize (GObject * obj)
{
	WidgetsEventRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_EVENT_ROW, WidgetsEventRow);
	g_debug ("EventRow.vala:51: Destroying - Widgets.EventRow\n");
	_g_object_unref0 (self->priv->_source);
	_g_date_time_unref0 (self->priv->_display_date);
	_g_date_time_unref0 (self->priv->_start_time);
	_g_date_time_unref0 (self->priv->_end_time);
	_g_object_unref0 (self->priv->color_grid);
	_g_object_unref0 (self->priv->time_label);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->popover);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (widgets_event_row_parent_class)->finalize (obj);
}

static GType
widgets_event_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsEventRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_event_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsEventRow), 0, (GInstanceInitFunc) widgets_event_row_instance_init, NULL };
	GType widgets_event_row_type_id;
	widgets_event_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "WidgetsEventRow", &g_define_type_info, 0);
	WidgetsEventRow_private_offset = g_type_add_instance_private (widgets_event_row_type_id, sizeof (WidgetsEventRowPrivate));
	return widgets_event_row_type_id;
}

GType
widgets_event_row_get_type (void)
{
	static volatile gsize widgets_event_row_type_id__once = 0;
	if (g_once_init_enter (&widgets_event_row_type_id__once)) {
		GType widgets_event_row_type_id;
		widgets_event_row_type_id = widgets_event_row_get_type_once ();
		g_once_init_leave (&widgets_event_row_type_id__once, widgets_event_row_type_id);
	}
	return widgets_event_row_type_id__once;
}

static void
_vala_widgets_event_row_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	WidgetsEventRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_EVENT_ROW, WidgetsEventRow);
	switch (property_id) {
		case WIDGETS_EVENT_ROW_COMPONENT_PROPERTY:
		g_value_set_object (value, widgets_event_row_get_component (self));
		break;
		case WIDGETS_EVENT_ROW_CAL_PROPERTY:
		g_value_set_object (value, widgets_event_row_get_cal (self));
		break;
		case WIDGETS_EVENT_ROW_SOURCE_PROPERTY:
		g_value_set_object (value, widgets_event_row_get_source (self));
		break;
		case WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY:
		g_value_set_boolean (value, widgets_event_row_get_show_date (self));
		break;
		case WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY:
		g_value_set_boxed (value, widgets_event_row_get_display_date (self));
		break;
		case WIDGETS_EVENT_ROW_START_TIME_PROPERTY:
		g_value_set_boxed (value, widgets_event_row_get_start_time (self));
		break;
		case WIDGETS_EVENT_ROW_END_TIME_PROPERTY:
		g_value_set_boxed (value, widgets_event_row_get_end_time (self));
		break;
		case WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY:
		g_value_set_boolean (value, widgets_event_row_get_is_allday (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_event_row_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	WidgetsEventRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_EVENT_ROW, WidgetsEventRow);
	switch (property_id) {
		case WIDGETS_EVENT_ROW_COMPONENT_PROPERTY:
		widgets_event_row_set_component (self, g_value_get_object (value));
		break;
		case WIDGETS_EVENT_ROW_CAL_PROPERTY:
		widgets_event_row_set_cal (self, g_value_get_object (value));
		break;
		case WIDGETS_EVENT_ROW_SOURCE_PROPERTY:
		widgets_event_row_set_source (self, g_value_get_object (value));
		break;
		case WIDGETS_EVENT_ROW_SHOW_DATE_PROPERTY:
		widgets_event_row_set_show_date (self, g_value_get_boolean (value));
		break;
		case WIDGETS_EVENT_ROW_DISPLAY_DATE_PROPERTY:
		widgets_event_row_set_display_date (self, g_value_get_boxed (value));
		break;
		case WIDGETS_EVENT_ROW_START_TIME_PROPERTY:
		widgets_event_row_set_start_time (self, g_value_get_boxed (value));
		break;
		case WIDGETS_EVENT_ROW_END_TIME_PROPERTY:
		widgets_event_row_set_end_time (self, g_value_get_boxed (value));
		break;
		case WIDGETS_EVENT_ROW_IS_ALLDAY_PROPERTY:
		widgets_event_row_set_is_allday (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

