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

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

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

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

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

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

#define DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS (dialogs_preferences_pages_accounts_get_type ())
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccounts))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccountsClass))
#define DIALOGS_PREFERENCES_PAGES_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS))
#define DIALOGS_PREFERENCES_PAGES_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccountsClass))

typedef struct _DialogsPreferencesPagesAccounts DialogsPreferencesPagesAccounts;
typedef struct _DialogsPreferencesPagesAccountsClass DialogsPreferencesPagesAccountsClass;
typedef struct _DialogsPreferencesPagesAccountsPrivate DialogsPreferencesPagesAccountsPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_accounts_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW (dialogs_preferences_pages_accounts_source_row_get_type ())
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRowClass))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRowClass))

typedef struct _DialogsPreferencesPagesAccountsSourceRow DialogsPreferencesPagesAccountsSourceRow;
typedef struct _DialogsPreferencesPagesAccountsSourceRowClass DialogsPreferencesPagesAccountsSourceRowClass;
typedef struct _Block106Data Block106Data;

#define DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP (dialogs_preferences_pages_todoist_setup_get_type ())
#define DIALOGS_PREFERENCES_PAGES_TODOIST_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP, DialogsPreferencesPagesTodoistSetup))
#define DIALOGS_PREFERENCES_PAGES_TODOIST_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP, DialogsPreferencesPagesTodoistSetupClass))
#define DIALOGS_PREFERENCES_PAGES_IS_TODOIST_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP))
#define DIALOGS_PREFERENCES_PAGES_IS_TODOIST_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP))
#define DIALOGS_PREFERENCES_PAGES_TODOIST_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_TODOIST_SETUP, DialogsPreferencesPagesTodoistSetupClass))

typedef struct _DialogsPreferencesPagesTodoistSetup DialogsPreferencesPagesTodoistSetup;
typedef struct _DialogsPreferencesPagesTodoistSetupClass DialogsPreferencesPagesTodoistSetupClass;

#define WIDGETS_TYPE_ERROR_VIEW (widgets_error_view_get_type ())
#define WIDGETS_ERROR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ERROR_VIEW, WidgetsErrorView))
#define WIDGETS_ERROR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ERROR_VIEW, WidgetsErrorViewClass))
#define WIDGETS_IS_ERROR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ERROR_VIEW))
#define WIDGETS_IS_ERROR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ERROR_VIEW))
#define WIDGETS_ERROR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ERROR_VIEW, WidgetsErrorViewClass))

typedef struct _WidgetsErrorView WidgetsErrorView;
typedef struct _WidgetsErrorViewClass WidgetsErrorViewClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _DialogsPreferencesPagesAccountsSourceRowPrivate DialogsPreferencesPagesAccountsSourceRowPrivate;

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

typedef struct _WidgetsReorderChild WidgetsReorderChild;
typedef struct _WidgetsReorderChildClass WidgetsReorderChildClass;
enum  {
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_accounts_source_row_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_NUM_PROPERTIES];
typedef struct _Block107Data Block107Data;

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;

#define DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE (dialogs_preferences_pages_inbox_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_INBOX_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE, DialogsPreferencesPagesInboxPage))
#define DIALOGS_PREFERENCES_PAGES_INBOX_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE, DialogsPreferencesPagesInboxPageClass))
#define DIALOGS_PREFERENCES_PAGES_IS_INBOX_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE))
#define DIALOGS_PREFERENCES_PAGES_IS_INBOX_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE))
#define DIALOGS_PREFERENCES_PAGES_INBOX_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_INBOX_PAGE, DialogsPreferencesPagesInboxPageClass))

typedef struct _DialogsPreferencesPagesInboxPage DialogsPreferencesPagesInboxPage;
typedef struct _DialogsPreferencesPagesInboxPageClass DialogsPreferencesPagesInboxPageClass;
typedef struct _Block108Data Block108Data;
enum  {
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_MIGRATION_REQUESTED_SIGNAL,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_NUM_SIGNALS
};
static guint dialogs_preferences_pages_accounts_source_row_signals[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_NUM_SIGNALS] = {0};

#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE (dialogs_preferences_pages_accounts_loading_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPageClass))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_LOADING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_LOADING_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPageClass))

typedef struct _DialogsPreferencesPagesAccountsLoadingPage DialogsPreferencesPagesAccountsLoadingPage;
typedef struct _DialogsPreferencesPagesAccountsLoadingPageClass DialogsPreferencesPagesAccountsLoadingPageClass;
typedef struct _DialogsPreferencesPagesAccountsLoadingPagePrivate DialogsPreferencesPagesAccountsLoadingPagePrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SYNC_LABEL_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_PROGRESS_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_NUM_PROPERTIES];
typedef struct _Block109Data Block109Data;

#define DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP (dialogs_preferences_pages_nextcloud_setup_get_type ())
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup))
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetupClass))
#define DIALOGS_PREFERENCES_PAGES_IS_NEXTCLOUD_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP))
#define DIALOGS_PREFERENCES_PAGES_IS_NEXTCLOUD_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP))
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetupClass))

typedef struct _DialogsPreferencesPagesNextcloudSetup DialogsPreferencesPagesNextcloudSetup;
typedef struct _DialogsPreferencesPagesNextcloudSetupClass DialogsPreferencesPagesNextcloudSetupClass;

#define DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP (dialogs_preferences_pages_cal_dav_setup_get_type ())
#define DIALOGS_PREFERENCES_PAGES_CAL_DAV_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP, DialogsPreferencesPagesCalDAVSetup))
#define DIALOGS_PREFERENCES_PAGES_CAL_DAV_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP, DialogsPreferencesPagesCalDAVSetupClass))
#define DIALOGS_PREFERENCES_PAGES_IS_CAL_DAV_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP))
#define DIALOGS_PREFERENCES_PAGES_IS_CAL_DAV_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP))
#define DIALOGS_PREFERENCES_PAGES_CAL_DAV_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_CAL_DAV_SETUP, DialogsPreferencesPagesCalDAVSetupClass))

typedef struct _DialogsPreferencesPagesCalDAVSetup DialogsPreferencesPagesCalDAVSetup;
typedef struct _DialogsPreferencesPagesCalDAVSetupClass DialogsPreferencesPagesCalDAVSetupClass;

#define DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW (dialogs_preferences_pages_source_view_get_type ())
#define DIALOGS_PREFERENCES_PAGES_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW, DialogsPreferencesPagesSourceView))
#define DIALOGS_PREFERENCES_PAGES_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW, DialogsPreferencesPagesSourceViewClass))
#define DIALOGS_PREFERENCES_PAGES_IS_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW))
#define DIALOGS_PREFERENCES_PAGES_IS_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW))
#define DIALOGS_PREFERENCES_PAGES_SOURCE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_SOURCE_VIEW, DialogsPreferencesPagesSourceViewClass))

typedef struct _DialogsPreferencesPagesSourceView DialogsPreferencesPagesSourceView;
typedef struct _DialogsPreferencesPagesSourceViewClass DialogsPreferencesPagesSourceViewClass;

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

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

struct _DialogsPreferencesPagesAccounts {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesAccountsPrivate * priv;
};

struct _DialogsPreferencesPagesAccountsClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesAccountsPrivate {
	LayoutsHeaderItem* sources_group;
	GtkLabel* inbox_page_name;
};

struct _Block106Data {
	int _ref_count_;
	DialogsPreferencesPagesAccounts* self;
	ObjectsSource* source;
};

struct _DialogsPreferencesPagesAccountsSourceRow {
	GtkListBoxRow parent_instance;
	DialogsPreferencesPagesAccountsSourceRowPrivate * priv;
};

struct _DialogsPreferencesPagesAccountsSourceRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DialogsPreferencesPagesAccountsSourceRowPrivate {
	ObjectsSource* _source;
	AdwPreferencesDialog* _preferences_dialog;
	WidgetsReorderChild* reorder;
	GtkRevealer* main_revealer;
	GtkSwitch* visible_checkbutton;
	GeeHashMap* signal_map;
};

