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

/*
 * DeleteWindow.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 <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.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_DELETE_WINDOW (delete_window_get_type ())
#define DELETE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_WINDOW, DeleteWindow))
#define DELETE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_WINDOW, DeleteWindowClass))
#define IS_DELETE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_WINDOW))
#define IS_DELETE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_WINDOW))
#define DELETE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_WINDOW, DeleteWindowClass))

typedef struct _DeleteWindow DeleteWindow;
typedef struct _DeleteWindowClass DeleteWindowClass;
typedef struct _DeleteWindowPrivate DeleteWindowPrivate;

#define TYPE_SNAPSHOT_LIST_BOX (snapshot_list_box_get_type ())
#define SNAPSHOT_LIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SNAPSHOT_LIST_BOX, SnapshotListBox))
#define SNAPSHOT_LIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SNAPSHOT_LIST_BOX, SnapshotListBoxClass))
#define IS_SNAPSHOT_LIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SNAPSHOT_LIST_BOX))
#define IS_SNAPSHOT_LIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SNAPSHOT_LIST_BOX))
#define SNAPSHOT_LIST_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SNAPSHOT_LIST_BOX, SnapshotListBoxClass))

typedef struct _SnapshotListBox SnapshotListBox;
typedef struct _SnapshotListBoxClass SnapshotListBoxClass;

#define TYPE_DELETE_BOX (delete_box_get_type ())
#define DELETE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_BOX, DeleteBox))
#define DELETE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_BOX, DeleteBoxClass))
#define IS_DELETE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_BOX))
#define IS_DELETE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_BOX))
#define DELETE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_BOX, DeleteBoxClass))

typedef struct _DeleteBox DeleteBox;
typedef struct _DeleteBoxClass DeleteBoxClass;

#define TYPE_DELETE_FINISH_BOX (delete_finish_box_get_type ())
#define DELETE_FINISH_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_FINISH_BOX, DeleteFinishBox))
#define DELETE_FINISH_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_FINISH_BOX, DeleteFinishBoxClass))
#define IS_DELETE_FINISH_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_FINISH_BOX))
#define IS_DELETE_FINISH_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_FINISH_BOX))
#define DELETE_FINISH_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_FINISH_BOX, DeleteFinishBoxClass))

typedef struct _DeleteFinishBox DeleteFinishBox;
typedef struct _DeleteFinishBoxClass DeleteFinishBoxClass;
enum  {
	DELETE_WINDOW_0_PROPERTY,
	DELETE_WINDOW_NUM_PROPERTIES
};
static GParamSpec* delete_window_properties[DELETE_WINDOW_NUM_PROPERTIES];
typedef enum  {
	DELETE_WINDOW_TABS_SNAPSHOT_LIST = 0,
	DELETE_WINDOW_TABS_DELETE = 1,
	DELETE_WINDOW_TABS_DELETE_FINISH = 2
} DeleteWindowTabs;

#define DELETE_WINDOW_TYPE_TABS (delete_window_tabs_get_type ())
#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;
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;
typedef enum  {
	APP_STATUS_NOT_STARTED,
	APP_STATUS_RUNNING,
	APP_STATUS_PAUSED,
	APP_STATUS_FINISHED,
	APP_STATUS_CANCELLED,
	APP_STATUS_PASSWORD_REQUIRED
} AppStatus;

#define TYPE_APP_STATUS (app_status_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _SnapshotListBoxPrivate SnapshotListBoxPrivate;

struct _DeleteWindow {
	GtkWindow parent_instance;
	DeleteWindowPrivate * priv;
};

struct _DeleteWindowClass {
	GtkWindowClass parent_class;
};

struct _DeleteWindowPrivate {
	GtkBox* vbox_main;
	GtkNotebook* notebook;
	GtkButtonBox* bbox_action;
	SnapshotListBox* snapshot_list_box;
	DeleteBox* delete_box;
	DeleteFinishBox* delete_finish_box;
	GtkButton* btn_prev;
	GtkButton* btn_next;
	GtkButton* btn_hide;
	GtkButton* btn_cancel;
	GtkButton* btn_close;
	guint tmr_init;
	gint def_width;
	gint def_height;
	gboolean success;
};

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

struct _SnapshotListBox {
	GtkBox parent_instance;
	SnapshotListBoxPrivate * priv;
	GtkTreeView* treeview;
};

struct _SnapshotListBoxClass {
	GtkBoxClass parent_class;
};

static gint DeleteWindow_private_offset;
static gpointer delete_window_parent_class = NULL;
VALA_EXTERN Main* App;

VALA_EXTERN GType delete_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DeleteWindow, g_object_unref)
VALA_EXTERN GType snapshot_list_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SnapshotListBox, g_object_unref)
VALA_EXTERN GType delete_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DeleteBox, g_object_unref)
VALA_EXTERN GType delete_finish_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DeleteFinishBox, g_object_unref)
VALA_EXTERN GType delete_window_tabs_get_type (void) G_GNUC_CONST ;
VALA_EXTERN DeleteWindow* delete_window_new (void);
VALA_EXTERN DeleteWindow* delete_window_construct (GType object_type);
VALA_EXTERN void tee_jee_logging_log_debug (const gchar* message);
VALA_EXTERN GdkPixbuf* icon_manager_lookup (const gchar* icon_name,
                                gint icon_size,
                                gboolean symbolic,
                                gboolean use_hardcoded,
                                gint scale);
static gboolean delete_window_on_delete_event (DeleteWindow* self,
                                        GdkEventAny* event);
static gboolean _delete_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                                 GdkEventAny* event,
                                                                 gpointer self);
VALA_EXTERN GtkNotebook* tee_jee_gtk_helper_add_notebook (GtkBox* box,
                                              gboolean show_tabs,
                                              gboolean show_border);
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 (GtkBox* box,
                                        const gchar* text,
                                        gboolean bold,
                                        gboolean italic,
                                        gboolean large);
VALA_EXTERN SnapshotListBox* snapshot_list_box_new (GtkWindow* _parent_window);
VALA_EXTERN SnapshotListBox* snapshot_list_box_construct (GType object_type,
                                              GtkWindow* _parent_window);
VALA_EXTERN void snapshot_list_box_hide_context_menu (SnapshotListBox* self);
VALA_EXTERN DeleteBox* delete_box_new (GtkWindow* _parent_window);
VALA_EXTERN DeleteBox* delete_box_construct (GType object_type,
                                 GtkWindow* _parent_window);
VALA_EXTERN DeleteFinishBox* delete_finish_box_new (GtkWindow* _parent_window);
VALA_EXTERN DeleteFinishBox* delete_finish_box_construct (GType object_type,
                                              GtkWindow* _parent_window);
static void delete_window_create_actions (DeleteWindow* self);
static gboolean delete_window_init_delayed (DeleteWindow* self);
static gboolean _delete_window_init_delayed_gsource_func (gpointer self);
static void delete_window_go_first (DeleteWindow* self);
VALA_EXTERN GtkButton* tee_jee_gtk_helper_add_button (GtkBox* box,
                                          const gchar* text,
                                          const gchar* tooltip,
                                          GtkSizeGroup* size_group,
                                          GtkImage* icon);
static void __lambda87_ (DeleteWindow* self);
static void delete_window_go_prev (DeleteWindow* self);
static void ___lambda87__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda88_ (DeleteWindow* self);
static void delete_window_go_next (DeleteWindow* self);
static void ___lambda88__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda89_ (DeleteWindow* self);
static void ___lambda89__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda90_ (DeleteWindow* self);
static void ___lambda90__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda91_ (DeleteWindow* self);
VALA_EXTERN GType main_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Main, g_object_unref)
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)
VALA_EXTERN GType app_status_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void async_task_stop (AsyncTask* self,
                      AppStatus status_to_update);
static void ___lambda91__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void delete_window_action_buttons_set_no_show_all (DeleteWindow* self,
                                                   gboolean val);
static void delete_window_initialize_tab (DeleteWindow* self);
static gboolean delete_window_validate_current_tab (DeleteWindow* self);
VALA_EXTERN GeeArrayList* snapshot_list_box_selected_snapshots (SnapshotListBox* self);
VALA_EXTERN void tee_jee_logging_log_msg (const gchar* message,
                              gboolean highlight);
VALA_EXTERN void snapshot_list_box_refresh (SnapshotListBox* self);
VALA_EXTERN gboolean delete_box_delete_snapshots (DeleteBox* self);
VALA_EXTERN void delete_finish_box_update_message (DeleteFinishBox* self,
                                       gboolean success);
VALA_EXTERN void tee_jee_gtk_helper_wait_and_close_window (gint milliseconds,
                                               GtkWindow* window);
VALA_EXTERN void tee_jee_gtk_helper_gtk_messagebox (const gchar* title,
                                        const gchar* message,
                                        GtkWindow* parent_win,
                                        gboolean is_error);
static void delete_window_finalize (GObject * obj);
static GType delete_window_get_type_once (void);

static inline gpointer
delete_window_get_instance_private (DeleteWindow* self)
{
	return G_STRUCT_MEMBER_P (self, DeleteWindow_private_offset);
}

static GType
delete_window_tabs_get_type_once (void)
{
	static const GEnumValue values[] = {{DELETE_WINDOW_TABS_SNAPSHOT_LIST, "DELETE_WINDOW_TABS_SNAPSHOT_LIST", "snapshot-list"}, {DELETE_WINDOW_TABS_DELETE, "DELETE_WINDOW_TABS_DELETE", "delete"}, {DELETE_WINDOW_TABS_DELETE_FINISH, "DELETE_WINDOW_TABS_DELETE_FINISH", "delete-finish"}, {0, NULL, NULL}};
	GType delete_window_tabs_type_id;
	delete_window_tabs_type_id = g_enum_register_static ("DeleteWindowTabs", values);
	return delete_window_tabs_type_id;
}

GType
delete_window_tabs_get_type (void)
{
	static volatile gsize delete_window_tabs_type_id__once = 0;
	if (g_once_init_enter (&delete_window_tabs_type_id__once)) {
		GType delete_window_tabs_type_id;
		delete_window_tabs_type_id = delete_window_tabs_get_type_once ();
		g_once_init_leave (&delete_window_tabs_type_id__once, delete_window_tabs_type_id);
	}
	return delete_window_tabs_type_id__once;
}

static gboolean
_delete_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                        GdkEventAny* event,
                                                        gpointer self)
{
	gboolean result;
	result = delete_window_on_delete_event ((DeleteWindow*) self, event);
	return result;
}

static gboolean
_delete_window_init_delayed_gsource_func (gpointer self)
{
	gboolean result;
	result = delete_window_init_delayed ((DeleteWindow*) self);
	return result;
}

DeleteWindow*
delete_window_construct (GType object_type)
{
	DeleteWindow * self = NULL;
	GdkPixbuf* _tmp0_;
	GdkPixbuf* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkNotebook* _tmp6_;
	GtkBox* vbox_tab = NULL;
	GtkBox* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GtkLabel* _tmp11_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp12_;
	SnapshotListBox* _tmp13_;
	SnapshotListBox* _tmp14_;
	SnapshotListBox* _tmp15_;
	SnapshotListBox* _tmp16_;
	GtkNotebook* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	DeleteBox* _tmp20_;
	DeleteBox* _tmp21_;
	GtkNotebook* _tmp22_;
	DeleteBox* _tmp23_;
	GtkLabel* _tmp24_;
	GtkLabel* _tmp25_;
	DeleteFinishBox* _tmp26_;
	DeleteFinishBox* _tmp27_;
	GtkNotebook* _tmp28_;
	DeleteFinishBox* _tmp29_;
	GtkLabel* _tmp30_;
	self = (DeleteWindow*) g_object_new (object_type, NULL);
	tee_jee_logging_log_debug ("DeleteWindow: DeleteWindow()");
	gtk_window_set_title ((GtkWindow*) self, _ ("Delete Snapshots"));
	g_object_set ((GtkWindow*) self, "window-position", GTK_WIN_POS_CENTER, NULL);
	gtk_window_set_modal ((GtkWindow*) self, TRUE);
	gtk_window_set_default_size ((GtkWindow*) self, self->priv->def_width, self->priv->def_height);
	_tmp0_ = icon_manager_lookup ("timeshift", 16, FALSE, FALSE, 1);
	_tmp1_ = _tmp0_;
	gtk_window_set_icon ((GtkWindow*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	g_signal_connect_object ((GtkWidget*) self, "delete-event", (GCallback) _delete_window_on_delete_event_gtk_widget_delete_event, self, 0);
	gtk_window_resize ((GtkWindow*) self, self->priv->def_width, self->priv->def_height);
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->vbox_main);
	self->priv->vbox_main = _tmp2_;
	_tmp3_ = self->priv->vbox_main;
	g_object_set ((GtkWidget*) _tmp3_, "margin", 0, NULL);
	_tmp4_ = self->priv->vbox_main;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->vbox_main;
	_tmp6_ = tee_jee_gtk_helper_add_notebook (_tmp5_, FALSE, FALSE);
	_g_object_unref0 (self->priv->notebook);
	self->priv->notebook = _tmp6_;
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp7_);
	vbox_tab = _tmp7_;
	g_object_set ((GtkWidget*) vbox_tab, "margin", 12, NULL);
	_tmp8_ = tee_jee_gtk_helper_add_label_header (vbox_tab, _ ("Select Snapshots"), TRUE);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp9_);
	_tmp10_ = tee_jee_gtk_helper_add_label (vbox_tab, _ ("Select the snapshots to be deleted"), FALSE, FALSE, FALSE);
	_tmp11_ = _tmp10_;
	_g_object_unref0 (_tmp11_);
	_tmp12_ = (GtkLabel*) gtk_label_new (_ ("Snapshots"));
	g_object_ref_sink (_tmp12_);
	label = _tmp12_;
	_tmp13_ = snapshot_list_box_new ((GtkWindow*) self);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->snapshot_list_box);
	self->priv->snapshot_list_box = _tmp13_;
	_tmp14_ = self->priv->snapshot_list_box;
	snapshot_list_box_hide_context_menu (_tmp14_);
	_tmp15_ = self->priv->snapshot_list_box;
	g_object_set ((GtkWidget*) _tmp15_, "margin", 0, NULL);
	_tmp16_ = self->priv->snapshot_list_box;
	gtk_container_add ((GtkContainer*) vbox_tab, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->notebook;
	_tmp18_ = label;
	gtk_notebook_append_page (_tmp17_, (GtkWidget*) vbox_tab, (GtkWidget*) _tmp18_);
	_tmp19_ = (GtkLabel*) gtk_label_new (_ ("Delete"));
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (label);
	label = _tmp19_;
	_tmp20_ = delete_box_new ((GtkWindow*) self);
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->delete_box);
	self->priv->delete_box = _tmp20_;
	_tmp21_ = self->priv->delete_box;
	g_object_set ((GtkWidget*) _tmp21_, "margin", 12, NULL);
	_tmp22_ = self->priv->notebook;
	_tmp23_ = self->priv->delete_box;
	_tmp24_ = label;
	gtk_notebook_append_page (_tmp22_, (GtkWidget*) _tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = (GtkLabel*) gtk_label_new (_ ("Finish"));
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (label);
	label = _tmp25_;
	_tmp26_ = delete_finish_box_new ((GtkWindow*) self);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->delete_finish_box);
	self->priv->delete_finish_box = _tmp26_;
	_tmp27_ = self->priv->delete_finish_box;
	g_object_set ((GtkWidget*) _tmp27_, "margin", 12, NULL);
	_tmp28_ = self->priv->notebook;
	_tmp29_ = self->priv->delete_finish_box;
	_tmp30_ = label;
	gtk_notebook_append_page (_tmp28_, (GtkWidget*) _tmp29_, (GtkWidget*) _tmp30_);
	delete_window_create_actions (self);
	gtk_widget_show_all ((GtkWidget*) self);
	self->priv->tmr_init = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, _delete_window_init_delayed_gsource_func, g_object_ref (self), g_object_unref);
	tee_jee_logging_log_debug ("DeleteWindow: DeleteWindow(): exit");
	_g_object_unref0 (label);
	_g_object_unref0 (vbox_tab);
	return self;
}

DeleteWindow*
delete_window_new (void)
{
	return delete_window_construct (TYPE_DELETE_WINDOW);
}

static gboolean
delete_window_init_delayed (DeleteWindow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->tmr_init > ((guint) 0)) {
		g_source_remove (self->priv->tmr_init);
		self->priv->tmr_init = (guint) 0;
	}
	delete_window_go_first (self);
	result = FALSE;
	return result;
}

static gboolean
delete_window_on_delete_event (DeleteWindow* self,
                               GdkEventAny* event)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	result = FALSE;
	return result;
}

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

static void
__lambda87_ (DeleteWindow* self)
{
	delete_window_go_prev (self);
}

static void
___lambda87__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda87_ ((DeleteWindow*) self);
}

static void
__lambda88_ (DeleteWindow* self)
{
	delete_window_go_next (self);
}

static void
___lambda88__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda88_ ((DeleteWindow*) self);
}

static void
__lambda89_ (DeleteWindow* self)
{
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda89__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda89_ ((DeleteWindow*) self);
}

static void
__lambda90_ (DeleteWindow* self)
{
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda90__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda90_ ((DeleteWindow*) self);
}

static void
__lambda91_ (DeleteWindow* self)
{
	Main* _tmp0_;
	GeeArrayList* _tmp1_;
	Main* _tmp2_;
	DeleteFileTask* _tmp3_;
	_tmp0_ = App;
	_tmp1_ = _tmp0_->delete_list;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp1_);
	_tmp2_ = App;
	_tmp3_ = _tmp2_->delete_file_task;
	if (_tmp3_ != NULL) {
		Main* _tmp4_;
		DeleteFileTask* _tmp5_;
		_tmp4_ = App;
		_tmp5_ = _tmp4_->delete_file_task;
		async_task_stop ((AsyncTask*) _tmp5_, APP_STATUS_CANCELLED);
	}
	gtk_widget_destroy ((GtkWidget*) self);
}

static void
___lambda91__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda91_ ((DeleteWindow*) self);
}

static void
delete_window_create_actions (DeleteWindow* self)
{
	GtkBox* hbox = NULL;
	GtkBox* _tmp0_;
	GtkBox* _tmp1_;
	GtkButtonBox* bbox = NULL;
	GtkButtonBox* _tmp2_;
	GtkButtonBox* _tmp3_;
	GtkSizeGroup* size_group = NULL;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp0_);
	hbox = _tmp0_;
	_tmp1_ = self->priv->vbox_main;
	gtk_container_add ((GtkContainer*) _tmp1_, (GtkWidget*) hbox);
	_tmp2_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp2_);
	bbox = _tmp2_;
	g_object_set ((GtkWidget*) bbox, "margin", 12, NULL);
	gtk_box_set_spacing ((GtkBox*) bbox, 6);
	gtk_widget_set_hexpand ((GtkWidget*) bbox, TRUE);
	gtk_container_add ((GtkContainer*) hbox, (GtkWidget*) bbox);
	_tmp3_ = _g_object_ref0 (bbox);
	_g_object_unref0 (self->priv->bbox_action);
	self->priv->bbox_action = _tmp3_;
	gtk_button_box_set_layout (bbox, GTK_BUTTONBOX_CENTER);
	size_group = NULL;
	_tmp4_ = tee_jee_gtk_helper_add_button ((GtkBox*) bbox, _ ("Previous"), "", size_group, NULL);
	_g_object_unref0 (self->priv->btn_prev);
	self->priv->btn_prev = _tmp4_;
	_tmp5_ = self->priv->btn_prev;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) ___lambda87__gtk_button_clicked, self, 0);
	_tmp6_ = tee_jee_gtk_helper_add_button ((GtkBox*) bbox, _ ("Next"), "", size_group, NULL);
	_g_object_unref0 (self->priv->btn_next);
	self->priv->btn_next = _tmp6_;
	_tmp7_ = self->priv->btn_next;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) ___lambda88__gtk_button_clicked, self, 0);
	_tmp8_ = tee_jee_gtk_helper_add_button ((GtkBox*) bbox, _ ("Close"), "", size_group, NULL);
	_g_object_unref0 (self->priv->btn_close);
	self->priv->btn_close = _tmp8_;
	_tmp9_ = self->priv->btn_close;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) ___lambda89__gtk_button_clicked, self, 0);
	_tmp10_ = tee_jee_gtk_helper_add_button ((GtkBox*) bbox, _ ("Hide"), "", size_group, NULL);
	_g_object_unref0 (self->priv->btn_hide);
	self->priv->btn_hide = _tmp10_;
	_tmp11_ = self->priv->btn_hide;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, _ ("Hide this window (files will be deleted in background)"));
	_tmp12_ = self->priv->btn_hide;
	g_signal_connect_object (_tmp12_, "clicked", (GCallback) ___lambda90__gtk_button_clicked, self, 0);
	_tmp13_ = tee_jee_gtk_helper_add_button ((GtkBox*) bbox, _ ("Cancel"), "", size_group, NULL);
	_g_object_unref0 (self->priv->btn_cancel);
	self->priv->btn_cancel = _tmp13_;
	_tmp14_ = self->priv->btn_cancel;
	g_signal_connect_object (_tmp14_, "clicked", (GCallback) ___lambda91__gtk_button_clicked, self, 0);
	_tmp15_ = self->priv->btn_prev;
	_tmp16_ = self->priv->btn_next;
	_tmp17_ = self->priv->btn_cancel;
	_tmp18_ = self->priv->btn_close;
	_tmp19_ = self->priv->btn_hide;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp19_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp18_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
	delete_window_action_buttons_set_no_show_all (self, TRUE);
	_g_object_unref0 (size_group);
	_g_object_unref0 (bbox);
	_g_object_unref0 (hbox);
}

static void
delete_window_action_buttons_set_no_show_all (DeleteWindow* self,
                                              gboolean val)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->btn_prev;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp0_, val);
	_tmp1_ = self->priv->btn_next;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp1_, val);
	_tmp2_ = self->priv->btn_hide;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp2_, val);
	_tmp3_ = self->priv->btn_close;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp3_, val);
	_tmp4_ = self->priv->btn_cancel;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp4_, val);
}

static void
delete_window_go_first (DeleteWindow* self)
{
	gboolean _tmp0_ = FALSE;
	Main* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp1_ = App;
	_tmp2_ = _tmp1_->delete_list;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == 0) {
		Main* _tmp5_;
		_tmp5_ = App;
		_tmp0_ = !_tmp5_->thread_delete_running;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkNotebook* _tmp6_;
		_tmp6_ = self->priv->notebook;
		g_object_set (_tmp6_, "page", (gint) DELETE_WINDOW_TABS_SNAPSHOT_LIST, NULL);
	} else {
		GtkNotebook* _tmp7_;
		_tmp7_ = self->priv->notebook;
		g_object_set (_tmp7_, "page", (gint) DELETE_WINDOW_TABS_DELETE, NULL);
	}
	delete_window_initialize_tab (self);
}

static void
delete_window_go_prev (DeleteWindow* self)
{
	GtkNotebook* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notebook;
	g_object_get (_tmp0_, "page", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case DELETE_WINDOW_TABS_SNAPSHOT_LIST:
		case DELETE_WINDOW_TABS_DELETE:
		{
			break;
		}
		default:
		break;
	}
	delete_window_initialize_tab (self);
}

static void
delete_window_go_next (DeleteWindow* self)
{
	GtkNotebook* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	if (!delete_window_validate_current_tab (self)) {
		return;
	}
	_tmp0_ = self->priv->notebook;
	g_object_get (_tmp0_, "page", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case DELETE_WINDOW_TABS_SNAPSHOT_LIST:
		{
			Main* _tmp3_;
			SnapshotListBox* _tmp4_;
			GeeArrayList* _tmp5_;
			GtkNotebook* _tmp6_;
			_tmp3_ = App;
			_tmp4_ = self->priv->snapshot_list_box;
			_tmp5_ = snapshot_list_box_selected_snapshots (_tmp4_);
			_g_object_unref0 (_tmp3_->delete_list);
			_tmp3_->delete_list = _tmp5_;
			_tmp6_ = self->priv->notebook;
			g_object_set (_tmp6_, "page", (gint) DELETE_WINDOW_TABS_DELETE, NULL);
			break;
		}
		case DELETE_WINDOW_TABS_DELETE:
		{
			GtkNotebook* _tmp7_;
			_tmp7_ = self->priv->notebook;
			g_object_set (_tmp7_, "page", (gint) DELETE_WINDOW_TABS_DELETE_FINISH, NULL);
			break;
		}
		case DELETE_WINDOW_TABS_DELETE_FINISH:
		{
			gtk_widget_destroy ((GtkWidget*) self);
			break;
		}
		default:
		break;
	}
	delete_window_initialize_tab (self);
}

static void
delete_window_initialize_tab (DeleteWindow* self)
{
	GtkNotebook* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GtkNotebook* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkNotebook* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	GtkNotebook* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notebook;
	g_object_get (_tmp0_, "page", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	if (_tmp2_ < 0) {
		return;
	}
	tee_jee_logging_log_msg ("", FALSE);
	_tmp3_ = self->priv->notebook;
	g_object_get (_tmp3_, "page", &_tmp4_, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("page: %d", _tmp5_);
	_tmp7_ = _tmp6_;
	tee_jee_logging_log_debug (_tmp7_);
	_g_free0 (_tmp7_);
	delete_window_action_buttons_set_no_show_all (self, FALSE);
	_tmp8_ = self->priv->notebook;
	g_object_get (_tmp8_, "page", &_tmp9_, NULL);
	_tmp10_ = _tmp9_;
	switch (_tmp10_) {
		case DELETE_WINDOW_TABS_DELETE:
		{
			GtkButton* _tmp11_;
			GtkButton* _tmp12_;
			GtkButton* _tmp13_;
			GtkButton* _tmp14_;
			GtkButton* _tmp15_;
			_tmp11_ = self->priv->btn_prev;
			gtk_widget_hide ((GtkWidget*) _tmp11_);
			_tmp12_ = self->priv->btn_next;
			gtk_widget_hide ((GtkWidget*) _tmp12_);
			_tmp13_ = self->priv->btn_close;
			gtk_widget_hide ((GtkWidget*) _tmp13_);
			_tmp14_ = self->priv->btn_hide;
			gtk_widget_show ((GtkWidget*) _tmp14_);
			_tmp15_ = self->priv->btn_cancel;
			gtk_widget_show ((GtkWidget*) _tmp15_);
			break;
		}
		case DELETE_WINDOW_TABS_SNAPSHOT_LIST:
		{
			GtkButton* _tmp16_;
			GtkButton* _tmp17_;
			GtkButton* _tmp18_;
			GtkButton* _tmp19_;
			GtkButton* _tmp20_;
			GtkButton* _tmp21_;
			GtkButton* _tmp22_;
			GtkButton* _tmp23_;
			_tmp16_ = self->priv->btn_prev;
			gtk_widget_show ((GtkWidget*) _tmp16_);
			_tmp17_ = self->priv->btn_next;
			gtk_widget_show ((GtkWidget*) _tmp17_);
			_tmp18_ = self->priv->btn_close;
			gtk_widget_show ((GtkWidget*) _tmp18_);
			_tmp19_ = self->priv->btn_hide;
			gtk_widget_hide ((GtkWidget*) _tmp19_);
			_tmp20_ = self->priv->btn_cancel;
			gtk_widget_hide ((GtkWidget*) _tmp20_);
			_tmp21_ = self->priv->btn_prev;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp21_, FALSE);
			_tmp22_ = self->priv->btn_next;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, TRUE);
			_tmp23_ = self->priv->btn_close;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp23_, TRUE);
			break;
		}
		case DELETE_WINDOW_TABS_DELETE_FINISH:
		{
			GtkButton* _tmp24_;
			GtkButton* _tmp25_;
			GtkButton* _tmp26_;
			GtkButton* _tmp27_;
			GtkButton* _tmp28_;
			_tmp24_ = self->priv->btn_prev;
			gtk_widget_hide ((GtkWidget*) _tmp24_);
			_tmp25_ = self->priv->btn_next;
			gtk_widget_hide ((GtkWidget*) _tmp25_);
			_tmp26_ = self->priv->btn_close;
			gtk_widget_show ((GtkWidget*) _tmp26_);
			_tmp27_ = self->priv->btn_hide;
			gtk_widget_hide ((GtkWidget*) _tmp27_);
			_tmp28_ = self->priv->btn_cancel;
			gtk_widget_hide ((GtkWidget*) _tmp28_);
			break;
		}
		default:
		break;
	}
	_tmp29_ = self->priv->notebook;
	g_object_get (_tmp29_, "page", &_tmp30_, NULL);
	_tmp31_ = _tmp30_;
	switch (_tmp31_) {
		case DELETE_WINDOW_TABS_SNAPSHOT_LIST:
		{
			SnapshotListBox* _tmp32_;
			_tmp32_ = self->priv->snapshot_list_box;
			snapshot_list_box_refresh (_tmp32_);
			break;
		}
		case DELETE_WINDOW_TABS_DELETE:
		{
			DeleteBox* _tmp33_;
			_tmp33_ = self->priv->delete_box;
			self->priv->success = delete_box_delete_snapshots (_tmp33_);
			delete_window_go_next (self);
			break;
		}
		case DELETE_WINDOW_TABS_DELETE_FINISH:
		{
			DeleteFinishBox* _tmp34_;
			_tmp34_ = self->priv->delete_finish_box;
			delete_finish_box_update_message (_tmp34_, self->priv->success);
			tee_jee_gtk_helper_wait_and_close_window (1000, (GtkWindow*) self);
			break;
		}
		default:
		break;
	}
}

static gboolean
delete_window_validate_current_tab (DeleteWindow* self)
{
	GtkNotebook* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->notebook;
	g_object_get (_tmp0_, "page", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case DELETE_WINDOW_TABS_SNAPSHOT_LIST:
		{
			GtkTreeSelection* sel = NULL;
			SnapshotListBox* _tmp3_;
			GtkTreeView* _tmp4_;
			GtkTreeSelection* _tmp5_;
			GtkTreeSelection* _tmp6_;
			GtkTreeSelection* _tmp7_;
			_tmp3_ = self->priv->snapshot_list_box;
			_tmp4_ = _tmp3_->treeview;
			_tmp5_ = gtk_tree_view_get_selection (_tmp4_);
			_tmp6_ = _g_object_ref0 (_tmp5_);
			sel = _tmp6_;
			_tmp7_ = sel;
			if (gtk_tree_selection_count_selected_rows (_tmp7_) == 0) {
				tee_jee_gtk_helper_gtk_messagebox (_ ("No Snapshots Selected"), _ ("Select snapshots to delete"), (GtkWindow*) self, FALSE);
				result = FALSE;
				_g_object_unref0 (sel);
				return result;
			} else {
				result = TRUE;
				_g_object_unref0 (sel);
				return result;
			}
			_g_object_unref0 (sel);
		}
		default:
		{
			result = TRUE;
			return result;
		}
	}
}

static void
delete_window_class_init (DeleteWindowClass * klass,
                          gpointer klass_data)
{
	delete_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DeleteWindow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = delete_window_finalize;
}

static void
delete_window_instance_init (DeleteWindow * self,
                             gpointer klass)
{
	self->priv = delete_window_get_instance_private (self);
	self->priv->def_width = 500;
	self->priv->def_height = 500;
	self->priv->success = FALSE;
}

static void
delete_window_finalize (GObject * obj)
{
	DeleteWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DELETE_WINDOW, DeleteWindow);
	_g_object_unref0 (self->priv->vbox_main);
	_g_object_unref0 (self->priv->notebook);
	_g_object_unref0 (self->priv->bbox_action);
	_g_object_unref0 (self->priv->snapshot_list_box);
	_g_object_unref0 (self->priv->delete_box);
	_g_object_unref0 (self->priv->delete_finish_box);
	_g_object_unref0 (self->priv->btn_prev);
	_g_object_unref0 (self->priv->btn_next);
	_g_object_unref0 (self->priv->btn_hide);
	_g_object_unref0 (self->priv->btn_cancel);
	_g_object_unref0 (self->priv->btn_close);
	G_OBJECT_CLASS (delete_window_parent_class)->finalize (obj);
}

static GType
delete_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DeleteWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) delete_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DeleteWindow), 0, (GInstanceInitFunc) delete_window_instance_init, NULL };
	GType delete_window_type_id;
	delete_window_type_id = g_type_register_static (gtk_window_get_type (), "DeleteWindow", &g_define_type_info, 0);
	DeleteWindow_private_offset = g_type_add_instance_private (delete_window_type_id, sizeof (DeleteWindowPrivate));
	return delete_window_type_id;
}

GType
delete_window_get_type (void)
{
	static volatile gsize delete_window_type_id__once = 0;
	if (g_once_init_enter (&delete_window_type_id__once)) {
		GType delete_window_type_id;
		delete_window_type_id = delete_window_get_type_once ();
		g_once_init_leave (&delete_window_type_id__once, delete_window_type_id);
	}
	return delete_window_type_id__once;
}

