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

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

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

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

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

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

#define DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP (dialogs_preferences_pages_backup_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, DialogsPreferencesPagesBackup))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, DialogsPreferencesPagesBackupClass))
#define DIALOGS_PREFERENCES_PAGES_IS_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP))
#define DIALOGS_PREFERENCES_PAGES_IS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, DialogsPreferencesPagesBackupClass))

typedef struct _DialogsPreferencesPagesBackup DialogsPreferencesPagesBackup;
typedef struct _DialogsPreferencesPagesBackupClass DialogsPreferencesPagesBackupClass;
typedef struct _DialogsPreferencesPagesBackupPrivate DialogsPreferencesPagesBackupPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_BACKUP_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_backup_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define OBJECTS_TYPE_BACKUP (objects_backup_get_type ())
#define OBJECTS_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OBJECTS_TYPE_BACKUP, ObjectsBackup))
#define OBJECTS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OBJECTS_TYPE_BACKUP, ObjectsBackupClass))
#define OBJECTS_IS_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OBJECTS_TYPE_BACKUP))
#define OBJECTS_IS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OBJECTS_TYPE_BACKUP))
#define OBJECTS_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OBJECTS_TYPE_BACKUP, ObjectsBackupClass))

typedef struct _ObjectsBackup ObjectsBackup;
typedef struct _ObjectsBackupClass ObjectsBackupClass;

#define DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW (dialogs_preferences_pages_backup_backup_row_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRowClass))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_BACKUP_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_BACKUP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRowClass))

typedef struct _DialogsPreferencesPagesBackupBackupRow DialogsPreferencesPagesBackupBackupRow;
typedef struct _DialogsPreferencesPagesBackupBackupRowClass DialogsPreferencesPagesBackupBackupRowClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block95Data Block95Data;

#define DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW (dialogs_preferences_pages_backup_extra_folder_row_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRowClass))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_EXTRA_FOLDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_EXTRA_FOLDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRowClass))

typedef struct _DialogsPreferencesPagesBackupExtraFolderRow DialogsPreferencesPagesBackupExtraFolderRow;
typedef struct _DialogsPreferencesPagesBackupExtraFolderRowClass DialogsPreferencesPagesBackupExtraFolderRowClass;

#define SERVICES_TYPE_BACKUP_MANAGER (services_backup_manager_get_type ())
#define SERVICES_BACKUP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVICES_TYPE_BACKUP_MANAGER, ServicesBackupManager))
#define SERVICES_BACKUP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVICES_TYPE_BACKUP_MANAGER, ServicesBackupManagerClass))
#define SERVICES_IS_BACKUP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVICES_TYPE_BACKUP_MANAGER))
#define SERVICES_IS_BACKUP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVICES_TYPE_BACKUP_MANAGER))
#define SERVICES_BACKUP_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVICES_TYPE_BACKUP_MANAGER, ServicesBackupManagerClass))

typedef struct _ServicesBackupManager ServicesBackupManager;
typedef struct _ServicesBackupManagerClass ServicesBackupManagerClass;

#define DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW (dialogs_preferences_pages_backup_import_view_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportView))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportViewClass))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_IMPORT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IS_IMPORT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW))
#define DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportViewClass))

typedef struct _DialogsPreferencesPagesBackupImportView DialogsPreferencesPagesBackupImportView;
typedef struct _DialogsPreferencesPagesBackupImportViewClass DialogsPreferencesPagesBackupImportViewClass;
typedef struct _DialogsPreferencesPagesBackupBackupRowPrivate DialogsPreferencesPagesBackupBackupRowPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_backup_backup_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_NUM_PROPERTIES];
typedef struct _Block96Data Block96Data;
typedef struct _DialogsPreferencesPagesBackupExtraFolderRowPrivate DialogsPreferencesPagesBackupExtraFolderRowPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_backup_extra_folder_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_NUM_PROPERTIES];
enum  {
	DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_REMOVED_SIGNAL,
	DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_NUM_SIGNALS
};
static guint dialogs_preferences_pages_backup_extra_folder_row_signals[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_NUM_SIGNALS] = {0};
typedef struct _DialogsPreferencesPagesBackupImportViewPrivate DialogsPreferencesPagesBackupImportViewPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_backup_import_view_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_NUM_PROPERTIES];

#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;
typedef struct _Block97Data Block97Data;

#define SERVICES_TYPE_MIGRATE_FROM_PLANNER (services_migrate_from_planner_get_type ())
#define SERVICES_MIGRATE_FROM_PLANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVICES_TYPE_MIGRATE_FROM_PLANNER, ServicesMigrateFromPlanner))
#define SERVICES_MIGRATE_FROM_PLANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVICES_TYPE_MIGRATE_FROM_PLANNER, ServicesMigrateFromPlannerClass))
#define SERVICES_IS_MIGRATE_FROM_PLANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVICES_TYPE_MIGRATE_FROM_PLANNER))
#define SERVICES_IS_MIGRATE_FROM_PLANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVICES_TYPE_MIGRATE_FROM_PLANNER))
#define SERVICES_MIGRATE_FROM_PLANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVICES_TYPE_MIGRATE_FROM_PLANNER, ServicesMigrateFromPlannerClass))

typedef struct _ServicesMigrateFromPlanner ServicesMigrateFromPlanner;
typedef struct _ServicesMigrateFromPlannerClass ServicesMigrateFromPlannerClass;
typedef struct _Block98Data Block98Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

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

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

struct _DialogsPreferencesPagesBackup {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesBackupPrivate * priv;
};

struct _DialogsPreferencesPagesBackupClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesBackupPrivate {
	LayoutsHeaderItem* backups_group;
	LayoutsHeaderItem* extra_group;
};

struct _Block95Data {
	int _ref_count_;
	DialogsPreferencesPagesBackup* self;
	gchar* folder_path;
};

struct _DialogsPreferencesPagesBackupBackupRow {
	GtkListBoxRow parent_instance;
	DialogsPreferencesPagesBackupBackupRowPrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesBackupBackupRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DialogsPreferencesPagesBackupBackupRowPrivate {
	ObjectsBackup* _backup;
	GtkRevealer* main_revealer;
};

struct _Block96Data {
	int _ref_count_;
	DialogsPreferencesPagesBackupBackupRow* self;
	GtkPopover* menu_popover;
};

struct _DialogsPreferencesPagesBackupExtraFolderRow {
	GtkListBoxRow parent_instance;
	DialogsPreferencesPagesBackupExtraFolderRowPrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesBackupExtraFolderRowClass {
	GtkListBoxRowClass parent_class;
};

struct _DialogsPreferencesPagesBackupExtraFolderRowPrivate {
	gchar* _folder_path;
	GtkRevealer* main_revealer;
};

struct _DialogsPreferencesPagesBackupImportView {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesBackupImportViewPrivate * priv;
};

struct _DialogsPreferencesPagesBackupImportViewClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesBackupImportViewPrivate {
	ObjectsBackup* _backup;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block97Data {
	int _ref_count_;
	DialogsPreferencesPagesBackup* self;
	AdwSwitchRow* auto_backup_row;
};

struct _Block98Data {
	int _ref_count_;
	DialogsPreferencesPagesBackup* self;
	GtkFileDialog* dialog;
};

static gint DialogsPreferencesPagesBackup_private_offset;
static gpointer dialogs_preferences_pages_backup_parent_class = NULL;
static gint DialogsPreferencesPagesBackupBackupRow_private_offset;
static gpointer dialogs_preferences_pages_backup_backup_row_parent_class = NULL;
static gint DialogsPreferencesPagesBackupExtraFolderRow_private_offset;
static gpointer dialogs_preferences_pages_backup_extra_folder_row_parent_class = NULL;
static gint DialogsPreferencesPagesBackupImportView_private_offset;
static gpointer dialogs_preferences_pages_backup_import_view_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

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_backup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBackup, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesBackup* dialogs_preferences_pages_backup_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesBackup* dialogs_preferences_pages_backup_construct (GType object_type,
                                                                           AdwPreferencesDialog* preferences_dialog);
static gint dialogs_preferences_pages_backup_set_sort_func (DialogsPreferencesPagesBackup* self,
                                                     GtkListBoxRow* lbrow,
                                                     GtkListBoxRow* lbbefore);
VALA_EXTERN GType objects_backup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ObjectsBackup, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_backup_backup_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBackupBackupRow, g_object_unref)
VALA_EXTERN ObjectsBackup* dialogs_preferences_pages_backup_backup_row_get_backup (DialogsPreferencesPagesBackupBackupRow* self);
VALA_EXTERN GDateTime* objects_backup_get_datetime (ObjectsBackup* self);
static void dialogs_preferences_pages_backup_add_extra_folder_row (DialogsPreferencesPagesBackup* self,
                                                            const gchar* folder_path);
static Block95Data* block95_data_ref (Block95Data* _data95_);
static void block95_data_unref (void * _userdata_);
VALA_EXTERN GType dialogs_preferences_pages_backup_extra_folder_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBackupExtraFolderRow, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesBackupExtraFolderRow* dialogs_preferences_pages_backup_extra_folder_row_new (const gchar* folder_path);
VALA_EXTERN DialogsPreferencesPagesBackupExtraFolderRow* dialogs_preferences_pages_backup_extra_folder_row_construct (GType object_type,
                                                                                                          const gchar* folder_path);
static void __lambda377_ (Block95Data* _data95_);
VALA_EXTERN GType services_backup_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ServicesBackupManager, g_object_unref)
VALA_EXTERN ServicesBackupManager* services_backup_manager_get_default (void);
VALA_EXTERN void services_backup_manager_remove_extra_folder (ServicesBackupManager* self,
                                                  const gchar* folder_path);
static void ___lambda377__dialogs_preferences_pages_backup_extra_folder_row_removed (DialogsPreferencesPagesBackupExtraFolderRow* _sender,
                                                                              gpointer self);
static void dialogs_preferences_pages_backup_add_backup_row (DialogsPreferencesPagesBackup* self,
                                                      ObjectsBackup* backup,
                                                      LayoutsHeaderItem* group);
VALA_EXTERN DialogsPreferencesPagesBackupBackupRow* dialogs_preferences_pages_backup_backup_row_new (ObjectsBackup* backup);
VALA_EXTERN DialogsPreferencesPagesBackupBackupRow* dialogs_preferences_pages_backup_backup_row_construct (GType object_type,
                                                                                               ObjectsBackup* backup);
static void dialogs_preferences_pages_backup_connect_backup_group_signals (DialogsPreferencesPagesBackup* self);
static void __lambda378_ (DialogsPreferencesPagesBackup* self,
                   GtkWidget* row);
static void dialogs_preferences_pages_backup_view_backup (DialogsPreferencesPagesBackup* self,
                                                   ObjectsBackup* backup);
static void ___lambda378__layouts_header_item_row_activated (LayoutsHeaderItem* _sender,
                                                      GtkWidget* widget,
                                                      gpointer self);
VALA_EXTERN gboolean objects_backup_valid (ObjectsBackup* self);
VALA_EXTERN AdwPreferencesDialog* dialogs_preferences_pages_base_page_get_preferences_dialog (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesBackupImportView* dialogs_preferences_pages_backup_import_view_new (AdwPreferencesDialog* preferences_dialog,
                                                                                           ObjectsBackup* backup);
VALA_EXTERN DialogsPreferencesPagesBackupImportView* dialogs_preferences_pages_backup_import_view_construct (GType object_type,
                                                                                                 AdwPreferencesDialog* preferences_dialog,
                                                                                                 ObjectsBackup* backup);
VALA_EXTERN GType dialogs_preferences_pages_backup_import_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBackupImportView, g_object_unref)
VALA_EXTERN const gchar* objects_backup_get_error (ObjectsBackup* self);
VALA_EXTERN void dialogs_preferences_pages_base_page_popup_toast (DialogsPreferencesPagesBasePage* self,
                                                      const gchar* message);
static void dialogs_preferences_pages_backup_real_clean_up (DialogsPreferencesPagesBasePage* base);
VALA_EXTERN void dialogs_preferences_pages_backup_backup_row_clean_up (DialogsPreferencesPagesBackupBackupRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN void dialogs_preferences_pages_backup_extra_folder_row_clean_up (DialogsPreferencesPagesBackupExtraFolderRow* self);
static GtkPopover* dialogs_preferences_pages_backup_backup_row_build_context_menu (DialogsPreferencesPagesBackupBackupRow* self);
static Block96Data* block96_data_ref (Block96Data* _data96_);
static void block96_data_unref (void * _userdata_);
static void __lambda357_ (Block96Data* _data96_);
VALA_EXTERN void services_backup_manager_save_file_as (ServicesBackupManager* self,
                                           ObjectsBackup* backup);
static void ___lambda357__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda368_ (Block96Data* _data96_);
VALA_EXTERN void services_backup_manager_delete_backup (ServicesBackupManager* self,
                                            ObjectsBackup* backup);
static void ___lambda368__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN void dialogs_preferences_pages_backup_backup_row_hide_destroy (DialogsPreferencesPagesBackupBackupRow* self);
static gboolean __lambda369_ (DialogsPreferencesPagesBackupBackupRow* self);
static gboolean ___lambda369__gsource_func (gpointer self);
static void dialogs_preferences_pages_backup_backup_row_set_backup (DialogsPreferencesPagesBackupBackupRow* self,
                                                             ObjectsBackup* value);
static GObject * dialogs_preferences_pages_backup_backup_row_constructor (GType type,
                                                                   guint n_construct_properties,
                                                                   GObjectConstructParam * construct_properties);
VALA_EXTERN const gchar* objects_backup_get_title (ObjectsBackup* self);
static gboolean _dialogs_preferences_pages_backup_backup_row___lambda370_ (DialogsPreferencesPagesBackupBackupRow* self);
static gboolean __dialogs_preferences_pages_backup_backup_row___lambda370__gsource_func (gpointer self);
static void _dialogs_preferences_pages_backup_backup_row___lambda371_ (DialogsPreferencesPagesBackupBackupRow* self);
static void __dialogs_preferences_pages_backup_backup_row___lambda371__objects_backup_deleted (ObjectsBackup* _sender,
                                                                                        gpointer self);
static void _dialogs_preferences_pages_backup_backup_row___lambda372_ (DialogsPreferencesPagesBackupBackupRow* self);
static void __dialogs_preferences_pages_backup_backup_row___lambda372__gtk_widget_destroy (GtkWidget* _sender,
                                                                                    gpointer self);
static void dialogs_preferences_pages_backup_backup_row_finalize (GObject * obj);
static GType dialogs_preferences_pages_backup_backup_row_get_type_once (void);
static void _vala_dialogs_preferences_pages_backup_backup_row_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_backup_backup_row_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec);
VALA_EXTERN void dialogs_preferences_pages_backup_extra_folder_row_hide_destroy (DialogsPreferencesPagesBackupExtraFolderRow* self);
static gboolean __lambda373_ (DialogsPreferencesPagesBackupExtraFolderRow* self);
static gboolean ___lambda373__gsource_func (gpointer self);
VALA_EXTERN const gchar* dialogs_preferences_pages_backup_extra_folder_row_get_folder_path (DialogsPreferencesPagesBackupExtraFolderRow* self);
static void dialogs_preferences_pages_backup_extra_folder_row_set_folder_path (DialogsPreferencesPagesBackupExtraFolderRow* self,
                                                                        const gchar* value);
static GObject * dialogs_preferences_pages_backup_extra_folder_row_constructor (GType type,
                                                                         guint n_construct_properties,
                                                                         GObjectConstructParam * construct_properties);
static gboolean _dialogs_preferences_pages_backup_extra_folder_row___lambda374_ (DialogsPreferencesPagesBackupExtraFolderRow* self);
static gboolean __dialogs_preferences_pages_backup_extra_folder_row___lambda374__gsource_func (gpointer self);
static void _dialogs_preferences_pages_backup_extra_folder_row___lambda375_ (DialogsPreferencesPagesBackupExtraFolderRow* self);
static void __dialogs_preferences_pages_backup_extra_folder_row___lambda375__gtk_button_clicked (GtkButton* _sender,
                                                                                          gpointer self);
static void _dialogs_preferences_pages_backup_extra_folder_row___lambda376_ (DialogsPreferencesPagesBackupExtraFolderRow* self);
static void __dialogs_preferences_pages_backup_extra_folder_row___lambda376__gtk_widget_destroy (GtkWidget* _sender,
                                                                                          gpointer self);
static void dialogs_preferences_pages_backup_extra_folder_row_finalize (GObject * obj);
static GType dialogs_preferences_pages_backup_extra_folder_row_get_type_once (void);
static void _vala_dialogs_preferences_pages_backup_extra_folder_row_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_backup_extra_folder_row_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static void dialogs_preferences_pages_backup_import_view_real_clean_up (DialogsPreferencesPagesBasePage* base);
VALA_EXTERN ObjectsBackup* dialogs_preferences_pages_backup_import_view_get_backup (DialogsPreferencesPagesBackupImportView* self);
static void dialogs_preferences_pages_backup_import_view_set_backup (DialogsPreferencesPagesBackupImportView* self,
                                                              ObjectsBackup* value);
static GObject * dialogs_preferences_pages_backup_import_view_constructor (GType type,
                                                                    guint n_construct_properties,
                                                                    GObjectConstructParam * construct_properties);
VALA_EXTERN GeeArrayList* objects_backup_get_sources (ObjectsBackup* self);
VALA_EXTERN GeeArrayList* objects_backup_get_projects (ObjectsBackup* self);
VALA_EXTERN GeeArrayList* objects_backup_get_sections (ObjectsBackup* self);
VALA_EXTERN GeeArrayList* objects_backup_get_items (ObjectsBackup* self);
VALA_EXTERN GeeArrayList* objects_backup_get_labels (ObjectsBackup* self);
static void _dialogs_preferences_pages_backup_import_view___lambda379_ (DialogsPreferencesPagesBackupImportView* self);
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 __lambda380_ (DialogsPreferencesPagesBackupImportView* self,
                   const gchar* response);
VALA_EXTERN void services_backup_manager_patch_backup (ServicesBackupManager* self,
                                           ObjectsBackup* backup);
static void ___lambda380__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                              const gchar* response,
                                              gpointer self);