struct _Block107Data {
	int _ref_count_;
	DialogsPreferencesPagesAccountsSourceRow* self;
	AdwAlertDialog* dialog;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block108Data {
	int _ref_count_;
	DialogsPreferencesPagesAccountsSourceRow* self;
	GtkLabel* title_label;
	GtkImage* auth_warning_image;
};

struct _DialogsPreferencesPagesAccountsLoadingPage {
	AdwBin parent_instance;
	DialogsPreferencesPagesAccountsLoadingPagePrivate * priv;
};

struct _DialogsPreferencesPagesAccountsLoadingPageClass {
	AdwBinClass parent_class;
};

struct _DialogsPreferencesPagesAccountsLoadingPagePrivate {
	GtkLabel* secondary_label;
	GtkProgressBar* progress_bar;
	AdwSpinner* spinner;
	gboolean _show_progress;
};

struct _Block109Data {
	int _ref_count_;
	DialogsPreferencesPagesAccounts* self;
	GeeHashMap* sources_hashmap;
};

static gint DialogsPreferencesPagesAccounts_private_offset;
static gpointer dialogs_preferences_pages_accounts_parent_class = NULL;
static gint DialogsPreferencesPagesAccountsSourceRow_private_offset;
static gpointer dialogs_preferences_pages_accounts_source_row_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;
static gint DialogsPreferencesPagesAccountsLoadingPage_private_offset;
static gpointer dialogs_preferences_pages_accounts_loading_page_parent_class = NULL;

VALA_EXTERN GType dialogs_preferences_pages_base_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBasePage, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesAccounts, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesAccounts* dialogs_preferences_pages_accounts_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesAccounts* dialogs_preferences_pages_accounts_construct (GType object_type,
                                                                               AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN GType dialogs_preferences_pages_accounts_source_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesAccountsSourceRow, g_object_unref)
static void dialogs_preferences_pages_accounts_add_source_row (DialogsPreferencesPagesAccounts* self,
                                                        ObjectsSource* source,
                                                        GeeHashMap* sources_hashmap);
static Block106Data* block106_data_ref (Block106Data* _data106_);
static void block106_data_unref (void * _userdata_);
VALA_EXTERN AdwPreferencesDialog* dialogs_preferences_pages_base_page_get_preferences_dialog (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesAccountsSourceRow* dialogs_preferences_pages_accounts_source_row_new (ObjectsSource* source,
                                                                                             AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesAccountsSourceRow* dialogs_preferences_pages_accounts_source_row_construct (GType object_type,
                                                                                                   ObjectsSource* source,
                                                                                                   AdwPreferencesDialog* preferences_dialog);
static void ___lambda293_ (Block106Data* _data106_);
VALA_EXTERN GType dialogs_preferences_pages_todoist_setup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesTodoistSetup, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesTodoistSetup* dialogs_preferences_pages_todoist_setup_new (AdwPreferencesDialog* preferences_dialog,
                                                                                  DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN DialogsPreferencesPagesTodoistSetup* dialogs_preferences_pages_todoist_setup_construct (GType object_type,
                                                                                        AdwPreferencesDialog* preferences_dialog,
                                                                                        DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN void dialogs_preferences_pages_todoist_setup_set_migrate_mode (DialogsPreferencesPagesTodoistSetup* self,
                                                               ObjectsSource* source);
static void ____lambda293__dialogs_preferences_pages_accounts_source_row_migration_requested (DialogsPreferencesPagesAccountsSourceRow* _sender,
                                                                                       gpointer self);
VALA_EXTERN void dialogs_preferences_pages_accounts_show_message_error (DialogsPreferencesPagesAccounts* self,
                                                            gint error_code,
                                                            const gchar* error_message,
                                                            gboolean visible_issue_button);
VALA_EXTERN GType widgets_error_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsErrorView, g_object_unref)
VALA_EXTERN WidgetsErrorView* widgets_error_view_new (void);
VALA_EXTERN WidgetsErrorView* widgets_error_view_construct (GType object_type);
VALA_EXTERN void widgets_error_view_set_error_code (WidgetsErrorView* self,
                                        gint value);
VALA_EXTERN void widgets_error_view_set_error_message (WidgetsErrorView* self,
                                           const gchar* value);
VALA_EXTERN void widgets_error_view_set_visible_issue_button (WidgetsErrorView* self,
                                                  gboolean value);
static void dialogs_preferences_pages_accounts_real_clean_up (DialogsPreferencesPagesBasePage* base);
VALA_EXTERN void dialogs_preferences_pages_accounts_source_row_clean_up (DialogsPreferencesPagesAccountsSourceRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void dialogs_preferences_pages_accounts_update_inbox_page_name (DialogsPreferencesPagesAccounts* self);
VALA_EXTERN GtkWidget* dialogs_preferences_pages_accounts_build_sync_page (DialogsPreferencesPagesAccounts* self);
VALA_EXTERN GType widgets_reorder_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsReorderChild, g_object_unref)
static void dialogs_preferences_pages_accounts_source_row_show_inbox_warning_dialog (DialogsPreferencesPagesAccountsSourceRow* self);
static Block107Data* block107_data_ref (Block107Data* _data107_);
static void block107_data_unref (void * _userdata_);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void __lambda278_ (Block107Data* _data107_,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN AdwPreferencesDialog* dialogs_preferences_pages_accounts_source_row_get_preferences_dialog (DialogsPreferencesPagesAccountsSourceRow* self);
VALA_EXTERN DialogsPreferencesPagesInboxPage* dialogs_preferences_pages_inbox_page_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesInboxPage* dialogs_preferences_pages_inbox_page_construct (GType object_type,
                                                                                  AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN GType dialogs_preferences_pages_inbox_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesInboxPage, g_object_unref)
static void ___lambda278__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void dialogs_preferences_pages_accounts_source_row_update_views_order (DialogsPreferencesPagesAccountsSourceRow* self,
                                                                       GtkListBox* listbox);
VALA_EXTERN ObjectsSource* dialogs_preferences_pages_accounts_source_row_get_source (DialogsPreferencesPagesAccountsSourceRow* self);
static void dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (DialogsPreferencesPagesAccountsSourceRow* self);
static void dialogs_preferences_pages_accounts_source_row_update_all_switches (DialogsPreferencesPagesAccountsSourceRow* self);
VALA_EXTERN void dialogs_preferences_pages_accounts_source_row_hide_destroy (DialogsPreferencesPagesAccountsSourceRow* self);
static gboolean __lambda282_ (DialogsPreferencesPagesAccountsSourceRow* self);
static gboolean ___lambda282__gsource_func (gpointer self);
VALA_EXTERN void widgets_reorder_child_clean_up (WidgetsReorderChild* self);
static void dialogs_preferences_pages_accounts_source_row_set_source (DialogsPreferencesPagesAccountsSourceRow* self,
                                                               ObjectsSource* value);
static void dialogs_preferences_pages_accounts_source_row_set_preferences_dialog (DialogsPreferencesPagesAccountsSourceRow* self,
                                                                           AdwPreferencesDialog* value);
static GObject * dialogs_preferences_pages_accounts_source_row_constructor (GType type,
                                                                     guint n_construct_properties,
                                                                     GObjectConstructParam * construct_properties);
static Block108Data* block108_data_ref (Block108Data* _data108_);
static void block108_data_unref (void * _userdata_);
static void _dialogs_preferences_pages_accounts_source_row____lambda283_ (DialogsPreferencesPagesAccountsSourceRow* self);
static void __dialogs_preferences_pages_accounts_source_row____lambda283__gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_new (GtkWidget* widget,
                                                GtkListBoxRow* row);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_construct (GType object_type,
                                                      GtkWidget* widget,
                                                      GtkListBoxRow* row);
VALA_EXTERN void widgets_reorder_child_build_drag_and_drop (WidgetsReorderChild* self);
static gboolean _dialogs_preferences_pages_accounts_source_row___lambda284_ (DialogsPreferencesPagesAccountsSourceRow* self);
static gboolean __dialogs_preferences_pages_accounts_source_row___lambda284__gsource_func (gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda285_ (Block108Data* _data108_,
                                                                  SyncStatus* status);
static void __dialogs_preferences_pages_accounts_source_row___lambda285__objects_source_sync_failed (ObjectsSource* _sender,
                                                                                              SyncStatus* status,
                                                                                              gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda286_ (Block108Data* _data108_);
static void __dialogs_preferences_pages_accounts_source_row___lambda286__objects_source_sync_finished (ObjectsSource* _sender,
                                                                                                gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda287_ (Block108Data* _data108_);
static void __dialogs_preferences_pages_accounts_source_row___lambda287__objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                                               const gchar* update_id,
                                                                                               gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda288_ (DialogsPreferencesPagesAccountsSourceRow* self);
static void __dialogs_preferences_pages_accounts_source_row___lambda288__g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda289_ (DialogsPreferencesPagesAccountsSourceRow* self);
static void __dialogs_preferences_pages_accounts_source_row___lambda289__services_store_source_added (ServicesStore* _sender,
                                                                                               ObjectsSource* source,
                                                                                               gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda290_ (DialogsPreferencesPagesAccountsSourceRow* self);
static void __dialogs_preferences_pages_accounts_source_row___lambda290__services_store_source_deleted (ServicesStore* _sender,
                                                                                                 ObjectsSource* source,
                                                                                                 gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda291_ (DialogsPreferencesPagesAccountsSourceRow* self,
                                                                  GtkListBox* listbox);
static void __dialogs_preferences_pages_accounts_source_row___lambda291__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                                                     GtkListBox* listbox,
                                                                                                     gpointer self);
static void _dialogs_preferences_pages_accounts_source_row___lambda292_ (DialogsPreferencesPagesAccountsSourceRow* self);
VALA_EXTERN void widgets_reorder_child_draw_motion_widgets (WidgetsReorderChild* self);
static void __dialogs_preferences_pages_accounts_source_row___lambda292__g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void dialogs_preferences_pages_accounts_source_row_finalize (GObject * obj);
static GType dialogs_preferences_pages_accounts_source_row_get_type_once (void);
static void _vala_dialogs_preferences_pages_accounts_source_row_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_accounts_source_row_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec);
VALA_EXTERN GType dialogs_preferences_pages_accounts_loading_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesAccountsLoadingPage, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesAccountsLoadingPage* dialogs_preferences_pages_accounts_loading_page_new (void);
VALA_EXTERN DialogsPreferencesPagesAccountsLoadingPage* dialogs_preferences_pages_accounts_loading_page_construct (GType object_type);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_sync_label (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                     const gchar* value);
VALA_EXTERN gboolean dialogs_preferences_pages_accounts_loading_page_get_show_progress (DialogsPreferencesPagesAccountsLoadingPage* self);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_show_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                        gboolean value);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                   gdouble value);
static GObject * dialogs_preferences_pages_accounts_loading_page_constructor (GType type,
                                                                       guint n_construct_properties,
                                                                       GObjectConstructParam * construct_properties);
static void dialogs_preferences_pages_accounts_loading_page_finalize (GObject * obj);
static GType dialogs_preferences_pages_accounts_loading_page_get_type_once (void);
static void _vala_dialogs_preferences_pages_accounts_loading_page_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_accounts_loading_page_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
static GObject * dialogs_preferences_pages_accounts_constructor (GType type,
                                                          guint n_construct_properties,
                                                          GObjectConstructParam * construct_properties);
static Block109Data* block109_data_ref (Block109Data* _data109_);
static void block109_data_unref (void * _userdata_);
static void _dialogs_preferences_pages_accounts___lambda306_ (Block109Data* _data109_,
                                                       ObjectsSource* source);
static void __dialogs_preferences_pages_accounts___lambda306__services_store_source_added (ServicesStore* _sender,
                                                                                    ObjectsSource* source,
                                                                                    gpointer self);
static void _dialogs_preferences_pages_accounts___lambda307_ (Block109Data* _data109_,
                                                       ObjectsSource* source);
static void __dialogs_preferences_pages_accounts___lambda307__services_store_source_deleted (ServicesStore* _sender,
                                                                                      ObjectsSource* source,
                                                                                      gpointer self);
static void _dialogs_preferences_pages_accounts___lambda308_ (DialogsPreferencesPagesAccounts* self);
static void __dialogs_preferences_pages_accounts___lambda308__gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void _dialogs_preferences_pages_accounts___lambda309_ (DialogsPreferencesPagesAccounts* self);
VALA_EXTERN DialogsPreferencesPagesNextcloudSetup* dialogs_preferences_pages_nextcloud_setup_new (AdwPreferencesDialog* preferences_dialog,
                                                                                      DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN DialogsPreferencesPagesNextcloudSetup* dialogs_preferences_pages_nextcloud_setup_construct (GType object_type,
                                                                                            AdwPreferencesDialog* preferences_dialog,
                                                                                            DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN GType dialogs_preferences_pages_nextcloud_setup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesNextcloudSetup, g_object_unref)
static void __dialogs_preferences_pages_accounts___lambda309__gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void _dialogs_preferences_pages_accounts___lambda320_ (DialogsPreferencesPagesAccounts* self);
VALA_EXTERN DialogsPreferencesPagesCalDAVSetup* dialogs_preferences_pages_cal_dav_setup_new (AdwPreferencesDialog* preferences_dialog,
                                                                                 DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN DialogsPreferencesPagesCalDAVSetup* dialogs_preferences_pages_cal_dav_setup_construct (GType object_type,
                                                                                       AdwPreferencesDialog* preferences_dialog,
                                                                                       DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN GType dialogs_preferences_pages_cal_dav_setup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesCalDAVSetup, g_object_unref)
static void __dialogs_preferences_pages_accounts___lambda320__gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void _dialogs_preferences_pages_accounts___lambda332_ (DialogsPreferencesPagesAccounts* self,
                                                       GtkWidget* row);
VALA_EXTERN DialogsPreferencesPagesSourceView* dialogs_preferences_pages_source_view_new (AdwPreferencesDialog* preferences_dialog,
                                                                              ObjectsSource* source);
VALA_EXTERN DialogsPreferencesPagesSourceView* dialogs_preferences_pages_source_view_construct (GType object_type,
                                                                                    AdwPreferencesDialog* preferences_dialog,
                                                                                    ObjectsSource* source);
VALA_EXTERN GType dialogs_preferences_pages_source_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesSourceView, g_object_unref)
static void __dialogs_preferences_pages_accounts___lambda332__layouts_header_item_row_activated (LayoutsHeaderItem* _sender,
                                                                                          GtkWidget* widget,
                                                                                          gpointer self);
static void _dialogs_preferences_pages_accounts___lambda340_ (DialogsPreferencesPagesAccounts* self);
static void __dialogs_preferences_pages_accounts___lambda340__adw_action_row_activated (AdwActionRow* _sender,
                                                                                 gpointer self);
static void _dialogs_preferences_pages_accounts___lambda341_ (DialogsPreferencesPagesAccounts* self);
static void __dialogs_preferences_pages_accounts___lambda341__g_settings_changed (GSettings* _sender,
                                                                           const gchar* key,
                                                                           gpointer self);
static void _dialogs_preferences_pages_accounts___lambda342_ (DialogsPreferencesPagesAccounts* self);
static void __dialogs_preferences_pages_accounts___lambda342__gtk_widget_destroy (GtkWidget* _sender,
                                                                           gpointer self);
static void dialogs_preferences_pages_accounts_finalize (GObject * obj);
static GType dialogs_preferences_pages_accounts_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 inline gpointer
dialogs_preferences_pages_accounts_get_instance_private (DialogsPreferencesPagesAccounts* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesAccounts_private_offset);
}

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

DialogsPreferencesPagesAccounts*
dialogs_preferences_pages_accounts_new (AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_accounts_construct (DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, preferences_dialog);
}

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

static Block106Data*
block106_data_ref (Block106Data* _data106_)
{
	g_atomic_int_inc (&_data106_->_ref_count_);
	return _data106_;
}

static void
block106_data_unref (void * _userdata_)
{
	Block106Data* _data106_;
	_data106_ = (Block106Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data106_->_ref_count_)) {
		DialogsPreferencesPagesAccounts* self;
		self = _data106_->self;
		_g_object_unref0 (_data106_->source);
		_g_object_unref0 (self);
		g_slice_free (Block106Data, _data106_);
	}
}

static void
___lambda293_ (Block106Data* _data106_)
{
	DialogsPreferencesPagesAccounts* self;
	DialogsPreferencesPagesTodoistSetup* todoist_setup = NULL;
	AdwPreferencesDialog* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	DialogsPreferencesPagesTodoistSetup* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	AdwPreferencesDialog* _tmp4_;
	self = _data106_->self;
	_tmp0_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dialogs_preferences_pages_todoist_setup_new (_tmp1_, self);
	g_object_ref_sink (_tmp2_);
	todoist_setup = _tmp2_;
	dialogs_preferences_pages_todoist_setup_set_migrate_mode (todoist_setup, _data106_->source);
	_tmp3_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp4_ = _tmp3_;
	adw_preferences_dialog_push_subpage (_tmp4_, (AdwNavigationPage*) todoist_setup);
	_g_object_unref0 (todoist_setup);
}

static void
____lambda293__dialogs_preferences_pages_accounts_source_row_migration_requested (DialogsPreferencesPagesAccountsSourceRow* _sender,
                                                                                  gpointer self)
{
	___lambda293_ (self);
}

static void
dialogs_preferences_pages_accounts_add_source_row (DialogsPreferencesPagesAccounts* self,
                                                   ObjectsSource* source,
                                                   GeeHashMap* sources_hashmap)
{
	Block106Data* _data106_;
	ObjectsSource* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (sources_hashmap != NULL);
	_data106_ = g_slice_new0 (Block106Data);
	_data106_->_ref_count_ = 1;
	_data106_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (source);
	_g_object_unref0 (_data106_->source);
	_data106_->source = _tmp0_;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) _data106_->source);
	_tmp2_ = _tmp1_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) sources_hashmap, _tmp2_)) {
		DialogsPreferencesPagesAccountsSourceRow* source_row = NULL;
		AdwPreferencesDialog* _tmp3_;
		AdwPreferencesDialog* _tmp4_;
		DialogsPreferencesPagesAccountsSourceRow* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		DialogsPreferencesPagesAccountsSourceRow* _tmp8_;
		LayoutsHeaderItem* _tmp9_;
		DialogsPreferencesPagesAccountsSourceRow* _tmp10_;
		DialogsPreferencesPagesAccountsSourceRow* _tmp11_;
		_tmp3_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = dialogs_preferences_pages_accounts_source_row_new (_data106_->source, _tmp4_);
		g_object_ref_sink (_tmp5_);
		source_row = _tmp5_;
		_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) _data106_->source);
		_tmp7_ = _tmp6_;
		_tmp8_ = source_row;
		gee_abstract_map_set ((GeeAbstractMap*) sources_hashmap, _tmp7_, _tmp8_);
		_tmp9_ = self->priv->sources_group;
		_tmp10_ = source_row;
		layouts_header_item_add_child (_tmp9_, (GtkWidget*) _tmp10_);
		_tmp11_ = source_row;
		g_signal_connect_data (_tmp11_, "migration-requested", (GCallback) ____lambda293__dialogs_preferences_pages_accounts_source_row_migration_requested, block106_data_ref (_data106_), (GClosureNotify) block106_data_unref, 0);
		_g_object_unref0 (source_row);
	}
	block106_data_unref (_data106_);
	_data106_ = NULL;
}

