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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <adwaita.h>
#include <glib.h>
#include "dino_i18n.h"
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gio/gio.h>
#include "libdino.h"
#include "xmpp-vala.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_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;
typedef struct _DinoUiAccountPreferencesSubpagePrivate DinoUiAccountPreferencesSubpagePrivate;

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;

#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_ACCOUNT_PREFERENCES_SUBPAGE_0_PROPERTY,
	DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_ACCOUNT_PROPERTY,
	DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY,
	DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_NUM_PROPERTIES
};
static GParamSpec* dino_ui_account_preferences_subpage_properties[DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block78Data Block78Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_GdkPixbufFormat_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkPixbufFormat_free (var), NULL)))
typedef struct _Block79Data Block79Data;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))

#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;
#define _dino_connection_manager_connection_error_unref0(var) ((var == NULL) ? NULL : (var = (dino_connection_manager_connection_error_unref (var), NULL)))

#define DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT (dino_ui_natural_direction_box_layout_get_type ())
#define DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT, DinoUiNaturalDirectionBoxLayout))
#define DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT, DinoUiNaturalDirectionBoxLayoutClass))
#define DINO_UI_IS_NATURAL_DIRECTION_BOX_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT))
#define DINO_UI_IS_NATURAL_DIRECTION_BOX_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT))
#define DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT, DinoUiNaturalDirectionBoxLayoutClass))

typedef struct _DinoUiNaturalDirectionBoxLayout DinoUiNaturalDirectionBoxLayout;
typedef struct _DinoUiNaturalDirectionBoxLayoutClass DinoUiNaturalDirectionBoxLayoutClass;

#define DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG (dino_ui_change_password_dialog_get_type ())
#define DINO_UI_CHANGE_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiChangePasswordDialog))
#define DINO_UI_CHANGE_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiChangePasswordDialogClass))
#define DINO_UI_IS_CHANGE_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG))
#define DINO_UI_IS_CHANGE_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG))
#define DINO_UI_CHANGE_PASSWORD_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiChangePasswordDialogClass))

typedef struct _DinoUiChangePasswordDialog DinoUiChangePasswordDialog;
typedef struct _DinoUiChangePasswordDialogClass DinoUiChangePasswordDialogClass;

#define DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG (dino_ui_view_model_change_password_dialog_get_type ())
#define DINO_UI_VIEW_MODEL_CHANGE_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiViewModelChangePasswordDialog))
#define DINO_UI_VIEW_MODEL_CHANGE_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiViewModelChangePasswordDialogClass))
#define DINO_UI_VIEW_MODEL_IS_CHANGE_PASSWORD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG))
#define DINO_UI_VIEW_MODEL_IS_CHANGE_PASSWORD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG))
#define DINO_UI_VIEW_MODEL_CHANGE_PASSWORD_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_CHANGE_PASSWORD_DIALOG, DinoUiViewModelChangePasswordDialogClass))

typedef struct _DinoUiViewModelChangePasswordDialog DinoUiViewModelChangePasswordDialog;
typedef struct _DinoUiViewModelChangePasswordDialogClass DinoUiViewModelChangePasswordDialogClass;
typedef struct _Block80Data Block80Data;

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL (dino_ui_view_model_avatar_picture_tile_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_TILE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL, DinoUiViewModelAvatarPictureTileModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_TILE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL, DinoUiViewModelAvatarPictureTileModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_TILE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_TILE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_TILE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_TILE_MODEL, DinoUiViewModelAvatarPictureTileModelClass))

typedef struct _DinoUiViewModelAvatarPictureTileModel DinoUiViewModelAvatarPictureTileModel;
typedef struct _DinoUiViewModelAvatarPictureTileModelClass DinoUiViewModelAvatarPictureTileModelClass;
typedef struct _Block81Data Block81Data;

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;
typedef struct _DinoUiNaturalDirectionBoxLayoutPrivate DinoUiNaturalDirectionBoxLayoutPrivate;
enum  {
	DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT_0_PROPERTY,
	DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT_NUM_PROPERTIES
};
static GParamSpec* dino_ui_natural_direction_box_layout_properties[DINO_UI_NATURAL_DIRECTION_BOX_LAYOUT_NUM_PROPERTIES];

struct _DinoUiAccountPreferencesSubpage {
	GtkBox parent_instance;
	DinoUiAccountPreferencesSubpagePrivate * priv;
	AdwHeaderBar* headerbar;
	GtkButton* back_button;
	DinoUiAvatarPicture* avatar;
	AdwActionRow* xmpp_address;
	AdwEntryRow* local_alias;
	AdwActionRow* password_change;
	AdwActionRow* connection_status;
	GtkButton* enter_password_button;
	GtkBox* avatar_menu_box;
	GtkButton* edit_avatar_button;
	GtkButton* remove_avatar_button;
	GtkWidget* button_container;
	GtkButton* remove_account_button;
	GtkButton* disable_account_button;
};

struct _DinoUiAccountPreferencesSubpageClass {
	GtkBoxClass parent_class;
};

struct _DinoUiAccountPreferencesSubpagePrivate {
	DinoUiViewModelPreferencesWindow* _model;
	GBinding** bindings;
	gint bindings_length1;
	gint _bindings_size_;
	gulong* account_notify_ids;
	gint account_notify_ids_length1;
	gint _account_notify_ids_size_;
	gulong alias_entry_changed;
};

struct _Block78Data {
	int _ref_count_;
	DinoUiAccountPreferencesSubpage* self;
	GtkFileChooserNative* chooser;
};

struct _Block79Data {
	int _ref_count_;
	DinoUiAccountPreferencesSubpage* self;
	AdwMessageDialog* dialog;
};

struct _Block80Data {
	int _ref_count_;
	DinoUiAccountPreferencesSubpage* self;
	GtkPasswordEntry* password;
};

struct _Block81Data {
	int _ref_count_;
	DinoUiAccountPreferencesSubpage* self;
	DinoUiViewModelAvatarPictureTileModel* avatar_model;
};

struct _DinoUiNaturalDirectionBoxLayout {
	GtkLayoutManager parent_instance;
	DinoUiNaturalDirectionBoxLayoutPrivate * priv;
};

struct _DinoUiNaturalDirectionBoxLayoutClass {
	GtkLayoutManagerClass parent_class;
};

struct _DinoUiNaturalDirectionBoxLayoutPrivate {
	GtkBoxLayout* original;
	GtkBoxLayout* alternative;
};

static gint DinoUiAccountPreferencesSubpage_private_offset;
static gpointer dino_ui_account_preferences_subpage_parent_class = NULL;
static gint DinoUiNaturalDirectionBoxLayout_private_offset;
static gpointer dino_ui_natural_direction_box_layout_parent_class = NULL;

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_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, 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)
static void dino_ui_account_preferences_subpage_show_select_avatar (DinoUiAccountPreferencesSubpage* self);
static Block78Data* block78_data_ref (Block78Data* _data78_);
static void block78_data_unref (void * _userdata_);
static GdkPixbufFormat* _vala_GdkPixbufFormat_copy (GdkPixbufFormat* self);
static void _vala_GdkPixbufFormat_free (GdkPixbufFormat* self);
static void __lambda262_ (Block78Data* _data78_);
VALA_EXTERN DinoUiViewModelPreferencesWindow* dino_ui_account_preferences_subpage_get_model (DinoUiAccountPreferencesSubpage* self);
VALA_EXTERN void dino_ui_view_model_preferences_window_set_avatar_uri (DinoUiViewModelPreferencesWindow* self,
                                                           DinoEntitiesAccount* account,
                                                           const gchar* uri);
VALA_EXTERN DinoEntitiesAccount* dino_ui_account_preferences_subpage_get_account (DinoUiAccountPreferencesSubpage* self);
static void ___lambda262__gtk_native_dialog_response (GtkNativeDialog* _sender,
                                               gint response_id,
                                               gpointer self);
static void dino_ui_account_preferences_subpage_show_remove_account_dialog (DinoUiAccountPreferencesSubpage* self);
static Block79Data* block79_data_ref (Block79Data* _data79_);
static void block79_data_unref (void * _userdata_);
static void __lambda263_ (Block79Data* _data79_,
                   const gchar* response);
VALA_EXTERN void dino_ui_view_model_preferences_window_remove_account (DinoUiViewModelPreferencesWindow* self,
                                                           DinoEntitiesAccount* account);
static void ___lambda263__adw_message_dialog_response (AdwMessageDialog* _sender,
                                                const gchar* response,
                                                gpointer self);
static gchar* dino_ui_account_preferences_subpage_get_status_label (DinoUiAccountPreferencesSubpage* self);
static gchar* dino_ui_account_preferences_subpage_get_connection_error_description (DinoUiAccountPreferencesSubpage* self);
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 DinoUiViewModelAccountDetails* dino_ui_view_model_preferences_window_get_selected_account (DinoUiViewModelPreferencesWindow* self);
VALA_EXTERN DinoConnectionManagerConnectionState dino_ui_view_model_account_details_get_connection_state (DinoUiViewModelAccountDetails* self);
VALA_EXTERN DinoConnectionManagerConnectionError* dino_ui_view_model_account_details_get_connection_error (DinoUiViewModelAccountDetails* self);
VALA_EXTERN DinoUiAccountPreferencesSubpage* dino_ui_account_preferences_subpage_new (void);
VALA_EXTERN DinoUiAccountPreferencesSubpage* dino_ui_account_preferences_subpage_construct (GType object_type);
VALA_EXTERN DinoEntitiesAccount* dino_ui_view_model_account_details_get_account (DinoUiViewModelAccountDetails* self);
VALA_EXTERN void dino_ui_account_preferences_subpage_set_model (DinoUiAccountPreferencesSubpage* self,
                                                    DinoUiViewModelPreferencesWindow* value);
