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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include "libdino.h"
#include <gee.h>
#include <string.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 DINO_UI_TYPE_PREFERENCES_WINDOW (dino_ui_preferences_window_get_type ())
#define DINO_UI_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindow))
#define DINO_UI_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindowClass))
#define DINO_UI_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW))
#define DINO_UI_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW))
#define DINO_UI_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindowClass))

typedef struct _DinoUiPreferencesWindow DinoUiPreferencesWindow;
typedef struct _DinoUiPreferencesWindowClass DinoUiPreferencesWindowClass;
typedef struct _DinoUiPreferencesWindowPrivate DinoUiPreferencesWindowPrivate;

#define DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS (dino_ui_preferences_window_accounts_get_type ())
#define DINO_UI_PREFERENCES_WINDOW_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS, DinoUiPreferencesWindowAccounts))
#define DINO_UI_PREFERENCES_WINDOW_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS, DinoUiPreferencesWindowAccountsClass))
#define DINO_UI_IS_PREFERENCES_WINDOW_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS))
#define DINO_UI_IS_PREFERENCES_WINDOW_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS))
#define DINO_UI_PREFERENCES_WINDOW_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS, DinoUiPreferencesWindowAccountsClass))

typedef struct _DinoUiPreferencesWindowAccounts DinoUiPreferencesWindowAccounts;
typedef struct _DinoUiPreferencesWindowAccountsClass DinoUiPreferencesWindowAccountsClass;

#define DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION (dino_ui_preferences_window_encryption_get_type ())
#define DINO_UI_PREFERENCES_WINDOW_ENCRYPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION, DinoUiPreferencesWindowEncryption))
#define DINO_UI_PREFERENCES_WINDOW_ENCRYPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION, DinoUiPreferencesWindowEncryptionClass))
#define DINO_UI_IS_PREFERENCES_WINDOW_ENCRYPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION))
#define DINO_UI_IS_PREFERENCES_WINDOW_ENCRYPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION))
#define DINO_UI_PREFERENCES_WINDOW_ENCRYPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION, DinoUiPreferencesWindowEncryptionClass))

typedef struct _DinoUiPreferencesWindowEncryption DinoUiPreferencesWindowEncryption;
typedef struct _DinoUiPreferencesWindowEncryptionClass DinoUiPreferencesWindowEncryptionClass;

#define DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE (dino_ui_general_preferences_page_get_type ())
#define DINO_UI_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage))
#define DINO_UI_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPageClass))
#define DINO_UI_IS_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_IS_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_GENERAL_PREFERENCES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPageClass))

typedef struct _DinoUiGeneralPreferencesPage DinoUiGeneralPreferencesPage;
typedef struct _DinoUiGeneralPreferencesPageClass DinoUiGeneralPreferencesPageClass;

#define DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE (dino_ui_account_preferences_subpage_get_type ())
#define DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpage))
#define DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpageClass))
#define DINO_UI_IS_ACCOUNT_PREFERENCES_SUBPAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE))
#define DINO_UI_IS_ACCOUNT_PREFERENCES_SUBPAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE))
#define DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpageClass))

typedef struct _DinoUiAccountPreferencesSubpage DinoUiAccountPreferencesSubpage;
typedef struct _DinoUiAccountPreferencesSubpageClass DinoUiAccountPreferencesSubpageClass;

#define DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW (dino_ui_view_model_preferences_window_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW, DinoUiViewModelPreferencesWindow))
#define DINO_UI_VIEW_MODEL_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW, DinoUiViewModelPreferencesWindowClass))
#define DINO_UI_VIEW_MODEL_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW))
#define DINO_UI_VIEW_MODEL_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW))
#define DINO_UI_VIEW_MODEL_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW, DinoUiViewModelPreferencesWindowClass))