static void __dialogs_preferences_pages_backup_import_view___lambda379__gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self);
static void _dialogs_preferences_pages_backup_import_view___lambda381_ (DialogsPreferencesPagesBackupImportView* self);
static void __dialogs_preferences_pages_backup_import_view___lambda381__gtk_widget_destroy (GtkWidget* _sender,
                                                                                     gpointer self);
static void dialogs_preferences_pages_backup_import_view_finalize (GObject * obj);
static GType dialogs_preferences_pages_backup_import_view_get_type_once (void);
static void _vala_dialogs_preferences_pages_backup_import_view_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_backup_import_view_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec);
static GObject * dialogs_preferences_pages_backup_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static Block97Data* block97_data_ref (Block97Data* _data97_);
static void block97_data_unref (void * _userdata_);
static gint _dialogs_preferences_pages_backup_set_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                             GtkListBoxRow* row2,
                                                                             gpointer self);
static void _dialogs_preferences_pages_backup___lambda382_ (Block97Data* _data97_);
static void __dialogs_preferences_pages_backup___lambda382__g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self);
static void _dialogs_preferences_pages_backup___lambda383_ (DialogsPreferencesPagesBackup* self);
VALA_EXTERN void services_backup_manager_create_and_distribute_backup (ServicesBackupManager* self);
static void __dialogs_preferences_pages_backup___lambda383__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void _dialogs_preferences_pages_backup___lambda384_ (DialogsPreferencesPagesBackup* self);
VALA_EXTERN void services_backup_manager_choose_backup_file (ServicesBackupManager* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN GFile* services_backup_manager_choose_backup_file_finish (ServicesBackupManager* self,
                                                          GAsyncResult* _res_);
static void __lambda385_ (DialogsPreferencesPagesBackup* self,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN ObjectsBackup* objects_backup_new_from_file (GFile* file);
VALA_EXTERN ObjectsBackup* objects_backup_construct_from_file (GType object_type,
                                                   GFile* file);
static void ___lambda385__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void __dialogs_preferences_pages_backup___lambda384__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void _dialogs_preferences_pages_backup___lambda386_ (DialogsPreferencesPagesBackup* self);
VALA_EXTERN GType services_migrate_from_planner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ServicesMigrateFromPlanner, g_object_unref)
VALA_EXTERN ServicesMigrateFromPlanner* services_migrate_from_planner_get_default (void);
VALA_EXTERN gboolean services_migrate_from_planner_migrate_from_file (ServicesMigrateFromPlanner* self,
                                                          GFile* file);
static void __dialogs_preferences_pages_backup___lambda386__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
static void _dialogs_preferences_pages_backup___lambda388_ (DialogsPreferencesPagesBackup* self);
static Block98Data* block98_data_ref (Block98Data* _data98_);
static void block98_data_unref (void * _userdata_);
static void __lambda389_ (Block98Data* _data98_,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN void services_backup_manager_add_extra_folder (ServicesBackupManager* self,
                                               const gchar* folder_path);
static void ___lambda389__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void __dialogs_preferences_pages_backup___lambda388__gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self);
VALA_EXTERN GeeArrayList* services_backup_manager_get_backups (ServicesBackupManager* self);
static gint _dialogs_preferences_pages_backup___lambda390_ (DialogsPreferencesPagesBackup* self,
                                                     ObjectsBackup* a,
                                                     ObjectsBackup* b);
static gint __dialogs_preferences_pages_backup___lambda390__gcompare_data_func (gconstpointer a,
                                                                         gconstpointer b,
                                                                         gpointer self);
static void _dialogs_preferences_pages_backup___lambda391_ (DialogsPreferencesPagesBackup* self,
                                                     ObjectsBackup* backup);
static void __dialogs_preferences_pages_backup___lambda391__services_backup_manager_backup_added (ServicesBackupManager* _sender,
                                                                                           ObjectsBackup* backup,
                                                                                           gpointer self);
static void _dialogs_preferences_pages_backup___lambda392_ (DialogsPreferencesPagesBackup* self);
static void __dialogs_preferences_pages_backup___lambda392__gtk_widget_destroy (GtkWidget* _sender,
                                                                         gpointer self);
static void dialogs_preferences_pages_backup_finalize (GObject * obj);
static GType dialogs_preferences_pages_backup_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
dialogs_preferences_pages_backup_get_instance_private (DialogsPreferencesPagesBackup* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesBackup_private_offset);
}

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

DialogsPreferencesPagesBackup*
dialogs_preferences_pages_backup_new (AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_backup_construct (DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, preferences_dialog);
}

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