static GObject * dino_ui_account_preferences_subpage_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties);
VALA_EXTERN DinoUiNaturalDirectionBoxLayout* dino_ui_natural_direction_box_layout_new (GtkBoxLayout* original);
VALA_EXTERN DinoUiNaturalDirectionBoxLayout* dino_ui_natural_direction_box_layout_construct (GType object_type,
                                                                                 GtkBoxLayout* original);
VALA_EXTERN GType dino_ui_natural_direction_box_layout_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiNaturalDirectionBoxLayout, g_object_unref)
static void _dino_ui_account_preferences_subpage___lambda264_ (DinoUiAccountPreferencesSubpage* self);
static void __dino_ui_account_preferences_subpage___lambda264__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda265_ (DinoUiAccountPreferencesSubpage* self);
static void __dino_ui_account_preferences_subpage___lambda265__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda266_ (DinoUiAccountPreferencesSubpage* self);
VALA_EXTERN void dino_ui_view_model_preferences_window_remove_avatar (DinoUiViewModelPreferencesWindow* self,
                                                          DinoEntitiesAccount* account);
static void __dino_ui_account_preferences_subpage___lambda266__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda267_ (DinoUiAccountPreferencesSubpage* self);
VALA_EXTERN void dino_ui_view_model_preferences_window_enable_disable_account (DinoUiViewModelPreferencesWindow* self,
                                                                   DinoEntitiesAccount* account);
static void __dino_ui_account_preferences_subpage___lambda267__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda268_ (DinoUiAccountPreferencesSubpage* self);
static void __dino_ui_account_preferences_subpage___lambda268__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda269_ (DinoUiAccountPreferencesSubpage* self);
VALA_EXTERN GType dino_ui_change_password_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChangePasswordDialog, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_change_password_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelChangePasswordDialog, g_object_unref)
VALA_EXTERN DinoUiViewModelChangePasswordDialog* dino_ui_view_model_preferences_window_get_change_password_dialog_model (DinoUiViewModelPreferencesWindow* self);
VALA_EXTERN DinoUiChangePasswordDialog* dino_ui_change_password_dialog_new (DinoUiViewModelChangePasswordDialog* model);
VALA_EXTERN DinoUiChangePasswordDialog* dino_ui_change_password_dialog_construct (GType object_type,
                                                                      DinoUiViewModelChangePasswordDialog* model);
static void __dino_ui_account_preferences_subpage___lambda269__adw_action_row_activated (AdwActionRow* _sender,
                                                                                  gpointer self);
static void _dino_ui_account_preferences_subpage___lambda271_ (DinoUiAccountPreferencesSubpage* self);
static Block80Data* block80_data_ref (Block80Data* _data80_);
static void block80_data_unref (void * _userdata_);
static void __lambda272_ (Block80Data* _data80_,
                   const gchar* response);
VALA_EXTERN void dino_ui_view_model_preferences_window_reconnect_account (DinoUiViewModelPreferencesWindow* self,
                                                              DinoEntitiesAccount* account);
static void ___lambda272__adw_message_dialog_response (AdwMessageDialog* _sender,
                                                const gchar* response,
                                                gpointer self);
static void __dino_ui_account_preferences_subpage___lambda271__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dino_ui_account_preferences_subpage___lambda273_ (DinoUiAccountPreferencesSubpage* self);
static void __lambda274_ (DinoUiAccountPreferencesSubpage* self);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_tile_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureTileModel, g_object_unref)
static Block81Data* block81_data_ref (Block81Data* _data81_);
static void block81_data_unref (void * _userdata_);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_account_details_get_avatar_model (DinoUiViewModelAccountDetails* self);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
static void __lambda275_ (DinoUiAccountPreferencesSubpage* self);
static void ___lambda275__gtk_editable_changed (GtkEditable* _sender,
                                         gpointer self);
static gboolean __lambda276_ (DinoUiAccountPreferencesSubpage* self,
                       GBinding* binding,
                       GValue* from,
                       GValue* to);
static gboolean ___lambda276__gbinding_transform_func (GBinding* binding,
                                                GValue* from_value,
                                                GValue* to_value,
                                                gpointer self);
static void _vala_array_add12 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static void _vala_array_add13 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static void _vala_array_add14 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static void _vala_array_add15 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static gboolean __lambda277_ (DinoUiAccountPreferencesSubpage* self,
                       GBinding* binding,
                       GValue* from,
                       GValue* to);
static gboolean ___lambda277__gbinding_transform_func (GBinding* binding,
                                                GValue* from_value,
                                                GValue* to_value,
                                                gpointer self);
static void _vala_array_add16 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static gboolean __lambda278_ (DinoUiAccountPreferencesSubpage* self,
                       GBinding* binding,
                       GValue* from,
                       GValue* to);
static gboolean ___lambda278__gbinding_transform_func (GBinding* binding,
                                                GValue* from_value,
                                                GValue* to_value,
                                                gpointer self);
static void _vala_array_add17 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
static gboolean __lambda279_ (DinoUiAccountPreferencesSubpage* self,
                       GBinding* binding,
                       GValue* from,
                       GValue* to);
static gboolean ___lambda279__gbinding_transform_func (GBinding* binding,
                                                GValue* from_value,
                                                GValue* to_value,
                                                gpointer self);
static void _vala_array_add18 (GBinding** * array,
                        gint* length,
                        gint* size,
                        GBinding* value);
VALA_EXTERN GListModel* dino_ui_view_model_avatar_picture_model_get_tiles (DinoUiViewModelAvatarPictureModel* self);
static void __lambda280_ (Block81Data* _data81_);
VALA_EXTERN GFile* dino_ui_view_model_avatar_picture_tile_model_get_image_file (DinoUiViewModelAvatarPictureTileModel* self);
static void ___lambda280__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda281_ (DinoUiAccountPreferencesSubpage* self);
static void ___lambda281__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void ___lambda274__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __dino_ui_account_preferences_subpage___lambda273__g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void dino_ui_account_preferences_subpage_finalize (GObject * obj);
static GType dino_ui_account_preferences_subpage_get_type_once (void);
static void _vala_dino_ui_account_preferences_subpage_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec);
static void _vala_dino_ui_account_preferences_subpage_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec);
static GtkSizeRequestMode dino_ui_natural_direction_box_layout_real_get_request_mode (GtkLayoutManager* base,
                                                                               GtkWidget* widget);
static void dino_ui_natural_direction_box_layout_real_allocate (GtkLayoutManager* base,
                                                         GtkWidget* widget,
                                                         gint width,
                                                         gint height,
                                                         gint baseline);
static void dino_ui_natural_direction_box_layout_real_measure (GtkLayoutManager* base,
                                                        GtkWidget* widget,
                                                        GtkOrientation orientation,
                                                        gint for_size,
                                                        gint* minimum,
                                                        gint* natural,
                                                        gint* minimum_baseline,
                                                        gint* natural_baseline);
static void dino_ui_natural_direction_box_layout_finalize (GObject * obj);
static GType dino_ui_natural_direction_box_layout_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 _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_account_preferences_subpage_get_instance_private (DinoUiAccountPreferencesSubpage* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiAccountPreferencesSubpage_private_offset);
}

static Block78Data*
block78_data_ref (Block78Data* _data78_)
{
	g_atomic_int_inc (&_data78_->_ref_count_);
	return _data78_;
}

static void
block78_data_unref (void * _userdata_)
{
	Block78Data* _data78_;
	_data78_ = (Block78Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data78_->_ref_count_)) {
		DinoUiAccountPreferencesSubpage* self;
		self = _data78_->self;
		_g_object_unref0 (_data78_->chooser);
		_g_object_unref0 (self);
		g_slice_free (Block78Data, _data78_);
	}
}

static GdkPixbufFormat*
_vala_GdkPixbufFormat_copy (GdkPixbufFormat* self)
{
	return g_boxed_copy (gdk_pixbuf_format_get_type (), self);
}

static gpointer
__vala_GdkPixbufFormat_copy0 (gpointer self)
{
	return self ? _vala_GdkPixbufFormat_copy (self) : NULL;
}

static void
_vala_GdkPixbufFormat_free (GdkPixbufFormat* self)
{
	g_boxed_free (gdk_pixbuf_format_get_type (), self);
}

