/* CompletedTasks.c generated by valac 0.56.19, the Vala compiler
 * generated from CompletedTasks.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 <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include "planify.h"
#include <glib/gi18n-lib.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 DIALOGS_TYPE_COMPLETED_TASKS (dialogs_completed_tasks_get_type ())
#define DIALOGS_COMPLETED_TASKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasks))
#define DIALOGS_COMPLETED_TASKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasksClass))
#define DIALOGS_IS_COMPLETED_TASKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_COMPLETED_TASKS))
#define DIALOGS_IS_COMPLETED_TASKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_COMPLETED_TASKS))
#define DIALOGS_COMPLETED_TASKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasksClass))

typedef struct _DialogsCompletedTasks DialogsCompletedTasks;
typedef struct _DialogsCompletedTasksClass DialogsCompletedTasksClass;
typedef struct _DialogsCompletedTasksPrivate DialogsCompletedTasksPrivate;

#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;

#define WIDGETS_TYPE_FILTER_FLOW_BOX (widgets_filter_flow_box_get_type ())
#define WIDGETS_FILTER_FLOW_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX, WidgetsFilterFlowBox))
#define WIDGETS_FILTER_FLOW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_FILTER_FLOW_BOX, WidgetsFilterFlowBoxClass))
#define WIDGETS_IS_FILTER_FLOW_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX))
#define WIDGETS_IS_FILTER_FLOW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_FILTER_FLOW_BOX))
#define WIDGETS_FILTER_FLOW_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX, WidgetsFilterFlowBoxClass))

typedef struct _WidgetsFilterFlowBox WidgetsFilterFlowBox;
typedef struct _WidgetsFilterFlowBoxClass WidgetsFilterFlowBoxClass;
enum  {
	DIALOGS_COMPLETED_TASKS_0_PROPERTY,
	DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY,
	DIALOGS_COMPLETED_TASKS_NUM_PROPERTIES
};
static GParamSpec* dialogs_completed_tasks_properties[DIALOGS_COMPLETED_TASKS_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 WIDGETS_TYPE_ITEM_DETAIL_COMPLETED (widgets_item_detail_completed_get_type ())
#define WIDGETS_ITEM_DETAIL_COMPLETED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ITEM_DETAIL_COMPLETED, WidgetsItemDetailCompleted))
#define WIDGETS_ITEM_DETAIL_COMPLETED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ITEM_DETAIL_COMPLETED, WidgetsItemDetailCompletedClass))
#define WIDGETS_IS_ITEM_DETAIL_COMPLETED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ITEM_DETAIL_COMPLETED))
#define WIDGETS_IS_ITEM_DETAIL_COMPLETED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ITEM_DETAIL_COMPLETED))
#define WIDGETS_ITEM_DETAIL_COMPLETED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ITEM_DETAIL_COMPLETED, WidgetsItemDetailCompletedClass))

typedef struct _WidgetsItemDetailCompleted WidgetsItemDetailCompleted;
typedef struct _WidgetsItemDetailCompletedClass WidgetsItemDetailCompletedClass;
typedef struct _Block90Data Block90Data;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _WidgetsFilterFlowBoxPrivate WidgetsFilterFlowBoxPrivate;
typedef struct _Block91Data Block91Data;

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;

struct _DialogsCompletedTasks {
	AdwDialog parent_instance;
	DialogsCompletedTasksPrivate * priv;
	GeeHashMap* items_checked;
};

struct _DialogsCompletedTasksClass {
	AdwDialogClass parent_class;
};

struct _DialogsCompletedTasksPrivate {
	ObjectsProject* _project;
	AdwNavigationView* navigation_view;
	GtkListBox* listbox;
	GtkSearchEntry* search_entry;
	WidgetsFilterFlowBox* filters_flowbox;
	GtkButton* remove_all;
	gchar* filter_section_id;
	GeeHashMap* signals_map;
};

struct _Block90Data {
	int _ref_count_;
	DialogsCompletedTasks* self;
	WidgetsItemDetailCompleted* item_detail_page;
	gulong signal_id;
};

struct _WidgetsFilterFlowBox {
	AdwBin parent_instance;
	WidgetsFilterFlowBoxPrivate * priv;
	GtkFlowBox* flowbox;
};

struct _WidgetsFilterFlowBoxClass {
	AdwBinClass parent_class;
};

struct _Block91Data {
	int _ref_count_;
	DialogsCompletedTasks* self;
	GeeArrayList* items;
};

struct _Planify {
	AdwApplication parent_instance;
	PlanifyPrivate * priv;
	MainWindow* main_window;
};

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

static gint DialogsCompletedTasks_private_offset;
static gpointer dialogs_completed_tasks_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType dialogs_completed_tasks_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsCompletedTasks, g_object_unref)
VALA_EXTERN GType widgets_completed_task_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsCompletedTaskRow, g_object_unref)
VALA_EXTERN GType widgets_filter_flow_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsFilterFlowBox, g_object_unref)
VALA_EXTERN DialogsCompletedTasks* dialogs_completed_tasks_new (ObjectsProject* project);
VALA_EXTERN DialogsCompletedTasks* dialogs_completed_tasks_construct (GType object_type,
                                                          ObjectsProject* project);
static void dialogs_completed_tasks_view_item (DialogsCompletedTasks* self,
                                        ObjectsItem* item);
VALA_EXTERN GType widgets_item_detail_completed_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsItemDetailCompleted, g_object_unref)
static Block90Data* block90_data_ref (Block90Data* _data90_);
static void block90_data_unref (void * _userdata_);
VALA_EXTERN WidgetsItemDetailCompleted* widgets_item_detail_completed_new (ObjectsItem* item);
VALA_EXTERN WidgetsItemDetailCompleted* widgets_item_detail_completed_construct (GType object_type,
                                                                     ObjectsItem* item);
static void _dialogs_completed_tasks_view_item_widgets_item_detail_completed_view_item (WidgetsItemDetailCompleted* _sender,
                                                                                 ObjectsItem* item,
                                                                                 gpointer self);
static void __lambda615_ (Block90Data* _data90_);
static void ___lambda615__gtk_widget_destroy (GtkWidget* _sender,
                                       gpointer self);
static void dialogs_completed_tasks_add_items (DialogsCompletedTasks* self);
VALA_EXTERN ObjectsProject* dialogs_completed_tasks_get_project (DialogsCompletedTasks* self);
VALA_EXTERN WidgetsCompletedTaskRow* widgets_completed_task_row_new (ObjectsItem* item);
VALA_EXTERN WidgetsCompletedTaskRow* widgets_completed_task_row_construct (GType object_type,
                                                               ObjectsItem* item);
static void dialogs_completed_tasks_header_completed_function (DialogsCompletedTasks* self,
                                                        GtkListBoxRow* lbrow,
                                                        GtkListBoxRow* lbbefore);
VALA_EXTERN ObjectsItem* widgets_completed_task_row_get_item (WidgetsCompletedTaskRow* self);
static GtkWidget* dialogs_completed_tasks_get_header_box (DialogsCompletedTasks* self,
                                                   const gchar* title);
static gint dialogs_completed_tasks_sort_completed_function (DialogsCompletedTasks* self,
                                                      GtkListBoxRow* row1,
                                                      GtkListBoxRow* row2);
static gboolean dialogs_completed_tasks_filter_function (DialogsCompletedTasks* self,
                                                  GtkListBoxRow* row);
static void dialogs_completed_tasks_clear_items (DialogsCompletedTasks* self);
VALA_EXTERN void widgets_completed_task_row_hide_destroy (WidgetsCompletedTaskRow* self);
static GtkPopover* dialogs_completed_tasks_build_view_setting_popover (DialogsCompletedTasks* self);
static void __lambda616_ (DialogsCompletedTasks* self);
static void ___lambda616__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
VALA_EXTERN void dialogs_completed_tasks_add_update_filter (DialogsCompletedTasks* self,
                                                ObjectsSection* section);
VALA_EXTERN ObjectsFiltersFilterItem* widgets_filter_flow_box_get_filter (WidgetsFilterFlowBox* self,
                                                              const gchar* id);
VALA_EXTERN void widgets_filter_flow_box_add_filter (WidgetsFilterFlowBox* self,
                                         ObjectsFiltersFilterItem* filter);
VALA_EXTERN void widgets_filter_flow_box_update_filter (WidgetsFilterFlowBox* self,
                                            ObjectsFiltersFilterItem* filter);
VALA_EXTERN void dialogs_completed_tasks_delete_all_action (DialogsCompletedTasks* self,
                                                GeeArrayList* items);
VALA_EXTERN void dialogs_completed_tasks_clean_up (DialogsCompletedTasks* self);
VALA_EXTERN void widgets_completed_task_row_clean_up (WidgetsCompletedTaskRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void dialogs_completed_tasks_set_project (DialogsCompletedTasks* self,
                                          ObjectsProject* value);
static GObject * dialogs_completed_tasks_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN WidgetsFilterFlowBox* widgets_filter_flow_box_new (void);
VALA_EXTERN WidgetsFilterFlowBox* widgets_filter_flow_box_construct (GType object_type);
static gint _dialogs_completed_tasks_sort_completed_function_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                              GtkListBoxRow* row2,
                                                                              gpointer self);
static void _dialogs_completed_tasks_header_completed_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                                         GtkListBoxRow* before,
                                                                                         gpointer self);
static gboolean _dialogs_completed_tasks_filter_function_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                            gpointer self);
static void _dialogs_completed_tasks___lambda617_ (DialogsCompletedTasks* self);
static void __dialogs_completed_tasks___lambda617__widgets_filter_flow_box_filter_removed (WidgetsFilterFlowBox* _sender,
                                                                                    ObjectsFiltersFilterItem* filter,
                                                                                    gpointer self);
static void _dialogs_completed_tasks___lambda618_ (DialogsCompletedTasks* self);
static void __dialogs_completed_tasks___lambda618__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                             gpointer self);
static void _dialogs_completed_tasks___lambda619_ (DialogsCompletedTasks* self);
static Block91Data* block91_data_ref (Block91Data* _data91_);
static void block91_data_unref (void * _userdata_);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void __lambda620_ (Block91Data* _data91_,
                   const gchar* response);
static void ___lambda620__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                              const gchar* response,
                                              gpointer self);
static void __dialogs_completed_tasks___lambda619__gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self);
static void _dialogs_completed_tasks___lambda621_ (DialogsCompletedTasks* self,
                                            GtkListBoxRow* row);
static void __dialogs_completed_tasks___lambda621__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                        GtkListBoxRow* row,
                                                                        gpointer self);
static void _dialogs_completed_tasks___lambda622_ (DialogsCompletedTasks* self,
                                            ObjectsItem* item,
                                            gboolean old_checked);
static void __dialogs_completed_tasks___lambda622__services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                                                ObjectsItem* item,
                                                                                gboolean old_checked,
                                                                                gpointer self);
static void _dialogs_completed_tasks___lambda623_ (DialogsCompletedTasks* self,
                                            ObjectsItem* item);
static void __dialogs_completed_tasks___lambda623__services_store_item_deleted (ServicesStore* _sender,
                                                                         ObjectsItem* item,
                                                                         gpointer self);
static void _dialogs_completed_tasks___lambda624_ (DialogsCompletedTasks* self);
static void __dialogs_completed_tasks___lambda624__adw_dialog_closed (AdwDialog* _sender,
                                                               gpointer self);
static void dialogs_completed_tasks_finalize (GObject * obj);
static GType dialogs_completed_tasks_get_type_once (void);
static void _vala_dialogs_completed_tasks_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_dialogs_completed_tasks_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
dialogs_completed_tasks_get_instance_private (DialogsCompletedTasks* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsCompletedTasks_private_offset);
}

DialogsCompletedTasks*
dialogs_completed_tasks_construct (GType object_type,
                                   ObjectsProject* project)
{
	DialogsCompletedTasks * self = NULL;
	g_return_val_if_fail (project != NULL, NULL);
	self = (DialogsCompletedTasks*) g_object_new (object_type, "project", project, "title", _ ("Completed Tasks"), "content-width", 450, "content-height", 500, NULL);
	return self;
}

DialogsCompletedTasks*
dialogs_completed_tasks_new (ObjectsProject* project)
{
	return dialogs_completed_tasks_construct (DIALOGS_TYPE_COMPLETED_TASKS, project);
}

static Block90Data*
block90_data_ref (Block90Data* _data90_)
{
	g_atomic_int_inc (&_data90_->_ref_count_);
	return _data90_;
}

static void
block90_data_unref (void * _userdata_)
{
	Block90Data* _data90_;
	_data90_ = (Block90Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data90_->_ref_count_)) {
		DialogsCompletedTasks* self;
		self = _data90_->self;
		_g_object_unref0 (_data90_->item_detail_page);
		_g_object_unref0 (self);
		g_slice_free (Block90Data, _data90_);
	}
}

static void
_dialogs_completed_tasks_view_item_widgets_item_detail_completed_view_item (WidgetsItemDetailCompleted* _sender,
                                                                            ObjectsItem* item,
                                                                            gpointer self)
{
	dialogs_completed_tasks_view_item ((DialogsCompletedTasks*) self, item);
}

static void
__lambda615_ (Block90Data* _data90_)
{
	DialogsCompletedTasks* self;
	self = _data90_->self;
	g_signal_handler_disconnect ((GObject*) _data90_->item_detail_page, _data90_->signal_id);
}

static void
___lambda615__gtk_widget_destroy (GtkWidget* _sender,
                                  gpointer self)
{
	__lambda615_ (self);
}

static void
dialogs_completed_tasks_view_item (DialogsCompletedTasks* self,
                                   ObjectsItem* item)
{
	Block90Data* _data90_;
	WidgetsItemDetailCompleted* _tmp0_;
	gulong _tmp1_;
	AdwNavigationView* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_data90_ = g_slice_new0 (Block90Data);
	_data90_->_ref_count_ = 1;
	_data90_->self = g_object_ref (self);
	_tmp0_ = widgets_item_detail_completed_new (item);
	g_object_ref_sink (_tmp0_);
	_data90_->item_detail_page = _tmp0_;
	_tmp1_ = g_signal_connect_object (_data90_->item_detail_page, "view-item", (GCallback) _dialogs_completed_tasks_view_item_widgets_item_detail_completed_view_item, self, 0);
	_data90_->signal_id = _tmp1_;
	g_signal_connect_data ((GtkWidget*) _data90_->item_detail_page, "destroy", (GCallback) ___lambda615__gtk_widget_destroy, block90_data_ref (_data90_), (GClosureNotify) block90_data_unref, 0);
	_tmp2_ = self->priv->navigation_view;
	adw_navigation_view_push (_tmp2_, (AdwNavigationPage*) _data90_->item_detail_page);
	block90_data_unref (_data90_);
	_data90_ = NULL;
}

static void
dialogs_completed_tasks_add_items (DialogsCompletedTasks* self)
{
	GtkButton* _tmp31_;
	GeeHashMap* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _item_list = NULL;
		ObjectsProject* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _item_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _item_index = 0;
		_tmp0_ = self->priv->_project;
		_tmp1_ = objects_project_get_items_checked (_tmp0_);
		_tmp2_ = _tmp1_;
		_item_list = _tmp2_;
		_tmp3_ = _item_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_item_size = _tmp5_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsItem* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			GeeHashMap* _tmp13_;
			ObjectsItem* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_item_index = _item_index + 1;
			_tmp6_ = _item_index;
			_tmp7_ = _item_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _item_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _item_index);
			item = (ObjectsItem*) _tmp9_;
			_tmp10_ = item;
			_tmp11_ = objects_item_get_has_parent (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_) {
				_g_object_unref0 (item);
				continue;
			}
			_tmp13_ = self->items_checked;
			_tmp14_ = item;
			_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp14_);
			_tmp16_ = _tmp15_;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp13_, _tmp16_)) {
				GeeHashMap* _tmp17_;
				ObjectsItem* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				ObjectsItem* _tmp21_;
				WidgetsCompletedTaskRow* _tmp22_;
				WidgetsCompletedTaskRow* _tmp23_;
				GtkListBox* _tmp24_;
				GeeHashMap* _tmp25_;
				ObjectsItem* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				gpointer _tmp29_;
				WidgetsCompletedTaskRow* _tmp30_;
				_tmp17_ = self->items_checked;
				_tmp18_ = item;
				_tmp19_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = item;
				_tmp22_ = widgets_completed_task_row_new (_tmp21_);
				g_object_ref_sink (_tmp22_);
				_tmp23_ = _tmp22_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, _tmp20_, _tmp23_);
				_g_object_unref0 (_tmp23_);
				_tmp24_ = self->priv->listbox;
				_tmp25_ = self->items_checked;
				_tmp26_ = item;
				_tmp27_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp26_);
				_tmp28_ = _tmp27_;
				_tmp29_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp25_, _tmp28_);
				_tmp30_ = (WidgetsCompletedTaskRow*) _tmp29_;
				gtk_list_box_append (_tmp24_, (GtkWidget*) _tmp30_);
				_g_object_unref0 (_tmp30_);
			}
			_g_object_unref0 (item);
		}
	}
	_tmp31_ = self->priv->remove_all;
	_tmp32_ = self->items_checked;
	_tmp33_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp32_);
	_tmp34_ = _tmp33_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp31_, _tmp34_ > 0);
}

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

static void
dialogs_completed_tasks_header_completed_function (DialogsCompletedTasks* self,
                                                   GtkListBoxRow* lbrow,
                                                   GtkListBoxRow* lbbefore)
{
	WidgetsCompletedTaskRow* row = NULL;
	WidgetsCompletedTaskRow* _tmp0_;
	WidgetsCompletedTaskRow* _tmp1_;
	ObjectsItem* _tmp2_;
	ObjectsItem* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	WidgetsCompletedTaskRow* _tmp27_;
	WidgetsCompletedTaskRow* _tmp28_;
	ObjectsItem* _tmp29_;
	ObjectsItem* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GDateTime* _tmp33_;
	GDateTime* _tmp34_;
	GDateTime* _tmp35_;
	GDateTime* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GtkWidget* _tmp39_;
	GtkWidget* _tmp40_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (lbrow != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbrow, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
	row = _tmp0_;
	_tmp1_ = row;
	_tmp2_ = widgets_completed_task_row_get_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_item_get_completed_at (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "") == 0) {
		_g_object_unref0 (row);
		return;
	}
	if (lbbefore != NULL) {
		WidgetsCompletedTaskRow* before = NULL;
		WidgetsCompletedTaskRow* _tmp6_;
		GDateTime* comp_before = NULL;
		WidgetsCompletedTaskRow* _tmp7_;
		ObjectsItem* _tmp8_;
		ObjectsItem* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GDateTime* _tmp12_;
		GDateTime* _tmp13_;
		GDateTime* _tmp14_;
		GDateTime* _tmp15_;
		GDateTime* comp_after = NULL;
		WidgetsCompletedTaskRow* _tmp16_;
		ObjectsItem* _tmp17_;
		ObjectsItem* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		GDateTime* _tmp21_;
		GDateTime* _tmp22_;
		GDateTime* _tmp23_;
		GDateTime* _tmp24_;
		GDateTime* _tmp25_;
		GDateTime* _tmp26_;
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (lbbefore, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
		before = _tmp6_;
		_tmp7_ = before;
		_tmp8_ = widgets_completed_task_row_get_item (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = objects_item_get_completed_at (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = utils_datetime_get_date_from_string (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = utils_datetime_get_date_only (_tmp13_);
		_tmp15_ = _tmp14_;
		_g_date_time_unref0 (_tmp13_);
		comp_before = _tmp15_;
		_tmp16_ = row;
		_tmp17_ = widgets_completed_task_row_get_item (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = objects_item_get_completed_at (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = utils_datetime_get_date_from_string (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = utils_datetime_get_date_only (_tmp22_);
		_tmp24_ = _tmp23_;
		_g_date_time_unref0 (_tmp22_);
		comp_after = _tmp24_;
		_tmp25_ = comp_before;
		_tmp26_ = comp_after;
		if (g_date_time_compare (_tmp25_, _tmp26_) == 0) {
			_g_date_time_unref0 (comp_after);
			_g_date_time_unref0 (comp_before);
			_g_object_unref0 (before);
			_g_object_unref0 (row);
			return;
		}
		_g_date_time_unref0 (comp_after);
		_g_date_time_unref0 (comp_before);
		_g_object_unref0 (before);
	}
	_tmp27_ = row;
	_tmp28_ = row;
	_tmp29_ = widgets_completed_task_row_get_item (_tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = objects_item_get_completed_at (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = utils_datetime_get_date_from_string (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = utils_datetime_get_date_only (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = utils_datetime_get_relative_date_from_date (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = dialogs_completed_tasks_get_header_box (self, _tmp38_);
	_tmp40_ = _tmp39_;
	gtk_list_box_row_set_header ((GtkListBoxRow*) _tmp27_, _tmp40_);
	_g_object_unref0 (_tmp40_);
	_g_free0 (_tmp38_);
	_g_date_time_unref0 (_tmp36_);
	_g_date_time_unref0 (_tmp34_);
	_g_object_unref0 (row);
}

static gint
dialogs_completed_tasks_sort_completed_function (DialogsCompletedTasks* self,
                                                 GtkListBoxRow* row1,
                                                 GtkListBoxRow* row2)
{
	GDateTime* completed_a = NULL;
	ObjectsItem* _tmp0_;
	ObjectsItem* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	GDateTime* completed_b = NULL;
	ObjectsItem* _tmp8_;
	ObjectsItem* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	GDateTime* _tmp12_;
	GDateTime* _tmp13_;
	GDateTime* _tmp14_;
	GDateTime* _tmp15_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (row1 != NULL, -1);
	_tmp0_ = widgets_completed_task_row_get_item (G_TYPE_CHECK_INSTANCE_CAST (row1, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_item_get_completed_at (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = utils_datetime_get_date_from_string (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = utils_datetime_get_date_only (_tmp5_);
	_tmp7_ = _tmp6_;
	_g_date_time_unref0 (_tmp5_);
	completed_a = _tmp7_;
	_tmp8_ = widgets_completed_task_row_get_item (G_TYPE_CHECK_INSTANCE_CAST (row2, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
	_tmp9_ = _tmp8_;
	_tmp10_ = objects_item_get_completed_at (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = utils_datetime_get_date_from_string (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = utils_datetime_get_date_only (_tmp13_);
	_tmp15_ = _tmp14_;
	_g_date_time_unref0 (_tmp13_);
	completed_b = _tmp15_;
	result = g_date_time_compare (completed_b, completed_a);
	_g_date_time_unref0 (completed_b);
	_g_date_time_unref0 (completed_a);
	return result;
}

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 gboolean
dialogs_completed_tasks_filter_function (DialogsCompletedTasks* self,
                                         GtkListBoxRow* row)
{
	ObjectsItem* item = NULL;
	ObjectsItem* _tmp0_;
	ObjectsItem* _tmp1_;
	ObjectsItem* _tmp2_;
	const gchar* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (row != NULL, FALSE);
	_tmp0_ = widgets_completed_task_row_get_item (G_TYPE_CHECK_INSTANCE_CAST (row, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	item = _tmp2_;
	_tmp3_ = self->priv->filter_section_id;
	if (_tmp3_ != NULL) {
		ObjectsItem* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = item;
		_tmp5_ = objects_item_get_section_id (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->filter_section_id;
		result = g_strcmp0 (_tmp6_, _tmp7_) == 0;
		_g_object_unref0 (item);
		return result;
	} else {
		ObjectsItem* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		GtkSearchEntry* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gboolean _tmp18_;
		_tmp8_ = item;
		_tmp9_ = objects_item_get_content (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1);
		_tmp12_ = _tmp11_;
		_tmp13_ = self->priv->search_entry;
		_tmp14_ = gtk_editable_get_text ((GtkEditable*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_utf8_strdown (_tmp15_, (gssize) -1);
		_tmp17_ = _tmp16_;
		_tmp18_ = string_contains (_tmp12_, _tmp17_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp12_);
		result = _tmp18_;
		_g_object_unref0 (item);
		return result;
	}
}

static GtkWidget*
dialogs_completed_tasks_get_header_box (DialogsCompletedTasks* self,
                                        const gchar* title)
{
	GtkLabel* header_label = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkBox* header_box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_tmp0_ = g_strdup ("caption");
	_tmp1_ = g_strdup ("font-bold");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (title);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp3_);
	header_label = _tmp3_;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp4_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp4_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 12);
	g_object_ref_sink (_tmp4_);
	header_box = _tmp4_;
	gtk_box_append (header_box, (GtkWidget*) header_label);
	result = (GtkWidget*) header_box;
	_g_object_unref0 (header_label);
	return result;
}

static void
dialogs_completed_tasks_clear_items (DialogsCompletedTasks* self)
{
	GeeHashMap* _tmp10_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _item_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->items_checked;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_item_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			WidgetsCompletedTaskRow* item = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			WidgetsCompletedTaskRow* _tmp9_;
			_tmp6_ = _item_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _item_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			item = (WidgetsCompletedTaskRow*) _tmp8_;
			_tmp9_ = item;
			widgets_completed_task_row_hide_destroy (_tmp9_);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_it);
	}
	_tmp10_ = self->items_checked;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp10_);
}

static void
__lambda616_ (DialogsCompletedTasks* self)
{
}

static void
___lambda616__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda616_ ((DialogsCompletedTasks*) self);
}

static GtkPopover*
dialogs_completed_tasks_build_view_setting_popover (DialogsCompletedTasks* self)
{
	WidgetsContextMenuMenuPicker* section_item = NULL;
	WidgetsContextMenuMenuPicker* _tmp0_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar** _tmp21_;
	GtkLabel* _tmp22_ = NULL;
	GtkLabel* _tmp23_;
	WidgetsContextMenuMenuPicker* _tmp24_;
	GtkPopover* popover = NULL;
	GtkWidget* _tmp25_;
	GtkPopover* _tmp26_ = NULL;
	WidgetsContextMenuMenuPicker* _tmp27_;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = widgets_context_menu_menu_picker_new (_ ("Section"), "arrow3-right-symbolic");
	g_object_ref_sink (_tmp0_);
	section_item = _tmp0_;
	{
		GeeArrayList* _section_list = NULL;
		ObjectsProject* _tmp1_;
		GeeArrayList* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _section_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _section_index = 0;
		_tmp1_ = self->priv->_project;
		_tmp2_ = objects_project_get_sections (_tmp1_);
		_tmp3_ = _tmp2_;
		_section_list = _tmp3_;
		_tmp4_ = _section_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_section_size = _tmp6_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			ObjectsSection* section = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			WidgetsContextMenuMenuPicker* _tmp11_;
			ObjectsSection* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			ObjectsSection* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_section_index = _section_index + 1;
			_tmp7_ = _section_index;
			_tmp8_ = _section_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _section_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _section_index);
			section = (ObjectsSection*) _tmp10_;
			_tmp11_ = section_item;
			_tmp12_ = section;
			_tmp13_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = section;
			_tmp16_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp15_);
			_tmp17_ = _tmp16_;
			widgets_context_menu_menu_picker_add_item (_tmp11_, _tmp14_, _tmp17_);
			_g_object_unref0 (section);
		}
	}
	_tmp18_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp18_);
	menu_box = _tmp18_;
	gtk_widget_set_margin_bottom ((GtkWidget*) menu_box, 3);
	gtk_widget_set_margin_top ((GtkWidget*) menu_box, 3);
	_tmp19_ = g_strdup ("caption");
	_tmp20_ = g_strdup ("font-bold");
	_tmp21_ = g_new0 (gchar*, 2 + 1);
	_tmp21_[0] = _tmp19_;
	_tmp21_[1] = _tmp20_;
	_tmp22_ = (GtkLabel*) gtk_label_new (_ ("Filter By"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp22_, _tmp21_);
	_tmp21_ = (_vala_array_free (_tmp21_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp22_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp22_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp22_, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp22_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp22_);
	_tmp23_ = _tmp22_;
	gtk_box_append (menu_box, (GtkWidget*) _tmp23_);
	_g_object_unref0 (_tmp23_);
	_tmp24_ = section_item;
	gtk_box_append (menu_box, (GtkWidget*) _tmp24_);
	_tmp25_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp26_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp26_, FALSE);
	gtk_popover_set_position (_tmp26_, GTK_POS_BOTTOM);
	gtk_popover_set_child (_tmp26_, _tmp25_);
	_g_object_unref0 (_tmp25_);
	g_object_set ((GtkWidget*) _tmp26_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp26_);
	popover = _tmp26_;
	_tmp27_ = section_item;
	g_signal_connect_object ((GObject*) _tmp27_, "notify::selected", (GCallback) ___lambda616__g_object_notify, self, 0);
	result = popover;
	_g_object_unref0 (menu_box);
	_g_object_unref0 (section_item);
	return result;
}

void
dialogs_completed_tasks_add_update_filter (DialogsCompletedTasks* self,
                                           ObjectsSection* section)
{
	ObjectsFiltersFilterItem* filter = NULL;
	WidgetsFilterFlowBox* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	ObjectsFiltersFilterItem* _tmp3_;
	ObjectsFiltersFilterItem* _tmp4_;
	gboolean insert = FALSE;
	ObjectsFiltersFilterItem* _tmp5_;
	ObjectsFiltersFilterItem* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	ObjectsFiltersFilterItem* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	GtkListBox* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (section != NULL);
	_tmp0_ = self->priv->filters_flowbox;
	_tmp1_ = filter_item_type_to_string (FILTER_ITEM_TYPE_SECTION);
	_tmp2_ = _tmp1_;
	_tmp3_ = widgets_filter_flow_box_get_filter (_tmp0_, _tmp2_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	filter = _tmp4_;
	insert = FALSE;
	_tmp5_ = filter;
	if (_tmp5_ == NULL) {
		ObjectsFiltersFilterItem* _tmp6_;
		ObjectsFiltersFilterItem* _tmp7_;
		_tmp6_ = objects_filters_filter_item_new ();
		_g_object_unref0 (filter);
		filter = _tmp6_;
		_tmp7_ = filter;
		objects_filters_filter_item_set_filter_type (_tmp7_, FILTER_ITEM_TYPE_SECTION);
		insert = TRUE;
	}
	_tmp8_ = filter;
	_tmp9_ = objects_base_object_get_name ((ObjectsBaseObject*) section);
	_tmp10_ = _tmp9_;
	objects_filters_filter_item_set_name (_tmp8_, _tmp10_);
	_tmp11_ = filter;
	_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) section);
	_tmp13_ = _tmp12_;
	objects_filters_filter_item_set_value (_tmp11_, _tmp13_);
	if (insert) {
		WidgetsFilterFlowBox* _tmp14_;
		ObjectsFiltersFilterItem* _tmp15_;
		_tmp14_ = self->priv->filters_flowbox;
		_tmp15_ = filter;
		widgets_filter_flow_box_add_filter (_tmp14_, _tmp15_);
	} else {
		WidgetsFilterFlowBox* _tmp16_;
		ObjectsFiltersFilterItem* _tmp17_;
		_tmp16_ = self->priv->filters_flowbox;
		_tmp17_ = filter;
		widgets_filter_flow_box_update_filter (_tmp16_, _tmp17_);
	}
	_tmp18_ = objects_base_object_get_id ((ObjectsBaseObject*) section);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strdup (_tmp19_);
	_g_free0 (self->priv->filter_section_id);
	self->priv->filter_section_id = _tmp20_;
	_tmp21_ = self->priv->listbox;
	gtk_list_box_invalidate_filter (_tmp21_);
	_g_object_unref0 (filter);
}

void
dialogs_completed_tasks_delete_all_action (DialogsCompletedTasks* self,
                                           GeeArrayList* items)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (items != NULL);
	{
		GeeArrayList* _item_list = NULL;
		gint _item_size = 0;
		GeeArrayList* _tmp0_;
		gint _tmp1_;
		gint _tmp2_;
		gint _item_index = 0;
		_item_list = items;
		_tmp0_ = _item_list;
		_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
		_tmp2_ = _tmp1_;
		_item_size = _tmp2_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp3_;
			gint _tmp4_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp5_;
			gpointer _tmp6_;
			ObjectsItem* _tmp7_;
			_item_index = _item_index + 1;
			_tmp3_ = _item_index;
			_tmp4_ = _item_size;
			if (!(_tmp3_ < _tmp4_)) {
				break;
			}
			_tmp5_ = _item_list;
			_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, _item_index);
			item = (ObjectsItem*) _tmp6_;
			_tmp7_ = item;
			objects_item_delete_item (_tmp7_);
			_g_object_unref0 (item);
		}
	}
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

void
dialogs_completed_tasks_clean_up (DialogsCompletedTasks* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	GtkListBox* _tmp2_;
	GeeHashMap* _tmp18_;
	Util* _tmp19_;
	Util* _tmp20_;
	GtkListBox* _tmp21_;
	GList* _tmp22_;
	GList* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp0_, NULL, NULL, NULL);
	_tmp1_ = self->priv->listbox;
	gtk_list_box_set_header_func (_tmp1_, NULL, NULL, NULL);
	_tmp2_ = self->priv->listbox;
	gtk_list_box_set_filter_func (_tmp2_, NULL, NULL, NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp3_;
		GeeSet* _tmp4_;
		GeeSet* _tmp5_;
		GeeSet* _tmp6_;
		GeeIterator* _tmp7_;
		GeeIterator* _tmp8_;
		_tmp3_ = self->priv->signals_map;
		_tmp4_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
		_tmp8_ = _tmp7_;
		_g_object_unref0 (_tmp6_);
		_entry_it = _tmp8_;
		while (TRUE) {
			GeeIterator* _tmp9_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp10_;
			gpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			GeeMapEntry* _tmp15_;
			gconstpointer _tmp16_;
			gconstpointer _tmp17_;
			_tmp9_ = _entry_it;
			if (!gee_iterator_next (_tmp9_)) {
				break;
			}
			_tmp10_ = _entry_it;
			_tmp11_ = gee_iterator_get (_tmp10_);
			entry = (GeeMapEntry*) _tmp11_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_value (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = entry;
			_tmp16_ = gee_map_entry_get_key (_tmp15_);
			_tmp17_ = _tmp16_;
			g_signal_handler_disconnect ((GObject*) _tmp14_, (gulong) ((guintptr) _tmp17_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp18_ = self->priv->signals_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp18_);
	_tmp19_ = util_get_default ();
	_tmp20_ = _tmp19_;
	_tmp21_ = self->priv->listbox;
	_tmp22_ = util_get_children (_tmp20_, _tmp21_);
	_tmp23_ = _tmp22_;
	_g_object_unref0 (_tmp20_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp23_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) ((GtkListBoxRow*) child_it->data);
			{
				GtkWidget* _tmp24_;
				_tmp24_ = child;
				widgets_completed_task_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
			}
		}
		(child_collection == NULL) ? NULL : (child_collection = (_g_list_free__g_object_unref0_ (child_collection), NULL));
	}
}

ObjectsProject*
dialogs_completed_tasks_get_project (DialogsCompletedTasks* self)
{
	ObjectsProject* result;
	ObjectsProject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_project;
	result = _tmp0_;
	return result;
}

static void
dialogs_completed_tasks_set_project (DialogsCompletedTasks* self,
                                     ObjectsProject* value)
{
	ObjectsProject* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_completed_tasks_get_project (self);
	if (old_value != value) {
		ObjectsProject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_project);
		self->priv->_project = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_completed_tasks_properties[DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY]);
	}
}

static gint
_dialogs_completed_tasks_sort_completed_function_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                         GtkListBoxRow* row2,
                                                                         gpointer self)
{
	gint result;
	result = dialogs_completed_tasks_sort_completed_function ((DialogsCompletedTasks*) self, row1, row2);
	return result;
}

static void
_dialogs_completed_tasks_header_completed_function_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                                    GtkListBoxRow* before,
                                                                                    gpointer self)
{
	dialogs_completed_tasks_header_completed_function ((DialogsCompletedTasks*) self, row, before);
}

static gboolean
_dialogs_completed_tasks_filter_function_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                   gpointer self)
{
	gboolean result;
	result = dialogs_completed_tasks_filter_function ((DialogsCompletedTasks*) self, row);
	return result;
}

static void
_dialogs_completed_tasks___lambda617_ (DialogsCompletedTasks* self)
{
	_g_free0 (self->priv->filter_section_id);
	self->priv->filter_section_id = NULL;
	dialogs_completed_tasks_clear_items (self);
	dialogs_completed_tasks_add_items (self);
}

static void
__dialogs_completed_tasks___lambda617__widgets_filter_flow_box_filter_removed (WidgetsFilterFlowBox* _sender,
                                                                               ObjectsFiltersFilterItem* filter,
                                                                               gpointer self)
{
	_dialogs_completed_tasks___lambda617_ ((DialogsCompletedTasks*) self);
}

static void
_dialogs_completed_tasks___lambda618_ (DialogsCompletedTasks* self)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkListBox* _tmp3_;
	_tmp0_ = self->priv->search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "") == 0) {
		dialogs_completed_tasks_clear_items (self);
		dialogs_completed_tasks_add_items (self);
	}
	_g_free0 (self->priv->filter_section_id);
	self->priv->filter_section_id = NULL;
	_tmp3_ = self->priv->listbox;
	gtk_list_box_invalidate_filter (_tmp3_);
}

static void
__dialogs_completed_tasks___lambda618__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                        gpointer self)
{
	_dialogs_completed_tasks___lambda618_ ((DialogsCompletedTasks*) self);
}

static Block91Data*
block91_data_ref (Block91Data* _data91_)
{
	g_atomic_int_inc (&_data91_->_ref_count_);
	return _data91_;
}

static void
block91_data_unref (void * _userdata_)
{
	Block91Data* _data91_;
	_data91_ = (Block91Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data91_->_ref_count_)) {
		DialogsCompletedTasks* self;
		self = _data91_->self;
		_g_object_unref0 (_data91_->items);
		_g_object_unref0 (self);
		g_slice_free (Block91Data, _data91_);
	}
}

static void
__lambda620_ (Block91Data* _data91_,
              const gchar* response)
{
	DialogsCompletedTasks* self;
	self = _data91_->self;
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "delete") == 0) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _data91_->items;
		dialogs_completed_tasks_delete_all_action (self, _tmp0_);
	}
}

static void
___lambda620__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                         const gchar* response,
                                         gpointer self)
{
	__lambda620_ (self, response);
}

static void
_dialogs_completed_tasks___lambda619_ (DialogsCompletedTasks* self)
{
	Block91Data* _data91_;
	ServicesStore* _tmp0_;
	ObjectsProject* _tmp1_;
	GeeArrayList* _tmp2_;
	AdwAlertDialog* dialog = NULL;
	GeeArrayList* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	GeeArrayList* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	ObjectsProject* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	AdwAlertDialog* _tmp14_;
	AdwAlertDialog* _tmp15_;
	AdwAlertDialog* _tmp16_;
	AdwAlertDialog* _tmp17_;
	AdwAlertDialog* _tmp18_;
	AdwAlertDialog* _tmp19_;
	AdwAlertDialog* _tmp20_;
	Planify* _tmp21_;
	MainWindow* _tmp22_;
	AdwAlertDialog* _tmp23_;
	_data91_ = g_slice_new0 (Block91Data);
	_data91_->_ref_count_ = 1;
	_data91_->self = g_object_ref (self);
	_tmp0_ = services_store_instance ();
	_tmp1_ = self->priv->_project;
	_tmp2_ = services_store_get_items_checked_by_project (_tmp0_, _tmp1_);
	_data91_->items = _tmp2_;
	_tmp3_ = _data91_->items;
	_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _data91_->items;
	_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->_project;
	_tmp10_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strdup_printf (ngettext ("This will delete %d completed task and its subtasks from project %s", "This will delete %d completed tasks and their subtasks from project %s", (gulong) _tmp5_), _tmp8_, _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = (AdwAlertDialog*) adw_alert_dialog_new (_ ("Delete All Completed Tasks"), _tmp13_);
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	_g_free0 (_tmp13_);
	dialog = _tmp15_;
	_tmp16_ = dialog;
	adw_alert_dialog_set_body_use_markup (_tmp16_, TRUE);
	_tmp17_ = dialog;
	adw_alert_dialog_add_response (_tmp17_, "cancel", _ ("Cancel"));
	_tmp18_ = dialog;
	adw_alert_dialog_add_response (_tmp18_, "delete", _ ("Delete"));
	_tmp19_ = dialog;
	adw_alert_dialog_set_response_appearance (_tmp19_, "delete", ADW_RESPONSE_DESTRUCTIVE);
	_tmp20_ = dialog;
	_tmp21_ = planify__instance;
	_tmp22_ = _tmp21_->main_window;
	adw_dialog_present ((AdwDialog*) _tmp20_, (GtkWidget*) _tmp22_);
	_tmp23_ = dialog;
	g_signal_connect_data (_tmp23_, "response", (GCallback) ___lambda620__adw_alert_dialog_response, block91_data_ref (_data91_), (GClosureNotify) block91_data_unref, 0);
	_g_object_unref0 (dialog);
	block91_data_unref (_data91_);
	_data91_ = NULL;
}

static void
__dialogs_completed_tasks___lambda619__gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self)
{
	_dialogs_completed_tasks___lambda619_ ((DialogsCompletedTasks*) self);
}

static void
_dialogs_completed_tasks___lambda621_ (DialogsCompletedTasks* self,
                                       GtkListBoxRow* row)
{
	ObjectsItem* _tmp0_;
	ObjectsItem* _tmp1_;
	g_return_if_fail (row != NULL);
	_tmp0_ = widgets_completed_task_row_get_item (G_TYPE_CHECK_INSTANCE_CAST (row, WIDGETS_TYPE_COMPLETED_TASK_ROW, WidgetsCompletedTaskRow));
	_tmp1_ = _tmp0_;
	dialogs_completed_tasks_view_item (self, _tmp1_);
}

static void
__dialogs_completed_tasks___lambda621__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                   GtkListBoxRow* row,
                                                                   gpointer self)
{
	_dialogs_completed_tasks___lambda621_ ((DialogsCompletedTasks*) self, row);
}

static void
_dialogs_completed_tasks___lambda622_ (DialogsCompletedTasks* self,
                                       ObjectsItem* item,
                                       gboolean old_checked)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	ObjectsProject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (item != NULL);
	_tmp0_ = objects_item_get_project_id (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp1_, _tmp4_) != 0) {
		return;
	}
	if (!old_checked) {
		GeeHashMap* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->items_checked;
		_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp7_ = _tmp6_;
		if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp5_, _tmp7_)) {
			GeeHashMap* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			WidgetsCompletedTaskRow* _tmp11_;
			WidgetsCompletedTaskRow* _tmp12_;
			GtkListBox* _tmp13_;
			GeeHashMap* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			gpointer _tmp17_;
			WidgetsCompletedTaskRow* _tmp18_;
			_tmp8_ = self->items_checked;
			_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp10_ = _tmp9_;
			_tmp11_ = widgets_completed_task_row_new (item);
			g_object_ref_sink (_tmp11_);
			_tmp12_ = _tmp11_;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, _tmp10_, _tmp12_);
			_g_object_unref0 (_tmp12_);
			_tmp13_ = self->priv->listbox;
			_tmp14_ = self->items_checked;
			_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp16_ = _tmp15_;
			_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, _tmp16_);
			_tmp18_ = (WidgetsCompletedTaskRow*) _tmp17_;
			gtk_list_box_insert (_tmp13_, (GtkWidget*) _tmp18_, 0);
			_g_object_unref0 (_tmp18_);
		}
	} else {
		GeeHashMap* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp19_ = self->items_checked;
		_tmp20_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp21_ = _tmp20_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp19_, _tmp21_)) {
			GeeHashMap* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			gpointer _tmp25_;
			WidgetsCompletedTaskRow* _tmp26_;
			GeeHashMap* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			_tmp22_ = self->items_checked;
			_tmp23_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp24_ = _tmp23_;
			_tmp25_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp24_);
			_tmp26_ = (WidgetsCompletedTaskRow*) _tmp25_;
			widgets_completed_task_row_hide_destroy (_tmp26_);
			_g_object_unref0 (_tmp26_);
			_tmp27_ = self->items_checked;
			_tmp28_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp29_ = _tmp28_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp27_, _tmp29_, NULL);
		}
	}
}

static void
__dialogs_completed_tasks___lambda622__services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                                           ObjectsItem* item,
                                                                           gboolean old_checked,
                                                                           gpointer self)
{
	_dialogs_completed_tasks___lambda622_ ((DialogsCompletedTasks*) self, item, old_checked);
}

static void
_dialogs_completed_tasks___lambda623_ (DialogsCompletedTasks* self,
                                       ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->items_checked;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		WidgetsCompletedTaskRow* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = self->items_checked;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (WidgetsCompletedTaskRow*) _tmp6_;
		widgets_completed_task_row_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->items_checked;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	}
}

static void
__dialogs_completed_tasks___lambda623__services_store_item_deleted (ServicesStore* _sender,
                                                                    ObjectsItem* item,
                                                                    gpointer self)
{
	_dialogs_completed_tasks___lambda623_ ((DialogsCompletedTasks*) self, item);
}

static void
_dialogs_completed_tasks___lambda624_ (DialogsCompletedTasks* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	dialogs_completed_tasks_clean_up (self);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	g_signal_emit_by_name (_tmp1_, "connect-typing-accel");
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_completed_tasks___lambda624__adw_dialog_closed (AdwDialog* _sender,
                                                          gpointer self)
{
	_dialogs_completed_tasks___lambda624_ ((DialogsCompletedTasks*) self);
}

static GObject *
dialogs_completed_tasks_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsCompletedTasks * self;
	AdwHeaderBar* headerbar = NULL;
	AdwHeaderBar* _tmp0_;
	AdwHeaderBar* _tmp1_;
	GtkMenuButton* filter_button = NULL;
	GtkPopover* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar* _tmp6_;
	GtkMenuButton* _tmp7_ = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	GtkSearchEntry* _tmp11_ = NULL;
	GtkBox* search_entry_box = NULL;
	GtkBox* _tmp12_ = NULL;
	GtkBox* _tmp13_;
	GtkSearchEntry* _tmp14_;
	GtkBox* _tmp15_;
	GtkMenuButton* _tmp16_;
	WidgetsFilterFlowBox* _tmp17_ = NULL;
	WidgetsFilterFlowBox* _tmp18_;
	GtkFlowBox* _tmp19_;
	WidgetsFilterFlowBox* _tmp20_;
	GtkFlowBox* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar** _tmp24_;
	GtkListBox* _tmp25_ = NULL;
	GtkListBox* _tmp26_;
	GtkListBox* _tmp27_;
	GtkListBox* _tmp28_;
	GtkListBox* _tmp29_;
	gchar* _tmp30_;
	gchar** _tmp31_;
	GtkLabel* _tmp32_ = NULL;
	GtkLabel* _tmp33_;
	GtkScrolledWindow* listbox_scrolled = NULL;
	GtkListBox* _tmp34_;
	GtkWidget* _tmp35_;
	GtkScrolledWindow* _tmp36_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp37_;
	GtkBox* _tmp38_;
	GtkBox* _tmp39_;
	GtkBox* _tmp40_;
	WidgetsFilterFlowBox* _tmp41_;
	GtkBox* _tmp42_;
	GtkScrolledWindow* _tmp43_;
	AdwClamp* content_clamp = NULL;
	GtkBox* _tmp44_;
	GtkWidget* _tmp45_;
	AdwClamp* _tmp46_ = NULL;
	gchar* _tmp47_;
	gchar** _tmp48_;
	GtkButton* _tmp49_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp50_;
	AdwToolbarView* _tmp51_;
	AdwHeaderBar* _tmp52_;
	AdwToolbarView* _tmp53_;
	GtkButton* _tmp54_;
	AdwToolbarView* _tmp55_;
	AdwClamp* _tmp56_;
	AdwNavigationPage* main_page = NULL;
	AdwToolbarView* _tmp57_;
	AdwNavigationPage* _tmp58_;
	AdwNavigationView* _tmp59_;
	AdwNavigationView* _tmp60_;
	AdwNavigationPage* _tmp61_;
	AdwNavigationView* _tmp62_;
	ServicesEventBus* _tmp63_;
	ServicesEventBus* _tmp64_;
	GeeHashMap* _tmp65_;
	WidgetsFilterFlowBox* _tmp66_;
	gulong _tmp67_;
	WidgetsFilterFlowBox* _tmp68_;
	GeeHashMap* _tmp69_;
	GtkSearchEntry* _tmp70_;
	gulong _tmp71_;
	GtkSearchEntry* _tmp72_;
	GeeHashMap* _tmp73_;
	GtkButton* _tmp74_;
	gulong _tmp75_;
	GtkButton* _tmp76_;
	GeeHashMap* _tmp77_;
	GtkListBox* _tmp78_;
	gulong _tmp79_;
	GtkListBox* _tmp80_;
	GeeHashMap* _tmp81_;
	ServicesEventBus* _tmp82_;
	ServicesEventBus* _tmp83_;
	gulong _tmp84_;
	ServicesEventBus* _tmp85_;
	ServicesEventBus* _tmp86_;
	GeeHashMap* _tmp87_;
	ServicesStore* _tmp88_;
	gulong _tmp89_;
	ServicesStore* _tmp90_;
	parent_class = G_OBJECT_CLASS (dialogs_completed_tasks_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasks);
	_tmp0_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp0_);
	headerbar = _tmp0_;
	_tmp1_ = headerbar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "flat");
	_tmp2_ = dialogs_completed_tasks_build_view_setting_popover (self);
	_tmp3_ = g_strdup ("funnel-outline-symbolic");
	_tmp4_ = g_strdup ("flat");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	_tmp6_ = g_strdup (_ ("View Filter Menu"));
	_tmp7_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_popover (_tmp7_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	gtk_menu_button_set_icon_name (_tmp7_, _tmp3_);
	_g_free0 (_tmp3_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	filter_button = _tmp7_;
	_tmp8_ = g_strdup (_ ("Search"));
	_tmp9_ = g_strdup ("border-radius-9");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = (GtkSearchEntry*) gtk_search_entry_new ();
	g_object_set (_tmp11_, "placeholder-text", _tmp8_, NULL);
	_g_free0 (_tmp8_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp11_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->search_entry);
	self->priv->search_entry = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp12_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp12_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp12_, 12);
	g_object_ref_sink (_tmp12_);
	search_entry_box = _tmp12_;
	_tmp13_ = search_entry_box;
	_tmp14_ = self->priv->search_entry;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = search_entry_box;
	_tmp16_ = filter_button;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = widgets_filter_flow_box_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_START);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp17_, FALSE);
	gtk_widget_set_vexpand_set ((GtkWidget*) _tmp17_, TRUE);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->filters_flowbox);
	self->priv->filters_flowbox = _tmp17_;
	_tmp18_ = self->priv->filters_flowbox;
	_tmp19_ = _tmp18_->flowbox;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp19_, 12);
	_tmp20_ = self->priv->filters_flowbox;
	_tmp21_ = _tmp20_->flowbox;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp21_, 12);
	_tmp22_ = g_strdup ("listbox-background");
	_tmp23_ = g_strdup ("listbox-separator-6");
	_tmp24_ = g_new0 (gchar*, 2 + 1);
	_tmp24_[0] = _tmp22_;
	_tmp24_[1] = _tmp23_;
	_tmp25_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp25_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp25_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp25_, _tmp24_);
	_tmp24_ = (_vala_array_free (_tmp24_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp25_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp25_, 12);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp25_;
	_tmp26_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp26_, _dialogs_completed_tasks_sort_completed_function_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp27_ = self->priv->listbox;
	gtk_list_box_set_header_func (_tmp27_, _dialogs_completed_tasks_header_completed_function_gtk_list_box_update_header_func, g_object_ref (self), g_object_unref);
	_tmp28_ = self->priv->listbox;
	gtk_list_box_set_filter_func (_tmp28_, _dialogs_completed_tasks_filter_function_gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	_tmp29_ = self->priv->listbox;
	_tmp30_ = g_strdup ("dimmed");
	_tmp31_ = g_new0 (gchar*, 1 + 1);
	_tmp31_[0] = _tmp30_;
	_tmp32_ = (GtkLabel*) gtk_label_new (_ ("No completed tasks yet."));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp32_, _tmp31_);
	_tmp31_ = (_vala_array_free (_tmp31_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp32_, 48);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp32_, 24);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp32_, 24);
	gtk_label_set_wrap (_tmp32_, TRUE);
	gtk_label_set_justify (_tmp32_, GTK_JUSTIFY_CENTER);
	g_object_ref_sink (_tmp32_);
	_tmp33_ = _tmp32_;
	gtk_list_box_set_placeholder (_tmp29_, (GtkWidget*) _tmp33_);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = self->priv->listbox;
	_tmp35_ = _g_object_ref0 ((GtkWidget*) _tmp34_);
	_tmp36_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp36_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp36_, TRUE);
	g_object_set (_tmp36_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_child (_tmp36_, _tmp35_);
	_g_object_unref0 (_tmp35_);
	g_object_ref_sink (_tmp36_);
	listbox_scrolled = _tmp36_;
	_tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp37_);
	content_box = _tmp37_;
	_tmp38_ = content_box;
	_tmp39_ = search_entry_box;
	gtk_box_append (_tmp38_, (GtkWidget*) _tmp39_);
	_tmp40_ = content_box;
	_tmp41_ = self->priv->filters_flowbox;
	gtk_box_append (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = content_box;
	_tmp43_ = listbox_scrolled;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = content_box;
	_tmp45_ = _g_object_ref0 ((GtkWidget*) _tmp44_);
	_tmp46_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp46_, 600);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp46_, 12);
	adw_clamp_set_child (_tmp46_, _tmp45_);
	_g_object_unref0 (_tmp45_);
	g_object_ref_sink (_tmp46_);
	content_clamp = _tmp46_;
	_tmp47_ = g_strdup ("flat");
	_tmp48_ = g_new0 (gchar*, 1 + 1);
	_tmp48_[0] = _tmp47_;
	_tmp49_ = (GtkButton*) gtk_button_new_with_label (_ ("Delete All Completed Tasks"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp49_, _tmp48_);
	_tmp48_ = (_vala_array_free (_tmp48_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp49_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp49_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp49_, 12);
	g_object_ref_sink (_tmp49_);
	_g_object_unref0 (self->priv->remove_all);
	self->priv->remove_all = _tmp49_;
	_tmp50_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp50_);
	toolbar_view = _tmp50_;
	_tmp51_ = toolbar_view;
	_tmp52_ = headerbar;
	adw_toolbar_view_add_top_bar (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = toolbar_view;
	_tmp54_ = self->priv->remove_all;
	adw_toolbar_view_add_bottom_bar (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = toolbar_view;
	_tmp56_ = content_clamp;
	adw_toolbar_view_set_content (_tmp55_, (GtkWidget*) _tmp56_);
	_tmp57_ = toolbar_view;
	_tmp58_ = adw_navigation_page_new ((GtkWidget*) _tmp57_, _ ("Completed Tasks"));
	g_object_ref_sink (_tmp58_);
	main_page = _tmp58_;
	_tmp59_ = (AdwNavigationView*) adw_navigation_view_new ();
	g_object_ref_sink (_tmp59_);
	_g_object_unref0 (self->priv->navigation_view);
	self->priv->navigation_view = _tmp59_;
	_tmp60_ = self->priv->navigation_view;
	_tmp61_ = main_page;
	adw_navigation_view_add (_tmp60_, _tmp61_);
	_tmp62_ = self->priv->navigation_view;
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) _tmp62_);
	dialogs_completed_tasks_add_items (self);
	_tmp63_ = services_event_bus_get_default ();
	_tmp64_ = _tmp63_;
	g_signal_emit_by_name (_tmp64_, "disconnect-typing-accel");
	_g_object_unref0 (_tmp64_);
	_tmp65_ = self->priv->signals_map;
	_tmp66_ = self->priv->filters_flowbox;
	_tmp67_ = g_signal_connect_object (_tmp66_, "filter-removed", (GCallback) __dialogs_completed_tasks___lambda617__widgets_filter_flow_box_filter_removed, self, 0);
	_tmp68_ = self->priv->filters_flowbox;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp65_, (gpointer) ((guintptr) _tmp67_), (GObject*) _tmp68_);
	_tmp69_ = self->priv->signals_map;
	_tmp70_ = self->priv->search_entry;
	_tmp71_ = g_signal_connect_object (_tmp70_, "search-changed", (GCallback) __dialogs_completed_tasks___lambda618__gtk_search_entry_search_changed, self, 0);
	_tmp72_ = self->priv->search_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp69_, (gpointer) ((guintptr) _tmp71_), (GObject*) _tmp72_);
	_tmp73_ = self->priv->signals_map;
	_tmp74_ = self->priv->remove_all;
	_tmp75_ = g_signal_connect_object (_tmp74_, "clicked", (GCallback) __dialogs_completed_tasks___lambda619__gtk_button_clicked, self, 0);
	_tmp76_ = self->priv->remove_all;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp73_, (gpointer) ((guintptr) _tmp75_), (GObject*) _tmp76_);
	_tmp77_ = self->priv->signals_map;
	_tmp78_ = self->priv->listbox;
	_tmp79_ = g_signal_connect_object (_tmp78_, "row-activated", (GCallback) __dialogs_completed_tasks___lambda621__gtk_list_box_row_activated, self, 0);
	_tmp80_ = self->priv->listbox;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp77_, (gpointer) ((guintptr) _tmp79_), (GObject*) _tmp80_);
	_tmp81_ = self->priv->signals_map;
	_tmp82_ = services_event_bus_get_default ();
	_tmp83_ = _tmp82_;
	_tmp84_ = g_signal_connect_object (_tmp83_, "checked-toggled", (GCallback) __dialogs_completed_tasks___lambda622__services_event_bus_checked_toggled, self, 0);
	_tmp85_ = services_event_bus_get_default ();
	_tmp86_ = _tmp85_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp81_, (gpointer) ((guintptr) _tmp84_), (GObject*) _tmp86_);
	_g_object_unref0 (_tmp86_);
	_g_object_unref0 (_tmp83_);
	_tmp87_ = self->priv->signals_map;
	_tmp88_ = services_store_instance ();
	_tmp89_ = g_signal_connect_object (_tmp88_, "item-deleted", (GCallback) __dialogs_completed_tasks___lambda623__services_store_item_deleted, self, 0);
	_tmp90_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp87_, (gpointer) ((guintptr) _tmp89_), (GObject*) _tmp90_);
	g_signal_connect_object ((AdwDialog*) self, "closed", (GCallback) __dialogs_completed_tasks___lambda624__adw_dialog_closed, self, 0);
	_g_object_unref0 (main_page);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content_box);
	_g_object_unref0 (listbox_scrolled);
	_g_object_unref0 (search_entry_box);
	_g_object_unref0 (filter_button);
	_g_object_unref0 (headerbar);
	return obj;
}

static void
dialogs_completed_tasks_class_init (DialogsCompletedTasksClass * klass,
                                    gpointer klass_data)
{
	dialogs_completed_tasks_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsCompletedTasks_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_completed_tasks_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_completed_tasks_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_completed_tasks_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_completed_tasks_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY, dialogs_completed_tasks_properties[DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY] = g_param_spec_object ("project", "project", "project", OBJECTS_TYPE_PROJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
dialogs_completed_tasks_instance_init (DialogsCompletedTasks * self,
                                       gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = dialogs_completed_tasks_get_instance_private (self);
	self->priv->filter_section_id = NULL;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, WIDGETS_TYPE_COMPLETED_TASK_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->items_checked = _tmp0_;
	_tmp1_ = 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 = _tmp1_;
}

static void
dialogs_completed_tasks_finalize (GObject * obj)
{
	DialogsCompletedTasks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasks);
	g_debug ("CompletedTasks.vala:46: Destroying - Dialogs.CompletedTasks\n");
	_g_object_unref0 (self->priv->_project);
	_g_object_unref0 (self->priv->navigation_view);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->search_entry);
	_g_object_unref0 (self->priv->filters_flowbox);
	_g_object_unref0 (self->priv->remove_all);
	_g_free0 (self->priv->filter_section_id);
	_g_object_unref0 (self->items_checked);
	_g_object_unref0 (self->priv->signals_map);
	G_OBJECT_CLASS (dialogs_completed_tasks_parent_class)->finalize (obj);
}

static GType
dialogs_completed_tasks_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsCompletedTasksClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_completed_tasks_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsCompletedTasks), 0, (GInstanceInitFunc) dialogs_completed_tasks_instance_init, NULL };
	GType dialogs_completed_tasks_type_id;
	dialogs_completed_tasks_type_id = g_type_register_static (adw_dialog_get_type (), "DialogsCompletedTasks", &g_define_type_info, 0);
	DialogsCompletedTasks_private_offset = g_type_add_instance_private (dialogs_completed_tasks_type_id, sizeof (DialogsCompletedTasksPrivate));
	return dialogs_completed_tasks_type_id;
}

GType
dialogs_completed_tasks_get_type (void)
{
	static volatile gsize dialogs_completed_tasks_type_id__once = 0;
	if (g_once_init_enter (&dialogs_completed_tasks_type_id__once)) {
		GType dialogs_completed_tasks_type_id;
		dialogs_completed_tasks_type_id = dialogs_completed_tasks_get_type_once ();
		g_once_init_leave (&dialogs_completed_tasks_type_id__once, dialogs_completed_tasks_type_id);
	}
	return dialogs_completed_tasks_type_id__once;
}

static void
_vala_dialogs_completed_tasks_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	DialogsCompletedTasks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasks);
	switch (property_id) {
		case DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY:
		g_value_set_object (value, dialogs_completed_tasks_get_project (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_completed_tasks_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	DialogsCompletedTasks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_TYPE_COMPLETED_TASKS, DialogsCompletedTasks);
	switch (property_id) {
		case DIALOGS_COMPLETED_TASKS_PROJECT_PROPERTY:
		dialogs_completed_tasks_set_project (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);
}