static gint
dialogs_preferences_pages_backup_set_sort_func (DialogsPreferencesPagesBackup* self,
                                                GtkListBoxRow* lbrow,
                                                GtkListBoxRow* lbbefore)
{
	ObjectsBackup* item1 = NULL;
	ObjectsBackup* _tmp0_;
	ObjectsBackup* _tmp1_;
	ObjectsBackup* _tmp2_;
	ObjectsBackup* item2 = NULL;
	ObjectsBackup* _tmp3_;
	ObjectsBackup* _tmp4_;
	ObjectsBackup* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (lbrow != NULL, -1);
	g_return_val_if_fail (lbbefore != NULL, -1);
	_tmp0_ = dialogs_preferences_pages_backup_backup_row_get_backup (G_TYPE_CHECK_INSTANCE_CAST (lbrow, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	item1 = _tmp2_;
	_tmp3_ = dialogs_preferences_pages_backup_backup_row_get_backup (G_TYPE_CHECK_INSTANCE_CAST (lbbefore, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	item2 = _tmp5_;
	_tmp6_ = objects_backup_get_datetime (item2);
	_tmp7_ = _tmp6_;
	_tmp8_ = objects_backup_get_datetime (item1);
	_tmp9_ = _tmp8_;
	result = g_date_time_compare (_tmp7_, _tmp9_);
	_g_object_unref0 (item2);
	_g_object_unref0 (item1);
	return result;
}

static Block95Data*
block95_data_ref (Block95Data* _data95_)
{
	g_atomic_int_inc (&_data95_->_ref_count_);
	return _data95_;
}

static void
block95_data_unref (void * _userdata_)
{
	Block95Data* _data95_;
	_data95_ = (Block95Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data95_->_ref_count_)) {
		DialogsPreferencesPagesBackup* self;
		self = _data95_->self;
		_g_free0 (_data95_->folder_path);
		_g_object_unref0 (self);
		g_slice_free (Block95Data, _data95_);
	}
}

static void
__lambda377_ (Block95Data* _data95_)
{
	DialogsPreferencesPagesBackup* self;
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	self = _data95_->self;
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	services_backup_manager_remove_extra_folder (_tmp1_, _data95_->folder_path);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda377__dialogs_preferences_pages_backup_extra_folder_row_removed (DialogsPreferencesPagesBackupExtraFolderRow* _sender,
                                                                         gpointer self)
{
	__lambda377_ (self);
}

static void
dialogs_preferences_pages_backup_add_extra_folder_row (DialogsPreferencesPagesBackup* self,
                                                       const gchar* folder_path)
{
	Block95Data* _data95_;
	gchar* _tmp0_;
	DialogsPreferencesPagesBackupExtraFolderRow* row = NULL;
	DialogsPreferencesPagesBackupExtraFolderRow* _tmp1_;
	GeeHashMap* _tmp2_;
	gulong _tmp3_;
	LayoutsHeaderItem* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (folder_path != NULL);
	_data95_ = g_slice_new0 (Block95Data);
	_data95_->_ref_count_ = 1;
	_data95_->self = g_object_ref (self);
	_tmp0_ = g_strdup (folder_path);
	_g_free0 (_data95_->folder_path);
	_data95_->folder_path = _tmp0_;
	_tmp1_ = dialogs_preferences_pages_backup_extra_folder_row_new (_data95_->folder_path);
	g_object_ref_sink (_tmp1_);
	row = _tmp1_;
	_tmp2_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp3_ = g_signal_connect_data (row, "removed", (GCallback) ___lambda377__dialogs_preferences_pages_backup_extra_folder_row_removed, block95_data_ref (_data95_), (GClosureNotify) block95_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp2_, (gpointer) ((guintptr) _tmp3_), (GObject*) row);
	_tmp4_ = self->priv->extra_group;
	layouts_header_item_add_child (_tmp4_, (GtkWidget*) row);
	_g_object_unref0 (row);
	block95_data_unref (_data95_);
	_data95_ = NULL;
}

static void
dialogs_preferences_pages_backup_add_backup_row (DialogsPreferencesPagesBackup* self,
                                                 ObjectsBackup* backup,
                                                 LayoutsHeaderItem* group)
{
	DialogsPreferencesPagesBackupBackupRow* row = NULL;
	DialogsPreferencesPagesBackupBackupRow* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (backup != NULL);
	g_return_if_fail (group != NULL);
	_tmp0_ = dialogs_preferences_pages_backup_backup_row_new (backup);
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	layouts_header_item_add_child (group, (GtkWidget*) row);
	_g_object_unref0 (row);
}

static void
__lambda378_ (DialogsPreferencesPagesBackup* self,
              GtkWidget* row)
{
	ObjectsBackup* _tmp0_;
	ObjectsBackup* _tmp1_;
	g_return_if_fail (row != NULL);
	_tmp0_ = dialogs_preferences_pages_backup_backup_row_get_backup (G_TYPE_CHECK_INSTANCE_CAST (row, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow));
	_tmp1_ = _tmp0_;
	dialogs_preferences_pages_backup_view_backup (self, _tmp1_);
}

static void
___lambda378__layouts_header_item_row_activated (LayoutsHeaderItem* _sender,
                                                 GtkWidget* widget,
                                                 gpointer self)
{
	__lambda378_ ((DialogsPreferencesPagesBackup*) self, widget);
}

static void
dialogs_preferences_pages_backup_connect_backup_group_signals (DialogsPreferencesPagesBackup* self)
{
	GeeHashMap* _tmp0_;
	LayoutsHeaderItem* _tmp1_;
	gulong _tmp2_;
	LayoutsHeaderItem* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp1_ = self->priv->backups_group;
	_tmp2_ = g_signal_connect_object (_tmp1_, "row-activated", (GCallback) ___lambda378__layouts_header_item_row_activated, self, 0);
	_tmp3_ = self->priv->backups_group;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, (gpointer) ((guintptr) _tmp2_), (GObject*) _tmp3_);
}

static void
dialogs_preferences_pages_backup_view_backup (DialogsPreferencesPagesBackup* self,
                                              ObjectsBackup* backup)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (backup != NULL);
	if (objects_backup_valid (backup)) {
		AdwPreferencesDialog* _tmp0_;
		AdwPreferencesDialog* _tmp1_;
		AdwPreferencesDialog* _tmp2_;
		AdwPreferencesDialog* _tmp3_;
		DialogsPreferencesPagesBackupImportView* _tmp4_;
		DialogsPreferencesPagesBackupImportView* _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_backup_import_view_new (_tmp3_, backup);
		g_object_ref_sink (_tmp4_);
		_tmp5_ = _tmp4_;
		adw_preferences_dialog_push_subpage (_tmp1_, (AdwNavigationPage*) _tmp5_);
		_g_object_unref0 (_tmp5_);
	} else {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp6_ = objects_backup_get_error (backup);
		_tmp7_ = _tmp6_;
		g_debug ("Backup.vala:260: %s", _tmp7_);
		dialogs_preferences_pages_base_page_popup_toast ((DialogsPreferencesPagesBasePage*) self, _ ("Selected file is invalid"));
	}
}

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_backup_real_clean_up (DialogsPreferencesPagesBasePage* base)
{
	DialogsPreferencesPagesBackup * self;
	LayoutsHeaderItem* _tmp0_;
	LayoutsHeaderItem* _tmp1_;
	GList* _tmp2_;
	LayoutsHeaderItem* _tmp5_;
	GList* _tmp6_;
	GeeHashMap* _tmp24_;
	self = (DialogsPreferencesPagesBackup*) base;
	_tmp0_ = self->priv->backups_group;
	layouts_header_item_set_sort_func (_tmp0_, NULL, NULL, NULL);
	_tmp1_ = self->priv->backups_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_backup_backup_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	_tmp5_ = self->priv->extra_group;
	_tmp6_ = layouts_header_item_get_children (_tmp5_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp6_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp7_;
			GtkListBoxRow* row = NULL;
			_tmp7_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp7_;
			{
				GtkListBoxRow* _tmp8_;
				_tmp8_ = row;
				dialogs_preferences_pages_backup_extra_folder_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp9_;
		GeeSet* _tmp10_;
		GeeSet* _tmp11_;
		GeeSet* _tmp12_;
		GeeIterator* _tmp13_;
		GeeIterator* _tmp14_;
		_tmp9_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
		_tmp10_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
		_entry_it = _tmp14_;
		while (TRUE) {
			GeeIterator* _tmp15_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp16_;
			gpointer _tmp17_;
			GeeMapEntry* _tmp18_;
			gconstpointer _tmp19_;
			gconstpointer _tmp20_;
			GeeMapEntry* _tmp21_;
			gconstpointer _tmp22_;
			gconstpointer _tmp23_;
			_tmp15_ = _entry_it;
			if (!gee_iterator_next (_tmp15_)) {
				break;
			}
			_tmp16_ = _entry_it;
			_tmp17_ = gee_iterator_get (_tmp16_);
			entry = (GeeMapEntry*) _tmp17_;
			_tmp18_ = entry;
			_tmp19_ = gee_map_entry_get_value (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = entry;
			_tmp22_ = gee_map_entry_get_key (_tmp21_);
			_tmp23_ = _tmp22_;
			g_signal_handler_disconnect ((GObject*) _tmp20_, (gulong) ((guintptr) _tmp23_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp24_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp24_);
}

static inline gpointer
dialogs_preferences_pages_backup_backup_row_get_instance_private (DialogsPreferencesPagesBackupBackupRow* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesBackupBackupRow_private_offset);
}

DialogsPreferencesPagesBackupBackupRow*
dialogs_preferences_pages_backup_backup_row_construct (GType object_type,
                                                       ObjectsBackup* backup)
{
	DialogsPreferencesPagesBackupBackupRow * self = NULL;
	g_return_val_if_fail (backup != NULL, NULL);
	self = (DialogsPreferencesPagesBackupBackupRow*) g_object_new (object_type, "backup", backup, NULL);
	return self;
}

DialogsPreferencesPagesBackupBackupRow*
dialogs_preferences_pages_backup_backup_row_new (ObjectsBackup* backup)
{
	return dialogs_preferences_pages_backup_backup_row_construct (DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, backup);
}

static Block96Data*
block96_data_ref (Block96Data* _data96_)
{
	g_atomic_int_inc (&_data96_->_ref_count_);
	return _data96_;
}

static void
block96_data_unref (void * _userdata_)
{
	Block96Data* _data96_;
	_data96_ = (Block96Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data96_->_ref_count_)) {
		DialogsPreferencesPagesBackupBackupRow* self;
		self = _data96_->self;
		_g_object_unref0 (_data96_->menu_popover);
		_g_object_unref0 (self);
		g_slice_free (Block96Data, _data96_);
	}
}

static void
__lambda357_ (Block96Data* _data96_)
{
	DialogsPreferencesPagesBackupBackupRow* self;
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	ObjectsBackup* _tmp2_;
	self = _data96_->self;
	gtk_popover_popdown (_data96_->menu_popover);
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_backup;
	services_backup_manager_save_file_as (_tmp1_, _tmp2_);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda357__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda357_ (self);
}

static void
__lambda368_ (Block96Data* _data96_)
{
	DialogsPreferencesPagesBackupBackupRow* self;
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	ObjectsBackup* _tmp2_;
	self = _data96_->self;
	gtk_popover_popdown (_data96_->menu_popover);
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_backup;
	services_backup_manager_delete_backup (_tmp1_, _tmp2_);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda368__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda368_ (self);
}

static GtkPopover*
dialogs_preferences_pages_backup_backup_row_build_context_menu (DialogsPreferencesPagesBackupBackupRow* self)
{
	Block96Data* _data96_;
	WidgetsContextMenuMenuItem* download_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	WidgetsContextMenuMenuItem* delete_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp2_;
	WidgetsContextMenuMenuSeparator* _tmp3_;
	WidgetsContextMenuMenuSeparator* _tmp4_;
	GtkWidget* _tmp5_;
	GtkPopover* _tmp6_ = NULL;
	GeeHashMap* _tmp7_;
	gulong _tmp8_;
	GeeHashMap* _tmp9_;
	gulong _tmp10_;
	GtkPopover* _tmp11_;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data96_ = g_slice_new0 (Block96Data);
	_data96_->_ref_count_ = 1;
	_data96_->self = g_object_ref (self);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Download"), "folder-download-symbolic");
	g_object_ref_sink (_tmp0_);
	download_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Delete"), "user-trash-symbolic");
	g_object_ref_sink (_tmp1_);
	delete_item = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) delete_item, "menu-item-danger");
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp2_);
	menu_box = _tmp2_;
	gtk_widget_set_margin_bottom ((GtkWidget*) menu_box, 3);
	gtk_widget_set_margin_top ((GtkWidget*) menu_box, 3);
	gtk_box_append (menu_box, (GtkWidget*) download_item);
	_tmp3_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_box_append (menu_box, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	gtk_box_append (menu_box, (GtkWidget*) delete_item);
	_tmp5_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp6_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp6_, FALSE);
	gtk_popover_set_child (_tmp6_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	gtk_popover_set_position (_tmp6_, GTK_POS_BOTTOM);
	g_object_set ((GtkWidget*) _tmp6_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp6_);
	_data96_->menu_popover = _tmp6_;
	_tmp7_ = self->signal_map;
	_tmp8_ = g_signal_connect_data ((GtkButton*) download_item, "clicked", (GCallback) ___lambda357__gtk_button_clicked, block96_data_ref (_data96_), (GClosureNotify) block96_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) _tmp8_), (GObject*) download_item);
	_tmp9_ = self->signal_map;
	_tmp10_ = g_signal_connect_data ((GtkButton*) delete_item, "clicked", (GCallback) ___lambda368__gtk_button_clicked, block96_data_ref (_data96_), (GClosureNotify) block96_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, (gpointer) ((guintptr) _tmp10_), (GObject*) delete_item);
	_tmp11_ = _g_object_ref0 (_data96_->menu_popover);
	result = _tmp11_;
	_g_object_unref0 (menu_box);
	_g_object_unref0 (delete_item);
	_g_object_unref0 (download_item);
	block96_data_unref (_data96_);
	_data96_ = NULL;
	return result;
}

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

static gboolean
__lambda369_ (DialogsPreferencesPagesBackupBackupRow* 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
___lambda369__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda369_ ((DialogsPreferencesPagesBackupBackupRow*) self);
	return result;
}

void
dialogs_preferences_pages_backup_backup_row_hide_destroy (DialogsPreferencesPagesBackupBackupRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	dialogs_preferences_pages_backup_backup_row_clean_up (self);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda369__gsource_func, g_object_ref (self), g_object_unref);
}

ObjectsBackup*
dialogs_preferences_pages_backup_backup_row_get_backup (DialogsPreferencesPagesBackupBackupRow* self)
{
	ObjectsBackup* result;
	ObjectsBackup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backup;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_backup_backup_row_set_backup (DialogsPreferencesPagesBackupBackupRow* self,
                                                        ObjectsBackup* value)
{
	ObjectsBackup* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_backup_backup_row_get_backup (self);
	if (old_value != value) {
		ObjectsBackup* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_backup);
		self->priv->_backup = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_backup_backup_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY]);
	}
}

static gboolean
_dialogs_preferences_pages_backup_backup_row___lambda370_ (DialogsPreferencesPagesBackupBackupRow* 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_backup_backup_row___lambda370__gsource_func (gpointer self)
{
	gboolean result;
	result = _dialogs_preferences_pages_backup_backup_row___lambda370_ ((DialogsPreferencesPagesBackupBackupRow*) self);
	return result;
}

static void
_dialogs_preferences_pages_backup_backup_row___lambda371_ (DialogsPreferencesPagesBackupBackupRow* self)
{
	dialogs_preferences_pages_backup_backup_row_hide_destroy (self);
}

static void
__dialogs_preferences_pages_backup_backup_row___lambda371__objects_backup_deleted (ObjectsBackup* _sender,
                                                                                   gpointer self)
{
	_dialogs_preferences_pages_backup_backup_row___lambda371_ ((DialogsPreferencesPagesBackupBackupRow*) self);
}

static void
_dialogs_preferences_pages_backup_backup_row___lambda372_ (DialogsPreferencesPagesBackupBackupRow* self)
{
	dialogs_preferences_pages_backup_backup_row_clean_up (self);
}

static void
__dialogs_preferences_pages_backup_backup_row___lambda372__gtk_widget_destroy (GtkWidget* _sender,
                                                                               gpointer self)
{
	_dialogs_preferences_pages_backup_backup_row___lambda372_ ((DialogsPreferencesPagesBackupBackupRow*) self);
}

static GObject *
dialogs_preferences_pages_backup_backup_row_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesBackupBackupRow * self;
	GtkLabel* name_label = NULL;
	ObjectsBackup* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkImage* next_icon = NULL;
	GtkImage* _tmp6_ = NULL;
	GtkMenuButton* menu_button = NULL;
	GtkPopover* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	GtkMenuButton* _tmp11_ = NULL;
	GtkBox* end_box = NULL;
	GtkBox* _tmp12_ = NULL;
	GtkBox* _tmp13_;
	GtkMenuButton* _tmp14_;
	GtkBox* _tmp15_;
	GtkImage* _tmp16_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp17_ = NULL;
	GtkBox* _tmp18_;
	GtkImage* _tmp19_;
	GtkImage* _tmp20_;
	GtkBox* _tmp21_;
	GtkLabel* _tmp22_;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkWidget* _tmp26_;
	GtkRevealer* _tmp27_ = NULL;
	GtkRevealer* _tmp28_;
	GtkRevealer* _tmp29_;
	guint _tmp30_;
	guint _tmp31_;
	GeeHashMap* _tmp32_;
	ObjectsBackup* _tmp33_;
	gulong _tmp34_;
	ObjectsBackup* _tmp35_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_backup_backup_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, TRUE);
	gtk_widget_add_css_class ((GtkWidget*) self, "transition");
	_tmp0_ = self->priv->_backup;
	_tmp1_ = objects_backup_get_title (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	name_label = _tmp3_;
	_tmp4_ = name_label;
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	_tmp5_ = name_label;
	gtk_label_set_ellipsize (_tmp5_, PANGO_ELLIPSIZE_END);
	_tmp6_ = (GtkImage*) gtk_image_new_from_icon_name ("go-next-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp6_);
	next_icon = _tmp6_;
	_tmp7_ = dialogs_preferences_pages_backup_backup_row_build_context_menu (self);
	_tmp8_ = g_strdup ("view-more-symbolic");
	_tmp9_ = g_strdup ("flat");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp11_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_END);
	gtk_menu_button_set_popover (_tmp11_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	gtk_menu_button_set_icon_name (_tmp11_, _tmp8_);
	_g_free0 (_tmp8_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp11_);
	menu_button = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp12_, GTK_ALIGN_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp12_, TRUE);
	g_object_ref_sink (_tmp12_);
	end_box = _tmp12_;
	_tmp13_ = end_box;
	_tmp14_ = menu_button;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = end_box;
	_tmp16_ = next_icon;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp17_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp17_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp17_, 6);
	g_object_ref_sink (_tmp17_);
	content_box = _tmp17_;
	_tmp18_ = content_box;
	_tmp19_ = (GtkImage*) gtk_image_new_from_icon_name ("paper-symbolic");
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	gtk_box_append (_tmp18_, (GtkWidget*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = content_box;
	_tmp22_ = name_label;
	gtk_box_append (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = content_box;
	_tmp24_ = end_box;
	gtk_box_append (_tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = content_box;
	_tmp26_ = _g_object_ref0 ((GtkWidget*) _tmp25_);
	_tmp27_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp27_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp27_, _tmp26_);
	_g_object_unref0 (_tmp26_);
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp27_;
	_tmp28_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp28_);
	_tmp29_ = self->priv->main_revealer;
	_tmp30_ = gtk_revealer_get_transition_duration (_tmp29_);
	_tmp31_ = _tmp30_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp31_, __dialogs_preferences_pages_backup_backup_row___lambda370__gsource_func, g_object_ref (self), g_object_unref);
	_tmp32_ = self->signal_map;
	_tmp33_ = self->priv->_backup;
	_tmp34_ = g_signal_connect_object (_tmp33_, "deleted", (GCallback) __dialogs_preferences_pages_backup_backup_row___lambda371__objects_backup_deleted, self, 0);
	_tmp35_ = self->priv->_backup;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp32_, (gpointer) ((guintptr) _tmp34_), (GObject*) _tmp35_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_backup_backup_row___lambda372__gtk_widget_destroy, self, 0);
	_g_object_unref0 (content_box);
	_g_object_unref0 (end_box);
	_g_object_unref0 (menu_button);
	_g_object_unref0 (next_icon);
	_g_object_unref0 (name_label);
	return obj;
}