void
dialogs_preferences_pages_accounts_show_message_error (DialogsPreferencesPagesAccounts* self,
                                                       gint error_code,
                                                       const gchar* error_message,
                                                       gboolean visible_issue_button)
{
	WidgetsErrorView* error_view = NULL;
	gchar* _tmp0_;
	WidgetsErrorView* _tmp1_ = NULL;
	AdwNavigationPage* page = NULL;
	AdwNavigationPage* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	AdwPreferencesDialog* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (error_message != NULL);
	_tmp0_ = g_strdup (error_message);
	_tmp1_ = widgets_error_view_new ();
	widgets_error_view_set_error_code (_tmp1_, error_code);
	widgets_error_view_set_error_message (_tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	widgets_error_view_set_visible_issue_button (_tmp1_, visible_issue_button);
	g_object_ref_sink (_tmp1_);
	error_view = _tmp1_;
	_tmp2_ = adw_navigation_page_new ((GtkWidget*) error_view, "");
	g_object_ref_sink (_tmp2_);
	page = _tmp2_;
	_tmp3_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp4_ = _tmp3_;
	adw_preferences_dialog_push_subpage (_tmp4_, page);
	_g_object_unref0 (page);
	_g_object_unref0 (error_view);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

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

static void
dialogs_preferences_pages_accounts_update_inbox_page_name (DialogsPreferencesPagesAccounts* self)
{
	ObjectsProject* inbox_project = NULL;
	ServicesStore* _tmp0_;
	ServicesSettings* _tmp1_;
	ServicesSettings* _tmp2_;
	GSettings* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ObjectsProject* _tmp6_;
	ObjectsProject* _tmp7_;
	ObjectsProject* _tmp8_;
	gchar* label = NULL;
	ObjectsProject* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	ObjectsProject* _tmp12_;
	ObjectsSource* _tmp13_;
	ObjectsSource* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	GtkLabel* _tmp18_;
	const gchar* _tmp19_;
	GtkLabel* _tmp20_;
	const gchar* _tmp21_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_settings_get_default ();
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->settings;
	_tmp4_ = g_settings_get_string (_tmp3_, "local-inbox-project-id");
	_tmp5_ = _tmp4_;
	_tmp6_ = services_store_get_project (_tmp0_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_g_object_unref0 (_tmp2_);
	inbox_project = _tmp7_;
	_tmp8_ = inbox_project;
	if (_tmp8_ == NULL) {
		_g_object_unref0 (inbox_project);
		return;
	}
	_tmp9_ = inbox_project;
	_tmp10_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = inbox_project;
	_tmp13_ = objects_project_get_source (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = objects_source_get_display_name (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_strdup_printf ("%s (%s)", _tmp11_, _tmp16_);
	label = _tmp17_;
	_tmp18_ = self->priv->inbox_page_name;
	_tmp19_ = label;
	gtk_label_set_label (_tmp18_, _tmp19_);
	_tmp20_ = self->priv->inbox_page_name;
	_tmp21_ = label;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp20_, _tmp21_);
	_g_free0 (label);
	_g_object_unref0 (inbox_project);
}

GtkWidget*
dialogs_preferences_pages_accounts_build_sync_page (DialogsPreferencesPagesAccounts* self)
{
	AdwSpinner* image = NULL;
	AdwSpinner* _tmp0_ = NULL;
	GtkLabel* label = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp2_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (AdwSpinner*) adw_spinner_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp0_, "height-request", 64, NULL);
	g_object_set ((GtkWidget*) _tmp0_, "width-request", 64, NULL);
	g_object_ref_sink (_tmp0_);
	image = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("Planify is syncing your tasks, this may take a few moments"));
	gtk_label_set_wrap (_tmp1_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	gtk_label_set_justify (_tmp1_, GTK_JUSTIFY_CENTER);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp1_, 12);
	g_object_ref_sink (_tmp1_);
	label = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) label, "dimmed");
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 128);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 12);
	g_object_ref_sink (_tmp2_);
	box = _tmp2_;
	gtk_box_append (box, (GtkWidget*) image);
	gtk_box_append (box, (GtkWidget*) label);
	result = (GtkWidget*) box;
	_g_object_unref0 (label);
	_g_object_unref0 (image);
	return result;
}

static inline gpointer
dialogs_preferences_pages_accounts_source_row_get_instance_private (DialogsPreferencesPagesAccountsSourceRow* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesAccountsSourceRow_private_offset);
}

DialogsPreferencesPagesAccountsSourceRow*
dialogs_preferences_pages_accounts_source_row_construct (GType object_type,
                                                         ObjectsSource* source,
                                                         AdwPreferencesDialog* preferences_dialog)
{
	DialogsPreferencesPagesAccountsSourceRow * self = NULL;
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	self = (DialogsPreferencesPagesAccountsSourceRow*) g_object_new (object_type, "source", source, "preferences-dialog", preferences_dialog, NULL);
	return self;
}

DialogsPreferencesPagesAccountsSourceRow*
dialogs_preferences_pages_accounts_source_row_new (ObjectsSource* source,
                                                   AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_accounts_source_row_construct (DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, source, preferences_dialog);
}

static Block107Data*
block107_data_ref (Block107Data* _data107_)
{
	g_atomic_int_inc (&_data107_->_ref_count_);
	return _data107_;
}

static void
block107_data_unref (void * _userdata_)
{
	Block107Data* _data107_;
	_data107_ = (Block107Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data107_->_ref_count_)) {
		DialogsPreferencesPagesAccountsSourceRow* self;
		self = _data107_->self;
		_g_object_unref0 (_data107_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block107Data, _data107_);
	}
}

static void
__lambda278_ (Block107Data* _data107_,
              GObject* obj,
              GAsyncResult* res)
{
	DialogsPreferencesPagesAccountsSourceRow* self;
	gchar* response = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	self = _data107_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = adw_alert_dialog_choose_finish (_data107_->dialog, res);
	_tmp1_ = g_strdup (_tmp0_);
	response = _tmp1_;
	_tmp2_ = response;
	if (g_strcmp0 (_tmp2_, "change") == 0) {
		AdwPreferencesDialog* _tmp3_;
		AdwPreferencesDialog* _tmp4_;
		DialogsPreferencesPagesInboxPage* _tmp5_;
		DialogsPreferencesPagesInboxPage* _tmp6_;
		_tmp3_ = self->priv->_preferences_dialog;
		_tmp4_ = self->priv->_preferences_dialog;
		_tmp5_ = dialogs_preferences_pages_inbox_page_new (_tmp4_);
		g_object_ref_sink (_tmp5_);
		_tmp6_ = _tmp5_;
		adw_preferences_dialog_push_subpage (_tmp3_, (AdwNavigationPage*) _tmp6_);
		_g_object_unref0 (_tmp6_);
	}
	_g_free0 (response);
}

static void
___lambda278__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda278_ (self, source_object, res);
	block107_data_unref (self);
}

static void
dialogs_preferences_pages_accounts_source_row_show_inbox_warning_dialog (DialogsPreferencesPagesAccountsSourceRow* self)
{
	Block107Data* _data107_;
	AdwAlertDialog* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	g_return_if_fail (self != NULL);
	_data107_ = g_slice_new0 (Block107Data);
	_data107_->_ref_count_ = 1;
	_data107_->self = g_object_ref (self);
	_tmp0_ = (AdwAlertDialog*) adw_alert_dialog_new (_ ("Cannot Hide This Account"), _ ("This account contains your current Inbox project. Please change your I" \
"nbox project first."));
	g_object_ref_sink (_tmp0_);
	_data107_->dialog = _tmp0_;
	adw_alert_dialog_add_response (_data107_->dialog, "cancel", _ ("Cancel"));
	adw_alert_dialog_add_response (_data107_->dialog, "change", _ ("Change Inbox"));
	adw_alert_dialog_set_response_appearance (_data107_->dialog, "change", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_set_default_response (_data107_->dialog, "change");
	adw_alert_dialog_set_close_response (_data107_->dialog, "cancel");
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	adw_alert_dialog_choose (_data107_->dialog, (GtkWidget*) _tmp2_, NULL, ___lambda278__gasync_ready_callback, block107_data_ref (_data107_));
	block107_data_unref (_data107_);
	_data107_ = NULL;
}

static void
dialogs_preferences_pages_accounts_source_row_update_views_order (DialogsPreferencesPagesAccountsSourceRow* self,
                                                                  GtkListBox* listbox)
{
	DialogsPreferencesPagesAccountsSourceRow* row = NULL;
	gint row_index = 0;
	ServicesEventBus* _tmp9_;
	ServicesEventBus* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	row = NULL;
	row_index = 0;
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = TRUE;
		while (TRUE) {
			GtkListBoxRow* _tmp2_;
			DialogsPreferencesPagesAccountsSourceRow* _tmp3_;
			gint _tmp8_;
			if (!_tmp0_) {
				DialogsPreferencesPagesAccountsSourceRow* _tmp1_;
				_tmp1_ = row;
				if (!(_tmp1_ != NULL)) {
					break;
				}
			}
			_tmp0_ = FALSE;
			_tmp2_ = gtk_list_box_get_row_at_index (listbox, row_index);
			row = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
			_tmp3_ = row;
			if (_tmp3_ != NULL) {
				DialogsPreferencesPagesAccountsSourceRow* _tmp4_;
				ObjectsSource* _tmp5_;
				DialogsPreferencesPagesAccountsSourceRow* _tmp6_;
				ObjectsSource* _tmp7_;
				_tmp4_ = row;
				_tmp5_ = _tmp4_->priv->_source;
				objects_source_set_child_order (_tmp5_, row_index);
				_tmp6_ = row;
				_tmp7_ = _tmp6_->priv->_source;
				objects_source_save (_tmp7_);
			}
			_tmp8_ = row_index;
			row_index = _tmp8_ + 1;
		}
	}
	_tmp9_ = services_event_bus_get_default ();
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp10_, "update-sources-position");
	_g_object_unref0 (_tmp10_);
}

static void
dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (DialogsPreferencesPagesAccountsSourceRow* self)
{
	gint visible_count = 0;
	gboolean _tmp14_ = FALSE;
	GtkSwitch* _tmp18_;
	g_return_if_fail (self != NULL);
	visible_count = 0;
	{
		GeeArrayList* _s_list = NULL;
		ServicesStore* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _s_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _s_index = 0;
		_tmp0_ = services_store_instance ();
		_tmp1_ = services_store_get_sources (_tmp0_);
		_tmp2_ = _tmp1_;
		_s_list = _tmp2_;
		_tmp3_ = _s_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_s_size = _tmp5_;
		_s_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsSource* s = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsSource* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_s_index = _s_index + 1;
			_tmp6_ = _s_index;
			_tmp7_ = _s_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _s_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _s_index);
			s = (ObjectsSource*) _tmp9_;
			_tmp10_ = s;
			_tmp11_ = objects_source_get_is_visible (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_) {
				gint _tmp13_;
				_tmp13_ = visible_count;
				visible_count = _tmp13_ + 1;
			}
			_g_object_unref0 (s);
		}
	}
	if (visible_count > 1) {
		_tmp14_ = TRUE;
	} else {
		ObjectsSource* _tmp15_;
		gboolean _tmp16_;
		gboolean _tmp17_;
		_tmp15_ = self->priv->_source;
		_tmp16_ = objects_source_get_is_visible (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp14_ = !_tmp17_;
	}
	_tmp18_ = self->priv->visible_checkbutton;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, _tmp14_);
}

static void
dialogs_preferences_pages_accounts_source_row_update_all_switches (DialogsPreferencesPagesAccountsSourceRow* self)
{
	GtkListBox* listbox = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkListBox* _tmp2_;
	GtkListBox* _tmp3_;
	DialogsPreferencesPagesAccountsSourceRow* row = NULL;
	gint row_index = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_box_get_type (), GtkListBox));
	listbox = _tmp2_;
	_tmp3_ = listbox;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (listbox);
		return;
	}
	row = NULL;
	row_index = 0;
	{
		gboolean _tmp4_ = FALSE;
		_tmp4_ = TRUE;
		while (TRUE) {
			GtkListBox* _tmp6_;
			GtkListBoxRow* _tmp7_;
			DialogsPreferencesPagesAccountsSourceRow* _tmp8_;
			gint _tmp10_;
			if (!_tmp4_) {
				DialogsPreferencesPagesAccountsSourceRow* _tmp5_;
				_tmp5_ = row;
				if (!(_tmp5_ != NULL)) {
					break;
				}
			}
			_tmp4_ = FALSE;
			_tmp6_ = listbox;
			_tmp7_ = gtk_list_box_get_row_at_index (_tmp6_, row_index);
			row = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
			_tmp8_ = row;
			if (_tmp8_ != NULL) {
				DialogsPreferencesPagesAccountsSourceRow* _tmp9_;
				_tmp9_ = row;
				dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (_tmp9_);
			}
			_tmp10_ = row_index;
			row_index = _tmp10_ + 1;
		}
	}
	_g_object_unref0 (listbox);
}

