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

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

#include <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include "planify.h"
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <float.h>
#include <math.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_SIDEBAR (dialogs_preferences_pages_sidebar_get_type ())
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, DialogsPreferencesPagesSidebar))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, DialogsPreferencesPagesSidebarClass))
#define DIALOGS_PREFERENCES_PAGES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR))
#define DIALOGS_PREFERENCES_PAGES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, DialogsPreferencesPagesSidebarClass))

typedef struct _DialogsPreferencesPagesSidebar DialogsPreferencesPagesSidebar;
typedef struct _DialogsPreferencesPagesSidebarClass DialogsPreferencesPagesSidebarClass;
typedef struct _DialogsPreferencesPagesSidebarPrivate DialogsPreferencesPagesSidebarPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_sidebar_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW (dialogs_preferences_pages_sidebar_sidebar_row_get_type ())
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRowClass))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_IS_SIDEBAR_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_IS_SIDEBAR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW))
#define DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRowClass))

typedef struct _DialogsPreferencesPagesSidebarSidebarRow DialogsPreferencesPagesSidebarSidebarRow;
typedef struct _DialogsPreferencesPagesSidebarSidebarRowClass DialogsPreferencesPagesSidebarSidebarRowClass;
typedef struct _DialogsPreferencesPagesSidebarSidebarRowPrivate DialogsPreferencesPagesSidebarSidebarRowPrivate;

#define WIDGETS_TYPE_REORDER_CHILD (widgets_reorder_child_get_type ())
#define WIDGETS_REORDER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChild))
#define WIDGETS_REORDER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChildClass))
#define WIDGETS_IS_REORDER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_REORDER_CHILD))
#define WIDGETS_IS_REORDER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_REORDER_CHILD))
#define WIDGETS_REORDER_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChildClass))

typedef struct _WidgetsReorderChild WidgetsReorderChild;
typedef struct _WidgetsReorderChildClass WidgetsReorderChildClass;
enum  {
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_BASE_OBJECT_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ACTIVE_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
typedef struct _Block99Data Block99Data;

#define WIDGETS_TYPE_SCROLLED_WINDOW (widgets_scrolled_window_get_type ())
#define WIDGETS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindow))
#define WIDGETS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))
#define WIDGETS_IS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_IS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_SCROLLED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))

typedef struct _WidgetsScrolledWindow WidgetsScrolledWindow;
typedef struct _WidgetsScrolledWindowClass WidgetsScrolledWindowClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

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

struct _DialogsPreferencesPagesSidebar {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesSidebarPrivate * priv;
};

struct _DialogsPreferencesPagesSidebarClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesSidebarPrivate {
	LayoutsHeaderItem* views_group;
};

struct _DialogsPreferencesPagesSidebarSidebarRow {
	GtkListBoxRow parent_instance;
	DialogsPreferencesPagesSidebarSidebarRowPrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesSidebarSidebarRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DialogsPreferencesPagesSidebarSidebarRowPrivate {
	ObjectsBaseObject* _base_object;
	gchar* _icon;
	gchar* _title;
	WidgetsReorderChild* reorder;
	GtkSwitch* check_button;
	GtkGestureClick* select_gesture;
	GtkRevealer* main_revealer;
	AdwActionRow* action_row;
};

struct _Block99Data {
	int _ref_count_;
	DialogsPreferencesPagesSidebar* self;
	AdwSpinRow* sidebar_width_row;
};

static gint DialogsPreferencesPagesSidebar_private_offset;
static gpointer dialogs_preferences_pages_sidebar_parent_class = NULL;
static gint DialogsPreferencesPagesSidebarSidebarRow_private_offset;
static gpointer dialogs_preferences_pages_sidebar_sidebar_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_sidebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesSidebar, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesSidebar* dialogs_preferences_pages_sidebar_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesSidebar* dialogs_preferences_pages_sidebar_construct (GType object_type,
                                                                             AdwPreferencesDialog* preferences_dialog);
static void dialogs_preferences_pages_sidebar_real_clean_up (DialogsPreferencesPagesBasePage* base);
VALA_EXTERN GType dialogs_preferences_pages_sidebar_sidebar_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesSidebarSidebarRow, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_sidebar_sidebar_row_clean_up (DialogsPreferencesPagesSidebarSidebarRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN GType widgets_reorder_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsReorderChild, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesSidebarSidebarRow* dialogs_preferences_pages_sidebar_sidebar_row_new (ObjectsBaseObject* base_object);
VALA_EXTERN DialogsPreferencesPagesSidebarSidebarRow* dialogs_preferences_pages_sidebar_sidebar_row_construct (GType object_type,
                                                                                                   ObjectsBaseObject* base_object);
static void dialogs_preferences_pages_sidebar_sidebar_row_updateView (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                               GArray* views,
                                                               const gchar* view,
                                                               gboolean active);
static gboolean dialogs_preferences_pages_sidebar_sidebar_row_find_view (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                                  gchar** array,
                                                                  gint array_length1,
                                                                  const gchar* elemento);
static gint dialogs_preferences_pages_sidebar_sidebar_row_find_index (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                               gchar** array,
                                                               gint array_length1,
                                                               const gchar* elemento);
static void dialogs_preferences_pages_sidebar_sidebar_row_update_views_order (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                                       GtkListBox* listbox);
static GArray* dialogs_preferences_pages_sidebar_sidebar_row_get_views_array (DialogsPreferencesPagesSidebarSidebarRow* self);
static void _g_free0_ (gpointer var);
static void _vala_gchar_free_function_content_of (gpointer data);
VALA_EXTERN gboolean dialogs_preferences_pages_sidebar_sidebar_row_get_active (DialogsPreferencesPagesSidebarSidebarRow* self);
VALA_EXTERN ObjectsBaseObject* dialogs_preferences_pages_sidebar_sidebar_row_get_base_object (DialogsPreferencesPagesSidebarSidebarRow* self);
VALA_EXTERN gint dialogs_preferences_pages_sidebar_sidebar_row_item_order (DialogsPreferencesPagesSidebarSidebarRow* self);
static gboolean dialogs_preferences_pages_sidebar_sidebar_row_check_active (DialogsPreferencesPagesSidebarSidebarRow* self);
VALA_EXTERN void widgets_reorder_child_clean_up (WidgetsReorderChild* self);
static void dialogs_preferences_pages_sidebar_sidebar_row_set_base_object (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                                    ObjectsBaseObject* value);
VALA_EXTERN const gchar* dialogs_preferences_pages_sidebar_sidebar_row_get_icon (DialogsPreferencesPagesSidebarSidebarRow* self);
static void dialogs_preferences_pages_sidebar_sidebar_row_set_icon (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                             const gchar* value);
VALA_EXTERN const gchar* dialogs_preferences_pages_sidebar_sidebar_row_get_title (DialogsPreferencesPagesSidebarSidebarRow* self);
static void dialogs_preferences_pages_sidebar_sidebar_row_set_title (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                              const gchar* value);
static GObject * dialogs_preferences_pages_sidebar_sidebar_row_constructor (GType type,
                                                                     guint n_construct_properties,
                                                                     GObjectConstructParam * construct_properties);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_new (GtkWidget* widget,
                                                GtkListBoxRow* row);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_construct (GType object_type,
                                                      GtkWidget* widget,
                                                      GtkListBoxRow* row);
VALA_EXTERN void widgets_reorder_child_build_drag_and_drop (WidgetsReorderChild* self);
static gboolean _dialogs_preferences_pages_sidebar_sidebar_row___lambda393_ (DialogsPreferencesPagesSidebarSidebarRow* self);
static gboolean __dialogs_preferences_pages_sidebar_sidebar_row___lambda393__gsource_func (gpointer self);
static void _dialogs_preferences_pages_sidebar_sidebar_row___lambda394_ (DialogsPreferencesPagesSidebarSidebarRow* self);
static void __dialogs_preferences_pages_sidebar_sidebar_row___lambda394__g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void _dialogs_preferences_pages_sidebar_sidebar_row___lambda395_ (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                                  GtkListBox* listbox);
static void __dialogs_preferences_pages_sidebar_sidebar_row___lambda395__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                                                     GtkListBox* listbox,
                                                                                                     gpointer self);
static void _dialogs_preferences_pages_sidebar_sidebar_row___lambda396_ (DialogsPreferencesPagesSidebarSidebarRow* self);
VALA_EXTERN void widgets_reorder_child_draw_motion_widgets (WidgetsReorderChild* self);
static void __dialogs_preferences_pages_sidebar_sidebar_row___lambda396__g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void _dialogs_preferences_pages_sidebar_sidebar_row___lambda397_ (DialogsPreferencesPagesSidebarSidebarRow* self);
static void __dialogs_preferences_pages_sidebar_sidebar_row___lambda397__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                              gint n_press,
                                                                                              gdouble x,
                                                                                              gdouble y,
                                                                                              gpointer self);
static void _dialogs_preferences_pages_sidebar_sidebar_row___lambda398_ (DialogsPreferencesPagesSidebarSidebarRow* self);
static void __dialogs_preferences_pages_sidebar_sidebar_row___lambda398__gtk_widget_destroy (GtkWidget* _sender,
                                                                                      gpointer self);
static void dialogs_preferences_pages_sidebar_sidebar_row_finalize (GObject * obj);
static GType dialogs_preferences_pages_sidebar_sidebar_row_get_type_once (void);
static void _vala_dialogs_preferences_pages_sidebar_sidebar_row_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_sidebar_sidebar_row_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec);
static GObject * dialogs_preferences_pages_sidebar_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static Block99Data* block99_data_ref (Block99Data* _data99_);
static void block99_data_unref (void * _userdata_);
VALA_EXTERN GType widgets_scrolled_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsScrolledWindow, g_object_unref)
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_new (GtkWidget* widget,
                                                    GtkOrientation orientation);
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_construct (GType object_type,
                                                          GtkWidget* widget,
                                                          GtkOrientation orientation);