static void
dialogs_preferences_pages_backup_backup_row_class_init (DialogsPreferencesPagesBackupBackupRowClass * klass,
                                                        gpointer klass_data)
{
	dialogs_preferences_pages_backup_backup_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesBackupBackupRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_backup_backup_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_backup_backup_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_backup_backup_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_backup_backup_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY, dialogs_preferences_pages_backup_backup_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY] = g_param_spec_object ("backup", "backup", "backup", OBJECTS_TYPE_BACKUP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
dialogs_preferences_pages_backup_backup_row_instance_init (DialogsPreferencesPagesBackupBackupRow * self,
                                                           gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dialogs_preferences_pages_backup_backup_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->signal_map = _tmp0_;
}

static void
dialogs_preferences_pages_backup_backup_row_finalize (GObject * obj)
{
	DialogsPreferencesPagesBackupBackupRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow);
	g_debug ("Backup.vala:295: Destroying - BackupRow\n");
	_g_object_unref0 (self->priv->_backup);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->signal_map);
	G_OBJECT_CLASS (dialogs_preferences_pages_backup_backup_row_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_backup_backup_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesBackupBackupRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_backup_backup_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesBackupBackupRow), 0, (GInstanceInitFunc) dialogs_preferences_pages_backup_backup_row_instance_init, NULL };
	GType dialogs_preferences_pages_backup_backup_row_type_id;
	dialogs_preferences_pages_backup_backup_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DialogsPreferencesPagesBackupBackupRow", &g_define_type_info, 0);
	DialogsPreferencesPagesBackupBackupRow_private_offset = g_type_add_instance_private (dialogs_preferences_pages_backup_backup_row_type_id, sizeof (DialogsPreferencesPagesBackupBackupRowPrivate));
	return dialogs_preferences_pages_backup_backup_row_type_id;
}

GType
dialogs_preferences_pages_backup_backup_row_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_backup_backup_row_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_backup_backup_row_type_id__once)) {
		GType dialogs_preferences_pages_backup_backup_row_type_id;
		dialogs_preferences_pages_backup_backup_row_type_id = dialogs_preferences_pages_backup_backup_row_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_backup_backup_row_type_id__once, dialogs_preferences_pages_backup_backup_row_type_id);
	}
	return dialogs_preferences_pages_backup_backup_row_type_id__once;
}

static void
_vala_dialogs_preferences_pages_backup_backup_row_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupBackupRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_backup_backup_row_get_backup (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_backup_backup_row_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupBackupRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_BACKUP_ROW, DialogsPreferencesPagesBackupBackupRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_BACKUP_ROW_BACKUP_PROPERTY:
		dialogs_preferences_pages_backup_backup_row_set_backup (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_backup_extra_folder_row_get_instance_private (DialogsPreferencesPagesBackupExtraFolderRow* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesBackupExtraFolderRow_private_offset);
}

DialogsPreferencesPagesBackupExtraFolderRow*
dialogs_preferences_pages_backup_extra_folder_row_construct (GType object_type,
                                                             const gchar* folder_path)
{
	DialogsPreferencesPagesBackupExtraFolderRow * self = NULL;
	g_return_val_if_fail (folder_path != NULL, NULL);
	self = (DialogsPreferencesPagesBackupExtraFolderRow*) g_object_new (object_type, "folder-path", folder_path, NULL);
	return self;
}

DialogsPreferencesPagesBackupExtraFolderRow*
dialogs_preferences_pages_backup_extra_folder_row_new (const gchar* folder_path)
{
	return dialogs_preferences_pages_backup_extra_folder_row_construct (DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, folder_path);
}

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

static gboolean
__lambda373_ (DialogsPreferencesPagesBackupExtraFolderRow* 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
___lambda373__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda373_ ((DialogsPreferencesPagesBackupExtraFolderRow*) self);
	return result;
}

void
dialogs_preferences_pages_backup_extra_folder_row_hide_destroy (DialogsPreferencesPagesBackupExtraFolderRow* 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);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda373__gsource_func, g_object_ref (self), g_object_unref);
}

const gchar*
dialogs_preferences_pages_backup_extra_folder_row_get_folder_path (DialogsPreferencesPagesBackupExtraFolderRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_folder_path;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_backup_extra_folder_row_set_folder_path (DialogsPreferencesPagesBackupExtraFolderRow* self,
                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_backup_extra_folder_row_get_folder_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_folder_path);
		self->priv->_folder_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_backup_extra_folder_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY]);
	}
}

static gboolean
_dialogs_preferences_pages_backup_extra_folder_row___lambda374_ (DialogsPreferencesPagesBackupExtraFolderRow* 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_backup_extra_folder_row___lambda374__gsource_func (gpointer self)
{
	gboolean result;
	result = _dialogs_preferences_pages_backup_extra_folder_row___lambda374_ ((DialogsPreferencesPagesBackupExtraFolderRow*) self);
	return result;
}

static void
_dialogs_preferences_pages_backup_extra_folder_row___lambda375_ (DialogsPreferencesPagesBackupExtraFolderRow* self)
{
	g_signal_emit (self, dialogs_preferences_pages_backup_extra_folder_row_signals[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_REMOVED_SIGNAL], 0);
	dialogs_preferences_pages_backup_extra_folder_row_hide_destroy (self);
}

static void
__dialogs_preferences_pages_backup_extra_folder_row___lambda375__gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self)
{
	_dialogs_preferences_pages_backup_extra_folder_row___lambda375_ ((DialogsPreferencesPagesBackupExtraFolderRow*) self);
}

static void
_dialogs_preferences_pages_backup_extra_folder_row___lambda376_ (DialogsPreferencesPagesBackupExtraFolderRow* self)
{
	dialogs_preferences_pages_backup_extra_folder_row_clean_up (self);
}

static void
__dialogs_preferences_pages_backup_extra_folder_row___lambda376__gtk_widget_destroy (GtkWidget* _sender,
                                                                                     gpointer self)
{
	_dialogs_preferences_pages_backup_extra_folder_row___lambda376_ ((DialogsPreferencesPagesBackupExtraFolderRow*) self);
}

static GObject *
dialogs_preferences_pages_backup_extra_folder_row_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesBackupExtraFolderRow * self;
	GtkLabel* path_label = NULL;
	const gchar* _tmp0_;
	GtkLabel* _tmp1_ = NULL;
	GtkButton* delete_button = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkButton* _tmp4_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp5_ = NULL;
	GtkBox* _tmp6_;
	GtkImage* _tmp7_;
	GtkImage* _tmp8_;
	GtkBox* _tmp9_;
	GtkLabel* _tmp10_;
	GtkBox* _tmp11_;
	GtkButton* _tmp12_;
	GtkBox* _tmp13_;
	GtkWidget* _tmp14_;
	GtkRevealer* _tmp15_ = NULL;
	GtkRevealer* _tmp16_;
	GtkRevealer* _tmp17_;
	guint _tmp18_;
	guint _tmp19_;
	GeeHashMap* _tmp20_;
	GtkButton* _tmp21_;
	gulong _tmp22_;
	GtkButton* _tmp23_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_backup_extra_folder_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow);
	gtk_widget_add_css_class ((GtkWidget*) self, "no-selectable");
	_tmp0_ = self->priv->_folder_path;
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_START);
	gtk_label_set_ellipsize (_tmp1_, PANGO_ELLIPSIZE_MIDDLE);
	g_object_ref_sink (_tmp1_);
	path_label = _tmp1_;
	_tmp2_ = g_strdup ("flat");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	delete_button = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp5_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp5_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp5_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp5_, 6);
	g_object_ref_sink (_tmp5_);
	content_box = _tmp5_;
	_tmp6_ = content_box;
	_tmp7_ = (GtkImage*) gtk_image_new_from_icon_name ("folder-symbolic");
	g_object_ref_sink (_tmp7_);
	_tmp8_ = _tmp7_;
	gtk_box_append (_tmp6_, (GtkWidget*) _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = content_box;
	_tmp10_ = path_label;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = content_box;
	_tmp12_ = delete_button;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = content_box;
	_tmp14_ = _g_object_ref0 ((GtkWidget*) _tmp13_);
	_tmp15_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp15_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp15_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp15_;
	_tmp16_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->main_revealer;
	_tmp18_ = gtk_revealer_get_transition_duration (_tmp17_);
	_tmp19_ = _tmp18_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp19_, __dialogs_preferences_pages_backup_extra_folder_row___lambda374__gsource_func, g_object_ref (self), g_object_unref);
	_tmp20_ = self->signal_map;
	_tmp21_ = delete_button;
	_tmp22_ = g_signal_connect_object (_tmp21_, "clicked", (GCallback) __dialogs_preferences_pages_backup_extra_folder_row___lambda375__gtk_button_clicked, self, 0);
	_tmp23_ = delete_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, (gpointer) ((guintptr) _tmp22_), (GObject*) _tmp23_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_backup_extra_folder_row___lambda376__gtk_widget_destroy, self, 0);
	_g_object_unref0 (content_box);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (path_label);
	return obj;
}

static void
dialogs_preferences_pages_backup_extra_folder_row_class_init (DialogsPreferencesPagesBackupExtraFolderRowClass * klass,
                                                              gpointer klass_data)
{
	dialogs_preferences_pages_backup_extra_folder_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesBackupExtraFolderRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_backup_extra_folder_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_backup_extra_folder_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_backup_extra_folder_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_backup_extra_folder_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY, dialogs_preferences_pages_backup_extra_folder_row_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY] = g_param_spec_string ("folder-path", "folder-path", "folder-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	dialogs_preferences_pages_backup_extra_folder_row_signals[DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_REMOVED_SIGNAL] = g_signal_new ("removed", DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dialogs_preferences_pages_backup_extra_folder_row_instance_init (DialogsPreferencesPagesBackupExtraFolderRow * self,
                                                                 gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dialogs_preferences_pages_backup_extra_folder_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->signal_map = _tmp0_;
}

static void
dialogs_preferences_pages_backup_extra_folder_row_finalize (GObject * obj)
{
	DialogsPreferencesPagesBackupExtraFolderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow);
	_g_free0 (self->priv->_folder_path);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->signal_map);
	G_OBJECT_CLASS (dialogs_preferences_pages_backup_extra_folder_row_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_backup_extra_folder_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesBackupExtraFolderRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_backup_extra_folder_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesBackupExtraFolderRow), 0, (GInstanceInitFunc) dialogs_preferences_pages_backup_extra_folder_row_instance_init, NULL };
	GType dialogs_preferences_pages_backup_extra_folder_row_type_id;
	dialogs_preferences_pages_backup_extra_folder_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DialogsPreferencesPagesBackupExtraFolderRow", &g_define_type_info, 0);
	DialogsPreferencesPagesBackupExtraFolderRow_private_offset = g_type_add_instance_private (dialogs_preferences_pages_backup_extra_folder_row_type_id, sizeof (DialogsPreferencesPagesBackupExtraFolderRowPrivate));
	return dialogs_preferences_pages_backup_extra_folder_row_type_id;
}

GType
dialogs_preferences_pages_backup_extra_folder_row_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_backup_extra_folder_row_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_backup_extra_folder_row_type_id__once)) {
		GType dialogs_preferences_pages_backup_extra_folder_row_type_id;
		dialogs_preferences_pages_backup_extra_folder_row_type_id = dialogs_preferences_pages_backup_extra_folder_row_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_backup_extra_folder_row_type_id__once, dialogs_preferences_pages_backup_extra_folder_row_type_id);
	}
	return dialogs_preferences_pages_backup_extra_folder_row_type_id__once;
}