static gboolean
__lambda282_ (DialogsPreferencesPagesAccountsSourceRow* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda282__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda282_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
	return result;
}

void
dialogs_preferences_pages_accounts_source_row_hide_destroy (DialogsPreferencesPagesAccountsSourceRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	dialogs_preferences_pages_accounts_source_row_clean_up (self);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda282__gsource_func, g_object_ref (self), g_object_unref);
}

void
dialogs_preferences_pages_accounts_source_row_clean_up (DialogsPreferencesPagesAccountsSourceRow* self)
{
	WidgetsReorderChild* _tmp0_;
	GeeHashMap* _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->reorder;
	if (_tmp0_ != NULL) {
		WidgetsReorderChild* _tmp1_;
		_tmp1_ = self->priv->reorder;
		widgets_reorder_child_clean_up (_tmp1_);
		_g_object_unref0 (self->priv->reorder);
		self->priv->reorder = NULL;
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeSet* _tmp5_;
		GeeIterator* _tmp6_;
		GeeIterator* _tmp7_;
		_tmp2_ = self->priv->signal_map;
		_tmp3_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_tmp7_ = _tmp6_;
		_g_object_unref0 (_tmp5_);
		_entry_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeMapEntry* _tmp11_;
			gconstpointer _tmp12_;
			gconstpointer _tmp13_;
			GeeMapEntry* _tmp14_;
			gconstpointer _tmp15_;
			gconstpointer _tmp16_;
			_tmp8_ = _entry_it;
			if (!gee_iterator_next (_tmp8_)) {
				break;
			}
			_tmp9_ = _entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = entry;
			_tmp12_ = gee_map_entry_get_value (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = entry;
			_tmp15_ = gee_map_entry_get_key (_tmp14_);
			_tmp16_ = _tmp15_;
			g_signal_handler_disconnect ((GObject*) _tmp13_, (gulong) ((guintptr) _tmp16_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp17_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp17_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = NULL;
}

ObjectsSource*
dialogs_preferences_pages_accounts_source_row_get_source (DialogsPreferencesPagesAccountsSourceRow* self)
{
	ObjectsSource* result;
	ObjectsSource* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_accounts_source_row_set_source (DialogsPreferencesPagesAccountsSourceRow* self,
                                                          ObjectsSource* value)
{
	ObjectsSource* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_accounts_source_row_get_source (self);
	if (old_value != value) {
		ObjectsSource* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_accounts_source_row_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY]);
	}
}

AdwPreferencesDialog*
dialogs_preferences_pages_accounts_source_row_get_preferences_dialog (DialogsPreferencesPagesAccountsSourceRow* self)
{
	AdwPreferencesDialog* result;
	AdwPreferencesDialog* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preferences_dialog;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_accounts_source_row_set_preferences_dialog (DialogsPreferencesPagesAccountsSourceRow* self,
                                                                      AdwPreferencesDialog* value)
{
	AdwPreferencesDialog* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_accounts_source_row_get_preferences_dialog (self);
	if (old_value != value) {
		AdwPreferencesDialog* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_preferences_dialog);
		self->priv->_preferences_dialog = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_accounts_source_row_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY]);
	}
}

static Block108Data*
block108_data_ref (Block108Data* _data108_)
{
	g_atomic_int_inc (&_data108_->_ref_count_);
	return _data108_;
}

static void
block108_data_unref (void * _userdata_)
{
	Block108Data* _data108_;
	_data108_ = (Block108Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data108_->_ref_count_)) {
		DialogsPreferencesPagesAccountsSourceRow* self;
		self = _data108_->self;
		_g_object_unref0 (_data108_->auth_warning_image);
		_g_object_unref0 (_data108_->title_label);
		_g_object_unref0 (self);
		g_slice_free (Block108Data, _data108_);
	}
}

static void
_dialogs_preferences_pages_accounts_source_row____lambda283_ (DialogsPreferencesPagesAccountsSourceRow* self)
{
	g_signal_emit (self, dialogs_preferences_pages_accounts_source_row_signals[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_MIGRATION_REQUESTED_SIGNAL], 0);
}

static void
__dialogs_preferences_pages_accounts_source_row____lambda283__gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row____lambda283_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
}

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

