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

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

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

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

#define WIDGETS_TYPE_COMPLETED_TASK_ROW (widgets_completed_task_row_get_type ())
#define WIDGETS_COMPLETED_TASK_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow))
#define WIDGETS_COMPLETED_TASK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRowClass))
#define WIDGETS_IS_COMPLETED_TASK_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMPLETED_TASK_ROW))
#define WIDGETS_IS_COMPLETED_TASK_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMPLETED_TASK_ROW))
#define WIDGETS_COMPLETED_TASK_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRowClass))

typedef struct _WidgetsCompletedTaskRow WidgetsCompletedTaskRow;
typedef struct _WidgetsCompletedTaskRowClass WidgetsCompletedTaskRowClass;
typedef struct _WidgetsCompletedTaskRowPrivate WidgetsCompletedTaskRowPrivate;
enum  {
	WIDGETS_COMPLETED_TASK_ROW_0_PROPERTY,
	WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY,
	WIDGETS_COMPLETED_TASK_ROW_NUM_PROPERTIES
};
static GParamSpec* widgets_completed_task_row_properties[WIDGETS_COMPLETED_TASK_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _http_response_unref0(var) ((var == NULL) ? NULL : (var = (http_response_unref (var), NULL)))
typedef struct _WidgetsCompletedTaskRowCompleteItemData WidgetsCompletedTaskRowCompleteItemData;
typedef struct _Block56Data Block56Data;

struct _WidgetsCompletedTaskRow {
	GtkListBoxRow parent_instance;
	WidgetsCompletedTaskRowPrivate * priv;
};

struct _WidgetsCompletedTaskRowClass {
	GtkListBoxRowClass parent_class;
};

struct _WidgetsCompletedTaskRowPrivate {
	ObjectsItem* _item;
	GtkCheckButton* checked_button;
	WidgetsLoadingButton* loading_button;
	GtkRevealer* main_revealer;
	GeeHashMap* signals_map;
};

struct _WidgetsCompletedTaskRowCompleteItemData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	WidgetsCompletedTaskRow* self;
	gboolean old_checked;
	gchar* old_completed_at;
	GtkCheckButton* _tmp0_;
	HttpResponse* response;
	ObjectsItem* _tmp1_;
	HttpResponse* _tmp2_;
	HttpResponse* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
};

struct _Block56Data {
	int _ref_count_;
	WidgetsCompletedTaskRow* self;
	GtkGestureClick* checked_button_gesture;
};

static gint WidgetsCompletedTaskRow_private_offset;
static gpointer widgets_completed_task_row_parent_class = NULL;

VALA_EXTERN GType widgets_completed_task_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsCompletedTaskRow, g_object_unref)
VALA_EXTERN WidgetsCompletedTaskRow* widgets_completed_task_row_new (ObjectsItem* item);
VALA_EXTERN WidgetsCompletedTaskRow* widgets_completed_task_row_construct (GType object_type,
                                                               ObjectsItem* item);
VALA_EXTERN void widgets_completed_task_row_hide_destroy (WidgetsCompletedTaskRow* self);
static gboolean __lambda608_ (WidgetsCompletedTaskRow* self);
static gboolean ___lambda608__gsource_func (gpointer self);
VALA_EXTERN void widgets_completed_task_row_checked_toggled (WidgetsCompletedTaskRow* self,
                                                 gboolean active,
                                                 guint* time);
VALA_EXTERN ObjectsItem* widgets_completed_task_row_get_item (WidgetsCompletedTaskRow* self);
static void _widgets_completed_task_row_complete_item (WidgetsCompletedTaskRow* self,
                                                gboolean old_checked,
                                                const gchar* old_completed_at,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void _widgets_completed_task_row_complete_item_finish (WidgetsCompletedTaskRow* self,
                                                       GAsyncResult* _res_);
static void _widgets_completed_task_row_complete_item_data_free (gpointer _data);
static gboolean _widgets_completed_task_row_complete_item_co (WidgetsCompletedTaskRowCompleteItemData* _data_);
static void _widgets_completed_task_row_complete_item_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
VALA_EXTERN void widgets_completed_task_row_clean_up (WidgetsCompletedTaskRow* self);
static void widgets_completed_task_row_set_item (WidgetsCompletedTaskRow* self,
                                          ObjectsItem* value);
static GObject * widgets_completed_task_row_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static Block56Data* block56_data_ref (Block56Data* _data56_);
static void block56_data_unref (void * _userdata_);
static void _widgets_completed_task_row___lambda609_ (Block56Data* _data56_);
static void __widgets_completed_task_row___lambda609__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                          gint n_press,
                                                                          gdouble x,
                                                                          gdouble y,
                                                                          gpointer self);