static void
_vala_dialogs_preferences_pages_backup_extra_folder_row_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupExtraFolderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY:
		g_value_set_string (value, dialogs_preferences_pages_backup_extra_folder_row_get_folder_path (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_backup_extra_folder_row_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupExtraFolderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_EXTRA_FOLDER_ROW, DialogsPreferencesPagesBackupExtraFolderRow);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_EXTRA_FOLDER_ROW_FOLDER_PATH_PROPERTY:
		dialogs_preferences_pages_backup_extra_folder_row_set_folder_path (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dialogs_preferences_pages_backup_import_view_get_instance_private (DialogsPreferencesPagesBackupImportView* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesBackupImportView_private_offset);
}

DialogsPreferencesPagesBackupImportView*
dialogs_preferences_pages_backup_import_view_construct (GType object_type,
                                                        AdwPreferencesDialog* preferences_dialog,
                                                        ObjectsBackup* backup)
{
	DialogsPreferencesPagesBackupImportView * self = NULL;
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	g_return_val_if_fail (backup != NULL, NULL);
	self = (DialogsPreferencesPagesBackupImportView*) g_object_new (object_type, "preferences-dialog", preferences_dialog, "backup", backup, NULL);
	return self;
}

DialogsPreferencesPagesBackupImportView*
dialogs_preferences_pages_backup_import_view_new (AdwPreferencesDialog* preferences_dialog,
                                                  ObjectsBackup* backup)
{
	return dialogs_preferences_pages_backup_import_view_construct (DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, preferences_dialog, backup);
}

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

ObjectsBackup*
dialogs_preferences_pages_backup_import_view_get_backup (DialogsPreferencesPagesBackupImportView* self)
{
	ObjectsBackup* result;
	ObjectsBackup* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backup;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_backup_import_view_set_backup (DialogsPreferencesPagesBackupImportView* self,
                                                         ObjectsBackup* value)
{
	ObjectsBackup* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_backup_import_view_get_backup (self);
	if (old_value != value) {
		ObjectsBackup* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_backup);
		self->priv->_backup = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_backup_import_view_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY]);
	}
}

static void
__lambda380_ (DialogsPreferencesPagesBackupImportView* self,
              const gchar* response)
{
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "restore") == 0) {
		ServicesBackupManager* _tmp0_;
		ServicesBackupManager* _tmp1_;
		ObjectsBackup* _tmp2_;
		_tmp0_ = services_backup_manager_get_default ();
		_tmp1_ = _tmp0_;
		_tmp2_ = self->priv->_backup;
		services_backup_manager_patch_backup (_tmp1_, _tmp2_);
		_g_object_unref0 (_tmp1_);
	}
}

static void
___lambda380__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                         const gchar* response,
                                         gpointer self)
{
	__lambda380_ ((DialogsPreferencesPagesBackupImportView*) self, response);
}

static void
_dialogs_preferences_pages_backup_import_view___lambda379_ (DialogsPreferencesPagesBackupImportView* self)
{
	AdwAlertDialog* dialog = NULL;
	AdwAlertDialog* _tmp0_;
	AdwAlertDialog* _tmp1_;
	AdwAlertDialog* _tmp2_;
	AdwAlertDialog* _tmp3_;
	AdwAlertDialog* _tmp4_;
	AdwAlertDialog* _tmp5_;
	Planify* _tmp6_;
	MainWindow* _tmp7_;
	AdwAlertDialog* _tmp8_;
	_tmp0_ = (AdwAlertDialog*) adw_alert_dialog_new (_ ("Restore backup"), _ ("Are you sure you want to continue? This operation will delete your cur" \
"rent data and replace it with the backup data."));
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	_tmp1_ = dialog;
	adw_alert_dialog_set_body_use_markup (_tmp1_, TRUE);
	_tmp2_ = dialog;
	adw_alert_dialog_add_response (_tmp2_, "cancel", _ ("Cancel"));
	_tmp3_ = dialog;
	adw_alert_dialog_add_response (_tmp3_, "restore", _ ("Restore Backup"));
	_tmp4_ = dialog;
	adw_alert_dialog_set_response_appearance (_tmp4_, "restore", ADW_RESPONSE_DESTRUCTIVE);
	_tmp5_ = dialog;
	_tmp6_ = planify__instance;
	_tmp7_ = _tmp6_->main_window;
	adw_dialog_present ((AdwDialog*) _tmp5_, (GtkWidget*) _tmp7_);
	_tmp8_ = dialog;
	g_signal_connect_object (_tmp8_, "response", (GCallback) ___lambda380__adw_alert_dialog_response, self, 0);
	_g_object_unref0 (dialog);
}

static void
__dialogs_preferences_pages_backup_import_view___lambda379__gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self)
{
	_dialogs_preferences_pages_backup_import_view___lambda379_ ((DialogsPreferencesPagesBackupImportView*) self);
}

static void
_dialogs_preferences_pages_backup_import_view___lambda381_ (DialogsPreferencesPagesBackupImportView* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_backup_import_view___lambda381__gtk_widget_destroy (GtkWidget* _sender,
                                                                                gpointer self)
{
	_dialogs_preferences_pages_backup_import_view___lambda381_ ((DialogsPreferencesPagesBackupImportView*) self);
}

static GObject *
dialogs_preferences_pages_backup_import_view_constructor (GType type,
                                                          guint n_construct_properties,
                                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesBackupImportView * self;
	GtkLabel* title = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkLabel* _tmp2_ = NULL;
	GtkLabel* subtitle = NULL;
	ObjectsBackup* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	GtkLabel* _tmp8_ = NULL;
	AdwActionRow* sources_row = NULL;
	AdwActionRow* _tmp9_;
	AdwActionRow* _tmp10_;
	AdwActionRow* _tmp11_;
	ObjectsBackup* _tmp12_;
	GeeArrayList* _tmp13_;
	GeeArrayList* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	AdwActionRow* projects_row = NULL;
	AdwActionRow* _tmp21_;
	AdwActionRow* _tmp22_;
	AdwActionRow* _tmp23_;
	ObjectsBackup* _tmp24_;
	GeeArrayList* _tmp25_;
	GeeArrayList* _tmp26_;
	gint _tmp27_;
	gint _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	GtkLabel* _tmp31_;
	GtkLabel* _tmp32_;
	AdwActionRow* sections_row = NULL;
	AdwActionRow* _tmp33_;
	AdwActionRow* _tmp34_;
	AdwActionRow* _tmp35_;
	ObjectsBackup* _tmp36_;
	GeeArrayList* _tmp37_;
	GeeArrayList* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	GtkLabel* _tmp43_;
	GtkLabel* _tmp44_;
	AdwActionRow* items_row = NULL;
	AdwActionRow* _tmp45_;
	AdwActionRow* _tmp46_;
	AdwActionRow* _tmp47_;
	ObjectsBackup* _tmp48_;
	GeeArrayList* _tmp49_;
	GeeArrayList* _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	GtkLabel* _tmp55_;
	GtkLabel* _tmp56_;
	AdwActionRow* labels_row = NULL;
	AdwActionRow* _tmp57_;
	AdwActionRow* _tmp58_;
	AdwActionRow* _tmp59_;
	ObjectsBackup* _tmp60_;
	GeeArrayList* _tmp61_;
	GeeArrayList* _tmp62_;
	gint _tmp63_;
	gint _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	GtkLabel* _tmp67_;
	GtkLabel* _tmp68_;
	AdwPreferencesGroup* collection_group = NULL;
	AdwPreferencesGroup* _tmp69_ = NULL;
	AdwPreferencesGroup* _tmp70_;
	AdwActionRow* _tmp71_;
	AdwPreferencesGroup* _tmp72_;
	AdwActionRow* _tmp73_;
	AdwPreferencesGroup* _tmp74_;
	AdwActionRow* _tmp75_;
	AdwPreferencesGroup* _tmp76_;
	AdwActionRow* _tmp77_;
	AdwPreferencesGroup* _tmp78_;
	AdwActionRow* _tmp79_;
	WidgetsLoadingButton* confirm_button = NULL;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar** _tmp82_;
	WidgetsLoadingButton* _tmp83_ = NULL;
	GtkBox* buttons_box = NULL;
	GtkBox* _tmp84_ = NULL;
	GtkBox* _tmp85_;
	WidgetsLoadingButton* _tmp86_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp87_ = NULL;
	GtkBox* _tmp88_;
	GtkLabel* _tmp89_;
	GtkBox* _tmp90_;
	GtkLabel* _tmp91_;
	GtkBox* _tmp92_;
	AdwPreferencesGroup* _tmp93_;
	GtkBox* _tmp94_;
	GtkBox* _tmp95_;
	AdwClamp* content_clamp = NULL;
	GtkBox* _tmp96_;
	GtkWidget* _tmp97_;
	AdwClamp* _tmp98_ = NULL;
	GtkScrolledWindow* scrolled_window = NULL;
	AdwClamp* _tmp99_;
	GtkWidget* _tmp100_;
	GtkScrolledWindow* _tmp101_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp102_;
	AdwToolbarView* _tmp103_;
	AdwHeaderBar* _tmp104_ = NULL;
	AdwHeaderBar* _tmp105_;
	AdwToolbarView* _tmp106_;
	AdwBanner* _tmp107_ = NULL;
	AdwBanner* _tmp108_;
	AdwToolbarView* _tmp109_;
	GtkScrolledWindow* _tmp110_;
	AdwToolbarView* _tmp111_;
	GeeHashMap* _tmp112_;
	WidgetsLoadingButton* _tmp113_;
	gulong _tmp114_;
	WidgetsLoadingButton* _tmp115_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_backup_import_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportView);
	_tmp0_ = g_strdup ("title-1");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_ ("Restore Backup"));
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp2_);
	title = _tmp2_;
	_tmp3_ = self->priv->_backup;
	_tmp4_ = objects_backup_get_title (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup ("dimmed");
	_tmp7_ = g_new0 (gchar*, 1 + 1);
	_tmp7_[0] = _tmp6_;
	_tmp8_ = (GtkLabel*) gtk_label_new (_tmp5_);
	gtk_widget_set_halign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp8_, _tmp7_);
	_tmp7_ = (_vala_array_free (_tmp7_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 3);
	g_object_ref_sink (_tmp8_);
	subtitle = _tmp8_;
	_tmp9_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp9_);
	sources_row = _tmp9_;
	_tmp10_ = sources_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp10_, _ ("Sources"));
	_tmp11_ = sources_row;
	_tmp12_ = self->priv->_backup;
	_tmp13_ = objects_backup_get_sources (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_strdup_printf ("%i", _tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = (GtkLabel*) gtk_label_new (_tmp18_);
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	adw_action_row_add_suffix (_tmp11_, (GtkWidget*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	_g_free0 (_tmp18_);
	_tmp21_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp21_);
	projects_row = _tmp21_;
	_tmp22_ = projects_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp22_, _ ("Projects"));
	_tmp23_ = projects_row;
	_tmp24_ = self->priv->_backup;
	_tmp25_ = objects_backup_get_projects (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = g_strdup_printf ("%i", _tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = (GtkLabel*) gtk_label_new (_tmp30_);
	g_object_ref_sink (_tmp31_);
	_tmp32_ = _tmp31_;
	adw_action_row_add_suffix (_tmp23_, (GtkWidget*) _tmp32_);
	_g_object_unref0 (_tmp32_);
	_g_free0 (_tmp30_);
	_tmp33_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp33_);
	sections_row = _tmp33_;
	_tmp34_ = sections_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp34_, _ ("Sections"));
	_tmp35_ = sections_row;
	_tmp36_ = self->priv->_backup;
	_tmp37_ = objects_backup_get_sections (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = g_strdup_printf ("%i", _tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = (GtkLabel*) gtk_label_new (_tmp42_);
	g_object_ref_sink (_tmp43_);
	_tmp44_ = _tmp43_;
	adw_action_row_add_suffix (_tmp35_, (GtkWidget*) _tmp44_);
	_g_object_unref0 (_tmp44_);
	_g_free0 (_tmp42_);
	_tmp45_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp45_);
	items_row = _tmp45_;
	_tmp46_ = items_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp46_, _ ("To-Dos"));
	_tmp47_ = items_row;
	_tmp48_ = self->priv->_backup;
	_tmp49_ = objects_backup_get_items (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = g_strdup_printf ("%i", _tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = (GtkLabel*) gtk_label_new (_tmp54_);
	g_object_ref_sink (_tmp55_);
	_tmp56_ = _tmp55_;
	adw_action_row_add_suffix (_tmp47_, (GtkWidget*) _tmp56_);
	_g_object_unref0 (_tmp56_);
	_g_free0 (_tmp54_);
	_tmp57_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp57_);
	labels_row = _tmp57_;
	_tmp58_ = labels_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp58_, _ ("Labels"));
	_tmp59_ = labels_row;
	_tmp60_ = self->priv->_backup;
	_tmp61_ = objects_backup_get_labels (_tmp60_);
	_tmp62_ = _tmp61_;
	_tmp63_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp62_);
	_tmp64_ = _tmp63_;
	_tmp65_ = g_strdup_printf ("%i", _tmp64_);
	_tmp66_ = _tmp65_;
	_tmp67_ = (GtkLabel*) gtk_label_new (_tmp66_);
	g_object_ref_sink (_tmp67_);
	_tmp68_ = _tmp67_;
	adw_action_row_add_suffix (_tmp59_, (GtkWidget*) _tmp68_);
	_g_object_unref0 (_tmp68_);
	_g_free0 (_tmp66_);
	_tmp69_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp69_, 24);
	g_object_ref_sink (_tmp69_);
	collection_group = _tmp69_;
	_tmp70_ = collection_group;
	_tmp71_ = sources_row;
	adw_preferences_group_add (_tmp70_, (GtkWidget*) _tmp71_);
	_tmp72_ = collection_group;
	_tmp73_ = projects_row;
	adw_preferences_group_add (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = collection_group;
	_tmp75_ = sections_row;
	adw_preferences_group_add (_tmp74_, (GtkWidget*) _tmp75_);
	_tmp76_ = collection_group;
	_tmp77_ = items_row;
	adw_preferences_group_add (_tmp76_, (GtkWidget*) _tmp77_);
	_tmp78_ = collection_group;
	_tmp79_ = labels_row;
	adw_preferences_group_add (_tmp78_, (GtkWidget*) _tmp79_);
	_tmp80_ = g_strdup ("flat");
	_tmp81_ = g_strdup ("destructive-action");
	_tmp82_ = g_new0 (gchar*, 2 + 1);
	_tmp82_[0] = _tmp80_;
	_tmp82_[1] = _tmp81_;
	_tmp83_ = widgets_loading_button_new (LOADING_BUTTON_TYPE_LABEL, _ ("Restore Backup"));
	gtk_widget_set_valign ((GtkWidget*) _tmp83_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp83_, 24);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp83_, _tmp82_);
	_tmp82_ = (_vala_array_free (_tmp82_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp83_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp83_);
	confirm_button = _tmp83_;
	_tmp84_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp84_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp84_, 12);
	g_object_ref_sink (_tmp84_);
	buttons_box = _tmp84_;
	_tmp85_ = buttons_box;
	_tmp86_ = confirm_button;
	gtk_box_append (_tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp87_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp87_, TRUE);
	g_object_ref_sink (_tmp87_);
	content_box = _tmp87_;
	_tmp88_ = content_box;
	_tmp89_ = title;
	gtk_box_append (_tmp88_, (GtkWidget*) _tmp89_);
	_tmp90_ = content_box;
	_tmp91_ = subtitle;
	gtk_box_append (_tmp90_, (GtkWidget*) _tmp91_);
	_tmp92_ = content_box;
	_tmp93_ = collection_group;
	gtk_box_append (_tmp92_, (GtkWidget*) _tmp93_);
	_tmp94_ = content_box;
	_tmp95_ = buttons_box;
	gtk_box_append (_tmp94_, (GtkWidget*) _tmp95_);
	_tmp96_ = content_box;
	_tmp97_ = _g_object_ref0 ((GtkWidget*) _tmp96_);
	_tmp98_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp98_, 400);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp98_, 24);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp98_, 24);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp98_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp98_, 12);
	adw_clamp_set_child (_tmp98_, _tmp97_);
	_g_object_unref0 (_tmp97_);
	g_object_ref_sink (_tmp98_);
	content_clamp = _tmp98_;
	_tmp99_ = content_clamp;
	_tmp100_ = _g_object_ref0 ((GtkWidget*) _tmp99_);
	_tmp101_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp101_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp101_, TRUE);
	g_object_set (_tmp101_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	g_object_set (_tmp101_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_child (_tmp101_, _tmp100_);
	_g_object_unref0 (_tmp100_);
	g_object_ref_sink (_tmp101_);
	scrolled_window = _tmp101_;
	_tmp102_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp102_);
	toolbar_view = _tmp102_;
	_tmp103_ = toolbar_view;
	_tmp104_ = (AdwHeaderBar*) adw_header_bar_new ();
	adw_header_bar_set_show_title (_tmp104_, FALSE);
	g_object_ref_sink (_tmp104_);
	_tmp105_ = _tmp104_;
	adw_toolbar_view_add_top_bar (_tmp103_, (GtkWidget*) _tmp105_);
	_g_object_unref0 (_tmp105_);
	_tmp106_ = toolbar_view;
	_tmp107_ = (AdwBanner*) adw_banner_new (_ ("This will replace all your current data"));
	adw_banner_set_revealed (_tmp107_, TRUE);
	g_object_ref_sink (_tmp107_);
	_tmp108_ = _tmp107_;
	adw_toolbar_view_add_top_bar (_tmp106_, (GtkWidget*) _tmp108_);
	_g_object_unref0 (_tmp108_);
	_tmp109_ = toolbar_view;
	_tmp110_ = scrolled_window;
	adw_toolbar_view_set_content (_tmp109_, (GtkWidget*) _tmp110_);
	_tmp111_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp111_);
	_tmp112_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp113_ = confirm_button;
	_tmp114_ = g_signal_connect_object ((GtkButton*) _tmp113_, "clicked", (GCallback) __dialogs_preferences_pages_backup_import_view___lambda379__gtk_button_clicked, self, 0);
	_tmp115_ = confirm_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp112_, (gpointer) ((guintptr) _tmp114_), (GObject*) _tmp115_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_backup_import_view___lambda381__gtk_widget_destroy, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content_box);
	_g_object_unref0 (buttons_box);
	_g_object_unref0 (confirm_button);
	_g_object_unref0 (collection_group);
	_g_object_unref0 (labels_row);
	_g_object_unref0 (items_row);
	_g_object_unref0 (sections_row);
	_g_object_unref0 (projects_row);
	_g_object_unref0 (sources_row);
	_g_object_unref0 (subtitle);
	_g_object_unref0 (title);
	return obj;
}

