/* TaskRow.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from TaskRow.vala, do not modify */

/*
 * Copyright 2019-2023 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <libedataserver/libedataserver.h>
#include <libecal/libecal.h>
#include <libical-glib/libical-glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <granite-7.h>
#include <gdk/gdk.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 TASKS_WIDGETS_TYPE_TASK_ROW (tasks_widgets_task_row_get_type ())
#define TASKS_WIDGETS_TASK_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRow))
#define TASKS_WIDGETS_TASK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRowClass))
#define TASKS_WIDGETS_IS_TASK_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_WIDGETS_TYPE_TASK_ROW))
#define TASKS_WIDGETS_IS_TASK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_WIDGETS_TYPE_TASK_ROW))
#define TASKS_WIDGETS_TASK_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRowClass))

typedef struct _TasksWidgetsTaskRow TasksWidgetsTaskRow;
typedef struct _TasksWidgetsTaskRowClass TasksWidgetsTaskRowClass;
typedef struct _TasksWidgetsTaskRowPrivate TasksWidgetsTaskRowPrivate;

#define TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC (tasks_widgets_entry_popover_generic_get_type ())
#define TASKS_WIDGETS_ENTRY_POPOVER_GENERIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC, TasksWidgetsEntryPopoverGeneric))
#define TASKS_WIDGETS_ENTRY_POPOVER_GENERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC, TasksWidgetsEntryPopoverGenericClass))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_GENERIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_GENERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC))
#define TASKS_WIDGETS_ENTRY_POPOVER_GENERIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_GENERIC, TasksWidgetsEntryPopoverGenericClass))

typedef struct _TasksWidgetsEntryPopoverGeneric TasksWidgetsEntryPopoverGeneric;
typedef struct _TasksWidgetsEntryPopoverGenericClass TasksWidgetsEntryPopoverGenericClass;

#define TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME (tasks_widgets_entry_popover_date_time_get_type ())
#define TASKS_WIDGETS_ENTRY_POPOVER_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME, TasksWidgetsEntryPopoverDateTime))
#define TASKS_WIDGETS_ENTRY_POPOVER_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME, TasksWidgetsEntryPopoverDateTimeClass))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME))
#define TASKS_WIDGETS_ENTRY_POPOVER_DATE_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_DATE_TIME, TasksWidgetsEntryPopoverDateTimeClass))

typedef struct _TasksWidgetsEntryPopoverDateTime TasksWidgetsEntryPopoverDateTime;
typedef struct _TasksWidgetsEntryPopoverDateTimeClass TasksWidgetsEntryPopoverDateTimeClass;

#define TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION (tasks_widgets_entry_popover_location_get_type ())
#define TASKS_WIDGETS_ENTRY_POPOVER_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION, TasksWidgetsEntryPopoverLocation))
#define TASKS_WIDGETS_ENTRY_POPOVER_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION, TasksWidgetsEntryPopoverLocationClass))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION))
#define TASKS_WIDGETS_ENTRY_POPOVER_IS_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION))
#define TASKS_WIDGETS_ENTRY_POPOVER_LOCATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_WIDGETS_ENTRY_POPOVER_TYPE_LOCATION, TasksWidgetsEntryPopoverLocationClass))

typedef struct _TasksWidgetsEntryPopoverLocation TasksWidgetsEntryPopoverLocation;
typedef struct _TasksWidgetsEntryPopoverLocationClass TasksWidgetsEntryPopoverLocationClass;
enum  {
	TASKS_WIDGETS_TASK_ROW_0_PROPERTY,
	TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY,
	TASKS_WIDGETS_TASK_ROW_SOURCE_PROPERTY,
	TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY,
	TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY,
	TASKS_WIDGETS_TASK_ROW_NUM_PROPERTIES
};
static GParamSpec* tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_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 TASKS_TYPE_LOCATION (tasks_location_get_type ())
typedef struct _TasksLocation TasksLocation;
typedef enum  {
	TASKS_LOCATION_PROXIMITY_ARRIVE,
	TASKS_LOCATION_PROXIMITY_DEPART
} TasksLocationProximity;

#define TASKS_TYPE_LOCATION_PROXIMITY (tasks_location_proximity_get_type ())
#define _tasks_location_free0(var) ((var == NULL) ? NULL : (var = (tasks_location_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block37Data Block37Data;

#define TASKS_TYPE_TASK_MODEL (tasks_task_model_get_type ())
#define TASKS_TASK_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_TYPE_TASK_MODEL, TasksTaskModel))
#define TASKS_TASK_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_TYPE_TASK_MODEL, TasksTaskModelClass))
#define TASKS_IS_TASK_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_TYPE_TASK_MODEL))
#define TASKS_IS_TASK_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_TYPE_TASK_MODEL))
#define TASKS_TASK_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_TYPE_TASK_MODEL, TasksTaskModelClass))

typedef struct _TasksTaskModel TasksTaskModel;
typedef struct _TasksTaskModelClass TasksTaskModelClass;
enum  {
	TASKS_WIDGETS_TASK_ROW_TASK_COMPLETED_SIGNAL,
	TASKS_WIDGETS_TASK_ROW_TASK_CHANGED_SIGNAL,
	TASKS_WIDGETS_TASK_ROW_TASK_REMOVED_SIGNAL,
	TASKS_WIDGETS_TASK_ROW_UNSELECT_SIGNAL,
	TASKS_WIDGETS_TASK_ROW_NUM_SIGNALS
};
static guint tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_NUM_SIGNALS] = {0};

struct _TasksWidgetsTaskRow {
	GtkListBoxRow parent_instance;
	TasksWidgetsTaskRowPrivate * priv;
};

struct _TasksWidgetsTaskRowClass {
	GtkListBoxRowClass parent_class;
};

struct _TasksWidgetsTaskRowPrivate {
	gboolean _completed;
	ESource* _source;
	ECalComponent* _task;
	gboolean _is_scheduled_view;
	gboolean created;
	TasksWidgetsEntryPopoverDateTime* due_datetime_popover;
	GtkRevealer* due_datetime_popover_revealer;
	TasksWidgetsEntryPopoverLocation* location_popover;
	GtkRevealer* location_popover_revealer;
	GtkGrid* grid;
	GtkStack* state_stack;
	GtkImage* icon;
	GtkCheckButton* check;
	GtkEntry* summary_entry;
	GtkLabel* description_label;
	GtkRevealer* revealer;
	GtkRevealer* description_label_revealer;
	GtkRevealer* task_detail_revealer;
	GtkRevealer* task_form_revealer;
	GtkTextBuffer* description_textbuffer;
	GtkDragSource* drag_source;
	gint drag_offset_x;
	gint drag_offset_y;
	gboolean had_cards_class;
	gboolean is_canceled;
};

struct _TasksLocation {
	gchar* postal_address;
	gchar* display_name;
	gdouble longitude;
	gdouble latitude;
	gint accuracy;
	TasksLocationProximity proximity;
};

struct _Block37Data {
	int _ref_count_;
	TasksWidgetsTaskRow* self;
	gboolean is_gtask;
};

static gint TasksWidgetsTaskRow_private_offset;
static gpointer tasks_widgets_task_row_parent_class = NULL;
VALA_EXTERN TasksTaskModel* tasks_application_model;

VALA_EXTERN GType tasks_widgets_task_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksWidgetsTaskRow, g_object_unref)
VALA_EXTERN GType tasks_widgets_entry_popover_generic_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksWidgetsEntryPopoverGeneric, g_object_unref)
VALA_EXTERN GType tasks_widgets_entry_popover_date_time_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksWidgetsEntryPopoverDateTime, g_object_unref)
VALA_EXTERN GType tasks_widgets_entry_popover_location_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksWidgetsEntryPopoverLocation, g_object_unref)
static TasksWidgetsTaskRow* tasks_widgets_task_row_new (ECalComponent* task,
                                                 ESource* source);
static TasksWidgetsTaskRow* tasks_widgets_task_row_construct (GType object_type,
                                                       ECalComponent* task,
                                                       ESource* source);
VALA_EXTERN TasksWidgetsTaskRow* tasks_widgets_task_row_new_for_source (ESource* source);
VALA_EXTERN TasksWidgetsTaskRow* tasks_widgets_task_row_construct_for_source (GType object_type,
                                                                  ESource* source);
VALA_EXTERN TasksWidgetsTaskRow* tasks_widgets_task_row_new_for_component (ECalComponent* task,
                                                               ESource* source,
                                                               gboolean is_scheduled_view);
VALA_EXTERN TasksWidgetsTaskRow* tasks_widgets_task_row_construct_for_component (GType object_type,
                                                                     ECalComponent* task,
                                                                     ESource* source,
                                                                     gboolean is_scheduled_view);
static void tasks_widgets_task_row_end_editing (TasksWidgetsTaskRow* self);
VALA_EXTERN void tasks_widgets_task_row_reveal_child_request (TasksWidgetsTaskRow* self,
                                                  gboolean value);
static void tasks_widgets_task_row_reset_form (TasksWidgetsTaskRow* self);
VALA_EXTERN void tasks_widgets_task_row_set_task (TasksWidgetsTaskRow* self,
                                      ECalComponent* value);
VALA_EXTERN ECalComponent* tasks_widgets_task_row_get_task (TasksWidgetsTaskRow* self);
VALA_EXTERN GDateTime* tasks_util_ical_to_date_time_local (ICalTime* date);
VALA_EXTERN void tasks_widgets_entry_popover_generic_set_value (TasksWidgetsEntryPopoverGeneric* self,
                                                    gconstpointer value);
VALA_EXTERN GType tasks_location_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tasks_location_proximity_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TasksLocation* tasks_location_dup (const TasksLocation* self);
VALA_EXTERN void tasks_location_free (TasksLocation* self);
VALA_EXTERN void tasks_location_copy (const TasksLocation* self,
                          TasksLocation* dest);
VALA_EXTERN void tasks_location_destroy (TasksLocation* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TasksLocation, tasks_location_destroy)
VALA_EXTERN TasksLocation* tasks_util_get_ecalcomponent_location (ECalComponent* ecalcomponent);
static void tasks_widgets_task_row_save_task (TasksWidgetsTaskRow* self,
                                       ECalComponent* task);
VALA_EXTERN gconstpointer tasks_widgets_entry_popover_generic_get_value (TasksWidgetsEntryPopoverGeneric* self);
VALA_EXTERN ICalTime* tasks_util_datetimes_to_icaltime (GDateTime* date,
                                            GDateTime* time_local,
                                            ICalTimezone* timezone);
VALA_EXTERN void tasks_util_set_ecalcomponent_location (ECalComponent* ecalcomponent,
                                            TasksLocation* location);
static void tasks_widgets_task_row_task_details_reveal_request (TasksWidgetsTaskRow* self,
                                                         gboolean value);
VALA_EXTERN void tasks_widgets_task_row_update_request (TasksWidgetsTaskRow* self);
VALA_EXTERN gboolean tasks_widgets_task_row_get_is_scheduled_view (TasksWidgetsTaskRow* self);
VALA_EXTERN void tasks_application_set_task_color (ESource* source,
                                       GtkWidget* widget);
VALA_EXTERN ESource* tasks_widgets_task_row_get_source (TasksWidgetsTaskRow* self);
static void tasks_widgets_task_row_set_completed (TasksWidgetsTaskRow* self,
                                           gboolean value);
VALA_EXTERN gboolean tasks_widgets_task_row_get_completed (TasksWidgetsTaskRow* self);
VALA_EXTERN gchar* tasks_util_line_break_to_space (const gchar* str);
static void tasks_widgets_task_row_remove_request (TasksWidgetsTaskRow* self);
static gboolean __lambda52_ (TasksWidgetsTaskRow* self);
static gboolean ___lambda52__gsource_func (gpointer self);
static gboolean tasks_widgets_task_row_calcomponent_created (TasksWidgetsTaskRow* self,
                                                      ECalComponent* comp);
static void tasks_widgets_task_row_build_drag_and_drop (TasksWidgetsTaskRow* self);
static GdkContentProvider* tasks_widgets_task_row_on_drag_prepare (TasksWidgetsTaskRow* self,
                                                            gdouble x,
                                                            gdouble y);
static GdkContentProvider* _tasks_widgets_task_row_on_drag_prepare_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                                     gdouble x,
                                                                                     gdouble y,
                                                                                     gpointer self);
static void tasks_widgets_task_row_on_drag_begin (TasksWidgetsTaskRow* self,
                                           GdkDrag* drag);
static void _tasks_widgets_task_row_on_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                       GdkDrag* drag,
                                                                       gpointer self);
static gboolean tasks_widgets_task_row_on_drag_cancel (TasksWidgetsTaskRow* self,
                                                GdkDrag* drag,
                                                GdkDragCancelReason reason);
static gboolean _tasks_widgets_task_row_on_drag_cancel_gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                                                             GdkDrag* drag,
                                                                             GdkDragCancelReason reason,
                                                                             gpointer self);
static void tasks_widgets_task_row_on_drag_end (TasksWidgetsTaskRow* self,
                                         GdkDrag* drag,
                                         gboolean delete_data);
static void _tasks_widgets_task_row_on_drag_end_gtk_drag_source_drag_end (GtkDragSource* _sender,
                                                                   GdkDrag* drag,
                                                                   gboolean delete_data,
                                                                   gpointer self);
static void tasks_widgets_task_row_set_source (TasksWidgetsTaskRow* self,
                                        ESource* value);
static void tasks_widgets_task_row_set_is_scheduled_view (TasksWidgetsTaskRow* self,
                                                   gboolean value);
static GObject * tasks_widgets_task_row_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static Block37Data* block37_data_ref (Block37Data* _data37_);
static void block37_data_unref (void * _userdata_);
VALA_EXTERN GType tasks_task_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksTaskModel, g_object_unref)
VALA_EXTERN ESourceRegistry* tasks_task_model_get_registry_sync (TasksTaskModel* self,
                                                     GError** error);
VALA_EXTERN gchar* tasks_task_model_get_collection_backend_name (TasksTaskModel* self,
                                                     ESource* source,
                                                     ESourceRegistry* registry);
VALA_EXTERN TasksWidgetsEntryPopoverDateTime* tasks_widgets_entry_popover_date_time_new (void);
VALA_EXTERN TasksWidgetsEntryPopoverDateTime* tasks_widgets_entry_popover_date_time_construct (GType object_type);
VALA_EXTERN void tasks_widgets_entry_popover_date_time_hide_timepicker (TasksWidgetsEntryPopoverDateTime* self);
static gchar* _tasks_widgets_task_row___lambda53_ (Block37Data* _data37_,
                                            GDateTime* value);
VALA_EXTERN gchar* tasks_util_get_relative_date (GDateTime* date_time);
static gchar* __tasks_widgets_task_row___lambda53__tasks_widgets_entry_popover_generic_value_format (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                              gconstpointer value,
                                                                                              gpointer self);
static void _tasks_widgets_task_row___lambda54_ (TasksWidgetsTaskRow* self,
                                          GDateTime* value);
static void __tasks_widgets_task_row___lambda54__tasks_widgets_entry_popover_generic_value_changed (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                             gconstpointer value,
                                                                                             gpointer self);
VALA_EXTERN TasksWidgetsEntryPopoverLocation* tasks_widgets_entry_popover_location_new (void);
VALA_EXTERN TasksWidgetsEntryPopoverLocation* tasks_widgets_entry_popover_location_construct (GType object_type);
static gchar* _tasks_widgets_task_row___lambda55_ (TasksWidgetsTaskRow* self,
                                            TasksLocation* value);
static gchar* __tasks_widgets_task_row___lambda55__tasks_widgets_entry_popover_generic_value_format (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                              gconstpointer value,
                                                                                              gpointer self);
static void _tasks_widgets_task_row___lambda56_ (TasksWidgetsTaskRow* self,
                                          TasksLocation* value);
static void __tasks_widgets_task_row___lambda56__tasks_widgets_entry_popover_generic_value_changed (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                             gconstpointer value,
                                                                                             gpointer self);
static void _tasks_widgets_task_row____lambda57_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row____lambda57__gtk_button_clicked (GtkButton* _sender,
                                                               gpointer self);
static void _tasks_widgets_task_row___lambda58_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda58__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                    gpointer self);
static void _tasks_widgets_task_row___lambda59_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda59__gtk_entry_activate (GtkEntry* _sender,
                                                              gpointer self);
static void _tasks_widgets_task_row___lambda60_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda60__gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                            gpointer self);
static void _tasks_widgets_task_row___lambda61_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda61__gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self);
static void _tasks_widgets_task_row___lambda62_ (TasksWidgetsTaskRow* self,
                                          guint keyval,
                                          guint keycode,
                                          GdkModifierType state);
static void __tasks_widgets_task_row___lambda62__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                 guint keyval,
                                                                                 guint keycode,
                                                                                 GdkModifierType state,
                                                                                 gpointer self);
static void _tasks_widgets_task_row___lambda63_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda63__gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self);
static void _tasks_widgets_task_row___lambda64_ (TasksWidgetsTaskRow* self);
static void __tasks_widgets_task_row___lambda64__g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self);
static void tasks_widgets_task_row_finalize (GObject * obj);
static GType tasks_widgets_task_row_get_type_once (void);
static void _vala_tasks_widgets_task_row_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_tasks_widgets_task_row_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
tasks_widgets_task_row_get_instance_private (TasksWidgetsTaskRow* self)
{
	return G_STRUCT_MEMBER_P (self, TasksWidgetsTaskRow_private_offset);
}

static TasksWidgetsTaskRow*
tasks_widgets_task_row_construct (GType object_type,
                                  ECalComponent* task,
                                  ESource* source)
{
	TasksWidgetsTaskRow * self = NULL;
	g_return_val_if_fail (task != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	self = (TasksWidgetsTaskRow*) g_object_new (object_type, "task", task, "source", source, NULL);
	return self;
}

static TasksWidgetsTaskRow*
tasks_widgets_task_row_new (ECalComponent* task,
                            ESource* source)
{
	return tasks_widgets_task_row_construct (TASKS_WIDGETS_TYPE_TASK_ROW, task, source);
}

TasksWidgetsTaskRow*
tasks_widgets_task_row_construct_for_source (GType object_type,
                                             ESource* source)
{
	TasksWidgetsTaskRow * self = NULL;
	ECalComponent* task = NULL;
	ECalComponent* _tmp0_;
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = e_cal_component_new ();
	task = _tmp0_;
	e_cal_component_set_new_vtype (task, E_CAL_COMPONENT_TODO);
	self = (TasksWidgetsTaskRow*) g_object_new (object_type, "task", task, "source", source, NULL);
	_g_object_unref0 (task);
	return self;
}

TasksWidgetsTaskRow*
tasks_widgets_task_row_new_for_source (ESource* source)
{
	return tasks_widgets_task_row_construct_for_source (TASKS_WIDGETS_TYPE_TASK_ROW, source);
}

TasksWidgetsTaskRow*
tasks_widgets_task_row_construct_for_component (GType object_type,
                                                ECalComponent* task,
                                                ESource* source,
                                                gboolean is_scheduled_view)
{
	TasksWidgetsTaskRow * self = NULL;
	g_return_val_if_fail (task != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	self = (TasksWidgetsTaskRow*) g_object_new (object_type, "source", source, "task", task, "is-scheduled-view", is_scheduled_view, NULL);
	return self;
}

TasksWidgetsTaskRow*
tasks_widgets_task_row_new_for_component (ECalComponent* task,
                                          ESource* source,
                                          gboolean is_scheduled_view)
{
	return tasks_widgets_task_row_construct_for_component (TASKS_WIDGETS_TYPE_TASK_ROW, task, source, is_scheduled_view);
}

static void
tasks_widgets_task_row_end_editing (TasksWidgetsTaskRow* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_UNSELECT_SIGNAL], 0, (GtkListBoxRow*) self);
	tasks_widgets_task_row_reveal_child_request (self, FALSE);
	if (!self->priv->created) {
		tasks_widgets_task_row_reset_form (self);
	}
}

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

static void
tasks_widgets_task_row_reset_form (TasksWidgetsTaskRow* self)
{
	ICalComponent* icalcomponent = NULL;
	ECalComponent* _tmp3_;
	ICalComponent* _tmp4_;
	ICalComponent* _tmp5_;
	const gchar* _tmp6_ = NULL;
	ICalComponent* _tmp7_;
	const gchar* _tmp8_;
	GtkEntry* _tmp11_;
	const gchar* _tmp12_ = NULL;
	ICalComponent* _tmp13_;
	const gchar* _tmp14_;
	GtkTextBuffer* _tmp17_;
	GDateTime* _tmp18_ = NULL;
	ICalComponent* _tmp19_;
	ICalTime* _tmp20_;
	ICalTime* _tmp21_;
	gboolean _tmp22_;
	TasksWidgetsEntryPopoverDateTime* _tmp27_;
	TasksWidgetsEntryPopoverLocation* _tmp28_;
	ECalComponent* _tmp29_;
	TasksLocation* _tmp30_;
	TasksLocation* _tmp31_;
	g_return_if_fail (self != NULL);
	if (!self->priv->created) {
		ECalComponent* empty_task = NULL;
		ECalComponent* _tmp0_;
		ECalComponent* _tmp1_;
		ECalComponent* _tmp2_;
		_tmp0_ = e_cal_component_new ();
		empty_task = _tmp0_;
		_tmp1_ = empty_task;
		e_cal_component_set_new_vtype (_tmp1_, E_CAL_COMPONENT_TODO);
		_tmp2_ = empty_task;
		tasks_widgets_task_row_set_task (self, _tmp2_);
		_g_object_unref0 (empty_task);
	}
	_tmp3_ = self->priv->_task;
	_tmp4_ = e_cal_component_get_icalcomponent (_tmp3_);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	icalcomponent = _tmp5_;
	_tmp7_ = icalcomponent;
	_tmp8_ = i_cal_component_get_summary (_tmp7_);
	if (_tmp8_ == NULL) {
		_tmp6_ = "";
	} else {
		ICalComponent* _tmp9_;
		const gchar* _tmp10_;
		_tmp9_ = icalcomponent;
		_tmp10_ = i_cal_component_get_summary (_tmp9_);
		_tmp6_ = _tmp10_;
	}
	_tmp11_ = self->priv->summary_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp11_, _tmp6_);
	_tmp13_ = icalcomponent;
	_tmp14_ = i_cal_component_get_description (_tmp13_);
	if (_tmp14_ == NULL) {
		_tmp12_ = "";
	} else {
		ICalComponent* _tmp15_;
		const gchar* _tmp16_;
		_tmp15_ = icalcomponent;
		_tmp16_ = i_cal_component_get_description (_tmp15_);
		_tmp12_ = _tmp16_;
	}
	_tmp17_ = self->priv->description_textbuffer;
	g_object_set (_tmp17_, "text", _tmp12_, NULL);
	_tmp19_ = icalcomponent;
	_tmp20_ = i_cal_component_get_due (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = i_cal_time_is_null_time (_tmp21_);
	_g_object_unref0 (_tmp21_);
	if (_tmp22_) {
		_g_date_time_unref0 (_tmp18_);
		_tmp18_ = NULL;
	} else {
		ICalComponent* _tmp23_;
		ICalTime* _tmp24_;
		ICalTime* _tmp25_;
		GDateTime* _tmp26_;
		_tmp23_ = icalcomponent;
		_tmp24_ = i_cal_component_get_due (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = tasks_util_ical_to_date_time_local (_tmp25_);
		_g_date_time_unref0 (_tmp18_);
		_tmp18_ = _tmp26_;
		_g_object_unref0 (_tmp25_);
	}
	_tmp27_ = self->priv->due_datetime_popover;
	tasks_widgets_entry_popover_generic_set_value ((TasksWidgetsEntryPopoverGeneric*) _tmp27_, _tmp18_);
	_tmp28_ = self->priv->location_popover;
	_tmp29_ = self->priv->_task;
	_tmp30_ = tasks_util_get_ecalcomponent_location (_tmp29_);
	_tmp31_ = _tmp30_;
	tasks_widgets_entry_popover_generic_set_value ((TasksWidgetsEntryPopoverGeneric*) _tmp28_, _tmp31_);
	_tasks_location_free0 (_tmp31_);
	_g_date_time_unref0 (_tmp18_);
	_g_object_unref0 (icalcomponent);
}

static void
tasks_widgets_task_row_save_task (TasksWidgetsTaskRow* self,
                                  ECalComponent* task)
{
	ICalComponent* ical_task = NULL;
	ICalComponent* _tmp0_;
	ICalTime* new_icaltime = NULL;
	TasksWidgetsEntryPopoverDateTime* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	ICalComponent* _tmp29_;
	ICalTime* _tmp30_;
	ICalComponent* _tmp31_;
	ICalTime* _tmp32_;
	TasksWidgetsEntryPopoverLocation* _tmp33_;
	gconstpointer _tmp34_;
	gconstpointer _tmp35_;
	ICalComponent* _tmp36_;
	GtkEntry* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	ICalComponent* _tmp40_;
	GtkTextBuffer* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (task != NULL);
	_tmp0_ = e_cal_component_get_icalcomponent (task);
	ical_task = _tmp0_;
	_tmp1_ = self->priv->due_datetime_popover;
	_tmp2_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (((GDateTime*) _tmp3_) == NULL) {
		ICalTime* _tmp4_;
		_tmp4_ = i_cal_time_new_null_time ();
		_g_object_unref0 (new_icaltime);
		new_icaltime = _tmp4_;
	} else {
		ICalTimezone* task_tz = NULL;
		ICalComponent* _tmp5_;
		ICalTime* _tmp6_;
		ICalTime* _tmp7_;
		ICalTimezone* _tmp8_;
		ICalTimezone* _tmp9_;
		ICalTimezone* _tmp10_;
		ICalTimezone* _tmp11_;
		_tmp5_ = ical_task;
		_tmp6_ = i_cal_component_get_due (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = i_cal_time_get_timezone (_tmp7_);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_tmp10_ = _tmp9_;
		_g_object_unref0 (_tmp7_);
		task_tz = _tmp10_;
		_tmp11_ = task_tz;
		if (_tmp11_ != NULL) {
			TasksWidgetsEntryPopoverDateTime* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			TasksWidgetsEntryPopoverDateTime* _tmp15_;
			gconstpointer _tmp16_;
			gconstpointer _tmp17_;
			ICalTimezone* _tmp18_;
			ICalTime* _tmp19_;
			ICalTime* _tmp20_;
			ICalTimezone* _tmp21_;
			_tmp12_ = self->priv->due_datetime_popover;
			_tmp13_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = self->priv->due_datetime_popover;
			_tmp16_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = e_cal_util_get_system_timezone ();
			_tmp19_ = tasks_util_datetimes_to_icaltime ((GDateTime*) _tmp14_, (GDateTime*) _tmp17_, _tmp18_);
			_g_object_unref0 (new_icaltime);
			new_icaltime = _tmp19_;
			_tmp20_ = new_icaltime;
			_tmp21_ = task_tz;
			i_cal_time_convert_to_zone_inplace (_tmp20_, _tmp21_);
		} else {
			TasksWidgetsEntryPopoverDateTime* _tmp22_;
			gconstpointer _tmp23_;
			gconstpointer _tmp24_;
			TasksWidgetsEntryPopoverDateTime* _tmp25_;
			gconstpointer _tmp26_;
			gconstpointer _tmp27_;
			ICalTime* _tmp28_;
			_tmp22_ = self->priv->due_datetime_popover;
			_tmp23_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = self->priv->due_datetime_popover;
			_tmp26_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = tasks_util_datetimes_to_icaltime ((GDateTime*) _tmp24_, (GDateTime*) _tmp27_, NULL);
			_g_object_unref0 (new_icaltime);
			new_icaltime = _tmp28_;
		}
		_g_object_unref0 (task_tz);
	}
	_tmp29_ = ical_task;
	_tmp30_ = new_icaltime;
	i_cal_component_set_due (_tmp29_, _tmp30_);
	_tmp31_ = ical_task;
	_tmp32_ = new_icaltime;
	i_cal_component_set_dtstart (_tmp31_, _tmp32_);
	_tmp33_ = self->priv->location_popover;
	_tmp34_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp33_);
	_tmp35_ = _tmp34_;
	tasks_util_set_ecalcomponent_location (task, (TasksLocation*) _tmp35_);
	_tmp36_ = ical_task;
	_tmp37_ = self->priv->summary_entry;
	_tmp38_ = gtk_editable_get_text ((GtkEditable*) _tmp37_);
	_tmp39_ = _tmp38_;
	i_cal_component_set_summary (_tmp36_, _tmp39_);
	_tmp40_ = ical_task;
	_tmp41_ = self->priv->description_textbuffer;
	g_object_get (_tmp41_, "text", &_tmp42_, NULL);
	_tmp43_ = _tmp42_;
	_tmp44_ = _tmp43_;
	i_cal_component_set_description (_tmp40_, _tmp44_);
	_g_free0 (_tmp44_);
	g_signal_emit (self, tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_CHANGED_SIGNAL], 0, task);
	_g_object_unref0 (new_icaltime);
}

void
tasks_widgets_task_row_reveal_child_request (TasksWidgetsTaskRow* self,
                                             gboolean value)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->task_form_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, value);
	tasks_widgets_task_row_task_details_reveal_request (self, !value);
	if (value) {
		GtkGrid* _tmp1_;
		GtkGrid* _tmp2_;
		GtkEntry* _tmp3_;
		_tmp1_ = self->priv->grid;
		gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "collapsed");
		_tmp2_ = self->priv->grid;
		gtk_widget_add_css_class ((GtkWidget*) _tmp2_, GRANITE_STYLE_CLASS_CARD);
		_tmp3_ = self->priv->summary_entry;
		gtk_entry_set_has_frame (_tmp3_, TRUE);
	} else {
		GtkGrid* _tmp4_;
		GtkGrid* _tmp5_;
		GtkEntry* _tmp6_;
		_tmp4_ = self->priv->grid;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp4_, GRANITE_STYLE_CLASS_CARD);
		_tmp5_ = self->priv->grid;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, "collapsed");
		_tmp6_ = self->priv->summary_entry;
		gtk_entry_set_has_frame (_tmp6_, FALSE);
	}
}

void
tasks_widgets_task_row_update_request (TasksWidgetsTaskRow* self)
{
	gboolean _tmp0_;
	GDateTime* default_due_datetime = NULL;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	GDateTime* _tmp12_;
	GDateTime* _tmp13_;
	gboolean _tmp14_ = FALSE;
	ECalComponent* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_is_scheduled_view;
	if (!_tmp0_) {
		ESource* _tmp1_;
		GtkCheckButton* _tmp2_;
		GtkWidget* _tmp3_;
		_tmp1_ = self->priv->_source;
		_tmp2_ = self->priv->check;
		_tmp3_ = gtk_widget_get_first_child ((GtkWidget*) _tmp2_);
		tasks_application_set_task_color (_tmp1_, _tmp3_);
	}
	_tmp4_ = g_date_time_new_now_local ();
	_tmp5_ = _tmp4_;
	_tmp6_ = g_date_time_add_hours (_tmp5_, 1);
	_tmp7_ = _tmp6_;
	_g_date_time_unref0 (_tmp5_);
	default_due_datetime = _tmp7_;
	_tmp8_ = default_due_datetime;
	_tmp9_ = default_due_datetime;
	_tmp10_ = g_date_time_add_minutes (_tmp8_, -g_date_time_get_minute (_tmp9_));
	_g_date_time_unref0 (default_due_datetime);
	default_due_datetime = _tmp10_;
	_tmp11_ = default_due_datetime;
	_tmp12_ = default_due_datetime;
	_tmp13_ = g_date_time_add_seconds (_tmp11_, -g_date_time_get_seconds (_tmp12_));
	_g_date_time_unref0 (default_due_datetime);
	default_due_datetime = _tmp13_;
	_tmp15_ = self->priv->_task;
	if (_tmp15_ == NULL) {
		_tmp14_ = TRUE;
	} else {
		_tmp14_ = !self->priv->created;
	}
	if (_tmp14_) {
		GtkStack* _tmp16_;
		GtkImage* _tmp17_;
		GtkCheckButton* _tmp18_;
		gboolean _tmp19_;
		GtkEntry* _tmp20_;
		GtkEntry* _tmp21_;
		GtkEntry* _tmp22_;
		GtkRevealer* _tmp23_;
		GtkRevealer* _tmp24_;
		GtkRevealer* _tmp25_;
		GtkRevealer* _tmp26_;
		GtkRevealer* _tmp27_;
		GtkTextBuffer* _tmp28_;
		_tmp16_ = self->priv->state_stack;
		_tmp17_ = self->priv->icon;
		gtk_stack_set_visible_child (_tmp16_, (GtkWidget*) _tmp17_);
		tasks_widgets_task_row_set_completed (self, FALSE);
		_tmp18_ = self->priv->check;
		_tmp19_ = self->priv->_completed;
		gtk_check_button_set_active (_tmp18_, _tmp19_);
		_tmp20_ = self->priv->summary_entry;
		gtk_editable_set_text ((GtkEditable*) _tmp20_, "");
		_tmp21_ = self->priv->summary_entry;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp21_, GRANITE_STYLE_CLASS_DIM_LABEL);
		_tmp22_ = self->priv->summary_entry;
		gtk_entry_set_has_frame (_tmp22_, TRUE);
		_tmp23_ = self->priv->task_detail_revealer;
		gtk_revealer_set_reveal_child (_tmp23_, FALSE);
		_tmp24_ = self->priv->task_detail_revealer;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp24_, GRANITE_STYLE_CLASS_DIM_LABEL);
		_tmp25_ = self->priv->due_datetime_popover_revealer;
		gtk_revealer_set_reveal_child (_tmp25_, FALSE);
		_tmp26_ = self->priv->location_popover_revealer;
		gtk_revealer_set_reveal_child (_tmp26_, FALSE);
		_tmp27_ = self->priv->description_label_revealer;
		gtk_revealer_set_reveal_child (_tmp27_, FALSE);
		_tmp28_ = self->priv->description_textbuffer;
		g_object_set (_tmp28_, "text", "", NULL);
	} else {
		if (self->priv->created) {
			GtkStack* _tmp29_;
			GtkCheckButton* _tmp30_;
			ICalComponent* ical_task = NULL;
			ECalComponent* _tmp31_;
			ICalComponent* _tmp32_;
			ICalComponent* _tmp33_;
			GtkCheckButton* _tmp34_;
			gboolean _tmp35_;
			ICalComponent* _tmp36_;
			const gchar* _tmp37_;
			const gchar* _tmp42_ = NULL;
			ICalComponent* _tmp43_;
			const gchar* _tmp44_;
			GtkEntry* _tmp47_;
			gboolean _tmp48_;
			ICalComponent* _tmp53_;
			ICalTime* _tmp54_;
			ICalTime* _tmp55_;
			gboolean _tmp56_;
			TasksLocation* location = NULL;
			ECalComponent* _tmp66_;
			TasksLocation* _tmp67_;
			TasksLocation* _tmp68_;
			ICalComponent* _tmp73_;
			const gchar* _tmp74_;
			_tmp29_ = self->priv->state_stack;
			_tmp30_ = self->priv->check;
			gtk_stack_set_visible_child (_tmp29_, (GtkWidget*) _tmp30_);
			_tmp31_ = self->priv->_task;
			_tmp32_ = e_cal_component_get_icalcomponent (_tmp31_);
			ical_task = _tmp32_;
			_tmp33_ = ical_task;
			tasks_widgets_task_row_set_completed (self, i_cal_component_get_status (_tmp33_) == I_CAL_STATUS_COMPLETED);
			_tmp34_ = self->priv->check;
			_tmp35_ = self->priv->_completed;
			gtk_check_button_set_active (_tmp34_, _tmp35_);
			_tmp36_ = ical_task;
			_tmp37_ = i_cal_component_get_description (_tmp36_);
			if (_tmp37_ != NULL) {
				GtkTextBuffer* _tmp38_;
				ICalComponent* _tmp39_;
				const gchar* _tmp40_;
				_tmp38_ = self->priv->description_textbuffer;
				_tmp39_ = ical_task;
				_tmp40_ = i_cal_component_get_description (_tmp39_);
				g_object_set (_tmp38_, "text", _tmp40_, NULL);
			} else {
				GtkTextBuffer* _tmp41_;
				_tmp41_ = self->priv->description_textbuffer;
				g_object_set (_tmp41_, "text", "", NULL);
			}
			_tmp43_ = ical_task;
			_tmp44_ = i_cal_component_get_summary (_tmp43_);
			if (_tmp44_ == NULL) {
				_tmp42_ = "";
			} else {
				ICalComponent* _tmp45_;
				const gchar* _tmp46_;
				_tmp45_ = ical_task;
				_tmp46_ = i_cal_component_get_summary (_tmp45_);
				_tmp42_ = _tmp46_;
			}
			_tmp47_ = self->priv->summary_entry;
			gtk_editable_set_text ((GtkEditable*) _tmp47_, _tmp42_);
			_tmp48_ = self->priv->_completed;
			if (_tmp48_) {
				GtkEntry* _tmp49_;
				GtkRevealer* _tmp50_;
				_tmp49_ = self->priv->summary_entry;
				gtk_widget_add_css_class ((GtkWidget*) _tmp49_, GRANITE_STYLE_CLASS_DIM_LABEL);
				_tmp50_ = self->priv->task_detail_revealer;
				gtk_widget_add_css_class ((GtkWidget*) _tmp50_, GRANITE_STYLE_CLASS_DIM_LABEL);
			} else {
				GtkEntry* _tmp51_;
				GtkRevealer* _tmp52_;
				_tmp51_ = self->priv->summary_entry;
				gtk_widget_remove_css_class ((GtkWidget*) _tmp51_, GRANITE_STYLE_CLASS_DIM_LABEL);
				_tmp52_ = self->priv->task_detail_revealer;
				gtk_widget_remove_css_class ((GtkWidget*) _tmp52_, GRANITE_STYLE_CLASS_DIM_LABEL);
			}
			_tmp53_ = ical_task;
			_tmp54_ = i_cal_component_get_due (_tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = i_cal_time_is_null_time (_tmp55_);
			_g_object_unref0 (_tmp55_);
			if (_tmp56_) {
				GtkRevealer* _tmp57_;
				_tmp57_ = self->priv->due_datetime_popover_revealer;
				gtk_revealer_set_reveal_child (_tmp57_, FALSE);
			} else {
				GDateTime* due_datetime = NULL;
				ICalComponent* _tmp58_;
				ICalTime* _tmp59_;
				ICalTime* _tmp60_;
				GDateTime* _tmp61_;
				GDateTime* _tmp62_;
				TasksWidgetsEntryPopoverDateTime* _tmp63_;
				GDateTime* _tmp64_;
				GtkRevealer* _tmp65_;
				_tmp58_ = ical_task;
				_tmp59_ = i_cal_component_get_due (_tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = tasks_util_ical_to_date_time_local (_tmp60_);
				_tmp62_ = _tmp61_;
				_g_object_unref0 (_tmp60_);
				due_datetime = _tmp62_;
				_tmp63_ = self->priv->due_datetime_popover;
				_tmp64_ = due_datetime;
				tasks_widgets_entry_popover_generic_set_value ((TasksWidgetsEntryPopoverGeneric*) _tmp63_, _tmp64_);
				_tmp65_ = self->priv->due_datetime_popover_revealer;
				gtk_revealer_set_reveal_child (_tmp65_, TRUE);
				_g_date_time_unref0 (due_datetime);
			}
			_tmp66_ = self->priv->_task;
			_tmp67_ = tasks_util_get_ecalcomponent_location (_tmp66_);
			location = _tmp67_;
			_tmp68_ = location;
			if (_tmp68_ == NULL) {
				GtkRevealer* _tmp69_;
				_tmp69_ = self->priv->location_popover_revealer;
				gtk_revealer_set_reveal_child (_tmp69_, FALSE);
			} else {
				TasksWidgetsEntryPopoverLocation* _tmp70_;
				TasksLocation* _tmp71_;
				GtkRevealer* _tmp72_;
				_tmp70_ = self->priv->location_popover;
				_tmp71_ = location;
				tasks_widgets_entry_popover_generic_set_value ((TasksWidgetsEntryPopoverGeneric*) _tmp70_, _tmp71_);
				_tmp72_ = self->priv->location_popover_revealer;
				gtk_revealer_set_reveal_child (_tmp72_, TRUE);
			}
			_tmp73_ = ical_task;
			_tmp74_ = i_cal_component_get_description (_tmp73_);
			if (_tmp74_ == NULL) {
				GtkLabel* _tmp75_;
				GtkRevealer* _tmp76_;
				_tmp75_ = self->priv->description_label;
				gtk_label_set_label (_tmp75_, "");
				_tmp76_ = self->priv->description_label_revealer;
				gtk_revealer_set_reveal_child (_tmp76_, FALSE);
			} else {
				gchar* description = NULL;
				ICalComponent* _tmp77_;
				const gchar* _tmp78_;
				gchar* _tmp79_;
				gboolean _tmp80_ = FALSE;
				const gchar* _tmp81_;
				_tmp77_ = ical_task;
				_tmp78_ = i_cal_component_get_description (_tmp77_);
				_tmp79_ = tasks_util_line_break_to_space (_tmp78_);
				description = _tmp79_;
				_tmp81_ = description;
				if (_tmp81_ != NULL) {
					const gchar* _tmp82_;
					gint _tmp83_;
					gint _tmp84_;
					_tmp82_ = description;
					_tmp83_ = strlen (_tmp82_);
					_tmp84_ = _tmp83_;
					_tmp80_ = _tmp84_ > 0;
				} else {
					_tmp80_ = FALSE;
				}
				if (_tmp80_) {
					GtkLabel* _tmp85_;
					const gchar* _tmp86_;
					GtkRevealer* _tmp87_;
					_tmp85_ = self->priv->description_label;
					_tmp86_ = description;
					gtk_label_set_label (_tmp85_, _tmp86_);
					_tmp87_ = self->priv->description_label_revealer;
					gtk_revealer_set_reveal_child (_tmp87_, TRUE);
				} else {
					GtkLabel* _tmp88_;
					GtkRevealer* _tmp89_;
					_tmp88_ = self->priv->description_label;
					gtk_label_set_label (_tmp88_, "");
					_tmp89_ = self->priv->description_label_revealer;
					gtk_revealer_set_reveal_child (_tmp89_, FALSE);
				}
				_g_free0 (description);
			}
			tasks_widgets_task_row_task_details_reveal_request (self, TRUE);
			_tasks_location_free0 (location);
		}
	}
	_g_date_time_unref0 (default_due_datetime);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
tasks_widgets_task_row_task_details_reveal_request (TasksWidgetsTaskRow* self,
                                                    gboolean value)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkRevealer* _tmp12_;
	gboolean _tmp13_ = FALSE;
	GtkRevealer* _tmp17_;
	gboolean _tmp18_ = FALSE;
	GtkRevealer* _tmp22_;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	GtkRevealer* _tmp25_;
	gboolean _tmp26_;
	gboolean _tmp27_;
	GtkRevealer* _tmp34_;
	g_return_if_fail (self != NULL);
	if (value) {
		GtkLabel* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = self->priv->description_label;
		_tmp3_ = gtk_label_get_label (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp1_ = _tmp4_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkLabel* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp5_ = self->priv->description_label;
		_tmp6_ = gtk_label_get_label (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = string_strip (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = strlen (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp0_ = _tmp11_ > 0;
		_g_free0 (_tmp9_);
	} else {
		_tmp0_ = FALSE;
	}
	_tmp12_ = self->priv->description_label_revealer;
	gtk_revealer_set_reveal_child (_tmp12_, _tmp0_);
	if (!value) {
		_tmp13_ = TRUE;
	} else {
		TasksWidgetsEntryPopoverDateTime* _tmp14_;
		gconstpointer _tmp15_;
		gconstpointer _tmp16_;
		_tmp14_ = self->priv->due_datetime_popover;
		_tmp15_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp13_ = ((GDateTime*) _tmp16_) != NULL;
	}
	_tmp17_ = self->priv->due_datetime_popover_revealer;
	gtk_revealer_set_reveal_child (_tmp17_, _tmp13_);
	if (!value) {
		_tmp18_ = TRUE;
	} else {
		TasksWidgetsEntryPopoverLocation* _tmp19_;
		gconstpointer _tmp20_;
		gconstpointer _tmp21_;
		_tmp19_ = self->priv->location_popover;
		_tmp20_ = tasks_widgets_entry_popover_generic_get_value ((TasksWidgetsEntryPopoverGeneric*) _tmp19_);
		_tmp21_ = _tmp20_;
		_tmp18_ = ((TasksLocation*) _tmp21_) != NULL;
	}
	_tmp22_ = self->priv->location_popover_revealer;
	gtk_revealer_set_reveal_child (_tmp22_, _tmp18_);
	_tmp25_ = self->priv->description_label_revealer;
	_tmp26_ = gtk_revealer_get_reveal_child (_tmp25_);
	_tmp27_ = _tmp26_;
	if (_tmp27_) {
		_tmp24_ = TRUE;
	} else {
		GtkRevealer* _tmp28_;
		gboolean _tmp29_;
		gboolean _tmp30_;
		_tmp28_ = self->priv->due_datetime_popover_revealer;
		_tmp29_ = gtk_revealer_get_reveal_child (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp24_ = _tmp30_;
	}
	if (_tmp24_) {
		_tmp23_ = TRUE;
	} else {
		GtkRevealer* _tmp31_;
		gboolean _tmp32_;
		gboolean _tmp33_;
		_tmp31_ = self->priv->location_popover_revealer;
		_tmp32_ = gtk_revealer_get_reveal_child (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp23_ = _tmp33_;
	}
	_tmp34_ = self->priv->task_detail_revealer;
	gtk_revealer_set_reveal_child (_tmp34_, _tmp23_);
}

static gboolean
__lambda52_ (TasksWidgetsTaskRow* self)
{
	gboolean result;
	g_signal_emit_by_name ((GtkWidget*) self, "destroy");
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda52__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda52_ ((TasksWidgetsTaskRow*) self);
	return result;
}

static void
tasks_widgets_task_row_remove_request (TasksWidgetsTaskRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda52__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
tasks_widgets_task_row_calcomponent_created (TasksWidgetsTaskRow* self,
                                             ECalComponent* comp)
{
	ICalTime* created = NULL;
	ICalTime* _tmp0_;
	ICalTime* _tmp1_;
	ICalTime* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (comp != NULL, FALSE);
	if (comp == NULL) {
		result = FALSE;
		return result;
	}
	_tmp0_ = e_cal_component_get_created (comp);
	created = _tmp0_;
	_tmp1_ = created;
	if (_tmp1_ == NULL) {
		result = FALSE;
		_g_object_unref0 (created);
		return result;
	}
	_tmp2_ = created;
	result = i_cal_time_is_valid_time (_tmp2_);
	_g_object_unref0 (created);
	return result;
}

static GdkContentProvider*
_tasks_widgets_task_row_on_drag_prepare_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                 gdouble x,
                                                                 gdouble y,
                                                                 gpointer self)
{
	GdkContentProvider* result;
	result = tasks_widgets_task_row_on_drag_prepare ((TasksWidgetsTaskRow*) self, x, y);
	return result;
}

static void
_tasks_widgets_task_row_on_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                  GdkDrag* drag,
                                                                  gpointer self)
{
	tasks_widgets_task_row_on_drag_begin ((TasksWidgetsTaskRow*) self, drag);
}

static gboolean
_tasks_widgets_task_row_on_drag_cancel_gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                                                    GdkDrag* drag,
                                                                    GdkDragCancelReason reason,
                                                                    gpointer self)
{
	gboolean result;
	result = tasks_widgets_task_row_on_drag_cancel ((TasksWidgetsTaskRow*) self, drag, reason);
	return result;
}

static void
_tasks_widgets_task_row_on_drag_end_gtk_drag_source_drag_end (GtkDragSource* _sender,
                                                              GdkDrag* drag,
                                                              gboolean delete_data,
                                                              gpointer self)
{
	tasks_widgets_task_row_on_drag_end ((TasksWidgetsTaskRow*) self, drag, delete_data);
}

static void
tasks_widgets_task_row_build_drag_and_drop (TasksWidgetsTaskRow* self)
{
	gboolean _tmp0_ = FALSE;
	GtkDragSource* _tmp2_;
	GtkDragSource* _tmp3_;
	GtkEventController* _tmp4_;
	GtkDragSource* _tmp5_;
	GtkDragSource* _tmp6_;
	GtkDragSource* _tmp7_;
	GtkDragSource* _tmp8_;
	g_return_if_fail (self != NULL);
	if (!self->priv->created) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_is_scheduled_view;
		_tmp0_ = _tmp1_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp2_ = gtk_drag_source_new ();
	_g_object_unref0 (self->priv->drag_source);
	self->priv->drag_source = _tmp2_;
	_tmp3_ = self->priv->drag_source;
	_tmp4_ = _g_object_ref0 ((GtkEventController*) _tmp3_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp4_);
	_tmp5_ = self->priv->drag_source;
	g_signal_connect_object (_tmp5_, "prepare", (GCallback) _tasks_widgets_task_row_on_drag_prepare_gtk_drag_source_prepare, self, 0);
	_tmp6_ = self->priv->drag_source;
	g_signal_connect_object (_tmp6_, "drag-begin", (GCallback) _tasks_widgets_task_row_on_drag_begin_gtk_drag_source_drag_begin, self, 0);
	_tmp7_ = self->priv->drag_source;
	g_signal_connect_object (_tmp7_, "drag-cancel", (GCallback) _tasks_widgets_task_row_on_drag_cancel_gtk_drag_source_drag_cancel, self, 0);
	_tmp8_ = self->priv->drag_source;
	g_signal_connect_object (_tmp8_, "drag-end", (GCallback) _tasks_widgets_task_row_on_drag_end_gtk_drag_source_drag_end, self, 0);
}

static GdkContentProvider*
tasks_widgets_task_row_on_drag_prepare (TasksWidgetsTaskRow* self,
                                        gdouble x,
                                        gdouble y)
{
	ESource* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ECalComponent* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	GValue _tmp6_ = {0};
	GdkContentProvider* _tmp7_;
	GdkContentProvider* _tmp8_;
	GdkContentProvider* result;
	g_return_val_if_fail (self != NULL, NULL);
	self->priv->drag_offset_x = (gint) x;
	self->priv->drag_offset_y = (gint) y;
	_tmp0_ = self->priv->_source;
	_tmp1_ = e_source_get_uid (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_task;
	_tmp4_ = e_cal_component_get_uid (_tmp3_);
	_tmp5_ = g_strdup_printf ("task://%s/%s", _tmp2_, _tmp4_);
	g_value_init (&_tmp6_, G_TYPE_STRING);
	g_value_take_string (&_tmp6_, _tmp5_);
	_tmp7_ = gdk_content_provider_new_for_value (&_tmp6_);
	_tmp8_ = _tmp7_;
	G_IS_VALUE (&_tmp6_) ? (g_value_unset (&_tmp6_), NULL) : NULL;
	result = _tmp8_;
	return result;
}

static void
tasks_widgets_task_row_on_drag_begin (TasksWidgetsTaskRow* self,
                                      GdkDrag* drag)
{
	GtkDragSource* _tmp0_;
	GtkWidgetPaintable* _tmp1_;
	GtkWidgetPaintable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (drag != NULL);
	_tmp0_ = self->priv->drag_source;
	_tmp1_ = (GtkWidgetPaintable*) gtk_widget_paintable_new ((GtkWidget*) self);
	_tmp2_ = _tmp1_;
	gtk_drag_source_set_icon (_tmp0_, (GdkPaintable*) _tmp2_, self->priv->drag_offset_x, self->priv->drag_offset_y);
	_g_object_unref0 (_tmp2_);
	self->priv->had_cards_class = gtk_widget_has_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_CARD);
	self->priv->is_canceled = FALSE;
	gtk_widget_add_css_class ((GtkWidget*) self, "drag-active");
	if (self->priv->had_cards_class) {
		gtk_widget_remove_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_CARD);
	}
}

static gboolean
tasks_widgets_task_row_on_drag_cancel (TasksWidgetsTaskRow* self,
                                       GdkDrag* drag,
                                       GdkDragCancelReason reason)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (drag != NULL, FALSE);
	self->priv->is_canceled = TRUE;
	result = TRUE;
	return result;
}

static void
tasks_widgets_task_row_on_drag_end (TasksWidgetsTaskRow* self,
                                    GdkDrag* drag,
                                    gboolean delete_data)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (drag != NULL);
	if (self->priv->is_canceled) {
		gtk_widget_remove_css_class ((GtkWidget*) self, "drag-active");
		if (self->priv->had_cards_class) {
			gtk_widget_add_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_CARD);
		}
	} else {
		GtkWidget* _tmp0_;
		GtkWidget* _tmp1_;
		_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp1_ = _tmp0_;
		gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
		g_signal_emit_by_name ((GtkWidget*) self, "destroy");
	}
}

gboolean
tasks_widgets_task_row_get_completed (TasksWidgetsTaskRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_completed;
	return result;
}

static void
tasks_widgets_task_row_set_completed (TasksWidgetsTaskRow* self,
                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tasks_widgets_task_row_get_completed (self);
	if (old_value != value) {
		self->priv->_completed = value;
		g_object_notify_by_pspec ((GObject *) self, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY]);
	}
}

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

static void
tasks_widgets_task_row_set_source (TasksWidgetsTaskRow* self,
                                   ESource* value)
{
	ESource* old_value;
	g_return_if_fail (self != NULL);
	old_value = tasks_widgets_task_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, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_SOURCE_PROPERTY]);
	}
}

ECalComponent*
tasks_widgets_task_row_get_task (TasksWidgetsTaskRow* self)
{
	ECalComponent* result;
	ECalComponent* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_task;
	result = _tmp0_;
	return result;
}

void
tasks_widgets_task_row_set_task (TasksWidgetsTaskRow* self,
                                 ECalComponent* value)
{
	ECalComponent* old_value;
	g_return_if_fail (self != NULL);
	old_value = tasks_widgets_task_row_get_task (self);
	if (old_value != value) {
		ECalComponent* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_task);
		self->priv->_task = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY]);
	}
}

gboolean
tasks_widgets_task_row_get_is_scheduled_view (TasksWidgetsTaskRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_scheduled_view;
	return result;
}

static void
tasks_widgets_task_row_set_is_scheduled_view (TasksWidgetsTaskRow* self,
                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tasks_widgets_task_row_get_is_scheduled_view (self);
	if (old_value != value) {
		self->priv->_is_scheduled_view = value;
		g_object_notify_by_pspec ((GObject *) self, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY]);
	}
}

static Block37Data*
block37_data_ref (Block37Data* _data37_)
{
	g_atomic_int_inc (&_data37_->_ref_count_);
	return _data37_;
}

static void
block37_data_unref (void * _userdata_)
{
	Block37Data* _data37_;
	_data37_ = (Block37Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data37_->_ref_count_)) {
		TasksWidgetsTaskRow* self;
		self = _data37_->self;
		_g_object_unref0 (self);
		g_slice_free (Block37Data, _data37_);
	}
}

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 gchar*
_tasks_widgets_task_row___lambda53_ (Block37Data* _data37_,
                                     GDateTime* value)
{
	TasksWidgetsTaskRow* self;
	TasksWidgetsEntryPopoverDateTime* _tmp0_;
	GDateTime* today = NULL;
	GDateTime* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GDateTime* _tmp3_;
	gchar* result;
	self = _data37_->self;
	_tmp0_ = self->priv->due_datetime_popover;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp0_, "error");
	if (value == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = g_date_time_new_now_local ();
	today = _tmp1_;
	_tmp3_ = today;
	if (g_date_time_compare (_tmp3_, value) > 0) {
		gboolean _tmp4_;
		_tmp4_ = self->priv->_completed;
		_tmp2_ = !_tmp4_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		TasksWidgetsEntryPopoverDateTime* _tmp5_;
		_tmp5_ = self->priv->due_datetime_popover;
		gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "error");
	}
	if (_data37_->is_gtask) {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_is_scheduled_view;
		if (_tmp6_) {
			result = NULL;
			_g_date_time_unref0 (today);
			return result;
		} else {
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp7_ = tasks_util_get_relative_date (value);
			_tmp8_ = _tmp7_;
			_tmp9_ = g_strdup_printf (_ ("%s"), _tmp8_);
			_tmp10_ = _tmp9_;
			_g_free0 (_tmp8_);
			result = _tmp10_;
			_g_date_time_unref0 (today);
			return result;
		}
	} else {
		GSettings* h24_settings = NULL;
		GSettings* _tmp11_;
		gchar* format = NULL;
		GSettings* _tmp12_;
		gchar* _tmp13_;
		gboolean _tmp14_;
		_tmp11_ = g_settings_new ("org.gnome.desktop.interface");
		h24_settings = _tmp11_;
		_tmp12_ = h24_settings;
		_tmp13_ = g_settings_get_string (_tmp12_, "clock-format");
		format = _tmp13_;
		_tmp14_ = self->priv->_is_scheduled_view;
		if (_tmp14_) {
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			_tmp15_ = format;
			_tmp16_ = granite_date_time_get_default_time_format (string_contains (_tmp15_, "12h"), FALSE);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_date_time_format (value, _tmp17_);
			_tmp19_ = _tmp18_;
			_tmp20_ = g_strdup_printf (_ ("%s"), _tmp19_);
			_tmp21_ = _tmp20_;
			_g_free0 (_tmp19_);
			_g_free0 (_tmp17_);
			result = _tmp21_;
			_g_free0 (format);
			_g_object_unref0 (h24_settings);
			_g_date_time_unref0 (today);
			return result;
		} else {
			gchar* _tmp22_;
			gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			_tmp22_ = tasks_util_get_relative_date (value);
			_tmp23_ = _tmp22_;
			_tmp24_ = format;
			_tmp25_ = granite_date_time_get_default_time_format (string_contains (_tmp24_, "12h"), FALSE);
			_tmp26_ = _tmp25_;
			_tmp27_ = g_date_time_format (value, _tmp26_);
			_tmp28_ = _tmp27_;
			_tmp29_ = g_strdup_printf (_ ("%s at %s"), _tmp23_, _tmp28_);
			_tmp30_ = _tmp29_;
			_g_free0 (_tmp28_);
			_g_free0 (_tmp26_);
			_g_free0 (_tmp23_);
			result = _tmp30_;
			_g_free0 (format);
			_g_object_unref0 (h24_settings);
			_g_date_time_unref0 (today);
			return result;
		}
		_g_free0 (format);
		_g_object_unref0 (h24_settings);
	}
	_g_date_time_unref0 (today);
}

static gchar*
__tasks_widgets_task_row___lambda53__tasks_widgets_entry_popover_generic_value_format (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                       gconstpointer value,
                                                                                       gpointer self)
{
	gchar* result;
	result = _tasks_widgets_task_row___lambda53_ (self, (GDateTime*) value);
	return result;
}

static void
_tasks_widgets_task_row___lambda54_ (TasksWidgetsTaskRow* self,
                                     GDateTime* value)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->task_form_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		ECalComponent* _tmp4_;
		if (value == NULL) {
			GtkRevealer* _tmp3_;
			_tmp3_ = self->priv->due_datetime_popover_revealer;
			gtk_revealer_set_reveal_child (_tmp3_, FALSE);
		}
		_tmp4_ = self->priv->_task;
		tasks_widgets_task_row_save_task (self, _tmp4_);
	}
}

static void
__tasks_widgets_task_row___lambda54__tasks_widgets_entry_popover_generic_value_changed (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                        gconstpointer value,
                                                                                        gpointer self)
{
	_tasks_widgets_task_row___lambda54_ ((TasksWidgetsTaskRow*) self, (GDateTime*) value);
}

static gchar*
_tasks_widgets_task_row___lambda55_ (TasksWidgetsTaskRow* self,
                                     TasksLocation* value)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	gchar* location = NULL;
	gchar* _tmp4_;
	gchar* result;
	if (value == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = (*value).display_name;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		_tmp2_ = (*value).postal_address;
		_tmp0_ = _tmp2_;
	} else {
		const gchar* _tmp3_;
		_tmp3_ = (*value).display_name;
		_tmp0_ = _tmp3_;
	}
	_tmp4_ = g_strdup (_tmp0_);
	location = _tmp4_;
	switch ((*value).proximity) {
		case TASKS_LOCATION_PROXIMITY_ARRIVE:
		{
			const gchar* _tmp5_;
			gchar* _tmp6_;
			_tmp5_ = location;
			_tmp6_ = g_strdup_printf (_ ("Arriving: %s"), _tmp5_);
			result = _tmp6_;
			_g_free0 (location);
			return result;
		}
		case TASKS_LOCATION_PROXIMITY_DEPART:
		{
			const gchar* _tmp7_;
			gchar* _tmp8_;
			_tmp7_ = location;
			_tmp8_ = g_strdup_printf (_ ("Leaving: %s"), _tmp7_);
			result = _tmp8_;
			_g_free0 (location);
			return result;
		}
		default:
		{
			result = location;
			return result;
		}
	}
	_g_free0 (location);
}

static gchar*
__tasks_widgets_task_row___lambda55__tasks_widgets_entry_popover_generic_value_format (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                       gconstpointer value,
                                                                                       gpointer self)
{
	gchar* result;
	result = _tasks_widgets_task_row___lambda55_ ((TasksWidgetsTaskRow*) self, (TasksLocation*) value);
	return result;
}

static void
_tasks_widgets_task_row___lambda56_ (TasksWidgetsTaskRow* self,
                                     TasksLocation* value)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->task_form_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		ECalComponent* _tmp4_;
		if (value == NULL) {
			GtkRevealer* _tmp3_;
			_tmp3_ = self->priv->location_popover_revealer;
			gtk_revealer_set_reveal_child (_tmp3_, FALSE);
		}
		_tmp4_ = self->priv->_task;
		tasks_widgets_task_row_save_task (self, _tmp4_);
	}
}

static void
__tasks_widgets_task_row___lambda56__tasks_widgets_entry_popover_generic_value_changed (TasksWidgetsEntryPopoverGeneric* _sender,
                                                                                        gconstpointer value,
                                                                                        gpointer self)
{
	_tasks_widgets_task_row___lambda56_ ((TasksWidgetsTaskRow*) self, (TasksLocation*) value);
}

static void
_tasks_widgets_task_row____lambda57_ (TasksWidgetsTaskRow* self)
{
	ECalComponent* _tmp0_;
	tasks_widgets_task_row_end_editing (self);
	tasks_widgets_task_row_remove_request (self);
	_tmp0_ = self->priv->_task;
	g_signal_emit (self, tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_REMOVED_SIGNAL], 0, _tmp0_);
}

static void
__tasks_widgets_task_row____lambda57__gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self)
{
	_tasks_widgets_task_row____lambda57_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda58_ (TasksWidgetsTaskRow* self)
{
	ECalComponent* _tmp0_;
	ECalComponent* _tmp1_;
	_tmp0_ = self->priv->_task;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_task;
	g_signal_emit (self, tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_COMPLETED_SIGNAL], 0, _tmp1_);
}

static void
__tasks_widgets_task_row___lambda58__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                               gpointer self)
{
	_tasks_widgets_task_row___lambda58_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda59_ (TasksWidgetsTaskRow* self)
{
	gboolean _tmp0_ = FALSE;
	if (self->priv->created) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_ = FALSE;
		GtkEntry* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = self->priv->summary_entry;
		_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
		_tmp4_ = _tmp3_;
		if (_tmp4_ != NULL) {
			GtkEntry* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			_tmp5_ = self->priv->summary_entry;
			_tmp6_ = gtk_editable_get_text ((GtkEditable*) _tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = string_strip (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = strlen (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp1_ = _tmp11_ > 0;
			_g_free0 (_tmp9_);
		} else {
			_tmp1_ = FALSE;
		}
		_tmp0_ = _tmp1_;
	}
	if (_tmp0_) {
		ECalComponent* _tmp12_;
		_tmp12_ = self->priv->_task;
		tasks_widgets_task_row_save_task (self, _tmp12_);
	}
	tasks_widgets_task_row_end_editing (self);
}

static void
__tasks_widgets_task_row___lambda59__gtk_entry_activate (GtkEntry* _sender,
                                                         gpointer self)
{
	_tasks_widgets_task_row___lambda59_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda60_ (TasksWidgetsTaskRow* self)
{
	g_signal_emit_by_name ((GtkListBoxRow*) self, "activate");
}

static void
__tasks_widgets_task_row___lambda60__gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                       gpointer self)
{
	_tasks_widgets_task_row___lambda60_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda61_ (TasksWidgetsTaskRow* self)
{
	tasks_widgets_task_row_reset_form (self);
	tasks_widgets_task_row_end_editing (self);
}

static void
__tasks_widgets_task_row___lambda61__gtk_button_clicked (GtkButton* _sender,
                                                         gpointer self)
{
	_tasks_widgets_task_row___lambda61_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda62_ (TasksWidgetsTaskRow* self,
                                     guint keyval,
                                     guint keycode,
                                     GdkModifierType state)
{
	if (keyval == GDK_KEY_Escape) {
		tasks_widgets_task_row_reset_form (self);
		tasks_widgets_task_row_end_editing (self);
	}
}

static void
__tasks_widgets_task_row___lambda62__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                            guint keyval,
                                                                            guint keycode,
                                                                            GdkModifierType state,
                                                                            gpointer self)
{
	_tasks_widgets_task_row___lambda62_ ((TasksWidgetsTaskRow*) self, keyval, keycode, state);
}

static void
_tasks_widgets_task_row___lambda63_ (TasksWidgetsTaskRow* self)
{
	ECalComponent* _tmp0_;
	_tmp0_ = self->priv->_task;
	tasks_widgets_task_row_save_task (self, _tmp0_);
	tasks_widgets_task_row_end_editing (self);
}

static void
__tasks_widgets_task_row___lambda63__gtk_button_clicked (GtkButton* _sender,
                                                         gpointer self)
{
	_tasks_widgets_task_row___lambda63_ ((TasksWidgetsTaskRow*) self);
}

static void
_tasks_widgets_task_row___lambda64_ (TasksWidgetsTaskRow* self)
{
	tasks_widgets_task_row_update_request (self);
}

static void
__tasks_widgets_task_row___lambda64__g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self)
{
	_tasks_widgets_task_row___lambda64_ ((TasksWidgetsTaskRow*) self);
}

static GObject *
tasks_widgets_task_row_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TasksWidgetsTaskRow * self;
	Block37Data* _data37_;
	ECalComponent* _tmp0_;
	ESourceRegistry* registry = NULL;
	GtkImage* _tmp10_ = NULL;
	GtkCheckButton* _tmp11_ = NULL;
	GtkCheckButton* _tmp12_;
	GtkStack* _tmp13_ = NULL;
	GtkStack* _tmp14_;
	GtkImage* _tmp15_;
	GtkStack* _tmp16_;
	GtkCheckButton* _tmp17_;
	GtkEntry* _tmp18_ = NULL;
	TasksWidgetsEntryPopoverDateTime* _tmp19_;
	TasksWidgetsEntryPopoverDateTime* _tmp21_;
	GtkWidget* _tmp22_;
	GtkRevealer* _tmp23_ = NULL;
	TasksWidgetsEntryPopoverDateTime* _tmp24_;
	TasksWidgetsEntryPopoverDateTime* _tmp25_;
	TasksWidgetsEntryPopoverLocation* _tmp26_;
	TasksWidgetsEntryPopoverLocation* _tmp27_;
	GtkWidget* _tmp28_;
	GtkRevealer* _tmp29_ = NULL;
	TasksWidgetsEntryPopoverLocation* _tmp30_;
	TasksWidgetsEntryPopoverLocation* _tmp31_;
	GtkLabel* _tmp32_ = NULL;
	GtkLabel* _tmp33_;
	GtkLabel* _tmp34_;
	GtkWidget* _tmp35_;
	GtkRevealer* _tmp36_ = NULL;
	GtkBox* task_box = NULL;
	GtkBox* _tmp37_;
	GtkBox* _tmp38_;
	GtkRevealer* _tmp39_;
	GtkBox* _tmp40_;
	GtkRevealer* _tmp41_;
	GtkBox* _tmp42_;
	GtkRevealer* _tmp43_;
	GtkBox* _tmp44_;
	GtkWidget* _tmp45_;
	GtkRevealer* _tmp46_ = NULL;
	GraniteHyperTextView* description_textview = NULL;
	GraniteHyperTextView* _tmp47_ = NULL;
	GraniteHyperTextView* _tmp48_;
	GtkTextBuffer* _tmp49_;
	GraniteHyperTextView* _tmp50_;
	GtkTextBuffer* _tmp51_;
	GtkFrame* description_frame = NULL;
	GraniteHyperTextView* _tmp52_;
	GtkWidget* _tmp53_;
	GtkFrame* _tmp54_ = NULL;
	GtkButton* cancel_button = NULL;
	GtkButton* _tmp55_;
	const gchar* _tmp56_ = NULL;
	GtkButton* save_button = NULL;
	GtkButton* _tmp57_;
	GtkButton* _tmp58_;
	GtkBox* right_buttons_box = NULL;
	GtkBox* _tmp59_ = NULL;
	GtkBox* _tmp60_;
	GtkButton* _tmp61_;
	GtkBox* _tmp62_;
	GtkButton* _tmp63_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp64_;
	GtkBox* _tmp65_;
	GtkBox* _tmp66_;
	GtkBox* _tmp67_;
	GtkBox* form_box = NULL;
	GtkBox* _tmp68_;
	GtkBox* _tmp69_;
	GtkFrame* _tmp70_;
	GtkBox* _tmp71_;
	GtkBox* _tmp72_;
	GtkBox* _tmp73_;
	GtkWidget* _tmp74_;
	GtkRevealer* _tmp75_ = NULL;
	GtkGrid* _tmp76_ = NULL;
	GtkGrid* _tmp77_;
	GtkStack* _tmp78_;
	GtkGrid* _tmp79_;
	GtkEntry* _tmp80_;
	GtkGrid* _tmp81_;
	GtkRevealer* _tmp82_;
	GtkGrid* _tmp83_;
	GtkRevealer* _tmp84_;
	GtkGrid* _tmp85_;
	GtkWidget* _tmp86_;
	GtkRevealer* _tmp87_ = NULL;
	GtkRevealer* _tmp88_;
	GtkEventControllerKey* key_controller = NULL;
	GtkEventControllerKey* _tmp97_;
	GtkEventControllerKey* _tmp98_;
	GtkEventController* _tmp99_;
	GtkCheckButton* _tmp100_;
	GtkEntry* _tmp101_;
	GtkEventControllerFocus* summary_entry_focus_controller = NULL;
	GtkEventControllerFocus* _tmp102_;
	GtkEntry* _tmp103_;
	GtkEventControllerFocus* _tmp104_;
	GtkEventController* _tmp105_;
	GtkEventControllerFocus* _tmp106_;
	GtkButton* _tmp107_;
	GtkEventControllerKey* _tmp108_;
	GtkButton* _tmp109_;
	GError* _inner_error0_ = NULL;
	parent_class = G_OBJECT_CLASS (tasks_widgets_task_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRow);
	_data37_ = g_slice_new0 (Block37Data);
	_data37_->_ref_count_ = 1;
	_data37_->self = g_object_ref (self);
	_tmp0_ = self->priv->_task;
	self->priv->created = tasks_widgets_task_row_calcomponent_created (self, _tmp0_);
	_data37_->is_gtask = FALSE;
	registry = NULL;
	{
		ESourceRegistry* _tmp1_ = NULL;
		TasksTaskModel* _tmp2_;
		ESourceRegistry* _tmp3_;
		ESourceRegistry* _tmp4_;
		TasksTaskModel* _tmp5_;
		ESource* _tmp6_;
		ESourceRegistry* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp2_ = tasks_application_model;
		_tmp3_ = tasks_task_model_get_registry_sync (_tmp2_, &_inner_error0_);
		_tmp1_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = _tmp1_;
		_tmp1_ = NULL;
		_g_object_unref0 (registry);
		registry = _tmp4_;
		_tmp5_ = tasks_application_model;
		_tmp6_ = self->priv->_source;
		_tmp7_ = registry;
		_tmp8_ = tasks_task_model_get_collection_backend_name (_tmp5_, _tmp6_, _tmp7_);
		_tmp9_ = _tmp8_;
		_data37_->is_gtask = g_strcmp0 (_tmp9_, "google") == 0;
		_g_free0 (_tmp9_);
		_g_object_unref0 (_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_warning ("TaskRow.vala:65: unable to get the registry, assuming task is not from" \
" gtask");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (registry);
		block37_data_unref (_data37_);
		_data37_ = 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_);
	}
	_tmp10_ = (GtkImage*) gtk_image_new_from_icon_name ("list-add-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->icon);
	self->priv->icon = _tmp10_;
	_tmp11_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->check);
	self->priv->check = _tmp11_;
	_tmp12_ = self->priv->check;
	gtk_widget_add_css_class ((GtkWidget*) _tmp12_, "task-row-check");
	_tmp13_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_transition_type (_tmp13_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->state_stack);
	self->priv->state_stack = _tmp13_;
	_tmp14_ = self->priv->state_stack;
	_tmp15_ = self->priv->icon;
	gtk_stack_add_child (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->state_stack;
	_tmp17_ = self->priv->check;
	gtk_stack_add_child (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = (GtkEntry*) gtk_entry_new ();
	gtk_entry_set_has_frame (_tmp18_, FALSE);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->summary_entry);
	self->priv->summary_entry = _tmp18_;
	_tmp19_ = tasks_widgets_entry_popover_date_time_new ();
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->due_datetime_popover);
	self->priv->due_datetime_popover = _tmp19_;
	if (_data37_->is_gtask) {
		TasksWidgetsEntryPopoverDateTime* _tmp20_;
		_tmp20_ = self->priv->due_datetime_popover;
		tasks_widgets_entry_popover_date_time_hide_timepicker (_tmp20_);
	}
	_tmp21_ = self->priv->due_datetime_popover;
	_tmp22_ = _g_object_ref0 ((GtkWidget*) _tmp21_);
	_tmp23_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp23_, _tmp22_);
	_g_object_unref0 (_tmp22_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp23_, 6);
	gtk_revealer_set_reveal_child (_tmp23_, FALSE);
	gtk_revealer_set_transition_type (_tmp23_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	g_object_ref_sink (_tmp23_);
	_g_object_unref0 (self->priv->due_datetime_popover_revealer);
	self->priv->due_datetime_popover_revealer = _tmp23_;
	_tmp24_ = self->priv->due_datetime_popover;
	g_signal_connect_data ((TasksWidgetsEntryPopoverGeneric*) _tmp24_, "value-format", (GCallback) __tasks_widgets_task_row___lambda53__tasks_widgets_entry_popover_generic_value_format, block37_data_ref (_data37_), (GClosureNotify) block37_data_unref, 0);
	_tmp25_ = self->priv->due_datetime_popover;
	g_signal_connect_object ((TasksWidgetsEntryPopoverGeneric*) _tmp25_, "value-changed", (GCallback) __tasks_widgets_task_row___lambda54__tasks_widgets_entry_popover_generic_value_changed, self, 0);
	_tmp26_ = tasks_widgets_entry_popover_location_new ();
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->location_popover);
	self->priv->location_popover = _tmp26_;
	_tmp27_ = self->priv->location_popover;
	_tmp28_ = _g_object_ref0 ((GtkWidget*) _tmp27_);
	_tmp29_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp29_, _tmp28_);
	_g_object_unref0 (_tmp28_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp29_, 6);
	gtk_revealer_set_reveal_child (_tmp29_, FALSE);
	gtk_revealer_set_transition_type (_tmp29_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->location_popover_revealer);
	self->priv->location_popover_revealer = _tmp29_;
	_tmp30_ = self->priv->location_popover;
	g_signal_connect_object ((TasksWidgetsEntryPopoverGeneric*) _tmp30_, "value-format", (GCallback) __tasks_widgets_task_row___lambda55__tasks_widgets_entry_popover_generic_value_format, self, 0);
	_tmp31_ = self->priv->location_popover;
	g_signal_connect_object ((TasksWidgetsEntryPopoverGeneric*) _tmp31_, "value-changed", (GCallback) __tasks_widgets_task_row___lambda56__tasks_widgets_entry_popover_generic_value_changed, self, 0);
	_tmp32_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp32_, (gfloat) 0);
	gtk_label_set_lines (_tmp32_, 1);
	gtk_label_set_ellipsize (_tmp32_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp32_);
	_g_object_unref0 (self->priv->description_label);
	self->priv->description_label = _tmp32_;
	_tmp33_ = self->priv->description_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp33_, GRANITE_STYLE_CLASS_DIM_LABEL);
	_tmp34_ = self->priv->description_label;
	_tmp35_ = _g_object_ref0 ((GtkWidget*) _tmp34_);
	_tmp36_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp36_, _tmp35_);
	_g_object_unref0 (_tmp35_);
	gtk_revealer_set_transition_type (_tmp36_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	gtk_revealer_set_reveal_child (_tmp36_, FALSE);
	g_object_ref_sink (_tmp36_);
	_g_object_unref0 (self->priv->description_label_revealer);
	self->priv->description_label_revealer = _tmp36_;
	_tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp37_);
	task_box = _tmp37_;
	_tmp38_ = task_box;
	_tmp39_ = self->priv->due_datetime_popover_revealer;
	gtk_box_append (_tmp38_, (GtkWidget*) _tmp39_);
	_tmp40_ = task_box;
	_tmp41_ = self->priv->location_popover_revealer;
	gtk_box_append (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = task_box;
	_tmp43_ = self->priv->description_label_revealer;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = task_box;
	_tmp45_ = _g_object_ref0 ((GtkWidget*) _tmp44_);
	_tmp46_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp46_, _tmp45_);
	_g_object_unref0 (_tmp45_);
	gtk_revealer_set_transition_type (_tmp46_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->task_detail_revealer);
	self->priv->task_detail_revealer = _tmp46_;
	_tmp47_ = granite_hyper_text_view_new ();
	gtk_text_view_set_top_margin ((GtkTextView*) _tmp47_, 6);
	gtk_text_view_set_right_margin ((GtkTextView*) _tmp47_, 6);
	gtk_text_view_set_bottom_margin ((GtkTextView*) _tmp47_, 6);
	gtk_text_view_set_left_margin ((GtkTextView*) _tmp47_, 6);
	g_object_set ((GtkWidget*) _tmp47_, "height-request", 140, NULL);
	gtk_text_view_set_accepts_tab ((GtkTextView*) _tmp47_, FALSE);
	g_object_ref_sink (_tmp47_);
	description_textview = _tmp47_;
	_tmp48_ = description_textview;
	gtk_text_view_set_wrap_mode ((GtkTextView*) _tmp48_, GTK_WRAP_WORD_CHAR);
	_tmp49_ = gtk_text_buffer_new (NULL);
	_g_object_unref0 (self->priv->description_textbuffer);
	self->priv->description_textbuffer = _tmp49_;
	_tmp50_ = description_textview;
	_tmp51_ = self->priv->description_textbuffer;
	gtk_text_view_set_buffer ((GtkTextView*) _tmp50_, _tmp51_);
	_tmp52_ = description_textview;
	_tmp53_ = _g_object_ref0 ((GtkWidget*) _tmp52_);
	_tmp54_ = (GtkFrame*) gtk_frame_new (NULL);
	gtk_frame_set_child (_tmp54_, _tmp53_);
	_g_object_unref0 (_tmp53_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp54_, TRUE);
	g_object_ref_sink (_tmp54_);
	description_frame = _tmp54_;
	_tmp55_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	g_object_ref_sink (_tmp55_);
	cancel_button = _tmp55_;
	if (self->priv->created) {
		_tmp56_ = _ ("Save Changes");
	} else {
		_tmp56_ = _ ("Add Task");
	}
	_tmp57_ = (GtkButton*) gtk_button_new_with_label (_tmp56_);
	g_object_ref_sink (_tmp57_);
	save_button = _tmp57_;
	_tmp58_ = save_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp58_, GRANITE_STYLE_CLASS_SUGGESTED_ACTION);
	_tmp59_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp59_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp59_, GTK_ALIGN_END);
	gtk_box_set_homogeneous (_tmp59_, TRUE);
	g_object_ref_sink (_tmp59_);
	right_buttons_box = _tmp59_;
	_tmp60_ = right_buttons_box;
	_tmp61_ = cancel_button;
	gtk_box_append (_tmp60_, (GtkWidget*) _tmp61_);
	_tmp62_ = right_buttons_box;
	_tmp63_ = save_button;
	gtk_box_append (_tmp62_, (GtkWidget*) _tmp63_);
	_tmp64_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp64_);
	button_box = _tmp64_;
	_tmp65_ = button_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp65_, "button-box");
	_tmp66_ = button_box;
	_tmp67_ = right_buttons_box;
	gtk_box_append (_tmp66_, (GtkWidget*) _tmp67_);
	_tmp68_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp68_);
	form_box = _tmp68_;
	_tmp69_ = form_box;
	_tmp70_ = description_frame;
	gtk_box_append (_tmp69_, (GtkWidget*) _tmp70_);
	_tmp71_ = form_box;
	_tmp72_ = button_box;
	gtk_box_append (_tmp71_, (GtkWidget*) _tmp72_);
	_tmp73_ = form_box;
	_tmp74_ = _g_object_ref0 ((GtkWidget*) _tmp73_);
	_tmp75_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp75_, _tmp74_);
	_g_object_unref0 (_tmp74_);
	gtk_revealer_set_transition_type (_tmp75_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->task_form_revealer);
	self->priv->task_form_revealer = _tmp75_;
	_tmp76_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp76_, 6);
	g_object_ref_sink (_tmp76_);
	_g_object_unref0 (self->priv->grid);
	self->priv->grid = _tmp76_;
	_tmp77_ = self->priv->grid;
	_tmp78_ = self->priv->state_stack;
	gtk_grid_attach (_tmp77_, (GtkWidget*) _tmp78_, 0, 0, 1, 1);
	_tmp79_ = self->priv->grid;
	_tmp80_ = self->priv->summary_entry;
	gtk_grid_attach (_tmp79_, (GtkWidget*) _tmp80_, 1, 0, 1, 1);
	_tmp81_ = self->priv->grid;
	_tmp82_ = self->priv->task_detail_revealer;
	gtk_grid_attach (_tmp81_, (GtkWidget*) _tmp82_, 1, 1, 1, 1);
	_tmp83_ = self->priv->grid;
	_tmp84_ = self->priv->task_form_revealer;
	gtk_grid_attach (_tmp83_, (GtkWidget*) _tmp84_, 1, 2, 1, 1);
	_tmp85_ = self->priv->grid;
	_tmp86_ = _g_object_ref0 ((GtkWidget*) _tmp85_);
	_tmp87_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp87_, _tmp86_);
	_g_object_unref0 (_tmp86_);
	gtk_widget_set_overflow ((GtkWidget*) _tmp87_, GTK_OVERFLOW_VISIBLE);
	gtk_revealer_set_reveal_child (_tmp87_, TRUE);
	gtk_revealer_set_transition_type (_tmp87_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	g_object_ref_sink (_tmp87_);
	_g_object_unref0 (self->priv->revealer);
	self->priv->revealer = _tmp87_;
	_tmp88_ = self->priv->revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp88_);
	gtk_widget_add_css_class ((GtkWidget*) self, "task");
	gtk_widget_add_css_class ((GtkWidget*) self, GRANITE_STYLE_CLASS_ROUNDED);
	if (self->priv->created) {
		GtkCheckButton* _tmp89_;
		GtkStack* _tmp90_;
		GtkCheckButton* _tmp91_;
		GtkButton* delete_button = NULL;
		GtkButton* _tmp92_ = NULL;
		GtkButton* _tmp93_;
		GtkBox* _tmp94_;
		GtkButton* _tmp95_;
		GtkButton* _tmp96_;
		_tmp89_ = self->priv->check;
		gtk_widget_show ((GtkWidget*) _tmp89_);
		_tmp90_ = self->priv->state_stack;
		_tmp91_ = self->priv->check;
		gtk_stack_set_visible_child (_tmp90_, (GtkWidget*) _tmp91_);
		_tmp92_ = (GtkButton*) gtk_button_new_with_label (_ ("Delete Task"));
		gtk_widget_set_halign ((GtkWidget*) _tmp92_, GTK_ALIGN_START);
		g_object_ref_sink (_tmp92_);
		delete_button = _tmp92_;
		_tmp93_ = delete_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp93_, GRANITE_STYLE_CLASS_DESTRUCTIVE_ACTION);
		_tmp94_ = button_box;
		_tmp95_ = delete_button;
		gtk_box_prepend (_tmp94_, (GtkWidget*) _tmp95_);
		_tmp96_ = delete_button;
		g_signal_connect_object (_tmp96_, "clicked", (GCallback) __tasks_widgets_task_row____lambda57__gtk_button_clicked, self, 0);
		_g_object_unref0 (delete_button);
	}
	tasks_widgets_task_row_build_drag_and_drop (self);
	_tmp97_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	key_controller = _tmp97_;
	_tmp98_ = key_controller;
	_tmp99_ = _g_object_ref0 ((GtkEventController*) _tmp98_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp99_);
	_tmp100_ = self->priv->check;
	g_signal_connect_object (_tmp100_, "toggled", (GCallback) __tasks_widgets_task_row___lambda58__gtk_check_button_toggled, self, 0);
	_tmp101_ = self->priv->summary_entry;
	g_signal_connect_object (_tmp101_, "activate", (GCallback) __tasks_widgets_task_row___lambda59__gtk_entry_activate, self, 0);
	_tmp102_ = (GtkEventControllerFocus*) gtk_event_controller_focus_new ();
	summary_entry_focus_controller = _tmp102_;
	_tmp103_ = self->priv->summary_entry;
	_tmp104_ = summary_entry_focus_controller;
	_tmp105_ = _g_object_ref0 ((GtkEventController*) _tmp104_);
	gtk_widget_add_controller ((GtkWidget*) _tmp103_, _tmp105_);
	_tmp106_ = summary_entry_focus_controller;
	g_signal_connect_object (_tmp106_, "enter", (GCallback) __tasks_widgets_task_row___lambda60__gtk_event_controller_focus_enter, self, 0);
	_tmp107_ = cancel_button;
	g_signal_connect_object (_tmp107_, "clicked", (GCallback) __tasks_widgets_task_row___lambda61__gtk_button_clicked, self, 0);
	_tmp108_ = key_controller;
	g_signal_connect_object (_tmp108_, "key-released", (GCallback) __tasks_widgets_task_row___lambda62__gtk_event_controller_key_key_released, self, 0);
	_tmp109_ = save_button;
	g_signal_connect_object (_tmp109_, "clicked", (GCallback) __tasks_widgets_task_row___lambda63__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::task", (GCallback) __tasks_widgets_task_row___lambda64__g_object_notify, self, 0);
	tasks_widgets_task_row_update_request (self);
	_g_object_unref0 (summary_entry_focus_controller);
	_g_object_unref0 (key_controller);
	_g_object_unref0 (form_box);
	_g_object_unref0 (button_box);
	_g_object_unref0 (right_buttons_box);
	_g_object_unref0 (save_button);
	_g_object_unref0 (cancel_button);
	_g_object_unref0 (description_frame);
	_g_object_unref0 (description_textview);
	_g_object_unref0 (task_box);
	_g_object_unref0 (registry);
	block37_data_unref (_data37_);
	_data37_ = NULL;
	return obj;
}

static void
tasks_widgets_task_row_class_init (TasksWidgetsTaskRowClass * klass,
                                   gpointer klass_data)
{
	tasks_widgets_task_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TasksWidgetsTaskRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tasks_widgets_task_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tasks_widgets_task_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = tasks_widgets_task_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = tasks_widgets_task_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY] = g_param_spec_boolean ("completed", "completed", "completed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TASKS_WIDGETS_TASK_ROW_SOURCE_PROPERTY, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_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), TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY] = g_param_spec_object ("task", "task", "task", e_cal_component_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY, tasks_widgets_task_row_properties[TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY] = g_param_spec_boolean ("is-scheduled-view", "is-scheduled-view", "is-scheduled-view", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_COMPLETED_SIGNAL] = g_signal_new ("task-completed", TASKS_WIDGETS_TYPE_TASK_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, e_cal_component_get_type ());
	tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_CHANGED_SIGNAL] = g_signal_new ("task-changed", TASKS_WIDGETS_TYPE_TASK_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, e_cal_component_get_type ());
	tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_TASK_REMOVED_SIGNAL] = g_signal_new ("task-removed", TASKS_WIDGETS_TYPE_TASK_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, e_cal_component_get_type ());
	tasks_widgets_task_row_signals[TASKS_WIDGETS_TASK_ROW_UNSELECT_SIGNAL] = g_signal_new ("unselect", TASKS_WIDGETS_TYPE_TASK_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, gtk_list_box_row_get_type ());
}

static void
tasks_widgets_task_row_instance_init (TasksWidgetsTaskRow * self,
                                      gpointer klass)
{
	self->priv = tasks_widgets_task_row_get_instance_private (self);
}

static void
tasks_widgets_task_row_finalize (GObject * obj)
{
	TasksWidgetsTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRow);
	_g_object_unref0 (self->priv->_source);
	_g_object_unref0 (self->priv->_task);
	_g_object_unref0 (self->priv->due_datetime_popover);
	_g_object_unref0 (self->priv->due_datetime_popover_revealer);
	_g_object_unref0 (self->priv->location_popover);
	_g_object_unref0 (self->priv->location_popover_revealer);
	_g_object_unref0 (self->priv->grid);
	_g_object_unref0 (self->priv->state_stack);
	_g_object_unref0 (self->priv->icon);
	_g_object_unref0 (self->priv->check);
	_g_object_unref0 (self->priv->summary_entry);
	_g_object_unref0 (self->priv->description_label);
	_g_object_unref0 (self->priv->revealer);
	_g_object_unref0 (self->priv->description_label_revealer);
	_g_object_unref0 (self->priv->task_detail_revealer);
	_g_object_unref0 (self->priv->task_form_revealer);
	_g_object_unref0 (self->priv->description_textbuffer);
	_g_object_unref0 (self->priv->drag_source);
	G_OBJECT_CLASS (tasks_widgets_task_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tasks_widgets_task_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TasksWidgetsTaskRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tasks_widgets_task_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TasksWidgetsTaskRow), 0, (GInstanceInitFunc) tasks_widgets_task_row_instance_init, NULL };
	GType tasks_widgets_task_row_type_id;
	tasks_widgets_task_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TasksWidgetsTaskRow", &g_define_type_info, 0);
	TasksWidgetsTaskRow_private_offset = g_type_add_instance_private (tasks_widgets_task_row_type_id, sizeof (TasksWidgetsTaskRowPrivate));
	return tasks_widgets_task_row_type_id;
}

GType
tasks_widgets_task_row_get_type (void)
{
	static gsize tasks_widgets_task_row_type_id__once = 0;
	if (g_once_init_enter (&tasks_widgets_task_row_type_id__once)) {
		GType tasks_widgets_task_row_type_id;
		tasks_widgets_task_row_type_id = tasks_widgets_task_row_get_type_once ();
		g_once_init_leave (&tasks_widgets_task_row_type_id__once, tasks_widgets_task_row_type_id);
	}
	return tasks_widgets_task_row_type_id__once;
}

static void
_vala_tasks_widgets_task_row_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	TasksWidgetsTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRow);
	switch (property_id) {
		case TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY:
		g_value_set_boolean (value, tasks_widgets_task_row_get_completed (self));
		break;
		case TASKS_WIDGETS_TASK_ROW_SOURCE_PROPERTY:
		g_value_set_object (value, tasks_widgets_task_row_get_source (self));
		break;
		case TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY:
		g_value_set_object (value, tasks_widgets_task_row_get_task (self));
		break;
		case TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY:
		g_value_set_boolean (value, tasks_widgets_task_row_get_is_scheduled_view (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tasks_widgets_task_row_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	TasksWidgetsTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TASKS_WIDGETS_TYPE_TASK_ROW, TasksWidgetsTaskRow);
	switch (property_id) {
		case TASKS_WIDGETS_TASK_ROW_COMPLETED_PROPERTY:
		tasks_widgets_task_row_set_completed (self, g_value_get_boolean (value));
		break;
		case TASKS_WIDGETS_TASK_ROW_SOURCE_PROPERTY:
		tasks_widgets_task_row_set_source (self, g_value_get_object (value));
		break;
		case TASKS_WIDGETS_TASK_ROW_TASK_PROPERTY:
		tasks_widgets_task_row_set_task (self, g_value_get_object (value));
		break;
		case TASKS_WIDGETS_TASK_ROW_IS_SCHEDULED_VIEW_PROPERTY:
		tasks_widgets_task_row_set_is_scheduled_view (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