static void _widgets_completed_task_row___lambda610_ (WidgetsCompletedTaskRow* self);
static void __widgets_completed_task_row___lambda610__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                                   gpointer self);
static void _widgets_completed_task_row___lambda611_ (WidgetsCompletedTaskRow* self);
static void __widgets_completed_task_row___lambda611__gtk_widget_destroy (GtkWidget* _sender,
                                                                   gpointer self);
static void widgets_completed_task_row_finalize (GObject * obj);
static GType widgets_completed_task_row_get_type_once (void);
static void _vala_widgets_completed_task_row_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_widgets_completed_task_row_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
widgets_completed_task_row_get_instance_private (WidgetsCompletedTaskRow* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsCompletedTaskRow_private_offset);
}

WidgetsCompletedTaskRow*
widgets_completed_task_row_construct (GType object_type,
                                      ObjectsItem* item)
{
	WidgetsCompletedTaskRow * self = NULL;
	g_return_val_if_fail (item != NULL, NULL);
	self = (WidgetsCompletedTaskRow*) g_object_new (object_type, "item", item, NULL);
	return self;
}

WidgetsCompletedTaskRow*
widgets_completed_task_row_new (ObjectsItem* item)
{
	return widgets_completed_task_row_construct (WIDGETS_TYPE_COMPLETED_TASK_ROW, item);
}

static gboolean
__lambda608_ (WidgetsCompletedTaskRow* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_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);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda608__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda608_ ((WidgetsCompletedTaskRow*) self);
	return result;
}

void
widgets_completed_task_row_hide_destroy (WidgetsCompletedTaskRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda608__gsource_func, g_object_ref (self), g_object_unref);
}