static void
dialogs_preferences_pages_backup_import_view_class_init (DialogsPreferencesPagesBackupImportViewClass * klass,
                                                         gpointer klass_data)
{
	dialogs_preferences_pages_backup_import_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesBackupImportView_private_offset);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_backup_import_view_real_clean_up;
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_backup_import_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_backup_import_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_backup_import_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_backup_import_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY, dialogs_preferences_pages_backup_import_view_properties[DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY] = g_param_spec_object ("backup", "backup", "backup", OBJECTS_TYPE_BACKUP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
dialogs_preferences_pages_backup_import_view_instance_init (DialogsPreferencesPagesBackupImportView * self,
                                                            gpointer klass)
{
	self->priv = dialogs_preferences_pages_backup_import_view_get_instance_private (self);
}

static void
dialogs_preferences_pages_backup_import_view_finalize (GObject * obj)
{
	DialogsPreferencesPagesBackupImportView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportView);
	g_debug ("Backup.vala:491: Destroying Dialogs.Preferences.Pages.ImportView\n");
	_g_object_unref0 (self->priv->_backup);
	G_OBJECT_CLASS (dialogs_preferences_pages_backup_import_view_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_backup_import_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesBackupImportViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_backup_import_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesBackupImportView), 0, (GInstanceInitFunc) dialogs_preferences_pages_backup_import_view_instance_init, NULL };
	GType dialogs_preferences_pages_backup_import_view_type_id;
	dialogs_preferences_pages_backup_import_view_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesBackupImportView", &g_define_type_info, 0);
	DialogsPreferencesPagesBackupImportView_private_offset = g_type_add_instance_private (dialogs_preferences_pages_backup_import_view_type_id, sizeof (DialogsPreferencesPagesBackupImportViewPrivate));
	return dialogs_preferences_pages_backup_import_view_type_id;
}

GType
dialogs_preferences_pages_backup_import_view_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_backup_import_view_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_backup_import_view_type_id__once)) {
		GType dialogs_preferences_pages_backup_import_view_type_id;
		dialogs_preferences_pages_backup_import_view_type_id = dialogs_preferences_pages_backup_import_view_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_backup_import_view_type_id__once, dialogs_preferences_pages_backup_import_view_type_id);
	}
	return dialogs_preferences_pages_backup_import_view_type_id__once;
}

static void
_vala_dialogs_preferences_pages_backup_import_view_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupImportView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportView);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_backup_import_view_get_backup (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_backup_import_view_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec)
{
	DialogsPreferencesPagesBackupImportView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_BACKUP_TYPE_IMPORT_VIEW, DialogsPreferencesPagesBackupImportView);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_BACKUP_IMPORT_VIEW_BACKUP_PROPERTY:
		dialogs_preferences_pages_backup_import_view_set_backup (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block97Data*
block97_data_ref (Block97Data* _data97_)
{
	g_atomic_int_inc (&_data97_->_ref_count_);
	return _data97_;
}

static void
block97_data_unref (void * _userdata_)
{
	Block97Data* _data97_;
	_data97_ = (Block97Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data97_->_ref_count_)) {
		DialogsPreferencesPagesBackup* self;
		self = _data97_->self;
		_g_object_unref0 (_data97_->auto_backup_row);
		_g_object_unref0 (self);
		g_slice_free (Block97Data, _data97_);
	}
}

static gint
_dialogs_preferences_pages_backup_set_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                        GtkListBoxRow* row2,
                                                                        gpointer self)
{
	gint result;
	result = dialogs_preferences_pages_backup_set_sort_func ((DialogsPreferencesPagesBackup*) self, row1, row2);
	return result;
}

static void
_dialogs_preferences_pages_backup___lambda382_ (Block97Data* _data97_)
{
	DialogsPreferencesPagesBackup* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	AdwSwitchRow* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = _data97_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data97_->auto_backup_row;
	_tmp4_ = adw_switch_row_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_boolean (_tmp2_, "backup-automatic", _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_backup___lambda382__g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self)
{
	_dialogs_preferences_pages_backup___lambda382_ (self);
}

static void
_dialogs_preferences_pages_backup___lambda383_ (DialogsPreferencesPagesBackup* self)
{
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	services_backup_manager_create_and_distribute_backup (_tmp1_);
	_g_object_unref0 (_tmp1_);
	dialogs_preferences_pages_base_page_popup_toast ((DialogsPreferencesPagesBasePage*) self, _ ("The Backup was created successfully."));
}

static void
__dialogs_preferences_pages_backup___lambda383__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_backup___lambda383_ ((DialogsPreferencesPagesBackup*) self);
}

static void
__lambda385_ (DialogsPreferencesPagesBackup* self,
              GObject* obj,
              GAsyncResult* res)
{
	GFile* file = NULL;
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	ObjectsBackup* backup = NULL;
	GFile* _tmp4_;
	ObjectsBackup* _tmp5_;
	ObjectsBackup* _tmp6_;
	g_return_if_fail (res != NULL);
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = services_backup_manager_choose_backup_file_finish (_tmp1_, res);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp1_);
	file = _tmp3_;
	_tmp4_ = file;
	_tmp5_ = objects_backup_new_from_file (_tmp4_);
	backup = _tmp5_;
	_tmp6_ = backup;
	dialogs_preferences_pages_backup_view_backup (self, _tmp6_);
	_g_object_unref0 (backup);
	_g_object_unref0 (file);
}

static void
___lambda385__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda385_ ((DialogsPreferencesPagesBackup*) self, source_object, res);
	g_object_unref (self);
}

static void
_dialogs_preferences_pages_backup___lambda384_ (DialogsPreferencesPagesBackup* self)
{
	ServicesBackupManager* _tmp0_;
	ServicesBackupManager* _tmp1_;
	_tmp0_ = services_backup_manager_get_default ();
	_tmp1_ = _tmp0_;
	services_backup_manager_choose_backup_file (_tmp1_, ___lambda385__gasync_ready_callback, g_object_ref (self));
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_backup___lambda384__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_backup___lambda384_ ((DialogsPreferencesPagesBackup*) self);
}

static void
_dialogs_preferences_pages_backup___lambda386_ (DialogsPreferencesPagesBackup* self)
{
	gchar* path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GFile* file = NULL;
	const gchar* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	_tmp0_ = g_get_home_dir ();
	_tmp1_ = g_strconcat (_tmp0_, "/.var/app/com.github.alainm23.planner/data/com.github.alainm23.planner" \
"/database.db", NULL);
	path = _tmp1_;
	_tmp2_ = path;
	_tmp3_ = g_file_new_for_path (_tmp2_);
	file = _tmp3_;
	_tmp4_ = file;
	if (g_file_query_exists (_tmp4_, NULL)) {
		ServicesMigrateFromPlanner* _tmp5_;
		GFile* _tmp6_;
		_tmp5_ = services_migrate_from_planner_get_default ();
		_tmp6_ = file;
		if (services_migrate_from_planner_migrate_from_file (_tmp5_, _tmp6_)) {
			AdwPreferencesDialog* _tmp7_;
			AdwPreferencesDialog* _tmp8_;
			dialogs_preferences_pages_base_page_popup_toast ((DialogsPreferencesPagesBasePage*) self, _ ("Tasks Migrate Successfully"));
			_tmp7_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
			_tmp8_ = _tmp7_;
			adw_preferences_dialog_pop_subpage (_tmp8_);
		}
	} else {
		dialogs_preferences_pages_base_page_popup_toast ((DialogsPreferencesPagesBasePage*) self, _ ("The database file does not exist."));
	}
	_g_object_unref0 (file);
	_g_free0 (path);
}

static void
__dialogs_preferences_pages_backup___lambda386__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_backup___lambda386_ ((DialogsPreferencesPagesBackup*) self);
}

static Block98Data*
block98_data_ref (Block98Data* _data98_)
{
	g_atomic_int_inc (&_data98_->_ref_count_);
	return _data98_;
}

static void
block98_data_unref (void * _userdata_)
{
	Block98Data* _data98_;
	_data98_ = (Block98Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data98_->_ref_count_)) {
		DialogsPreferencesPagesBackup* self;
		self = _data98_->self;
		_g_object_unref0 (_data98_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block98Data, _data98_);
	}
}

