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

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

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

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

#define DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE (dialogs_preferences_pages_base_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePage))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))

typedef struct _DialogsPreferencesPagesBasePage DialogsPreferencesPagesBasePage;
typedef struct _DialogsPreferencesPagesBasePageClass DialogsPreferencesPagesBasePageClass;
typedef struct _DialogsPreferencesPagesBasePagePrivate DialogsPreferencesPagesBasePagePrivate;

#define DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW (dialogs_preferences_pages_home_view_get_type ())
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, DialogsPreferencesPagesHomeView))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, DialogsPreferencesPagesHomeViewClass))
#define DIALOGS_PREFERENCES_PAGES_IS_HOME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW))
#define DIALOGS_PREFERENCES_PAGES_IS_HOME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, DialogsPreferencesPagesHomeViewClass))

typedef struct _DialogsPreferencesPagesHomeView DialogsPreferencesPagesHomeView;
typedef struct _DialogsPreferencesPagesHomeViewClass DialogsPreferencesPagesHomeViewClass;
typedef struct _DialogsPreferencesPagesHomeViewPrivate DialogsPreferencesPagesHomeViewPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_home_view_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW (dialogs_preferences_pages_home_view_home_view_row_get_type ())
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRow))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRowClass))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_IS_HOME_VIEW_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_IS_HOME_VIEW_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW))
#define DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRowClass))

typedef struct _DialogsPreferencesPagesHomeViewHomeViewRow DialogsPreferencesPagesHomeViewHomeViewRow;
typedef struct _DialogsPreferencesPagesHomeViewHomeViewRowClass DialogsPreferencesPagesHomeViewHomeViewRowClass;
typedef struct _DialogsPreferencesPagesHomeViewHomeViewRowPrivate DialogsPreferencesPagesHomeViewHomeViewRowPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GROUP_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_TOGGLED_SIGNAL,
	DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_NUM_SIGNALS
};
static guint dialogs_preferences_pages_home_view_home_view_row_signals[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_NUM_SIGNALS] = {0};
typedef struct _Block101Data Block101Data;
typedef struct _Block102Data Block102Data;

struct _DialogsPreferencesPagesBasePage {
	AdwNavigationPage parent_instance;
	DialogsPreferencesPagesBasePagePrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesBasePageClass {
	AdwNavigationPageClass parent_class;
	void (*clean_up) (DialogsPreferencesPagesBasePage* self);
};

struct _DialogsPreferencesPagesHomeView {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesHomeViewPrivate * priv;
};

struct _DialogsPreferencesPagesHomeViewClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesHomeViewHomeViewRow {
	GtkListBoxRow parent_instance;
	DialogsPreferencesPagesHomeViewHomeViewRowPrivate * priv;
	GtkCheckButton* radio_button;
};

struct _DialogsPreferencesPagesHomeViewHomeViewRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DialogsPreferencesPagesHomeViewHomeViewRowPrivate {
	ObjectsBaseObject* _base_object;
};

struct _Block101Data {
	int _ref_count_;
	DialogsPreferencesPagesHomeView* self;
	ObjectsBaseObject* object;
};

struct _Block102Data {
	int _ref_count_;
	DialogsPreferencesPagesHomeView* self;
	ObjectsProject* project;
};

static gpointer dialogs_preferences_pages_home_view_parent_class = NULL;
static gint DialogsPreferencesPagesHomeViewHomeViewRow_private_offset;
static gpointer dialogs_preferences_pages_home_view_home_view_row_parent_class = NULL;

VALA_EXTERN GType dialogs_preferences_pages_base_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBasePage, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_home_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesHomeView, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesHomeView* dialogs_preferences_pages_home_view_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesHomeView* dialogs_preferences_pages_home_view_construct (GType object_type,
                                                                                AdwPreferencesDialog* preferences_dialog);
static void dialogs_preferences_pages_home_view_real_clean_up (DialogsPreferencesPagesBasePage* base);
VALA_EXTERN GType dialogs_preferences_pages_home_view_home_view_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesHomeViewHomeViewRow, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesHomeViewHomeViewRow* dialogs_preferences_pages_home_view_home_view_row_new (ObjectsBaseObject* base_object);
VALA_EXTERN DialogsPreferencesPagesHomeViewHomeViewRow* dialogs_preferences_pages_home_view_home_view_row_construct (GType object_type,
                                                                                                         ObjectsBaseObject* base_object);
VALA_EXTERN ObjectsBaseObject* dialogs_preferences_pages_home_view_home_view_row_get_base_object (DialogsPreferencesPagesHomeViewHomeViewRow* self);
static void dialogs_preferences_pages_home_view_home_view_row_set_base_object (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                                        ObjectsBaseObject* value);
VALA_EXTERN void dialogs_preferences_pages_home_view_home_view_row_set_group (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                                  GtkCheckButton* value);
VALA_EXTERN gboolean dialogs_preferences_pages_home_view_home_view_row_get_active (DialogsPreferencesPagesHomeViewHomeViewRow* self);
VALA_EXTERN void dialogs_preferences_pages_home_view_home_view_row_set_active (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                                   gboolean value);
static GObject * dialogs_preferences_pages_home_view_home_view_row_constructor (GType type,
                                                                         guint n_construct_properties,
                                                                         GObjectConstructParam * construct_properties);
static void _dialogs_preferences_pages_home_view_home_view_row___lambda343_ (DialogsPreferencesPagesHomeViewHomeViewRow* self);
static void __dialogs_preferences_pages_home_view_home_view_row___lambda343__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                                  gint n_press,
                                                                                                  gdouble x,
                                                                                                  gdouble y,
                                                                                                  gpointer self);