typedef struct _DinoUiViewModelPreferencesWindow DinoUiViewModelPreferencesWindow;
typedef struct _DinoUiViewModelPreferencesWindowClass DinoUiViewModelPreferencesWindowClass;
enum  {
	DINO_UI_PREFERENCES_WINDOW_0_PROPERTY,
	DINO_UI_PREFERENCES_WINDOW_MODEL_PROPERTY,
	DINO_UI_PREFERENCES_WINDOW_NUM_PROPERTIES
};
static GParamSpec* dino_ui_preferences_window_properties[DINO_UI_PREFERENCES_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _DinoUiViewModelPreferencesWindowPrivate DinoUiViewModelPreferencesWindowPrivate;

#define DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS (dino_ui_view_model_account_details_get_type ())
#define DINO_UI_VIEW_MODEL_ACCOUNT_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS, DinoUiViewModelAccountDetails))
#define DINO_UI_VIEW_MODEL_ACCOUNT_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS, DinoUiViewModelAccountDetailsClass))
#define DINO_UI_VIEW_MODEL_IS_ACCOUNT_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS))
#define DINO_UI_VIEW_MODEL_IS_ACCOUNT_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS))
#define DINO_UI_VIEW_MODEL_ACCOUNT_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_ACCOUNT_DETAILS, DinoUiViewModelAccountDetailsClass))

typedef struct _DinoUiViewModelAccountDetails DinoUiViewModelAccountDetails;
typedef struct _DinoUiViewModelAccountDetailsClass DinoUiViewModelAccountDetailsClass;

struct _DinoUiPreferencesWindow {
	AdwPreferencesWindow parent_instance;
	DinoUiPreferencesWindowPrivate * priv;
	DinoUiPreferencesWindowAccounts* accounts_page;
	DinoUiPreferencesWindowEncryption* encryption_page;
	DinoUiGeneralPreferencesPage* general_page;
	DinoUiAccountPreferencesSubpage* account_page;
};

struct _DinoUiPreferencesWindowClass {
	AdwPreferencesWindowClass parent_class;
};

struct _DinoUiPreferencesWindowPrivate {
	DinoUiViewModelPreferencesWindow* _model;
};

struct _DinoUiViewModelPreferencesWindow {
	GObject parent_instance;
	DinoUiViewModelPreferencesWindowPrivate * priv;
	GeeHashMap* account_details;
	DinoStreamInteractor* stream_interactor;
	DinoDatabase* db;
};

struct _DinoUiViewModelPreferencesWindowClass {
	GObjectClass parent_class;
};

static gint DinoUiPreferencesWindow_private_offset;
static gpointer dino_ui_preferences_window_parent_class = NULL;

VALA_EXTERN GType dino_ui_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiPreferencesWindow, g_object_unref)
VALA_EXTERN GType dino_ui_preferences_window_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiPreferencesWindowAccounts, g_object_unref)
VALA_EXTERN GType dino_ui_preferences_window_encryption_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiPreferencesWindowEncryption, g_object_unref)
VALA_EXTERN GType dino_ui_general_preferences_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiGeneralPreferencesPage, g_object_unref)
VALA_EXTERN GType dino_ui_account_preferences_subpage_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAccountPreferencesSubpage, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesWindow, g_object_unref)
VALA_EXTERN DinoUiAccountPreferencesSubpage* dino_ui_account_preferences_subpage_new (void);
VALA_EXTERN DinoUiAccountPreferencesSubpage* dino_ui_account_preferences_subpage_construct (GType object_type);
VALA_EXTERN DinoUiPreferencesWindow* dino_ui_preferences_window_new (void);
VALA_EXTERN DinoUiPreferencesWindow* dino_ui_preferences_window_construct (GType object_type);
VALA_EXTERN DinoUiViewModelPreferencesWindow* dino_ui_preferences_window_get_model (DinoUiPreferencesWindow* self);
static GObject * dino_ui_preferences_window_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static void _dino_ui_preferences_window___lambda282_ (DinoUiPreferencesWindow* self,
                                               DinoEntitiesAccount* account);
VALA_EXTERN GType dino_ui_view_model_account_details_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAccountDetails, g_object_unref)
VALA_EXTERN void dino_ui_view_model_preferences_window_set_selected_account (DinoUiViewModelPreferencesWindow* self,
                                                                 DinoUiViewModelAccountDetails* value);
static void __dino_ui_preferences_window___lambda282__dino_ui_preferences_window_accounts_account_chosen (DinoUiPreferencesWindowAccounts* _sender,
                                                                                                   DinoEntitiesAccount* account,
                                                                                                   gpointer self);
static void dino_ui_preferences_window_finalize (GObject * obj);
static GType dino_ui_preferences_window_get_type_once (void);
static void _vala_dino_ui_preferences_window_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_preferences_window_get_instance_private (DinoUiPreferencesWindow* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiPreferencesWindow_private_offset);
}

DinoUiPreferencesWindow*
dino_ui_preferences_window_construct (GType object_type)
{
	DinoUiPreferencesWindow * self = NULL;
	self = (DinoUiPreferencesWindow*) g_object_new (object_type, NULL);
	return self;
}

DinoUiPreferencesWindow*
dino_ui_preferences_window_new (void)
{
	return dino_ui_preferences_window_construct (DINO_UI_TYPE_PREFERENCES_WINDOW);
}