void
widgets_completed_task_row_checked_toggled (WidgetsCompletedTaskRow* self,
                                            gboolean active,
                                            guint* time)
{
	gboolean old_checked = FALSE;
	ObjectsItem* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_checked (_tmp0_);
	_tmp2_ = _tmp1_;
	old_checked = _tmp2_;
	if (!active) {
		gchar* old_completed_at = NULL;
		ObjectsItem* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		ObjectsItem* _tmp7_;
		ObjectsItem* _tmp8_;
		const gchar* _tmp9_;
		_tmp3_ = self->priv->_item;
		_tmp4_ = objects_item_get_completed_at (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup (_tmp5_);
		old_completed_at = _tmp6_;
		_tmp7_ = self->priv->_item;
		objects_item_set_checked (_tmp7_, FALSE);
		_tmp8_ = self->priv->_item;
		objects_item_set_completed_at (_tmp8_, "");
		_tmp9_ = old_completed_at;
		_widgets_completed_task_row_complete_item (self, old_checked, _tmp9_, NULL, NULL);
		_g_free0 (old_completed_at);
	}
}

static void
_widgets_completed_task_row_complete_item_data_free (gpointer _data)
{
	WidgetsCompletedTaskRowCompleteItemData* _data_;
	_data_ = _data;
	_g_free0 (_data_->old_completed_at);
	_g_object_unref0 (_data_->self);
	g_slice_free (WidgetsCompletedTaskRowCompleteItemData, _data_);
}

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

static void
_widgets_completed_task_row_complete_item (WidgetsCompletedTaskRow* self,
                                           gboolean old_checked,
                                           const gchar* old_completed_at,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	WidgetsCompletedTaskRowCompleteItemData* _data_;
	WidgetsCompletedTaskRow* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (old_completed_at != NULL);
	_data_ = g_slice_new0 (WidgetsCompletedTaskRowCompleteItemData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, _widgets_completed_task_row_complete_item_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->old_checked = old_checked;
	_tmp1_ = g_strdup (old_completed_at);
	_g_free0 (_data_->old_completed_at);
	_data_->old_completed_at = _tmp1_;
	_widgets_completed_task_row_complete_item_co (_data_);
}

static void
_widgets_completed_task_row_complete_item_finish (WidgetsCompletedTaskRow* self,
                                                  GAsyncResult* _res_)
{
	WidgetsCompletedTaskRowCompleteItemData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
_widgets_completed_task_row_complete_item_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	WidgetsCompletedTaskRowCompleteItemData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_widgets_completed_task_row_complete_item_co (_data_);
}

static gboolean
_widgets_completed_task_row_complete_item_co (WidgetsCompletedTaskRowCompleteItemData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->checked_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp0_, FALSE);
	_data_->_tmp1_ = _data_->self->priv->_item;
	_data_->_state_ = 1;
	objects_item_complete_item (_data_->_tmp1_, _data_->old_checked, _widgets_completed_task_row_complete_item_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = objects_item_complete_item_finish (_data_->_tmp1_, _data_->_res_);
	_data_->response = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->response;
	_data_->_tmp4_ = http_response_get_status (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	if (!_data_->_tmp5_) {
	}
	_http_response_unref0 (_data_->response);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

ObjectsItem*
widgets_completed_task_row_get_item (WidgetsCompletedTaskRow* self)
{
	ObjectsItem* result;
	ObjectsItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item;
	result = _tmp0_;
	return result;
}

static void
widgets_completed_task_row_set_item (WidgetsCompletedTaskRow* self,
                                     ObjectsItem* value)
{
	ObjectsItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_completed_task_row_get_item (self);
	if (old_value != value) {
		ObjectsItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_item);
		self->priv->_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_completed_task_row_properties[WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY]);
	}
}

static Block56Data*
block56_data_ref (Block56Data* _data56_)
{
	g_atomic_int_inc (&_data56_->_ref_count_);
	return _data56_;
}

static void
block56_data_unref (void * _userdata_)
{
	Block56Data* _data56_;
	_data56_ = (Block56Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data56_->_ref_count_)) {
		WidgetsCompletedTaskRow* self;
		self = _data56_->self;
		_g_object_unref0 (_data56_->checked_button_gesture);
		_g_object_unref0 (self);
		g_slice_free (Block56Data, _data56_);
	}
}

static void
_widgets_completed_task_row___lambda609_ (Block56Data* _data56_)
{
	WidgetsCompletedTaskRow* self;
	GtkGestureClick* _tmp0_;
	GtkCheckButton* _tmp1_;
	GtkCheckButton* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GtkCheckButton* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	self = _data56_->self;
	_tmp0_ = _data56_->checked_button_gesture;
	gtk_gesture_set_state ((GtkGesture*) _tmp0_, GTK_EVENT_SEQUENCE_CLAIMED);
	_tmp1_ = self->priv->checked_button;
	_tmp2_ = self->priv->checked_button;
	_tmp3_ = gtk_check_button_get_active (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_check_button_set_active (_tmp1_, !_tmp4_);
	_tmp5_ = self->priv->checked_button;
	_tmp6_ = gtk_check_button_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	widgets_completed_task_row_checked_toggled (self, _tmp7_, NULL);
}

static void
__widgets_completed_task_row___lambda609__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                     gint n_press,
                                                                     gdouble x,
                                                                     gdouble y,
                                                                     gpointer self)
{
	_widgets_completed_task_row___lambda609_ (self);
}

static void
_widgets_completed_task_row___lambda610_ (WidgetsCompletedTaskRow* self)
{
	WidgetsLoadingButton* _tmp0_;
	ObjectsItem* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->loading_button;
	_tmp1_ = self->priv->_item;
	_tmp2_ = objects_base_object_get_loading ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	widgets_loading_button_set_is_loading (_tmp0_, _tmp3_);
}

static void
__widgets_completed_task_row___lambda610__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                              gpointer self)
{
	_widgets_completed_task_row___lambda610_ ((WidgetsCompletedTaskRow*) self);
}

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

static void
__widgets_completed_task_row___lambda611__gtk_widget_destroy (GtkWidget* _sender,
                                                              gpointer self)
{
	_widgets_completed_task_row___lambda611_ ((WidgetsCompletedTaskRow*) self);
}