static void
__lambda262_ (Block78Data* _data78_)
{
	DinoUiAccountPreferencesSubpage* self;
	gchar* uri = NULL;
	GtkFileChooserNative* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	DinoUiViewModelPreferencesWindow* _tmp5_;
	DinoEntitiesAccount* _tmp6_;
	DinoEntitiesAccount* _tmp7_;
	self = _data78_->self;
	_tmp0_ = _data78_->chooser;
	_tmp1_ = gtk_file_chooser_get_file ((GtkFileChooser*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_file_get_path (_tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	uri = _tmp4_;
	_tmp5_ = self->priv->_model;
	_tmp6_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp7_ = _tmp6_;
	dino_ui_view_model_preferences_window_set_avatar_uri (_tmp5_, _tmp7_, uri);
	_g_free0 (uri);
}

static void
___lambda262__gtk_native_dialog_response (GtkNativeDialog* _sender,
                                          gint response_id,
                                          gpointer self)
{
	__lambda262_ (self);
}

static void
dino_ui_account_preferences_subpage_show_select_avatar (DinoUiAccountPreferencesSubpage* self)
{
	Block78Data* _data78_;
	const gchar* _tmp0_;
	GtkRoot* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkFileChooserNative* _tmp4_;
	GtkFileFilter* filter = NULL;
	GtkFileFilter* _tmp5_;
	GSList* _tmp6_;
	GtkFileFilter* _tmp14_;
	const gchar* _tmp15_;
	GtkFileChooserNative* _tmp16_;
	GtkFileFilter* _tmp17_;
	GtkFileFilter* _tmp18_;
	GtkFileFilter* _tmp19_;
	const gchar* _tmp20_;
	GtkFileFilter* _tmp21_;
	GtkFileChooserNative* _tmp22_;
	GtkFileFilter* _tmp23_;
	GtkFileChooserNative* _tmp24_;
	GtkFileChooserNative* _tmp25_;
	g_return_if_fail (self != NULL);
	_data78_ = g_slice_new0 (Block78Data);
	_data78_->_ref_count_ = 1;
	_data78_->self = g_object_ref (self);
	_tmp0_ = dino_gettext ("Select avatar");
	_tmp1_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp2_ = dino_gettext ("Select");
	_tmp3_ = dino_gettext ("Cancel");
	_tmp4_ = gtk_file_chooser_native_new (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow), GTK_FILE_CHOOSER_ACTION_OPEN, _tmp2_, _tmp3_);
	_data78_->chooser = _tmp4_;
	_tmp5_ = gtk_file_filter_new ();
	filter = _tmp5_;
	_tmp6_ = gdk_pixbuf_get_formats ();
	{
		GSList* pixbuf_format_collection = NULL;
		GSList* pixbuf_format_it = NULL;
		pixbuf_format_collection = _tmp6_;
		for (pixbuf_format_it = pixbuf_format_collection; pixbuf_format_it != NULL; pixbuf_format_it = pixbuf_format_it->next) {
			GdkPixbufFormat* _tmp7_;
			GdkPixbufFormat* pixbuf_format = NULL;
			_tmp7_ = __vala_GdkPixbufFormat_copy0 ((GdkPixbufFormat*) pixbuf_format_it->data);
			pixbuf_format = _tmp7_;
			{
				GdkPixbufFormat* _tmp8_;
				gchar** _tmp9_;
				gchar** _tmp10_;
				_tmp8_ = pixbuf_format;
				_tmp10_ = _tmp9_ = gdk_pixbuf_format_get_mime_types (_tmp8_);
				{
					gchar** mime_type_collection = NULL;
					gint mime_type_collection_length1 = 0;
					gint _mime_type_collection_size_ = 0;
					gint mime_type_it = 0;
					mime_type_collection = _tmp10_;
					mime_type_collection_length1 = _vala_array_length (_tmp9_);
					for (mime_type_it = 0; mime_type_it < mime_type_collection_length1; mime_type_it = mime_type_it + 1) {
						gchar* _tmp11_;
						gchar* mime_type = NULL;
						_tmp11_ = g_strdup (mime_type_collection[mime_type_it]);
						mime_type = _tmp11_;
						{
							GtkFileFilter* _tmp12_;
							const gchar* _tmp13_;
							_tmp12_ = filter;
							_tmp13_ = mime_type;
							gtk_file_filter_add_mime_type (_tmp12_, _tmp13_);
							_g_free0 (mime_type);
						}
					}
					mime_type_collection = (_vala_array_free (mime_type_collection, mime_type_collection_length1, (GDestroyNotify) g_free), NULL);
				}
				__vala_GdkPixbufFormat_free0 (pixbuf_format);
			}
		}
		(pixbuf_format_collection == NULL) ? NULL : (pixbuf_format_collection = (g_slist_free (pixbuf_format_collection), NULL));
	}
	_tmp14_ = filter;
	_tmp15_ = dino_gettext ("Images");
	gtk_file_filter_set_name (_tmp14_, _tmp15_);
	_tmp16_ = _data78_->chooser;
	_tmp17_ = filter;
	gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp16_, _tmp17_);
	_tmp18_ = gtk_file_filter_new ();
	_g_object_unref0 (filter);
	filter = _tmp18_;
	_tmp19_ = filter;
	_tmp20_ = dino_gettext ("All files");
	gtk_file_filter_set_name (_tmp19_, _tmp20_);
	_tmp21_ = filter;
	gtk_file_filter_add_pattern (_tmp21_, "*");
	_tmp22_ = _data78_->chooser;
	_tmp23_ = filter;
	gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp22_, _tmp23_);
	_tmp24_ = _data78_->chooser;
	g_signal_connect_data ((GtkNativeDialog*) _tmp24_, "response", (GCallback) ___lambda262__gtk_native_dialog_response, block78_data_ref (_data78_), (GClosureNotify) block78_data_unref, 0);
	_tmp25_ = _data78_->chooser;
	gtk_native_dialog_show ((GtkNativeDialog*) _tmp25_);
	_g_object_unref0 (filter);
	block78_data_unref (_data78_);
	_data78_ = NULL;
}

static Block79Data*
block79_data_ref (Block79Data* _data79_)
{
	g_atomic_int_inc (&_data79_->_ref_count_);
	return _data79_;
}

static void
block79_data_unref (void * _userdata_)
{
	Block79Data* _data79_;
	_data79_ = (Block79Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data79_->_ref_count_)) {
		DinoUiAccountPreferencesSubpage* self;
		self = _data79_->self;
		_g_object_unref0 (_data79_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block79Data, _data79_);
	}
}

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

static void
__lambda263_ (Block79Data* _data79_,
              const gchar* response)
{
	DinoUiAccountPreferencesSubpage* self;
	self = _data79_->self;
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "remove") == 0) {
		DinoUiViewModelPreferencesWindow* _tmp0_;
		DinoEntitiesAccount* _tmp1_;
		DinoEntitiesAccount* _tmp2_;
		AdwPreferencesWindow* window = NULL;
		GtkRoot* _tmp3_;
		AdwPreferencesWindow* _tmp4_;
		AdwPreferencesWindow* _tmp5_;
		_tmp0_ = self->priv->_model;
		_tmp1_ = dino_ui_account_preferences_subpage_get_account (self);
		_tmp2_ = _tmp1_;
		dino_ui_view_model_preferences_window_remove_account (_tmp0_, _tmp2_);
		_tmp3_ = gtk_widget_get_root ((GtkWidget*) self);
		_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, adw_preferences_window_get_type (), AdwPreferencesWindow));
		window = _tmp4_;
		_tmp5_ = window;
		adw_preferences_window_close_subpage (_tmp5_);
		_g_object_unref0 (window);
	}
	gtk_window_close ((GtkWindow*) _data79_->dialog);
}

static void
___lambda263__adw_message_dialog_response (AdwMessageDialog* _sender,
                                           const gchar* response,
                                           gpointer self)
{
	__lambda263_ (self, response);
}