DinoUiViewModelPreferencesWindow*
dino_ui_preferences_window_get_model (DinoUiPreferencesWindow* self)
{
	DinoUiViewModelPreferencesWindow* result;
	DinoUiViewModelPreferencesWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

static void
_dino_ui_preferences_window___lambda282_ (DinoUiPreferencesWindow* self,
                                          DinoEntitiesAccount* account)
{
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoUiViewModelPreferencesWindow* _tmp1_;
	GeeHashMap* _tmp2_;
	gpointer _tmp3_;
	DinoUiViewModelAccountDetails* _tmp4_;
	DinoUiAccountPreferencesSubpage* _tmp5_;
	g_return_if_fail (account != NULL);
	_tmp0_ = self->priv->_model;
	_tmp1_ = self->priv->_model;
	_tmp2_ = _tmp1_->account_details;
	_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, account);
	_tmp4_ = (DinoUiViewModelAccountDetails*) _tmp3_;
	dino_ui_view_model_preferences_window_set_selected_account (_tmp0_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->account_page;
	adw_preferences_window_present_subpage ((AdwPreferencesWindow*) self, (GtkWidget*) _tmp5_);
}

static void
__dino_ui_preferences_window___lambda282__dino_ui_preferences_window_accounts_account_chosen (DinoUiPreferencesWindowAccounts* _sender,
                                                                                              DinoEntitiesAccount* account,
                                                                                              gpointer self)
{
	_dino_ui_preferences_window___lambda282_ ((DinoUiPreferencesWindow*) self, account);
}

static GObject *
dino_ui_preferences_window_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiPreferencesWindow * self;
	DinoUiPreferencesWindowAccounts* _tmp0_;
	DinoUiAccountPreferencesSubpage* _tmp1_;
	DinoUiPreferencesWindowEncryption* _tmp2_;
	DinoUiPreferencesWindowAccounts* _tmp3_;
	parent_class = G_OBJECT_CLASS (dino_ui_preferences_window_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindow);
	adw_preferences_window_set_can_navigate_back ((AdwPreferencesWindow*) self, TRUE);
	_tmp0_ = self->accounts_page;
	g_object_bind_property_with_closures ((GObject*) self, "model", (GObject*) _tmp0_, "model", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp1_ = self->account_page;
	g_object_bind_property_with_closures ((GObject*) self, "model", (GObject*) _tmp1_, "model", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp2_ = self->encryption_page;
	g_object_bind_property_with_closures ((GObject*) self, "model", (GObject*) _tmp2_, "model", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp3_ = self->accounts_page;
	g_signal_connect_object (_tmp3_, "account-chosen", (GCallback) __dino_ui_preferences_window___lambda282__dino_ui_preferences_window_accounts_account_chosen, self, 0);
	return obj;
}

static void
dino_ui_preferences_window_class_init (DinoUiPreferencesWindowClass * klass,
                                       gpointer klass_data)
{
	dino_ui_preferences_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiPreferencesWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_preferences_window_get_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_preferences_window_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_preferences_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_PREFERENCES_WINDOW_MODEL_PROPERTY, dino_ui_preferences_window_properties[DINO_UI_PREFERENCES_WINDOW_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/im/dino/Dino/preferences_window/preferences_window.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "accounts_page", FALSE, G_STRUCT_OFFSET (DinoUiPreferencesWindow, accounts_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "encryption_page", FALSE, G_STRUCT_OFFSET (DinoUiPreferencesWindow, encryption_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "general_page", FALSE, G_STRUCT_OFFSET (DinoUiPreferencesWindow, general_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "model", FALSE, DinoUiPreferencesWindow_private_offset + G_STRUCT_OFFSET (DinoUiPreferencesWindowPrivate, _model));
}

static void
dino_ui_preferences_window_instance_init (DinoUiPreferencesWindow * self,
                                          gpointer klass)
{
	DinoUiAccountPreferencesSubpage* _tmp0_;
	self->priv = dino_ui_preferences_window_get_instance_private (self);
	_tmp0_ = dino_ui_account_preferences_subpage_new ();
	g_object_ref_sink (_tmp0_);
	self->account_page = _tmp0_;
	g_type_ensure (DINO_UI_TYPE_PREFERENCES_WINDOW_ACCOUNTS);
	g_type_ensure (DINO_UI_TYPE_PREFERENCES_WINDOW_ENCRYPTION);
	g_type_ensure (DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE);
	g_type_ensure (DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_preferences_window_finalize (GObject * obj)
{
	DinoUiPreferencesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindow);
	_g_object_unref0 (self->account_page);
	G_OBJECT_CLASS (dino_ui_preferences_window_parent_class)->finalize (obj);
}

static GType
dino_ui_preferences_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiPreferencesWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_preferences_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiPreferencesWindow), 0, (GInstanceInitFunc) dino_ui_preferences_window_instance_init, NULL };
	GType dino_ui_preferences_window_type_id;
	dino_ui_preferences_window_type_id = g_type_register_static (adw_preferences_window_get_type (), "DinoUiPreferencesWindow", &g_define_type_info, 0);
	DinoUiPreferencesWindow_private_offset = g_type_add_instance_private (dino_ui_preferences_window_type_id, sizeof (DinoUiPreferencesWindowPrivate));
	return dino_ui_preferences_window_type_id;
}

GType
dino_ui_preferences_window_get_type (void)
{
	static volatile gsize dino_ui_preferences_window_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_preferences_window_type_id__once)) {
		GType dino_ui_preferences_window_type_id;
		dino_ui_preferences_window_type_id = dino_ui_preferences_window_get_type_once ();
		g_once_init_leave (&dino_ui_preferences_window_type_id__once, dino_ui_preferences_window_type_id);
	}
	return dino_ui_preferences_window_type_id__once;
}

static void
_vala_dino_ui_preferences_window_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	DinoUiPreferencesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_PREFERENCES_WINDOW, DinoUiPreferencesWindow);
	switch (property_id) {
		case DINO_UI_PREFERENCES_WINDOW_MODEL_PROPERTY:
		g_value_set_object (value, dino_ui_preferences_window_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