static gboolean
__dialogs_preferences_pages_accounts_source_row___lambda284__gsource_func (gpointer self)
{
	gboolean result;
	result = _dialogs_preferences_pages_accounts_source_row___lambda284_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
	return result;
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda285_ (Block108Data* _data108_,
                                                             SyncStatus* status)
{
	DialogsPreferencesPagesAccountsSourceRow* self;
	self = _data108_->self;
	if (status != NULL) {
		GtkImage* _tmp0_;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		GtkImage* _tmp4_;
		_tmp0_ = _data108_->auth_warning_image;
		_tmp1_ = sync_status_get_tooltip (status);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp3_);
		_g_free0 (_tmp3_);
		_tmp4_ = _data108_->auth_warning_image;
		gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	}
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda285__objects_source_sync_failed (ObjectsSource* _sender,
                                                                                         SyncStatus* status,
                                                                                         gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda285_ (self, status);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda286_ (Block108Data* _data108_)
{
	DialogsPreferencesPagesAccountsSourceRow* self;
	GtkImage* _tmp0_;
	self = _data108_->self;
	_tmp0_ = _data108_->auth_warning_image;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda286__objects_source_sync_finished (ObjectsSource* _sender,
                                                                                           gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda286_ (self);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda287_ (Block108Data* _data108_)
{
	DialogsPreferencesPagesAccountsSourceRow* self;
	GtkLabel* _tmp0_;
	ObjectsSource* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	self = _data108_->self;
	_tmp0_ = _data108_->title_label;
	_tmp1_ = self->priv->_source;
	_tmp2_ = objects_source_get_display_name (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp0_, _tmp3_);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda287__objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                                          const gchar* update_id,
                                                                                          gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda287_ (self);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda288_ (DialogsPreferencesPagesAccountsSourceRow* self)
{
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ObjectsSource* _tmp35_;
	GtkSwitch* _tmp36_;
	gboolean _tmp37_;
	gboolean _tmp38_;
	ObjectsSource* _tmp39_;
	_tmp0_ = self->priv->visible_checkbutton;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		gint visible_count = 0;
		gchar* current_inbox_id = NULL;
		ServicesSettings* _tmp18_;
		ServicesSettings* _tmp19_;
		GSettings* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		ObjectsProject* inbox_project = NULL;
		ServicesStore* _tmp23_;
		const gchar* _tmp24_;
		ObjectsProject* _tmp25_;
		gboolean _tmp26_ = FALSE;
		ObjectsProject* _tmp27_;
		visible_count = 0;
		{
			GeeArrayList* _s_list = NULL;
			ServicesStore* _tmp3_;
			GeeArrayList* _tmp4_;
			GeeArrayList* _tmp5_;
			gint _s_size = 0;
			GeeArrayList* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gint _s_index = 0;
			_tmp3_ = services_store_instance ();
			_tmp4_ = services_store_get_sources (_tmp3_);
			_tmp5_ = _tmp4_;
			_s_list = _tmp5_;
			_tmp6_ = _s_list;
			_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
			_tmp8_ = _tmp7_;
			_s_size = _tmp8_;
			_s_index = -1;
			while (TRUE) {
				gint _tmp9_;
				gint _tmp10_;
				ObjectsSource* s = NULL;
				GeeArrayList* _tmp11_;
				gpointer _tmp12_;
				ObjectsSource* _tmp13_;
				gboolean _tmp14_;
				gboolean _tmp15_;
				_s_index = _s_index + 1;
				_tmp9_ = _s_index;
				_tmp10_ = _s_size;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _s_list;
				_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _s_index);
				s = (ObjectsSource*) _tmp12_;
				_tmp13_ = s;
				_tmp14_ = objects_source_get_is_visible (_tmp13_);
				_tmp15_ = _tmp14_;
				if (_tmp15_) {
					gint _tmp16_;
					_tmp16_ = visible_count;
					visible_count = _tmp16_ + 1;
				}
				_g_object_unref0 (s);
			}
		}
		if (visible_count <= 1) {
			GtkSwitch* _tmp17_;
			_tmp17_ = self->priv->visible_checkbutton;
			gtk_switch_set_active (_tmp17_, TRUE);
			return;
		}
		_tmp18_ = services_settings_get_default ();
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_->settings;
		_tmp21_ = g_settings_get_string (_tmp20_, "local-inbox-project-id");
		_tmp22_ = _tmp21_;
		_g_object_unref0 (_tmp19_);
		current_inbox_id = _tmp22_;
		_tmp23_ = services_store_instance ();
		_tmp24_ = current_inbox_id;
		_tmp25_ = services_store_get_project (_tmp23_, _tmp24_);
		inbox_project = _tmp25_;
		_tmp27_ = inbox_project;
		if (_tmp27_ != NULL) {
			ObjectsProject* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			ObjectsSource* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_tmp28_ = inbox_project;
			_tmp29_ = objects_project_get_source_id (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = self->priv->_source;
			_tmp32_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp31_);
			_tmp33_ = _tmp32_;
			_tmp26_ = g_strcmp0 (_tmp30_, _tmp33_) == 0;
		} else {
			_tmp26_ = FALSE;
		}
		if (_tmp26_) {
			GtkSwitch* _tmp34_;
			_tmp34_ = self->priv->visible_checkbutton;
			gtk_switch_set_active (_tmp34_, TRUE);
			dialogs_preferences_pages_accounts_source_row_show_inbox_warning_dialog (self);
			_g_object_unref0 (inbox_project);
			_g_free0 (current_inbox_id);
			return;
		}
		_g_object_unref0 (inbox_project);
		_g_free0 (current_inbox_id);
	}
	_tmp35_ = self->priv->_source;
	_tmp36_ = self->priv->visible_checkbutton;
	_tmp37_ = gtk_switch_get_active (_tmp36_);
	_tmp38_ = _tmp37_;
	objects_source_set_is_visible (_tmp35_, _tmp38_);
	_tmp39_ = self->priv->_source;
	objects_source_save (_tmp39_);
	dialogs_preferences_pages_accounts_source_row_update_all_switches (self);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda288__g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda288_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda289_ (DialogsPreferencesPagesAccountsSourceRow* self)
{
	dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (self);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda289__services_store_source_added (ServicesStore* _sender,
                                                                                          ObjectsSource* source,
                                                                                          gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda289_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda290_ (DialogsPreferencesPagesAccountsSourceRow* self)
{
	dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (self);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda290__services_store_source_deleted (ServicesStore* _sender,
                                                                                            ObjectsSource* source,
                                                                                            gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda290_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
}

static void
_dialogs_preferences_pages_accounts_source_row___lambda291_ (DialogsPreferencesPagesAccountsSourceRow* self,
                                                             GtkListBox* listbox)
{
	g_return_if_fail (listbox != NULL);
	dialogs_preferences_pages_accounts_source_row_update_views_order (self, listbox);
}

static void
__dialogs_preferences_pages_accounts_source_row___lambda291__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                                                GtkListBox* listbox,
                                                                                                gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda291_ ((DialogsPreferencesPagesAccountsSourceRow*) self, listbox);
}

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

static void
__dialogs_preferences_pages_accounts_source_row___lambda292__g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	_dialogs_preferences_pages_accounts_source_row___lambda292_ ((DialogsPreferencesPagesAccountsSourceRow*) self);
}

static GObject *
dialogs_preferences_pages_accounts_source_row_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesAccountsSourceRow * self;
	Block108Data* _data108_;
	ObjectsSource* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* subtitle_label = NULL;
	ObjectsSource* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	GtkLabel* _tmp10_ = NULL;
	GtkRevealer* subtitle_revealer = NULL;
	GtkLabel* _tmp11_;
	GtkWidget* _tmp12_;
	ObjectsSource* _tmp13_;
	SourceType _tmp14_;
	SourceType _tmp15_;
	GtkRevealer* _tmp16_ = NULL;
	GtkBox* title_box = NULL;
	GtkBox* _tmp17_ = NULL;
	GtkBox* _tmp18_;
	GtkLabel* _tmp19_;
	GtkBox* _tmp20_;
	GtkRevealer* _tmp21_;
	ObjectsSource* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	GtkSwitch* _tmp25_ = NULL;
	GtkImage* warning_image = NULL;
	gboolean _tmp26_ = FALSE;
	ObjectsSource* _tmp27_;
	SourceType _tmp28_;
	SourceType _tmp29_;
	GtkBox* end_box = NULL;
	GtkBox* _tmp37_ = NULL;
	gchar* _tmp38_;
	ObjectsSource* _tmp39_;
	SyncStatus* _tmp40_;
	SyncStatus* _tmp41_;
	GtkImage* _tmp42_ = NULL;
	GtkImage* _tmp43_;
	ObjectsSource* _tmp44_;
	SyncStatus* _tmp45_;
	SyncStatus* _tmp46_;
	GtkBox* _tmp54_;
	GtkImage* _tmp55_;
	GtkImage* _tmp56_;
	gboolean _tmp59_ = FALSE;
	ObjectsSource* _tmp60_;
	SourceType _tmp61_;
	SourceType _tmp62_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp79_ = NULL;
	GtkBox* _tmp80_;
	gchar* _tmp81_;
	gchar** _tmp82_;
	GtkImage* _tmp83_ = NULL;
	GtkImage* _tmp84_;
	GtkBox* _tmp85_;
	GtkBox* _tmp86_;
	GtkBox* _tmp87_;
	GtkBox* _tmp88_;
	AdwBin* card = NULL;
	GtkBox* _tmp89_;
	GtkWidget* _tmp90_;
	AdwBin* _tmp91_ = NULL;
	AdwBin* _tmp92_;
	WidgetsReorderChild* _tmp93_;
	WidgetsReorderChild* _tmp94_;
	GtkWidget* _tmp95_;
	GtkRevealer* _tmp96_ = NULL;
	GtkRevealer* _tmp97_;
	WidgetsReorderChild* _tmp98_;
	GtkRevealer* _tmp99_;
	guint _tmp100_;
	guint _tmp101_;
	GeeHashMap* _tmp102_;
	ObjectsSource* _tmp103_;
	gulong _tmp104_;
	ObjectsSource* _tmp105_;
	GeeHashMap* _tmp106_;
	ObjectsSource* _tmp107_;
	gulong _tmp108_;
	ObjectsSource* _tmp109_;
	GeeHashMap* _tmp110_;
	ObjectsSource* _tmp111_;
	gulong _tmp112_;
	ObjectsSource* _tmp113_;
	GeeHashMap* _tmp114_;
	GtkSwitch* _tmp115_;
	gulong _tmp116_;
	GtkSwitch* _tmp117_;
	GeeHashMap* _tmp118_;
	ServicesStore* _tmp119_;
	gulong _tmp120_;
	ServicesStore* _tmp121_;
	GeeHashMap* _tmp122_;
	ServicesStore* _tmp123_;
	gulong _tmp124_;
	ServicesStore* _tmp125_;
	GeeHashMap* _tmp126_;
	WidgetsReorderChild* _tmp127_;
	gulong _tmp128_;
	WidgetsReorderChild* _tmp129_;
	GeeHashMap* _tmp130_;
	GtkRevealer* _tmp131_;
	gulong _tmp132_;
	GtkRevealer* _tmp133_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_accounts_source_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
	_data108_ = g_slice_new0 (Block108Data);
	_data108_->_ref_count_ = 1;
	_data108_->self = g_object_ref (self);
	gtk_widget_add_css_class ((GtkWidget*) self, "no-selectable");
	_tmp0_ = self->priv->_source;
	_tmp1_ = objects_source_get_display_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp3_);
	_data108_->title_label = _tmp3_;
	_tmp4_ = self->priv->_source;
	_tmp5_ = objects_source_get_subheader_text (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup ("caption");
	_tmp8_ = g_strdup ("dimmed");
	_tmp9_ = g_new0 (gchar*, 2 + 1);
	_tmp9_[0] = _tmp7_;
	_tmp9_[1] = _tmp8_;
	_tmp10_ = (GtkLabel*) gtk_label_new (_tmp6_);
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp10_, _tmp9_);
	_tmp9_ = (_vala_array_free (_tmp9_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp10_);
	subtitle_label = _tmp10_;
	_tmp11_ = subtitle_label;
	_tmp12_ = _g_object_ref0 ((GtkWidget*) _tmp11_);
	_tmp13_ = self->priv->_source;
	_tmp14_ = objects_source_get_source_type (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp16_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	gtk_revealer_set_reveal_child (_tmp16_, _tmp15_ != SOURCE_TYPE_LOCAL);
	g_object_ref_sink (_tmp16_);
	subtitle_revealer = _tmp16_;
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp17_);
	title_box = _tmp17_;
	_tmp18_ = title_box;
	_tmp19_ = _data108_->title_label;
	gtk_box_append (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = title_box;
	_tmp21_ = subtitle_revealer;
	gtk_box_append (_tmp20_, (GtkWidget*) _tmp21_);
	_tmp22_ = self->priv->_source;
	_tmp23_ = objects_source_get_is_visible (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = (GtkSwitch*) gtk_switch_new ();
	gtk_switch_set_active (_tmp25_, _tmp24_);
	gtk_widget_set_valign ((GtkWidget*) _tmp25_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->visible_checkbutton);
	self->priv->visible_checkbutton = _tmp25_;
	warning_image = NULL;
	_tmp27_ = self->priv->_source;
	_tmp28_ = objects_source_get_source_type (_tmp27_);
	_tmp29_ = _tmp28_;
	if (_tmp29_ == SOURCE_TYPE_CALDAV) {
		ObjectsSource* _tmp30_;
		ObjectsSourceCalDAVData* _tmp31_;
		ObjectsSourceCalDAVData* _tmp32_;
		gboolean _tmp33_;
		gboolean _tmp34_;
		_tmp30_ = self->priv->_source;
		_tmp31_ = objects_source_get_caldav_data (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = objects_source_cal_dav_data_get_ignore_ssl (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp26_ = _tmp34_;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		gchar* _tmp35_;
		GtkImage* _tmp36_ = NULL;
		_tmp35_ = g_strdup (_ ("SSL verification is disabled"));
		_tmp36_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning-symbolic");
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp36_, _tmp35_);
		_g_free0 (_tmp35_);
		g_object_ref_sink (_tmp36_);
		_g_object_unref0 (warning_image);
		warning_image = _tmp36_;
	}
	_tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp37_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp37_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp37_);
	end_box = _tmp37_;
	_tmp38_ = g_strdup (_ ("Authentication expired"));
	_tmp39_ = self->priv->_source;
	_tmp40_ = objects_source_get_sync_status (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp42_, _tmp38_);
	_g_free0 (_tmp38_);
	gtk_widget_set_visible ((GtkWidget*) _tmp42_, _tmp41_ != NULL);
	g_object_ref_sink (_tmp42_);
	_data108_->auth_warning_image = _tmp42_;
	_tmp43_ = _data108_->auth_warning_image;
	gtk_widget_add_css_class ((GtkWidget*) _tmp43_, "error");
	_tmp44_ = self->priv->_source;
	_tmp45_ = objects_source_get_sync_status (_tmp44_);
	_tmp46_ = _tmp45_;
	if (_tmp46_ != NULL) {
		GtkImage* _tmp47_;
		ObjectsSource* _tmp48_;
		SyncStatus* _tmp49_;
		SyncStatus* _tmp50_;
		gchar* _tmp51_;
		gchar* _tmp52_;
		gchar* _tmp53_;
		_tmp47_ = _data108_->auth_warning_image;
		_tmp48_ = self->priv->_source;
		_tmp49_ = objects_source_get_sync_status (_tmp48_);
		_tmp50_ = _tmp49_;
		_tmp51_ = sync_status_get_tooltip (_tmp50_);
		_tmp52_ = _tmp51_;
		_tmp53_ = _tmp52_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp47_, _tmp53_);
		_g_free0 (_tmp53_);
	}
	_tmp54_ = end_box;
	_tmp55_ = _data108_->auth_warning_image;
	gtk_box_append (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = warning_image;
	if (_tmp56_ != NULL) {
		GtkBox* _tmp57_;
		GtkImage* _tmp58_;
		_tmp57_ = end_box;
		_tmp58_ = warning_image;
		gtk_box_append (_tmp57_, (GtkWidget*) _tmp58_);
	}
	_tmp60_ = self->priv->_source;
	_tmp61_ = objects_source_get_source_type (_tmp60_);
	_tmp62_ = _tmp61_;
	if (_tmp62_ == SOURCE_TYPE_TODOIST) {
		ObjectsSource* _tmp63_;
		_tmp63_ = self->priv->_source;
		_tmp59_ = objects_source_needs_migration (_tmp63_);
	} else {
		_tmp59_ = FALSE;
	}
	if (_tmp59_) {
		GtkImage* migration_warning = NULL;
		gchar* _tmp64_;
		GtkImage* _tmp65_ = NULL;
		GtkImage* _tmp66_;
		GtkButton* migration_button = NULL;
		GtkButton* _tmp67_ = NULL;
		GtkButton* _tmp68_;
		GtkButton* _tmp69_;
		GtkBox* _tmp70_;
		GtkImage* _tmp71_;
		GtkBox* _tmp72_;
		GtkButton* _tmp73_;
		_tmp64_ = g_strdup (_ ("Account migration required"));
		_tmp65_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning-symbolic");
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp65_, _tmp64_);
		_g_free0 (_tmp64_);
		g_object_ref_sink (_tmp65_);
		migration_warning = _tmp65_;
		_tmp66_ = migration_warning;
		gtk_widget_add_css_class ((GtkWidget*) _tmp66_, "warning");
		_tmp67_ = (GtkButton*) gtk_button_new_with_label (_ ("Reconnect"));
		gtk_widget_set_valign ((GtkWidget*) _tmp67_, GTK_ALIGN_CENTER);
		g_object_ref_sink (_tmp67_);
		migration_button = _tmp67_;
		_tmp68_ = migration_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp68_, "suggested-action");
		_tmp69_ = migration_button;
		g_signal_connect_object (_tmp69_, "clicked", (GCallback) __dialogs_preferences_pages_accounts_source_row____lambda283__gtk_button_clicked, self, 0);
		_tmp70_ = end_box;
		_tmp71_ = migration_warning;
		gtk_box_append (_tmp70_, (GtkWidget*) _tmp71_);
		_tmp72_ = end_box;
		_tmp73_ = migration_button;
		gtk_box_append (_tmp72_, (GtkWidget*) _tmp73_);
		_g_object_unref0 (migration_button);
		_g_object_unref0 (migration_warning);
	} else {
		GtkBox* _tmp74_;
		GtkSwitch* _tmp75_;
		GtkBox* _tmp76_;
		GtkImage* _tmp77_;
		GtkImage* _tmp78_;
		_tmp74_ = end_box;
		_tmp75_ = self->priv->visible_checkbutton;
		gtk_box_append (_tmp74_, (GtkWidget*) _tmp75_);
		_tmp76_ = end_box;
		_tmp77_ = (GtkImage*) gtk_image_new_from_icon_name ("go-next-symbolic");
		g_object_ref_sink (_tmp77_);
		_tmp78_ = _tmp77_;
		gtk_box_append (_tmp76_, (GtkWidget*) _tmp78_);
		_g_object_unref0 (_tmp78_);
	}
	_tmp79_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp79_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp79_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp79_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp79_, 6);
	g_object_set ((GtkWidget*) _tmp79_, "height-request", 32, NULL);
	g_object_ref_sink (_tmp79_);
	content_box = _tmp79_;
	_tmp80_ = content_box;
	_tmp81_ = g_strdup ("dimmed");
	_tmp82_ = g_new0 (gchar*, 1 + 1);
	_tmp82_[0] = _tmp81_;
	_tmp83_ = (GtkImage*) gtk_image_new_from_icon_name ("list-drag-handle-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp83_, _tmp82_);
	_tmp82_ = (_vala_array_free (_tmp82_, 1, (GDestroyNotify) g_free), NULL);
	gtk_image_set_pixel_size (_tmp83_, 12);
	g_object_ref_sink (_tmp83_);
	_tmp84_ = _tmp83_;
	gtk_box_append (_tmp80_, (GtkWidget*) _tmp84_);
	_g_object_unref0 (_tmp84_);
	_tmp85_ = content_box;
	_tmp86_ = title_box;
	gtk_box_append (_tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = content_box;
	_tmp88_ = end_box;
	gtk_box_append (_tmp87_, (GtkWidget*) _tmp88_);
	_tmp89_ = content_box;
	_tmp90_ = _g_object_ref0 ((GtkWidget*) _tmp89_);
	_tmp91_ = (AdwBin*) adw_bin_new ();
	adw_bin_set_child (_tmp91_, _tmp90_);
	_g_object_unref0 (_tmp90_);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp91_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp91_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp91_, 3);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp91_, 3);
	g_object_ref_sink (_tmp91_);
	card = _tmp91_;
	_tmp92_ = card;
	_tmp93_ = widgets_reorder_child_new ((GtkWidget*) _tmp92_, (GtkListBoxRow*) self);
	g_object_ref_sink (_tmp93_);
	_g_object_unref0 (self->priv->reorder);
	self->priv->reorder = _tmp93_;
	_tmp94_ = self->priv->reorder;
	_tmp95_ = _g_object_ref0 ((GtkWidget*) _tmp94_);
	_tmp96_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp96_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp96_, _tmp95_);
	_g_object_unref0 (_tmp95_);
	g_object_ref_sink (_tmp96_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp96_;
	_tmp97_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp97_);
	_tmp98_ = self->priv->reorder;
	widgets_reorder_child_build_drag_and_drop (_tmp98_);
	dialogs_preferences_pages_accounts_source_row_update_switch_sensitivity (self);
	_tmp99_ = self->priv->main_revealer;
	_tmp100_ = gtk_revealer_get_transition_duration (_tmp99_);
	_tmp101_ = _tmp100_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp101_, __dialogs_preferences_pages_accounts_source_row___lambda284__gsource_func, g_object_ref (self), g_object_unref);
	_tmp102_ = self->priv->signal_map;
	_tmp103_ = self->priv->_source;
	_tmp104_ = g_signal_connect_data (_tmp103_, "sync-failed", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda285__objects_source_sync_failed, block108_data_ref (_data108_), (GClosureNotify) block108_data_unref, 0);
	_tmp105_ = self->priv->_source;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp102_, (gpointer) ((guintptr) _tmp104_), (GObject*) _tmp105_);
	_tmp106_ = self->priv->signal_map;
	_tmp107_ = self->priv->_source;
	_tmp108_ = g_signal_connect_data (_tmp107_, "sync-finished", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda286__objects_source_sync_finished, block108_data_ref (_data108_), (GClosureNotify) block108_data_unref, 0);
	_tmp109_ = self->priv->_source;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp106_, (gpointer) ((guintptr) _tmp108_), (GObject*) _tmp109_);
	_tmp110_ = self->priv->signal_map;
	_tmp111_ = self->priv->_source;
	_tmp112_ = g_signal_connect_data ((ObjectsBaseObject*) _tmp111_, "updated", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda287__objects_base_object_updated, block108_data_ref (_data108_), (GClosureNotify) block108_data_unref, 0);
	_tmp113_ = self->priv->_source;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp110_, (gpointer) ((guintptr) _tmp112_), (GObject*) _tmp113_);
	_tmp114_ = self->priv->signal_map;
	_tmp115_ = self->priv->visible_checkbutton;
	_tmp116_ = g_signal_connect_object ((GObject*) _tmp115_, "notify::active", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda288__g_object_notify, self, 0);
	_tmp117_ = self->priv->visible_checkbutton;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp114_, (gpointer) ((guintptr) _tmp116_), (GObject*) _tmp117_);
	_tmp118_ = self->priv->signal_map;
	_tmp119_ = services_store_instance ();
	_tmp120_ = g_signal_connect_object (_tmp119_, "source-added", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda289__services_store_source_added, self, 0);
	_tmp121_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp118_, (gpointer) ((guintptr) _tmp120_), (GObject*) _tmp121_);
	_tmp122_ = self->priv->signal_map;
	_tmp123_ = services_store_instance ();
	_tmp124_ = g_signal_connect_object (_tmp123_, "source-deleted", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda290__services_store_source_deleted, self, 0);
	_tmp125_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp122_, (gpointer) ((guintptr) _tmp124_), (GObject*) _tmp125_);
	_tmp126_ = self->priv->signal_map;
	_tmp127_ = self->priv->reorder;
	_tmp128_ = g_signal_connect_object (_tmp127_, "on-drop-end", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda291__widgets_reorder_child_on_drop_end, self, 0);
	_tmp129_ = self->priv->reorder;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp126_, (gpointer) ((guintptr) _tmp128_), (GObject*) _tmp129_);
	_tmp130_ = self->priv->signal_map;
	_tmp131_ = self->priv->main_revealer;
	_tmp132_ = g_signal_connect_object ((GObject*) _tmp131_, "notify::child-revealed", (GCallback) __dialogs_preferences_pages_accounts_source_row___lambda292__g_object_notify, self, 0);
	_tmp133_ = self->priv->main_revealer;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp130_, (gpointer) ((guintptr) _tmp132_), (GObject*) _tmp133_);
	_g_object_unref0 (card);
	_g_object_unref0 (content_box);
	_g_object_unref0 (end_box);
	_g_object_unref0 (warning_image);
	_g_object_unref0 (title_box);
	_g_object_unref0 (subtitle_revealer);
	_g_object_unref0 (subtitle_label);
	block108_data_unref (_data108_);
	_data108_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_accounts_source_row_class_init (DialogsPreferencesPagesAccountsSourceRowClass * klass,
                                                          gpointer klass_data)
{
	dialogs_preferences_pages_accounts_source_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesAccountsSourceRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_accounts_source_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_accounts_source_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_accounts_source_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_accounts_source_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY, dialogs_preferences_pages_accounts_source_row_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY] = g_param_spec_object ("source", "source", "source", OBJECTS_TYPE_SOURCE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY, dialogs_preferences_pages_accounts_source_row_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY] = g_param_spec_object ("preferences-dialog", "preferences-dialog", "preferences-dialog", adw_preferences_dialog_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	dialogs_preferences_pages_accounts_source_row_signals[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_MIGRATION_REQUESTED_SIGNAL] = g_signal_new ("migration-requested", DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dialogs_preferences_pages_accounts_source_row_instance_init (DialogsPreferencesPagesAccountsSourceRow * self,
                                                             gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dialogs_preferences_pages_accounts_source_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
}

static void
dialogs_preferences_pages_accounts_source_row_finalize (GObject * obj)
{
	DialogsPreferencesPagesAccountsSourceRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
	g_debug ("Accounts.vala:265: Destroying - SourceRow\n");
	_g_object_unref0 (self->priv->_source);
	_g_object_unref0 (self->priv->_preferences_dialog);
	_g_object_unref0 (self->priv->reorder);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->visible_checkbutton);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (dialogs_preferences_pages_accounts_source_row_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_accounts_source_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesAccountsSourceRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_accounts_source_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesAccountsSourceRow), 0, (GInstanceInitFunc) dialogs_preferences_pages_accounts_source_row_instance_init, NULL };
	GType dialogs_preferences_pages_accounts_source_row_type_id;
	dialogs_preferences_pages_accounts_source_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DialogsPreferencesPagesAccountsSourceRow", &g_define_type_info, 0);
	DialogsPreferencesPagesAccountsSourceRow_private_offset = g_type_add_instance_private (dialogs_preferences_pages_accounts_source_row_type_id, sizeof (DialogsPreferencesPagesAccountsSourceRowPrivate));
	return dialogs_preferences_pages_accounts_source_row_type_id;
}