static void
dino_ui_account_preferences_subpage_show_remove_account_dialog (DinoUiAccountPreferencesSubpage* self)
{
	Block79Data* _data79_;
	GtkRoot* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	AdwMessageDialog* _tmp11_;
	AdwMessageDialog* _tmp12_;
	g_return_if_fail (self != NULL);
	_data79_ = g_slice_new0 (Block79Data);
	_data79_->_ref_count_ = 1;
	_data79_->self = g_object_ref (self);
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_entities_account_get_bare_jid (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_jid_to_string (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("Remove account %s?", _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = dino_gettext (_tmp9_);
	_tmp11_ = (AdwMessageDialog*) adw_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_window_get_type (), GtkWindow), _tmp10_, "You won't be able to access your conversation history anymore.");
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_xmpp_jid_unref0 (_tmp5_);
	_data79_->dialog = _tmp12_;
	adw_message_dialog_add_response (_data79_->dialog, "cancel", "Cancel");
	adw_message_dialog_add_response (_data79_->dialog, "remove", "Remove");
	adw_message_dialog_set_response_appearance (_data79_->dialog, "remove", ADW_RESPONSE_DESTRUCTIVE);
	g_signal_connect_data (_data79_->dialog, "response", (GCallback) ___lambda263__adw_message_dialog_response, block79_data_ref (_data79_), (GClosureNotify) block79_data_unref, 0);
	gtk_window_present ((GtkWindow*) _data79_->dialog);
	block79_data_unref (_data79_);
	_data79_ = NULL;
}

static gchar*
dino_ui_account_preferences_subpage_get_status_label (DinoUiAccountPreferencesSubpage* self)
{
	gchar* error_label = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	DinoConnectionManagerConnectionState state = 0;
	DinoUiViewModelPreferencesWindow* _tmp2_;
	DinoUiViewModelAccountDetails* _tmp3_;
	DinoUiViewModelAccountDetails* _tmp4_;
	DinoConnectionManagerConnectionState _tmp5_;
	DinoConnectionManagerConnectionState _tmp6_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = dino_ui_account_preferences_subpage_get_connection_error_description (self);
	error_label = _tmp0_;
	_tmp1_ = error_label;
	if (_tmp1_ != NULL) {
		result = error_label;
		return result;
	}
	_tmp2_ = self->priv->_model;
	_tmp3_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = dino_ui_view_model_account_details_get_connection_state (_tmp4_);
	_tmp6_ = _tmp5_;
	state = _tmp6_;
	switch (state) {
		case DINO_CONNECTION_MANAGER_CONNECTION_STATE_CONNECTING:
		{
			const gchar* _tmp7_;
			gchar* _tmp8_;
			_tmp7_ = dino_gettext ("Connecting…");
			_tmp8_ = g_strdup (_tmp7_);
			result = _tmp8_;
			_g_free0 (error_label);
			return result;
		}
		case DINO_CONNECTION_MANAGER_CONNECTION_STATE_CONNECTED:
		{
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = dino_gettext ("Connected");
			_tmp10_ = g_strdup (_tmp9_);
			result = _tmp10_;
			_g_free0 (error_label);
			return result;
		}
		case DINO_CONNECTION_MANAGER_CONNECTION_STATE_DISCONNECTED:
		{
			const gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp11_ = dino_gettext ("Disconnected");
			_tmp12_ = g_strdup (_tmp11_);
			result = _tmp12_;
			_g_free0 (error_label);
			return result;
		}
		default:
		break;
	}
	g_assert_not_reached ();
}

static gpointer
_dino_connection_manager_connection_error_ref0 (gpointer self)
{
	return self ? dino_connection_manager_connection_error_ref (self) : NULL;
}

static gchar*
dino_ui_account_preferences_subpage_get_connection_error_description (DinoUiAccountPreferencesSubpage* self)
{
	DinoConnectionManagerConnectionError* _error_ = NULL;
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoUiViewModelAccountDetails* _tmp1_;
	DinoUiViewModelAccountDetails* _tmp2_;
	DinoConnectionManagerConnectionError* _tmp3_;
	DinoConnectionManagerConnectionError* _tmp4_;
	DinoConnectionManagerConnectionError* _tmp5_;
	DinoConnectionManagerConnectionError* _tmp6_;
	DinoConnectionManagerConnectionError* _tmp7_;
	DinoConnectionManagerConnectionError* _tmp12_;
	const gchar* _tmp13_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_ui_view_model_account_details_get_connection_error (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _dino_connection_manager_connection_error_ref0 (_tmp4_);
	_error_ = _tmp5_;
	_tmp6_ = _error_;
	if (_tmp6_ == NULL) {
		result = NULL;
		_dino_connection_manager_connection_error_unref0 (_error_);
		return result;
	}
	_tmp7_ = _error_;
	switch (_tmp7_->source) {
		case DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_SASL:
		{
			const gchar* _tmp8_;
			gchar* _tmp9_;
			_tmp8_ = dino_gettext ("Wrong password");
			_tmp9_ = g_strdup (_tmp8_);
			result = _tmp9_;
			_dino_connection_manager_connection_error_unref0 (_error_);
			return result;
		}
		case DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_TLS:
		{
			const gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp10_ = dino_gettext ("Invalid TLS certificate");
			_tmp11_ = g_strdup (_tmp10_);
			result = _tmp11_;
			_dino_connection_manager_connection_error_unref0 (_error_);
			return result;
		}
		default:
		break;
	}
	_tmp12_ = _error_;
	_tmp13_ = _tmp12_->identifier;
	if (_tmp13_ != NULL) {
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		DinoConnectionManagerConnectionError* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		_tmp14_ = dino_gettext ("Error");
		_tmp15_ = g_strconcat (_tmp14_, ": ", NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = _error_;
		_tmp18_ = _tmp17_->identifier;
		_tmp19_ = g_strconcat (_tmp16_, _tmp18_, NULL);
		_tmp20_ = _tmp19_;
		_g_free0 (_tmp16_);
		result = _tmp20_;
		_dino_connection_manager_connection_error_unref0 (_error_);
		return result;
	} else {
		const gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp21_ = dino_gettext ("Error");
		_tmp22_ = g_strdup (_tmp21_);
		result = _tmp22_;
		_dino_connection_manager_connection_error_unref0 (_error_);
		return result;
	}
}

DinoUiAccountPreferencesSubpage*
dino_ui_account_preferences_subpage_construct (GType object_type)
{
	DinoUiAccountPreferencesSubpage * self = NULL;
	self = (DinoUiAccountPreferencesSubpage*) g_object_new (object_type, NULL);
	return self;
}

DinoUiAccountPreferencesSubpage*
dino_ui_account_preferences_subpage_new (void)
{
	return dino_ui_account_preferences_subpage_construct (DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE);
}

DinoEntitiesAccount*
dino_ui_account_preferences_subpage_get_account (DinoUiAccountPreferencesSubpage* self)
{
	DinoEntitiesAccount* result;
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoUiViewModelAccountDetails* _tmp1_;
	DinoUiViewModelAccountDetails* _tmp2_;
	DinoEntitiesAccount* _tmp3_;
	DinoEntitiesAccount* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_ui_view_model_account_details_get_account (_tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_;
	return result;
}

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

void
dino_ui_account_preferences_subpage_set_model (DinoUiAccountPreferencesSubpage* self,
                                               DinoUiViewModelPreferencesWindow* value)
{
	DinoUiViewModelPreferencesWindow* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_account_preferences_subpage_get_model (self);
	if (old_value != value) {
		DinoUiViewModelPreferencesWindow* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_account_preferences_subpage_properties[DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY]);
	}
}

static void
_dino_ui_account_preferences_subpage___lambda264_ (DinoUiAccountPreferencesSubpage* self)
{
	AdwPreferencesWindow* window = NULL;
	GtkRoot* _tmp0_;
	AdwPreferencesWindow* _tmp1_;
	AdwPreferencesWindow* _tmp2_;
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, adw_preferences_window_get_type (), AdwPreferencesWindow));
	window = _tmp1_;
	_tmp2_ = window;
	adw_preferences_window_close_subpage (_tmp2_);
	_g_object_unref0 (window);
}

static void
__dino_ui_account_preferences_subpage___lambda264__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda264_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda265_ (DinoUiAccountPreferencesSubpage* self)
{
	dino_ui_account_preferences_subpage_show_select_avatar (self);
}

static void
__dino_ui_account_preferences_subpage___lambda265__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda265_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda266_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp2_ = _tmp1_;
	dino_ui_view_model_preferences_window_remove_avatar (_tmp0_, _tmp2_);
}

static void
__dino_ui_account_preferences_subpage___lambda266__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda266_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda267_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp2_ = _tmp1_;
	dino_ui_view_model_preferences_window_enable_disable_account (_tmp0_, _tmp2_);
}

static void
__dino_ui_account_preferences_subpage___lambda267__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda267_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda268_ (DinoUiAccountPreferencesSubpage* self)
{
	dino_ui_account_preferences_subpage_show_remove_account_dialog (self);
}

static void
__dino_ui_account_preferences_subpage___lambda268__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda268_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda269_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoUiChangePasswordDialog* dialog = NULL;
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoUiViewModelChangePasswordDialog* _tmp1_;
	DinoUiViewModelChangePasswordDialog* _tmp2_;
	DinoUiChangePasswordDialog* _tmp3_;
	DinoUiChangePasswordDialog* _tmp4_;
	DinoUiChangePasswordDialog* _tmp5_;
	GtkRoot* _tmp6_;
	DinoUiChangePasswordDialog* _tmp7_;
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_view_model_preferences_window_get_change_password_dialog_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_ui_change_password_dialog_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	dialog = _tmp4_;
	_tmp5_ = dialog;
	_tmp6_ = gtk_widget_get_root ((GtkWidget*) self);
	gtk_window_set_transient_for ((GtkWindow*) _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_window_get_type (), GtkWindow));
	_tmp7_ = dialog;
	gtk_window_present ((GtkWindow*) _tmp7_);
	_g_object_unref0 (dialog);
}

static void
__dino_ui_account_preferences_subpage___lambda269__adw_action_row_activated (AdwActionRow* _sender,
                                                                             gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda269_ ((DinoUiAccountPreferencesSubpage*) self);
}

static Block80Data*
block80_data_ref (Block80Data* _data80_)
{
	g_atomic_int_inc (&_data80_->_ref_count_);
	return _data80_;
}

static void
block80_data_unref (void * _userdata_)
{
	Block80Data* _data80_;
	_data80_ = (Block80Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data80_->_ref_count_)) {
		DinoUiAccountPreferencesSubpage* self;
		self = _data80_->self;
		_g_object_unref0 (_data80_->password);
		_g_object_unref0 (self);
		g_slice_free (Block80Data, _data80_);
	}
}

static void
__lambda272_ (Block80Data* _data80_,
              const gchar* response)
{
	DinoUiAccountPreferencesSubpage* self;
	self = _data80_->self;
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "connect") == 0) {
		DinoEntitiesAccount* _tmp0_;
		DinoEntitiesAccount* _tmp1_;
		GtkPasswordEntry* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		DinoUiViewModelPreferencesWindow* _tmp5_;
		DinoEntitiesAccount* _tmp6_;
		DinoEntitiesAccount* _tmp7_;
		_tmp0_ = dino_ui_account_preferences_subpage_get_account (self);
		_tmp1_ = _tmp0_;
		_tmp2_ = _data80_->password;
		_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
		_tmp4_ = _tmp3_;
		dino_entities_account_set_password (_tmp1_, _tmp4_);
		_tmp5_ = self->priv->_model;
		_tmp6_ = dino_ui_account_preferences_subpage_get_account (self);
		_tmp7_ = _tmp6_;
		dino_ui_view_model_preferences_window_reconnect_account (_tmp5_, _tmp7_);
	}
}

static void
___lambda272__adw_message_dialog_response (AdwMessageDialog* _sender,
                                           const gchar* response,
                                           gpointer self)
{
	__lambda272_ (self, response);
}

