/* SubItems.c generated by valac 0.56.19, the Vala compiler
 * generated from SubItems.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 "planify.h"
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>

#define WIDGETS_SUB_ITEMS_PAGE_SIZE CONSTANTS_COMPLETED_PAGE_SIZE
#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_SUB_ITEMS (widgets_sub_items_get_type ())
#define WIDGETS_SUB_ITEMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItems))
#define WIDGETS_SUB_ITEMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItemsClass))
#define WIDGETS_IS_SUB_ITEMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SUB_ITEMS))
#define WIDGETS_IS_SUB_ITEMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SUB_ITEMS))
#define WIDGETS_SUB_ITEMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItemsClass))

typedef struct _WidgetsSubItems WidgetsSubItems;
typedef struct _WidgetsSubItemsClass WidgetsSubItemsClass;
typedef struct _WidgetsSubItemsPrivate WidgetsSubItemsPrivate;

#define LAYOUTS_TYPE_ITEM_BASE (layouts_item_base_get_type ())
#define LAYOUTS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase))
#define LAYOUTS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))
#define LAYOUTS_IS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_IS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_ITEM_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))

typedef struct _LayoutsItemBase LayoutsItemBase;
typedef struct _LayoutsItemBaseClass LayoutsItemBaseClass;
enum  {
	WIDGETS_SUB_ITEMS_0_PROPERTY,
	WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY,
	WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY,
	WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY,
	WIDGETS_SUB_ITEMS_HAS_CHILDREN_PROPERTY,
	WIDGETS_SUB_ITEMS_SHOW_COMPLETED_PROPERTY,
	WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY,
	WIDGETS_SUB_ITEMS_NUM_PROPERTIES
};
static GParamSpec* widgets_sub_items_properties[WIDGETS_SUB_ITEMS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define LAYOUTS_TYPE_ITEM_BOARD (layouts_item_board_get_type ())
#define LAYOUTS_ITEM_BOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoard))
#define LAYOUTS_ITEM_BOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoardClass))
#define LAYOUTS_IS_ITEM_BOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BOARD))
#define LAYOUTS_IS_ITEM_BOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BOARD))
#define LAYOUTS_ITEM_BOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoardClass))

typedef struct _LayoutsItemBoard LayoutsItemBoard;
typedef struct _LayoutsItemBoardClass LayoutsItemBoardClass;

#define LAYOUTS_TYPE_ITEM_ROW (layouts_item_row_get_type ())
#define LAYOUTS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow))
#define LAYOUTS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))
#define LAYOUTS_IS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_IS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))

typedef struct _LayoutsItemRow LayoutsItemRow;
typedef struct _LayoutsItemRowClass LayoutsItemRowClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_TYPE_QUICK_ADD (dialogs_quick_add_get_type ())
#define DIALOGS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAdd))
#define DIALOGS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))
#define DIALOGS_IS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_IS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_QUICK_ADD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))

typedef struct _DialogsQuickAdd DialogsQuickAdd;
typedef struct _DialogsQuickAddClass DialogsQuickAddClass;

#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;
enum  {
	WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL,
	WIDGETS_SUB_ITEMS_NUM_SIGNALS
};
static guint widgets_sub_items_signals[WIDGETS_SUB_ITEMS_NUM_SIGNALS] = {0};

struct _WidgetsSubItems {
	AdwBin parent_instance;
	WidgetsSubItemsPrivate * priv;
	WidgetsLoadingButton* add_button;
	GeeHashMap* items_map;
	GeeHashMap* items_checked;
};

struct _WidgetsSubItemsClass {
	AdwBinClass parent_class;
};

struct _WidgetsSubItemsPrivate {
	gboolean _is_board;
	gboolean _is_project_view;
	ObjectsItem* _item_parent;
	GtkRevealer* sub_tasks_header_revealer;
	GtkListBox* listbox;
	GtkListBox* checked_listbox;
	GtkButton* load_more_button;
	GtkRevealer* load_more_button_revealer;
	GtkRevealer* checked_revealer;
	GtkRevealer* main_revealer;
	GeeHashMap* signal_map;
	GeeArrayList* completed_items_list;
	gint completed_page_index;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

static gint WidgetsSubItems_private_offset;
static gpointer widgets_sub_items_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType widgets_sub_items_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsSubItems, g_object_unref)
VALA_EXTERN GType layouts_item_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBase, g_object_unref)
VALA_EXTERN WidgetsSubItems* widgets_sub_items_new (gboolean is_project_view);
VALA_EXTERN WidgetsSubItems* widgets_sub_items_construct (GType object_type,
                                              gboolean is_project_view);
VALA_EXTERN WidgetsSubItems* widgets_sub_items_new_for_board (void);
VALA_EXTERN WidgetsSubItems* widgets_sub_items_construct_for_board (GType object_type);
VALA_EXTERN void widgets_sub_items_present_item (WidgetsSubItems* self,
                                     ObjectsItem* _item_parent);
VALA_EXTERN void widgets_sub_items_set_item_parent (WidgetsSubItems* self,
                                        ObjectsItem* value);
VALA_EXTERN void widgets_sub_items_add_items (WidgetsSubItems* self);
VALA_EXTERN gboolean widgets_sub_items_get_show_completed (WidgetsSubItems* self);
VALA_EXTERN ObjectsItem* widgets_sub_items_get_item_parent (WidgetsSubItems* self);
VALA_EXTERN void widgets_sub_items_add_item (WidgetsSubItems* self,
                                 ObjectsItem* item);
static void _widgets_sub_items_add_item_objects_item_item_added (ObjectsItem* _sender,
                                                          ObjectsItem* item,
                                                          gpointer self);
static void __lambda119_ (WidgetsSubItems* self,
                   ObjectsItem* item,
                   const gchar* update_id);
VALA_EXTERN const gchar* layouts_item_base_get_update_id (LayoutsItemBase* self);
VALA_EXTERN void layouts_item_base_update_request (LayoutsItemBase* self);
static void widgets_sub_items_update_sort (WidgetsSubItems* self);
static void ___lambda119__services_store_item_updated (ServicesStore* _sender,
                                                ObjectsItem* item,
                                                const gchar* update_id,
                                                gpointer self);
static void __lambda120_ (WidgetsSubItems* self,
                   ObjectsItem* item);
VALA_EXTERN void layouts_item_base_hide_destroy (LayoutsItemBase* self);
static void ___lambda120__services_store_item_pin_change (ServicesStore* _sender,
                                                   ObjectsItem* item,
                                                   gpointer self);
static void __lambda121_ (WidgetsSubItems* self,
                   ObjectsItem* item);
static void ___lambda121__services_store_item_deleted (ServicesStore* _sender,
                                                ObjectsItem* item,
                                                gpointer self);
static void __lambda122_ (WidgetsSubItems* self,
                   ObjectsItem* item,
                   const gchar* old_project_id,
                   const gchar* old_section_id,
                   const gchar* old_parent_id);
static void ___lambda122__services_event_bus_item_moved (ServicesEventBus* _sender,
                                                  ObjectsItem* item,
                                                  const gchar* old_project_id,
                                                  const gchar* old_section_id,
                                                  const gchar* old_parent_id,
                                                  gpointer self);
static void __lambda123_ (WidgetsSubItems* self,
                   ObjectsItem* item,
                   gboolean old_checked);
VALA_EXTERN gboolean widgets_sub_items_get_is_board (WidgetsSubItems* self);
VALA_EXTERN LayoutsItemBoard* layouts_item_board_new (ObjectsItem* item);
VALA_EXTERN LayoutsItemBoard* layouts_item_board_construct (GType object_type,
                                                ObjectsItem* item);
VALA_EXTERN GType layouts_item_board_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBoard, g_object_unref)
VALA_EXTERN gboolean widgets_sub_items_get_is_project_view (WidgetsSubItems* self);
VALA_EXTERN LayoutsItemRow* layouts_item_row_new (ObjectsItem* item,
                                      gboolean is_project_view);
VALA_EXTERN LayoutsItemRow* layouts_item_row_construct (GType object_type,
                                            ObjectsItem* item,
                                            gboolean is_project_view);
VALA_EXTERN GType layouts_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemRow, g_object_unref)
static void ___lambda123__services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                       ObjectsItem* item,
                                                       gboolean old_checked,
                                                       gpointer self);
static void __lambda124_ (WidgetsSubItems* self,
                   GtkWidget* _row,
                   const gchar* old_section_id,
                   const gchar* old_parent_id);
VALA_EXTERN ObjectsItem* layouts_item_base_get_item (LayoutsItemBase* self);
static void ___lambda124__services_event_bus_update_inserted_item_map (ServicesEventBus* _sender,
                                                                GtkWidget* row,
                                                                const gchar* old_section_id,
                                                                const gchar* old_parent_id,
                                                                gpointer self);
static void __lambda125_ (WidgetsSubItems* self);
VALA_EXTERN void widgets_sub_items_prepare_new_item (WidgetsSubItems* self,
                                         const gchar* content);
static void ___lambda125__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda126_ (WidgetsSubItems* self);
static void ___lambda126__objects_project_sort_order_changed (ObjectsProject* _sender,
                                                       gpointer self);
static void __lambda127_ (WidgetsSubItems* self);
static void ___lambda127__objects_project_sorted_by_changed (ObjectsProject* _sender,
                                                      gpointer self);
static void __lambda128_ (WidgetsSubItems* self);
VALA_EXTERN void widgets_sub_items_add_completed_items (WidgetsSubItems* self);
static void ___lambda128__g_settings_changed (GSettings* _sender,
                                       const gchar* key,
                                       gpointer self);
static void __lambda129_ (WidgetsSubItems* self,
                   const gchar* project_id,
                   gboolean value);
VALA_EXTERN void layouts_item_row_set_edit (LayoutsItemRow* self,
                                gboolean value);
static void ___lambda129__services_event_bus_expand_all (ServicesEventBus* _sender,
                                                  const gchar* project_id,
                                                  gboolean active,
                                                  gpointer self);
static void __lambda150_ (WidgetsSubItems* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void ___lambda150__objects_project_show_completed_changed (ObjectsProject* _sender,
                                                           gpointer self);
static void __lambda151_ (WidgetsSubItems* self);
static void widgets_sub_items_load_next_completed_page (WidgetsSubItems* self);
static void ___lambda151__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static gint __lambda118_ (WidgetsSubItems* self,
                   ObjectsItem* a,
                   ObjectsItem* b);
static gint ___lambda118__gcompare_data_func (gconstpointer a,
                                       gconstpointer b,
                                       gpointer self);
VALA_EXTERN void widgets_sub_items_add_complete_item (WidgetsSubItems* self,
                                          ObjectsItem* item);
static void widgets_sub_items_update_load_more_button_label (WidgetsSubItems* self);
static gint widgets_sub_items_set_sort_func (WidgetsSubItems* self,
                                      GtkListBoxRow* lbrow,
                                      GtkListBoxRow* lbbefore);
static gint _widgets_sub_items_set_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                              GtkListBoxRow* row2,
                                                              gpointer self);
VALA_EXTERN GType dialogs_quick_add_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsQuickAdd, g_object_unref)
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_new (void);
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_construct (GType object_type);
VALA_EXTERN void dialogs_quick_add_for_base_object (DialogsQuickAdd* self,
                                        ObjectsBaseObject* base_object);
VALA_EXTERN void dialogs_quick_add_update_content (DialogsQuickAdd* self,
                                       const gchar* content);
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)
VALA_EXTERN void widgets_sub_items_clean_up (WidgetsSubItems* self);
VALA_EXTERN void layouts_item_base_clean_up (LayoutsItemBase* self);
VALA_EXTERN void widgets_sub_items_disable_drag_and_drop (WidgetsSubItems* self);
VALA_EXTERN void layouts_item_row_disable_drag_and_drop (LayoutsItemRow* self);
static GtkWidget* widgets_sub_items_get_placeholder (WidgetsSubItems* self);
static void widgets_sub_items_set_is_board (WidgetsSubItems* self,
                                     gboolean value);
static void widgets_sub_items_set_is_project_view (WidgetsSubItems* self,
                                            gboolean value);
VALA_EXTERN gboolean widgets_sub_items_get_has_children (WidgetsSubItems* self);
VALA_EXTERN gboolean widgets_sub_items_get_reveal_child (WidgetsSubItems* self);
VALA_EXTERN void widgets_sub_items_set_reveal_child (WidgetsSubItems* self,
                                         gboolean value);
static GObject * widgets_sub_items_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static void widgets_sub_items_finalize (GObject * obj);
static GType widgets_sub_items_get_type_once (void);
static void _vala_widgets_sub_items_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_widgets_sub_items_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_sub_items_get_instance_private (WidgetsSubItems* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsSubItems_private_offset);
}

WidgetsSubItems*
widgets_sub_items_construct (GType object_type,
                             gboolean is_project_view)
{
	WidgetsSubItems * self = NULL;
	self = (WidgetsSubItems*) g_object_new (object_type, "is-board", FALSE, "is-project-view", is_project_view, NULL);
	return self;
}

WidgetsSubItems*
widgets_sub_items_new (gboolean is_project_view)
{
	return widgets_sub_items_construct (WIDGETS_TYPE_SUB_ITEMS, is_project_view);
}

WidgetsSubItems*
widgets_sub_items_construct_for_board (GType object_type)
{
	WidgetsSubItems * self = NULL;
	self = (WidgetsSubItems*) g_object_new (object_type, "is-board", TRUE, "is-project-view", FALSE, NULL);
	return self;
}

WidgetsSubItems*
widgets_sub_items_new_for_board (void)
{
	return widgets_sub_items_construct_for_board (WIDGETS_TYPE_SUB_ITEMS);
}

static void
_widgets_sub_items_add_item_objects_item_item_added (ObjectsItem* _sender,
                                                     ObjectsItem* item,
                                                     gpointer self)
{
	widgets_sub_items_add_item ((WidgetsSubItems*) self, item);
}

static void
__lambda119_ (WidgetsSubItems* self,
              ObjectsItem* item,
              const gchar* update_id)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GeeHashMap* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	g_return_if_fail (item != NULL);
	g_return_if_fail (update_id != NULL);
	_tmp0_ = self->items_map;
	_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_;
		LayoutsItemBase* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gboolean _tmp10_;
		_tmp3_ = self->items_map;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsItemBase*) _tmp6_;
		_tmp8_ = layouts_item_base_get_update_id (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strcmp0 (_tmp9_, update_id) != 0;
		_g_object_unref0 (_tmp7_);
		if (_tmp10_) {
			GeeHashMap* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gpointer _tmp14_;
			LayoutsItemBase* _tmp15_;
			_tmp11_ = self->items_map;
			_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp13_ = _tmp12_;
			_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp13_);
			_tmp15_ = (LayoutsItemBase*) _tmp14_;
			layouts_item_base_update_request (_tmp15_);
			_g_object_unref0 (_tmp15_);
			widgets_sub_items_update_sort (self);
		}
	}
	_tmp16_ = self->items_checked;
	_tmp17_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp18_ = _tmp17_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp16_, _tmp18_)) {
		GeeHashMap* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gpointer _tmp22_;
		LayoutsItemBase* _tmp23_;
		_tmp19_ = self->items_checked;
		_tmp20_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp21_ = _tmp20_;
		_tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp21_);
		_tmp23_ = (LayoutsItemBase*) _tmp22_;
		layouts_item_base_update_request (_tmp23_);
		_g_object_unref0 (_tmp23_);
	}
}

static void
___lambda119__services_store_item_updated (ServicesStore* _sender,
                                           ObjectsItem* item,
                                           const gchar* update_id,
                                           gpointer self)
{
	__lambda119_ ((WidgetsSubItems*) self, item, update_id);
}

static void
__lambda120_ (WidgetsSubItems* self,
              ObjectsItem* item)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_;
	gboolean _tmp14_;
	g_return_if_fail (item != NULL);
	_tmp2_ = objects_item_get_pinned (item);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		ObjectsItem* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp4_ = objects_item_get_parent_id (item);
		_tmp5_ = _tmp4_;
		_tmp6_ = self->priv->_item_parent;
		_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp1_ = g_strcmp0 (_tmp5_, _tmp8_) == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GeeHashMap* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = self->items_map;
		_tmp10_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp11_ = _tmp10_;
		_tmp0_ = !gee_abstract_map_has_key ((GeeAbstractMap*) _tmp9_, _tmp11_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		widgets_sub_items_add_item (self, item);
	}
	_tmp13_ = objects_item_get_pinned (item);
	_tmp14_ = _tmp13_;
	if (_tmp14_) {
		GeeHashMap* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		_tmp15_ = self->items_map;
		_tmp16_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp17_ = _tmp16_;
		_tmp12_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp15_, _tmp17_);
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		GeeHashMap* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		gpointer _tmp21_;
		LayoutsItemBase* _tmp22_;
		GeeHashMap* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		_tmp18_ = self->items_map;
		_tmp19_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp20_ = _tmp19_;
		_tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp18_, _tmp20_);
		_tmp22_ = (LayoutsItemBase*) _tmp21_;
		layouts_item_base_hide_destroy (_tmp22_);
		_g_object_unref0 (_tmp22_);
		_tmp23_ = self->items_map;
		_tmp24_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp25_ = _tmp24_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp23_, _tmp25_, NULL);
	}
}

static void
___lambda120__services_store_item_pin_change (ServicesStore* _sender,
                                              ObjectsItem* item,
                                              gpointer self)
{
	__lambda120_ ((WidgetsSubItems*) self, item);
}

static void
__lambda121_ (WidgetsSubItems* self,
              ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GeeHashMap* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->items_map;
	_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_;
		LayoutsItemBase* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = self->items_map;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsItemBase*) _tmp6_;
		layouts_item_base_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->items_map;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	}
	_tmp11_ = self->items_checked;
	_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp13_ = _tmp12_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp11_, _tmp13_)) {
		GeeHashMap* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gpointer _tmp17_;
		LayoutsItemBase* _tmp18_;
		GeeHashMap* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp14_ = self->items_checked;
		_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp16_ = _tmp15_;
		_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, _tmp16_);
		_tmp18_ = (LayoutsItemBase*) _tmp17_;
		layouts_item_base_hide_destroy (_tmp18_);
		_g_object_unref0 (_tmp18_);
		_tmp19_ = self->items_checked;
		_tmp20_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp21_ = _tmp20_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp19_, _tmp21_, NULL);
	}
	g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
}

static void
___lambda121__services_store_item_deleted (ServicesStore* _sender,
                                           ObjectsItem* item,
                                           gpointer self)
{
	__lambda121_ ((WidgetsSubItems*) self, item);
}

static void
__lambda122_ (WidgetsSubItems* self,
              ObjectsItem* item,
              const gchar* old_project_id,
              const gchar* old_section_id,
              const gchar* old_parent_id)
{
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	ObjectsItem* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	g_return_if_fail (item != NULL);
	g_return_if_fail (old_project_id != NULL);
	g_return_if_fail (old_section_id != NULL);
	g_return_if_fail (old_parent_id != NULL);
	_tmp0_ = self->priv->_item_parent;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (old_parent_id, _tmp2_) == 0) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		GeeHashMap* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp3_ = self->items_map;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp3_, _tmp5_)) {
			GeeHashMap* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			gpointer _tmp9_;
			LayoutsItemBase* _tmp10_;
			GeeHashMap* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			_tmp6_ = self->items_map;
			_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp8_ = _tmp7_;
			_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp8_);
			_tmp10_ = (LayoutsItemBase*) _tmp9_;
			layouts_item_base_hide_destroy (_tmp10_);
			_g_object_unref0 (_tmp10_);
			_tmp11_ = self->items_map;
			_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp13_ = _tmp12_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp11_, _tmp13_, NULL);
		}
		_tmp14_ = self->items_checked;
		_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp16_ = _tmp15_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp14_, _tmp16_)) {
			GeeHashMap* _tmp17_;
			const gchar* _tmp18_;
			const gchar* _tmp19_;
			gpointer _tmp20_;
			LayoutsItemBase* _tmp21_;
			GeeHashMap* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			_tmp17_ = self->items_checked;
			_tmp18_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp19_ = _tmp18_;
			_tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp17_, _tmp19_);
			_tmp21_ = (LayoutsItemBase*) _tmp20_;
			layouts_item_base_hide_destroy (_tmp21_);
			_g_object_unref0 (_tmp21_);
			_tmp22_ = self->items_checked;
			_tmp23_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp24_ = _tmp23_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp22_, _tmp24_, NULL);
		}
	}
	_tmp25_ = objects_item_get_parent_id (item);
	_tmp26_ = _tmp25_;
	_tmp27_ = self->priv->_item_parent;
	_tmp28_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp27_);
	_tmp29_ = _tmp28_;
	if (g_strcmp0 (_tmp26_, _tmp29_) == 0) {
		widgets_sub_items_add_item (self, item);
	}
	widgets_sub_items_update_sort (self);
	g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
}

static void
___lambda122__services_event_bus_item_moved (ServicesEventBus* _sender,
                                             ObjectsItem* item,
                                             const gchar* old_project_id,
                                             const gchar* old_section_id,
                                             const gchar* old_parent_id,
                                             gpointer self)
{
	__lambda122_ ((WidgetsSubItems*) self, item, old_project_id, old_section_id, old_parent_id);
}

static void
__lambda123_ (WidgetsSubItems* self,
              ObjectsItem* item,
              gboolean old_checked)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	ObjectsItem* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (item != NULL);
	_tmp0_ = objects_item_get_parent_id (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_item_parent;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp1_, _tmp4_) == 0) {
		if (!old_checked) {
			GeeHashMap* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			GeeHashMap* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp5_ = self->items_map;
			_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_;
				gpointer _tmp11_;
				LayoutsItemBase* _tmp12_;
				GeeHashMap* _tmp13_;
				const gchar* _tmp14_;
				const gchar* _tmp15_;
				_tmp8_ = self->items_map;
				_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp10_ = _tmp9_;
				_tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp10_);
				_tmp12_ = (LayoutsItemBase*) _tmp11_;
				layouts_item_base_hide_destroy (_tmp12_);
				_g_object_unref0 (_tmp12_);
				_tmp13_ = self->items_map;
				_tmp14_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp15_ = _tmp14_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp13_, _tmp15_, NULL);
			}
			_tmp16_ = self->items_checked;
			_tmp17_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp18_ = _tmp17_;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp16_, _tmp18_)) {
				gboolean _tmp19_;
				GtkListBox* _tmp31_;
				GeeHashMap* _tmp32_;
				const gchar* _tmp33_;
				const gchar* _tmp34_;
				gpointer _tmp35_;
				LayoutsItemBase* _tmp36_;
				_tmp19_ = self->priv->_is_board;
				if (_tmp19_) {
					GeeHashMap* _tmp20_;
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					LayoutsItemBoard* _tmp23_;
					LayoutsItemBoard* _tmp24_;
					_tmp20_ = self->items_checked;
					_tmp21_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp22_ = _tmp21_;
					_tmp23_ = layouts_item_board_new (item);
					g_object_ref_sink (_tmp23_);
					_tmp24_ = _tmp23_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, _tmp22_, (LayoutsItemBase*) _tmp24_);
					_g_object_unref0 (_tmp24_);
				} else {
					GeeHashMap* _tmp25_;
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					gboolean _tmp28_;
					LayoutsItemRow* _tmp29_;
					LayoutsItemRow* _tmp30_;
					_tmp25_ = self->items_checked;
					_tmp26_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp27_ = _tmp26_;
					_tmp28_ = self->priv->_is_project_view;
					_tmp29_ = layouts_item_row_new (item, _tmp28_);
					g_object_ref_sink (_tmp29_);
					_tmp30_ = _tmp29_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, _tmp27_, (LayoutsItemBase*) _tmp30_);
					_g_object_unref0 (_tmp30_);
				}
				_tmp31_ = self->priv->checked_listbox;
				_tmp32_ = self->items_checked;
				_tmp33_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp34_ = _tmp33_;
				_tmp35_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp32_, _tmp34_);
				_tmp36_ = (LayoutsItemBase*) _tmp35_;
				gtk_list_box_insert (_tmp31_, (GtkWidget*) _tmp36_, 0);
				_g_object_unref0 (_tmp36_);
			}
		} else {
			GeeHashMap* _tmp37_;
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			GeeHashMap* _tmp48_;
			const gchar* _tmp49_;
			const gchar* _tmp50_;
			_tmp37_ = self->items_checked;
			_tmp38_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp39_ = _tmp38_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp37_, _tmp39_)) {
				GeeHashMap* _tmp40_;
				const gchar* _tmp41_;
				const gchar* _tmp42_;
				gpointer _tmp43_;
				LayoutsItemBase* _tmp44_;
				GeeHashMap* _tmp45_;
				const gchar* _tmp46_;
				const gchar* _tmp47_;
				_tmp40_ = self->items_checked;
				_tmp41_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp42_ = _tmp41_;
				_tmp43_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp40_, _tmp42_);
				_tmp44_ = (LayoutsItemBase*) _tmp43_;
				layouts_item_base_hide_destroy (_tmp44_);
				_g_object_unref0 (_tmp44_);
				_tmp45_ = self->items_checked;
				_tmp46_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp47_ = _tmp46_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp45_, _tmp47_, NULL);
			}
			_tmp48_ = self->items_map;
			_tmp49_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp50_ = _tmp49_;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp48_, _tmp50_)) {
				gboolean _tmp51_;
				GtkListBox* _tmp63_;
				GeeHashMap* _tmp64_;
				const gchar* _tmp65_;
				const gchar* _tmp66_;
				gpointer _tmp67_;
				LayoutsItemBase* _tmp68_;
				_tmp51_ = self->priv->_is_board;
				if (_tmp51_) {
					GeeHashMap* _tmp52_;
					const gchar* _tmp53_;
					const gchar* _tmp54_;
					LayoutsItemBoard* _tmp55_;
					LayoutsItemBoard* _tmp56_;
					_tmp52_ = self->items_map;
					_tmp53_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp54_ = _tmp53_;
					_tmp55_ = layouts_item_board_new (item);
					g_object_ref_sink (_tmp55_);
					_tmp56_ = _tmp55_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp52_, _tmp54_, (LayoutsItemBase*) _tmp56_);
					_g_object_unref0 (_tmp56_);
				} else {
					GeeHashMap* _tmp57_;
					const gchar* _tmp58_;
					const gchar* _tmp59_;
					gboolean _tmp60_;
					LayoutsItemRow* _tmp61_;
					LayoutsItemRow* _tmp62_;
					_tmp57_ = self->items_map;
					_tmp58_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
					_tmp59_ = _tmp58_;
					_tmp60_ = self->priv->_is_project_view;
					_tmp61_ = layouts_item_row_new (item, _tmp60_);
					g_object_ref_sink (_tmp61_);
					_tmp62_ = _tmp61_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp59_, (LayoutsItemBase*) _tmp62_);
					_g_object_unref0 (_tmp62_);
				}
				_tmp63_ = self->priv->listbox;
				_tmp64_ = self->items_map;
				_tmp65_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp66_ = _tmp65_;
				_tmp67_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp64_, _tmp66_);
				_tmp68_ = (LayoutsItemBase*) _tmp67_;
				gtk_list_box_append (_tmp63_, (GtkWidget*) _tmp68_);
				_g_object_unref0 (_tmp68_);
				g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
			}
		}
		g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
	}
}

static void
___lambda123__services_event_bus_checked_toggled (ServicesEventBus* _sender,
                                                  ObjectsItem* item,
                                                  gboolean old_checked,
                                                  gpointer self)
{
	__lambda123_ ((WidgetsSubItems*) self, item, old_checked);
}

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

static void
__lambda124_ (WidgetsSubItems* self,
              GtkWidget* _row,
              const gchar* old_section_id,
              const gchar* old_parent_id)
{
	gboolean _tmp0_;
	g_return_if_fail (_row != NULL);
	g_return_if_fail (old_section_id != NULL);
	g_return_if_fail (old_parent_id != NULL);
	_tmp0_ = self->priv->_is_board;
	if (!_tmp0_) {
		LayoutsItemRow* row = NULL;
		LayoutsItemRow* _tmp1_;
		ObjectsItem* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_row, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
		row = _tmp1_;
		_tmp2_ = self->priv->_item_parent;
		_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
		_tmp4_ = _tmp3_;
		if (g_strcmp0 (old_parent_id, _tmp4_) == 0) {
			GeeHashMap* _tmp5_;
			LayoutsItemRow* _tmp6_;
			ObjectsItem* _tmp7_;
			ObjectsItem* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			GeeHashMap* _tmp17_;
			LayoutsItemRow* _tmp18_;
			ObjectsItem* _tmp19_;
			ObjectsItem* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp5_ = self->items_map;
			_tmp6_ = row;
			_tmp7_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp8_);
			_tmp10_ = _tmp9_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp5_, _tmp10_)) {
				GeeHashMap* _tmp11_;
				LayoutsItemRow* _tmp12_;
				ObjectsItem* _tmp13_;
				ObjectsItem* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				_tmp11_ = self->items_map;
				_tmp12_ = row;
				_tmp13_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp14_);
				_tmp16_ = _tmp15_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp11_, _tmp16_, NULL);
			}
			_tmp17_ = self->items_checked;
			_tmp18_ = row;
			_tmp19_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp20_);
			_tmp22_ = _tmp21_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp17_, _tmp22_)) {
				GeeHashMap* _tmp23_;
				LayoutsItemRow* _tmp24_;
				ObjectsItem* _tmp25_;
				ObjectsItem* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				_tmp23_ = self->items_checked;
				_tmp24_ = row;
				_tmp25_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp26_);
				_tmp28_ = _tmp27_;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp23_, _tmp28_, NULL);
			}
			g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
		}
		_g_object_unref0 (row);
	}
}

static void
___lambda124__services_event_bus_update_inserted_item_map (ServicesEventBus* _sender,
                                                           GtkWidget* row,
                                                           const gchar* old_section_id,
                                                           const gchar* old_parent_id,
                                                           gpointer self)
{
	__lambda124_ ((WidgetsSubItems*) self, row, old_section_id, old_parent_id);
}

static void
__lambda125_ (WidgetsSubItems* self)
{
	widgets_sub_items_prepare_new_item (self, "");
}

static void
___lambda125__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda125_ ((WidgetsSubItems*) self);
}

static void
__lambda126_ (WidgetsSubItems* self)
{
	widgets_sub_items_update_sort (self);
}

static void
___lambda126__objects_project_sort_order_changed (ObjectsProject* _sender,
                                                  gpointer self)
{
	__lambda126_ ((WidgetsSubItems*) self);
}

static void
__lambda127_ (WidgetsSubItems* self)
{
	widgets_sub_items_update_sort (self);
}

static void
___lambda127__objects_project_sorted_by_changed (ObjectsProject* _sender,
                                                 gpointer self)
{
	__lambda127_ ((WidgetsSubItems*) self);
}

static void
__lambda128_ (WidgetsSubItems* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	_tmp0_ = self->priv->checked_revealer;
	_tmp1_ = widgets_sub_items_get_show_completed (self);
	_tmp2_ = _tmp1_;
	gtk_revealer_set_reveal_child (_tmp0_, _tmp2_);
	_tmp3_ = widgets_sub_items_get_show_completed (self);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		widgets_sub_items_add_completed_items (self);
	}
}

static void
___lambda128__g_settings_changed (GSettings* _sender,
                                  const gchar* key,
                                  gpointer self)
{
	__lambda128_ ((WidgetsSubItems*) self);
}

static void
__lambda129_ (WidgetsSubItems* self,
              const gchar* project_id,
              gboolean value)
{
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (project_id != NULL);
	_tmp0_ = self->priv->_item_parent;
	_tmp1_ = objects_item_get_project_id (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, project_id) == 0) {
		{
			GeeIterator* _row_base_it = NULL;
			GeeHashMap* _tmp3_;
			GeeCollection* _tmp4_;
			GeeCollection* _tmp5_;
			GeeCollection* _tmp6_;
			GeeIterator* _tmp7_;
			GeeIterator* _tmp8_;
			_tmp3_ = self->items_map;
			_tmp4_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp3_);
			_tmp5_ = _tmp4_;
			_tmp6_ = _tmp5_;
			_tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
			_tmp8_ = _tmp7_;
			_g_object_unref0 (_tmp6_);
			_row_base_it = _tmp8_;
			while (TRUE) {
				GeeIterator* _tmp9_;
				LayoutsItemBase* row_base = NULL;
				GeeIterator* _tmp10_;
				gpointer _tmp11_;
				LayoutsItemBase* _tmp12_;
				_tmp9_ = _row_base_it;
				if (!gee_iterator_next (_tmp9_)) {
					break;
				}
				_tmp10_ = _row_base_it;
				_tmp11_ = gee_iterator_get (_tmp10_);
				row_base = (LayoutsItemBase*) _tmp11_;
				_tmp12_ = row_base;
				if (LAYOUTS_IS_ITEM_ROW (_tmp12_)) {
					LayoutsItemBase* _tmp13_;
					_tmp13_ = row_base;
					layouts_item_row_set_edit (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow), value);
				}
				_g_object_unref0 (row_base);
			}
			_g_object_unref0 (_row_base_it);
		}
	}
}

static void
___lambda129__services_event_bus_expand_all (ServicesEventBus* _sender,
                                             const gchar* project_id,
                                             gboolean active,
                                             gpointer self)
{
	__lambda129_ ((WidgetsSubItems*) self, project_id, active);
}

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_);
}

static void
__lambda150_ (WidgetsSubItems* self)
{
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = !g_settings_get_boolean (_tmp2_, "always-show-completed-subtasks");
	_g_object_unref0 (_tmp1_);
	if (_tmp3_) {
		GtkRevealer* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp4_ = self->priv->checked_revealer;
		_tmp5_ = widgets_sub_items_get_show_completed (self);
		_tmp6_ = _tmp5_;
		gtk_revealer_set_reveal_child (_tmp4_, _tmp6_);
		_tmp7_ = widgets_sub_items_get_show_completed (self);
		_tmp8_ = _tmp7_;
		if (_tmp8_) {
			widgets_sub_items_add_completed_items (self);
		} else {
			GeeHashMap* _tmp9_;
			Util* _tmp10_;
			Util* _tmp11_;
			GtkListBox* _tmp12_;
			GList* _tmp13_;
			GList* _tmp14_;
			_tmp9_ = self->items_checked;
			gee_abstract_map_clear ((GeeAbstractMap*) _tmp9_);
			_tmp10_ = util_get_default ();
			_tmp11_ = _tmp10_;
			_tmp12_ = self->priv->checked_listbox;
			_tmp13_ = util_get_children (_tmp11_, _tmp12_);
			_tmp14_ = _tmp13_;
			_g_object_unref0 (_tmp11_);
			{
				GList* child_collection = NULL;
				GList* child_it = NULL;
				child_collection = _tmp14_;
				for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
					GtkWidget* child = NULL;
					child = (GtkWidget*) ((GtkListBoxRow*) child_it->data);
					{
						GtkListBox* _tmp15_;
						GtkWidget* _tmp16_;
						_tmp15_ = self->priv->checked_listbox;
						_tmp16_ = child;
						gtk_list_box_remove (_tmp15_, _tmp16_);
					}
				}
				(child_collection == NULL) ? NULL : (child_collection = (_g_list_free__g_object_unref0_ (child_collection), NULL));
			}
		}
	}
}

static void
___lambda150__objects_project_show_completed_changed (ObjectsProject* _sender,
                                                      gpointer self)
{
	__lambda150_ ((WidgetsSubItems*) self);
}

static void
__lambda151_ (WidgetsSubItems* self)
{
	widgets_sub_items_load_next_completed_page (self);
}

static void
___lambda151__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda151_ ((WidgetsSubItems*) self);
}

void
widgets_sub_items_present_item (WidgetsSubItems* self,
                                ObjectsItem* _item_parent)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeHashMap* _tmp3_;
	ObjectsItem* _tmp4_;
	gulong _tmp5_;
	ObjectsItem* _tmp6_;
	GeeHashMap* _tmp7_;
	ServicesStore* _tmp8_;
	gulong _tmp9_;
	ServicesStore* _tmp10_;
	GeeHashMap* _tmp11_;
	ServicesStore* _tmp12_;
	gulong _tmp13_;
	ServicesStore* _tmp14_;
	GeeHashMap* _tmp15_;
	ServicesStore* _tmp16_;
	gulong _tmp17_;
	ServicesStore* _tmp18_;
	GeeHashMap* _tmp19_;
	ServicesEventBus* _tmp20_;
	ServicesEventBus* _tmp21_;
	gulong _tmp22_;
	ServicesEventBus* _tmp23_;
	ServicesEventBus* _tmp24_;
	GeeHashMap* _tmp25_;
	ServicesEventBus* _tmp26_;
	ServicesEventBus* _tmp27_;
	gulong _tmp28_;
	ServicesEventBus* _tmp29_;
	ServicesEventBus* _tmp30_;
	GeeHashMap* _tmp31_;
	ServicesEventBus* _tmp32_;
	ServicesEventBus* _tmp33_;
	gulong _tmp34_;
	ServicesEventBus* _tmp35_;
	ServicesEventBus* _tmp36_;
	GeeHashMap* _tmp37_;
	WidgetsLoadingButton* _tmp38_;
	gulong _tmp39_;
	WidgetsLoadingButton* _tmp40_;
	GeeHashMap* _tmp41_;
	ObjectsItem* _tmp42_;
	ObjectsProject* _tmp43_;
	ObjectsProject* _tmp44_;
	gulong _tmp45_;
	ObjectsItem* _tmp46_;
	ObjectsProject* _tmp47_;
	ObjectsProject* _tmp48_;
	GeeHashMap* _tmp49_;
	ObjectsItem* _tmp50_;
	ObjectsProject* _tmp51_;
	ObjectsProject* _tmp52_;
	gulong _tmp53_;
	ObjectsItem* _tmp54_;
	ObjectsProject* _tmp55_;
	ObjectsProject* _tmp56_;
	GeeHashMap* _tmp57_;
	ServicesSettings* _tmp58_;
	ServicesSettings* _tmp59_;
	GSettings* _tmp60_;
	gulong _tmp61_;
	ServicesSettings* _tmp62_;
	ServicesSettings* _tmp63_;
	GSettings* _tmp64_;
	GeeHashMap* _tmp65_;
	ServicesEventBus* _tmp66_;
	ServicesEventBus* _tmp67_;
	gulong _tmp68_;
	ServicesSettings* _tmp69_;
	ServicesSettings* _tmp70_;
	GeeHashMap* _tmp71_;
	ObjectsItem* _tmp72_;
	ObjectsProject* _tmp73_;
	ObjectsProject* _tmp74_;
	gulong _tmp75_;
	ObjectsItem* _tmp76_;
	ObjectsProject* _tmp77_;
	ObjectsProject* _tmp78_;
	GeeHashMap* _tmp79_;
	GtkButton* _tmp80_;
	gulong _tmp81_;
	GtkButton* _tmp82_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_item_parent != NULL);
	widgets_sub_items_set_item_parent (self, _item_parent);
	widgets_sub_items_add_items (self);
	_tmp0_ = self->priv->checked_revealer;
	_tmp1_ = widgets_sub_items_get_show_completed (self);
	_tmp2_ = _tmp1_;
	gtk_revealer_set_reveal_child (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->signal_map;
	_tmp4_ = self->priv->_item_parent;
	_tmp5_ = g_signal_connect_object (_tmp4_, "item-added", (GCallback) _widgets_sub_items_add_item_objects_item_item_added, self, 0);
	_tmp6_ = self->priv->_item_parent;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp5_), (GObject*) _tmp6_);
	_tmp7_ = self->priv->signal_map;
	_tmp8_ = services_store_instance ();
	_tmp9_ = g_signal_connect_object (_tmp8_, "item-updated", (GCallback) ___lambda119__services_store_item_updated, self, 0);
	_tmp10_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) _tmp9_), (GObject*) _tmp10_);
	_tmp11_ = self->priv->signal_map;
	_tmp12_ = services_store_instance ();
	_tmp13_ = g_signal_connect_object (_tmp12_, "item-pin-change", (GCallback) ___lambda120__services_store_item_pin_change, self, 0);
	_tmp14_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, (gpointer) ((guintptr) _tmp13_), (GObject*) _tmp14_);
	_tmp15_ = self->priv->signal_map;
	_tmp16_ = services_store_instance ();
	_tmp17_ = g_signal_connect_object (_tmp16_, "item-deleted", (GCallback) ___lambda121__services_store_item_deleted, self, 0);
	_tmp18_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, (gpointer) ((guintptr) _tmp17_), (GObject*) _tmp18_);
	_tmp19_ = self->priv->signal_map;
	_tmp20_ = services_event_bus_get_default ();
	_tmp21_ = _tmp20_;
	_tmp22_ = g_signal_connect_object (_tmp21_, "item-moved", (GCallback) ___lambda122__services_event_bus_item_moved, self, 0);
	_tmp23_ = services_event_bus_get_default ();
	_tmp24_ = _tmp23_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, (gpointer) ((guintptr) _tmp22_), (GObject*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	_g_object_unref0 (_tmp21_);
	_tmp25_ = self->priv->signal_map;
	_tmp26_ = services_event_bus_get_default ();
	_tmp27_ = _tmp26_;
	_tmp28_ = g_signal_connect_object (_tmp27_, "checked-toggled", (GCallback) ___lambda123__services_event_bus_checked_toggled, self, 0);
	_tmp29_ = services_event_bus_get_default ();
	_tmp30_ = _tmp29_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, (gpointer) ((guintptr) _tmp28_), (GObject*) _tmp30_);
	_g_object_unref0 (_tmp30_);
	_g_object_unref0 (_tmp27_);
	_tmp31_ = self->priv->signal_map;
	_tmp32_ = services_event_bus_get_default ();
	_tmp33_ = _tmp32_;
	_tmp34_ = g_signal_connect_object (_tmp33_, "update-inserted-item-map", (GCallback) ___lambda124__services_event_bus_update_inserted_item_map, self, 0);
	_tmp35_ = services_event_bus_get_default ();
	_tmp36_ = _tmp35_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, (gpointer) ((guintptr) _tmp34_), (GObject*) _tmp36_);
	_g_object_unref0 (_tmp36_);
	_g_object_unref0 (_tmp33_);
	_tmp37_ = self->priv->signal_map;
	_tmp38_ = self->add_button;
	_tmp39_ = g_signal_connect_object ((GtkButton*) _tmp38_, "clicked", (GCallback) ___lambda125__gtk_button_clicked, self, 0);
	_tmp40_ = self->add_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp37_, (gpointer) ((guintptr) _tmp39_), (GObject*) _tmp40_);
	_tmp41_ = self->priv->signal_map;
	_tmp42_ = self->priv->_item_parent;
	_tmp43_ = objects_item_get_project (_tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = g_signal_connect_object (_tmp44_, "sort-order-changed", (GCallback) ___lambda126__objects_project_sort_order_changed, self, 0);
	_tmp46_ = self->priv->_item_parent;
	_tmp47_ = objects_item_get_project (_tmp46_);
	_tmp48_ = _tmp47_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp41_, (gpointer) ((guintptr) _tmp45_), (GObject*) _tmp48_);
	_tmp49_ = self->priv->signal_map;
	_tmp50_ = self->priv->_item_parent;
	_tmp51_ = objects_item_get_project (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = g_signal_connect_object (_tmp52_, "sorted-by-changed", (GCallback) ___lambda127__objects_project_sorted_by_changed, self, 0);
	_tmp54_ = self->priv->_item_parent;
	_tmp55_ = objects_item_get_project (_tmp54_);
	_tmp56_ = _tmp55_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp49_, (gpointer) ((guintptr) _tmp53_), (GObject*) _tmp56_);
	_tmp57_ = self->priv->signal_map;
	_tmp58_ = services_settings_get_default ();
	_tmp59_ = _tmp58_;
	_tmp60_ = _tmp59_->settings;
	_tmp61_ = g_signal_connect_object (_tmp60_, "changed::always-show-completed-subtasks", (GCallback) ___lambda128__g_settings_changed, self, 0);
	_tmp62_ = services_settings_get_default ();
	_tmp63_ = _tmp62_;
	_tmp64_ = _tmp63_->settings;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, (gpointer) ((guintptr) _tmp61_), (GObject*) _tmp64_);
	_g_object_unref0 (_tmp63_);
	_g_object_unref0 (_tmp59_);
	_tmp65_ = self->priv->signal_map;
	_tmp66_ = services_event_bus_get_default ();
	_tmp67_ = _tmp66_;
	_tmp68_ = g_signal_connect_object (_tmp67_, "expand-all", (GCallback) ___lambda129__services_event_bus_expand_all, self, 0);
	_tmp69_ = services_settings_get_default ();
	_tmp70_ = _tmp69_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp65_, (gpointer) ((guintptr) _tmp68_), (GObject*) _tmp70_);
	_g_object_unref0 (_tmp70_);
	_g_object_unref0 (_tmp67_);
	_tmp71_ = self->priv->signal_map;
	_tmp72_ = self->priv->_item_parent;
	_tmp73_ = objects_item_get_project (_tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = g_signal_connect_object (_tmp74_, "show-completed-changed", (GCallback) ___lambda150__objects_project_show_completed_changed, self, 0);
	_tmp76_ = self->priv->_item_parent;
	_tmp77_ = objects_item_get_project (_tmp76_);
	_tmp78_ = _tmp77_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp71_, (gpointer) ((guintptr) _tmp75_), (GObject*) _tmp78_);
	_tmp79_ = self->priv->signal_map;
	_tmp80_ = self->priv->load_more_button;
	_tmp81_ = g_signal_connect_object (_tmp80_, "clicked", (GCallback) ___lambda151__gtk_button_clicked, self, 0);
	_tmp82_ = self->priv->load_more_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (gpointer) ((guintptr) _tmp81_), (GObject*) _tmp82_);
}

void
widgets_sub_items_add_items (WidgetsSubItems* self)
{
	GeeHashMap* _tmp0_;
	Util* _tmp1_;
	Util* _tmp2_;
	GtkListBox* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->items_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
	_tmp1_ = util_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->listbox;
	_tmp4_ = util_get_children (_tmp2_, _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp5_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) ((GtkListBoxRow*) child_it->data);
			{
				GtkListBox* _tmp6_;
				GtkWidget* _tmp7_;
				_tmp6_ = self->priv->listbox;
				_tmp7_ = child;
				gtk_list_box_remove (_tmp6_, _tmp7_);
			}
		}
		(child_collection == NULL) ? NULL : (child_collection = (_g_list_free__g_object_unref0_ (child_collection), NULL));
	}
	{
		GeeArrayList* _item_list = NULL;
		ObjectsItem* _tmp8_;
		GeeArrayList* _tmp9_;
		GeeArrayList* _tmp10_;
		gint _item_size = 0;
		GeeArrayList* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gint _item_index = 0;
		_tmp8_ = self->priv->_item_parent;
		_tmp9_ = objects_item_get_items (_tmp8_);
		_tmp10_ = _tmp9_;
		_item_list = _tmp10_;
		_tmp11_ = _item_list;
		_tmp12_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp11_);
		_tmp13_ = _tmp12_;
		_item_size = _tmp13_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp14_;
			gint _tmp15_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp16_;
			gpointer _tmp17_;
			ObjectsItem* _tmp18_;
			_item_index = _item_index + 1;
			_tmp14_ = _item_index;
			_tmp15_ = _item_size;
			if (!(_tmp14_ < _tmp15_)) {
				break;
			}
			_tmp16_ = _item_list;
			_tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp16_, _item_index);
			item = (ObjectsItem*) _tmp17_;
			_tmp18_ = item;
			widgets_sub_items_add_item (self, _tmp18_);
			_g_object_unref0 (item);
		}
	}
	_tmp19_ = widgets_sub_items_get_show_completed (self);
	_tmp20_ = _tmp19_;
	if (_tmp20_) {
		widgets_sub_items_add_completed_items (self);
	}
	widgets_sub_items_update_sort (self);
}

static gint
__lambda118_ (WidgetsSubItems* self,
              ObjectsItem* a,
              ObjectsItem* b)
{
	GDateTime* completed_a = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* completed_b = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = objects_item_get_completed_at (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = utils_datetime_get_date_from_string (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = utils_datetime_get_date_only (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_date_time_unref0 (_tmp3_);
	completed_a = _tmp5_;
	_tmp6_ = objects_item_get_completed_at (b);
	_tmp7_ = _tmp6_;
	_tmp8_ = utils_datetime_get_date_from_string (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = utils_datetime_get_date_only (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_date_time_unref0 (_tmp9_);
	completed_b = _tmp11_;
	result = g_date_time_compare (completed_b, completed_a);
	_g_date_time_unref0 (completed_b);
	_g_date_time_unref0 (completed_a);
	return result;
}

static gint
___lambda118__gcompare_data_func (gconstpointer a,
                                  gconstpointer b,
                                  gpointer self)
{
	gint result;
	result = __lambda118_ ((WidgetsSubItems*) self, (ObjectsItem*) a, (ObjectsItem*) b);
	return result;
}

void
widgets_sub_items_add_completed_items (WidgetsSubItems* self)
{
	GeeHashMap* _tmp0_;
	Util* _tmp1_;
	Util* _tmp2_;
	GtkListBox* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->items_checked;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
	_tmp1_ = util_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->checked_listbox;
	_tmp4_ = util_get_children (_tmp2_, _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp5_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) ((GtkListBoxRow*) child_it->data);
			{
				GtkListBox* _tmp6_;
				GtkWidget* _tmp7_;
				_tmp6_ = self->priv->checked_listbox;
				_tmp7_ = child;
				gtk_list_box_remove (_tmp6_, _tmp7_);
			}
		}
		(child_collection == NULL) ? NULL : (child_collection = (_g_list_free__g_object_unref0_ (child_collection), NULL));
	}
	_tmp8_ = gee_array_list_new (OBJECTS_TYPE_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->completed_items_list);
	self->priv->completed_items_list = _tmp8_;
	{
		GeeArrayList* _item_list = NULL;
		ObjectsItem* _tmp9_;
		GeeArrayList* _tmp10_;
		GeeArrayList* _tmp11_;
		gint _item_size = 0;
		GeeArrayList* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		gint _item_index = 0;
		_tmp9_ = self->priv->_item_parent;
		_tmp10_ = objects_item_get_items (_tmp9_);
		_tmp11_ = _tmp10_;
		_item_list = _tmp11_;
		_tmp12_ = _item_list;
		_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
		_tmp14_ = _tmp13_;
		_item_size = _tmp14_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp15_;
			gint _tmp16_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp17_;
			gpointer _tmp18_;
			ObjectsItem* _tmp19_;
			gboolean _tmp20_;
			gboolean _tmp21_;
			_item_index = _item_index + 1;
			_tmp15_ = _item_index;
			_tmp16_ = _item_size;
			if (!(_tmp15_ < _tmp16_)) {
				break;
			}
			_tmp17_ = _item_list;
			_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _item_index);
			item = (ObjectsItem*) _tmp18_;
			_tmp19_ = item;
			_tmp20_ = objects_item_get_checked (_tmp19_);
			_tmp21_ = _tmp20_;
			if (_tmp21_) {
				GeeArrayList* _tmp22_;
				ObjectsItem* _tmp23_;
				_tmp22_ = self->priv->completed_items_list;
				_tmp23_ = item;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
			}
			_g_object_unref0 (item);
		}
	}
	_tmp24_ = self->priv->completed_items_list;
	gee_list_sort ((GeeList*) _tmp24_, ___lambda118__gcompare_data_func, g_object_ref (self), g_object_unref);
	self->priv->completed_page_index = 0;
	widgets_sub_items_load_next_completed_page (self);
}

static void
widgets_sub_items_load_next_completed_page (WidgetsSubItems* self)
{
	gint start = 0;
	gint _tmp0_ = 0;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint end = 0;
	gint _tmp12_;
	g_return_if_fail (self != NULL);
	start = self->priv->completed_page_index * WIDGETS_SUB_ITEMS_PAGE_SIZE;
	_tmp1_ = self->priv->completed_items_list;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if ((start + WIDGETS_SUB_ITEMS_PAGE_SIZE) < _tmp3_) {
		_tmp0_ = start + WIDGETS_SUB_ITEMS_PAGE_SIZE;
	} else {
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		_tmp4_ = self->priv->completed_items_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	}
	end = _tmp0_;
	{
		gint i = 0;
		i = start;
		{
			gboolean _tmp7_ = FALSE;
			_tmp7_ = TRUE;
			while (TRUE) {
				ObjectsItem* item = NULL;
				GeeArrayList* _tmp9_;
				gpointer _tmp10_;
				ObjectsItem* _tmp11_;
				if (!_tmp7_) {
					gint _tmp8_;
					_tmp8_ = i;
					i = _tmp8_ + 1;
				}
				_tmp7_ = FALSE;
				if (!(i < end)) {
					break;
				}
				_tmp9_ = self->priv->completed_items_list;
				_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, i);
				item = (ObjectsItem*) _tmp10_;
				_tmp11_ = item;
				widgets_sub_items_add_complete_item (self, _tmp11_);
				_g_object_unref0 (item);
			}
		}
	}
	_tmp12_ = self->priv->completed_page_index;
	self->priv->completed_page_index = _tmp12_ + 1;
	widgets_sub_items_update_load_more_button_label (self);
}

static void
widgets_sub_items_update_load_more_button_label (WidgetsSubItems* self)
{
	gint loaded = 0;
	gint remaining = 0;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	loaded = self->priv->completed_page_index * WIDGETS_SUB_ITEMS_PAGE_SIZE;
	_tmp0_ = self->priv->completed_items_list;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	remaining = _tmp2_ - loaded;
	if (remaining > 0) {
		gint _tmp3_ = 0;
		gint to_show = 0;
		GtkButton* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		GtkRevealer* _tmp7_;
		if (remaining < WIDGETS_SUB_ITEMS_PAGE_SIZE) {
			_tmp3_ = remaining;
		} else {
			_tmp3_ = WIDGETS_SUB_ITEMS_PAGE_SIZE;
		}
		to_show = _tmp3_;
		_tmp4_ = self->priv->load_more_button;
		_tmp5_ = g_strdup_printf ("+%d %s", to_show, _ ("completed tasks"));
		_tmp6_ = _tmp5_;
		gtk_button_set_label (_tmp4_, _tmp6_);
		_g_free0 (_tmp6_);
		_tmp7_ = self->priv->load_more_button_revealer;
		gtk_revealer_set_reveal_child (_tmp7_, TRUE);
	} else {
		GtkButton* _tmp8_;
		GtkRevealer* _tmp9_;
		_tmp8_ = self->priv->load_more_button;
		gtk_button_set_label (_tmp8_, "No more tasks");
		_tmp9_ = self->priv->load_more_button_revealer;
		gtk_revealer_set_reveal_child (_tmp9_, FALSE);
	}
}

void
widgets_sub_items_add_complete_item (WidgetsSubItems* self,
                                     ObjectsItem* item)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp1_ = widgets_sub_items_get_show_completed (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = objects_item_get_checked (item);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		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_)) {
			gboolean _tmp8_;
			GtkListBox* _tmp20_;
			GeeHashMap* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			gpointer _tmp24_;
			LayoutsItemBase* _tmp25_;
			_tmp8_ = self->priv->_is_board;
			if (_tmp8_) {
				GeeHashMap* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				LayoutsItemBoard* _tmp12_;
				LayoutsItemBoard* _tmp13_;
				_tmp9_ = self->items_checked;
				_tmp10_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp11_ = _tmp10_;
				_tmp12_ = layouts_item_board_new (item);
				g_object_ref_sink (_tmp12_);
				_tmp13_ = _tmp12_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, _tmp11_, (LayoutsItemBase*) _tmp13_);
				_g_object_unref0 (_tmp13_);
			} else {
				GeeHashMap* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				gboolean _tmp17_;
				LayoutsItemRow* _tmp18_;
				LayoutsItemRow* _tmp19_;
				_tmp14_ = self->items_checked;
				_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
				_tmp16_ = _tmp15_;
				_tmp17_ = self->priv->_is_project_view;
				_tmp18_ = layouts_item_row_new (item, _tmp17_);
				g_object_ref_sink (_tmp18_);
				_tmp19_ = _tmp18_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp14_, _tmp16_, (LayoutsItemBase*) _tmp19_);
				_g_object_unref0 (_tmp19_);
			}
			_tmp20_ = self->priv->checked_listbox;
			_tmp21_ = self->items_checked;
			_tmp22_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
			_tmp23_ = _tmp22_;
			_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp21_, _tmp23_);
			_tmp25_ = (LayoutsItemBase*) _tmp24_;
			gtk_list_box_append (_tmp20_, (GtkWidget*) _tmp25_);
			_g_object_unref0 (_tmp25_);
		}
	}
}

void
widgets_sub_items_add_item (WidgetsSubItems* self,
                            ObjectsItem* item)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GeeHashMap* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp7_;
	GtkListBox* _tmp19_;
	GeeHashMap* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gpointer _tmp23_;
	LayoutsItemBase* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = objects_item_get_checked (item);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = objects_item_get_pinned (item);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		return;
	}
	_tmp4_ = self->items_map;
	_tmp5_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp6_ = _tmp5_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp4_, _tmp6_)) {
		return;
	}
	_tmp7_ = self->priv->_is_board;
	if (_tmp7_) {
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		LayoutsItemBoard* _tmp11_;
		LayoutsItemBoard* _tmp12_;
		_tmp8_ = self->items_map;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		_tmp11_ = layouts_item_board_new (item);
		g_object_ref_sink (_tmp11_);
		_tmp12_ = _tmp11_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, _tmp10_, (LayoutsItemBase*) _tmp12_);
		_g_object_unref0 (_tmp12_);
	} else {
		GeeHashMap* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gboolean _tmp16_;
		LayoutsItemRow* _tmp17_;
		LayoutsItemRow* _tmp18_;
		_tmp13_ = self->items_map;
		_tmp14_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp15_ = _tmp14_;
		_tmp16_ = self->priv->_is_project_view;
		_tmp17_ = layouts_item_row_new (item, _tmp16_);
		g_object_ref_sink (_tmp17_);
		_tmp18_ = _tmp17_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, _tmp15_, (LayoutsItemBase*) _tmp18_);
		_g_object_unref0 (_tmp18_);
	}
	_tmp19_ = self->priv->listbox;
	_tmp20_ = self->items_map;
	_tmp21_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp22_ = _tmp21_;
	_tmp23_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp20_, _tmp22_);
	_tmp24_ = (LayoutsItemBase*) _tmp23_;
	gtk_list_box_append (_tmp19_, (GtkWidget*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	g_signal_emit (self, widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL], 0);
}

static gint
_widgets_sub_items_set_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                         GtkListBoxRow* row2,
                                                         gpointer self)
{
	gint result;
	result = widgets_sub_items_set_sort_func ((WidgetsSubItems*) self, row1, row2);
	return result;
}

static void
widgets_sub_items_update_sort (WidgetsSubItems* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp0_, _widgets_sub_items_set_sort_func_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp1_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp1_, NULL, NULL, NULL);
}

static gint
widgets_sub_items_set_sort_func (WidgetsSubItems* self,
                                 GtkListBoxRow* lbrow,
                                 GtkListBoxRow* lbbefore)
{
	ObjectsItem* item1 = NULL;
	ObjectsItem* item2 = NULL;
	gboolean _tmp0_;
	Util* _tmp13_;
	Util* _tmp14_;
	ObjectsItem* _tmp15_;
	ObjectsItem* _tmp16_;
	ObjectsItem* _tmp17_;
	ObjectsProject* _tmp18_;
	ObjectsProject* _tmp19_;
	SortedByType _tmp20_;
	SortedByType _tmp21_;
	ObjectsItem* _tmp22_;
	ObjectsProject* _tmp23_;
	ObjectsProject* _tmp24_;
	SortOrderType _tmp25_;
	SortOrderType _tmp26_;
	gint _tmp27_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (lbrow != NULL, -1);
	g_return_val_if_fail (lbbefore != NULL, -1);
	_tmp0_ = self->priv->_is_board;
	if (_tmp0_) {
		ObjectsItem* _tmp1_;
		ObjectsItem* _tmp2_;
		ObjectsItem* _tmp3_;
		ObjectsItem* _tmp4_;
		ObjectsItem* _tmp5_;
		ObjectsItem* _tmp6_;
		_tmp1_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (lbrow, LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoard));
		_tmp2_ = _tmp1_;
		_tmp3_ = _g_object_ref0 (_tmp2_);
		_g_object_unref0 (item1);
		item1 = _tmp3_;
		_tmp4_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (lbbefore, LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoard));
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (item2);
		item2 = _tmp6_;
	} else {
		ObjectsItem* _tmp7_;
		ObjectsItem* _tmp8_;
		ObjectsItem* _tmp9_;
		ObjectsItem* _tmp10_;
		ObjectsItem* _tmp11_;
		ObjectsItem* _tmp12_;
		_tmp7_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (lbrow, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
		_tmp8_ = _tmp7_;
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (item1);
		item1 = _tmp9_;
		_tmp10_ = layouts_item_base_get_item ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (lbbefore, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
		_tmp11_ = _tmp10_;
		_tmp12_ = _g_object_ref0 (_tmp11_);
		_g_object_unref0 (item2);
		item2 = _tmp12_;
	}
	_tmp13_ = util_get_default ();
	_tmp14_ = _tmp13_;
	_tmp15_ = item1;
	_tmp16_ = item2;
	_tmp17_ = self->priv->_item_parent;
	_tmp18_ = objects_item_get_project (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = objects_project_get_sorted_by (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = self->priv->_item_parent;
	_tmp23_ = objects_item_get_project (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = objects_project_get_sort_order (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = util_set_item_sort_func (_tmp14_, _tmp15_, _tmp16_, _tmp21_, _tmp26_);
	_g_object_unref0 (_tmp14_);
	result = _tmp27_;
	_g_object_unref0 (item2);
	_g_object_unref0 (item1);
	return result;
}

void
widgets_sub_items_prepare_new_item (WidgetsSubItems* self,
                                    const gchar* content)
{
	DialogsQuickAdd* dialog = NULL;
	DialogsQuickAdd* _tmp0_;
	ObjectsItem* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = dialogs_quick_add_new ();
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	_tmp1_ = self->priv->_item_parent;
	dialogs_quick_add_for_base_object (dialog, (ObjectsBaseObject*) _tmp1_);
	dialogs_quick_add_update_content (dialog, content);
	_tmp2_ = planify__instance;
	_tmp3_ = _tmp2_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp3_);
	_g_object_unref0 (dialog);
}

void
widgets_sub_items_clean_up (WidgetsSubItems* self)
{
	GtkListBox* _tmp0_;
	Util* _tmp1_;
	Util* _tmp2_;
	GtkListBox* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	Util* _tmp8_;
	Util* _tmp9_;
	GtkListBox* _tmp10_;
	GList* _tmp11_;
	GList* _tmp12_;
	GeeHashMap* _tmp40_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox;
	gtk_list_box_set_sort_func (_tmp0_, NULL, NULL, NULL);
	_tmp1_ = util_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->listbox;
	_tmp4_ = util_get_children (_tmp2_, _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp5_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp6_;
			GtkListBoxRow* row = NULL;
			_tmp6_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp6_;
			{
				GtkListBoxRow* _tmp7_;
				_tmp7_ = row;
				layouts_item_base_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	_tmp8_ = util_get_default ();
	_tmp9_ = _tmp8_;
	_tmp10_ = self->priv->checked_listbox;
	_tmp11_ = util_get_children (_tmp9_, _tmp10_);
	_tmp12_ = _tmp11_;
	_g_object_unref0 (_tmp9_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp12_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp13_;
			GtkListBoxRow* row = NULL;
			_tmp13_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp13_;
			{
				GtkListBoxRow* _tmp14_;
				_tmp14_ = row;
				layouts_item_base_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp15_;
		GeeSet* _tmp16_;
		GeeSet* _tmp17_;
		GeeSet* _tmp18_;
		GeeIterator* _tmp19_;
		GeeIterator* _tmp20_;
		_tmp15_ = self->priv->signal_map;
		_tmp16_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = _tmp17_;
		_tmp19_ = gee_iterable_iterator ((GeeIterable*) _tmp18_);
		_tmp20_ = _tmp19_;
		_g_object_unref0 (_tmp18_);
		_entry_it = _tmp20_;
		while (TRUE) {
			GeeIterator* _tmp21_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp22_;
			gpointer _tmp23_;
			gboolean _tmp24_ = FALSE;
			GeeMapEntry* _tmp25_;
			gconstpointer _tmp26_;
			gconstpointer _tmp27_;
			_tmp21_ = _entry_it;
			if (!gee_iterator_next (_tmp21_)) {
				break;
			}
			_tmp22_ = _entry_it;
			_tmp23_ = gee_iterator_get (_tmp22_);
			entry = (GeeMapEntry*) _tmp23_;
			_tmp25_ = entry;
			_tmp26_ = gee_map_entry_get_value (_tmp25_);
			_tmp27_ = _tmp26_;
			if (((GObject*) _tmp27_) != NULL) {
				GeeMapEntry* _tmp28_;
				gconstpointer _tmp29_;
				gconstpointer _tmp30_;
				GeeMapEntry* _tmp31_;
				gconstpointer _tmp32_;
				gconstpointer _tmp33_;
				_tmp28_ = entry;
				_tmp29_ = gee_map_entry_get_value (_tmp28_);
				_tmp30_ = _tmp29_;
				_tmp31_ = entry;
				_tmp32_ = gee_map_entry_get_key (_tmp31_);
				_tmp33_ = _tmp32_;
				_tmp24_ = g_signal_handler_is_connected ((GObject*) _tmp30_, (gulong) ((guintptr) _tmp33_));
			} else {
				_tmp24_ = FALSE;
			}
			if (_tmp24_) {
				GeeMapEntry* _tmp34_;
				gconstpointer _tmp35_;
				gconstpointer _tmp36_;
				GeeMapEntry* _tmp37_;
				gconstpointer _tmp38_;
				gconstpointer _tmp39_;
				_tmp34_ = entry;
				_tmp35_ = gee_map_entry_get_value (_tmp34_);
				_tmp36_ = _tmp35_;
				_tmp37_ = entry;
				_tmp38_ = gee_map_entry_get_key (_tmp37_);
				_tmp39_ = _tmp38_;
				g_signal_handler_disconnect ((GObject*) _tmp36_, (gulong) ((guintptr) _tmp39_));
			}
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp40_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp40_);
}

void
widgets_sub_items_disable_drag_and_drop (WidgetsSubItems* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _row_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->items_map;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_row_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			LayoutsItemBase* row = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			LayoutsItemBase* _tmp9_;
			_tmp6_ = _row_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _row_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			row = (LayoutsItemBase*) _tmp8_;
			_tmp9_ = row;
			layouts_item_row_disable_drag_and_drop (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
			_g_object_unref0 (row);
		}
		_g_object_unref0 (_row_it);
	}
}

static GtkWidget*
widgets_sub_items_get_placeholder (WidgetsSubItems* self)
{
	GtkLabel* message_label = NULL;
	GtkLabel* _tmp0_ = NULL;
	AdwBin* placeholder_grid = NULL;
	GtkWidget* _tmp1_;
	AdwBin* _tmp2_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("No subtasks added yet. Get started!"));
	gtk_label_set_wrap (_tmp0_, TRUE);
	gtk_label_set_justify (_tmp0_, GTK_JUSTIFY_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 24);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 24);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 24);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 24);
	g_object_ref_sink (_tmp0_);
	message_label = _tmp0_;
	_tmp1_ = _g_object_ref0 ((GtkWidget*) message_label);
	_tmp2_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp2_, 6);
	adw_bin_set_child (_tmp2_, _tmp1_);
	_g_object_unref0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	placeholder_grid = _tmp2_;
	gtk_widget_add_css_class ((GtkWidget*) placeholder_grid, "card");
	result = (GtkWidget*) placeholder_grid;
	_g_object_unref0 (message_label);
	return result;
}

gboolean
widgets_sub_items_get_is_board (WidgetsSubItems* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_board;
	return result;
}

static void
widgets_sub_items_set_is_board (WidgetsSubItems* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_sub_items_get_is_board (self);
	if (old_value != value) {
		self->priv->_is_board = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY]);
	}
}

gboolean
widgets_sub_items_get_is_project_view (WidgetsSubItems* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_project_view;
	return result;
}

static void
widgets_sub_items_set_is_project_view (WidgetsSubItems* self,
                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_sub_items_get_is_project_view (self);
	if (old_value != value) {
		self->priv->_is_project_view = value;
		g_object_notify_by_pspec ((GObject *) self, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY]);
	}
}

ObjectsItem*
widgets_sub_items_get_item_parent (WidgetsSubItems* self)
{
	ObjectsItem* result;
	ObjectsItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item_parent;
	result = _tmp0_;
	return result;
}

void
widgets_sub_items_set_item_parent (WidgetsSubItems* self,
                                   ObjectsItem* value)
{
	ObjectsItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_sub_items_get_item_parent (self);
	if (old_value != value) {
		ObjectsItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_item_parent);
		self->priv->_item_parent = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY]);
	}
}

gboolean
widgets_sub_items_get_has_children (WidgetsSubItems* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->items_map;
	_tmp2_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp4_ = FALSE;
		GeeHashMap* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp5_ = self->items_checked;
		_tmp6_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ > 0) {
			gboolean _tmp8_;
			gboolean _tmp9_;
			_tmp8_ = widgets_sub_items_get_show_completed (self);
			_tmp9_ = _tmp8_;
			_tmp4_ = _tmp9_;
		} else {
			_tmp4_ = FALSE;
		}
		_tmp0_ = _tmp4_;
	}
	result = _tmp0_;
	return result;
}

gboolean
widgets_sub_items_get_show_completed (WidgetsSubItems* self)
{
	gboolean result;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = g_settings_get_boolean (_tmp2_, "always-show-completed-subtasks");
	_g_object_unref0 (_tmp1_);
	if (_tmp3_) {
		result = TRUE;
		return result;
	} else {
		ObjectsItem* _tmp4_;
		ObjectsProject* _tmp5_;
		ObjectsProject* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp4_ = self->priv->_item_parent;
		_tmp5_ = objects_item_get_project (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = objects_project_get_show_completed (_tmp6_);
		_tmp8_ = _tmp7_;
		result = _tmp8_;
		return result;
	}
}

gboolean
widgets_sub_items_get_reveal_child (WidgetsSubItems* self)
{
	gboolean result;
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->main_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
widgets_sub_items_set_reveal_child (WidgetsSubItems* self,
                                    gboolean value)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY]);
}

static GObject *
widgets_sub_items_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsSubItems * self;
	GtkLabel* sub_tasks_title = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar** _tmp5_;
	WidgetsLoadingButton* _tmp6_ = NULL;
	GtkBox* sub_tasks_header = NULL;
	GtkBox* _tmp7_ = NULL;
	GtkBox* _tmp8_;
	GtkLabel* _tmp9_;
	GtkBox* _tmp10_;
	WidgetsLoadingButton* _tmp11_;
	gboolean _tmp12_;
	GtkBox* _tmp13_;
	GtkWidget* _tmp14_;
	GtkRevealer* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	gboolean _tmp17_;
	gint _tmp18_ = 0;
	gboolean _tmp19_;
	gchar* _tmp20_;
	gchar** _tmp21_;
	GtkListBox* _tmp22_ = NULL;
	gboolean _tmp23_;
	gint _tmp27_ = 0;
	gboolean _tmp28_;
	gint _tmp29_ = 0;
	gboolean _tmp30_;
	gchar* _tmp31_;
	gchar** _tmp32_;
	GtkListBox* _tmp33_ = NULL;
	GtkButton* _tmp34_ = NULL;
	GtkButton* _tmp35_;
	GtkButton* _tmp36_;
	GtkWidget* _tmp37_;
	GtkRevealer* _tmp38_ = NULL;
	GtkBox* checked_listbox_container = NULL;
	GtkBox* _tmp39_;
	GtkBox* _tmp40_;
	GtkListBox* _tmp41_;
	GtkBox* _tmp42_;
	GtkRevealer* _tmp43_;
	GtkBox* _tmp44_;
	GtkWidget* _tmp45_;
	GtkRevealer* _tmp46_ = NULL;
	GtkBox* main_grid = NULL;
	GtkBox* _tmp47_ = NULL;
	GtkBox* _tmp48_;
	GtkRevealer* _tmp49_;
	GtkBox* _tmp50_;
	GtkListBox* _tmp51_;
	GtkBox* _tmp52_;
	GtkRevealer* _tmp53_;
	GtkBox* _tmp54_;
	GtkWidget* _tmp55_;
	GtkRevealer* _tmp56_ = NULL;
	GtkRevealer* _tmp57_;
	parent_class = G_OBJECT_CLASS (widgets_sub_items_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItems);
	_tmp0_ = g_strdup ("heading");
	_tmp1_ = g_strdup ("h4");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_ ("Sub-tasks"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp3_);
	sub_tasks_title = _tmp3_;
	_tmp4_ = g_strdup ("flat");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	_tmp6_ = widgets_loading_button_new_with_icon ("plus-large-symbolic", 16);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->add_button);
	self->add_button = _tmp6_;
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp7_, 9);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp7_, 9);
	g_object_ref_sink (_tmp7_);
	sub_tasks_header = _tmp7_;
	_tmp8_ = sub_tasks_header;
	_tmp9_ = sub_tasks_title;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = sub_tasks_header;
	_tmp11_ = self->add_button;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->_is_board;
	_tmp13_ = sub_tasks_header;
	_tmp14_ = _g_object_ref0 ((GtkWidget*) _tmp13_);
	_tmp15_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp15_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp15_, _tmp12_);
	gtk_revealer_set_child (_tmp15_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->sub_tasks_header_revealer);
	self->priv->sub_tasks_header_revealer = _tmp15_;
	_tmp17_ = self->priv->_is_board;
	if (_tmp17_) {
		_tmp16_ = 6;
	} else {
		_tmp16_ = 0;
	}
	_tmp19_ = self->priv->_is_board;
	if (_tmp19_) {
		_tmp18_ = 9;
	} else {
		_tmp18_ = 0;
	}
	_tmp20_ = g_strdup ("listbox-background");
	_tmp21_ = g_new0 (gchar*, 1 + 1);
	_tmp21_[0] = _tmp20_;
	_tmp22_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp22_, GTK_ALIGN_START);
	gtk_list_box_set_activate_on_single_click (_tmp22_, TRUE);
	gtk_list_box_set_selection_mode (_tmp22_, GTK_SELECTION_SINGLE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp22_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp22_, _tmp21_);
	_tmp21_ = (_vala_array_free (_tmp21_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp22_, _tmp16_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp22_, _tmp18_);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp22_;
	_tmp23_ = self->priv->_is_board;
	if (_tmp23_) {
		GtkListBox* _tmp24_;
		GtkWidget* _tmp25_;
		GtkWidget* _tmp26_;
		_tmp24_ = self->priv->listbox;
		_tmp25_ = widgets_sub_items_get_placeholder (self);
		_tmp26_ = _tmp25_;
		gtk_list_box_set_placeholder (_tmp24_, _tmp26_);
		_g_object_unref0 (_tmp26_);
	}
	_tmp28_ = self->priv->_is_board;
	if (_tmp28_) {
		_tmp27_ = 6;
	} else {
		_tmp27_ = 0;
	}
	_tmp30_ = self->priv->_is_board;
	if (_tmp30_) {
		_tmp29_ = 12;
	} else {
		_tmp29_ = 0;
	}
	_tmp31_ = g_strdup ("listbox-background");
	_tmp32_ = g_new0 (gchar*, 1 + 1);
	_tmp32_[0] = _tmp31_;
	_tmp33_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp33_, GTK_ALIGN_START);
	gtk_list_box_set_activate_on_single_click (_tmp33_, TRUE);
	gtk_list_box_set_selection_mode (_tmp33_, GTK_SELECTION_SINGLE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp33_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp33_, _tmp32_);
	_tmp32_ = (_vala_array_free (_tmp32_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp33_, _tmp27_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp33_, _tmp29_);
	g_object_ref_sink (_tmp33_);
	_g_object_unref0 (self->priv->checked_listbox);
	self->priv->checked_listbox = _tmp33_;
	_tmp34_ = (GtkButton*) gtk_button_new_with_label ("Cargar más");
	gtk_widget_set_halign ((GtkWidget*) _tmp34_, GTK_ALIGN_START);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp34_, 9);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->load_more_button);
	self->priv->load_more_button = _tmp34_;
	_tmp35_ = self->priv->load_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp35_, "flat");
	_tmp36_ = self->priv->load_more_button;
	_tmp37_ = _g_object_ref0 ((GtkWidget*) _tmp36_);
	_tmp38_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp38_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp38_, FALSE);
	gtk_revealer_set_child (_tmp38_, _tmp37_);
	_g_object_unref0 (_tmp37_);
	g_object_ref_sink (_tmp38_);
	_g_object_unref0 (self->priv->load_more_button_revealer);
	self->priv->load_more_button_revealer = _tmp38_;
	_tmp39_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp39_);
	checked_listbox_container = _tmp39_;
	_tmp40_ = checked_listbox_container;
	_tmp41_ = self->priv->checked_listbox;
	gtk_box_append (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = checked_listbox_container;
	_tmp43_ = self->priv->load_more_button_revealer;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = checked_listbox_container;
	_tmp45_ = _g_object_ref0 ((GtkWidget*) _tmp44_);
	_tmp46_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp46_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp46_, _tmp45_);
	_g_object_unref0 (_tmp45_);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->checked_revealer);
	self->priv->checked_revealer = _tmp46_;
	_tmp47_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp47_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp47_, 3);
	g_object_ref_sink (_tmp47_);
	main_grid = _tmp47_;
	_tmp48_ = main_grid;
	_tmp49_ = self->priv->sub_tasks_header_revealer;
	gtk_box_append (_tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = main_grid;
	_tmp51_ = self->priv->listbox;
	gtk_box_append (_tmp50_, (GtkWidget*) _tmp51_);
	_tmp52_ = main_grid;
	_tmp53_ = self->priv->checked_revealer;
	gtk_box_append (_tmp52_, (GtkWidget*) _tmp53_);
	_tmp54_ = main_grid;
	_tmp55_ = _g_object_ref0 ((GtkWidget*) _tmp54_);
	_tmp56_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp56_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp56_, _tmp55_);
	_g_object_unref0 (_tmp55_);
	g_object_ref_sink (_tmp56_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp56_;
	_tmp57_ = self->priv->main_revealer;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp57_);
	_g_object_unref0 (main_grid);
	_g_object_unref0 (checked_listbox_container);
	_g_object_unref0 (sub_tasks_header);
	_g_object_unref0 (sub_tasks_title);
	return obj;
}

static void
widgets_sub_items_class_init (WidgetsSubItemsClass * klass,
                              gpointer klass_data)
{
	widgets_sub_items_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsSubItems_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_sub_items_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_sub_items_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_sub_items_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_sub_items_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY] = g_param_spec_boolean ("is-board", "is-board", "is-board", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY] = g_param_spec_boolean ("is-project-view", "is-project-view", "is-project-view", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY] = g_param_spec_object ("item-parent", "item-parent", "item-parent", OBJECTS_TYPE_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_HAS_CHILDREN_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_HAS_CHILDREN_PROPERTY] = g_param_spec_boolean ("has-children", "has-children", "has-children", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_SHOW_COMPLETED_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_SHOW_COMPLETED_PROPERTY] = g_param_spec_boolean ("show-completed", "show-completed", "show-completed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY, widgets_sub_items_properties[WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY] = g_param_spec_boolean ("reveal-child", "reveal-child", "reveal-child", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	widgets_sub_items_signals[WIDGETS_SUB_ITEMS_CHILDREN_CHANGES_SIGNAL] = g_signal_new ("children-changes", WIDGETS_TYPE_SUB_ITEMS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_sub_items_instance_init (WidgetsSubItems * self,
                                 gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	self->priv = widgets_sub_items_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_ITEM_BASE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->items_map = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_ITEM_BASE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->items_checked = _tmp2_;
	self->priv->completed_page_index = 0;
}

static void
widgets_sub_items_finalize (GObject * obj)
{
	WidgetsSubItems * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItems);
	g_debug ("SubItems.vala:88: Destroying - Widgets.SubItems\n");
	_g_object_unref0 (self->priv->_item_parent);
	_g_object_unref0 (self->priv->sub_tasks_header_revealer);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->checked_listbox);
	_g_object_unref0 (self->priv->load_more_button);
	_g_object_unref0 (self->priv->load_more_button_revealer);
	_g_object_unref0 (self->priv->checked_revealer);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->add_button);
	_g_object_unref0 (self->priv->signal_map);
	_g_object_unref0 (self->items_map);
	_g_object_unref0 (self->items_checked);
	_g_object_unref0 (self->priv->completed_items_list);
	G_OBJECT_CLASS (widgets_sub_items_parent_class)->finalize (obj);
}

static GType
widgets_sub_items_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsSubItemsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_sub_items_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsSubItems), 0, (GInstanceInitFunc) widgets_sub_items_instance_init, NULL };
	GType widgets_sub_items_type_id;
	widgets_sub_items_type_id = g_type_register_static (adw_bin_get_type (), "WidgetsSubItems", &g_define_type_info, 0);
	WidgetsSubItems_private_offset = g_type_add_instance_private (widgets_sub_items_type_id, sizeof (WidgetsSubItemsPrivate));
	return widgets_sub_items_type_id;
}

GType
widgets_sub_items_get_type (void)
{
	static volatile gsize widgets_sub_items_type_id__once = 0;
	if (g_once_init_enter (&widgets_sub_items_type_id__once)) {
		GType widgets_sub_items_type_id;
		widgets_sub_items_type_id = widgets_sub_items_get_type_once ();
		g_once_init_leave (&widgets_sub_items_type_id__once, widgets_sub_items_type_id);
	}
	return widgets_sub_items_type_id__once;
}

static void
_vala_widgets_sub_items_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	WidgetsSubItems * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItems);
	switch (property_id) {
		case WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY:
		g_value_set_boolean (value, widgets_sub_items_get_is_board (self));
		break;
		case WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY:
		g_value_set_boolean (value, widgets_sub_items_get_is_project_view (self));
		break;
		case WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY:
		g_value_set_object (value, widgets_sub_items_get_item_parent (self));
		break;
		case WIDGETS_SUB_ITEMS_HAS_CHILDREN_PROPERTY:
		g_value_set_boolean (value, widgets_sub_items_get_has_children (self));
		break;
		case WIDGETS_SUB_ITEMS_SHOW_COMPLETED_PROPERTY:
		g_value_set_boolean (value, widgets_sub_items_get_show_completed (self));
		break;
		case WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY:
		g_value_set_boolean (value, widgets_sub_items_get_reveal_child (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_sub_items_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	WidgetsSubItems * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_SUB_ITEMS, WidgetsSubItems);
	switch (property_id) {
		case WIDGETS_SUB_ITEMS_IS_BOARD_PROPERTY:
		widgets_sub_items_set_is_board (self, g_value_get_boolean (value));
		break;
		case WIDGETS_SUB_ITEMS_IS_PROJECT_VIEW_PROPERTY:
		widgets_sub_items_set_is_project_view (self, g_value_get_boolean (value));
		break;
		case WIDGETS_SUB_ITEMS_ITEM_PARENT_PROPERTY:
		widgets_sub_items_set_item_parent (self, g_value_get_object (value));
		break;
		case WIDGETS_SUB_ITEMS_REVEAL_CHILD_PROPERTY:
		widgets_sub_items_set_reveal_child (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

