/* FinishBox.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from FinishBox.vala, do not modify */

/*
 * FinishBox.vala
 *
 * Copyright 2012-2018 Tony George <teejeetech@gmail.com>
 *
 * 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 2 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.
 *
 *
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gee.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 TYPE_FINISH_BOX (finish_box_get_type ())
#define FINISH_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FINISH_BOX, FinishBox))
#define FINISH_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FINISH_BOX, FinishBoxClass))
#define IS_FINISH_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FINISH_BOX))
#define IS_FINISH_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FINISH_BOX))
#define FINISH_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FINISH_BOX, FinishBoxClass))

typedef struct _FinishBox FinishBox;
typedef struct _FinishBoxClass FinishBoxClass;
typedef struct _FinishBoxPrivate FinishBoxPrivate;
enum  {
	FINISH_BOX_0_PROPERTY,
	FINISH_BOX_NUM_PROPERTIES
};
static GParamSpec* finish_box_properties[FINISH_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_MAIN (main_get_type ())
#define MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN, Main))
#define MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN, MainClass))
#define IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN))
#define IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN))
#define MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN, MainClass))

typedef struct _Main Main;
typedef struct _MainClass MainClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _MainPrivate MainPrivate;

#define TYPE_DEVICE (device_get_type ())
#define DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEVICE, Device))
#define DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEVICE, DeviceClass))
#define IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEVICE))
#define IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEVICE))
#define DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEVICE, DeviceClass))

typedef struct _Device Device;
typedef struct _DeviceClass DeviceClass;

#define TYPE_APP_EXCLUDE_ENTRY (app_exclude_entry_get_type ())
#define APP_EXCLUDE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_EXCLUDE_ENTRY, AppExcludeEntry))
#define APP_EXCLUDE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_EXCLUDE_ENTRY, AppExcludeEntryClass))
#define IS_APP_EXCLUDE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_EXCLUDE_ENTRY))
#define IS_APP_EXCLUDE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_EXCLUDE_ENTRY))
#define APP_EXCLUDE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_EXCLUDE_ENTRY, AppExcludeEntryClass))

typedef struct _AppExcludeEntry AppExcludeEntry;
typedef struct _AppExcludeEntryClass AppExcludeEntryClass;

#define TYPE_MOUNT_ENTRY (mount_entry_get_type ())
#define MOUNT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOUNT_ENTRY, MountEntry))
#define MOUNT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOUNT_ENTRY, MountEntryClass))
#define IS_MOUNT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOUNT_ENTRY))
#define IS_MOUNT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOUNT_ENTRY))
#define MOUNT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOUNT_ENTRY, MountEntryClass))

typedef struct _MountEntry MountEntry;
typedef struct _MountEntryClass MountEntryClass;

#define TYPE_SNAPSHOT_REPO (snapshot_repo_get_type ())
#define SNAPSHOT_REPO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SNAPSHOT_REPO, SnapshotRepo))
#define SNAPSHOT_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SNAPSHOT_REPO, SnapshotRepoClass))
#define IS_SNAPSHOT_REPO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SNAPSHOT_REPO))
#define IS_SNAPSHOT_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SNAPSHOT_REPO))
#define SNAPSHOT_REPO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SNAPSHOT_REPO, SnapshotRepoClass))

typedef struct _SnapshotRepo SnapshotRepo;
typedef struct _SnapshotRepoClass SnapshotRepoClass;

#define TYPE_SUBVOLUME (subvolume_get_type ())
#define SUBVOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUBVOLUME, Subvolume))
#define SUBVOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUBVOLUME, SubvolumeClass))
#define IS_SUBVOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUBVOLUME))
#define IS_SUBVOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUBVOLUME))
#define SUBVOLUME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUBVOLUME, SubvolumeClass))

typedef struct _Subvolume Subvolume;
typedef struct _SubvolumeClass SubvolumeClass;

#define TYPE_LINUX_DISTRO (linux_distro_get_type ())
#define LINUX_DISTRO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINUX_DISTRO, LinuxDistro))
#define LINUX_DISTRO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINUX_DISTRO, LinuxDistroClass))
#define IS_LINUX_DISTRO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINUX_DISTRO))
#define IS_LINUX_DISTRO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LINUX_DISTRO))
#define LINUX_DISTRO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LINUX_DISTRO, LinuxDistroClass))

typedef struct _LinuxDistro LinuxDistro;
typedef struct _LinuxDistroClass LinuxDistroClass;

#define TYPE_APP_LOCK (app_lock_get_type ())
#define APP_LOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_LOCK, AppLock))
#define APP_LOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_LOCK, AppLockClass))
#define IS_APP_LOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_LOCK))
#define IS_APP_LOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_LOCK))
#define APP_LOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_LOCK, AppLockClass))

typedef struct _AppLock AppLock;
typedef struct _AppLockClass AppLockClass;

#define TYPE_SNAPSHOT (snapshot_get_type ())
#define SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SNAPSHOT, Snapshot))
#define SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SNAPSHOT, SnapshotClass))
#define IS_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SNAPSHOT))
#define IS_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SNAPSHOT))
#define SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SNAPSHOT, SnapshotClass))

typedef struct _Snapshot Snapshot;
typedef struct _SnapshotClass SnapshotClass;

#define TYPE_ASYNC_TASK (async_task_get_type ())
#define ASYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ASYNC_TASK, AsyncTask))
#define ASYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ASYNC_TASK, AsyncTaskClass))
#define IS_ASYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ASYNC_TASK))
#define IS_ASYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ASYNC_TASK))
#define ASYNC_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ASYNC_TASK, AsyncTaskClass))

typedef struct _AsyncTask AsyncTask;
typedef struct _AsyncTaskClass AsyncTaskClass;

#define TYPE_RSYNC_TASK (rsync_task_get_type ())
#define RSYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RSYNC_TASK, RsyncTask))
#define RSYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RSYNC_TASK, RsyncTaskClass))
#define IS_RSYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RSYNC_TASK))
#define IS_RSYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RSYNC_TASK))
#define RSYNC_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RSYNC_TASK, RsyncTaskClass))

typedef struct _RsyncTask RsyncTask;
typedef struct _RsyncTaskClass RsyncTaskClass;

#define TYPE_DELETE_FILE_TASK (delete_file_task_get_type ())
#define DELETE_FILE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_FILE_TASK, DeleteFileTask))
#define DELETE_FILE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_FILE_TASK, DeleteFileTaskClass))
#define IS_DELETE_FILE_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_FILE_TASK))
#define IS_DELETE_FILE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_FILE_TASK))
#define DELETE_FILE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_FILE_TASK, DeleteFileTaskClass))

typedef struct _DeleteFileTask DeleteFileTask;
typedef struct _DeleteFileTaskClass DeleteFileTaskClass;

#define TYPE_RSYNC_SPACE_CHECK_TASK (rsync_space_check_task_get_type ())
#define RSYNC_SPACE_CHECK_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RSYNC_SPACE_CHECK_TASK, RsyncSpaceCheckTask))
#define RSYNC_SPACE_CHECK_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RSYNC_SPACE_CHECK_TASK, RsyncSpaceCheckTaskClass))
#define IS_RSYNC_SPACE_CHECK_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RSYNC_SPACE_CHECK_TASK))
#define IS_RSYNC_SPACE_CHECK_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RSYNC_SPACE_CHECK_TASK))
#define RSYNC_SPACE_CHECK_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RSYNC_SPACE_CHECK_TASK, RsyncSpaceCheckTaskClass))

typedef struct _RsyncSpaceCheckTask RsyncSpaceCheckTask;
typedef struct _RsyncSpaceCheckTaskClass RsyncSpaceCheckTaskClass;

#define TYPE_SYSTEM_USER (system_user_get_type ())
#define SYSTEM_USER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SYSTEM_USER, SystemUser))
#define SYSTEM_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SYSTEM_USER, SystemUserClass))
#define IS_SYSTEM_USER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SYSTEM_USER))
#define IS_SYSTEM_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SYSTEM_USER))
#define SYSTEM_USER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SYSTEM_USER, SystemUserClass))

typedef struct _SystemUser SystemUser;
typedef struct _SystemUserClass SystemUserClass;

struct _FinishBox {
	GtkBox parent_instance;
	FinishBoxPrivate * priv;
};

struct _FinishBoxClass {
	GtkBoxClass parent_class;
};

struct _FinishBoxPrivate {
	GtkLabel* lbl_header;
	GtkLabel* lbl_message;
	GtkWindow* parent_window;
	gboolean show_notes;
};

struct _Main {
	GObject parent_instance;
	MainPrivate * priv;
	gchar* app_path;
	gchar* share_folder;
	gchar* rsnapshot_conf_path;
	gchar* app_conf_path;
	gchar* app_conf_path_old;
	gchar* app_conf_path_default;
	gboolean first_run;
	gchar* backup_uuid;
	gchar* backup_parent_uuid;
	gboolean btrfs_mode;
	gboolean include_btrfs_home_for_backup;
	gboolean include_btrfs_home_for_restore;
	gboolean stop_cron_emails;
	GeeArrayList* partitions;
	GeeArrayList* exclude_list_user;
	GeeArrayList* exclude_list_default;
	GeeArrayList* exclude_list_default_extra;
	GeeArrayList* exclude_list_home;
	GeeArrayList* exclude_list_restore;
	GeeArrayList* exclude_list_apps;
	GeeArrayList* mount_list;
	GeeArrayList* exclude_app_names;
	SnapshotRepo* repo;
	Device* sys_root;
	Device* sys_boot;
	Device* sys_efi;
	Device* sys_home;
	GeeHashMap* sys_subvolumes;
	gchar* mount_point_restore;
	gchar* mount_point_app;
	LinuxDistro* current_distro;
	gboolean mirror_system;
	gboolean schedule_monthly;
	gboolean schedule_weekly;
	gboolean schedule_daily;
	gboolean schedule_hourly;
	gboolean schedule_boot;
	gint count_monthly;
	gint count_weekly;
	gint count_daily;
	gint count_hourly;
	gint count_boot;
	gchar* app_mode;
	gboolean dry_run;
	gboolean thr_success;
	gboolean thread_restore_running;
	gboolean thread_restore_success;
	gboolean thread_delete_running;
	gboolean thread_delete_success;
	gboolean thread_subvol_info_running;
	gboolean thread_subvol_info_success;
	gint thr_retval;
	gchar* thr_arg1;
	gboolean thr_timeout_active;
	gchar* thr_timeout_cmd;
	gint startup_delay_interval_mins;
	gint retain_snapshots_max_days;
	gchar* log_dir;
	gchar* log_file;
	AppLock* app_lock;
	gchar* date_format;
	GeeArrayList* delete_list;
	Snapshot* snapshot_to_delete;
	Snapshot* snapshot_to_restore;
	gboolean reinstall_grub2;
	gboolean update_initramfs;
	gboolean update_grub;
	gchar* grub_device;
	gboolean use_option_raw;
	gboolean cmd_skip_grub;
	gchar* cmd_grub_device;
	gchar* cmd_target_device;
	gchar* cmd_backup_device;
	gchar* cmd_snapshot;
	gboolean cmd_confirm;
	gboolean cmd_verbose;
	gboolean cmd_scripted;
	gchar* cmd_comments;
	gchar* cmd_tags;
	gboolean* cmd_btrfs_mode;
	gchar* progress_text;
	GtkWindow* parent_window;
	RsyncTask* task;
	DeleteFileTask* delete_file_task;
	RsyncSpaceCheckTask* space_check_task;
	GeeHashMap* current_system_users;
	gchar* users_with_encrypted_home;
	gchar* encrypted_home_dirs;
	gboolean encrypted_home_warning_shown;
	gchar* encrypted_private_dirs;
	gboolean encrypted_private_warning_shown;
};

struct _MainClass {
	GObjectClass parent_class;
};

static gint FinishBox_private_offset;
static gpointer finish_box_parent_class = NULL;
VALA_EXTERN Main* App;

VALA_EXTERN GType finish_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FinishBox, g_object_unref)
VALA_EXTERN FinishBox* finish_box_new (GtkWindow* _parent_window,
                           gboolean _show_notes);
VALA_EXTERN FinishBox* finish_box_construct (GType object_type,
                                 GtkWindow* _parent_window,
                                 gboolean _show_notes);
VALA_EXTERN void tee_jee_logging_log_debug (const gchar* message);
VALA_EXTERN GtkLabel* tee_jee_gtk_helper_add_label_header (GtkBox* box,
                                               const gchar* text,
                                               gboolean large_heading);
VALA_EXTERN GtkLabel* tee_jee_gtk_helper_add_label_scrolled (GtkBox* box,
                                                 const gchar* text,
                                                 gboolean show_border,
                                                 gboolean wrap,
                                                 gint ellipsize_chars);
VALA_EXTERN void finish_box_refresh (FinishBox* self);
VALA_EXTERN GType main_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Main, g_object_unref)
VALA_EXTERN gboolean main_get_scheduled (Main* self);
VALA_EXTERN GType device_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Device, g_object_unref)
VALA_EXTERN GType app_exclude_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppExcludeEntry, g_object_unref)
VALA_EXTERN GType mount_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MountEntry, g_object_unref)
VALA_EXTERN GType snapshot_repo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SnapshotRepo, g_object_unref)
VALA_EXTERN GType subvolume_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Subvolume, g_object_unref)
VALA_EXTERN GType linux_distro_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LinuxDistro, g_object_unref)
VALA_EXTERN GType app_lock_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppLock, g_object_unref)
VALA_EXTERN GType snapshot_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Snapshot, g_object_unref)
VALA_EXTERN GType async_task_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AsyncTask, g_object_unref)
VALA_EXTERN GType rsync_task_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RsyncTask, g_object_unref)
VALA_EXTERN GType delete_file_task_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DeleteFileTask, g_object_unref)
VALA_EXTERN GType rsync_space_check_task_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RsyncSpaceCheckTask, g_object_unref)
VALA_EXTERN GType system_user_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SystemUser, g_object_unref)
static void finish_box_finalize (GObject * obj);
static GType finish_box_get_type_once (void);

static inline gpointer
finish_box_get_instance_private (FinishBox* self)
{
	return G_STRUCT_MEMBER_P (self, FinishBox_private_offset);
}

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

FinishBox*
finish_box_construct (GType object_type,
                      GtkWindow* _parent_window,
                      gboolean _show_notes)
{
	FinishBox * self = NULL;
	GtkWindow* _tmp0_;
	GtkLabel* _tmp3_;
	g_return_val_if_fail (_parent_window != NULL, NULL);
	tee_jee_logging_log_debug ("FinishBox: FinishBox()");
	self = (FinishBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 6, NULL);
	_tmp0_ = _g_object_ref0 (_parent_window);
	_g_object_unref0 (self->priv->parent_window);
	self->priv->parent_window = _tmp0_;
	g_object_set ((GtkWidget*) self, "margin", 12, NULL);
	self->priv->show_notes = _show_notes;
	if (self->priv->show_notes) {
		GtkLabel* _tmp1_;
		_tmp1_ = tee_jee_gtk_helper_add_label_header ((GtkBox*) self, _ ("Notes"), TRUE);
		_g_object_unref0 (self->priv->lbl_header);
		self->priv->lbl_header = _tmp1_;
	} else {
		GtkLabel* _tmp2_;
		_tmp2_ = tee_jee_gtk_helper_add_label_header ((GtkBox*) self, _ ("Setup Complete"), TRUE);
		_g_object_unref0 (self->priv->lbl_header);
		self->priv->lbl_header = _tmp2_;
	}
	_tmp3_ = tee_jee_gtk_helper_add_label_scrolled ((GtkBox*) self, "", FALSE, TRUE, 0);
	_g_object_unref0 (self->priv->lbl_message);
	self->priv->lbl_message = _tmp3_;
	finish_box_refresh (self);
	tee_jee_logging_log_debug ("FinishBox: FinishBox(): exit");
	return self;
}

FinishBox*
finish_box_new (GtkWindow* _parent_window,
                gboolean _show_notes)
{
	return finish_box_construct (TYPE_FINISH_BOX, _parent_window, _show_notes);
}

void
finish_box_refresh (FinishBox* self)
{
	gchar* msg = NULL;
	gchar* _tmp0_;
	gchar* bullet = NULL;
	gchar* _tmp1_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	Main* _tmp26_;
	Main* _tmp41_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	gchar* _tmp70_;
	GtkLabel* _tmp71_;
	const gchar* _tmp72_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("");
	msg = _tmp0_;
	_tmp1_ = g_strdup ("• ");
	bullet = _tmp1_;
	if (!self->priv->show_notes) {
		Main* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = App;
		_tmp3_ = main_get_scheduled (_tmp2_);
		_tmp4_ = _tmp3_;
		if (_tmp4_) {
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp5_ = msg;
			_tmp6_ = bullet;
			_tmp7_ = g_strconcat (_tmp6_, _ ("Scheduled snapshots are enabled. Snapshots will be created automatical" \
"ly for selected levels."), NULL);
			_tmp8_ = _tmp7_;
			_tmp9_ = g_strconcat (_tmp8_, "\n\n", NULL);
			_tmp10_ = _tmp9_;
			_tmp11_ = g_strconcat (_tmp5_, _tmp10_, NULL);
			_g_free0 (msg);
			msg = _tmp11_;
			_g_free0 (_tmp10_);
			_g_free0 (_tmp8_);
		} else {
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			_tmp12_ = msg;
			_tmp13_ = bullet;
			_tmp14_ = g_strconcat (_tmp13_, _ ("Scheduled snapshots are disabled. It's recommended to enable it."), NULL);
			_tmp15_ = _tmp14_;
			_tmp16_ = g_strconcat (_tmp15_, "\n\n", NULL);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strconcat (_tmp12_, _tmp17_, NULL);
			_g_free0 (msg);
			msg = _tmp18_;
			_g_free0 (_tmp17_);
			_g_free0 (_tmp15_);
		}
	}
	_tmp19_ = msg;
	_tmp20_ = bullet;
	_tmp21_ = g_strconcat (_tmp20_, _ ("System can be rolled-back to a previous date by restoring a snapshot."), NULL);
	_tmp22_ = _tmp21_;
	_tmp23_ = g_strconcat (_tmp22_, "\n\n", NULL);
	_tmp24_ = _tmp23_;
	_tmp25_ = g_strconcat (_tmp19_, _tmp24_, NULL);
	_g_free0 (msg);
	msg = _tmp25_;
	_g_free0 (_tmp24_);
	_g_free0 (_tmp22_);
	_tmp26_ = App;
	if (_tmp26_->btrfs_mode) {
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		_tmp27_ = msg;
		_tmp28_ = bullet;
		_tmp29_ = g_strconcat (_tmp28_, _ ("Restoring a snapshot will replace system subvolumes, and system subvol" \
"umes currently in use will be preserved as a new snapshot. If required" \
", this snapshot can be restored later to 'undo' the restore."), NULL);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_strconcat (_tmp30_, "\n\n", NULL);
		_tmp32_ = _tmp31_;
		_tmp33_ = g_strconcat (_tmp27_, _tmp32_, NULL);
		_g_free0 (msg);
		msg = _tmp33_;
		_g_free0 (_tmp32_);
		_g_free0 (_tmp30_);
	} else {
		const gchar* _tmp34_;
		const gchar* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
		_tmp34_ = msg;
		_tmp35_ = bullet;
		_tmp36_ = g_strconcat (_tmp35_, _ ("Restoring snapshots only replaces system files and settings. Non-hidde" \
"n files and directories in user home directories will not be touched. " \
"This behaviour can be changed by adding a filter to include these file" \
"s. Included files will be backed up when snapshot is created, and repl" \
"aced when snapshot is restored."), NULL);
		_tmp37_ = _tmp36_;
		_tmp38_ = g_strconcat (_tmp37_, "\n\n", NULL);
		_tmp39_ = _tmp38_;
		_tmp40_ = g_strconcat (_tmp34_, _tmp39_, NULL);
		_g_free0 (msg);
		msg = _tmp40_;
		_g_free0 (_tmp39_);
		_g_free0 (_tmp37_);
	}
	_tmp41_ = App;
	if (_tmp41_->btrfs_mode) {
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		gchar* _tmp47_;
		gchar* _tmp48_;
		_tmp42_ = msg;
		_tmp43_ = bullet;
		_tmp44_ = g_strconcat (_tmp43_, _ ("BTRFS snapshots are saved on the same disk from which it is created. I" \
"f the system disk fails, snapshots will be lost along with the system." \
" Save snapshots to an external non-system disk in RSYNC mode to guard " \
"against disk failures."), NULL);
		_tmp45_ = _tmp44_;
		_tmp46_ = g_strconcat (_tmp45_, "\n\n", NULL);
		_tmp47_ = _tmp46_;
		_tmp48_ = g_strconcat (_tmp42_, _tmp47_, NULL);
		_g_free0 (msg);
		msg = _tmp48_;
		_g_free0 (_tmp47_);
		_g_free0 (_tmp45_);
	} else {
		const gchar* _tmp49_;
		const gchar* _tmp50_;
		gchar* _tmp51_;
		gchar* _tmp52_;
		gchar* _tmp53_;
		gchar* _tmp54_;
		gchar* _tmp55_;
		const gchar* _tmp56_;
		const gchar* _tmp57_;
		gchar* _tmp58_;
		gchar* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		gchar* _tmp62_;
		_tmp49_ = msg;
		_tmp50_ = bullet;
		_tmp51_ = g_strconcat (_tmp50_, _ ("Save snapshots to an external disk instead of the system disk to guard" \
" against drive failures."), NULL);
		_tmp52_ = _tmp51_;
		_tmp53_ = g_strconcat (_tmp52_, "\n\n", NULL);
		_tmp54_ = _tmp53_;
		_tmp55_ = g_strconcat (_tmp49_, _tmp54_, NULL);
		_g_free0 (msg);
		msg = _tmp55_;
		_g_free0 (_tmp54_);
		_g_free0 (_tmp52_);
		_tmp56_ = msg;
		_tmp57_ = bullet;
		_tmp58_ = g_strconcat (_tmp57_, _ ("Saving snapshots to a non-system disk allows you to format and re-inst" \
"all the OS on the system disk without losing snapshots stored on it. Y" \
"ou can even install another Linux distribution and later roll-back the" \
" previous distribution by restoring a snapshot."), NULL);
		_tmp59_ = _tmp58_;
		_tmp60_ = g_strconcat (_tmp59_, "\n\n", NULL);
		_tmp61_ = _tmp60_;
		_tmp62_ = g_strconcat (_tmp56_, _tmp61_, NULL);
		_g_free0 (msg);
		msg = _tmp62_;
		_g_free0 (_tmp61_);
		_g_free0 (_tmp59_);
	}
	_tmp63_ = msg;
	_tmp64_ = g_strconcat (_tmp63_, "\n", NULL);
	_g_free0 (msg);
	msg = _tmp64_;
	_tmp65_ = msg;
	_tmp66_ = g_strconcat ("<b>", _ ("Close window to exit"), NULL);
	_tmp67_ = _tmp66_;
	_tmp68_ = g_strconcat (_tmp67_, "</b>\n\n", NULL);
	_tmp69_ = _tmp68_;
	_tmp70_ = g_strconcat (_tmp65_, _tmp69_, NULL);
	_g_free0 (msg);
	msg = _tmp70_;
	_g_free0 (_tmp69_);
	_g_free0 (_tmp67_);
	_tmp71_ = self->priv->lbl_message;
	_tmp72_ = msg;
	gtk_label_set_label (_tmp71_, _tmp72_);
	_g_free0 (bullet);
	_g_free0 (msg);
}

static void
finish_box_class_init (FinishBoxClass * klass,
                       gpointer klass_data)
{
	finish_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FinishBox_private_offset);
	G_OBJECT_CLASS (klass)->finalize = finish_box_finalize;
}

static void
finish_box_instance_init (FinishBox * self,
                          gpointer klass)
{
	self->priv = finish_box_get_instance_private (self);
	self->priv->show_notes = TRUE;
}

static void
finish_box_finalize (GObject * obj)
{
	FinishBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FINISH_BOX, FinishBox);
	_g_object_unref0 (self->priv->lbl_header);
	_g_object_unref0 (self->priv->lbl_message);
	_g_object_unref0 (self->priv->parent_window);
	G_OBJECT_CLASS (finish_box_parent_class)->finalize (obj);
}

static GType
finish_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FinishBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) finish_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FinishBox), 0, (GInstanceInitFunc) finish_box_instance_init, NULL };
	GType finish_box_type_id;
	finish_box_type_id = g_type_register_static (gtk_box_get_type (), "FinishBox", &g_define_type_info, 0);
	FinishBox_private_offset = g_type_add_instance_private (finish_box_type_id, sizeof (FinishBoxPrivate));
	return finish_box_type_id;
}

GType
finish_box_get_type (void)
{
	static volatile gsize finish_box_type_id__once = 0;
	if (g_once_init_enter (&finish_box_type_id__once)) {
		GType finish_box_type_id;
		finish_box_type_id = finish_box_get_type_once ();
		g_once_init_leave (&finish_box_type_id__once, finish_box_type_id);
	}
	return finish_box_type_id__once;
}