GType
dialogs_preferences_pages_accounts_source_row_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_accounts_source_row_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_accounts_source_row_type_id__once)) {
		GType dialogs_preferences_pages_accounts_source_row_type_id;
		dialogs_preferences_pages_accounts_source_row_type_id = dialogs_preferences_pages_accounts_source_row_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_accounts_source_row_type_id__once, dialogs_preferences_pages_accounts_source_row_type_id);
	}
	return dialogs_preferences_pages_accounts_source_row_type_id__once;
}

static void
_vala_dialogs_preferences_pages_accounts_source_row_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec)
{
	DialogsPreferencesPagesAccountsSourceRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_accounts_source_row_get_source (self));
		break;
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_accounts_source_row_get_preferences_dialog (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_accounts_source_row_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec)
{
	DialogsPreferencesPagesAccountsSourceRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_SOURCE_PROPERTY:
		dialogs_preferences_pages_accounts_source_row_set_source (self, g_value_get_object (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_SOURCE_ROW_PREFERENCES_DIALOG_PROPERTY:
		dialogs_preferences_pages_accounts_source_row_set_preferences_dialog (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dialogs_preferences_pages_accounts_loading_page_get_instance_private (DialogsPreferencesPagesAccountsLoadingPage* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesAccountsLoadingPage_private_offset);
}

DialogsPreferencesPagesAccountsLoadingPage*
dialogs_preferences_pages_accounts_loading_page_construct (GType object_type)
{
	DialogsPreferencesPagesAccountsLoadingPage * self = NULL;
	self = (DialogsPreferencesPagesAccountsLoadingPage*) g_object_new (object_type, NULL);
	return self;
}

DialogsPreferencesPagesAccountsLoadingPage*
dialogs_preferences_pages_accounts_loading_page_new (void)
{
	return dialogs_preferences_pages_accounts_loading_page_construct (DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE);
}

void
dialogs_preferences_pages_accounts_loading_page_set_sync_label (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->secondary_label;
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SYNC_LABEL_PROPERTY]);
}

gboolean
dialogs_preferences_pages_accounts_loading_page_get_show_progress (DialogsPreferencesPagesAccountsLoadingPage* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_progress;
	return result;
}

void
dialogs_preferences_pages_accounts_loading_page_set_show_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                   gboolean value)
{
	AdwSpinner* _tmp0_;
	GtkProgressBar* _tmp1_;
	g_return_if_fail (self != NULL);
	self->priv->_show_progress = value;
	_tmp0_ = self->priv->spinner;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, !value);
	_tmp1_ = self->priv->progress_bar;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, value);
	g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY]);
}

void
dialogs_preferences_pages_accounts_loading_page_set_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                              gdouble value)
{
	GtkProgressBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->progress_bar;
	gtk_progress_bar_set_fraction (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_PROGRESS_PROPERTY]);
}

static GObject *
dialogs_preferences_pages_accounts_loading_page_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesAccountsLoadingPage * self;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	AdwSpinner* _tmp2_ = NULL;
	GtkProgressBar* _tmp3_ = NULL;
	GtkLabel* _tmp4_ = NULL;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* primary_label = NULL;
	GtkLabel* _tmp7_ = NULL;
	GtkLabel* _tmp8_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp9_ = NULL;
	GtkBox* _tmp10_;
	GtkLabel* _tmp11_;
	GtkBox* _tmp12_;
	AdwSpinner* _tmp13_;
	GtkBox* _tmp14_;
	GtkProgressBar* _tmp15_;
	GtkBox* _tmp16_;
	GtkLabel* _tmp17_;
	GtkBox* _tmp18_;
	GtkLabel* _tmp19_;
	GtkBox* _tmp20_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_accounts_loading_page_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Syncing…"));
	gtk_label_set_wrap (_tmp0_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	gtk_label_set_justify (_tmp0_, GTK_JUSTIFY_CENTER);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 24);
	g_object_ref_sink (_tmp0_);
	title_label = _tmp0_;
	_tmp1_ = title_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "title-1");
	_tmp2_ = (AdwSpinner*) adw_spinner_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp2_, "height-request", 64, NULL);
	g_object_set ((GtkWidget*) _tmp2_, "width-request", 64, NULL);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->spinner);
	self->priv->spinner = _tmp2_;
	_tmp3_ = (GtkProgressBar*) gtk_progress_bar_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp3_, "width-request", 300, NULL);
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->progress_bar);
	self->priv->progress_bar = _tmp3_;
	_tmp4_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_wrap (_tmp4_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_label_set_justify (_tmp4_, GTK_JUSTIFY_CENTER);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->secondary_label);
	self->priv->secondary_label = _tmp4_;
	_tmp5_ = self->priv->secondary_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "dimmed");
	_tmp6_ = self->priv->secondary_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp6_, "caption");
	_tmp7_ = (GtkLabel*) gtk_label_new (_ ("Planify is syncing your tasks, this may take a few moments"));
	gtk_label_set_wrap (_tmp7_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_label_set_justify (_tmp7_, GTK_JUSTIFY_CENTER);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp7_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp7_, 12);
	g_object_ref_sink (_tmp7_);
	primary_label = _tmp7_;
	_tmp8_ = primary_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp8_, "dimmed");
	_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, 128);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp9_, 64);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp9_, 64);
	g_object_ref_sink (_tmp9_);
	content_box = _tmp9_;
	_tmp10_ = content_box;
	_tmp11_ = title_label;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = content_box;
	_tmp13_ = self->priv->spinner;
	gtk_box_append (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = content_box;
	_tmp15_ = self->priv->progress_bar;
	gtk_box_append (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = content_box;
	_tmp17_ = self->priv->secondary_label;
	gtk_box_append (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = content_box;
	_tmp19_ = primary_label;
	gtk_box_append (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = content_box;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp20_);
	_g_object_unref0 (content_box);
	_g_object_unref0 (primary_label);
	_g_object_unref0 (title_label);
	return obj;
}

static void
dialogs_preferences_pages_accounts_loading_page_class_init (DialogsPreferencesPagesAccountsLoadingPageClass * klass,
                                                            gpointer klass_data)
{
	dialogs_preferences_pages_accounts_loading_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesAccountsLoadingPage_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_accounts_loading_page_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_accounts_loading_page_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_accounts_loading_page_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_accounts_loading_page_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SYNC_LABEL_PROPERTY, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SYNC_LABEL_PROPERTY] = g_param_spec_string ("sync-label", "sync-label", "sync-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY] = g_param_spec_boolean ("show-progress", "show-progress", "show-progress", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_PROGRESS_PROPERTY, dialogs_preferences_pages_accounts_loading_page_properties[DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_PROGRESS_PROPERTY] = g_param_spec_double ("progress", "progress", "progress", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
}

static void
dialogs_preferences_pages_accounts_loading_page_instance_init (DialogsPreferencesPagesAccountsLoadingPage * self,
                                                               gpointer klass)
{
	self->priv = dialogs_preferences_pages_accounts_loading_page_get_instance_private (self);
	self->priv->_show_progress = FALSE;
}

static void
dialogs_preferences_pages_accounts_loading_page_finalize (GObject * obj)
{
	DialogsPreferencesPagesAccountsLoadingPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage);
	_g_object_unref0 (self->priv->secondary_label);
	_g_object_unref0 (self->priv->progress_bar);
	_g_object_unref0 (self->priv->spinner);
	G_OBJECT_CLASS (dialogs_preferences_pages_accounts_loading_page_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_accounts_loading_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesAccountsLoadingPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_accounts_loading_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesAccountsLoadingPage), 0, (GInstanceInitFunc) dialogs_preferences_pages_accounts_loading_page_instance_init, NULL };
	GType dialogs_preferences_pages_accounts_loading_page_type_id;
	dialogs_preferences_pages_accounts_loading_page_type_id = g_type_register_static (adw_bin_get_type (), "DialogsPreferencesPagesAccountsLoadingPage", &g_define_type_info, 0);
	DialogsPreferencesPagesAccountsLoadingPage_private_offset = g_type_add_instance_private (dialogs_preferences_pages_accounts_loading_page_type_id, sizeof (DialogsPreferencesPagesAccountsLoadingPagePrivate));
	return dialogs_preferences_pages_accounts_loading_page_type_id;
}