static void
_dino_ui_account_preferences_subpage___lambda271_ (DinoUiAccountPreferencesSubpage* self)
{
	Block80Data* _data80_;
	AdwMessageDialog* dialog = NULL;
	GtkRoot* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	AdwMessageDialog* _tmp10_;
	AdwMessageDialog* _tmp11_;
	GtkPasswordEntry* _tmp12_ = NULL;
	AdwMessageDialog* _tmp13_;
	AdwMessageDialog* _tmp14_;
	AdwMessageDialog* _tmp15_;
	GtkPasswordEntry* _tmp16_;
	AdwMessageDialog* _tmp17_;
	const gchar* _tmp18_;
	AdwMessageDialog* _tmp19_;
	const gchar* _tmp20_;
	AdwMessageDialog* _tmp21_;
	_data80_ = g_slice_new0 (Block80Data);
	_data80_->_ref_count_ = 1;
	_data80_->self = g_object_ref (self);
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_entities_account_get_bare_jid (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_jid_to_string (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("Enter password for %s", _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = (AdwMessageDialog*) adw_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_window_get_type (), GtkWindow), _tmp9_, NULL);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_xmpp_jid_unref0 (_tmp5_);
	dialog = _tmp11_;
	_tmp12_ = (GtkPasswordEntry*) gtk_password_entry_new ();
	gtk_password_entry_set_show_peek_icon (_tmp12_, TRUE);
	g_object_ref_sink (_tmp12_);
	_data80_->password = _tmp12_;
	_tmp13_ = dialog;
	g_signal_connect_data (_tmp13_, "response", (GCallback) ___lambda272__adw_message_dialog_response, block80_data_ref (_data80_), (GClosureNotify) block80_data_unref, 0);
	_tmp14_ = dialog;
	adw_message_dialog_set_default_response (_tmp14_, "connect");
	_tmp15_ = dialog;
	_tmp16_ = _data80_->password;
	adw_message_dialog_set_extra_child (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = dialog;
	_tmp18_ = dino_gettext ("Cancel");
	adw_message_dialog_add_response (_tmp17_, "cancel", _tmp18_);
	_tmp19_ = dialog;
	_tmp20_ = dino_gettext ("Connect");
	adw_message_dialog_add_response (_tmp19_, "connect", _tmp20_);
	_tmp21_ = dialog;
	gtk_window_present ((GtkWindow*) _tmp21_);
	_g_object_unref0 (dialog);
	block80_data_unref (_data80_);
	_data80_ = NULL;
}

static void
__dino_ui_account_preferences_subpage___lambda271__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda271_ ((DinoUiAccountPreferencesSubpage*) self);
}

static Block81Data*
block81_data_ref (Block81Data* _data81_)
{
	g_atomic_int_inc (&_data81_->_ref_count_);
	return _data81_;
}

static void
block81_data_unref (void * _userdata_)
{
	Block81Data* _data81_;
	_data81_ = (Block81Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data81_->_ref_count_)) {
		DinoUiAccountPreferencesSubpage* self;
		self = _data81_->self;
		_g_object_unref0 (_data81_->avatar_model);
		_g_object_unref0 (self);
		g_slice_free (Block81Data, _data81_);
	}
}

static void
__lambda275_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoEntitiesAccount* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	AdwEntryRow* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->local_alias;
	_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
	_tmp4_ = _tmp3_;
	dino_entities_account_set_alias (_tmp1_, _tmp4_);
}

static void
___lambda275__gtk_editable_changed (GtkEditable* _sender,
                                    gpointer self)
{
	__lambda275_ ((DinoUiAccountPreferencesSubpage*) self);
}