static gint _dialogs_preferences_pages_sidebar___lambda402_ (DialogsPreferencesPagesSidebar* self,
                                                      GtkListBoxRow* child1,
                                                      GtkListBoxRow* child2);
static gint __dialogs_preferences_pages_sidebar___lambda402__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                              GtkListBoxRow* row2,
                                                                              gpointer self);
static gboolean _dialogs_preferences_pages_sidebar___lambda403_ (Block99Data* _data99_);
static gboolean __dialogs_preferences_pages_sidebar___lambda403__adw_spin_row_output (AdwSpinRow* _sender,
                                                                               gpointer self);
static void _dialogs_preferences_pages_sidebar___lambda404_ (DialogsPreferencesPagesSidebar* self);
static void __dialogs_preferences_pages_sidebar___lambda404__gtk_widget_destroy (GtkWidget* _sender,
                                                                          gpointer self);
static void dialogs_preferences_pages_sidebar_finalize (GObject * obj);
static GType dialogs_preferences_pages_sidebar_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);
static gssize _vala_array_length (gpointer array);

static inline gpointer
dialogs_preferences_pages_sidebar_get_instance_private (DialogsPreferencesPagesSidebar* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesSidebar_private_offset);
}

DialogsPreferencesPagesSidebar*
dialogs_preferences_pages_sidebar_construct (GType object_type,
                                             AdwPreferencesDialog* preferences_dialog)
{
	DialogsPreferencesPagesSidebar * self = NULL;
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	self = (DialogsPreferencesPagesSidebar*) g_object_new (object_type, "preferences-dialog", preferences_dialog, "title", _ ("Sidebar"), NULL);
	return self;
}