GType
dialogs_preferences_pages_accounts_loading_page_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_accounts_loading_page_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_accounts_loading_page_type_id__once)) {
		GType dialogs_preferences_pages_accounts_loading_page_type_id;
		dialogs_preferences_pages_accounts_loading_page_type_id = dialogs_preferences_pages_accounts_loading_page_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_accounts_loading_page_type_id__once, dialogs_preferences_pages_accounts_loading_page_type_id);
	}
	return dialogs_preferences_pages_accounts_loading_page_type_id__once;
}

static void
_vala_dialogs_preferences_pages_accounts_loading_page_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	DialogsPreferencesPagesAccountsLoadingPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY:
		g_value_set_boolean (value, dialogs_preferences_pages_accounts_loading_page_get_show_progress (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_accounts_loading_page_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	DialogsPreferencesPagesAccountsLoadingPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SYNC_LABEL_PROPERTY:
		dialogs_preferences_pages_accounts_loading_page_set_sync_label (self, g_value_get_string (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_SHOW_PROGRESS_PROPERTY:
		dialogs_preferences_pages_accounts_loading_page_set_show_progress (self, g_value_get_boolean (value));
		break;
		case DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_PROGRESS_PROPERTY:
		dialogs_preferences_pages_accounts_loading_page_set_progress (self, g_value_get_double (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block109Data*
block109_data_ref (Block109Data* _data109_)
{
	g_atomic_int_inc (&_data109_->_ref_count_);
	return _data109_;
}

static void
block109_data_unref (void * _userdata_)
{
	Block109Data* _data109_;
	_data109_ = (Block109Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data109_->_ref_count_)) {
		DialogsPreferencesPagesAccounts* self;
		self = _data109_->self;
		_g_object_unref0 (_data109_->sources_hashmap);
		_g_object_unref0 (self);
		g_slice_free (Block109Data, _data109_);
	}
}

static void
_dialogs_preferences_pages_accounts___lambda306_ (Block109Data* _data109_,
                                                  ObjectsSource* source)
{
	DialogsPreferencesPagesAccounts* self;
	GeeHashMap* _tmp0_;
	self = _data109_->self;
	g_return_if_fail (source != NULL);
	_tmp0_ = _data109_->sources_hashmap;
	dialogs_preferences_pages_accounts_add_source_row (self, source, _tmp0_);
}

static void
__dialogs_preferences_pages_accounts___lambda306__services_store_source_added (ServicesStore* _sender,
                                                                               ObjectsSource* source,
                                                                               gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda306_ (self, source);
}

static void
_dialogs_preferences_pages_accounts___lambda307_ (Block109Data* _data109_,
                                                  ObjectsSource* source)
{
	DialogsPreferencesPagesAccounts* self;
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = _data109_->self;
	g_return_if_fail (source != NULL);
	_tmp0_ = _data109_->sources_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		DialogsPreferencesPagesAccountsSourceRow* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = _data109_->sources_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (DialogsPreferencesPagesAccountsSourceRow*) _tmp6_;
		dialogs_preferences_pages_accounts_source_row_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = _data109_->sources_hashmap;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	}
}

static void
__dialogs_preferences_pages_accounts___lambda307__services_store_source_deleted (ServicesStore* _sender,
                                                                                 ObjectsSource* source,
                                                                                 gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda307_ (self, source);
}

static void
_dialogs_preferences_pages_accounts___lambda308_ (DialogsPreferencesPagesAccounts* self)
{
	AdwPreferencesDialog* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	AdwPreferencesDialog* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	DialogsPreferencesPagesTodoistSetup* _tmp4_;
	DialogsPreferencesPagesTodoistSetup* _tmp5_;
	_tmp0_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = dialogs_preferences_pages_todoist_setup_new (_tmp3_, self);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	adw_preferences_dialog_push_subpage (_tmp1_, (AdwNavigationPage*) _tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
__dialogs_preferences_pages_accounts___lambda308__gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda308_ ((DialogsPreferencesPagesAccounts*) self);
}

static void
_dialogs_preferences_pages_accounts___lambda309_ (DialogsPreferencesPagesAccounts* self)
{
	AdwPreferencesDialog* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	AdwPreferencesDialog* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	DialogsPreferencesPagesNextcloudSetup* _tmp4_;
	DialogsPreferencesPagesNextcloudSetup* _tmp5_;
	_tmp0_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = dialogs_preferences_pages_nextcloud_setup_new (_tmp3_, self);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	adw_preferences_dialog_push_subpage (_tmp1_, (AdwNavigationPage*) _tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
__dialogs_preferences_pages_accounts___lambda309__gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda309_ ((DialogsPreferencesPagesAccounts*) self);
}

static void
_dialogs_preferences_pages_accounts___lambda320_ (DialogsPreferencesPagesAccounts* self)
{
	AdwPreferencesDialog* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	AdwPreferencesDialog* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	DialogsPreferencesPagesCalDAVSetup* _tmp4_;
	DialogsPreferencesPagesCalDAVSetup* _tmp5_;
	_tmp0_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = dialogs_preferences_pages_cal_dav_setup_new (_tmp3_, self);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	adw_preferences_dialog_push_subpage (_tmp1_, (AdwNavigationPage*) _tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
__dialogs_preferences_pages_accounts___lambda320__gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda320_ ((DialogsPreferencesPagesAccounts*) self);
}

static void
_dialogs_preferences_pages_accounts___lambda332_ (DialogsPreferencesPagesAccounts* self,
                                                  GtkWidget* row)
{
	ObjectsSource* source = NULL;
	ObjectsSource* _tmp0_;
	ObjectsSource* _tmp1_;
	ObjectsSource* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	AdwPreferencesDialog* _tmp4_;
	AdwPreferencesDialog* _tmp5_;
	AdwPreferencesDialog* _tmp6_;
	ObjectsSource* _tmp7_;
	DialogsPreferencesPagesSourceView* _tmp8_;
	DialogsPreferencesPagesSourceView* _tmp9_;
	g_return_if_fail (row != NULL);
	_tmp0_ = dialogs_preferences_pages_accounts_source_row_get_source (G_TYPE_CHECK_INSTANCE_CAST (row, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, DialogsPreferencesPagesAccountsSourceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	source = _tmp2_;
	_tmp3_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = source;
	_tmp8_ = dialogs_preferences_pages_source_view_new (_tmp6_, _tmp7_);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	adw_preferences_dialog_push_subpage (_tmp4_, (AdwNavigationPage*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_g_object_unref0 (source);
}

static void
__dialogs_preferences_pages_accounts___lambda332__layouts_header_item_row_activated (LayoutsHeaderItem* _sender,
                                                                                     GtkWidget* widget,
                                                                                     gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda332_ ((DialogsPreferencesPagesAccounts*) self, widget);
}

static void
_dialogs_preferences_pages_accounts___lambda340_ (DialogsPreferencesPagesAccounts* self)
{
	AdwPreferencesDialog* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	AdwPreferencesDialog* _tmp2_;
	AdwPreferencesDialog* _tmp3_;
	DialogsPreferencesPagesInboxPage* _tmp4_;
	DialogsPreferencesPagesInboxPage* _tmp5_;
	_tmp0_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = dialogs_preferences_pages_inbox_page_new (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	adw_preferences_dialog_push_subpage (_tmp1_, (AdwNavigationPage*) _tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
__dialogs_preferences_pages_accounts___lambda340__adw_action_row_activated (AdwActionRow* _sender,
                                                                            gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda340_ ((DialogsPreferencesPagesAccounts*) self);
}

static void
_dialogs_preferences_pages_accounts___lambda341_ (DialogsPreferencesPagesAccounts* self)
{
	dialogs_preferences_pages_accounts_update_inbox_page_name (self);
}

static void
__dialogs_preferences_pages_accounts___lambda341__g_settings_changed (GSettings* _sender,
                                                                      const gchar* key,
                                                                      gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda341_ ((DialogsPreferencesPagesAccounts*) self);
}

static void
_dialogs_preferences_pages_accounts___lambda342_ (DialogsPreferencesPagesAccounts* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_accounts___lambda342__gtk_widget_destroy (GtkWidget* _sender,
                                                                      gpointer self)
{
	_dialogs_preferences_pages_accounts___lambda342_ ((DialogsPreferencesPagesAccounts*) self);
}

static GObject *
dialogs_preferences_pages_accounts_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesAccounts * self;
	Block109Data* _data109_;
	WidgetsContextMenuMenuItem* todoist_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	WidgetsContextMenuMenuItem* nextcloud_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_;
	WidgetsContextMenuMenuItem* caldav_item = NULL;
	WidgetsContextMenuMenuItem* _tmp2_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	WidgetsContextMenuMenuItem* _tmp7_;
	GtkBox* _tmp8_;
	WidgetsContextMenuMenuItem* _tmp9_;
	GtkBox* _tmp10_;
	WidgetsContextMenuMenuItem* _tmp11_;
	GtkPopover* popover = NULL;
	GtkBox* _tmp12_;
	GtkWidget* _tmp13_;
	GtkPopover* _tmp14_ = NULL;
	GtkMenuButton* add_source_button = NULL;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar** _tmp17_;
	gchar* _tmp18_;
	GtkPopover* _tmp19_;
	GtkPopover* _tmp20_;
	GtkMenuButton* _tmp21_ = NULL;
	LayoutsHeaderItem* _tmp22_ = NULL;
	LayoutsHeaderItem* _tmp23_;
	GtkMenuButton* _tmp24_;
	GtkLabel* _tmp25_ = NULL;
	GtkLabel* _tmp26_;
	GtkLabel* _tmp27_;
	GtkImage* arrow_icon = NULL;
	GtkImage* _tmp28_;
	GtkBox* inbox_box = NULL;
	GtkBox* _tmp29_ = NULL;
	GtkBox* _tmp30_;
	GtkLabel* _tmp31_;
	GtkBox* _tmp32_;
	GtkImage* _tmp33_;
	AdwActionRow* inbox_page_row = NULL;
	gchar* _tmp34_;
	AdwActionRow* _tmp35_ = NULL;
	AdwActionRow* _tmp36_;
	GtkImage* _tmp37_;
	GtkImage* _tmp38_;
	AdwActionRow* _tmp39_;
	GtkBox* _tmp40_;
	AdwPreferencesGroup* inbox_group = NULL;
	AdwPreferencesGroup* _tmp41_ = NULL;
	AdwPreferencesGroup* _tmp42_;
	AdwActionRow* _tmp43_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp44_ = NULL;
	GtkBox* _tmp45_;
	LayoutsHeaderItem* _tmp46_;
	GtkBox* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	gchar** _tmp50_;
	GtkLabel* _tmp51_ = NULL;
	GtkLabel* _tmp52_;
	GtkBox* _tmp53_;
	AdwPreferencesGroup* _tmp54_;
	AdwToolbarView* toolbar_view = NULL;
	GtkBox* _tmp55_;
	GtkWidget* _tmp56_;
	AdwToolbarView* _tmp57_ = NULL;
	AdwToolbarView* _tmp58_;
	AdwHeaderBar* _tmp59_;
	AdwHeaderBar* _tmp60_;
	AdwToolbarView* _tmp61_;
	GeeHashMap* _tmp62_;
	GeeHashMap* _tmp75_;
	ServicesStore* _tmp76_;
	gulong _tmp77_;
	ServicesStore* _tmp78_;
	GeeHashMap* _tmp79_;
	ServicesStore* _tmp80_;
	gulong _tmp81_;
	ServicesStore* _tmp82_;
	GeeHashMap* _tmp83_;
	WidgetsContextMenuMenuItem* _tmp84_;
	gulong _tmp85_;
	WidgetsContextMenuMenuItem* _tmp86_;
	GeeHashMap* _tmp87_;
	WidgetsContextMenuMenuItem* _tmp88_;
	gulong _tmp89_;
	WidgetsContextMenuMenuItem* _tmp90_;
	GeeHashMap* _tmp91_;
	WidgetsContextMenuMenuItem* _tmp92_;
	gulong _tmp93_;
	WidgetsContextMenuMenuItem* _tmp94_;
	GeeHashMap* _tmp95_;
	LayoutsHeaderItem* _tmp96_;
	gulong _tmp97_;
	LayoutsHeaderItem* _tmp98_;
	AdwActionRow* _tmp99_;
	ServicesSettings* _tmp100_;
	ServicesSettings* _tmp101_;
	GSettings* _tmp102_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_accounts_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccounts);
	_data109_ = g_slice_new0 (Block109Data);
	_data109_->_ref_count_ = 1;
	_data109_->self = g_object_ref (self);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Todoist"), NULL);
	g_object_ref_sink (_tmp0_);
	todoist_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Nextcloud"), NULL);
	g_object_ref_sink (_tmp1_);
	nextcloud_item = _tmp1_;
	_tmp2_ = widgets_context_menu_menu_item_new (_ ("CalDAV"), NULL);
	g_object_ref_sink (_tmp2_);
	caldav_item = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp3_);
	menu_box = _tmp3_;
	_tmp4_ = menu_box;
	_tmp5_ = menu_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp5_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 3);
	_tmp6_ = menu_box;
	_tmp7_ = todoist_item;
	gtk_box_append (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = menu_box;
	_tmp9_ = nextcloud_item;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = menu_box;
	_tmp11_ = caldav_item;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = menu_box;
	_tmp13_ = _g_object_ref0 ((GtkWidget*) _tmp12_);
	_tmp14_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp14_, TRUE);
	gtk_popover_set_child (_tmp14_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	g_object_set ((GtkWidget*) _tmp14_, "width-request", 250, NULL);
	gtk_popover_set_position (_tmp14_, GTK_POS_BOTTOM);
	g_object_ref_sink (_tmp14_);
	popover = _tmp14_;
	_tmp15_ = g_strdup ("plus-large-symbolic");
	_tmp16_ = g_strdup ("flat");
	_tmp17_ = g_new0 (gchar*, 1 + 1);
	_tmp17_[0] = _tmp16_;
	_tmp18_ = g_strdup (_ ("Add Source"));
	_tmp19_ = popover;
	_tmp20_ = _g_object_ref0 (_tmp19_);
	_tmp21_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp21_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp21_, _tmp15_);
	_g_free0 (_tmp15_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp21_, _tmp17_);
	_tmp17_ = (_vala_array_free (_tmp17_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp21_, _tmp18_);
	_g_free0 (_tmp18_);
	gtk_menu_button_set_popover (_tmp21_, _tmp20_);
	_g_object_unref0 (_tmp20_);
	g_object_ref_sink (_tmp21_);
	add_source_button = _tmp21_;
	_tmp22_ = layouts_header_item_new (_ ("Accounts"));
	layouts_header_item_set_card (_tmp22_, TRUE);
	layouts_header_item_set_reveal (_tmp22_, TRUE);
	layouts_header_item_set_listbox_margin_top (_tmp22_, 6);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->priv->sources_group);
	self->priv->sources_group = _tmp22_;
	_tmp23_ = self->priv->sources_group;
	_tmp24_ = add_source_button;
	layouts_header_item_add_widget_end (_tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_ellipsize (_tmp25_, PANGO_ELLIPSIZE_END);
	gtk_label_set_max_width_chars (_tmp25_, 24);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->inbox_page_name);
	self->priv->inbox_page_name = _tmp25_;
	_tmp26_ = self->priv->inbox_page_name;
	gtk_widget_add_css_class ((GtkWidget*) _tmp26_, "caption");
	_tmp27_ = self->priv->inbox_page_name;
	gtk_widget_add_css_class ((GtkWidget*) _tmp27_, "dimmed");
	_tmp28_ = (GtkImage*) gtk_image_new_from_icon_name ("go-next-symbolic");
	g_object_ref_sink (_tmp28_);
	arrow_icon = _tmp28_;
	_tmp29_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp29_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp29_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp29_, TRUE);
	g_object_ref_sink (_tmp29_);
	inbox_box = _tmp29_;
	_tmp30_ = inbox_box;
	_tmp31_ = self->priv->inbox_page_name;
	gtk_box_append (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = inbox_box;
	_tmp33_ = arrow_icon;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = g_strdup (_ ("Inbox Page"));
	_tmp35_ = (AdwActionRow*) adw_action_row_new ();
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp35_, TRUE);
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp35_, _tmp34_);
	_g_free0 (_tmp34_);
	g_object_ref_sink (_tmp35_);
	inbox_page_row = _tmp35_;
	_tmp36_ = inbox_page_row;
	_tmp37_ = (GtkImage*) gtk_image_new_from_icon_name ("mailbox-symbolic");
	g_object_ref_sink (_tmp37_);
	_tmp38_ = _tmp37_;
	adw_action_row_add_prefix (_tmp36_, (GtkWidget*) _tmp38_);
	_g_object_unref0 (_tmp38_);
	_tmp39_ = inbox_page_row;
	_tmp40_ = inbox_box;
	adw_action_row_add_suffix (_tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 12);
	g_object_ref_sink (_tmp41_);
	inbox_group = _tmp41_;
	_tmp42_ = inbox_group;
	_tmp43_ = inbox_page_row;
	adw_preferences_group_add (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp44_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 12);
	g_object_ref_sink (_tmp44_);
	content_box = _tmp44_;
	_tmp45_ = content_box;
	_tmp46_ = self->priv->sources_group;
	gtk_box_append (_tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = content_box;
	_tmp48_ = g_strdup ("caption");
	_tmp49_ = g_strdup ("dimmed");
	_tmp50_ = g_new0 (gchar*, 2 + 1);
	_tmp50_[0] = _tmp48_;
	_tmp50_[1] = _tmp49_;
	_tmp51_ = (GtkLabel*) gtk_label_new (_ ("You can sort your accounts by dragging and dropping"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp51_, _tmp50_);
	_tmp50_ = (_vala_array_free (_tmp50_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp51_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp51_);
	_tmp52_ = _tmp51_;
	gtk_box_append (_tmp47_, (GtkWidget*) _tmp52_);
	_g_object_unref0 (_tmp52_);
	_tmp53_ = content_box;
	_tmp54_ = inbox_group;
	gtk_box_append (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = content_box;
	_tmp56_ = _g_object_ref0 ((GtkWidget*) _tmp55_);
	_tmp57_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp57_, _tmp56_);
	_g_object_unref0 (_tmp56_);
	g_object_ref_sink (_tmp57_);
	toolbar_view = _tmp57_;
	_tmp58_ = toolbar_view;
	_tmp59_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp59_);
	_tmp60_ = _tmp59_;
	adw_toolbar_view_add_top_bar (_tmp58_, (GtkWidget*) _tmp60_);
	_g_object_unref0 (_tmp60_);
	_tmp61_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp61_);
	dialogs_preferences_pages_accounts_update_inbox_page_name (self);
	_tmp62_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_SOURCE_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_data109_->sources_hashmap = _tmp62_;
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp63_;
		GeeArrayList* _tmp64_;
		GeeArrayList* _tmp65_;
		gint _source_size = 0;
		GeeArrayList* _tmp66_;
		gint _tmp67_;
		gint _tmp68_;
		gint _source_index = 0;
		_tmp63_ = services_store_instance ();
		_tmp64_ = services_store_get_sources (_tmp63_);
		_tmp65_ = _tmp64_;
		_source_list = _tmp65_;
		_tmp66_ = _source_list;
		_tmp67_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp66_);
		_tmp68_ = _tmp67_;
		_source_size = _tmp68_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp69_;
			gint _tmp70_;
			ObjectsSource* source = NULL;
			GeeArrayList* _tmp71_;
			gpointer _tmp72_;
			ObjectsSource* _tmp73_;
			GeeHashMap* _tmp74_;
			_source_index = _source_index + 1;
			_tmp69_ = _source_index;
			_tmp70_ = _source_size;
			if (!(_tmp69_ < _tmp70_)) {
				break;
			}
			_tmp71_ = _source_list;
			_tmp72_ = gee_abstract_list_get ((GeeAbstractList*) _tmp71_, _source_index);
			source = (ObjectsSource*) _tmp72_;
			_tmp73_ = source;
			_tmp74_ = _data109_->sources_hashmap;
			dialogs_preferences_pages_accounts_add_source_row (self, _tmp73_, _tmp74_);
			_g_object_unref0 (source);
		}
	}
	_tmp75_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp76_ = services_store_instance ();
	_tmp77_ = g_signal_connect_data (_tmp76_, "source-added", (GCallback) __dialogs_preferences_pages_accounts___lambda306__services_store_source_added, block109_data_ref (_data109_), (GClosureNotify) block109_data_unref, 0);
	_tmp78_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp75_, (gpointer) ((guintptr) _tmp77_), (GObject*) _tmp78_);
	_tmp79_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp80_ = services_store_instance ();
	_tmp81_ = g_signal_connect_data (_tmp80_, "source-deleted", (GCallback) __dialogs_preferences_pages_accounts___lambda307__services_store_source_deleted, block109_data_ref (_data109_), (GClosureNotify) block109_data_unref, 0);
	_tmp82_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (gpointer) ((guintptr) _tmp81_), (GObject*) _tmp82_);
	_tmp83_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp84_ = todoist_item;
	_tmp85_ = g_signal_connect_object ((GtkButton*) _tmp84_, "clicked", (GCallback) __dialogs_preferences_pages_accounts___lambda308__gtk_button_clicked, self, 0);
	_tmp86_ = todoist_item;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp83_, (gpointer) ((guintptr) _tmp85_), (GObject*) _tmp86_);
	_tmp87_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp88_ = nextcloud_item;
	_tmp89_ = g_signal_connect_object ((GtkButton*) _tmp88_, "clicked", (GCallback) __dialogs_preferences_pages_accounts___lambda309__gtk_button_clicked, self, 0);
	_tmp90_ = nextcloud_item;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp87_, (gpointer) ((guintptr) _tmp89_), (GObject*) _tmp90_);
	_tmp91_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp92_ = caldav_item;
	_tmp93_ = g_signal_connect_object ((GtkButton*) _tmp92_, "clicked", (GCallback) __dialogs_preferences_pages_accounts___lambda320__gtk_button_clicked, self, 0);
	_tmp94_ = caldav_item;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp91_, (gpointer) ((guintptr) _tmp93_), (GObject*) _tmp94_);
	_tmp95_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp96_ = self->priv->sources_group;
	_tmp97_ = g_signal_connect_object (_tmp96_, "row-activated", (GCallback) __dialogs_preferences_pages_accounts___lambda332__layouts_header_item_row_activated, self, 0);
	_tmp98_ = self->priv->sources_group;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp95_, (gpointer) ((guintptr) _tmp97_), (GObject*) _tmp98_);
	_tmp99_ = inbox_page_row;
	g_signal_connect_object (_tmp99_, "activated", (GCallback) __dialogs_preferences_pages_accounts___lambda340__adw_action_row_activated, self, 0);
	_tmp100_ = services_settings_get_default ();
	_tmp101_ = _tmp100_;
	_tmp102_ = _tmp101_->settings;
	g_signal_connect_object (_tmp102_, "changed::local-inbox-project-id", (GCallback) __dialogs_preferences_pages_accounts___lambda341__g_settings_changed, self, 0);
	_g_object_unref0 (_tmp101_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_accounts___lambda342__gtk_widget_destroy, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_box);
	_g_object_unref0 (inbox_group);
	_g_object_unref0 (inbox_page_row);
	_g_object_unref0 (inbox_box);
	_g_object_unref0 (arrow_icon);
	_g_object_unref0 (add_source_button);
	_g_object_unref0 (popover);
	_g_object_unref0 (menu_box);
	_g_object_unref0 (caldav_item);
	_g_object_unref0 (nextcloud_item);
	_g_object_unref0 (todoist_item);
	block109_data_unref (_data109_);
	_data109_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_accounts_class_init (DialogsPreferencesPagesAccountsClass * klass,
                                               gpointer klass_data)
{
	dialogs_preferences_pages_accounts_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesAccounts_private_offset);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_accounts_real_clean_up;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_accounts_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_accounts_finalize;
}

static void
dialogs_preferences_pages_accounts_instance_init (DialogsPreferencesPagesAccounts * self,
                                                  gpointer klass)
{
	self->priv = dialogs_preferences_pages_accounts_get_instance_private (self);
}

static void
dialogs_preferences_pages_accounts_finalize (GObject * obj)
{
	DialogsPreferencesPagesAccounts * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccounts);
	g_debug ("Accounts.vala:34: Destroying - Dialogs.Preferences.Pages.Accounts\n");
	_g_object_unref0 (self->priv->sources_group);
	_g_object_unref0 (self->priv->inbox_page_name);
	G_OBJECT_CLASS (dialogs_preferences_pages_accounts_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_accounts_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesAccountsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_accounts_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesAccounts), 0, (GInstanceInitFunc) dialogs_preferences_pages_accounts_instance_init, NULL };
	GType dialogs_preferences_pages_accounts_type_id;
	dialogs_preferences_pages_accounts_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesAccounts", &g_define_type_info, 0);
	DialogsPreferencesPagesAccounts_private_offset = g_type_add_instance_private (dialogs_preferences_pages_accounts_type_id, sizeof (DialogsPreferencesPagesAccountsPrivate));
	return dialogs_preferences_pages_accounts_type_id;
}

GType
dialogs_preferences_pages_accounts_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_accounts_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_accounts_type_id__once)) {
		GType dialogs_preferences_pages_accounts_type_id;
		dialogs_preferences_pages_accounts_type_id = dialogs_preferences_pages_accounts_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_accounts_type_id__once, dialogs_preferences_pages_accounts_type_id);
	}
	return dialogs_preferences_pages_accounts_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);
}