static void _dialogs_preferences_pages_home_view_home_view_row___lambda344_ (DialogsPreferencesPagesHomeViewHomeViewRow* self);
static void __dialogs_preferences_pages_home_view_home_view_row___lambda344__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                                                gpointer self);
static void dialogs_preferences_pages_home_view_home_view_row_finalize (GObject * obj);
static GType dialogs_preferences_pages_home_view_home_view_row_get_type_once (void);
static void _vala_dialogs_preferences_pages_home_view_home_view_row_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_home_view_home_view_row_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static GObject * dialogs_preferences_pages_home_view_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties);
static Block101Data* block101_data_ref (Block101Data* _data101_);
static void block101_data_unref (void * _userdata_);
static void _dialogs_preferences_pages_home_view_____lambda345_ (Block101Data* _data101_);
static void __dialogs_preferences_pages_home_view_____lambda345__dialogs_preferences_pages_home_view_home_view_row_toggled (DialogsPreferencesPagesHomeViewHomeViewRow* _sender,
                                                                                                                     gpointer self);
static Block102Data* block102_data_ref (Block102Data* _data102_);
static void block102_data_unref (void * _userdata_);
static void _dialogs_preferences_pages_home_view_______lambda346_ (Block102Data* _data102_);
static void __dialogs_preferences_pages_home_view_______lambda346__dialogs_preferences_pages_home_view_home_view_row_toggled (DialogsPreferencesPagesHomeViewHomeViewRow* _sender,
                                                                                                                       gpointer self);
static void _dialogs_preferences_pages_home_view___lambda347_ (DialogsPreferencesPagesHomeView* self);
static void __dialogs_preferences_pages_home_view___lambda347__gtk_widget_destroy (GtkWidget* _sender,
                                                                            gpointer self);
static void dialogs_preferences_pages_home_view_finalize (GObject * obj);
static GType dialogs_preferences_pages_home_view_get_type_once (void);
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);

DialogsPreferencesPagesHomeView*
dialogs_preferences_pages_home_view_construct (GType object_type,
                                               AdwPreferencesDialog* preferences_dialog)
{
	DialogsPreferencesPagesHomeView * self = NULL;
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	self = (DialogsPreferencesPagesHomeView*) g_object_new (object_type, "preferences-dialog", preferences_dialog, "title", _ ("Home View"), NULL);
	return self;
}

DialogsPreferencesPagesHomeView*
dialogs_preferences_pages_home_view_new (AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_home_view_construct (DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, preferences_dialog);
}

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

static inline gpointer
dialogs_preferences_pages_home_view_home_view_row_get_instance_private (DialogsPreferencesPagesHomeViewHomeViewRow* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesHomeViewHomeViewRow_private_offset);
}

DialogsPreferencesPagesHomeViewHomeViewRow*
dialogs_preferences_pages_home_view_home_view_row_construct (GType object_type,
                                                             ObjectsBaseObject* base_object)
{
	DialogsPreferencesPagesHomeViewHomeViewRow * self = NULL;
	g_return_val_if_fail (base_object != NULL, NULL);
	self = (DialogsPreferencesPagesHomeViewHomeViewRow*) g_object_new (object_type, "base-object", base_object, NULL);
	return self;
}

DialogsPreferencesPagesHomeViewHomeViewRow*
dialogs_preferences_pages_home_view_home_view_row_new (ObjectsBaseObject* base_object)
{
	return dialogs_preferences_pages_home_view_home_view_row_construct (DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, base_object);
}

ObjectsBaseObject*
dialogs_preferences_pages_home_view_home_view_row_get_base_object (DialogsPreferencesPagesHomeViewHomeViewRow* self)
{
	ObjectsBaseObject* result;
	ObjectsBaseObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_base_object;
	result = _tmp0_;
	return result;
}

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

static void
dialogs_preferences_pages_home_view_home_view_row_set_base_object (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                                   ObjectsBaseObject* value)
{
	ObjectsBaseObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_home_view_home_view_row_get_base_object (self);
	if (old_value != value) {
		ObjectsBaseObject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_base_object);
		self->priv->_base_object = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY]);
	}
}