static gboolean
__lambda276_ (DinoUiAccountPreferencesSubpage* self,
              GBinding* binding,
              GValue* from,
              GValue* to)
{
	gboolean enabled_bool = FALSE;
	GValue _tmp0_;
	const gchar* _tmp1_ = NULL;
	GValue _tmp4_ = {0};
	gboolean result;
	g_return_val_if_fail (binding != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = *from;
	enabled_bool = g_value_get_boolean (&_tmp0_);
	if (enabled_bool) {
		const gchar* _tmp2_;
		_tmp2_ = dino_gettext ("Disable account");
		_tmp1_ = _tmp2_;
	} else {
		const gchar* _tmp3_;
		_tmp3_ = dino_gettext ("Enable account");
		_tmp1_ = _tmp3_;
	}
	g_value_init (&_tmp4_, G_TYPE_STRING);
	g_value_set_string (&_tmp4_, _tmp1_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp4_;
	result = TRUE;
	return result;
}

static gboolean
___lambda276__gbinding_transform_func (GBinding* binding,
                                       GValue* from_value,
                                       GValue* to_value,
                                       gpointer self)
{
	gboolean result;
	result = __lambda276_ ((DinoUiAccountPreferencesSubpage*) self, binding, from_value, to_value);
	return result;
}

static void
_vala_array_add12 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add13 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add14 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add15 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
__lambda277_ (DinoUiAccountPreferencesSubpage* self,
              GBinding* binding,
              GValue* from,
              GValue* to)
{
	gchar* _tmp0_;
	GValue _tmp1_ = {0};
	gboolean result;
	g_return_val_if_fail (binding != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = dino_ui_account_preferences_subpage_get_status_label (self);
	g_value_init (&_tmp1_, G_TYPE_STRING);
	g_value_take_string (&_tmp1_, _tmp0_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp1_;
	result = TRUE;
	return result;
}

static gboolean
___lambda277__gbinding_transform_func (GBinding* binding,
                                       GValue* from_value,
                                       GValue* to_value,
                                       gpointer self)
{
	gboolean result;
	result = __lambda277_ ((DinoUiAccountPreferencesSubpage*) self, binding, from_value, to_value);
	return result;
}

static void
_vala_array_add16 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
__lambda278_ (DinoUiAccountPreferencesSubpage* self,
              GBinding* binding,
              GValue* from,
              GValue* to)
{
	gchar* _tmp0_;
	GValue _tmp1_ = {0};
	gboolean result;
	g_return_val_if_fail (binding != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = dino_ui_account_preferences_subpage_get_status_label (self);
	g_value_init (&_tmp1_, G_TYPE_STRING);
	g_value_take_string (&_tmp1_, _tmp0_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp1_;
	result = TRUE;
	return result;
}

static gboolean
___lambda278__gbinding_transform_func (GBinding* binding,
                                       GValue* from_value,
                                       GValue* to_value,
                                       gpointer self)
{
	gboolean result;
	result = __lambda278_ ((DinoUiAccountPreferencesSubpage*) self, binding, from_value, to_value);
	return result;
}

static void
_vala_array_add17 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
__lambda279_ (DinoUiAccountPreferencesSubpage* self,
              GBinding* binding,
              GValue* from,
              GValue* to)
{
	DinoConnectionManagerConnectionError* _error_ = NULL;
	GValue _tmp0_;
	DinoConnectionManagerConnectionError* _tmp1_;
	gboolean _tmp2_ = FALSE;
	DinoConnectionManagerConnectionError* _tmp3_;
	GValue _tmp5_ = {0};
	gboolean result;
	g_return_val_if_fail (binding != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = *from;
	_tmp1_ = _dino_connection_manager_connection_error_ref0 (dino_connection_manager_value_get_connection_error (&_tmp0_));
	_error_ = _tmp1_;
	_tmp3_ = _error_;
	if (_tmp3_ != NULL) {
		DinoConnectionManagerConnectionError* _tmp4_;
		_tmp4_ = _error_;
		_tmp2_ = _tmp4_->source == DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_SASL;
	} else {
		_tmp2_ = FALSE;
	}
	g_value_init (&_tmp5_, G_TYPE_BOOLEAN);
	g_value_set_boolean (&_tmp5_, _tmp2_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp5_;
	result = TRUE;
	_dino_connection_manager_connection_error_unref0 (_error_);
	return result;
}

static gboolean
___lambda279__gbinding_transform_func (GBinding* binding,
                                       GValue* from_value,
                                       GValue* to_value,
                                       gpointer self)
{
	gboolean result;
	result = __lambda279_ ((DinoUiAccountPreferencesSubpage*) self, binding, from_value, to_value);
	return result;
}

static void
_vala_array_add18 (GBinding** * array,
                   gint* length,
                   gint* size,
                   GBinding* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GBinding*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
__lambda280_ (Block81Data* _data81_)
{
	DinoUiAccountPreferencesSubpage* self;
	GtkButton* _tmp0_;
	DinoUiViewModelAvatarPictureTileModel* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	self = _data81_->self;
	_tmp0_ = self->remove_avatar_button;
	_tmp1_ = _data81_->avatar_model;
	_tmp2_ = dino_ui_view_model_avatar_picture_tile_model_get_image_file (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp3_ != NULL);
}

static void
___lambda280__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda280_ (self);
}

static void
__lambda281_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoUiViewModelPreferencesWindow* _tmp0_;
	DinoUiViewModelAccountDetails* _tmp1_;
	DinoUiViewModelAccountDetails* _tmp2_;
	DinoConnectionManagerConnectionError* _tmp3_;
	DinoConnectionManagerConnectionError* _tmp4_;
	_tmp0_ = self->priv->_model;
	_tmp1_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dino_ui_view_model_account_details_get_connection_error (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		AdwActionRow* _tmp5_;
		_tmp5_ = self->connection_status;
		gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "error");
	} else {
		AdwActionRow* _tmp6_;
		_tmp6_ = self->connection_status;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp6_, "error");
	}
}

static void
___lambda281__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda281_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
__lambda274_ (DinoUiAccountPreferencesSubpage* self)
{
	Block81Data* _data81_;
	GBinding** _tmp0_;
	gint _tmp0__length1;
	DinoUiAvatarPicture* _tmp4_;
	DinoUiViewModelPreferencesWindow* _tmp5_;
	DinoUiViewModelAccountDetails* _tmp6_;
	DinoUiViewModelAccountDetails* _tmp7_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp8_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp9_;
	AdwActionRow* _tmp10_;
	DinoEntitiesAccount* _tmp11_;
	DinoEntitiesAccount* _tmp12_;
	XmppJid* _tmp13_;
	XmppJid* _tmp14_;
	XmppJid* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp19_ = NULL;
	DinoEntitiesAccount* _tmp20_;
	DinoEntitiesAccount* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	AdwEntryRow* _tmp24_;
	AdwEntryRow* _tmp25_;
	gulong _tmp26_;
	DinoEntitiesAccount* _tmp27_;
	DinoEntitiesAccount* _tmp28_;
	GtkButton* _tmp29_;
	GBinding* _tmp30_;
	GBinding* _tmp31_;
	DinoEntitiesAccount* _tmp32_;
	DinoEntitiesAccount* _tmp33_;
	GtkBox* _tmp34_;
	GBinding* _tmp35_;
	GBinding* _tmp36_;
	DinoEntitiesAccount* _tmp37_;
	DinoEntitiesAccount* _tmp38_;
	AdwActionRow* _tmp39_;
	GBinding* _tmp40_;
	GBinding* _tmp41_;
	DinoEntitiesAccount* _tmp42_;
	DinoEntitiesAccount* _tmp43_;
	AdwActionRow* _tmp44_;
	GBinding* _tmp45_;
	GBinding* _tmp46_;
	DinoUiViewModelPreferencesWindow* _tmp47_;
	DinoUiViewModelAccountDetails* _tmp48_;
	DinoUiViewModelAccountDetails* _tmp49_;
	AdwActionRow* _tmp50_;
	GBinding* _tmp51_;
	GBinding* _tmp52_;
	DinoUiViewModelPreferencesWindow* _tmp53_;
	DinoUiViewModelAccountDetails* _tmp54_;
	DinoUiViewModelAccountDetails* _tmp55_;
	AdwActionRow* _tmp56_;
	GBinding* _tmp57_;
	GBinding* _tmp58_;
	DinoUiViewModelPreferencesWindow* _tmp59_;
	DinoUiViewModelAccountDetails* _tmp60_;
	DinoUiViewModelAccountDetails* _tmp61_;
	GtkButton* _tmp62_;
	GBinding* _tmp63_;
	GBinding* _tmp64_;
	DinoUiViewModelPreferencesWindow* _tmp65_;
	DinoUiViewModelAccountDetails* _tmp66_;
	DinoUiViewModelAccountDetails* _tmp67_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp68_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp69_;
	GListModel* _tmp70_;
	GListModel* _tmp71_;
	GObject* _tmp72_;
	DinoUiViewModelAvatarPictureTileModel* _tmp73_;
	DinoUiViewModelAvatarPictureTileModel* _tmp74_;
	GtkButton* _tmp75_;
	DinoUiViewModelAvatarPictureTileModel* _tmp76_;
	GFile* _tmp77_;
	GFile* _tmp78_;
	DinoUiViewModelPreferencesWindow* _tmp79_;
	DinoUiViewModelAccountDetails* _tmp80_;
	DinoUiViewModelAccountDetails* _tmp81_;
	DinoUiViewModelPreferencesWindow* _tmp82_;
	DinoUiViewModelAccountDetails* _tmp83_;
	DinoUiViewModelAccountDetails* _tmp84_;
	DinoConnectionManagerConnectionError* _tmp85_;
	DinoConnectionManagerConnectionError* _tmp86_;
	_data81_ = g_slice_new0 (Block81Data);
	_data81_->_ref_count_ = 1;
	_data81_->self = g_object_ref (self);
	_tmp0_ = self->priv->bindings;
	_tmp0__length1 = self->priv->bindings_length1;
	{
		GBinding** binding_collection = NULL;
		gint binding_collection_length1 = 0;
		gint _binding_collection_size_ = 0;
		gint binding_it = 0;
		binding_collection = _tmp0_;
		binding_collection_length1 = _tmp0__length1;
		for (binding_it = 0; binding_it < binding_collection_length1; binding_it = binding_it + 1) {
			GBinding* _tmp1_;
			GBinding* binding = NULL;
			_tmp1_ = _g_object_ref0 (binding_collection[binding_it]);
			binding = _tmp1_;
			{
				GBinding* _tmp2_;
				GBinding* _tmp3_;
				_tmp2_ = binding;
				_tmp3_ = _g_object_ref0 (_tmp2_);
				g_binding_unbind (_tmp3_);
				_g_object_unref0 (binding);
			}
		}
	}
	_tmp4_ = self->avatar;
	_tmp5_ = self->priv->_model;
	_tmp6_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = dino_ui_view_model_account_details_get_avatar_model (_tmp7_);
	_tmp9_ = _tmp8_;
	dino_ui_avatar_picture_set_model (_tmp4_, (DinoUiViewModelAvatarPictureModel*) _tmp9_);
	_tmp10_ = self->xmpp_address;
	_tmp11_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = dino_entities_account_get_bare_jid (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = _tmp14_;
	_tmp16_ = xmpp_jid_to_string (_tmp15_);
	_tmp17_ = _tmp16_;
	adw_action_row_set_subtitle (_tmp10_, _tmp17_);
	_g_free0 (_tmp17_);
	_xmpp_jid_unref0 (_tmp15_);
	if (self->priv->alias_entry_changed != ((gulong) 0)) {
		AdwEntryRow* _tmp18_;
		_tmp18_ = self->local_alias;
		g_signal_handler_disconnect ((GObject*) _tmp18_, self->priv->alias_entry_changed);
	}
	_tmp20_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp21_ = _tmp20_;
	_tmp22_ = dino_entities_account_get_alias (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp19_ = _tmp23_;
	if (_tmp19_ == NULL) {
		_tmp19_ = "";
	}
	_tmp24_ = self->local_alias;
	gtk_editable_set_text ((GtkEditable*) _tmp24_, _tmp19_);
	_tmp25_ = self->local_alias;
	_tmp26_ = g_signal_connect_object ((GtkEditable*) _tmp25_, "changed", (GCallback) ___lambda275__gtk_editable_changed, self, 0);
	self->priv->alias_entry_changed = _tmp26_;
	_tmp27_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp28_ = _tmp27_;
	_tmp29_ = self->disable_account_button;
	_tmp30_ = g_object_bind_property_with_closures ((GObject*) _tmp28_, "enabled", (GObject*) _tmp29_, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((___lambda276__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda276__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp31_ = _g_object_ref0 (_tmp30_);
	_vala_array_add12 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp31_);
	_tmp32_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp33_ = _tmp32_;
	_tmp34_ = self->avatar_menu_box;
	_tmp35_ = g_object_bind_property_with_closures ((GObject*) _tmp33_, "enabled", (GObject*) _tmp34_, "visible", 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)));
	_tmp36_ = _g_object_ref0 (_tmp35_);
	_vala_array_add13 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp36_);
	_tmp37_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp38_ = _tmp37_;
	_tmp39_ = self->password_change;
	_tmp40_ = g_object_bind_property_with_closures ((GObject*) _tmp38_, "enabled", (GObject*) _tmp39_, "visible", 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)));
	_tmp41_ = _g_object_ref0 (_tmp40_);
	_vala_array_add14 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp41_);
	_tmp42_ = dino_ui_account_preferences_subpage_get_account (self);
	_tmp43_ = _tmp42_;
	_tmp44_ = self->connection_status;
	_tmp45_ = g_object_bind_property_with_closures ((GObject*) _tmp43_, "enabled", (GObject*) _tmp44_, "visible", 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)));
	_tmp46_ = _g_object_ref0 (_tmp45_);
	_vala_array_add15 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp46_);
	_tmp47_ = self->priv->_model;
	_tmp48_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = self->connection_status;
	_tmp51_ = g_object_bind_property_with_closures ((GObject*) _tmp49_, "connection-state", (GObject*) _tmp50_, "subtitle", G_BINDING_SYNC_CREATE, (GClosure*) ((___lambda277__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda277__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp52_ = _g_object_ref0 (_tmp51_);
	_vala_array_add16 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp52_);
	_tmp53_ = self->priv->_model;
	_tmp54_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = self->connection_status;
	_tmp57_ = g_object_bind_property_with_closures ((GObject*) _tmp55_, "connection-error", (GObject*) _tmp56_, "subtitle", G_BINDING_SYNC_CREATE, (GClosure*) ((___lambda278__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda278__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp58_ = _g_object_ref0 (_tmp57_);
	_vala_array_add17 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp58_);
	_tmp59_ = self->priv->_model;
	_tmp60_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = self->enter_password_button;
	_tmp63_ = g_object_bind_property_with_closures ((GObject*) _tmp61_, "connection-error", (GObject*) _tmp62_, "visible", G_BINDING_SYNC_CREATE, (GClosure*) ((___lambda279__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda279__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp64_ = _g_object_ref0 (_tmp63_);
	_vala_array_add18 (&self->priv->bindings, &self->priv->bindings_length1, &self->priv->_bindings_size_, _tmp64_);
	_tmp65_ = self->priv->_model;
	_tmp66_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp65_);
	_tmp67_ = _tmp66_;
	_tmp68_ = dino_ui_view_model_account_details_get_avatar_model (_tmp67_);
	_tmp69_ = _tmp68_;
	_tmp70_ = dino_ui_view_model_avatar_picture_model_get_tiles ((DinoUiViewModelAvatarPictureModel*) _tmp69_);
	_tmp71_ = _tmp70_;
	_tmp72_ = g_list_model_get_item (_tmp71_, (guint) 0);
	_tmp73_ = DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_TILE_MODEL (_tmp72_) ? ((DinoUiViewModelAvatarPictureTileModel*) _tmp72_) : NULL;
	if (_tmp73_ == NULL) {
		_g_object_unref0 (_tmp72_);
	}
	_data81_->avatar_model = _tmp73_;
	_tmp74_ = _data81_->avatar_model;
	g_signal_connect_data ((GObject*) _tmp74_, "notify::image-file", (GCallback) ___lambda280__g_object_notify, block81_data_ref (_data81_), (GClosureNotify) block81_data_unref, 0);
	_tmp75_ = self->remove_avatar_button;
	_tmp76_ = _data81_->avatar_model;
	_tmp77_ = dino_ui_view_model_avatar_picture_tile_model_get_image_file (_tmp76_);
	_tmp78_ = _tmp77_;
	gtk_widget_set_visible ((GtkWidget*) _tmp75_, _tmp78_ != NULL);
	_tmp79_ = self->priv->_model;
	_tmp80_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp79_);
	_tmp81_ = _tmp80_;
	g_signal_connect_object ((GObject*) _tmp81_, "notify::connection-error", (GCallback) ___lambda281__g_object_notify, self, 0);
	_tmp82_ = self->priv->_model;
	_tmp83_ = dino_ui_view_model_preferences_window_get_selected_account (_tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = dino_ui_view_model_account_details_get_connection_error (_tmp84_);
	_tmp86_ = _tmp85_;
	if (_tmp86_ != NULL) {
		AdwActionRow* _tmp87_;
		_tmp87_ = self->connection_status;
		gtk_widget_add_css_class ((GtkWidget*) _tmp87_, "error");
	} else {
		AdwActionRow* _tmp88_;
		_tmp88_ = self->connection_status;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp88_, "error");
	}
	block81_data_unref (_data81_);
	_data81_ = NULL;
}

static void
___lambda274__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda274_ ((DinoUiAccountPreferencesSubpage*) self);
}

static void
_dino_ui_account_preferences_subpage___lambda273_ (DinoUiAccountPreferencesSubpage* self)
{
	DinoUiViewModelPreferencesWindow* _tmp0_;
	_tmp0_ = self->priv->_model;
	g_signal_connect_object ((GObject*) _tmp0_, "notify::selected-account", (GCallback) ___lambda274__g_object_notify, self, 0);
}

static void
__dino_ui_account_preferences_subpage___lambda273__g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	_dino_ui_account_preferences_subpage___lambda273_ ((DinoUiAccountPreferencesSubpage*) self);
}

static GObject *
dino_ui_account_preferences_subpage_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiAccountPreferencesSubpage * self;
	AdwHeaderBar* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkLayoutManager* _tmp3_;
	GtkLayoutManager* _tmp4_;
	DinoUiNaturalDirectionBoxLayout* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	AdwActionRow* _tmp11_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	AdwActionRow* _tmp14_;
	GtkButton* _tmp15_;
	parent_class = G_OBJECT_CLASS (dino_ui_account_preferences_subpage_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpage);
	_tmp0_ = self->headerbar;
	adw_header_bar_set_show_title (_tmp0_, FALSE);
	_tmp1_ = self->button_container;
	_tmp2_ = self->button_container;
	_tmp3_ = gtk_widget_get_layout_manager (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = dino_ui_natural_direction_box_layout_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_box_layout_get_type (), GtkBoxLayout));
	gtk_widget_set_layout_manager (_tmp1_, (GtkLayoutManager*) _tmp5_);
	_tmp6_ = self->back_button;
	g_signal_connect_object (_tmp6_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda264__gtk_button_clicked, self, 0);
	_tmp7_ = self->edit_avatar_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda265__gtk_button_clicked, self, 0);
	_tmp8_ = self->remove_avatar_button;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda266__gtk_button_clicked, self, 0);
	_tmp9_ = self->disable_account_button;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda267__gtk_button_clicked, self, 0);
	_tmp10_ = self->remove_account_button;
	g_signal_connect_object (_tmp10_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda268__gtk_button_clicked, self, 0);
	_tmp11_ = self->password_change;
	_tmp12_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	adw_action_row_set_activatable_widget (_tmp11_, (GtkWidget*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->password_change;
	g_signal_connect_object (_tmp14_, "activated", (GCallback) __dino_ui_account_preferences_subpage___lambda269__adw_action_row_activated, self, 0);
	_tmp15_ = self->enter_password_button;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) __dino_ui_account_preferences_subpage___lambda271__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) __dino_ui_account_preferences_subpage___lambda273__g_object_notify, self, 0);
	return obj;
}