static GObject *
widgets_completed_task_row_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsCompletedTaskRow * self;
	Block56Data* _data56_;
	gchar* _tmp0_;
	gchar** _tmp1_;
	ObjectsItem* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GtkCheckButton* _tmp5_ = NULL;
	GtkLabel* content_label = NULL;
	ObjectsItem* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GtkLabel* _tmp9_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp10_ = NULL;
	GtkBox* _tmp11_;
	GtkCheckButton* _tmp12_;
	GtkBox* _tmp13_;
	GtkLabel* _tmp14_;
	GtkLabel* description_label = NULL;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar** _tmp17_;
	GtkLabel* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	ObjectsItem* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	GtkLabel* section_label = NULL;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar** _tmp32_;
	GtkLabel* _tmp33_ = NULL;
	GtkLabel* subitems_label = NULL;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar** _tmp36_;
	GtkLabel* _tmp37_ = NULL;
	GtkBox* bottom_box = NULL;
	GtkBox* _tmp38_ = NULL;
	GtkBox* _tmp39_;
	GtkLabel* _tmp40_;
	ObjectsItem* _tmp41_;
	GeeArrayList* _tmp42_;
	GeeArrayList* _tmp43_;
	gint _tmp44_;
	gint _tmp45_;
	GtkBox* v_box = NULL;
	GtkBox* _tmp77_ = NULL;
	GtkBox* _tmp78_;
	GtkBox* _tmp79_;
	GtkBox* _tmp80_;
	GtkBox* _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* _tmp84_;
	gchar** _tmp85_;
	WidgetsLoadingButton* _tmp86_ = NULL;
	GtkBox* h_box = NULL;
	GtkBox* _tmp87_ = NULL;
	GtkBox* _tmp88_;
	GtkBox* _tmp89_;
	GtkBox* _tmp90_;
	WidgetsLoadingButton* _tmp91_;
	AdwBin* card = NULL;
	GtkBox* _tmp92_;
	GtkWidget* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	gchar* _tmp96_;
	gchar** _tmp97_;
	AdwBin* _tmp98_ = NULL;
	AdwBin* _tmp99_;
	GtkWidget* _tmp100_;
	GtkRevealer* _tmp101_ = NULL;
	GtkRevealer* _tmp102_;
	GtkGestureClick* _tmp103_;
	GtkCheckButton* _tmp104_;
	GtkGestureClick* _tmp105_;
	GtkEventController* _tmp106_;
	GeeHashMap* _tmp107_;
	GtkGestureClick* _tmp108_;
	gulong _tmp109_;
	GtkGestureClick* _tmp110_;
	GeeHashMap* _tmp111_;
	ObjectsItem* _tmp112_;
	gulong _tmp113_;
	ObjectsItem* _tmp114_;
	parent_class = G_OBJECT_CLASS (widgets_completed_task_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow);
	_data56_ = g_slice_new0 (Block56Data);
	_data56_->_ref_count_ = 1;
	_data56_->self = g_object_ref (self);
	gtk_widget_add_css_class ((GtkWidget*) self, "row");
	gtk_widget_add_css_class ((GtkWidget*) self, "no-padding");
	_tmp0_ = g_strdup ("priority-color");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = self->priv->_item;
	_tmp3_ = objects_item_get_checked (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp5_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_check_button_set_active (_tmp5_, _tmp4_);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->checked_button);
	self->priv->checked_button = _tmp5_;
	_tmp6_ = self->priv->_item;
	_tmp7_ = objects_item_get_content (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = (GtkLabel*) gtk_label_new (_tmp8_);
	gtk_label_set_wrap (_tmp9_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp9_, TRUE);
	gtk_label_set_wrap_mode (_tmp9_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_xalign (_tmp9_, (gfloat) 0);
	gtk_label_set_yalign (_tmp9_, (gfloat) 0);
	g_object_ref_sink (_tmp9_);
	content_label = _tmp9_;
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp10_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp10_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp10_, 3);
	g_object_ref_sink (_tmp10_);
	content_box = _tmp10_;
	_tmp11_ = content_box;
	_tmp12_ = self->priv->checked_button;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = content_box;
	_tmp14_ = content_label;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = g_strdup ("dimmed");
	_tmp16_ = g_strdup ("caption");
	_tmp17_ = g_new0 (gchar*, 2 + 1);
	_tmp17_[0] = _tmp15_;
	_tmp17_[1] = _tmp16_;
	_tmp18_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp18_, (gfloat) 0);
	gtk_label_set_lines (_tmp18_, 1);
	gtk_label_set_ellipsize (_tmp18_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp18_, 30);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp18_, 6);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp18_, _tmp17_);
	_tmp17_ = (_vala_array_free (_tmp17_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp18_);
	description_label = _tmp18_;
	_tmp20_ = self->priv->_item;
	_tmp21_ = objects_item_get_has_section (_tmp20_);
	_tmp22_ = _tmp21_;
	if (_tmp22_) {
		ObjectsItem* _tmp23_;
		ObjectsSection* _tmp24_;
		ObjectsSection* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
		_tmp23_ = self->priv->_item;
		_tmp24_ = objects_item_get_section (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = g_strconcat ("● ", _tmp27_, NULL);
		_g_free0 (_tmp19_);
		_tmp19_ = _tmp28_;
	} else {
		gchar* _tmp29_;
		_tmp29_ = g_strconcat ("● ", _ ("No Section"), NULL);
		_g_free0 (_tmp19_);
		_tmp19_ = _tmp29_;
	}
	_tmp30_ = g_strdup ("dimmed");
	_tmp31_ = g_strdup ("caption");
	_tmp32_ = g_new0 (gchar*, 2 + 1);
	_tmp32_[0] = _tmp30_;
	_tmp32_[1] = _tmp31_;
	_tmp33_ = (GtkLabel*) gtk_label_new (_tmp19_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp33_, _tmp32_);
	_tmp32_ = (_vala_array_free (_tmp32_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp33_);
	section_label = _tmp33_;
	_tmp34_ = g_strdup ("dimmed");
	_tmp35_ = g_strdup ("caption");
	_tmp36_ = g_new0 (gchar*, 2 + 1);
	_tmp36_[0] = _tmp34_;
	_tmp36_[1] = _tmp35_;
	_tmp37_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp37_, _tmp36_);
	_tmp36_ = (_vala_array_free (_tmp36_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp37_);
	subitems_label = _tmp37_;
	_tmp38_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp38_, 24);
	g_object_ref_sink (_tmp38_);
	bottom_box = _tmp38_;
	_tmp39_ = bottom_box;
	_tmp40_ = section_label;
	gtk_box_append (_tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = self->priv->_item;
	_tmp42_ = objects_item_get_items (_tmp41_);
	_tmp43_ = _tmp42_;
	_tmp44_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp43_);
	_tmp45_ = _tmp44_;
	if (_tmp45_ > 0) {
		GtkBox* _tmp46_;
		gchar* _tmp47_;
		gchar* _tmp48_;
		gchar** _tmp49_;
		GtkLabel* _tmp50_ = NULL;
		GtkLabel* _tmp51_;
		gchar* _tmp52_ = NULL;
		ObjectsItem* _tmp53_;
		GeeArrayList* _tmp54_;
		GeeArrayList* _tmp55_;
		gint _tmp56_;
		gint _tmp57_;
		GtkLabel* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		GtkBox* _tmp75_;
		GtkLabel* _tmp76_;
		_tmp46_ = bottom_box;
		_tmp47_ = g_strdup ("dimmed");
		_tmp48_ = g_strdup ("caption");
		_tmp49_ = g_new0 (gchar*, 2 + 1);
		_tmp49_[0] = _tmp47_;
		_tmp49_[1] = _tmp48_;
		_tmp50_ = (GtkLabel*) gtk_label_new ("|");
		gtk_widget_set_css_classes ((GtkWidget*) _tmp50_, _tmp49_);
		_tmp49_ = (_vala_array_free (_tmp49_, 2, (GDestroyNotify) g_free), NULL);
		g_object_ref_sink (_tmp50_);
		_tmp51_ = _tmp50_;
		gtk_box_append (_tmp46_, (GtkWidget*) _tmp51_);
		_g_object_unref0 (_tmp51_);
		_tmp53_ = self->priv->_item;
		_tmp54_ = objects_item_get_items (_tmp53_);
		_tmp55_ = _tmp54_;
		_tmp56_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp55_);
		_tmp57_ = _tmp56_;
		if (_tmp57_ < 10) {
			ObjectsItem* _tmp58_;
			GeeArrayList* _tmp59_;
			GeeArrayList* _tmp60_;
			gint _tmp61_;
			gint _tmp62_;
			gchar* _tmp63_;
			gchar* _tmp64_;
			gchar* _tmp65_;
			_tmp58_ = self->priv->_item;
			_tmp59_ = objects_item_get_items (_tmp58_);
			_tmp60_ = _tmp59_;
			_tmp61_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp60_);
			_tmp62_ = _tmp61_;
			_tmp63_ = g_strdup_printf ("%i", _tmp62_);
			_tmp64_ = _tmp63_;
			_tmp65_ = g_strconcat ("0", _tmp64_, NULL);
			_g_free0 (_tmp52_);
			_tmp52_ = _tmp65_;
			_g_free0 (_tmp64_);
		} else {
			ObjectsItem* _tmp66_;
			GeeArrayList* _tmp67_;
			GeeArrayList* _tmp68_;
			gint _tmp69_;
			gint _tmp70_;
			gchar* _tmp71_;
			_tmp66_ = self->priv->_item;
			_tmp67_ = objects_item_get_items (_tmp66_);
			_tmp68_ = _tmp67_;
			_tmp69_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp68_);
			_tmp70_ = _tmp69_;
			_tmp71_ = g_strdup_printf ("%i", _tmp70_);
			_g_free0 (_tmp52_);
			_tmp52_ = _tmp71_;
		}
		_tmp72_ = subitems_label;
		_tmp73_ = g_strdup_printf ("%s %s", _tmp52_, _ ("Sub-tasks"));
		_tmp74_ = _tmp73_;
		gtk_label_set_label (_tmp72_, _tmp74_);
		_g_free0 (_tmp74_);
		_tmp75_ = bottom_box;
		_tmp76_ = subitems_label;
		gtk_box_append (_tmp75_, (GtkWidget*) _tmp76_);
		_g_free0 (_tmp52_);
	}
	_tmp77_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp77_, TRUE);
	g_object_ref_sink (_tmp77_);
	v_box = _tmp77_;
	_tmp78_ = v_box;
	_tmp79_ = content_box;
	gtk_box_append (_tmp78_, (GtkWidget*) _tmp79_);
	_tmp80_ = v_box;
	_tmp81_ = bottom_box;
	gtk_box_append (_tmp80_, (GtkWidget*) _tmp81_);
	_tmp82_ = g_strdup ("flat");
	_tmp83_ = g_strdup ("dimmed");
	_tmp84_ = g_strdup ("no-padding");
	_tmp85_ = g_new0 (gchar*, 3 + 1);
	_tmp85_[0] = _tmp82_;
	_tmp85_[1] = _tmp83_;
	_tmp85_[2] = _tmp84_;
	_tmp86_ = widgets_loading_button_new_with_icon ("go-next-symbolic", 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp86_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp86_, _tmp85_);
	_tmp85_ = (_vala_array_free (_tmp85_, 3, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp86_);
	_g_object_unref0 (self->priv->loading_button);
	self->priv->loading_button = _tmp86_;
	_tmp87_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp87_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp87_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp87_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp87_, 6);
	g_object_ref_sink (_tmp87_);
	h_box = _tmp87_;
	_tmp88_ = h_box;
	_tmp89_ = v_box;
	gtk_box_append (_tmp88_, (GtkWidget*) _tmp89_);
	_tmp90_ = h_box;
	_tmp91_ = self->priv->loading_button;
	gtk_box_append (_tmp90_, (GtkWidget*) _tmp91_);
	_tmp92_ = h_box;
	_tmp93_ = _g_object_ref0 ((GtkWidget*) _tmp92_);
	_tmp94_ = g_strdup ("card");
	_tmp95_ = g_strdup ("activatable");
	_tmp96_ = g_strdup ("border-radius-9");
	_tmp97_ = g_new0 (gchar*, 3 + 1);
	_tmp97_[0] = _tmp94_;
	_tmp97_[1] = _tmp95_;
	_tmp97_[2] = _tmp96_;
	_tmp98_ = (AdwBin*) adw_bin_new ();
	adw_bin_set_child (_tmp98_, _tmp93_);
	_g_object_unref0 (_tmp93_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp98_, _tmp97_);
	_tmp97_ = (_vala_array_free (_tmp97_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp98_, 1);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp98_, 1);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp98_, 1);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp98_, 1);
	g_object_ref_sink (_tmp98_);
	card = _tmp98_;
	_tmp99_ = card;
	_tmp100_ = _g_object_ref0 ((GtkWidget*) _tmp99_);
	_tmp101_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp101_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp101_, _tmp100_);
	_g_object_unref0 (_tmp100_);
	gtk_revealer_set_reveal_child (_tmp101_, TRUE);
	g_object_ref_sink (_tmp101_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp101_;
	_tmp102_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp102_);
	_tmp103_ = (GtkGestureClick*) gtk_gesture_click_new ();
	_data56_->checked_button_gesture = _tmp103_;
	_tmp104_ = self->priv->checked_button;
	_tmp105_ = _data56_->checked_button_gesture;
	_tmp106_ = _g_object_ref0 ((GtkEventController*) _tmp105_);
	gtk_widget_add_controller ((GtkWidget*) _tmp104_, _tmp106_);
	_tmp107_ = self->priv->signals_map;
	_tmp108_ = _data56_->checked_button_gesture;
	_tmp109_ = g_signal_connect_data (_tmp108_, "pressed", (GCallback) __widgets_completed_task_row___lambda609__gtk_gesture_click_pressed, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
	_tmp110_ = _data56_->checked_button_gesture;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp107_, (gpointer) ((guintptr) _tmp109_), (GObject*) _tmp110_);
	_tmp111_ = self->priv->signals_map;
	_tmp112_ = self->priv->_item;
	_tmp113_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp112_, "loading-change", (GCallback) __widgets_completed_task_row___lambda610__objects_base_object_loading_change, self, 0);
	_tmp114_ = self->priv->_item;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp111_, (gpointer) ((guintptr) _tmp113_), (GObject*) _tmp114_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __widgets_completed_task_row___lambda611__gtk_widget_destroy, self, 0);
	_g_object_unref0 (card);
	_g_object_unref0 (h_box);
	_g_object_unref0 (v_box);
	_g_object_unref0 (bottom_box);
	_g_object_unref0 (subitems_label);
	_g_object_unref0 (section_label);
	_g_free0 (_tmp19_);
	_g_object_unref0 (description_label);
	_g_object_unref0 (content_box);
	_g_object_unref0 (content_label);
	block56_data_unref (_data56_);
	_data56_ = NULL;
	return obj;
}