void
dialogs_preferences_pages_home_view_home_view_row_set_group (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                             GtkCheckButton* value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->radio_button;
	gtk_check_button_set_group (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GROUP_PROPERTY]);
}

gboolean
dialogs_preferences_pages_home_view_home_view_row_get_active (DialogsPreferencesPagesHomeViewHomeViewRow* self)
{
	gboolean result;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->radio_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
dialogs_preferences_pages_home_view_home_view_row_set_active (DialogsPreferencesPagesHomeViewHomeViewRow* self,
                                                              gboolean value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->radio_button;
	gtk_check_button_set_active (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY]);
}

static void
_dialogs_preferences_pages_home_view_home_view_row___lambda343_ (DialogsPreferencesPagesHomeViewHomeViewRow* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->radio_button;
	_tmp1_ = self->radio_button;
	_tmp2_ = gtk_check_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_check_button_set_active (_tmp0_, !_tmp3_);
	g_signal_emit (self, dialogs_preferences_pages_home_view_home_view_row_signals[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_TOGGLED_SIGNAL], 0);
}

static void
__dialogs_preferences_pages_home_view_home_view_row___lambda343__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                             gint n_press,
                                                                                             gdouble x,
                                                                                             gdouble y,
                                                                                             gpointer self)
{
	_dialogs_preferences_pages_home_view_home_view_row___lambda343_ ((DialogsPreferencesPagesHomeViewHomeViewRow*) self);
}

static void
_dialogs_preferences_pages_home_view_home_view_row___lambda344_ (DialogsPreferencesPagesHomeViewHomeViewRow* self)
{
	g_signal_emit (self, dialogs_preferences_pages_home_view_home_view_row_signals[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_TOGGLED_SIGNAL], 0);
}

static void
__dialogs_preferences_pages_home_view_home_view_row___lambda344__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                                           gpointer self)
{
	_dialogs_preferences_pages_home_view_home_view_row___lambda344_ ((DialogsPreferencesPagesHomeViewHomeViewRow*) self);
}

static GObject *
dialogs_preferences_pages_home_view_home_view_row_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesHomeViewHomeViewRow * self;
	GtkCheckButton* _tmp0_;
	AdwActionRow* action_row = NULL;
	ObjectsBaseObject* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	AdwActionRow* _tmp5_ = NULL;
	ObjectsBaseObject* _tmp6_;
	AdwActionRow* _tmp18_;
	GtkCheckButton* _tmp19_;
	AdwActionRow* _tmp20_;
	GtkGestureClick* select_gesture = NULL;
	GtkGestureClick* _tmp21_;
	AdwActionRow* _tmp22_;
	GtkGestureClick* _tmp23_;
	GtkEventController* _tmp24_;
	GtkGestureClick* _tmp25_;
	GtkCheckButton* _tmp26_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_home_view_home_view_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRow);
	gtk_widget_add_css_class ((GtkWidget*) self, "sidebar-row");
	gtk_widget_add_css_class ((GtkWidget*) self, "transition");
	gtk_widget_add_css_class ((GtkWidget*) self, "no-padding");
	_tmp0_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->radio_button);
	self->radio_button = _tmp0_;
	_tmp1_ = self->priv->_base_object;
	_tmp2_ = objects_base_object_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	_tmp5_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	adw_preferences_row_set_use_markup ((AdwPreferencesRow*) _tmp5_, FALSE);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp5_, TRUE);
	g_object_ref_sink (_tmp5_);
	action_row = _tmp5_;
	_tmp6_ = self->priv->_base_object;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, OBJECTS_TYPE_PROJECT)) {
		AdwActionRow* _tmp7_;
		ObjectsBaseObject* _tmp8_;
		ObjectsProject* _tmp9_;
		WidgetsIconColorProject* _tmp10_ = NULL;
		WidgetsIconColorProject* _tmp11_;
		_tmp7_ = action_row;
		_tmp8_ = self->priv->_base_object;
		_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, OBJECTS_TYPE_PROJECT, ObjectsProject));
		_tmp10_ = widgets_icon_color_project_new (20);
		widgets_icon_color_project_set_project (_tmp10_, _tmp9_);
		_g_object_unref0 (_tmp9_);
		g_object_ref_sink (_tmp10_);
		_tmp11_ = _tmp10_;
		adw_action_row_add_prefix (_tmp7_, (GtkWidget*) _tmp11_);
		_g_object_unref0 (_tmp11_);
	} else {
		AdwActionRow* _tmp12_;
		ObjectsBaseObject* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		GtkImage* _tmp16_;
		GtkImage* _tmp17_;
		_tmp12_ = action_row;
		_tmp13_ = self->priv->_base_object;
		_tmp14_ = objects_base_object_get_icon_name (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp15_);
		g_object_ref_sink (_tmp16_);
		_tmp17_ = _tmp16_;
		adw_action_row_add_prefix (_tmp12_, (GtkWidget*) _tmp17_);
		_g_object_unref0 (_tmp17_);
	}
	_tmp18_ = action_row;
	_tmp19_ = self->radio_button;
	adw_action_row_add_suffix (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = action_row;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp20_);
	_tmp21_ = (GtkGestureClick*) gtk_gesture_click_new ();
	select_gesture = _tmp21_;
	_tmp22_ = action_row;
	_tmp23_ = select_gesture;
	_tmp24_ = _g_object_ref0 ((GtkEventController*) _tmp23_);
	gtk_widget_add_controller ((GtkWidget*) _tmp22_, _tmp24_);
	_tmp25_ = select_gesture;
	g_signal_connect_object (_tmp25_, "released", (GCallback) __dialogs_preferences_pages_home_view_home_view_row___lambda343__gtk_gesture_click_released, self, 0);
	_tmp26_ = self->radio_button;
	g_signal_connect_object (_tmp26_, "toggled", (GCallback) __dialogs_preferences_pages_home_view_home_view_row___lambda344__gtk_check_button_toggled, self, 0);
	_g_object_unref0 (select_gesture);
	_g_object_unref0 (action_row);
	return obj;
}