DialogsPreferencesPagesSidebar*
dialogs_preferences_pages_sidebar_new (AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_sidebar_construct (DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, preferences_dialog);
}

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

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
dialogs_preferences_pages_sidebar_real_clean_up (DialogsPreferencesPagesBasePage* base)
{
	DialogsPreferencesPagesSidebar * self;
	LayoutsHeaderItem* _tmp0_;
	LayoutsHeaderItem* _tmp1_;
	GList* _tmp2_;
	GeeHashMap* _tmp20_;
	self = (DialogsPreferencesPagesSidebar*) base;
	_tmp0_ = self->priv->views_group;
	layouts_header_item_set_sort_func (_tmp0_, NULL, NULL, NULL);
	_tmp1_ = self->priv->views_group;
	_tmp2_ = layouts_header_item_get_children (_tmp1_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp2_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp3_;
			GtkListBoxRow* row = NULL;
			_tmp3_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp3_;
			{
				GtkListBoxRow* _tmp4_;
				_tmp4_ = row;
				dialogs_preferences_pages_sidebar_sidebar_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp5_;
		GeeSet* _tmp6_;
		GeeSet* _tmp7_;
		GeeSet* _tmp8_;
		GeeIterator* _tmp9_;
		GeeIterator* _tmp10_;
		_tmp5_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
		_tmp6_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_);
		_tmp10_ = _tmp9_;
		_g_object_unref0 (_tmp8_);
		_entry_it = _tmp10_;
		while (TRUE) {
			GeeIterator* _tmp11_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp12_;
			gpointer _tmp13_;
			GeeMapEntry* _tmp14_;
			gconstpointer _tmp15_;
			gconstpointer _tmp16_;
			GeeMapEntry* _tmp17_;
			gconstpointer _tmp18_;
			gconstpointer _tmp19_;
			_tmp11_ = _entry_it;
			if (!gee_iterator_next (_tmp11_)) {
				break;
			}
			_tmp12_ = _entry_it;
			_tmp13_ = gee_iterator_get (_tmp12_);
			entry = (GeeMapEntry*) _tmp13_;
			_tmp14_ = entry;
			_tmp15_ = gee_map_entry_get_value (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = entry;
			_tmp18_ = gee_map_entry_get_key (_tmp17_);
			_tmp19_ = _tmp18_;
			g_signal_handler_disconnect ((GObject*) _tmp16_, (gulong) ((guintptr) _tmp19_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp20_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp20_);
}

static inline gpointer
dialogs_preferences_pages_sidebar_sidebar_row_get_instance_private (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesSidebarSidebarRow_private_offset);
}

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

DialogsPreferencesPagesSidebarSidebarRow*
dialogs_preferences_pages_sidebar_sidebar_row_new (ObjectsBaseObject* base_object)
{
	return dialogs_preferences_pages_sidebar_sidebar_row_construct (DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, base_object);
}

static gpointer
vala_g_array_remove_index (GArray* self,
                           guint index)
{
	gpointer g = NULL;
	gpointer* _tmp0_;
	gint _tmp0__length1;
	gpointer _tmp1_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	_vala_assert (self->len > index, "length > index");
	_tmp0_ = self->data;
	_tmp0__length1 = self->len;
	_tmp1_ = _tmp0_[index];
	_tmp0_[index] = NULL;
	g = _tmp1_;
	g_array_remove_index (self, index);
	result = g;
	return result;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_updateView (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                          GArray* views,
                                                          const gchar* view,
                                                          gboolean active)
{
	ServicesSettings* _tmp5_;
	ServicesSettings* _tmp6_;
	GSettings* _tmp7_;
	gpointer* _tmp8_;
	gint _tmp8__length1;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (views != NULL);
	g_return_if_fail (view != NULL);
	if (active) {
		gpointer* _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = views->data;
		_tmp0__length1 = views->len;
		if (!dialogs_preferences_pages_sidebar_sidebar_row_find_view (self, _tmp0_, (gint) _tmp0__length1, view)) {
			gchar* _tmp1_;
			_tmp1_ = g_strdup (view);
			g_array_append_val (views, _tmp1_);
		}
	} else {
		gint index = 0;
		gpointer* _tmp2_;
		gint _tmp2__length1;
		_tmp2_ = views->data;
		_tmp2__length1 = views->len;
		index = dialogs_preferences_pages_sidebar_sidebar_row_find_index (self, _tmp2_, (gint) _tmp2__length1, view);
		if (index != -1) {
			gchar* _tmp3_;
			gchar* _tmp4_;
			_tmp3_ = vala_g_array_remove_index (views, (guint) index);
			_tmp4_ = _tmp3_;
			_g_free0 (_tmp4_);
		}
	}
	_tmp5_ = services_settings_get_default ();
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_->settings;
	_tmp8_ = views->data;
	_tmp8__length1 = views->len;
	g_settings_set_strv (_tmp7_, "views-order-visible", _tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp9_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp10_ = _tmp9_;
	dialogs_preferences_pages_sidebar_sidebar_row_update_views_order (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_list_box_get_type (), GtkListBox));
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_vala_gchar_free_function_content_of (gpointer data)
{
	gchar* self;
	self = *((gchar**) data);
	_g_free0_ (self);
}

static GArray*
dialogs_preferences_pages_sidebar_sidebar_row_get_views_array (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	gchar** list = NULL;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint list_length1;
	gint _list_size_;
	GArray* array = NULL;
	GArray* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	GArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp4_ = _tmp3_ = g_settings_get_strv (_tmp2_, "views-order-visible");
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _vala_array_length (_tmp3_);
	_g_object_unref0 (_tmp1_);
	list = _tmp5_;
	list_length1 = _tmp5__length1;
	_list_size_ = list_length1;
	_tmp6_ = g_array_new (TRUE, TRUE, sizeof (gchar*));
	g_array_set_clear_func (_tmp6_, (GDestroyNotify) _vala_gchar_free_function_content_of);
	array = _tmp6_;
	_tmp7_ = list;
	_tmp7__length1 = list_length1;
	{
		gchar** view_collection = NULL;
		gint view_collection_length1 = 0;
		gint _view_collection_size_ = 0;
		gint view_it = 0;
		view_collection = _tmp7_;
		view_collection_length1 = _tmp7__length1;
		for (view_it = 0; view_it < view_collection_length1; view_it = view_it + 1) {
			gchar* _tmp8_;
			gchar* view = NULL;
			_tmp8_ = g_strdup (view_collection[view_it]);
			view = _tmp8_;
			{
				GArray* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp9_ = array;
				_tmp10_ = view;
				_tmp11_ = g_strdup (_tmp10_);
				g_array_append_val (_tmp9_, _tmp11_);
				_g_free0 (view);
			}
		}
	}
	result = array;
	list = (_vala_array_free (list, list_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_update_views_order (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                                  GtkListBox* listbox)
{
	GArray* list = NULL;
	GArray* _tmp0_;
	DialogsPreferencesPagesSidebarSidebarRow* row = NULL;
	gint row_index = 0;
	ServicesSettings* _tmp16_;
	ServicesSettings* _tmp17_;
	GSettings* _tmp18_;
	GArray* _tmp19_;
	gpointer* _tmp20_;
	gint _tmp20__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (gchar*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_gchar_free_function_content_of);
	list = _tmp0_;
	row = NULL;
	row_index = 0;
	{
		gboolean _tmp1_ = FALSE;
		_tmp1_ = TRUE;
		while (TRUE) {
			GtkListBoxRow* _tmp3_;
			gboolean _tmp4_ = FALSE;
			DialogsPreferencesPagesSidebarSidebarRow* _tmp5_;
			gint _tmp15_;
			if (!_tmp1_) {
				DialogsPreferencesPagesSidebarSidebarRow* _tmp2_;
				_tmp2_ = row;
				if (!(_tmp2_ != NULL)) {
					break;
				}
			}
			_tmp1_ = FALSE;
			_tmp3_ = gtk_list_box_get_row_at_index (listbox, row_index);
			row = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow);
			_tmp5_ = row;
			if (_tmp5_ != NULL) {
				DialogsPreferencesPagesSidebarSidebarRow* _tmp6_;
				gboolean _tmp7_;
				gboolean _tmp8_;
				_tmp6_ = row;
				_tmp7_ = dialogs_preferences_pages_sidebar_sidebar_row_get_active (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp4_ = _tmp8_;
			} else {
				_tmp4_ = FALSE;
			}
			if (_tmp4_) {
				GArray* _tmp9_;
				DialogsPreferencesPagesSidebarSidebarRow* _tmp10_;
				ObjectsBaseObject* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				gchar* _tmp14_;
				_tmp9_ = list;
				_tmp10_ = row;
				_tmp11_ = _tmp10_->priv->_base_object;
				_tmp12_ = objects_base_object_get_view_id (_tmp11_);
				_tmp13_ = _tmp12_;
				_tmp14_ = g_strdup (_tmp13_);
				g_array_append_val (_tmp9_, _tmp14_);
			}
			_tmp15_ = row_index;
			row_index = _tmp15_ + 1;
		}
	}
	_tmp16_ = services_settings_get_default ();
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_->settings;
	_tmp19_ = list;
	_tmp20_ = _tmp19_->data;
	_tmp20__length1 = _tmp19_->len;
	g_settings_set_strv (_tmp18_, "views-order-visible", _tmp20_);
	_g_object_unref0 (_tmp17_);
	_g_array_unref0 (list);
}

gint
dialogs_preferences_pages_sidebar_sidebar_row_item_order (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	gchar** views_order = NULL;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint views_order_length1;
	gint _views_order_size_;
	ObjectsBaseObject* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp4_ = _tmp3_ = g_settings_get_strv (_tmp2_, "views-order-visible");
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _vala_array_length (_tmp3_);
	_g_object_unref0 (_tmp1_);
	views_order = _tmp5_;
	views_order_length1 = _tmp5__length1;
	_views_order_size_ = views_order_length1;
	_tmp6_ = self->priv->_base_object;
	_tmp7_ = objects_base_object_get_view_id (_tmp6_);
	_tmp8_ = _tmp7_;
	result = dialogs_preferences_pages_sidebar_sidebar_row_find_index (self, views_order, (gint) views_order_length1, _tmp8_);
	views_order = (_vala_array_free (views_order, views_order_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static gint
dialogs_preferences_pages_sidebar_sidebar_row_find_index (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                          gchar** array,
                                                          gint array_length1,
                                                          const gchar* elemento)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (elemento != NULL, -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < array_length1)) {
					break;
				}
				_tmp2_ = array[i];
				if (g_strcmp0 (_tmp2_, elemento) == 0) {
					result = i;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}

static gboolean
dialogs_preferences_pages_sidebar_sidebar_row_check_active (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	gchar** views_order = NULL;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint views_order_length1;
	gint _views_order_size_;
	ObjectsBaseObject* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp4_ = _tmp3_ = g_settings_get_strv (_tmp2_, "views-order-visible");
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _vala_array_length (_tmp3_);
	_g_object_unref0 (_tmp1_);
	views_order = _tmp5_;
	views_order_length1 = _tmp5__length1;
	_views_order_size_ = views_order_length1;
	_tmp6_ = self->priv->_base_object;
	_tmp7_ = objects_base_object_get_view_id (_tmp6_);
	_tmp8_ = _tmp7_;
	result = dialogs_preferences_pages_sidebar_sidebar_row_find_view (self, views_order, (gint) views_order_length1, _tmp8_);
	views_order = (_vala_array_free (views_order, views_order_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

static gboolean
dialogs_preferences_pages_sidebar_sidebar_row_find_view (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                         gchar** array,
                                                         gint array_length1,
                                                         const gchar* elemento)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (elemento != NULL, FALSE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < array_length1)) {
					break;
				}
				_tmp2_ = array[i];
				if (g_strcmp0 (_tmp2_, elemento) == 0) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}

void
dialogs_preferences_pages_sidebar_sidebar_row_clean_up (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	WidgetsReorderChild* _tmp0_;
	GeeHashMap* _tmp17_;
	gboolean _tmp18_ = FALSE;
	GtkGestureClick* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->reorder;
	if (_tmp0_ != NULL) {
		WidgetsReorderChild* _tmp1_;
		_tmp1_ = self->priv->reorder;
		widgets_reorder_child_clean_up (_tmp1_);
		_g_object_unref0 (self->priv->reorder);
		self->priv->reorder = NULL;
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeSet* _tmp5_;
		GeeIterator* _tmp6_;
		GeeIterator* _tmp7_;
		_tmp2_ = self->signal_map;
		_tmp3_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_tmp7_ = _tmp6_;
		_g_object_unref0 (_tmp5_);
		_entry_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeMapEntry* _tmp11_;
			gconstpointer _tmp12_;
			gconstpointer _tmp13_;
			GeeMapEntry* _tmp14_;
			gconstpointer _tmp15_;
			gconstpointer _tmp16_;
			_tmp8_ = _entry_it;
			if (!gee_iterator_next (_tmp8_)) {
				break;
			}
			_tmp9_ = _entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = entry;
			_tmp12_ = gee_map_entry_get_value (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = entry;
			_tmp15_ = gee_map_entry_get_key (_tmp14_);
			_tmp16_ = _tmp15_;
			g_signal_handler_disconnect ((GObject*) _tmp13_, (gulong) ((guintptr) _tmp16_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp17_ = self->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp17_);
	_tmp19_ = self->priv->select_gesture;
	if (_tmp19_ != NULL) {
		AdwActionRow* _tmp20_;
		_tmp20_ = self->priv->action_row;
		_tmp18_ = _tmp20_ != NULL;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		AdwActionRow* _tmp21_;
		GtkGestureClick* _tmp22_;
		_tmp21_ = self->priv->action_row;
		_tmp22_ = self->priv->select_gesture;
		gtk_widget_remove_controller ((GtkWidget*) _tmp21_, (GtkEventController*) _tmp22_);
		_g_object_unref0 (self->priv->select_gesture);
		self->priv->select_gesture = NULL;
	}
	_g_object_unref0 (self->priv->check_button);
	self->priv->check_button = NULL;
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = NULL;
	_g_object_unref0 (self->priv->action_row);
	self->priv->action_row = NULL;
}

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

static void
dialogs_preferences_pages_sidebar_sidebar_row_set_base_object (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                               ObjectsBaseObject* value)
{
	ObjectsBaseObject* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_sidebar_sidebar_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_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_BASE_OBJECT_PROPERTY]);
	}
}

const gchar*
dialogs_preferences_pages_sidebar_sidebar_row_get_icon (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_set_icon (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_sidebar_sidebar_row_get_icon (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY]);
	}
}

const gchar*
dialogs_preferences_pages_sidebar_sidebar_row_get_title (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_set_title (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_sidebar_sidebar_row_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY]);
	}
}

gboolean
dialogs_preferences_pages_sidebar_sidebar_row_get_active (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	gboolean result;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->check_button;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static gboolean
_dialogs_preferences_pages_sidebar_sidebar_row___lambda393_ (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	GtkRevealer* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, TRUE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__dialogs_preferences_pages_sidebar_sidebar_row___lambda393__gsource_func (gpointer self)
{
	gboolean result;
	result = _dialogs_preferences_pages_sidebar_sidebar_row___lambda393_ ((DialogsPreferencesPagesSidebarSidebarRow*) self);
	return result;
}

static void
_dialogs_preferences_pages_sidebar_sidebar_row___lambda394_ (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	GArray* _tmp0_;
	GArray* _tmp1_;
	ObjectsBaseObject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkSwitch* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	_tmp0_ = dialogs_preferences_pages_sidebar_sidebar_row_get_views_array (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_base_object;
	_tmp3_ = objects_base_object_get_view_id (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->check_button;
	_tmp6_ = gtk_switch_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	dialogs_preferences_pages_sidebar_sidebar_row_updateView (self, _tmp1_, _tmp4_, _tmp7_);
	_g_array_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_sidebar_sidebar_row___lambda394__g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	_dialogs_preferences_pages_sidebar_sidebar_row___lambda394_ ((DialogsPreferencesPagesSidebarSidebarRow*) self);
}

static void
_dialogs_preferences_pages_sidebar_sidebar_row___lambda395_ (DialogsPreferencesPagesSidebarSidebarRow* self,
                                                             GtkListBox* listbox)
{
	g_return_if_fail (listbox != NULL);
	dialogs_preferences_pages_sidebar_sidebar_row_update_views_order (self, listbox);
}

static void
__dialogs_preferences_pages_sidebar_sidebar_row___lambda395__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                                                GtkListBox* listbox,
                                                                                                gpointer self)
{
	_dialogs_preferences_pages_sidebar_sidebar_row___lambda395_ ((DialogsPreferencesPagesSidebarSidebarRow*) self, listbox);
}

static void
_dialogs_preferences_pages_sidebar_sidebar_row___lambda396_ (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	WidgetsReorderChild* _tmp0_;
	_tmp0_ = self->priv->reorder;
	widgets_reorder_child_draw_motion_widgets (_tmp0_);
}

static void
__dialogs_preferences_pages_sidebar_sidebar_row___lambda396__g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	_dialogs_preferences_pages_sidebar_sidebar_row___lambda396_ ((DialogsPreferencesPagesSidebarSidebarRow*) self);
}

static void
_dialogs_preferences_pages_sidebar_sidebar_row___lambda397_ (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	GtkSwitch* _tmp0_;
	GtkSwitch* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->check_button;
	_tmp1_ = self->priv->check_button;
	_tmp2_ = gtk_switch_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_switch_set_active (_tmp0_, !_tmp3_);
}

static void
__dialogs_preferences_pages_sidebar_sidebar_row___lambda397__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                         gint n_press,
                                                                                         gdouble x,
                                                                                         gdouble y,
                                                                                         gpointer self)
{
	_dialogs_preferences_pages_sidebar_sidebar_row___lambda397_ ((DialogsPreferencesPagesSidebarSidebarRow*) self);
}

static void
_dialogs_preferences_pages_sidebar_sidebar_row___lambda398_ (DialogsPreferencesPagesSidebarSidebarRow* self)
{
	dialogs_preferences_pages_sidebar_sidebar_row_clean_up (self);
}

static void
__dialogs_preferences_pages_sidebar_sidebar_row___lambda398__gtk_widget_destroy (GtkWidget* _sender,
                                                                                 gpointer self)
{
	_dialogs_preferences_pages_sidebar_sidebar_row___lambda398_ ((DialogsPreferencesPagesSidebarSidebarRow*) self);
}

static GObject *
dialogs_preferences_pages_sidebar_sidebar_row_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesSidebarSidebarRow * self;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkSwitch* _tmp2_ = NULL;
	ObjectsBaseObject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	AdwActionRow* _tmp7_ = NULL;
	AdwActionRow* _tmp8_;
	ObjectsBaseObject* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	GtkImage* _tmp12_;
	GtkImage* _tmp13_;
	AdwActionRow* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	GtkImage* _tmp17_ = NULL;
	GtkImage* _tmp18_;
	AdwActionRow* _tmp19_;
	GtkSwitch* _tmp20_;
	AdwActionRow* _tmp21_;
	WidgetsReorderChild* _tmp22_;
	WidgetsReorderChild* _tmp23_;
	GtkWidget* _tmp24_;
	GtkRevealer* _tmp25_ = NULL;
	GtkRevealer* _tmp26_;
	WidgetsReorderChild* _tmp27_;
	GtkRevealer* _tmp28_;
	guint _tmp29_;
	guint _tmp30_;
	GeeHashMap* _tmp31_;
	GtkSwitch* _tmp32_;
	gulong _tmp33_;
	GtkSwitch* _tmp34_;
	GeeHashMap* _tmp35_;
	WidgetsReorderChild* _tmp36_;
	gulong _tmp37_;
	WidgetsReorderChild* _tmp38_;
	GeeHashMap* _tmp39_;
	GtkRevealer* _tmp40_;
	gulong _tmp41_;
	GtkRevealer* _tmp42_;
	GtkGestureClick* _tmp43_;
	AdwActionRow* _tmp44_;
	GtkGestureClick* _tmp45_;
	GtkEventController* _tmp46_;
	GeeHashMap* _tmp47_;
	GtkGestureClick* _tmp48_;
	gulong _tmp49_;
	GtkGestureClick* _tmp50_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_sidebar_sidebar_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow);
	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");
	gtk_widget_add_css_class ((GtkWidget*) self, "no-selectable");
	_tmp0_ = g_strdup ("flat");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_switch_set_active (_tmp2_, dialogs_preferences_pages_sidebar_sidebar_row_check_active (self));
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->check_button);
	self->priv->check_button = _tmp2_;
	_tmp3_ = self->priv->_base_object;
	_tmp4_ = objects_base_object_get_name (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup (_tmp5_);
	_tmp7_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp7_, TRUE);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->action_row);
	self->priv->action_row = _tmp7_;
	_tmp8_ = self->priv->action_row;
	_tmp9_ = self->priv->_base_object;
	_tmp10_ = objects_base_object_get_icon_name (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp11_);
	g_object_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	adw_action_row_add_prefix (_tmp8_, (GtkWidget*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->priv->action_row;
	_tmp15_ = g_strdup ("dimmed");
	_tmp16_ = g_new0 (gchar*, 1 + 1);
	_tmp16_[0] = _tmp15_;
	_tmp17_ = (GtkImage*) gtk_image_new_from_icon_name ("list-drag-handle-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp17_, _tmp16_);
	_tmp16_ = (_vala_array_free (_tmp16_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	adw_action_row_add_prefix (_tmp14_, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = self->priv->action_row;
	_tmp20_ = self->priv->check_button;
	adw_action_row_add_suffix (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = self->priv->action_row;
	_tmp22_ = widgets_reorder_child_new ((GtkWidget*) _tmp21_, (GtkListBoxRow*) self);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->reorder);
	self->priv->reorder = _tmp22_;
	_tmp23_ = self->priv->reorder;
	_tmp24_ = _g_object_ref0 ((GtkWidget*) _tmp23_);
	_tmp25_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp25_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp25_, _tmp24_);
	_g_object_unref0 (_tmp24_);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp25_;
	_tmp26_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp26_);
	_tmp27_ = self->priv->reorder;
	widgets_reorder_child_build_drag_and_drop (_tmp27_);
	_tmp28_ = self->priv->main_revealer;
	_tmp29_ = gtk_revealer_get_transition_duration (_tmp28_);
	_tmp30_ = _tmp29_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp30_, __dialogs_preferences_pages_sidebar_sidebar_row___lambda393__gsource_func, g_object_ref (self), g_object_unref);
	_tmp31_ = self->signal_map;
	_tmp32_ = self->priv->check_button;
	_tmp33_ = g_signal_connect_object ((GObject*) _tmp32_, "notify::active", (GCallback) __dialogs_preferences_pages_sidebar_sidebar_row___lambda394__g_object_notify, self, 0);
	_tmp34_ = self->priv->check_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, (gpointer) ((guintptr) _tmp33_), (GObject*) _tmp34_);
	_tmp35_ = self->signal_map;
	_tmp36_ = self->priv->reorder;
	_tmp37_ = g_signal_connect_object (_tmp36_, "on-drop-end", (GCallback) __dialogs_preferences_pages_sidebar_sidebar_row___lambda395__widgets_reorder_child_on_drop_end, self, 0);
	_tmp38_ = self->priv->reorder;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp35_, (gpointer) ((guintptr) _tmp37_), (GObject*) _tmp38_);
	_tmp39_ = self->signal_map;
	_tmp40_ = self->priv->main_revealer;
	_tmp41_ = g_signal_connect_object ((GObject*) _tmp40_, "notify::child-revealed", (GCallback) __dialogs_preferences_pages_sidebar_sidebar_row___lambda396__g_object_notify, self, 0);
	_tmp42_ = self->priv->main_revealer;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp39_, (gpointer) ((guintptr) _tmp41_), (GObject*) _tmp42_);
	_tmp43_ = (GtkGestureClick*) gtk_gesture_click_new ();
	_g_object_unref0 (self->priv->select_gesture);
	self->priv->select_gesture = _tmp43_;
	_tmp44_ = self->priv->action_row;
	_tmp45_ = self->priv->select_gesture;
	_tmp46_ = _g_object_ref0 ((GtkEventController*) _tmp45_);
	gtk_widget_add_controller ((GtkWidget*) _tmp44_, _tmp46_);
	_tmp47_ = self->signal_map;
	_tmp48_ = self->priv->select_gesture;
	_tmp49_ = g_signal_connect_object (_tmp48_, "released", (GCallback) __dialogs_preferences_pages_sidebar_sidebar_row___lambda397__gtk_gesture_click_released, self, 0);
	_tmp50_ = self->priv->select_gesture;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp47_, (gpointer) ((guintptr) _tmp49_), (GObject*) _tmp50_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_sidebar_sidebar_row___lambda398__gtk_widget_destroy, self, 0);
	return obj;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_class_init (DialogsPreferencesPagesSidebarSidebarRowClass * klass,
                                                          gpointer klass_data)
{
	dialogs_preferences_pages_sidebar_sidebar_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesSidebarSidebarRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_sidebar_sidebar_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_sidebar_sidebar_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_sidebar_sidebar_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_sidebar_sidebar_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_BASE_OBJECT_PROPERTY, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_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_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, 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_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, 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_SIDEBAR_SIDEBAR_ROW_ACTIVE_PROPERTY, dialogs_preferences_pages_sidebar_sidebar_row_properties[DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_instance_init (DialogsPreferencesPagesSidebarSidebarRow * self,
                                                             gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dialogs_preferences_pages_sidebar_sidebar_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->signal_map = _tmp0_;
}

static void
dialogs_preferences_pages_sidebar_sidebar_row_finalize (GObject * obj)
{
	DialogsPreferencesPagesSidebarSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow);
	g_debug ("Sidebar.vala:166: Destroying SidebarRow\n");
	_g_object_unref0 (self->priv->_base_object);
	_g_free0 (self->priv->_icon);
	_g_free0 (self->priv->_title);
	_g_object_unref0 (self->priv->reorder);
	_g_object_unref0 (self->priv->check_button);
	_g_object_unref0 (self->priv->select_gesture);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->action_row);
	_g_object_unref0 (self->signal_map);
	G_OBJECT_CLASS (dialogs_preferences_pages_sidebar_sidebar_row_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_sidebar_sidebar_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesSidebarSidebarRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_sidebar_sidebar_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesSidebarSidebarRow), 0, (GInstanceInitFunc) dialogs_preferences_pages_sidebar_sidebar_row_instance_init, NULL };
	GType dialogs_preferences_pages_sidebar_sidebar_row_type_id;
	dialogs_preferences_pages_sidebar_sidebar_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DialogsPreferencesPagesSidebarSidebarRow", &g_define_type_info, 0);
	DialogsPreferencesPagesSidebarSidebarRow_private_offset = g_type_add_instance_private (dialogs_preferences_pages_sidebar_sidebar_row_type_id, sizeof (DialogsPreferencesPagesSidebarSidebarRowPrivate));
	return dialogs_preferences_pages_sidebar_sidebar_row_type_id;
}

GType
dialogs_preferences_pages_sidebar_sidebar_row_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_sidebar_sidebar_row_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_sidebar_sidebar_row_type_id__once)) {
		GType dialogs_preferences_pages_sidebar_sidebar_row_type_id;
		dialogs_preferences_pages_sidebar_sidebar_row_type_id = dialogs_preferences_pages_sidebar_sidebar_row_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_sidebar_sidebar_row_type_id__once, dialogs_preferences_pages_sidebar_sidebar_row_type_id);
	}
	return dialogs_preferences_pages_sidebar_sidebar_row_type_id__once;
}