static void
widgets_completed_task_row_class_init (WidgetsCompletedTaskRowClass * klass,
                                       gpointer klass_data)
{
	widgets_completed_task_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsCompletedTaskRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_completed_task_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_completed_task_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_completed_task_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_completed_task_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY, widgets_completed_task_row_properties[WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY] = g_param_spec_object ("item", "item", "item", OBJECTS_TYPE_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
widgets_completed_task_row_instance_init (WidgetsCompletedTaskRow * self,
                                          gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = widgets_completed_task_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signals_map = _tmp0_;
}

static void
widgets_completed_task_row_finalize (GObject * obj)
{
	WidgetsCompletedTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow);
	g_debug ("CompletedTaskRow.vala:38: Destroying - Widgets.CompletedTaskRow\n");
	_g_object_unref0 (self->priv->_item);
	_g_object_unref0 (self->priv->checked_button);
	_g_object_unref0 (self->priv->loading_button);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->signals_map);
	G_OBJECT_CLASS (widgets_completed_task_row_parent_class)->finalize (obj);
}

static GType
widgets_completed_task_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsCompletedTaskRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_completed_task_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsCompletedTaskRow), 0, (GInstanceInitFunc) widgets_completed_task_row_instance_init, NULL };
	GType widgets_completed_task_row_type_id;
	widgets_completed_task_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "WidgetsCompletedTaskRow", &g_define_type_info, 0);
	WidgetsCompletedTaskRow_private_offset = g_type_add_instance_private (widgets_completed_task_row_type_id, sizeof (WidgetsCompletedTaskRowPrivate));
	return widgets_completed_task_row_type_id;
}

GType
widgets_completed_task_row_get_type (void)
{
	static volatile gsize widgets_completed_task_row_type_id__once = 0;
	if (g_once_init_enter (&widgets_completed_task_row_type_id__once)) {
		GType widgets_completed_task_row_type_id;
		widgets_completed_task_row_type_id = widgets_completed_task_row_get_type_once ();
		g_once_init_leave (&widgets_completed_task_row_type_id__once, widgets_completed_task_row_type_id);
	}
	return widgets_completed_task_row_type_id__once;
}

static void
_vala_widgets_completed_task_row_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	WidgetsCompletedTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow);
	switch (property_id) {
		case WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY:
		g_value_set_object (value, widgets_completed_task_row_get_item (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_completed_task_row_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	WidgetsCompletedTaskRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow);
	switch (property_id) {
		case WIDGETS_COMPLETED_TASK_ROW_ITEM_PROPERTY:
		widgets_completed_task_row_set_item (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