static void
dialogs_preferences_pages_home_view_home_view_row_class_init (DialogsPreferencesPagesHomeViewHomeViewRowClass * klass,
                                                              gpointer klass_data)
{
	dialogs_preferences_pages_home_view_home_view_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesHomeViewHomeViewRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_home_view_home_view_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_home_view_home_view_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_home_view_home_view_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_home_view_home_view_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY] = g_param_spec_object ("base-object", "base-object", "base-object", OBJECTS_TYPE_BASE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GROUP_PROPERTY, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GROUP_PROPERTY] = g_param_spec_object ("group", "group", "group", gtk_check_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY, dialogs_preferences_pages_home_view_home_view_row_properties[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	dialogs_preferences_pages_home_view_home_view_row_signals[DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_TOGGLED_SIGNAL] = g_signal_new ("toggled", DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dialogs_preferences_pages_home_view_home_view_row_instance_init (DialogsPreferencesPagesHomeViewHomeViewRow * self,
                                                                 gpointer klass)
{
	self->priv = dialogs_preferences_pages_home_view_home_view_row_get_instance_private (self);
}

static void
dialogs_preferences_pages_home_view_home_view_row_finalize (GObject * obj)
{
	DialogsPreferencesPagesHomeViewHomeViewRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRow);
	g_debug ("HomeView.vala:152: Destroying - HomeViewRown\n");
	_g_object_unref0 (self->priv->_base_object);
	_g_object_unref0 (self->radio_button);
	G_OBJECT_CLASS (dialogs_preferences_pages_home_view_home_view_row_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_home_view_home_view_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesHomeViewHomeViewRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_home_view_home_view_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesHomeViewHomeViewRow), 0, (GInstanceInitFunc) dialogs_preferences_pages_home_view_home_view_row_instance_init, NULL };
	GType dialogs_preferences_pages_home_view_home_view_row_type_id;
	dialogs_preferences_pages_home_view_home_view_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DialogsPreferencesPagesHomeViewHomeViewRow", &g_define_type_info, 0);
	DialogsPreferencesPagesHomeViewHomeViewRow_private_offset = g_type_add_instance_private (dialogs_preferences_pages_home_view_home_view_row_type_id, sizeof (DialogsPreferencesPagesHomeViewHomeViewRowPrivate));
	return dialogs_preferences_pages_home_view_home_view_row_type_id;
}

GType
dialogs_preferences_pages_home_view_home_view_row_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_home_view_home_view_row_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_home_view_home_view_row_type_id__once)) {
		GType dialogs_preferences_pages_home_view_home_view_row_type_id;
		dialogs_preferences_pages_home_view_home_view_row_type_id = dialogs_preferences_pages_home_view_home_view_row_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_home_view_home_view_row_type_id__once, dialogs_preferences_pages_home_view_home_view_row_type_id);
	}
	return dialogs_preferences_pages_home_view_home_view_row_type_id__once;
}