static void
_vala_dialogs_preferences_pages_sidebar_sidebar_row_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec)
{
	DialogsPreferencesPagesSidebarSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_BASE_OBJECT_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_sidebar_sidebar_row_get_base_object (self));
		break;
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY:
		g_value_set_string (value, dialogs_preferences_pages_sidebar_sidebar_row_get_icon (self));
		break;
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY:
		g_value_set_string (value, dialogs_preferences_pages_sidebar_sidebar_row_get_title (self));
		break;
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ACTIVE_PROPERTY:
		g_value_set_boolean (value, dialogs_preferences_pages_sidebar_sidebar_row_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_sidebar_sidebar_row_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec)
{
	DialogsPreferencesPagesSidebarSidebarRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_BASE_OBJECT_PROPERTY:
		dialogs_preferences_pages_sidebar_sidebar_row_set_base_object (self, g_value_get_object (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_ICON_PROPERTY:
		dialogs_preferences_pages_sidebar_sidebar_row_set_icon (self, g_value_get_string (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_SIDEBAR_SIDEBAR_ROW_TITLE_PROPERTY:
		dialogs_preferences_pages_sidebar_sidebar_row_set_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block99Data*
block99_data_ref (Block99Data* _data99_)
{
	g_atomic_int_inc (&_data99_->_ref_count_);
	return _data99_;
}

static void
block99_data_unref (void * _userdata_)
{
	Block99Data* _data99_;
	_data99_ = (Block99Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data99_->_ref_count_)) {
		DialogsPreferencesPagesSidebar* self;
		self = _data99_->self;
		_g_object_unref0 (_data99_->sidebar_width_row);
		_g_object_unref0 (self);
		g_slice_free (Block99Data, _data99_);
	}
}

static gint
_dialogs_preferences_pages_sidebar___lambda402_ (DialogsPreferencesPagesSidebar* self,
                                                 GtkListBoxRow* child1,
                                                 GtkListBoxRow* child2)
{
	DialogsPreferencesPagesSidebarSidebarRow* item1 = NULL;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp0_;
	DialogsPreferencesPagesSidebarSidebarRow* item2 = NULL;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp1_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp5_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp6_;
	gint result;
	g_return_val_if_fail (child1 != NULL, -1);
	g_return_val_if_fail (child2 != NULL, -1);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (child1, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow));
	item1 = _tmp0_;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (child2, DIALOGS_PREFERENCES_PAGES_SIDEBAR_TYPE_SIDEBAR_ROW, DialogsPreferencesPagesSidebarSidebarRow));
	item2 = _tmp1_;
	_tmp2_ = item1;
	_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		result = -1;
		_g_object_unref0 (item2);
		_g_object_unref0 (item1);
		return result;
	}
	_tmp5_ = item1;
	_tmp6_ = item2;
	result = dialogs_preferences_pages_sidebar_sidebar_row_item_order (_tmp5_) - dialogs_preferences_pages_sidebar_sidebar_row_item_order (_tmp6_);
	_g_object_unref0 (item2);
	_g_object_unref0 (item1);
	return result;
}

static gint
__dialogs_preferences_pages_sidebar___lambda402__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                         GtkListBoxRow* row2,
                                                                         gpointer self)
{
	gint result;
	result = _dialogs_preferences_pages_sidebar___lambda402_ ((DialogsPreferencesPagesSidebar*) self, row1, row2);
	return result;
}