static void
dino_ui_account_preferences_subpage_class_init (DinoUiAccountPreferencesSubpageClass * klass,
                                                gpointer klass_data)
{
	dino_ui_account_preferences_subpage_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiAccountPreferencesSubpage_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_account_preferences_subpage_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_account_preferences_subpage_set_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_account_preferences_subpage_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_account_preferences_subpage_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_ACCOUNT_PROPERTY, dino_ui_account_preferences_subpage_properties[DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", DINO_ENTITIES_TYPE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY, dino_ui_account_preferences_subpage_properties[DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", DINO_UI_VIEW_MODEL_TYPE_PREFERENCES_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/im/dino/Dino/preferences_window/account_preferences_subpage.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "headerbar", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, headerbar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, back_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "avatar", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, avatar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "xmpp_address", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, xmpp_address));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "local_alias", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, local_alias));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "password_change", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, password_change));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "connection_status", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, connection_status));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "enter_password_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, enter_password_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "avatar_menu_box", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, avatar_menu_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "edit_avatar_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, edit_avatar_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_avatar_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, remove_avatar_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "button_container", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, button_container));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remove_account_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, remove_account_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "disable_account_button", FALSE, G_STRUCT_OFFSET (DinoUiAccountPreferencesSubpage, disable_account_button));
}

static void
dino_ui_account_preferences_subpage_instance_init (DinoUiAccountPreferencesSubpage * self,
                                                   gpointer klass)
{
	GBinding** _tmp0_;
	gulong* _tmp1_;
	self->priv = dino_ui_account_preferences_subpage_get_instance_private (self);
	_tmp0_ = g_new0 (GBinding*, 0 + 1);
	self->priv->bindings = _tmp0_;
	self->priv->bindings_length1 = 0;
	self->priv->_bindings_size_ = self->priv->bindings_length1;
	_tmp1_ = g_new0 (gulong, 0);
	self->priv->account_notify_ids = _tmp1_;
	self->priv->account_notify_ids_length1 = 0;
	self->priv->_account_notify_ids_size_ = self->priv->account_notify_ids_length1;
	self->priv->alias_entry_changed = (gulong) 0;
	g_type_ensure (DINO_UI_TYPE_AVATAR_PICTURE);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_account_preferences_subpage_finalize (GObject * obj)
{
	DinoUiAccountPreferencesSubpage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpage);
	_g_object_unref0 (self->priv->_model);
	self->priv->bindings = (_vala_array_free (self->priv->bindings, self->priv->bindings_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->account_notify_ids = (g_free (self->priv->account_notify_ids), NULL);
	G_OBJECT_CLASS (dino_ui_account_preferences_subpage_parent_class)->finalize (obj);
}

static GType
dino_ui_account_preferences_subpage_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiAccountPreferencesSubpageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_account_preferences_subpage_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiAccountPreferencesSubpage), 0, (GInstanceInitFunc) dino_ui_account_preferences_subpage_instance_init, NULL };
	GType dino_ui_account_preferences_subpage_type_id;
	dino_ui_account_preferences_subpage_type_id = g_type_register_static (gtk_box_get_type (), "DinoUiAccountPreferencesSubpage", &g_define_type_info, 0);
	DinoUiAccountPreferencesSubpage_private_offset = g_type_add_instance_private (dino_ui_account_preferences_subpage_type_id, sizeof (DinoUiAccountPreferencesSubpagePrivate));
	return dino_ui_account_preferences_subpage_type_id;
}

GType
dino_ui_account_preferences_subpage_get_type (void)
{
	static volatile gsize dino_ui_account_preferences_subpage_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_account_preferences_subpage_type_id__once)) {
		GType dino_ui_account_preferences_subpage_type_id;
		dino_ui_account_preferences_subpage_type_id = dino_ui_account_preferences_subpage_get_type_once ();
		g_once_init_leave (&dino_ui_account_preferences_subpage_type_id__once, dino_ui_account_preferences_subpage_type_id);
	}
	return dino_ui_account_preferences_subpage_type_id__once;
}