static void
_vala_dialogs_preferences_pages_home_view_home_view_row_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	DialogsPreferencesPagesHomeViewHomeViewRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_home_view_home_view_row_get_base_object (self));
		break;
		case DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY:
		g_value_set_boolean (value, dialogs_preferences_pages_home_view_home_view_row_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_home_view_home_view_row_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	DialogsPreferencesPagesHomeViewHomeViewRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_HOME_VIEW_TYPE_HOME_VIEW_ROW, DialogsPreferencesPagesHomeViewHomeViewRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_BASE_OBJECT_PROPERTY:
		dialogs_preferences_pages_home_view_home_view_row_set_base_object (self, g_value_get_object (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_GROUP_PROPERTY:
		dialogs_preferences_pages_home_view_home_view_row_set_group (self, g_value_get_object (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_HOME_VIEW_HOME_VIEW_ROW_ACTIVE_PROPERTY:
		dialogs_preferences_pages_home_view_home_view_row_set_active (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block101Data*
block101_data_ref (Block101Data* _data101_)
{
	g_atomic_int_inc (&_data101_->_ref_count_);
	return _data101_;
}

static void
block101_data_unref (void * _userdata_)
{
	Block101Data* _data101_;
	_data101_ = (Block101Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data101_->_ref_count_)) {
		DialogsPreferencesPagesHomeView* self;
		self = _data101_->self;
		_g_object_unref0 (_data101_->object);
		_g_object_unref0 (self);
		g_slice_free (Block101Data, _data101_);
	}
}

static void
_dialogs_preferences_pages_home_view_____lambda345_ (Block101Data* _data101_)
{
	DialogsPreferencesPagesHomeView* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	ObjectsBaseObject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	self = _data101_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data101_->object;
	_tmp4_ = objects_base_object_get_view_id (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_string (_tmp2_, "home-view", _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_home_view_____lambda345__dialogs_preferences_pages_home_view_home_view_row_toggled (DialogsPreferencesPagesHomeViewHomeViewRow* _sender,
                                                                                                                gpointer self)
{
	_dialogs_preferences_pages_home_view_____lambda345_ (self);
}

static Block102Data*
block102_data_ref (Block102Data* _data102_)
{
	g_atomic_int_inc (&_data102_->_ref_count_);
	return _data102_;
}

static void
block102_data_unref (void * _userdata_)
{
	Block102Data* _data102_;
	_data102_ = (Block102Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data102_->_ref_count_)) {
		DialogsPreferencesPagesHomeView* self;
		self = _data102_->self;
		_g_object_unref0 (_data102_->project);
		_g_object_unref0 (self);
		g_slice_free (Block102Data, _data102_);
	}
}

static void
_dialogs_preferences_pages_home_view_______lambda346_ (Block102Data* _data102_)
{
	DialogsPreferencesPagesHomeView* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	ObjectsProject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	self = _data102_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data102_->project;
	_tmp4_ = objects_project_get_view_id (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_string (_tmp2_, "home-view", _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_home_view_______lambda346__dialogs_preferences_pages_home_view_home_view_row_toggled (DialogsPreferencesPagesHomeViewHomeViewRow* _sender,
                                                                                                                  gpointer self)
{
	_dialogs_preferences_pages_home_view_______lambda346_ (self);
}

static void
_dialogs_preferences_pages_home_view___lambda347_ (DialogsPreferencesPagesHomeView* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_home_view___lambda347__gtk_widget_destroy (GtkWidget* _sender,
                                                                       gpointer self)
{
	_dialogs_preferences_pages_home_view___lambda347_ ((DialogsPreferencesPagesHomeView*) self);
}

static GObject *
dialogs_preferences_pages_home_view_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesHomeView * self;
	LayoutsHeaderItem* filters_group = NULL;
	LayoutsHeaderItem* _tmp0_ = NULL;
	GtkBox* group_box = NULL;
	GtkBox* _tmp1_ = NULL;
	GtkBox* _tmp2_;
	LayoutsHeaderItem* _tmp3_;
	GtkScrolledWindow* scrolled_window = NULL;
	GtkBox* _tmp4_;
	GtkWidget* _tmp5_;
	GtkScrolledWindow* _tmp6_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp7_;
	AdwToolbarView* _tmp8_;
	AdwHeaderBar* _tmp9_;
	AdwHeaderBar* _tmp10_;
	AdwToolbarView* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	AdwToolbarView* _tmp13_;
	GtkCheckButton* fake_radio = NULL;
	GtkCheckButton* _tmp14_;
	ObjectsBaseObject** filters = NULL;
	ObjectsFiltersInbox* _tmp15_;
	ObjectsFiltersToday* _tmp16_;
	ObjectsFiltersScheduled* _tmp17_;
	ObjectsFiltersPinboard* _tmp18_;
	ObjectsBaseObject** _tmp19_;
	gint filters_length1;
	gint _filters_size_;
	ObjectsBaseObject** _tmp20_;
	gint _tmp20__length1;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_home_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, DialogsPreferencesPagesHomeView);
	_tmp0_ = layouts_header_item_new (_ ("Filters"));
	layouts_header_item_set_card (_tmp0_, TRUE);
	layouts_header_item_set_reveal (_tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	filters_group = _tmp0_;
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp1_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp1_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp1_, 6);
	g_object_ref_sink (_tmp1_);
	group_box = _tmp1_;
	_tmp2_ = group_box;
	_tmp3_ = filters_group;
	gtk_box_append (_tmp2_, (GtkWidget*) _tmp3_);
	_tmp4_ = group_box;
	_tmp5_ = _g_object_ref0 ((GtkWidget*) _tmp4_);
	_tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_set (_tmp6_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp6_, TRUE);
	gtk_scrolled_window_set_child (_tmp6_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	scrolled_window = _tmp6_;
	_tmp7_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp7_);
	toolbar_view = _tmp7_;
	_tmp8_ = toolbar_view;
	_tmp9_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	adw_toolbar_view_add_top_bar (_tmp8_, (GtkWidget*) _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = toolbar_view;
	_tmp12_ = scrolled_window;
	adw_toolbar_view_set_content (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp13_);
	_tmp14_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp14_);
	fake_radio = _tmp14_;
	_tmp15_ = objects_filters_inbox_get_default ();
	_tmp16_ = objects_filters_today_get_default ();
	_tmp17_ = objects_filters_scheduled_get_default ();
	_tmp18_ = objects_filters_pinboard_get_default ();
	_tmp19_ = g_new0 (ObjectsBaseObject*, 4 + 1);
	_tmp19_[0] = (ObjectsBaseObject*) _tmp15_;
	_tmp19_[1] = (ObjectsBaseObject*) _tmp16_;
	_tmp19_[2] = (ObjectsBaseObject*) _tmp17_;
	_tmp19_[3] = (ObjectsBaseObject*) _tmp18_;
	filters = _tmp19_;
	filters_length1 = 4;
	_filters_size_ = filters_length1;
	_tmp20_ = filters;
	_tmp20__length1 = filters_length1;
	{
		ObjectsBaseObject** object_collection = NULL;
		gint object_collection_length1 = 0;
		gint _object_collection_size_ = 0;
		gint object_it = 0;
		object_collection = _tmp20_;
		object_collection_length1 = _tmp20__length1;
		for (object_it = 0; object_it < object_collection_length1; object_it = object_it + 1) {
			ObjectsBaseObject* _tmp21_;
			ObjectsBaseObject* object = NULL;
			_tmp21_ = _g_object_ref0 (object_collection[object_it]);
			object = _tmp21_;
			{
				Block101Data* _data101_;
				DialogsPreferencesPagesHomeViewHomeViewRow* row = NULL;
				ObjectsBaseObject* _tmp22_;
				ServicesSettings* _tmp23_;
				ServicesSettings* _tmp24_;
				gchar* _tmp25_;
				gchar* _tmp26_;
				ObjectsBaseObject* _tmp27_;
				const gchar* _tmp28_;
				const gchar* _tmp29_;
				GtkCheckButton* _tmp30_;
				GtkCheckButton* _tmp31_;
				DialogsPreferencesPagesHomeViewHomeViewRow* _tmp32_ = NULL;
				DialogsPreferencesPagesHomeViewHomeViewRow* _tmp33_;
				GeeHashMap* _tmp34_;
				DialogsPreferencesPagesHomeViewHomeViewRow* _tmp35_;
				gulong _tmp36_;
				DialogsPreferencesPagesHomeViewHomeViewRow* _tmp37_;
				LayoutsHeaderItem* _tmp38_;
				DialogsPreferencesPagesHomeViewHomeViewRow* _tmp39_;
				_data101_ = g_slice_new0 (Block101Data);
				_data101_->_ref_count_ = 1;
				_data101_->self = g_object_ref (self);
				_data101_->object = object;
				_tmp22_ = _data101_->object;
				_tmp23_ = services_settings_get_default ();
				_tmp24_ = _tmp23_;
				_tmp25_ = services_settings_get_string (_tmp24_, "home-view");
				_tmp26_ = _tmp25_;
				_tmp27_ = _data101_->object;
				_tmp28_ = objects_base_object_get_view_id (_tmp27_);
				_tmp29_ = _tmp28_;
				_tmp30_ = fake_radio;
				_tmp31_ = _g_object_ref0 (_tmp30_);
				_tmp32_ = dialogs_preferences_pages_home_view_home_view_row_new (_tmp22_);
				dialogs_preferences_pages_home_view_home_view_row_set_active (_tmp32_, g_strcmp0 (_tmp26_, _tmp29_) == 0);
				dialogs_preferences_pages_home_view_home_view_row_set_group (_tmp32_, _tmp31_);
				_g_object_unref0 (_tmp31_);
				g_object_ref_sink (_tmp32_);
				_tmp33_ = _tmp32_;
				_g_free0 (_tmp26_);
				_g_object_unref0 (_tmp24_);
				row = _tmp33_;
				_tmp34_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
				_tmp35_ = row;
				_tmp36_ = g_signal_connect_data (_tmp35_, "toggled", (GCallback) __dialogs_preferences_pages_home_view_____lambda345__dialogs_preferences_pages_home_view_home_view_row_toggled, block101_data_ref (_data101_), (GClosureNotify) block101_data_unref, 0);
				_tmp37_ = row;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp34_, (gpointer) ((guintptr) _tmp36_), (GObject*) _tmp37_);
				_tmp38_ = filters_group;
				_tmp39_ = row;
				layouts_header_item_add_child (_tmp38_, (GtkWidget*) _tmp39_);
				_g_object_unref0 (row);
				block101_data_unref (_data101_);
				_data101_ = NULL;
			}
		}
	}
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp40_;
		GeeArrayList* _tmp41_;
		GeeArrayList* _tmp42_;
		gint _source_size = 0;
		GeeArrayList* _tmp43_;
		gint _tmp44_;
		gint _tmp45_;
		gint _source_index = 0;
		_tmp40_ = services_store_instance ();
		_tmp41_ = services_store_get_sources (_tmp40_);
		_tmp42_ = _tmp41_;
		_source_list = _tmp42_;
		_tmp43_ = _source_list;
		_tmp44_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp43_);
		_tmp45_ = _tmp44_;
		_source_size = _tmp45_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp46_;
			gint _tmp47_;
			ObjectsSource* source = NULL;
			GeeArrayList* _tmp48_;
			gpointer _tmp49_;
			LayoutsHeaderItem* source_group = NULL;
			ObjectsSource* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			ObjectsSource* _tmp53_;
			gboolean _tmp54_;
			gboolean _tmp55_;
			LayoutsHeaderItem* _tmp56_ = NULL;
			GtkBox* _tmp90_;
			LayoutsHeaderItem* _tmp91_;
			_source_index = _source_index + 1;
			_tmp46_ = _source_index;
			_tmp47_ = _source_size;
			if (!(_tmp46_ < _tmp47_)) {
				break;
			}
			_tmp48_ = _source_list;
			_tmp49_ = gee_abstract_list_get ((GeeAbstractList*) _tmp48_, _source_index);
			source = (ObjectsSource*) _tmp49_;
			_tmp50_ = source;
			_tmp51_ = objects_source_get_display_name (_tmp50_);
			_tmp52_ = _tmp51_;
			_tmp53_ = source;
			_tmp54_ = objects_source_get_is_visible (_tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = layouts_header_item_new (_tmp52_);
			layouts_header_item_set_card (_tmp56_, TRUE);
			layouts_header_item_set_reveal (_tmp56_, _tmp55_);
			g_object_ref_sink (_tmp56_);
			source_group = _tmp56_;
			{
				GeeArrayList* _project_list = NULL;
				ServicesStore* _tmp57_;
				ObjectsSource* _tmp58_;
				const gchar* _tmp59_;
				const gchar* _tmp60_;
				GeeArrayList* _tmp61_;
				gint _project_size = 0;
				GeeArrayList* _tmp62_;
				gint _tmp63_;
				gint _tmp64_;
				gint _project_index = 0;
				_tmp57_ = services_store_instance ();
				_tmp58_ = source;
				_tmp59_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = services_store_get_projects_by_source (_tmp57_, _tmp60_);
				_project_list = _tmp61_;
				_tmp62_ = _project_list;
				_tmp63_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp62_);
				_tmp64_ = _tmp63_;
				_project_size = _tmp64_;
				_project_index = -1;
				while (TRUE) {
					Block102Data* _data102_;
					gint _tmp65_;
					gint _tmp66_;
					GeeArrayList* _tmp67_;
					gpointer _tmp68_;
					ObjectsProject* _tmp69_;
					gboolean _tmp70_;
					gboolean _tmp71_;
					DialogsPreferencesPagesHomeViewHomeViewRow* row = NULL;
					ObjectsProject* _tmp72_;
					ServicesSettings* _tmp73_;
					ServicesSettings* _tmp74_;
					gchar* _tmp75_;
					gchar* _tmp76_;
					ObjectsProject* _tmp77_;
					const gchar* _tmp78_;
					const gchar* _tmp79_;
					GtkCheckButton* _tmp80_;
					GtkCheckButton* _tmp81_;
					DialogsPreferencesPagesHomeViewHomeViewRow* _tmp82_ = NULL;
					DialogsPreferencesPagesHomeViewHomeViewRow* _tmp83_;
					GeeHashMap* _tmp84_;
					DialogsPreferencesPagesHomeViewHomeViewRow* _tmp85_;
					gulong _tmp86_;
					DialogsPreferencesPagesHomeViewHomeViewRow* _tmp87_;
					LayoutsHeaderItem* _tmp88_;
					DialogsPreferencesPagesHomeViewHomeViewRow* _tmp89_;
					_data102_ = g_slice_new0 (Block102Data);
					_data102_->_ref_count_ = 1;
					_data102_->self = g_object_ref (self);
					_project_index = _project_index + 1;
					_tmp65_ = _project_index;
					_tmp66_ = _project_size;
					if (!(_tmp65_ < _tmp66_)) {
						block102_data_unref (_data102_);
						_data102_ = NULL;
						break;
					}
					_tmp67_ = _project_list;
					_tmp68_ = gee_abstract_list_get ((GeeAbstractList*) _tmp67_, _project_index);
					_data102_->project = (ObjectsProject*) _tmp68_;
					_tmp69_ = _data102_->project;
					_tmp70_ = objects_project_get_is_archived (_tmp69_);
					_tmp71_ = _tmp70_;
					if (_tmp71_) {
						block102_data_unref (_data102_);
						_data102_ = NULL;
						continue;
					}
					_tmp72_ = _data102_->project;
					_tmp73_ = services_settings_get_default ();
					_tmp74_ = _tmp73_;
					_tmp75_ = services_settings_get_string (_tmp74_, "home-view");
					_tmp76_ = _tmp75_;
					_tmp77_ = _data102_->project;
					_tmp78_ = objects_project_get_view_id (_tmp77_);
					_tmp79_ = _tmp78_;
					_tmp80_ = fake_radio;
					_tmp81_ = _g_object_ref0 (_tmp80_);
					_tmp82_ = dialogs_preferences_pages_home_view_home_view_row_new ((ObjectsBaseObject*) _tmp72_);
					dialogs_preferences_pages_home_view_home_view_row_set_active (_tmp82_, g_strcmp0 (_tmp76_, _tmp79_) == 0);
					dialogs_preferences_pages_home_view_home_view_row_set_group (_tmp82_, _tmp81_);
					_g_object_unref0 (_tmp81_);
					g_object_ref_sink (_tmp82_);
					_tmp83_ = _tmp82_;
					_g_free0 (_tmp76_);
					_g_object_unref0 (_tmp74_);
					row = _tmp83_;
					_tmp84_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
					_tmp85_ = row;
					_tmp86_ = g_signal_connect_data (_tmp85_, "toggled", (GCallback) __dialogs_preferences_pages_home_view_______lambda346__dialogs_preferences_pages_home_view_home_view_row_toggled, block102_data_ref (_data102_), (GClosureNotify) block102_data_unref, 0);
					_tmp87_ = row;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, (gpointer) ((guintptr) _tmp86_), (GObject*) _tmp87_);
					_tmp88_ = source_group;
					_tmp89_ = row;
					layouts_header_item_add_child (_tmp88_, (GtkWidget*) _tmp89_);
					_g_object_unref0 (row);
					block102_data_unref (_data102_);
					_data102_ = NULL;
				}
				_g_object_unref0 (_project_list);
			}
			_tmp90_ = group_box;
			_tmp91_ = source_group;
			gtk_box_append (_tmp90_, (GtkWidget*) _tmp91_);
			_g_object_unref0 (source_group);
			_g_object_unref0 (source);
		}
	}
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_home_view___lambda347__gtk_widget_destroy, self, 0);
	filters = (_vala_array_free (filters, filters_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (fake_radio);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (group_box);
	_g_object_unref0 (filters_group);
	return obj;
}

static void
dialogs_preferences_pages_home_view_class_init (DialogsPreferencesPagesHomeViewClass * klass,
                                                gpointer klass_data)
{
	dialogs_preferences_pages_home_view_parent_class = g_type_class_peek_parent (klass);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_home_view_real_clean_up;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_home_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_home_view_finalize;
}

static void
dialogs_preferences_pages_home_view_instance_init (DialogsPreferencesPagesHomeView * self,
                                                   gpointer klass)
{
}

static void
dialogs_preferences_pages_home_view_finalize (GObject * obj)
{
	DialogsPreferencesPagesHomeView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_HOME_VIEW, DialogsPreferencesPagesHomeView);
	g_debug ("HomeView.vala:31: Destroying - Dialogs.Preferences.Pages.HomeView\n");
	G_OBJECT_CLASS (dialogs_preferences_pages_home_view_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_home_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesHomeViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_home_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesHomeView), 0, (GInstanceInitFunc) dialogs_preferences_pages_home_view_instance_init, NULL };
	GType dialogs_preferences_pages_home_view_type_id;
	dialogs_preferences_pages_home_view_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesHomeView", &g_define_type_info, 0);
	return dialogs_preferences_pages_home_view_type_id;
}

GType
dialogs_preferences_pages_home_view_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_home_view_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_home_view_type_id__once)) {
		GType dialogs_preferences_pages_home_view_type_id;
		dialogs_preferences_pages_home_view_type_id = dialogs_preferences_pages_home_view_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_home_view_type_id__once, dialogs_preferences_pages_home_view_type_id);
	}
	return dialogs_preferences_pages_home_view_type_id__once;
}

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