static void
__lambda389_ (Block98Data* _data98_,
              GObject* obj,
              GAsyncResult* res)
{
	DialogsPreferencesPagesBackup* self;
	GError* _inner_error0_ = NULL;
	self = _data98_->self;
	g_return_if_fail (res != NULL);
	{
		GFile* folder = NULL;
		GtkFileDialog* _tmp0_;
		GFile* _tmp1_;
		gchar* folder_path = NULL;
		GFile* _tmp2_;
		gchar* _tmp3_;
		ServicesBackupManager* _tmp4_;
		ServicesBackupManager* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp0_ = _data98_->dialog;
		_tmp1_ = gtk_file_dialog_select_folder_finish (_tmp0_, res, &_inner_error0_);
		folder = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = folder;
		_tmp3_ = g_file_get_path (_tmp2_);
		folder_path = _tmp3_;
		_tmp4_ = services_backup_manager_get_default ();
		_tmp5_ = _tmp4_;
		_tmp6_ = folder_path;
		services_backup_manager_add_extra_folder (_tmp5_, _tmp6_);
		_g_object_unref0 (_tmp5_);
		_tmp7_ = folder_path;
		dialogs_preferences_pages_backup_add_extra_folder_row (self, _tmp7_);
		_g_free0 (folder_path);
		_g_object_unref0 (folder);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		_tmp10_ = g_strdup_printf ("Error selecting folder: %s", _tmp9_);
		_tmp11_ = _tmp10_;
		g_debug ("Backup.vala:197: %s", _tmp11_);
		_g_free0 (_tmp11_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda389__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda389_ (self, source_object, res);
	block98_data_unref (self);
}

static void
_dialogs_preferences_pages_backup___lambda388_ (DialogsPreferencesPagesBackup* self)
{
	Block98Data* _data98_;
	GtkFileDialog* _tmp0_;
	GtkFileDialog* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	_data98_ = g_slice_new0 (Block98Data);
	_data98_->_ref_count_ = 1;
	_data98_->self = g_object_ref (self);
	_tmp0_ = gtk_file_dialog_new ();
	_data98_->dialog = _tmp0_;
	_tmp1_ = _data98_->dialog;
	_tmp2_ = planify__instance;
	_tmp3_ = _tmp2_->main_window;
	gtk_file_dialog_select_folder (_tmp1_, (GtkWindow*) _tmp3_, NULL, ___lambda389__gasync_ready_callback, block98_data_ref (_data98_));
	block98_data_unref (_data98_);
	_data98_ = NULL;
}

static void
__dialogs_preferences_pages_backup___lambda388__gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_backup___lambda388_ ((DialogsPreferencesPagesBackup*) self);
}

static gint
_dialogs_preferences_pages_backup___lambda390_ (DialogsPreferencesPagesBackup* self,
                                                ObjectsBackup* a,
                                                ObjectsBackup* b)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gint result;
	g_return_val_if_fail (a != NULL, -1);
	g_return_val_if_fail (b != NULL, -1);
	_tmp0_ = objects_backup_get_datetime (b);
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_backup_get_datetime (a);
	_tmp3_ = _tmp2_;
	result = g_date_time_compare (_tmp1_, _tmp3_);
	return result;
}

static gint
__dialogs_preferences_pages_backup___lambda390__gcompare_data_func (gconstpointer a,
                                                                    gconstpointer b,
                                                                    gpointer self)
{
	gint result;
	result = _dialogs_preferences_pages_backup___lambda390_ ((DialogsPreferencesPagesBackup*) self, (ObjectsBackup*) a, (ObjectsBackup*) b);
	return result;
}

static void
_dialogs_preferences_pages_backup___lambda391_ (DialogsPreferencesPagesBackup* self,
                                                ObjectsBackup* backup)
{
	LayoutsHeaderItem* _tmp0_;
	g_return_if_fail (backup != NULL);
	_tmp0_ = self->priv->backups_group;
	dialogs_preferences_pages_backup_add_backup_row (self, backup, _tmp0_);
}

static void
__dialogs_preferences_pages_backup___lambda391__services_backup_manager_backup_added (ServicesBackupManager* _sender,
                                                                                      ObjectsBackup* backup,
                                                                                      gpointer self)
{
	_dialogs_preferences_pages_backup___lambda391_ ((DialogsPreferencesPagesBackup*) self, backup);
}