static void
_vala_dino_ui_account_preferences_subpage_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec)
{
	DinoUiAccountPreferencesSubpage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpage);
	switch (property_id) {
		case DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_ACCOUNT_PROPERTY:
		g_value_set_object (value, dino_ui_account_preferences_subpage_get_account (self));
		break;
		case DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY:
		g_value_set_object (value, dino_ui_account_preferences_subpage_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_account_preferences_subpage_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec)
{
	DinoUiAccountPreferencesSubpage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_ACCOUNT_PREFERENCES_SUBPAGE, DinoUiAccountPreferencesSubpage);
	switch (property_id) {
		case DINO_UI_ACCOUNT_PREFERENCES_SUBPAGE_MODEL_PROPERTY:
		dino_ui_account_preferences_subpage_set_model (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dino_ui_natural_direction_box_layout_get_instance_private (DinoUiNaturalDirectionBoxLayout* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiNaturalDirectionBoxLayout_private_offset);
}

DinoUiNaturalDirectionBoxLayout*
dino_ui_natural_direction_box_layout_construct (GType object_type,
                                                GtkBoxLayout* original)
{
	DinoUiNaturalDirectionBoxLayout * self = NULL;
	GtkBoxLayout* _tmp0_;
	GtkOrientation _tmp1_;
	GtkOrientation _tmp2_;
	g_return_val_if_fail (original != NULL, NULL);
	self = (DinoUiNaturalDirectionBoxLayout*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (original);
	_g_object_unref0 (self->priv->original);
	self->priv->original = _tmp0_;
	_tmp1_ = gtk_orientable_get_orientation ((GtkOrientable*) original);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == GTK_ORIENTATION_HORIZONTAL) {
		GtkBoxLayout* _tmp3_;
		GtkBoxLayout* _tmp4_;
		GtkBoxLayout* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp3_ = (GtkBoxLayout*) gtk_box_layout_new (GTK_ORIENTATION_VERTICAL);
		_g_object_unref0 (self->priv->alternative);
		self->priv->alternative = _tmp3_;
		_tmp4_ = self->priv->alternative;
		_tmp5_ = self->priv->original;
		_tmp6_ = gtk_box_layout_get_spacing (_tmp5_);
		_tmp7_ = _tmp6_;
		gtk_box_layout_set_spacing (_tmp4_, _tmp7_ / 2);
	}
	return self;
}

DinoUiNaturalDirectionBoxLayout*
dino_ui_natural_direction_box_layout_new (GtkBoxLayout* original)
{
	return dino_ui_natural_direction_box_layout_construct (DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT, original);
}

static GtkSizeRequestMode
dino_ui_natural_direction_box_layout_real_get_request_mode (GtkLayoutManager* base,
                                                            GtkWidget* widget)
{
	DinoUiNaturalDirectionBoxLayout * self;
	GtkSizeRequestMode _tmp0_ = 0;
	GtkBoxLayout* _tmp1_;
	GtkOrientation _tmp2_;
	GtkOrientation _tmp3_;
	GtkSizeRequestMode result;
	self = (DinoUiNaturalDirectionBoxLayout*) base;
	g_return_val_if_fail (widget != NULL, 0);
	_tmp1_ = self->priv->original;
	_tmp2_ = gtk_orientable_get_orientation ((GtkOrientable*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == GTK_ORIENTATION_HORIZONTAL) {
		_tmp0_ = GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH;
	} else {
		_tmp0_ = GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT;
	}
	result = _tmp0_;
	return result;
}

static void
dino_ui_natural_direction_box_layout_real_allocate (GtkLayoutManager* base,
                                                    GtkWidget* widget,
                                                    gint width,
                                                    gint height,
                                                    gint baseline)
{
	DinoUiNaturalDirectionBoxLayout * self;
	gint blind_minimum = 0;
	gint blind_natural = 0;
	gint blind_minimum_baseline = 0;
	gint blind_natural_baseline = 0;
	GtkBoxLayout* _tmp0_;
	GtkBoxLayout* _tmp1_;
	GtkOrientation _tmp2_;
	GtkOrientation _tmp3_;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	GtkBoxLayout* _tmp9_;
	GtkOrientation _tmp10_;
	GtkOrientation _tmp11_;
	gint for_size = 0;
	self = (DinoUiNaturalDirectionBoxLayout*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->original;
	_tmp1_ = self->priv->original;
	_tmp2_ = gtk_orientable_get_orientation ((GtkOrientable*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_layout_manager_measure ((GtkLayoutManager*) _tmp0_, widget, _tmp3_, -1, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
	blind_minimum = _tmp4_;
	blind_natural = _tmp5_;
	blind_minimum_baseline = _tmp6_;
	blind_natural_baseline = _tmp7_;
	_tmp9_ = self->priv->original;
	_tmp10_ = gtk_orientable_get_orientation ((GtkOrientable*) _tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp11_ == GTK_ORIENTATION_HORIZONTAL) {
		_tmp8_ = width;
	} else {
		_tmp8_ = height;
	}
	for_size = _tmp8_;
	if (for_size >= blind_minimum) {
		GtkBoxLayout* _tmp12_;
		_tmp12_ = self->priv->original;
		gtk_layout_manager_allocate ((GtkLayoutManager*) _tmp12_, widget, width, height, baseline);
	} else {
		GtkBoxLayout* _tmp13_;
		_tmp13_ = self->priv->alternative;
		gtk_layout_manager_allocate ((GtkLayoutManager*) _tmp13_, widget, width, height, baseline);
	}
}

static void
dino_ui_natural_direction_box_layout_real_measure (GtkLayoutManager* base,
                                                   GtkWidget* widget,
                                                   GtkOrientation orientation,
                                                   gint for_size,
                                                   gint* minimum,
                                                   gint* natural,
                                                   gint* minimum_baseline,
                                                   gint* natural_baseline)
{
	DinoUiNaturalDirectionBoxLayout * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	self = (DinoUiNaturalDirectionBoxLayout*) base;
	g_return_if_fail (widget != NULL);
	if (for_size == -1) {
		GtkBoxLayout* _tmp0_;
		gint _tmp1_ = 0;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint alt_minimum = 0;
		gint alt_natural = 0;
		gint alt_minimum_baseline = 0;
		gint alt_natural_baseline = 0;
		GtkBoxLayout* _tmp5_;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		gboolean _tmp10_ = FALSE;
		gboolean _tmp11_ = FALSE;
		_tmp0_ = self->priv->original;
		gtk_layout_manager_measure ((GtkLayoutManager*) _tmp0_, widget, orientation, -1, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
		_vala_minimum = _tmp1_;
		_vala_natural = _tmp2_;
		_vala_minimum_baseline = _tmp3_;
		_vala_natural_baseline = _tmp4_;
		_tmp5_ = self->priv->alternative;
		gtk_layout_manager_measure ((GtkLayoutManager*) _tmp5_, widget, orientation, -1, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
		alt_minimum = _tmp6_;
		alt_natural = _tmp7_;
		alt_minimum_baseline = _tmp8_;
		alt_natural_baseline = _tmp9_;
		if (alt_minimum < _vala_minimum) {
			_tmp10_ = alt_minimum != -1;
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			_vala_minimum = alt_minimum;
		}
		if (alt_minimum_baseline < _vala_minimum_baseline) {
			_tmp11_ = alt_minimum_baseline != -1;
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			_vala_minimum = alt_minimum_baseline;
		}
	} else {
		GtkOrientation _tmp12_ = 0;
		GtkOrientation other_orientation = 0;
		gint blind_minimum = 0;
		gint blind_natural = 0;
		gint blind_minimum_baseline = 0;
		gint blind_natural_baseline = 0;
		GtkBoxLayout* _tmp13_;
		gint _tmp14_ = 0;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		gint _tmp17_ = 0;
		if (orientation == GTK_ORIENTATION_HORIZONTAL) {
			_tmp12_ = GTK_ORIENTATION_VERTICAL;
		} else {
			_tmp12_ = GTK_ORIENTATION_HORIZONTAL;
		}
		other_orientation = _tmp12_;
		_tmp13_ = self->priv->original;
		gtk_layout_manager_measure ((GtkLayoutManager*) _tmp13_, widget, other_orientation, -1, &_tmp14_, &_tmp15_, &_tmp16_, &_tmp17_);
		blind_minimum = _tmp14_;
		blind_natural = _tmp15_;
		blind_minimum_baseline = _tmp16_;
		blind_natural_baseline = _tmp17_;
		if (for_size >= blind_minimum) {
			GtkBoxLayout* _tmp18_;
			gint _tmp19_ = 0;
			gint _tmp20_ = 0;
			gint _tmp21_ = 0;
			gint _tmp22_ = 0;
			_tmp18_ = self->priv->original;
			gtk_layout_manager_measure ((GtkLayoutManager*) _tmp18_, widget, orientation, for_size, &_tmp19_, &_tmp20_, &_tmp21_, &_tmp22_);
			_vala_minimum = _tmp19_;
			_vala_natural = _tmp20_;
			_vala_minimum_baseline = _tmp21_;
			_vala_natural_baseline = _tmp22_;
		} else {
			GtkBoxLayout* _tmp23_;
			gint _tmp24_ = 0;
			gint _tmp25_ = 0;
			gint _tmp26_ = 0;
			gint _tmp27_ = 0;
			_tmp23_ = self->priv->alternative;
			gtk_layout_manager_measure ((GtkLayoutManager*) _tmp23_, widget, orientation, for_size, &_tmp24_, &_tmp25_, &_tmp26_, &_tmp27_);
			_vala_minimum = _tmp24_;
			_vala_natural = _tmp25_;
			_vala_minimum_baseline = _tmp26_;
			_vala_natural_baseline = _tmp27_;
		}
	}
	if (minimum) {
		*minimum = _vala_minimum;
	}
	if (natural) {
		*natural = _vala_natural;
	}
	if (minimum_baseline) {
		*minimum_baseline = _vala_minimum_baseline;
	}
	if (natural_baseline) {
		*natural_baseline = _vala_natural_baseline;
	}
}

static void
dino_ui_natural_direction_box_layout_class_init (DinoUiNaturalDirectionBoxLayoutClass * klass,
                                                 gpointer klass_data)
{
	dino_ui_natural_direction_box_layout_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiNaturalDirectionBoxLayout_private_offset);
	((GtkLayoutManagerClass *) klass)->get_request_mode = (GtkSizeRequestMode (*) (GtkLayoutManager*, GtkWidget*)) dino_ui_natural_direction_box_layout_real_get_request_mode;
	((GtkLayoutManagerClass *) klass)->allocate = (void (*) (GtkLayoutManager*, GtkWidget*, gint, gint, gint)) dino_ui_natural_direction_box_layout_real_allocate;
	((GtkLayoutManagerClass *) klass)->measure = (void (*) (GtkLayoutManager*, GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) dino_ui_natural_direction_box_layout_real_measure;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_natural_direction_box_layout_finalize;
}

static void
dino_ui_natural_direction_box_layout_instance_init (DinoUiNaturalDirectionBoxLayout * self,
                                                    gpointer klass)
{
	self->priv = dino_ui_natural_direction_box_layout_get_instance_private (self);
}

static void
dino_ui_natural_direction_box_layout_finalize (GObject * obj)
{
	DinoUiNaturalDirectionBoxLayout * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_NATURAL_DIRECTION_BOX_LAYOUT, DinoUiNaturalDirectionBoxLayout);
	_g_object_unref0 (self->priv->original);
	_g_object_unref0 (self->priv->alternative);
	G_OBJECT_CLASS (dino_ui_natural_direction_box_layout_parent_class)->finalize (obj);
}

static GType
dino_ui_natural_direction_box_layout_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiNaturalDirectionBoxLayoutClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_natural_direction_box_layout_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiNaturalDirectionBoxLayout), 0, (GInstanceInitFunc) dino_ui_natural_direction_box_layout_instance_init, NULL };
	GType dino_ui_natural_direction_box_layout_type_id;
	dino_ui_natural_direction_box_layout_type_id = g_type_register_static (gtk_layout_manager_get_type (), "DinoUiNaturalDirectionBoxLayout", &g_define_type_info, 0);
	DinoUiNaturalDirectionBoxLayout_private_offset = g_type_add_instance_private (dino_ui_natural_direction_box_layout_type_id, sizeof (DinoUiNaturalDirectionBoxLayoutPrivate));
	return dino_ui_natural_direction_box_layout_type_id;
}

GType
dino_ui_natural_direction_box_layout_get_type (void)
{
	static volatile gsize dino_ui_natural_direction_box_layout_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_natural_direction_box_layout_type_id__once)) {
		GType dino_ui_natural_direction_box_layout_type_id;
		dino_ui_natural_direction_box_layout_type_id = dino_ui_natural_direction_box_layout_get_type_once ();
		g_once_init_leave (&dino_ui_natural_direction_box_layout_type_id__once, dino_ui_natural_direction_box_layout_type_id);
	}
	return dino_ui_natural_direction_box_layout_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;
}

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

