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

/*
 * UsersBox.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_USERS_BOX (users_box_get_type ())
#define USERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USERS_BOX, UsersBox))
#define USERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USERS_BOX, UsersBoxClass))
#define IS_USERS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USERS_BOX))
#define IS_USERS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USERS_BOX))
#define USERS_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USERS_BOX, UsersBoxClass))

typedef struct _UsersBox UsersBox;
typedef struct _UsersBoxClass UsersBoxClass;
typedef struct _UsersBoxPrivate UsersBoxPrivate;

#define TYPE_EXCLUDE_BOX (exclude_box_get_type ())
#define EXCLUDE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXCLUDE_BOX, ExcludeBox))
#define EXCLUDE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXCLUDE_BOX, ExcludeBoxClass))
#define IS_EXCLUDE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXCLUDE_BOX))
#define IS_EXCLUDE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXCLUDE_BOX))
#define EXCLUDE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXCLUDE_BOX, ExcludeBoxClass))

typedef struct _ExcludeBox ExcludeBox;
typedef struct _ExcludeBoxClass ExcludeBoxClass;
enum  {
	USERS_BOX_0_PROPERTY,
	USERS_BOX_NUM_PROPERTIES
};
static GParamSpec* users_box_properties[USERS_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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 struct _SystemUserPrivate SystemUserPrivate;
#define _g_free0(var) (var = (g_free (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;

struct _UsersBox {
	GtkBox parent_instance;
	UsersBoxPrivate * priv;
};

struct _UsersBoxClass {
	GtkBoxClass parent_class;
};

struct _UsersBoxPrivate {
	GtkTreeView* treeview;
	GtkScrolledWindow* scrolled_treeview;
	GtkWindow* parent_window;
	ExcludeBox* exclude_box;
	GtkBox* box_btrfs;
	GtkLabel* lbl_message;
	GtkCheckButton* chk_include_btrfs_home;
	gboolean restore_mode;
};

struct _SystemUser {
	GObject parent_instance;
	SystemUserPrivate * priv;
	gchar* name;
	gchar* password;
	gint uid;
	gint gid;
	gchar* user_info;
	gchar* home_path;
	gchar* shell_path;
	gchar* full_name;
	gchar* room_num;
	gchar* phone_work;
	gchar* phone_home;
	gchar* other_info;
	gboolean has_encrypted_home;
	gboolean has_encrypted_private_dirs;
	GeeArrayList* encrypted_dirs;
	GeeArrayList* encrypted_private_dirs;
	gboolean is_selected;
};

struct _SystemUserClass {
	GObjectClass parent_class;
};

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 UsersBox_private_offset;
static gpointer users_box_parent_class = NULL;
VALA_EXTERN Main* App;

VALA_EXTERN GType users_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UsersBox, g_object_unref)
VALA_EXTERN GType exclude_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ExcludeBox, g_object_unref)
VALA_EXTERN UsersBox* users_box_new (GtkWindow* _parent_window,
                         ExcludeBox* _exclude_box,
                         gboolean _restore_mode);
VALA_EXTERN UsersBox* users_box_construct (GType object_type,
                               GtkWindow* _parent_window,
                               ExcludeBox* _exclude_box,
                               gboolean _restore_mode);
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 (GtkBox* box,
                                        const gchar* text,
                                        gboolean bold,
                                        gboolean italic,
                                        gboolean large);
static void users_box_init_treeview (UsersBox* self);
static void users_box_init_btrfs_home_option (UsersBox* self,
                                       GtkBox* box);
VALA_EXTERN void users_box_refresh (UsersBox* self);
static void __lambda75_ (UsersBox* self,
                  GtkCellLayout* cell_layout,
                  GtkCellRenderer* cell,
                  GtkTreeModel* model,
                  GtkTreeIter* iter);
VALA_EXTERN GType system_user_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SystemUser, g_object_unref)
static void ___lambda75__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                             GtkCellRenderer* cell,
                                             GtkTreeModel* tree_model,
                                             GtkTreeIter* iter,
                                             gpointer self);
static void __lambda76_ (UsersBox* self,
                  GtkCellLayout* cell_layout,
                  GtkCellRenderer* cell,
                  GtkTreeModel* model,
                  GtkTreeIter* iter);
static void ___lambda76__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                             GtkCellRenderer* cell,
                                             GtkTreeModel* tree_model,
                                             GtkTreeIter* iter,
                                             gpointer self);
static void __lambda77_ (UsersBox* self,
                  GtkCellRendererToggle* cell,
                  const gchar* path);
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)
static void users_box_refresh_treeview (UsersBox* self);
static void ___lambda77__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                                    const gchar* path,
                                                    gpointer self);
static void __lambda78_ (UsersBox* self,
                  GtkCellRendererToggle* cell,
                  const gchar* path);
VALA_EXTERN void tee_jee_gtk_helper_gtk_messagebox (const gchar* title,
                                        const gchar* message,
                                        GtkWindow* parent_win,
                                        gboolean is_error);
static void ___lambda78__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                                    const gchar* path,
                                                    gpointer self);
static void __lambda79_ (UsersBox* self,
                  GtkCellRendererToggle* cell,
                  const gchar* path);
static void ___lambda79__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                                    const gchar* path,
                                                    gpointer self);
static void ___lambda80_ (UsersBox* self);
static void ____lambda80__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
static void ___lambda81_ (UsersBox* self);
static void ____lambda81__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
VALA_EXTERN gboolean system_user_get_is_system (SystemUser* self);
VALA_EXTERN void exclude_box_refresh_treeview (ExcludeBox* self);
static void users_box_finalize (GObject * obj);
static GType users_box_get_type_once (void);

static inline gpointer
users_box_get_instance_private (UsersBox* self)
{
	return G_STRUCT_MEMBER_P (self, UsersBox_private_offset);
}

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

UsersBox*
users_box_construct (GType object_type,
                     GtkWindow* _parent_window,
                     ExcludeBox* _exclude_box,
                     gboolean _restore_mode)
{
	UsersBox * self = NULL;
	GtkWindow* _tmp0_;
	ExcludeBox* _tmp1_;
	GtkBox* box = NULL;
	GtkBox* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	g_return_val_if_fail (_parent_window != NULL, NULL);
	g_return_val_if_fail (_exclude_box != NULL, NULL);
	tee_jee_logging_log_debug ("UsersBox: UsersBox()");
	self = (UsersBox*) 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->restore_mode = _restore_mode;
	_tmp1_ = _g_object_ref0 (_exclude_box);
	_g_object_unref0 (self->priv->exclude_box);
	self->priv->exclude_box = _tmp1_;
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp2_);
	box = _tmp2_;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) box);
	_tmp3_ = tee_jee_gtk_helper_add_label_header ((GtkBox*) self, _ ("User Home Directories"), TRUE);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_tmp5_ = tee_jee_gtk_helper_add_label ((GtkBox*) self, _ ("User home directories are excluded by default unless you enable them h" \
"ere"), FALSE, TRUE, FALSE);
	label = _tmp5_;
	_tmp6_ = _g_object_ref0 (label);
	_g_object_unref0 (self->priv->lbl_message);
	self->priv->lbl_message = _tmp6_;
	users_box_init_treeview (self);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->box_btrfs);
	self->priv->box_btrfs = _tmp7_;
	_tmp8_ = self->priv->box_btrfs;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp8_);
	_tmp9_ = self->priv->box_btrfs;
	users_box_init_btrfs_home_option (self, _tmp9_);
	users_box_refresh (self);
	tee_jee_logging_log_debug ("UsersBox: UsersBox(): exit");
	_g_object_unref0 (label);
	_g_object_unref0 (box);
	return self;
}

UsersBox*
users_box_new (GtkWindow* _parent_window,
               ExcludeBox* _exclude_box,
               gboolean _restore_mode)
{
	return users_box_construct (TYPE_USERS_BOX, _parent_window, _exclude_box, _restore_mode);
}

static void
__lambda75_ (UsersBox* self,
             GtkCellLayout* cell_layout,
             GtkCellRenderer* cell,
             GtkTreeModel* model,
             GtkTreeIter* iter)
{
	SystemUser* user = NULL;
	GtkTreeIter _tmp0_;
	SystemUser* _tmp1_ = NULL;
	const gchar* _tmp2_;
	g_return_if_fail (cell_layout != NULL);
	g_return_if_fail (cell != NULL);
	g_return_if_fail (model != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = *iter;
	gtk_tree_model_get (model, &_tmp0_, 0, &_tmp1_, -1);
	_g_object_unref0 (user);
	user = _tmp1_;
	_tmp2_ = user->name;
	g_object_set (G_TYPE_CHECK_INSTANCE_CAST (cell, gtk_cell_renderer_text_get_type (), GtkCellRendererText), "text", _tmp2_, NULL);
	_g_object_unref0 (user);
}

static void
___lambda75__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                        GtkCellRenderer* cell,
                                        GtkTreeModel* tree_model,
                                        GtkTreeIter* iter,
                                        gpointer self)
{
	__lambda75_ ((UsersBox*) self, cell_layout, cell, tree_model, iter);
}

static void
__lambda76_ (UsersBox* self,
             GtkCellLayout* cell_layout,
             GtkCellRenderer* cell,
             GtkTreeModel* model,
             GtkTreeIter* iter)
{
	SystemUser* user = NULL;
	GtkTreeIter _tmp0_;
	SystemUser* _tmp1_ = NULL;
	const gchar* _tmp2_;
	g_return_if_fail (cell_layout != NULL);
	g_return_if_fail (cell != NULL);
	g_return_if_fail (model != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = *iter;
	gtk_tree_model_get (model, &_tmp0_, 0, &_tmp1_, -1);
	_g_object_unref0 (user);
	user = _tmp1_;
	_tmp2_ = user->home_path;
	g_object_set (G_TYPE_CHECK_INSTANCE_CAST (cell, gtk_cell_renderer_text_get_type (), GtkCellRendererText), "text", _tmp2_, NULL);
	_g_object_unref0 (user);
}

static void
___lambda76__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                        GtkCellRenderer* cell,
                                        GtkTreeModel* tree_model,
                                        GtkTreeIter* iter,
                                        gpointer self)
{
	__lambda76_ ((UsersBox*) self, cell_layout, cell, tree_model, iter);
}

static void
__lambda77_ (UsersBox* self,
             GtkCellRendererToggle* cell,
             const gchar* path)
{
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gboolean enabled = FALSE;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gboolean _tmp8_ = FALSE;
	SystemUser* user = NULL;
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	SystemUser* _tmp11_ = NULL;
	gchar* exc_pattern = NULL;
	SystemUser* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* inc_pattern = NULL;
	SystemUser* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* inc_hidden_pattern = NULL;
	SystemUser* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	SystemUser* _tmp21_;
	g_return_if_fail (cell != NULL);
	g_return_if_fail (path != NULL);
	tee_jee_logging_log_debug ("cell_exclude.toggled()");
	_tmp0_ = self->priv->treeview;
	_tmp1_ = gtk_tree_view_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_list_store_get_type (), GtkListStore));
	model = _tmp3_;
	_tmp4_ = model;
	gtk_tree_model_get_iter_from_string ((GtkTreeModel*) _tmp4_, &_tmp5_, path);
	iter = _tmp5_;
	_tmp6_ = model;
	_tmp7_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 3, &_tmp8_, -1);
	enabled = _tmp8_;
	_tmp9_ = model;
	_tmp10_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp9_, &_tmp10_, 0, &_tmp11_, -1);
	_g_object_unref0 (user);
	user = _tmp11_;
	_tmp12_ = user;
	_tmp13_ = _tmp12_->home_path;
	_tmp14_ = g_strdup_printf ("%s/**", _tmp13_);
	exc_pattern = _tmp14_;
	_tmp15_ = user;
	_tmp16_ = _tmp15_->home_path;
	_tmp17_ = g_strdup_printf ("+ %s/**", _tmp16_);
	inc_pattern = _tmp17_;
	_tmp18_ = user;
	_tmp19_ = _tmp18_->home_path;
	_tmp20_ = g_strdup_printf ("+ %s/.**", _tmp19_);
	inc_hidden_pattern = _tmp20_;
	_tmp21_ = user;
	if (_tmp21_->has_encrypted_home) {
		SystemUser* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		SystemUser* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp22_ = user;
		_tmp23_ = _tmp22_->name;
		_tmp24_ = g_strdup_printf ("+ /home/.ecryptfs/%s/***", _tmp23_);
		_g_free0 (inc_pattern);
		inc_pattern = _tmp24_;
		_tmp25_ = user;
		_tmp26_ = _tmp25_->name;
		_tmp27_ = g_strdup_printf ("/home/.ecryptfs/%s/***", _tmp26_);
		_g_free0 (exc_pattern);
		exc_pattern = _tmp27_;
	}
	enabled = !enabled;
	if (enabled) {
		Main* _tmp28_;
		GeeArrayList* _tmp29_;
		const gchar* _tmp30_;
		Main* _tmp34_;
		GeeArrayList* _tmp35_;
		const gchar* _tmp36_;
		Main* _tmp40_;
		GeeArrayList* _tmp41_;
		const gchar* _tmp42_;
		_tmp28_ = App;
		_tmp29_ = _tmp28_->exclude_list_user;
		_tmp30_ = exc_pattern;
		if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp29_, _tmp30_)) {
			Main* _tmp31_;
			GeeArrayList* _tmp32_;
			const gchar* _tmp33_;
			_tmp31_ = App;
			_tmp32_ = _tmp31_->exclude_list_user;
			_tmp33_ = exc_pattern;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_);
		}
		_tmp34_ = App;
		_tmp35_ = _tmp34_->exclude_list_user;
		_tmp36_ = inc_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp35_, _tmp36_)) {
			Main* _tmp37_;
			GeeArrayList* _tmp38_;
			const gchar* _tmp39_;
			_tmp37_ = App;
			_tmp38_ = _tmp37_->exclude_list_user;
			_tmp39_ = inc_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp38_, _tmp39_);
		}
		_tmp40_ = App;
		_tmp41_ = _tmp40_->exclude_list_user;
		_tmp42_ = inc_hidden_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp41_, _tmp42_)) {
			Main* _tmp43_;
			GeeArrayList* _tmp44_;
			const gchar* _tmp45_;
			_tmp43_ = App;
			_tmp44_ = _tmp43_->exclude_list_user;
			_tmp45_ = inc_hidden_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp44_, _tmp45_);
		}
	}
	users_box_refresh_treeview (self);
	_g_free0 (inc_hidden_pattern);
	_g_free0 (inc_pattern);
	_g_free0 (exc_pattern);
	_g_object_unref0 (user);
	_g_object_unref0 (model);
}

static void
___lambda77__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                               const gchar* path,
                                               gpointer self)
{
	__lambda77_ ((UsersBox*) self, _sender, path);
}

static void
__lambda78_ (UsersBox* self,
             GtkCellRendererToggle* cell,
             const gchar* path)
{
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gboolean enabled = FALSE;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gboolean _tmp8_ = FALSE;
	SystemUser* user = NULL;
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	SystemUser* _tmp11_ = NULL;
	gchar* exc_pattern = NULL;
	SystemUser* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* inc_pattern = NULL;
	SystemUser* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* inc_hidden_pattern = NULL;
	SystemUser* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	SystemUser* _tmp21_;
	g_return_if_fail (cell != NULL);
	g_return_if_fail (path != NULL);
	tee_jee_logging_log_debug ("cell_include.toggled()");
	_tmp0_ = self->priv->treeview;
	_tmp1_ = gtk_tree_view_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_list_store_get_type (), GtkListStore));
	model = _tmp3_;
	_tmp4_ = model;
	gtk_tree_model_get_iter_from_string ((GtkTreeModel*) _tmp4_, &_tmp5_, path);
	iter = _tmp5_;
	_tmp6_ = model;
	_tmp7_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 1, &_tmp8_, -1);
	enabled = _tmp8_;
	_tmp9_ = model;
	_tmp10_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp9_, &_tmp10_, 0, &_tmp11_, -1);
	_g_object_unref0 (user);
	user = _tmp11_;
	_tmp12_ = user;
	_tmp13_ = _tmp12_->home_path;
	_tmp14_ = g_strdup_printf ("%s/**", _tmp13_);
	exc_pattern = _tmp14_;
	_tmp15_ = user;
	_tmp16_ = _tmp15_->home_path;
	_tmp17_ = g_strdup_printf ("+ %s/**", _tmp16_);
	inc_pattern = _tmp17_;
	_tmp18_ = user;
	_tmp19_ = _tmp18_->home_path;
	_tmp20_ = g_strdup_printf ("+ %s/.**", _tmp19_);
	inc_hidden_pattern = _tmp20_;
	_tmp21_ = user;
	if (_tmp21_->has_encrypted_home) {
		SystemUser* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		SystemUser* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp22_ = user;
		_tmp23_ = _tmp22_->name;
		_tmp24_ = g_strdup_printf ("+ /home/.ecryptfs/%s/***", _tmp23_);
		_g_free0 (inc_pattern);
		inc_pattern = _tmp24_;
		_tmp25_ = user;
		_tmp26_ = _tmp25_->name;
		_tmp27_ = g_strdup_printf ("/home/.ecryptfs/%s/***", _tmp26_);
		_g_free0 (exc_pattern);
		exc_pattern = _tmp27_;
	}
	enabled = !enabled;
	if (enabled) {
		SystemUser* _tmp28_;
		Main* _tmp34_;
		GeeArrayList* _tmp35_;
		const gchar* _tmp36_;
		Main* _tmp40_;
		GeeArrayList* _tmp41_;
		const gchar* _tmp42_;
		Main* _tmp46_;
		GeeArrayList* _tmp47_;
		const gchar* _tmp48_;
		_tmp28_ = user;
		if (_tmp28_->has_encrypted_home) {
			gchar* txt = NULL;
			gchar* _tmp29_;
			gchar* msg = NULL;
			gchar* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			GtkWindow* _tmp33_;
			_tmp29_ = g_strdup (_ ("Encrypted Home Directory"));
			txt = _tmp29_;
			_tmp30_ = g_strdup (_ ("Selected user has an encrypted home directory. It's not possible to in" \
"clude only hidden files."));
			msg = _tmp30_;
			_tmp31_ = txt;
			_tmp32_ = msg;
			_tmp33_ = self->priv->parent_window;
			tee_jee_gtk_helper_gtk_messagebox (_tmp31_, _tmp32_, _tmp33_, TRUE);
			_g_free0 (msg);
			_g_free0 (txt);
			_g_free0 (inc_hidden_pattern);
			_g_free0 (inc_pattern);
			_g_free0 (exc_pattern);
			_g_object_unref0 (user);
			_g_object_unref0 (model);
			return;
		}
		_tmp34_ = App;
		_tmp35_ = _tmp34_->exclude_list_user;
		_tmp36_ = inc_hidden_pattern;
		if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp35_, _tmp36_)) {
			Main* _tmp37_;
			GeeArrayList* _tmp38_;
			const gchar* _tmp39_;
			_tmp37_ = App;
			_tmp38_ = _tmp37_->exclude_list_user;
			_tmp39_ = inc_hidden_pattern;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp38_, _tmp39_);
		}
		_tmp40_ = App;
		_tmp41_ = _tmp40_->exclude_list_user;
		_tmp42_ = inc_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp41_, _tmp42_)) {
			Main* _tmp43_;
			GeeArrayList* _tmp44_;
			const gchar* _tmp45_;
			_tmp43_ = App;
			_tmp44_ = _tmp43_->exclude_list_user;
			_tmp45_ = inc_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp44_, _tmp45_);
		}
		_tmp46_ = App;
		_tmp47_ = _tmp46_->exclude_list_user;
		_tmp48_ = exc_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp47_, _tmp48_)) {
			Main* _tmp49_;
			GeeArrayList* _tmp50_;
			const gchar* _tmp51_;
			_tmp49_ = App;
			_tmp50_ = _tmp49_->exclude_list_user;
			_tmp51_ = exc_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp50_, _tmp51_);
		}
	}
	users_box_refresh_treeview (self);
	_g_free0 (inc_hidden_pattern);
	_g_free0 (inc_pattern);
	_g_free0 (exc_pattern);
	_g_object_unref0 (user);
	_g_object_unref0 (model);
}

static void
___lambda78__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                               const gchar* path,
                                               gpointer self)
{
	__lambda78_ ((UsersBox*) self, _sender, path);
}

static void
__lambda79_ (UsersBox* self,
             GtkCellRendererToggle* cell,
             const gchar* path)
{
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gboolean enabled = FALSE;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gboolean _tmp8_ = FALSE;
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	SystemUser* user = NULL;
	GtkListStore* _tmp11_;
	GtkTreeIter _tmp12_;
	SystemUser* _tmp13_ = NULL;
	gchar* exc_pattern = NULL;
	SystemUser* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* inc_pattern = NULL;
	SystemUser* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* inc_hidden_pattern = NULL;
	SystemUser* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	SystemUser* _tmp23_;
	g_return_if_fail (cell != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = self->priv->treeview;
	_tmp1_ = gtk_tree_view_get_model (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_list_store_get_type (), GtkListStore));
	model = _tmp3_;
	_tmp4_ = model;
	gtk_tree_model_get_iter_from_string ((GtkTreeModel*) _tmp4_, &_tmp5_, path);
	iter = _tmp5_;
	_tmp6_ = model;
	_tmp7_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 2, &_tmp8_, -1);
	enabled = _tmp8_;
	enabled = !enabled;
	_tmp9_ = model;
	_tmp10_ = iter;
	gtk_list_store_set (_tmp9_, &_tmp10_, 2, enabled, -1);
	_tmp11_ = model;
	_tmp12_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp11_, &_tmp12_, 0, &_tmp13_, -1);
	_g_object_unref0 (user);
	user = _tmp13_;
	_tmp14_ = user;
	_tmp15_ = _tmp14_->home_path;
	_tmp16_ = g_strdup_printf ("%s/**", _tmp15_);
	exc_pattern = _tmp16_;
	_tmp17_ = user;
	_tmp18_ = _tmp17_->home_path;
	_tmp19_ = g_strdup_printf ("+ %s/**", _tmp18_);
	inc_pattern = _tmp19_;
	_tmp20_ = user;
	_tmp21_ = _tmp20_->home_path;
	_tmp22_ = g_strdup_printf ("+ %s/.**", _tmp21_);
	inc_hidden_pattern = _tmp22_;
	_tmp23_ = user;
	if (_tmp23_->has_encrypted_home) {
		SystemUser* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		SystemUser* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		_tmp24_ = user;
		_tmp25_ = _tmp24_->name;
		_tmp26_ = g_strdup_printf ("+ /home/.ecryptfs/%s/***", _tmp25_);
		_g_free0 (inc_pattern);
		inc_pattern = _tmp26_;
		_tmp27_ = user;
		_tmp28_ = _tmp27_->name;
		_tmp29_ = g_strdup_printf ("/home/.ecryptfs/%s/***", _tmp28_);
		_g_free0 (exc_pattern);
		exc_pattern = _tmp29_;
	}
	if (enabled) {
		Main* _tmp30_;
		GeeArrayList* _tmp31_;
		const gchar* _tmp32_;
		Main* _tmp36_;
		GeeArrayList* _tmp37_;
		const gchar* _tmp38_;
		Main* _tmp42_;
		GeeArrayList* _tmp43_;
		const gchar* _tmp44_;
		_tmp30_ = App;
		_tmp31_ = _tmp30_->exclude_list_user;
		_tmp32_ = inc_pattern;
		if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp31_, _tmp32_)) {
			Main* _tmp33_;
			GeeArrayList* _tmp34_;
			const gchar* _tmp35_;
			_tmp33_ = App;
			_tmp34_ = _tmp33_->exclude_list_user;
			_tmp35_ = inc_pattern;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp34_, _tmp35_);
		}
		_tmp36_ = App;
		_tmp37_ = _tmp36_->exclude_list_user;
		_tmp38_ = exc_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp37_, _tmp38_)) {
			Main* _tmp39_;
			GeeArrayList* _tmp40_;
			const gchar* _tmp41_;
			_tmp39_ = App;
			_tmp40_ = _tmp39_->exclude_list_user;
			_tmp41_ = exc_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp40_, _tmp41_);
		}
		_tmp42_ = App;
		_tmp43_ = _tmp42_->exclude_list_user;
		_tmp44_ = inc_hidden_pattern;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp43_, _tmp44_)) {
			Main* _tmp45_;
			GeeArrayList* _tmp46_;
			const gchar* _tmp47_;
			_tmp45_ = App;
			_tmp46_ = _tmp45_->exclude_list_user;
			_tmp47_ = inc_hidden_pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp46_, _tmp47_);
		}
	}
	users_box_refresh_treeview (self);
	_g_free0 (inc_hidden_pattern);
	_g_free0 (inc_pattern);
	_g_free0 (exc_pattern);
	_g_object_unref0 (user);
	_g_object_unref0 (model);
}

static void
___lambda79__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                               const gchar* path,
                                               gpointer self)
{
	__lambda79_ ((UsersBox*) self, _sender, path);
}

static void
users_box_init_treeview (UsersBox* self)
{
	GtkTreeView* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkTreeView* _tmp3_;
	GtkTreeView* _tmp4_;
	GtkTreeView* _tmp5_;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp6_;
	GtkTreeView* _tmp7_;
	GtkScrolledWindow* _tmp8_;
	GtkTreeViewColumn* col = NULL;
	GtkTreeViewColumn* _tmp9_;
	GtkTreeViewColumn* _tmp10_;
	GtkTreeView* _tmp11_;
	GtkTreeViewColumn* _tmp12_;
	GtkCellRendererText* cell_text = NULL;
	GtkCellRendererText* _tmp13_;
	GtkTreeViewColumn* _tmp14_;
	GtkCellRendererText* _tmp15_;
	GtkTreeViewColumn* _tmp16_;
	GtkCellRendererText* _tmp17_;
	GtkTreeViewColumn* _tmp18_;
	GtkTreeViewColumn* _tmp19_;
	GtkTreeView* _tmp20_;
	GtkTreeViewColumn* _tmp21_;
	GtkCellRendererText* _tmp22_;
	GtkTreeViewColumn* _tmp23_;
	GtkCellRendererText* _tmp24_;
	GtkTreeViewColumn* _tmp25_;
	GtkCellRendererText* _tmp26_;
	GtkTreeViewColumn* _tmp27_;
	GtkTreeViewColumn* _tmp28_;
	GtkTreeView* _tmp29_;
	GtkTreeViewColumn* _tmp30_;
	GtkCellRendererToggle* cell_radio = NULL;
	GtkCellRendererToggle* _tmp31_;
	GtkCellRendererToggle* _tmp32_;
	GtkCellRendererToggle* _tmp33_;
	GtkCellRendererToggle* _tmp34_;
	GtkTreeViewColumn* _tmp35_;
	GtkCellRendererToggle* _tmp36_;
	GtkTreeViewColumn* _tmp37_;
	GtkCellRendererToggle* _tmp38_;
	GtkCellRendererToggle* _tmp39_;
	GtkTreeViewColumn* _tmp40_;
	GtkTreeViewColumn* _tmp41_;
	GtkTreeView* _tmp42_;
	GtkTreeViewColumn* _tmp43_;
	GtkCellRendererToggle* _tmp44_;
	GtkCellRendererToggle* _tmp45_;
	GtkCellRendererToggle* _tmp46_;
	GtkCellRendererToggle* _tmp47_;
	GtkTreeViewColumn* _tmp48_;
	GtkCellRendererToggle* _tmp49_;
	GtkTreeViewColumn* _tmp50_;
	GtkCellRendererToggle* _tmp51_;
	GtkCellRendererToggle* _tmp52_;
	GtkTreeViewColumn* _tmp53_;
	GtkTreeViewColumn* _tmp54_;
	GtkTreeView* _tmp55_;
	GtkTreeViewColumn* _tmp56_;
	GtkCellRendererToggle* _tmp57_;
	GtkCellRendererToggle* _tmp58_;
	GtkCellRendererToggle* _tmp59_;
	GtkCellRendererToggle* _tmp60_;
	GtkTreeViewColumn* _tmp61_;
	GtkCellRendererToggle* _tmp62_;
	GtkTreeViewColumn* _tmp63_;
	GtkCellRendererToggle* _tmp64_;
	GtkCellRendererToggle* _tmp65_;
	GtkTreeViewColumn* _tmp66_;
	GtkCellRendererText* _tmp67_;
	GtkCellRendererText* _tmp68_;
	GtkTreeViewColumn* _tmp69_;
	GtkCellRendererText* _tmp70_;
	GtkTreeView* _tmp71_;
	GtkTreeViewColumn* _tmp72_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkTreeView*) gtk_tree_view_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->treeview);
	self->priv->treeview = _tmp0_;
	_tmp1_ = self->priv->treeview;
	_tmp2_ = gtk_tree_view_get_selection (_tmp1_);
	gtk_tree_selection_set_mode (_tmp2_, GTK_SELECTION_MULTIPLE);
	_tmp3_ = self->priv->treeview;
	gtk_tree_view_set_headers_visible (_tmp3_, TRUE);
	_tmp4_ = self->priv->treeview;
	gtk_tree_view_set_reorderable (_tmp4_, FALSE);
	_tmp5_ = self->priv->treeview;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _ ("Click to edit. Drag and drop to re-order."));
	_tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp6_);
	scrolled = _tmp6_;
	gtk_scrolled_window_set_shadow_type (scrolled, GTK_SHADOW_ETCHED_IN);
	_tmp7_ = self->priv->treeview;
	gtk_container_add ((GtkContainer*) scrolled, (GtkWidget*) _tmp7_);
	g_object_set ((GtkWidget*) scrolled, "expand", TRUE, NULL);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) scrolled);
	_tmp8_ = _g_object_ref0 (scrolled);
	_g_object_unref0 (self->priv->scrolled_treeview);
	self->priv->scrolled_treeview = _tmp8_;
	_tmp9_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp9_);
	col = _tmp9_;
	_tmp10_ = col;
	gtk_tree_view_column_set_title (_tmp10_, _ ("User"));
	_tmp11_ = self->priv->treeview;
	_tmp12_ = col;
	gtk_tree_view_append_column (_tmp11_, _tmp12_);
	_tmp13_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp13_);
	cell_text = _tmp13_;
	_tmp14_ = col;
	_tmp15_ = cell_text;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp14_, (GtkCellRenderer*) _tmp15_, FALSE);
	_tmp16_ = col;
	_tmp17_ = cell_text;
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp16_, (GtkCellRenderer*) _tmp17_, ___lambda75__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
	_tmp18_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (col);
	col = _tmp18_;
	_tmp19_ = col;
	gtk_tree_view_column_set_title (_tmp19_, _ ("Home"));
	_tmp20_ = self->priv->treeview;
	_tmp21_ = col;
	gtk_tree_view_append_column (_tmp20_, _tmp21_);
	_tmp22_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (cell_text);
	cell_text = _tmp22_;
	_tmp23_ = col;
	_tmp24_ = cell_text;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp23_, (GtkCellRenderer*) _tmp24_, FALSE);
	_tmp25_ = col;
	_tmp26_ = cell_text;
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp25_, (GtkCellRenderer*) _tmp26_, ___lambda76__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
	_tmp27_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (col);
	col = _tmp27_;
	_tmp28_ = col;
	gtk_tree_view_column_set_title (_tmp28_, _ ("Exclude All Files"));
	_tmp29_ = self->priv->treeview;
	_tmp30_ = col;
	gtk_tree_view_append_column (_tmp29_, _tmp30_);
	_tmp31_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp31_);
	cell_radio = _tmp31_;
	_tmp32_ = cell_radio;
	gtk_cell_renderer_toggle_set_radio (_tmp32_, TRUE);
	_tmp33_ = cell_radio;
	g_object_set ((GtkCellRenderer*) _tmp33_, "xpad", (guint) 2, NULL);
	_tmp34_ = cell_radio;
	gtk_cell_renderer_toggle_set_activatable (_tmp34_, TRUE);
	_tmp35_ = col;
	_tmp36_ = cell_radio;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp35_, (GtkCellRenderer*) _tmp36_, FALSE);
	_tmp37_ = col;
	_tmp38_ = cell_radio;
	gtk_tree_view_column_set_attributes (_tmp37_, (GtkCellRenderer*) _tmp38_, "active", 3, NULL);
	_tmp39_ = cell_radio;
	g_signal_connect_object (_tmp39_, "toggled", (GCallback) ___lambda77__gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp40_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp40_);
	_g_object_unref0 (col);
	col = _tmp40_;
	_tmp41_ = col;
	gtk_tree_view_column_set_title (_tmp41_, _ ("Include Only Hidden Files"));
	_tmp42_ = self->priv->treeview;
	_tmp43_ = col;
	gtk_tree_view_append_column (_tmp42_, _tmp43_);
	_tmp44_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp44_);
	_g_object_unref0 (cell_radio);
	cell_radio = _tmp44_;
	_tmp45_ = cell_radio;
	gtk_cell_renderer_toggle_set_radio (_tmp45_, TRUE);
	_tmp46_ = cell_radio;
	g_object_set ((GtkCellRenderer*) _tmp46_, "xpad", (guint) 2, NULL);
	_tmp47_ = cell_radio;
	gtk_cell_renderer_toggle_set_activatable (_tmp47_, TRUE);
	_tmp48_ = col;
	_tmp49_ = cell_radio;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp48_, (GtkCellRenderer*) _tmp49_, FALSE);
	_tmp50_ = col;
	_tmp51_ = cell_radio;
	gtk_tree_view_column_set_attributes (_tmp50_, (GtkCellRenderer*) _tmp51_, "active", 1, NULL);
	_tmp52_ = cell_radio;
	g_signal_connect_object (_tmp52_, "toggled", (GCallback) ___lambda78__gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp53_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp53_);
	_g_object_unref0 (col);
	col = _tmp53_;
	_tmp54_ = col;
	gtk_tree_view_column_set_title (_tmp54_, _ ("Include All Files"));
	_tmp55_ = self->priv->treeview;
	_tmp56_ = col;
	gtk_tree_view_append_column (_tmp55_, _tmp56_);
	_tmp57_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp57_);
	_g_object_unref0 (cell_radio);
	cell_radio = _tmp57_;
	_tmp58_ = cell_radio;
	gtk_cell_renderer_toggle_set_radio (_tmp58_, TRUE);
	_tmp59_ = cell_radio;
	g_object_set ((GtkCellRenderer*) _tmp59_, "xpad", (guint) 2, NULL);
	_tmp60_ = cell_radio;
	gtk_cell_renderer_toggle_set_activatable (_tmp60_, TRUE);
	_tmp61_ = col;
	_tmp62_ = cell_radio;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp61_, (GtkCellRenderer*) _tmp62_, FALSE);
	_tmp63_ = col;
	_tmp64_ = cell_radio;
	gtk_tree_view_column_set_attributes (_tmp63_, (GtkCellRenderer*) _tmp64_, "active", 2, NULL);
	_tmp65_ = cell_radio;
	g_signal_connect_object (_tmp65_, "toggled", (GCallback) ___lambda79__gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp66_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp66_);
	_g_object_unref0 (col);
	col = _tmp66_;
	_tmp67_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp67_);
	_g_object_unref0 (cell_text);
	cell_text = _tmp67_;
	_tmp68_ = cell_text;
	g_object_set ((GtkCellRenderer*) _tmp68_, "width", 20, NULL);
	_tmp69_ = col;
	_tmp70_ = cell_text;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp69_, (GtkCellRenderer*) _tmp70_, FALSE);
	_tmp71_ = self->priv->treeview;
	_tmp72_ = col;
	gtk_tree_view_append_column (_tmp71_, _tmp72_);
	_g_object_unref0 (cell_radio);
	_g_object_unref0 (cell_text);
	_g_object_unref0 (col);
	_g_object_unref0 (scrolled);
}

static void
___lambda80_ (UsersBox* self)
{
	Main* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = App;
	_tmp1_ = self->priv->chk_include_btrfs_home;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp0_->include_btrfs_home_for_restore = _tmp3_;
}

static void
____lambda80__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	___lambda80_ ((UsersBox*) self);
}

static void
___lambda81_ (UsersBox* self)
{
	Main* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = App;
	_tmp1_ = self->priv->chk_include_btrfs_home;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp0_->include_btrfs_home_for_backup = _tmp3_;
}

static void
____lambda81__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	___lambda81_ ((UsersBox*) self);
}

static void
users_box_init_btrfs_home_option (UsersBox* self,
                                  GtkBox* box)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	if (self->priv->restore_mode) {
		GtkCheckButton* _tmp0_;
		GtkCheckButton* _tmp1_;
		GtkCheckButton* _tmp2_;
		_tmp0_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Restore @home subvolume"));
		g_object_ref_sink (_tmp0_);
		_g_object_unref0 (self->priv->chk_include_btrfs_home);
		self->priv->chk_include_btrfs_home = _tmp0_;
		_tmp1_ = self->priv->chk_include_btrfs_home;
		gtk_container_add ((GtkContainer*) box, (GtkWidget*) _tmp1_);
		_tmp2_ = self->priv->chk_include_btrfs_home;
		g_signal_connect_object ((GtkToggleButton*) _tmp2_, "toggled", (GCallback) ____lambda80__gtk_toggle_button_toggled, self, 0);
	} else {
		GtkCheckButton* _tmp3_;
		GtkCheckButton* _tmp4_;
		GtkCheckButton* _tmp5_;
		_tmp3_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Include @home subvolume in backups"));
		g_object_ref_sink (_tmp3_);
		_g_object_unref0 (self->priv->chk_include_btrfs_home);
		self->priv->chk_include_btrfs_home = _tmp3_;
		_tmp4_ = self->priv->chk_include_btrfs_home;
		gtk_container_add ((GtkContainer*) box, (GtkWidget*) _tmp4_);
		_tmp5_ = self->priv->chk_include_btrfs_home;
		g_signal_connect_object ((GtkToggleButton*) _tmp5_, "toggled", (GCallback) ____lambda81__gtk_toggle_button_toggled, self, 0);
	}
}

void
users_box_refresh (UsersBox* self)
{
	Main* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = App;
	if (_tmp0_->btrfs_mode) {
		GtkLabel* _tmp1_;
		GtkLabel* _tmp2_;
		GtkScrolledWindow* _tmp3_;
		GtkScrolledWindow* _tmp4_;
		GtkBox* _tmp5_;
		GtkBox* _tmp6_;
		_tmp1_ = self->priv->lbl_message;
		gtk_widget_hide ((GtkWidget*) _tmp1_);
		_tmp2_ = self->priv->lbl_message;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp2_, TRUE);
		_tmp3_ = self->priv->scrolled_treeview;
		gtk_widget_hide ((GtkWidget*) _tmp3_);
		_tmp4_ = self->priv->scrolled_treeview;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp4_, TRUE);
		_tmp5_ = self->priv->box_btrfs;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp5_, FALSE);
		_tmp6_ = self->priv->box_btrfs;
		gtk_widget_show_all ((GtkWidget*) _tmp6_);
		if (self->priv->restore_mode) {
			GtkCheckButton* _tmp7_;
			Main* _tmp8_;
			_tmp7_ = self->priv->chk_include_btrfs_home;
			_tmp8_ = App;
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp7_, _tmp8_->include_btrfs_home_for_restore);
		} else {
			GtkCheckButton* _tmp9_;
			Main* _tmp10_;
			_tmp9_ = self->priv->chk_include_btrfs_home;
			_tmp10_ = App;
			gtk_toggle_button_set_active ((GtkToggleButton*) _tmp9_, _tmp10_->include_btrfs_home_for_backup);
		}
	} else {
		GtkLabel* _tmp11_;
		GtkLabel* _tmp12_;
		GtkScrolledWindow* _tmp13_;
		GtkScrolledWindow* _tmp14_;
		GtkBox* _tmp15_;
		GtkBox* _tmp16_;
		_tmp11_ = self->priv->lbl_message;
		gtk_widget_show ((GtkWidget*) _tmp11_);
		_tmp12_ = self->priv->lbl_message;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp12_, FALSE);
		_tmp13_ = self->priv->scrolled_treeview;
		gtk_widget_show ((GtkWidget*) _tmp13_);
		_tmp14_ = self->priv->scrolled_treeview;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp14_, FALSE);
		users_box_refresh_treeview (self);
		_tmp15_ = self->priv->box_btrfs;
		gtk_widget_hide ((GtkWidget*) _tmp15_);
		_tmp16_ = self->priv->box_btrfs;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp16_, TRUE);
	}
	gtk_widget_show_all ((GtkWidget*) self);
}

static void
users_box_refresh_treeview (UsersBox* self)
{
	GtkListStore* model = NULL;
	GtkListStore* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkListStore* _tmp2_;
	GtkTreeIter iter = {0};
	ExcludeBox* _tmp68_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new (4, TYPE_SYSTEM_USER, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, -1);
	model = _tmp0_;
	_tmp1_ = self->priv->treeview;
	_tmp2_ = model;
	gtk_tree_view_set_model (_tmp1_, (GtkTreeModel*) _tmp2_);
	{
		GeeIterator* _user_it = NULL;
		Main* _tmp3_;
		GeeHashMap* _tmp4_;
		GeeCollection* _tmp5_;
		GeeCollection* _tmp6_;
		GeeCollection* _tmp7_;
		GeeIterator* _tmp8_;
		GeeIterator* _tmp9_;
		_tmp3_ = App;
		_tmp4_ = _tmp3_->current_system_users;
		_tmp5_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
		_tmp9_ = _tmp8_;
		_g_object_unref0 (_tmp7_);
		_user_it = _tmp9_;
		while (TRUE) {
			GeeIterator* _tmp10_;
			SystemUser* user = NULL;
			GeeIterator* _tmp11_;
			gpointer _tmp12_;
			SystemUser* _tmp13_;
			gboolean _tmp14_;
			gboolean _tmp15_;
			gchar* exc_pattern = NULL;
			SystemUser* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* inc_pattern = NULL;
			SystemUser* _tmp19_;
			const gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* inc_hidden_pattern = NULL;
			SystemUser* _tmp22_;
			const gchar* _tmp23_;
			gchar* _tmp24_;
			SystemUser* _tmp25_;
			gboolean include_hidden = FALSE;
			Main* _tmp32_;
			GeeArrayList* _tmp33_;
			const gchar* _tmp34_;
			gboolean include_all = FALSE;
			Main* _tmp35_;
			GeeArrayList* _tmp36_;
			const gchar* _tmp37_;
			gboolean _tmp38_ = FALSE;
			gboolean exclude_all = FALSE;
			GtkListStore* _tmp57_;
			GtkTreeIter _tmp58_ = {0};
			GtkListStore* _tmp59_;
			GtkTreeIter _tmp60_;
			SystemUser* _tmp61_;
			GtkListStore* _tmp62_;
			GtkTreeIter _tmp63_;
			GtkListStore* _tmp64_;
			GtkTreeIter _tmp65_;
			GtkListStore* _tmp66_;
			GtkTreeIter _tmp67_;
			_tmp10_ = _user_it;
			if (!gee_iterator_next (_tmp10_)) {
				break;
			}
			_tmp11_ = _user_it;
			_tmp12_ = gee_iterator_get (_tmp11_);
			user = (SystemUser*) _tmp12_;
			_tmp13_ = user;
			_tmp14_ = system_user_get_is_system (_tmp13_);
			_tmp15_ = _tmp14_;
			if (_tmp15_) {
				_g_object_unref0 (user);
				continue;
			}
			_tmp16_ = user;
			_tmp17_ = _tmp16_->home_path;
			_tmp18_ = g_strdup_printf ("%s/**", _tmp17_);
			exc_pattern = _tmp18_;
			_tmp19_ = user;
			_tmp20_ = _tmp19_->home_path;
			_tmp21_ = g_strdup_printf ("+ %s/**", _tmp20_);
			inc_pattern = _tmp21_;
			_tmp22_ = user;
			_tmp23_ = _tmp22_->home_path;
			_tmp24_ = g_strdup_printf ("+ %s/.**", _tmp23_);
			inc_hidden_pattern = _tmp24_;
			_tmp25_ = user;
			if (_tmp25_->has_encrypted_home) {
				SystemUser* _tmp26_;
				const gchar* _tmp27_;
				gchar* _tmp28_;
				SystemUser* _tmp29_;
				const gchar* _tmp30_;
				gchar* _tmp31_;
				_tmp26_ = user;
				_tmp27_ = _tmp26_->name;
				_tmp28_ = g_strdup_printf ("+ /home/.ecryptfs/%s/***", _tmp27_);
				_g_free0 (inc_pattern);
				inc_pattern = _tmp28_;
				_tmp29_ = user;
				_tmp30_ = _tmp29_->name;
				_tmp31_ = g_strdup_printf ("/home/.ecryptfs/%s/***", _tmp30_);
				_g_free0 (exc_pattern);
				exc_pattern = _tmp31_;
			}
			_tmp32_ = App;
			_tmp33_ = _tmp32_->exclude_list_user;
			_tmp34_ = inc_hidden_pattern;
			include_hidden = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp33_, _tmp34_);
			_tmp35_ = App;
			_tmp36_ = _tmp35_->exclude_list_user;
			_tmp37_ = inc_pattern;
			include_all = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp36_, _tmp37_);
			if (!include_hidden) {
				_tmp38_ = !include_all;
			} else {
				_tmp38_ = FALSE;
			}
			exclude_all = _tmp38_;
			if (exclude_all) {
				Main* _tmp39_;
				GeeArrayList* _tmp40_;
				const gchar* _tmp41_;
				Main* _tmp45_;
				GeeArrayList* _tmp46_;
				const gchar* _tmp47_;
				Main* _tmp51_;
				GeeArrayList* _tmp52_;
				const gchar* _tmp53_;
				_tmp39_ = App;
				_tmp40_ = _tmp39_->exclude_list_user;
				_tmp41_ = exc_pattern;
				if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp40_, _tmp41_)) {
					Main* _tmp42_;
					GeeArrayList* _tmp43_;
					const gchar* _tmp44_;
					_tmp42_ = App;
					_tmp43_ = _tmp42_->exclude_list_user;
					_tmp44_ = exc_pattern;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
				}
				_tmp45_ = App;
				_tmp46_ = _tmp45_->exclude_list_user;
				_tmp47_ = inc_pattern;
				if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp46_, _tmp47_)) {
					Main* _tmp48_;
					GeeArrayList* _tmp49_;
					const gchar* _tmp50_;
					_tmp48_ = App;
					_tmp49_ = _tmp48_->exclude_list_user;
					_tmp50_ = inc_pattern;
					gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp49_, _tmp50_);
				}
				_tmp51_ = App;
				_tmp52_ = _tmp51_->exclude_list_user;
				_tmp53_ = inc_hidden_pattern;
				if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp52_, _tmp53_)) {
					Main* _tmp54_;
					GeeArrayList* _tmp55_;
					const gchar* _tmp56_;
					_tmp54_ = App;
					_tmp55_ = _tmp54_->exclude_list_user;
					_tmp56_ = inc_hidden_pattern;
					gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp55_, _tmp56_);
				}
			}
			_tmp57_ = model;
			gtk_list_store_append (_tmp57_, &_tmp58_);
			iter = _tmp58_;
			_tmp59_ = model;
			_tmp60_ = iter;
			_tmp61_ = user;
			gtk_list_store_set (_tmp59_, &_tmp60_, 0, _tmp61_, -1);
			_tmp62_ = model;
			_tmp63_ = iter;
			gtk_list_store_set (_tmp62_, &_tmp63_, 1, include_hidden, -1);
			_tmp64_ = model;
			_tmp65_ = iter;
			gtk_list_store_set (_tmp64_, &_tmp65_, 2, include_all, -1);
			_tmp66_ = model;
			_tmp67_ = iter;
			gtk_list_store_set (_tmp66_, &_tmp67_, 3, exclude_all, -1);
			_g_free0 (inc_hidden_pattern);
			_g_free0 (inc_pattern);
			_g_free0 (exc_pattern);
			_g_object_unref0 (user);
		}
		_g_object_unref0 (_user_it);
	}
	_tmp68_ = self->priv->exclude_box;
	exclude_box_refresh_treeview (_tmp68_);
	_g_object_unref0 (model);
}

static void
users_box_class_init (UsersBoxClass * klass,
                      gpointer klass_data)
{
	users_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UsersBox_private_offset);
	G_OBJECT_CLASS (klass)->finalize = users_box_finalize;
}

static void
users_box_instance_init (UsersBox * self,
                         gpointer klass)
{
	self->priv = users_box_get_instance_private (self);
	self->priv->restore_mode = FALSE;
}

static void
users_box_finalize (GObject * obj)
{
	UsersBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_USERS_BOX, UsersBox);
	_g_object_unref0 (self->priv->treeview);
	_g_object_unref0 (self->priv->scrolled_treeview);
	_g_object_unref0 (self->priv->parent_window);
	_g_object_unref0 (self->priv->exclude_box);
	_g_object_unref0 (self->priv->box_btrfs);
	_g_object_unref0 (self->priv->lbl_message);
	_g_object_unref0 (self->priv->chk_include_btrfs_home);
	G_OBJECT_CLASS (users_box_parent_class)->finalize (obj);
}

static GType
users_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UsersBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) users_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UsersBox), 0, (GInstanceInitFunc) users_box_instance_init, NULL };
	GType users_box_type_id;
	users_box_type_id = g_type_register_static (gtk_box_get_type (), "UsersBox", &g_define_type_info, 0);
	UsersBox_private_offset = g_type_add_instance_private (users_box_type_id, sizeof (UsersBoxPrivate));
	return users_box_type_id;
}

GType
users_box_get_type (void)
{
	static volatile gsize users_box_type_id__once = 0;
	if (g_once_init_enter (&users_box_type_id__once)) {
		GType users_box_type_id;
		users_box_type_id = users_box_get_type_once ();
		g_once_init_leave (&users_box_type_id__once, users_box_type_id);
	}
	return users_box_type_id__once;
}