static gboolean
_dialogs_preferences_pages_sidebar___lambda403_ (Block99Data* _data99_)
{
	DialogsPreferencesPagesSidebar* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	AdwSpinRow* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	self = _data99_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data99_->sidebar_width_row;
	_tmp4_ = adw_spin_row_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_int (_tmp2_, "pane-position", (gint) _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static gboolean
__dialogs_preferences_pages_sidebar___lambda403__adw_spin_row_output (AdwSpinRow* _sender,
                                                                      gpointer self)
{
	gboolean result;
	result = _dialogs_preferences_pages_sidebar___lambda403_ (self);
	return result;
}

static void
_dialogs_preferences_pages_sidebar___lambda404_ (DialogsPreferencesPagesSidebar* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_sidebar___lambda404__gtk_widget_destroy (GtkWidget* _sender,
                                                                     gpointer self)
{
	_dialogs_preferences_pages_sidebar___lambda404_ ((DialogsPreferencesPagesSidebar*) self);
}

static GObject *
dialogs_preferences_pages_sidebar_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesSidebar * self;
	Block99Data* _data99_;
	AdwSwitchRow* show_count_row = NULL;
	gchar* _tmp0_;
	AdwSwitchRow* _tmp1_ = NULL;
	gchar* _tmp2_;
	ServicesSettings* _tmp3_;
	ServicesSettings* _tmp4_;
	GSettings* _tmp5_;
	AdwSpinRow* _tmp6_ = NULL;
	AdwSpinRow* _tmp7_;
	AdwSwitchRow* list_view_filters_row = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	AdwSwitchRow* _tmp10_ = NULL;
	AdwPreferencesGroup* count_group = NULL;
	AdwPreferencesGroup* _tmp11_ = NULL;
	AdwPreferencesGroup* _tmp12_;
	AdwSwitchRow* _tmp13_;
	AdwPreferencesGroup* _tmp14_;
	AdwSpinRow* _tmp15_;
	AdwPreferencesGroup* _tmp16_;
	AdwSwitchRow* _tmp17_;
	LayoutsHeaderItem* _tmp18_ = NULL;
	LayoutsHeaderItem* _tmp19_;
	ObjectsFiltersInbox* _tmp20_;
	ObjectsFiltersInbox* _tmp21_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp22_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp23_;
	LayoutsHeaderItem* _tmp24_;
	ObjectsFiltersToday* _tmp25_;
	ObjectsFiltersToday* _tmp26_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp27_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp28_;
	LayoutsHeaderItem* _tmp29_;
	ObjectsFiltersScheduled* _tmp30_;
	ObjectsFiltersScheduled* _tmp31_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp32_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp33_;
	LayoutsHeaderItem* _tmp34_;
	ObjectsFiltersPinboard* _tmp35_;
	ObjectsFiltersPinboard* _tmp36_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp37_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp38_;
	LayoutsHeaderItem* _tmp39_;
	ObjectsFiltersLabels* _tmp40_;
	ObjectsFiltersLabels* _tmp41_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp42_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp43_;
	LayoutsHeaderItem* _tmp44_;
	ObjectsFiltersCompleted* _tmp45_;
	ObjectsFiltersCompleted* _tmp46_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp47_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp48_;
	LayoutsHeaderItem* _tmp49_;
	ObjectsFiltersTomorrow* _tmp50_;
	ObjectsFiltersTomorrow* _tmp51_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp52_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp53_;
	LayoutsHeaderItem* _tmp54_;
	ObjectsFiltersAnytime* _tmp55_;
	ObjectsFiltersAnytime* _tmp56_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp57_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp58_;
	LayoutsHeaderItem* _tmp59_;
	ObjectsFiltersRepeating* _tmp60_;
	ObjectsFiltersRepeating* _tmp61_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp62_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp63_;
	LayoutsHeaderItem* _tmp64_;
	ObjectsFiltersUnlabeled* _tmp65_;
	ObjectsFiltersUnlabeled* _tmp66_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp67_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp68_;
	LayoutsHeaderItem* _tmp69_;
	ObjectsFiltersAllItems* _tmp70_;
	ObjectsFiltersAllItems* _tmp71_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp72_;
	DialogsPreferencesPagesSidebarSidebarRow* _tmp73_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp74_ = NULL;
	GtkBox* _tmp75_;
	AdwPreferencesGroup* _tmp76_;
	GtkBox* _tmp77_;
	LayoutsHeaderItem* _tmp78_;
	GtkBox* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar** _tmp82_;
	GtkLabel* _tmp83_ = NULL;
	GtkLabel* _tmp84_;
	WidgetsScrolledWindow* scrolled_window = NULL;
	GtkBox* _tmp85_;
	WidgetsScrolledWindow* _tmp86_;
	AdwToolbarView* toolbar_view = NULL;
	WidgetsScrolledWindow* _tmp87_;
	GtkWidget* _tmp88_;
	AdwToolbarView* _tmp89_ = NULL;
	AdwToolbarView* _tmp90_;
	AdwHeaderBar* _tmp91_;
	AdwHeaderBar* _tmp92_;
	AdwToolbarView* _tmp93_;
	ServicesSettings* _tmp94_;
	ServicesSettings* _tmp95_;
	GSettings* _tmp96_;
	AdwSwitchRow* _tmp97_;
	ServicesSettings* _tmp98_;
	ServicesSettings* _tmp99_;
	GSettings* _tmp100_;
	AdwSwitchRow* _tmp101_;
	LayoutsHeaderItem* _tmp102_;
	LayoutsHeaderItem* _tmp103_;
	GeeHashMap* _tmp104_;
	AdwSpinRow* _tmp105_;
	gulong _tmp106_;
	AdwSpinRow* _tmp107_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_sidebar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, DialogsPreferencesPagesSidebar);
	_data99_ = g_slice_new0 (Block99Data);
	_data99_->_ref_count_ = 1;
	_data99_->self = g_object_ref (self);
	_tmp0_ = g_strdup (_ ("Show Task Count"));
	_tmp1_ = (AdwSwitchRow*) adw_switch_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	show_count_row = _tmp1_;
	_tmp2_ = g_strdup (_ ("Sidebar Width"));
	_tmp3_ = services_settings_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_->settings;
	_tmp6_ = (AdwSpinRow*) adw_spin_row_new_with_range ((gdouble) 200, (gdouble) 400, (gdouble) 1);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp6_, _tmp2_);
	_g_free0 (_tmp2_);
	adw_spin_row_set_value (_tmp6_, (gdouble) g_settings_get_int (_tmp5_, "pane-position"));
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp4_);
	_data99_->sidebar_width_row = _tmp7_;
	_tmp8_ = g_strdup (_ ("List View for Filters"));
	_tmp9_ = g_strdup (_ ("Show filters in a simple list instead of a grid"));
	_tmp10_ = (AdwSwitchRow*) adw_switch_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp10_, _tmp8_);
	_g_free0 (_tmp8_);
	adw_action_row_set_subtitle ((AdwActionRow*) _tmp10_, _tmp9_);
	_g_free0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	list_view_filters_row = _tmp10_;
	_tmp11_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp11_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp11_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp11_, 12);
	g_object_ref_sink (_tmp11_);
	count_group = _tmp11_;
	_tmp12_ = count_group;
	_tmp13_ = show_count_row;
	adw_preferences_group_add (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = count_group;
	_tmp15_ = _data99_->sidebar_width_row;
	adw_preferences_group_add (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = count_group;
	_tmp17_ = list_view_filters_row;
	adw_preferences_group_add (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = layouts_header_item_new (_ ("Show in Sidebar"));
	layouts_header_item_set_card (_tmp18_, TRUE);
	layouts_header_item_set_reveal (_tmp18_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp18_, 12);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->views_group);
	self->priv->views_group = _tmp18_;
	_tmp19_ = self->priv->views_group;
	_tmp20_ = objects_filters_inbox_get_default ();
	_tmp21_ = _tmp20_;
	_tmp22_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp21_);
	g_object_ref_sink (_tmp22_);
	_tmp23_ = _tmp22_;
	layouts_header_item_add_child (_tmp19_, (GtkWidget*) _tmp23_);
	_g_object_unref0 (_tmp23_);
	_g_object_unref0 (_tmp21_);
	_tmp24_ = self->priv->views_group;
	_tmp25_ = objects_filters_today_get_default ();
	_tmp26_ = _tmp25_;
	_tmp27_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp26_);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	layouts_header_item_add_child (_tmp24_, (GtkWidget*) _tmp28_);
	_g_object_unref0 (_tmp28_);
	_g_object_unref0 (_tmp26_);
	_tmp29_ = self->priv->views_group;
	_tmp30_ = objects_filters_scheduled_get_default ();
	_tmp31_ = _tmp30_;
	_tmp32_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp31_);
	g_object_ref_sink (_tmp32_);
	_tmp33_ = _tmp32_;
	layouts_header_item_add_child (_tmp29_, (GtkWidget*) _tmp33_);
	_g_object_unref0 (_tmp33_);
	_g_object_unref0 (_tmp31_);
	_tmp34_ = self->priv->views_group;
	_tmp35_ = objects_filters_pinboard_get_default ();
	_tmp36_ = _tmp35_;
	_tmp37_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp36_);
	g_object_ref_sink (_tmp37_);
	_tmp38_ = _tmp37_;
	layouts_header_item_add_child (_tmp34_, (GtkWidget*) _tmp38_);
	_g_object_unref0 (_tmp38_);
	_g_object_unref0 (_tmp36_);
	_tmp39_ = self->priv->views_group;
	_tmp40_ = objects_filters_labels_get_default ();
	_tmp41_ = _tmp40_;
	_tmp42_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp41_);
	g_object_ref_sink (_tmp42_);
	_tmp43_ = _tmp42_;
	layouts_header_item_add_child (_tmp39_, (GtkWidget*) _tmp43_);
	_g_object_unref0 (_tmp43_);
	_g_object_unref0 (_tmp41_);
	_tmp44_ = self->priv->views_group;
	_tmp45_ = objects_filters_completed_get_default ();
	_tmp46_ = _tmp45_;
	_tmp47_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp46_);
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	layouts_header_item_add_child (_tmp44_, (GtkWidget*) _tmp48_);
	_g_object_unref0 (_tmp48_);
	_g_object_unref0 (_tmp46_);
	_tmp49_ = self->priv->views_group;
	_tmp50_ = objects_filters_tomorrow_get_default ();
	_tmp51_ = _tmp50_;
	_tmp52_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp51_);
	g_object_ref_sink (_tmp52_);
	_tmp53_ = _tmp52_;
	layouts_header_item_add_child (_tmp49_, (GtkWidget*) _tmp53_);
	_g_object_unref0 (_tmp53_);
	_g_object_unref0 (_tmp51_);
	_tmp54_ = self->priv->views_group;
	_tmp55_ = objects_filters_anytime_get_default ();
	_tmp56_ = _tmp55_;
	_tmp57_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp56_);
	g_object_ref_sink (_tmp57_);
	_tmp58_ = _tmp57_;
	layouts_header_item_add_child (_tmp54_, (GtkWidget*) _tmp58_);
	_g_object_unref0 (_tmp58_);
	_g_object_unref0 (_tmp56_);
	_tmp59_ = self->priv->views_group;
	_tmp60_ = objects_filters_repeating_get_default ();
	_tmp61_ = _tmp60_;
	_tmp62_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp61_);
	g_object_ref_sink (_tmp62_);
	_tmp63_ = _tmp62_;
	layouts_header_item_add_child (_tmp59_, (GtkWidget*) _tmp63_);
	_g_object_unref0 (_tmp63_);
	_g_object_unref0 (_tmp61_);
	_tmp64_ = self->priv->views_group;
	_tmp65_ = objects_filters_unlabeled_get_default ();
	_tmp66_ = _tmp65_;
	_tmp67_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp66_);
	g_object_ref_sink (_tmp67_);
	_tmp68_ = _tmp67_;
	layouts_header_item_add_child (_tmp64_, (GtkWidget*) _tmp68_);
	_g_object_unref0 (_tmp68_);
	_g_object_unref0 (_tmp66_);
	_tmp69_ = self->priv->views_group;
	_tmp70_ = objects_filters_all_items_get_default ();
	_tmp71_ = _tmp70_;
	_tmp72_ = dialogs_preferences_pages_sidebar_sidebar_row_new ((ObjectsBaseObject*) _tmp71_);
	g_object_ref_sink (_tmp72_);
	_tmp73_ = _tmp72_;
	layouts_header_item_add_child (_tmp69_, (GtkWidget*) _tmp73_);
	_g_object_unref0 (_tmp73_);
	_g_object_unref0 (_tmp71_);
	_tmp74_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp74_, 6);
	g_object_ref_sink (_tmp74_);
	content_box = _tmp74_;
	_tmp75_ = content_box;
	_tmp76_ = count_group;
	gtk_box_append (_tmp75_, (GtkWidget*) _tmp76_);
	_tmp77_ = content_box;
	_tmp78_ = self->priv->views_group;
	gtk_box_append (_tmp77_, (GtkWidget*) _tmp78_);
	_tmp79_ = content_box;
	_tmp80_ = g_strdup ("caption");
	_tmp81_ = g_strdup ("dimmed");
	_tmp82_ = g_new0 (gchar*, 2 + 1);
	_tmp82_[0] = _tmp80_;
	_tmp82_[1] = _tmp81_;
	_tmp83_ = (GtkLabel*) gtk_label_new (_ ("You can sort your views by dragging and dropping"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp83_, _tmp82_);
	_tmp82_ = (_vala_array_free (_tmp82_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp83_, GTK_ALIGN_START);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp83_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp83_, 3);
	g_object_ref_sink (_tmp83_);
	_tmp84_ = _tmp83_;
	gtk_box_append (_tmp79_, (GtkWidget*) _tmp84_);
	_g_object_unref0 (_tmp84_);
	_tmp85_ = content_box;
	_tmp86_ = widgets_scrolled_window_new ((GtkWidget*) _tmp85_, GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp86_);
	scrolled_window = _tmp86_;
	_tmp87_ = scrolled_window;
	_tmp88_ = _g_object_ref0 ((GtkWidget*) _tmp87_);
	_tmp89_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp89_, _tmp88_);
	_g_object_unref0 (_tmp88_);
	g_object_ref_sink (_tmp89_);
	toolbar_view = _tmp89_;
	_tmp90_ = toolbar_view;
	_tmp91_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp91_);
	_tmp92_ = _tmp91_;
	adw_toolbar_view_add_top_bar (_tmp90_, (GtkWidget*) _tmp92_);
	_g_object_unref0 (_tmp92_);
	_tmp93_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp93_);
	_tmp94_ = services_settings_get_default ();
	_tmp95_ = _tmp94_;
	_tmp96_ = _tmp95_->settings;
	_tmp97_ = show_count_row;
	g_settings_bind (_tmp96_, "show-tasks-count", (GObject*) _tmp97_, "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp95_);
	_tmp98_ = services_settings_get_default ();
	_tmp99_ = _tmp98_;
	_tmp100_ = _tmp99_->settings;
	_tmp101_ = list_view_filters_row;
	g_settings_bind (_tmp100_, "filters-list-view", (GObject*) _tmp101_, "active", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp99_);
	_tmp102_ = self->priv->views_group;
	layouts_header_item_set_sort_func (_tmp102_, __dialogs_preferences_pages_sidebar___lambda402__gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp103_ = self->priv->views_group;
	layouts_header_item_set_sort_func (_tmp103_, NULL, NULL, NULL);
	_tmp104_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp105_ = _data99_->sidebar_width_row;
	_tmp106_ = g_signal_connect_data (_tmp105_, "output", (GCallback) __dialogs_preferences_pages_sidebar___lambda403__adw_spin_row_output, block99_data_ref (_data99_), (GClosureNotify) block99_data_unref, 0);
	_tmp107_ = _data99_->sidebar_width_row;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp104_, (gpointer) ((guintptr) _tmp106_), (GObject*) _tmp107_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_sidebar___lambda404__gtk_widget_destroy, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (content_box);
	_g_object_unref0 (count_group);
	_g_object_unref0 (list_view_filters_row);
	_g_object_unref0 (show_count_row);
	block99_data_unref (_data99_);
	_data99_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_sidebar_class_init (DialogsPreferencesPagesSidebarClass * klass,
                                              gpointer klass_data)
{
	dialogs_preferences_pages_sidebar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesSidebar_private_offset);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_sidebar_real_clean_up;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_sidebar_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_sidebar_finalize;
}

static void
dialogs_preferences_pages_sidebar_instance_init (DialogsPreferencesPagesSidebar * self,
                                                 gpointer klass)
{
	self->priv = dialogs_preferences_pages_sidebar_get_instance_private (self);
}

static void
dialogs_preferences_pages_sidebar_finalize (GObject * obj)
{
	DialogsPreferencesPagesSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_SIDEBAR, DialogsPreferencesPagesSidebar);
	g_debug ("Sidebar.vala:33: Destroying - Dialogs.Preferences.Pages.Sidebar\n");
	_g_object_unref0 (self->priv->views_group);
	G_OBJECT_CLASS (dialogs_preferences_pages_sidebar_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_sidebar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesSidebarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_sidebar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesSidebar), 0, (GInstanceInitFunc) dialogs_preferences_pages_sidebar_instance_init, NULL };
	GType dialogs_preferences_pages_sidebar_type_id;
	dialogs_preferences_pages_sidebar_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesSidebar", &g_define_type_info, 0);
	DialogsPreferencesPagesSidebar_private_offset = g_type_add_instance_private (dialogs_preferences_pages_sidebar_type_id, sizeof (DialogsPreferencesPagesSidebarPrivate));
	return dialogs_preferences_pages_sidebar_type_id;
}

GType
dialogs_preferences_pages_sidebar_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_sidebar_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_sidebar_type_id__once)) {
		GType dialogs_preferences_pages_sidebar_type_id;
		dialogs_preferences_pages_sidebar_type_id = dialogs_preferences_pages_sidebar_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_sidebar_type_id__once, dialogs_preferences_pages_sidebar_type_id);
	}
	return dialogs_preferences_pages_sidebar_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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