static void
_dialogs_preferences_pages_backup___lambda392_ (DialogsPreferencesPagesBackup* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_backup___lambda392__gtk_widget_destroy (GtkWidget* _sender,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_backup___lambda392_ ((DialogsPreferencesPagesBackup*) self);
}

static GObject *
dialogs_preferences_pages_backup_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesBackup * self;
	Block97Data* _data97_;
	GtkLabel* description_label = NULL;
	GtkLabel* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	AdwSwitchRow* _tmp3_ = NULL;
	AdwSwitchRow* _tmp4_;
	ServicesSettings* _tmp5_;
	ServicesSettings* _tmp6_;
	GSettings* _tmp7_;
	AdwPreferencesGroup* auto_backup_group = NULL;
	AdwPreferencesGroup* _tmp8_;
	AdwPreferencesGroup* _tmp9_;
	AdwSwitchRow* _tmp10_;
	GtkButton* add_button = NULL;
	GtkButton* _tmp11_ = NULL;
	GtkButton* import_button = NULL;
	GtkButton* _tmp12_;
	gchar* _tmp13_;
	LayoutsHeaderItem* _tmp14_ = NULL;
	LayoutsHeaderItem* _tmp15_;
	GtkLabel* location_label = NULL;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	GtkLabel* _tmp21_ = NULL;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* _tmp24_;
	GtkLabel* max_backups_label = NULL;
	GtkLabel* _tmp25_ = NULL;
	GtkLabel* _tmp26_;
	GtkLabel* _tmp27_;
	GtkLabel* _tmp28_;
	GtkBox* backups_box = NULL;
	GtkBox* _tmp29_ = NULL;
	GtkBox* _tmp30_;
	LayoutsHeaderItem* _tmp31_;
	GtkBox* _tmp32_;
	GtkLabel* _tmp33_;
	GtkBox* _tmp34_;
	GtkLabel* _tmp35_;
	gchar* _tmp36_;
	LayoutsHeaderItem* _tmp37_ = NULL;
	GtkButton* add_folder_button = NULL;
	gchar* _tmp38_;
	gchar** _tmp39_;
	GtkButton* _tmp40_ = NULL;
	LayoutsHeaderItem* _tmp41_;
	GtkButton* _tmp42_;
	GtkBox* extra_locations_box = NULL;
	GtkBox* _tmp43_;
	GtkBox* _tmp44_;
	LayoutsHeaderItem* _tmp45_;
	GtkLabel* extra_location_label = NULL;
	GtkLabel* _tmp46_ = NULL;
	GtkLabel* _tmp47_;
	GtkLabel* _tmp48_;
	GtkBox* _tmp49_;
	GtkLabel* _tmp50_;
	GtkButton* import_planner_button = NULL;
	GtkButton* _tmp51_;
	LayoutsHeaderItem* migrate_group = NULL;
	LayoutsHeaderItem* _tmp52_;
	LayoutsHeaderItem* _tmp53_;
	LayoutsHeaderItem* _tmp54_;
	GtkButton* _tmp55_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp56_ = NULL;
	GtkBox* _tmp57_;
	GtkLabel* _tmp58_;
	GtkBox* _tmp59_;
	AdwPreferencesGroup* _tmp60_;
	GtkBox* _tmp61_;
	GtkButton* _tmp62_;
	GtkBox* _tmp63_;
	GtkButton* _tmp64_;
	GtkBox* _tmp65_;
	GtkBox* _tmp66_;
	GtkBox* _tmp67_;
	GtkBox* _tmp68_;
	GtkScrolledWindow* scrolled_window = NULL;
	GtkBox* _tmp69_;
	GtkWidget* _tmp70_;
	GtkScrolledWindow* _tmp71_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp72_;
	AdwToolbarView* _tmp73_;
	AdwHeaderBar* _tmp74_;
	AdwHeaderBar* _tmp75_;
	AdwToolbarView* _tmp76_;
	GtkScrolledWindow* _tmp77_;
	AdwToolbarView* _tmp78_;
	GeeHashMap* _tmp79_;
	AdwSwitchRow* _tmp80_;
	gulong _tmp81_;
	AdwSwitchRow* _tmp82_;
	GeeHashMap* _tmp83_;
	GtkButton* _tmp84_;
	gulong _tmp85_;
	GtkButton* _tmp86_;
	GeeHashMap* _tmp87_;
	GtkButton* _tmp88_;
	gulong _tmp89_;
	GtkButton* _tmp90_;
	GeeHashMap* _tmp91_;
	GtkButton* _tmp92_;
	gulong _tmp93_;
	GtkButton* _tmp94_;
	GeeHashMap* _tmp95_;
	GtkButton* _tmp96_;
	gulong _tmp97_;
	GtkButton* _tmp98_;
	GeeArrayList* all_backups = NULL;
	ServicesBackupManager* _tmp99_;
	ServicesBackupManager* _tmp100_;
	GeeArrayList* _tmp101_;
	GeeArrayList* _tmp102_;
	GeeArrayList* _tmp103_;
	GeeArrayList* _tmp104_;
	GeeArrayList* sorted_backups = NULL;
	GeeArrayList* _tmp105_;
	GeeArrayList* _tmp106_;
	GeeArrayList* _tmp107_;
	GeeArrayList* _tmp108_;
	gint count = 0;
	GtkLabel* _tmp120_;
	GeeArrayList* _tmp121_;
	gint _tmp122_;
	gint _tmp123_;
	ServicesSettings* _tmp124_;
	ServicesSettings* _tmp125_;
	GSettings* _tmp126_;
	gchar** _tmp127_;
	gchar** _tmp128_;
	gchar** _tmp129_;
	gint _tmp129__length1;
	GeeHashMap* _tmp132_;
	ServicesBackupManager* _tmp133_;
	ServicesBackupManager* _tmp134_;
	gulong _tmp135_;
	ServicesBackupManager* _tmp136_;
	ServicesBackupManager* _tmp137_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_backup_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, DialogsPreferencesPagesBackup);
	_data97_ = g_slice_new0 (Block97Data);
	_data97_->_ref_count_ = 1;
	_data97_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Never worry about losing your data. You can create backups of your act" \
"ive projects, tasks and comments and import them later."));
	gtk_label_set_justify (_tmp0_, GTK_JUSTIFY_FILL);
	gtk_label_set_use_markup (_tmp0_, TRUE);
	gtk_label_set_wrap (_tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 3);
	g_object_ref_sink (_tmp0_);
	description_label = _tmp0_;
	_tmp1_ = g_strdup (_ ("Automatic Daily Backup"));
	_tmp2_ = g_strdup (_ ("Creates a backup every day at midnight"));
	_tmp3_ = (AdwSwitchRow*) adw_switch_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp3_, _tmp1_);
	_g_free0 (_tmp1_);
	adw_action_row_set_subtitle ((AdwActionRow*) _tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_data97_->auto_backup_row = _tmp3_;
	_tmp4_ = _data97_->auto_backup_row;
	_tmp5_ = services_settings_get_default ();
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_->settings;
	adw_switch_row_set_active (_tmp4_, g_settings_get_boolean (_tmp7_, "backup-automatic"));
	_g_object_unref0 (_tmp6_);
	_tmp8_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp8_);
	auto_backup_group = _tmp8_;
	_tmp9_ = auto_backup_group;
	_tmp10_ = _data97_->auto_backup_row;
	adw_preferences_group_add (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = (GtkButton*) gtk_button_new_with_label (_ ("Create Backup"));
	gtk_widget_set_margin_top ((GtkWidget*) _tmp11_, 12);
	g_object_ref_sink (_tmp11_);
	add_button = _tmp11_;
	_tmp12_ = (GtkButton*) gtk_button_new_with_label (_ ("Import Backup"));
	g_object_ref_sink (_tmp12_);
	import_button = _tmp12_;
	_tmp13_ = g_strdup (_ ("No backups found, create one clicking the button above."));
	_tmp14_ = layouts_header_item_new (_ ("Backup Files"));
	layouts_header_item_set_card (_tmp14_, TRUE);
	layouts_header_item_set_reveal (_tmp14_, TRUE);
	layouts_header_item_set_placeholder_message (_tmp14_, _tmp13_);
	_g_free0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->backups_group);
	self->priv->backups_group = _tmp14_;
	_tmp15_ = self->priv->backups_group;
	layouts_header_item_set_sort_func (_tmp15_, _dialogs_preferences_pages_backup_set_sort_func_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp16_ = g_get_user_data_dir ();
	_tmp17_ = g_strconcat (_tmp16_, "/io.github.alainm23.planify/backups", NULL);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_strdup_printf (_ ("Backup files are stored in: %s"), _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = (GtkLabel*) gtk_label_new (_tmp20_);
	gtk_label_set_wrap (_tmp21_, TRUE);
	gtk_label_set_xalign (_tmp21_, (gfloat) 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp21_, 6);
	gtk_label_set_selectable (_tmp21_, TRUE);
	g_object_ref_sink (_tmp21_);
	_tmp22_ = _tmp21_;
	_g_free0 (_tmp20_);
	_g_free0 (_tmp18_);
	location_label = _tmp22_;
	_tmp23_ = location_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp23_, "dimmed");
	_tmp24_ = location_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp24_, "caption");
	_tmp25_ = (GtkLabel*) gtk_label_new (_ ("Only the last 30 backups are shown here. To access older backups, open" \
" the backup folder directly."));
	gtk_label_set_wrap (_tmp25_, TRUE);
	gtk_label_set_xalign (_tmp25_, (gfloat) 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp25_, 6);
	g_object_ref_sink (_tmp25_);
	max_backups_label = _tmp25_;
	_tmp26_ = max_backups_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp26_, "dimmed");
	_tmp27_ = max_backups_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp27_, "caption");
	_tmp28_ = max_backups_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp28_, FALSE);
	_tmp29_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp29_, 12);
	g_object_ref_sink (_tmp29_);
	backups_box = _tmp29_;
	_tmp30_ = backups_box;
	_tmp31_ = self->priv->backups_group;
	gtk_box_append (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = backups_box;
	_tmp33_ = location_label;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = backups_box;
	_tmp35_ = max_backups_label;
	gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = g_strdup (_ ("No extra locations added yet."));
	_tmp37_ = layouts_header_item_new (_ ("Extra Backup Locations"));
	layouts_header_item_set_card (_tmp37_, TRUE);
	layouts_header_item_set_reveal (_tmp37_, TRUE);
	layouts_header_item_set_placeholder_message (_tmp37_, _tmp36_);
	_g_free0 (_tmp36_);
	g_object_ref_sink (_tmp37_);
	_g_object_unref0 (self->priv->extra_group);
	self->priv->extra_group = _tmp37_;
	_tmp38_ = g_strdup ("flat");
	_tmp39_ = g_new0 (gchar*, 1 + 1);
	_tmp39_[0] = _tmp38_;
	_tmp40_ = (GtkButton*) gtk_button_new_from_icon_name ("list-add-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp40_, _tmp39_);
	_tmp39_ = (_vala_array_free (_tmp39_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp40_);
	add_folder_button = _tmp40_;
	_tmp41_ = self->priv->extra_group;
	_tmp42_ = add_folder_button;
	layouts_header_item_add_widget_end (_tmp41_, (GtkWidget*) _tmp42_);
	_tmp43_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp43_);
	extra_locations_box = _tmp43_;
	_tmp44_ = extra_locations_box;
	_tmp45_ = self->priv->extra_group;
	gtk_box_append (_tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = (GtkLabel*) gtk_label_new (_ ("Backup copies will also be saved to these folders after each backup is" \
" created."));
	gtk_label_set_wrap (_tmp46_, TRUE);
	gtk_label_set_xalign (_tmp46_, (gfloat) 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp46_, 6);
	g_object_ref_sink (_tmp46_);
	extra_location_label = _tmp46_;
	_tmp47_ = extra_location_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp47_, "dimmed");
	_tmp48_ = extra_location_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp48_, "caption");
	_tmp49_ = extra_locations_box;
	_tmp50_ = extra_location_label;
	gtk_box_append (_tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = (GtkButton*) gtk_button_new_with_label (_ ("Migrate"));
	g_object_ref_sink (_tmp51_);
	import_planner_button = _tmp51_;
	_tmp52_ = layouts_header_item_new (_ ("Migrate From Planner"));
	g_object_ref_sink (_tmp52_);
	migrate_group = _tmp52_;
	_tmp53_ = migrate_group;
	layouts_header_item_set_reveal (_tmp53_, TRUE);
	_tmp54_ = migrate_group;
	_tmp55_ = import_planner_button;
	layouts_header_item_add_child (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp56_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp56_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp56_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp56_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp56_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp56_, 12);
	g_object_ref_sink (_tmp56_);
	content_box = _tmp56_;
	_tmp57_ = content_box;
	_tmp58_ = description_label;
	gtk_box_append (_tmp57_, (GtkWidget*) _tmp58_);
	_tmp59_ = content_box;
	_tmp60_ = auto_backup_group;
	gtk_box_append (_tmp59_, (GtkWidget*) _tmp60_);
	_tmp61_ = content_box;
	_tmp62_ = add_button;
	gtk_box_append (_tmp61_, (GtkWidget*) _tmp62_);
	_tmp63_ = content_box;
	_tmp64_ = import_button;
	gtk_box_append (_tmp63_, (GtkWidget*) _tmp64_);
	_tmp65_ = content_box;
	_tmp66_ = backups_box;
	gtk_box_append (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = content_box;
	_tmp68_ = extra_locations_box;
	gtk_box_append (_tmp67_, (GtkWidget*) _tmp68_);
	_tmp69_ = content_box;
	_tmp70_ = _g_object_ref0 ((GtkWidget*) _tmp69_);
	_tmp71_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp71_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp71_, TRUE);
	g_object_set (_tmp71_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	g_object_set (_tmp71_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_child (_tmp71_, _tmp70_);
	_g_object_unref0 (_tmp70_);
	g_object_ref_sink (_tmp71_);
	scrolled_window = _tmp71_;
	_tmp72_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp72_);
	toolbar_view = _tmp72_;
	_tmp73_ = toolbar_view;
	_tmp74_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp74_);
	_tmp75_ = _tmp74_;
	adw_toolbar_view_add_top_bar (_tmp73_, (GtkWidget*) _tmp75_);
	_g_object_unref0 (_tmp75_);
	_tmp76_ = toolbar_view;
	_tmp77_ = scrolled_window;
	adw_toolbar_view_set_content (_tmp76_, (GtkWidget*) _tmp77_);
	_tmp78_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp78_);
	_tmp79_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp80_ = _data97_->auto_backup_row;
	_tmp81_ = g_signal_connect_data ((GObject*) _tmp80_, "notify::active", (GCallback) __dialogs_preferences_pages_backup___lambda382__g_object_notify, block97_data_ref (_data97_), (GClosureNotify) block97_data_unref, 0);
	_tmp82_ = _data97_->auto_backup_row;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (gpointer) ((guintptr) _tmp81_), (GObject*) _tmp82_);
	_tmp83_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp84_ = add_button;
	_tmp85_ = g_signal_connect_object (_tmp84_, "clicked", (GCallback) __dialogs_preferences_pages_backup___lambda383__gtk_button_clicked, self, 0);
	_tmp86_ = add_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp83_, (gpointer) ((guintptr) _tmp85_), (GObject*) _tmp86_);
	_tmp87_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp88_ = import_button;
	_tmp89_ = g_signal_connect_object (_tmp88_, "clicked", (GCallback) __dialogs_preferences_pages_backup___lambda384__gtk_button_clicked, self, 0);
	_tmp90_ = import_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp87_, (gpointer) ((guintptr) _tmp89_), (GObject*) _tmp90_);
	_tmp91_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp92_ = import_planner_button;
	_tmp93_ = g_signal_connect_object (_tmp92_, "clicked", (GCallback) __dialogs_preferences_pages_backup___lambda386__gtk_button_clicked, self, 0);
	_tmp94_ = import_planner_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp91_, (gpointer) ((guintptr) _tmp93_), (GObject*) _tmp94_);
	_tmp95_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp96_ = add_folder_button;
	_tmp97_ = g_signal_connect_object (_tmp96_, "clicked", (GCallback) __dialogs_preferences_pages_backup___lambda388__gtk_button_clicked, self, 0);
	_tmp98_ = add_folder_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp95_, (gpointer) ((guintptr) _tmp97_), (GObject*) _tmp98_);
	dialogs_preferences_pages_backup_connect_backup_group_signals (self);
	_tmp99_ = services_backup_manager_get_default ();
	_tmp100_ = _tmp99_;
	_tmp101_ = services_backup_manager_get_backups (_tmp100_);
	_tmp102_ = _tmp101_;
	_tmp103_ = _g_object_ref0 (_tmp102_);
	_tmp104_ = _tmp103_;
	_g_object_unref0 (_tmp100_);
	all_backups = _tmp104_;
	_tmp105_ = gee_array_list_new (OBJECTS_TYPE_BACKUP, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	sorted_backups = _tmp105_;
	_tmp106_ = sorted_backups;
	_tmp107_ = all_backups;
	gee_array_list_add_all (_tmp106_, (GeeCollection*) _tmp107_);
	_tmp108_ = sorted_backups;
	gee_list_sort ((GeeList*) _tmp108_, __dialogs_preferences_pages_backup___lambda390__gcompare_data_func, g_object_ref (self), g_object_unref);
	count = 0;
	{
		GeeArrayList* _backup_list = NULL;
		GeeArrayList* _tmp109_;
		gint _backup_size = 0;
		GeeArrayList* _tmp110_;
		gint _tmp111_;
		gint _tmp112_;
		gint _backup_index = 0;
		_tmp109_ = sorted_backups;
		_backup_list = _tmp109_;
		_tmp110_ = _backup_list;
		_tmp111_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp110_);
		_tmp112_ = _tmp111_;
		_backup_size = _tmp112_;
		_backup_index = -1;
		while (TRUE) {
			gint _tmp113_;
			gint _tmp114_;
			ObjectsBackup* backup = NULL;
			GeeArrayList* _tmp115_;
			gpointer _tmp116_;
			ObjectsBackup* _tmp117_;
			LayoutsHeaderItem* _tmp118_;
			gint _tmp119_;
			_backup_index = _backup_index + 1;
			_tmp113_ = _backup_index;
			_tmp114_ = _backup_size;
			if (!(_tmp113_ < _tmp114_)) {
				break;
			}
			_tmp115_ = _backup_list;
			_tmp116_ = gee_abstract_list_get ((GeeAbstractList*) _tmp115_, _backup_index);
			backup = (ObjectsBackup*) _tmp116_;
			if (count >= 30) {
				_g_object_unref0 (backup);
				break;
			}
			_tmp117_ = backup;
			_tmp118_ = self->priv->backups_group;
			dialogs_preferences_pages_backup_add_backup_row (self, _tmp117_, _tmp118_);
			_tmp119_ = count;
			count = _tmp119_ + 1;
			_g_object_unref0 (backup);
		}
	}
	_tmp120_ = max_backups_label;
	_tmp121_ = all_backups;
	_tmp122_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp121_);
	_tmp123_ = _tmp122_;
	gtk_widget_set_visible ((GtkWidget*) _tmp120_, _tmp123_ > 30);
	_tmp124_ = services_settings_get_default ();
	_tmp125_ = _tmp124_;
	_tmp126_ = _tmp125_->settings;
	_tmp128_ = _tmp127_ = g_settings_get_strv (_tmp126_, "backup-extra-folders");
	_tmp129_ = _tmp128_;
	_tmp129__length1 = _vala_array_length (_tmp127_);
	_g_object_unref0 (_tmp125_);
	{
		gchar** folder_path_collection = NULL;
		gint folder_path_collection_length1 = 0;
		gint _folder_path_collection_size_ = 0;
		gint folder_path_it = 0;
		folder_path_collection = _tmp129_;
		folder_path_collection_length1 = _tmp129__length1;
		for (folder_path_it = 0; folder_path_it < folder_path_collection_length1; folder_path_it = folder_path_it + 1) {
			gchar* _tmp130_;
			gchar* folder_path = NULL;
			_tmp130_ = g_strdup (folder_path_collection[folder_path_it]);
			folder_path = _tmp130_;
			{
				const gchar* _tmp131_;
				_tmp131_ = folder_path;
				dialogs_preferences_pages_backup_add_extra_folder_row (self, _tmp131_);
				_g_free0 (folder_path);
			}
		}
		folder_path_collection = (_vala_array_free (folder_path_collection, folder_path_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp132_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp133_ = services_backup_manager_get_default ();
	_tmp134_ = _tmp133_;
	_tmp135_ = g_signal_connect_object (_tmp134_, "backup-added", (GCallback) __dialogs_preferences_pages_backup___lambda391__services_backup_manager_backup_added, self, 0);
	_tmp136_ = services_backup_manager_get_default ();
	_tmp137_ = _tmp136_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp132_, (gpointer) ((guintptr) _tmp135_), (GObject*) _tmp137_);
	_g_object_unref0 (_tmp137_);
	_g_object_unref0 (_tmp134_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_backup___lambda392__gtk_widget_destroy, self, 0);
	_g_object_unref0 (sorted_backups);
	_g_object_unref0 (all_backups);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (scrolled_window);
	_g_object_unref0 (content_box);
	_g_object_unref0 (migrate_group);
	_g_object_unref0 (import_planner_button);
	_g_object_unref0 (extra_location_label);
	_g_object_unref0 (extra_locations_box);
	_g_object_unref0 (add_folder_button);
	_g_object_unref0 (backups_box);
	_g_object_unref0 (max_backups_label);
	_g_object_unref0 (location_label);
	_g_object_unref0 (import_button);
	_g_object_unref0 (add_button);
	_g_object_unref0 (auto_backup_group);
	_g_object_unref0 (description_label);
	block97_data_unref (_data97_);
	_data97_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_backup_class_init (DialogsPreferencesPagesBackupClass * klass,
                                             gpointer klass_data)
{
	dialogs_preferences_pages_backup_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesBackup_private_offset);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_backup_real_clean_up;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_backup_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_backup_finalize;
}

static void
dialogs_preferences_pages_backup_instance_init (DialogsPreferencesPagesBackup * self,
                                                gpointer klass)
{
	self->priv = dialogs_preferences_pages_backup_get_instance_private (self);
}

static void
dialogs_preferences_pages_backup_finalize (GObject * obj)
{
	DialogsPreferencesPagesBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_BACKUP, DialogsPreferencesPagesBackup);
	g_debug ("Backup.vala:34: Destroying - Dialogs.Preferences.Pages.Backup\n");
	_g_object_unref0 (self->priv->backups_group);
	_g_object_unref0 (self->priv->extra_group);
	G_OBJECT_CLASS (dialogs_preferences_pages_backup_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_backup_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesBackupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_backup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesBackup), 0, (GInstanceInitFunc) dialogs_preferences_pages_backup_instance_init, NULL };
	GType dialogs_preferences_pages_backup_type_id;
	dialogs_preferences_pages_backup_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesBackup", &g_define_type_info, 0);
	DialogsPreferencesPagesBackup_private_offset = g_type_add_instance_private (dialogs_preferences_pages_backup_type_id, sizeof (DialogsPreferencesPagesBackupPrivate));
	return dialogs_preferences_pages_backup_type_id;
}

GType
dialogs_preferences_pages_backup_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_backup_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_backup_type_id__once)) {
		GType dialogs_preferences_pages_backup_type_id;
		dialogs_preferences_pages_backup_type_id = dialogs_preferences_pages_backup_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_backup_type_id__once, dialogs_preferences_pages_backup_type_id);
	}
	return dialogs_preferences_pages_backup_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

