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

/*
 * ExcludeBox.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>
#include <float.h>
#include <math.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_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;
typedef struct _ExcludeBoxPrivate ExcludeBoxPrivate;

#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;
enum  {
	EXCLUDE_BOX_0_PROPERTY,
	EXCLUDE_BOX_NUM_PROPERTIES
};
static GParamSpec* exclude_box_properties[EXCLUDE_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_EXCLUDE_LIST_SUMMARY_WINDOW (exclude_list_summary_window_get_type ())
#define EXCLUDE_LIST_SUMMARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXCLUDE_LIST_SUMMARY_WINDOW, ExcludeListSummaryWindow))
#define EXCLUDE_LIST_SUMMARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXCLUDE_LIST_SUMMARY_WINDOW, ExcludeListSummaryWindowClass))
#define IS_EXCLUDE_LIST_SUMMARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXCLUDE_LIST_SUMMARY_WINDOW))
#define IS_EXCLUDE_LIST_SUMMARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXCLUDE_LIST_SUMMARY_WINDOW))
#define EXCLUDE_LIST_SUMMARY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXCLUDE_LIST_SUMMARY_WINDOW, ExcludeListSummaryWindowClass))

typedef struct _ExcludeListSummaryWindow ExcludeListSummaryWindow;
typedef struct _ExcludeListSummaryWindowClass ExcludeListSummaryWindowClass;

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

struct _ExcludeBox {
	GtkBox parent_instance;
	ExcludeBoxPrivate * priv;
};

struct _ExcludeBoxClass {
	GtkBoxClass parent_class;
};

struct _ExcludeBoxPrivate {
	GtkTreeView* treeview;
	GtkWindow* parent_window;
	UsersBox* users_box;
	GtkLabel* lbl_message;
};

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 ExcludeBox_private_offset;
static gpointer exclude_box_parent_class = NULL;
VALA_EXTERN guint64 main_first_snapshot_size;
VALA_EXTERN Main* App;

VALA_EXTERN GType exclude_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ExcludeBox, g_object_unref)
VALA_EXTERN GType users_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UsersBox, g_object_unref)
VALA_EXTERN ExcludeBox* exclude_box_new (GtkWindow* _parent_window);
VALA_EXTERN ExcludeBox* exclude_box_construct (GType object_type,
                                   GtkWindow* _parent_window);
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 exclude_box_init_treeview (ExcludeBox* self);
static void exclude_box_init_actions (ExcludeBox* self);
VALA_EXTERN void exclude_box_refresh_treeview (ExcludeBox* self);
VALA_EXTERN void exclude_box_set_users_box (ExcludeBox* self,
                                UsersBox* _users_box);
static void __lambda65_ (ExcludeBox* self,
                  GtkCellRendererToggle* cell,
                  const gchar* path);
static void exclude_box_treeview_update_item (ExcludeBox* self,
                                       GtkTreeIter* iter,
                                       const gchar* pattern);
VALA_EXTERN void exclude_box_save_changes (ExcludeBox* self);
static void ___lambda65__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                                    const gchar* path,
                                                    gpointer self);
static void __lambda66_ (ExcludeBox* self,
                  GtkCellRendererToggle* cell,
                  const gchar* path);
static void ___lambda66__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                                    const gchar* path,
                                                    gpointer self);
static void __lambda67_ (ExcludeBox* self,
                  GtkCellLayout* cell_layout,
                  GtkCellRenderer* cell,
                  GtkTreeModel* model,
                  GtkTreeIter* iter);
static void ___lambda67__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                             GtkCellRenderer* cell,
                                             GtkTreeModel* tree_model,
                                             GtkTreeIter* iter,
                                             gpointer self);
static void __lambda68_ (ExcludeBox* self,
                  const gchar* path,
                  const gchar* new_text);
static void ___lambda68__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender,
                                                 const gchar* path,
                                                 const gchar* new_text,
                                                 gpointer 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 __lambda69_ (ExcludeBox* self);
VALA_EXTERN gchar* tee_jee_gtk_helper_gtk_inputbox (const gchar* title,
                                        const gchar* message,
                                        GtkWindow* parent_win,
                                        gboolean mask_password);
static void exclude_box_treeview_add_item (ExcludeBox* self,
                                    GtkTreeView* treeview,
                                    const gchar* pattern);
static void ___lambda69__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda70_ (ExcludeBox* self);
static void exclude_box_add_files_clicked (ExcludeBox* self);
static void ___lambda70__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda71_ (ExcludeBox* self);
static void exclude_box_add_folder_clicked (ExcludeBox* self);
static void ___lambda71__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda72_ (ExcludeBox* self);
static void exclude_box_remove_clicked (ExcludeBox* self);
static void ___lambda72__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda73_ (ExcludeBox* self);
VALA_EXTERN ExcludeListSummaryWindow* exclude_list_summary_window_new (gboolean _for_restore);
VALA_EXTERN ExcludeListSummaryWindow* exclude_list_summary_window_construct (GType object_type,
                                                                 gboolean _for_restore);
VALA_EXTERN GType exclude_list_summary_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ExcludeListSummaryWindow, g_object_unref)
static void ___lambda73__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
VALA_EXTERN void tee_jee_gtk_helper_gtk_messagebox (const gchar* title,
                                        const gchar* message,
                                        GtkWindow* parent_win,
                                        gboolean is_error);
static GtkTreeIter* _vala_GtkTreeIter_copy (GtkTreeIter* self);
static void _vala_GtkTreeIter_free (GtkTreeIter* 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)
static GSList* exclude_box_browse_files (ExcludeBox* self);
static void _g_free0_ (gpointer var);
static inline void _g_slist_free__g_free0_ (GSList* self);
static GSList* exclude_box_browse_folder (ExcludeBox* self);
VALA_EXTERN void users_box_refresh (UsersBox* self);
static void exclude_box_finalize (GObject * obj);
static GType exclude_box_get_type_once (void);

static inline gpointer
exclude_box_get_instance_private (ExcludeBox* self)
{
	return G_STRUCT_MEMBER_P (self, ExcludeBox_private_offset);
}

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

ExcludeBox*
exclude_box_construct (GType object_type,
                       GtkWindow* _parent_window)
{
	ExcludeBox * self = NULL;
	GtkWindow* _tmp0_;
	GtkBox* box = NULL;
	GtkBox* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* buffer = NULL;
	GtkLabel* _tmp4_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	g_return_val_if_fail (_parent_window != NULL, NULL);
	tee_jee_logging_log_debug ("ExcludeBox: ExcludeBox()");
	self = (ExcludeBox*) 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);
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp1_);
	box = _tmp1_;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) box);
	_tmp2_ = tee_jee_gtk_helper_add_label_header (box, _ ("Include / Exclude Patterns"), TRUE);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
	_tmp4_ = tee_jee_gtk_helper_add_label (box, "", FALSE, FALSE, FALSE);
	buffer = _tmp4_;
	gtk_widget_set_hexpand ((GtkWidget*) buffer, TRUE);
	_tmp5_ = tee_jee_gtk_helper_add_label (box, _ ("Click to edit. Drag-drop to re-order."), FALSE, TRUE, FALSE);
	label = _tmp5_;
	_tmp6_ = _g_object_ref0 (label);
	_g_object_unref0 (self->priv->lbl_message);
	self->priv->lbl_message = _tmp6_;
	exclude_box_init_treeview (self);
	exclude_box_init_actions (self);
	exclude_box_refresh_treeview (self);
	tee_jee_logging_log_debug ("ExcludeBox: ExcludeBox(): exit");
	_g_object_unref0 (label);
	_g_object_unref0 (buffer);
	_g_object_unref0 (box);
	return self;
}

ExcludeBox*
exclude_box_new (GtkWindow* _parent_window)
{
	return exclude_box_construct (TYPE_EXCLUDE_BOX, _parent_window);
}

void
exclude_box_set_users_box (ExcludeBox* self,
                           UsersBox* _users_box)
{
	UsersBox* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_users_box != NULL);
	_tmp0_ = _g_object_ref0 (_users_box);
	_g_object_unref0 (self->priv->users_box);
	self->priv->users_box = _tmp0_;
}

static void
__lambda65_ (ExcludeBox* self,
             GtkCellRendererToggle* cell,
             const gchar* path)
{
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	gchar* pattern = NULL;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp12_;
	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_, 0, &_tmp8_, -1);
	_g_free0 (pattern);
	pattern = _tmp8_;
	_tmp9_ = pattern;
	if (!g_str_has_prefix (_tmp9_, "+ ")) {
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = pattern;
		_tmp11_ = g_strdup_printf ("+ %s", _tmp10_);
		_g_free0 (pattern);
		pattern = _tmp11_;
	}
	_tmp12_ = pattern;
	exclude_box_treeview_update_item (self, &iter, _tmp12_);
	exclude_box_save_changes (self);
	_g_free0 (pattern);
	_g_object_unref0 (model);
}

static void
___lambda65__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                               const gchar* path,
                                               gpointer self)
{
	__lambda65_ ((ExcludeBox*) self, _sender, path);
}

static gchar*
string_slice (const gchar* self,
              glong start,
              glong end)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	_tmp4_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
	result = _tmp4_;
	return result;
}

static void
__lambda66_ (ExcludeBox* self,
             GtkCellRendererToggle* cell,
             const gchar* path)
{
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	gchar* pattern = NULL;
	GtkTreeIter iter = {0};
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp15_;
	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_, 0, &_tmp8_, -1);
	_g_free0 (pattern);
	pattern = _tmp8_;
	_tmp9_ = pattern;
	if (g_str_has_prefix (_tmp9_, "+ ")) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gchar* _tmp14_;
		_tmp10_ = pattern;
		_tmp11_ = pattern;
		_tmp12_ = strlen (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = string_slice (_tmp10_, (glong) 2, (glong) _tmp13_);
		_g_free0 (pattern);
		pattern = _tmp14_;
	}
	_tmp15_ = pattern;
	exclude_box_treeview_update_item (self, &iter, _tmp15_);
	exclude_box_save_changes (self);
	_g_free0 (pattern);
	_g_object_unref0 (model);
}

static void
___lambda66__gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender,
                                               const gchar* path,
                                               gpointer self)
{
	__lambda66_ ((ExcludeBox*) self, _sender, path);
}

static void
__lambda67_ (ExcludeBox* self,
             GtkCellLayout* cell_layout,
             GtkCellRenderer* cell,
             GtkTreeModel* model,
             GtkTreeIter* iter)
{
	gchar* pattern = NULL;
	GtkTreeIter _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	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, -1);
	_g_free0 (pattern);
	pattern = _tmp1_;
	_tmp3_ = pattern;
	if (g_str_has_prefix (_tmp3_, "+ ")) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gchar* _tmp8_;
		_tmp4_ = pattern;
		_tmp5_ = pattern;
		_tmp6_ = strlen (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = string_slice (_tmp4_, (glong) 2, (glong) _tmp7_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp8_;
	} else {
		const gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp9_ = pattern;
		_tmp10_ = g_strdup (_tmp9_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp10_;
	}
	g_object_set (G_TYPE_CHECK_INSTANCE_CAST (cell, gtk_cell_renderer_text_get_type (), GtkCellRendererText), "text", _tmp2_, NULL);
	_g_free0 (_tmp2_);
	_g_free0 (pattern);
}

static void
___lambda67__gtk_cell_layout_data_func (GtkCellLayout* cell_layout,
                                        GtkCellRenderer* cell,
                                        GtkTreeModel* tree_model,
                                        GtkTreeIter* iter,
                                        gpointer self)
{
	__lambda67_ ((ExcludeBox*) self, cell_layout, cell, tree_model, iter);
}

static void
__lambda68_ (ExcludeBox* self,
             const gchar* path,
             const gchar* new_text)
{
	GtkTreeIter iter = {0};
	GtkListStore* model = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeModel* _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkListStore* _tmp3_;
	GtkListStore* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	gboolean include = FALSE;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	gboolean _tmp8_ = FALSE;
	gchar* pattern = NULL;
	gchar* _tmp9_;
	GtkListStore* _tmp19_;
	GtkTreeIter _tmp20_;
	const gchar* _tmp21_;
	g_return_if_fail (path != NULL);
	g_return_if_fail (new_text != 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, -1);
	include = _tmp8_;
	_tmp9_ = g_strdup (new_text);
	pattern = _tmp9_;
	if (include) {
		const gchar* _tmp10_;
		_tmp10_ = pattern;
		if (!g_str_has_prefix (_tmp10_, "+ ")) {
			const gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp11_ = pattern;
			_tmp12_ = g_strdup_printf ("+ %s", _tmp11_);
			_g_free0 (pattern);
			pattern = _tmp12_;
		}
	} else {
		const gchar* _tmp13_;
		_tmp13_ = pattern;
		if (g_str_has_prefix (_tmp13_, "+ ")) {
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gint _tmp16_;
			gint _tmp17_;
			gchar* _tmp18_;
			_tmp14_ = pattern;
			_tmp15_ = pattern;
			_tmp16_ = strlen (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = string_slice (_tmp14_, (glong) 2, (glong) _tmp17_);
			_g_free0 (pattern);
			pattern = _tmp18_;
		}
	}
	_tmp19_ = model;
	_tmp20_ = iter;
	_tmp21_ = pattern;
	gtk_list_store_set (_tmp19_, &_tmp20_, 0, _tmp21_, -1, -1);
	exclude_box_save_changes (self);
	_g_free0 (pattern);
	_g_object_unref0 (model);
}

static void
___lambda68__gtk_cell_renderer_text_edited (GtkCellRendererText* _sender,
                                            const gchar* path,
                                            const gchar* new_text,
                                            gpointer self)
{
	__lambda68_ ((ExcludeBox*) self, path, new_text);
}

static void
exclude_box_init_treeview (ExcludeBox* self)
{
	GtkTreeView* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkTreeView* _tmp3_;
	GtkTreeView* _tmp4_;
	GtkTreeView* _tmp5_;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp6_;
	GtkTreeView* _tmp7_;
	GtkTreeViewColumn* col = NULL;
	GtkTreeViewColumn* _tmp8_;
	GtkTreeViewColumn* _tmp9_;
	GtkTreeView* _tmp10_;
	GtkTreeViewColumn* _tmp11_;
	GtkCellRendererToggle* cell_radio = NULL;
	GtkCellRendererToggle* _tmp12_;
	GtkCellRendererToggle* _tmp13_;
	GtkCellRendererToggle* _tmp14_;
	GtkCellRendererToggle* _tmp15_;
	GtkTreeViewColumn* _tmp16_;
	GtkCellRendererToggle* _tmp17_;
	GtkTreeViewColumn* _tmp18_;
	GtkCellRendererToggle* _tmp19_;
	GtkCellRendererToggle* _tmp20_;
	GtkTreeViewColumn* _tmp21_;
	GtkTreeViewColumn* _tmp22_;
	GtkTreeView* _tmp23_;
	GtkTreeViewColumn* _tmp24_;
	GtkCellRendererToggle* _tmp25_;
	GtkCellRendererToggle* _tmp26_;
	GtkCellRendererToggle* _tmp27_;
	GtkCellRendererToggle* _tmp28_;
	GtkTreeViewColumn* _tmp29_;
	GtkCellRendererToggle* _tmp30_;
	GtkTreeViewColumn* _tmp31_;
	GtkCellRendererToggle* _tmp32_;
	GtkCellRendererToggle* _tmp33_;
	GtkTreeViewColumn* _tmp34_;
	GtkTreeViewColumn* _tmp35_;
	GtkTreeView* _tmp36_;
	GtkTreeViewColumn* _tmp37_;
	GtkCellRendererText* cell_text = NULL;
	GtkCellRendererText* _tmp38_;
	GtkCellRendererText* _tmp39_;
	GtkTreeViewColumn* _tmp40_;
	GtkCellRendererText* _tmp41_;
	GtkCellRendererPixbuf* cell_icon = NULL;
	GtkCellRendererPixbuf* _tmp42_;
	GtkTreeViewColumn* _tmp43_;
	GtkTreeViewColumn* _tmp44_;
	GtkCellRendererText* _tmp45_;
	GtkTreeViewColumn* _tmp46_;
	GtkCellRendererText* _tmp47_;
	GtkTreeViewColumn* _tmp48_;
	GtkCellRendererText* _tmp49_;
	GtkCellRendererText* _tmp50_;
	GtkCellRendererText* _tmp51_;
	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_, TRUE);
	_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_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp8_);
	col = _tmp8_;
	_tmp9_ = col;
	gtk_tree_view_column_set_title (_tmp9_, "+");
	_tmp10_ = self->priv->treeview;
	_tmp11_ = col;
	gtk_tree_view_append_column (_tmp10_, _tmp11_);
	_tmp12_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp12_);
	cell_radio = _tmp12_;
	_tmp13_ = cell_radio;
	g_object_set ((GtkCellRenderer*) _tmp13_, "xpad", (guint) 2, NULL);
	_tmp14_ = cell_radio;
	gtk_cell_renderer_toggle_set_radio (_tmp14_, TRUE);
	_tmp15_ = cell_radio;
	gtk_cell_renderer_toggle_set_activatable (_tmp15_, TRUE);
	_tmp16_ = col;
	_tmp17_ = cell_radio;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp16_, (GtkCellRenderer*) _tmp17_, FALSE);
	_tmp18_ = col;
	_tmp19_ = cell_radio;
	gtk_tree_view_column_set_attributes (_tmp18_, (GtkCellRenderer*) _tmp19_, "active", 2, NULL);
	_tmp20_ = cell_radio;
	g_signal_connect_object (_tmp20_, "toggled", (GCallback) ___lambda65__gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp21_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (col);
	col = _tmp21_;
	_tmp22_ = col;
	gtk_tree_view_column_set_title (_tmp22_, "-");
	_tmp23_ = self->priv->treeview;
	_tmp24_ = col;
	gtk_tree_view_append_column (_tmp23_, _tmp24_);
	_tmp25_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (cell_radio);
	cell_radio = _tmp25_;
	_tmp26_ = cell_radio;
	g_object_set ((GtkCellRenderer*) _tmp26_, "xpad", (guint) 2, NULL);
	_tmp27_ = cell_radio;
	gtk_cell_renderer_toggle_set_radio (_tmp27_, TRUE);
	_tmp28_ = cell_radio;
	gtk_cell_renderer_toggle_set_activatable (_tmp28_, TRUE);
	_tmp29_ = col;
	_tmp30_ = cell_radio;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp29_, (GtkCellRenderer*) _tmp30_, FALSE);
	_tmp31_ = col;
	_tmp32_ = cell_radio;
	gtk_tree_view_column_set_attributes (_tmp31_, (GtkCellRenderer*) _tmp32_, "active", 3, NULL);
	_tmp33_ = cell_radio;
	g_signal_connect_object (_tmp33_, "toggled", (GCallback) ___lambda66__gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp34_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (col);
	col = _tmp34_;
	_tmp35_ = col;
	gtk_tree_view_column_set_title (_tmp35_, _ ("Pattern"));
	_tmp36_ = self->priv->treeview;
	_tmp37_ = col;
	gtk_tree_view_append_column (_tmp36_, _tmp37_);
	_tmp38_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp38_);
	cell_text = _tmp38_;
	_tmp39_ = cell_text;
	g_object_set (_tmp39_, "text", "", NULL);
	_tmp40_ = col;
	_tmp41_ = cell_text;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp40_, (GtkCellRenderer*) _tmp41_, FALSE);
	_tmp42_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	g_object_ref_sink (_tmp42_);
	cell_icon = _tmp42_;
	_tmp43_ = col;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp43_, (GtkCellRenderer*) cell_icon, FALSE);
	_tmp44_ = col;
	gtk_tree_view_column_set_attributes (_tmp44_, (GtkCellRenderer*) cell_icon, "icon-name", 1, NULL);
	_tmp45_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp45_);
	_g_object_unref0 (cell_text);
	cell_text = _tmp45_;
	_tmp46_ = col;
	_tmp47_ = cell_text;
	gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp46_, (GtkCellRenderer*) _tmp47_, FALSE);
	_tmp48_ = col;
	_tmp49_ = cell_text;
	gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) _tmp48_, (GtkCellRenderer*) _tmp49_, ___lambda67__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
	_tmp50_ = cell_text;
	g_object_set (_tmp50_, "editable", TRUE, NULL);
	_tmp51_ = cell_text;
	g_signal_connect_object (_tmp51_, "edited", (GCallback) ___lambda68__gtk_cell_renderer_text_edited, self, 0);
	_g_object_unref0 (cell_icon);
	_g_object_unref0 (cell_text);
	_g_object_unref0 (cell_radio);
	_g_object_unref0 (col);
	_g_object_unref0 (scrolled);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
__lambda69_ (ExcludeBox* self)
{
	gchar* pattern = NULL;
	GtkWindow* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	_tmp0_ = self->priv->parent_window;
	_tmp1_ = tee_jee_gtk_helper_gtk_inputbox (_ ("Exclude Pattern"), _ ("Enter the pattern to exclude (Ex: *.mp3, *.bak)"), _tmp0_, FALSE);
	pattern = _tmp1_;
	_tmp3_ = pattern;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp4_ = pattern;
		_tmp5_ = string_strip (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = strlen (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ > 0;
		_g_free0 (_tmp6_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkTreeView* _tmp9_;
		const gchar* _tmp10_;
		_tmp9_ = self->priv->treeview;
		_tmp10_ = pattern;
		exclude_box_treeview_add_item (self, _tmp9_, _tmp10_);
		main_first_snapshot_size = (guint64) 0;
	}
	exclude_box_save_changes (self);
	_g_free0 (pattern);
}

static void
___lambda69__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda69_ ((ExcludeBox*) self);
}

static void
__lambda70_ (ExcludeBox* self)
{
	exclude_box_add_files_clicked (self);
}

static void
___lambda70__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda70_ ((ExcludeBox*) self);
}

static void
__lambda71_ (ExcludeBox* self)
{
	exclude_box_add_folder_clicked (self);
}

static void
___lambda71__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda71_ ((ExcludeBox*) self);
}

static void
__lambda72_ (ExcludeBox* self)
{
	exclude_box_remove_clicked (self);
}

static void
___lambda72__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda72_ ((ExcludeBox*) self);
}

static void
__lambda73_ (ExcludeBox* self)
{
	ExcludeListSummaryWindow* _tmp0_;
	ExcludeListSummaryWindow* _tmp1_;
	exclude_box_save_changes (self);
	_tmp0_ = exclude_list_summary_window_new (FALSE);
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	_g_object_unref0 (_tmp1_);
}

static void
___lambda73__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda73_ ((ExcludeBox*) self);
}

static void
exclude_box_init_actions (ExcludeBox* self)
{
	GtkBox* hbox = NULL;
	GtkBox* _tmp0_;
	GtkSizeGroup* size_group = NULL;
	GtkSizeGroup* _tmp1_;
	GtkButton* button = NULL;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp0_);
	hbox = _tmp0_;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) hbox);
	_tmp1_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	size_group = _tmp1_;
	_tmp2_ = tee_jee_gtk_helper_add_button (hbox, _ ("Add"), _ ("Add custom pattern"), size_group, NULL);
	button = _tmp2_;
	_tmp3_ = button;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) ___lambda69__gtk_button_clicked, self, 0);
	_tmp4_ = tee_jee_gtk_helper_add_button (hbox, _ ("Add Files"), _ ("Add files"), size_group, NULL);
	_g_object_unref0 (button);
	button = _tmp4_;
	_tmp5_ = button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) ___lambda70__gtk_button_clicked, self, 0);
	_tmp6_ = tee_jee_gtk_helper_add_button (hbox, _ ("Add Folders"), _ ("Add directories"), size_group, NULL);
	_g_object_unref0 (button);
	button = _tmp6_;
	_tmp7_ = button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) ___lambda71__gtk_button_clicked, self, 0);
	_tmp8_ = tee_jee_gtk_helper_add_button (hbox, _ ("Remove"), "", size_group, NULL);
	_g_object_unref0 (button);
	button = _tmp8_;
	_tmp9_ = button;
	g_signal_connect_object (_tmp9_, "clicked", (GCallback) ___lambda72__gtk_button_clicked, self, 0);
	_tmp10_ = tee_jee_gtk_helper_add_button (hbox, _ ("Summary"), "", size_group, NULL);
	_g_object_unref0 (button);
	button = _tmp10_;
	_tmp11_ = button;
	g_signal_connect_object (_tmp11_, "clicked", (GCallback) ___lambda73__gtk_button_clicked, self, 0);
	_g_object_unref0 (button);
	_g_object_unref0 (size_group);
	_g_object_unref0 (hbox);
}

static GtkTreeIter*
_vala_GtkTreeIter_copy (GtkTreeIter* self)
{
	return g_boxed_copy (gtk_tree_iter_get_type (), self);
}

static void
_vala_GtkTreeIter_free (GtkTreeIter* self)
{
	g_boxed_free (gtk_tree_iter_get_type (), self);
}

static void
exclude_box_remove_clicked (ExcludeBox* self)
{
	GtkTreeSelection* sel = NULL;
	GtkTreeView* _tmp0_;
	GtkTreeSelection* _tmp1_;
	GtkTreeSelection* _tmp2_;
	GtkListStore* store = NULL;
	GtkTreeView* _tmp3_;
	GtkTreeModel* _tmp4_;
	GtkTreeModel* _tmp5_;
	GtkListStore* _tmp6_;
	GtkTreeSelection* _tmp7_;
	GtkTreeIter iter = {0};
	GeeArrayList* iter_list = NULL;
	GeeArrayList* _tmp13_;
	gboolean iterExists = FALSE;
	GtkListStore* _tmp14_;
	GtkTreeIter _tmp15_ = {0};
	gboolean _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->treeview;
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	sel = _tmp2_;
	_tmp3_ = self->priv->treeview;
	_tmp4_ = gtk_tree_view_get_model (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_list_store_get_type (), GtkListStore));
	store = _tmp6_;
	_tmp7_ = sel;
	if (gtk_tree_selection_count_selected_rows (_tmp7_) == 0) {
		gchar* title = NULL;
		gchar* _tmp8_;
		gchar* message = NULL;
		gchar* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GtkWindow* _tmp12_;
		_tmp8_ = g_strdup (_ ("Items Not Selected"));
		title = _tmp8_;
		_tmp9_ = g_strdup (_ ("Select the items to be removed from the list"));
		message = _tmp9_;
		_tmp10_ = title;
		_tmp11_ = message;
		_tmp12_ = self->priv->parent_window;
		tee_jee_gtk_helper_gtk_messagebox (_tmp10_, _tmp11_, _tmp12_, TRUE);
		_g_free0 (message);
		_g_free0 (title);
		_g_object_unref0 (store);
		_g_object_unref0 (sel);
		return;
	}
	_tmp13_ = gee_array_list_new (gtk_tree_iter_get_type (), (GBoxedCopyFunc) _vala_GtkTreeIter_copy, (GDestroyNotify) _vala_GtkTreeIter_free, NULL, NULL, NULL);
	iter_list = _tmp13_;
	_tmp14_ = store;
	_tmp16_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp14_, &_tmp15_);
	iter = _tmp15_;
	iterExists = _tmp16_;
	while (TRUE) {
		GtkTreeSelection* _tmp17_;
		GtkTreeIter _tmp18_;
		GtkListStore* _tmp30_;
		gboolean _tmp31_;
		if (!iterExists) {
			break;
		}
		_tmp17_ = sel;
		_tmp18_ = iter;
		if (gtk_tree_selection_iter_is_selected (_tmp17_, &_tmp18_)) {
			gchar* pattern = NULL;
			GtkListStore* _tmp19_;
			GtkTreeIter _tmp20_;
			gchar* _tmp21_ = NULL;
			Main* _tmp22_;
			GeeArrayList* _tmp23_;
			const gchar* _tmp24_;
			GeeArrayList* _tmp25_;
			GtkTreeIter _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			_tmp19_ = store;
			_tmp20_ = iter;
			gtk_tree_model_get ((GtkTreeModel*) _tmp19_, &_tmp20_, 0, &_tmp21_, -1);
			_g_free0 (pattern);
			pattern = _tmp21_;
			_tmp22_ = App;
			_tmp23_ = _tmp22_->exclude_list_user;
			_tmp24_ = pattern;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp23_, _tmp24_);
			_tmp25_ = iter_list;
			_tmp26_ = iter;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, &_tmp26_);
			_tmp27_ = pattern;
			_tmp28_ = g_strdup_printf ("removed item: %s", _tmp27_);
			_tmp29_ = _tmp28_;
			tee_jee_logging_log_debug (_tmp29_);
			_g_free0 (_tmp29_);
			main_first_snapshot_size = (guint64) 0;
			_g_free0 (pattern);
		}
		_tmp30_ = store;
		_tmp31_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp30_, &iter);
		iterExists = _tmp31_;
	}
	exclude_box_refresh_treeview (self);
	exclude_box_save_changes (self);
	_g_object_unref0 (iter_list);
	_g_object_unref0 (store);
	_g_object_unref0 (sel);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_slist_free__g_free0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_free0_);
}

static void
exclude_box_add_files_clicked (ExcludeBox* self)
{
	GSList* list = NULL;
	GSList* _tmp0_;
	GSList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = exclude_box_browse_files (self);
	list = _tmp0_;
	_tmp1_ = list;
	if (g_slist_length (_tmp1_) > ((guint) 0)) {
		GSList* _tmp2_;
		_tmp2_ = list;
		{
			GSList* item_collection = NULL;
			GSList* item_it = NULL;
			item_collection = _tmp2_;
			for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
				gchar* _tmp3_;
				gchar* item = NULL;
				_tmp3_ = g_strdup ((const gchar*) item_it->data);
				item = _tmp3_;
				{
					gchar* pattern = NULL;
					const gchar* _tmp4_;
					gchar* _tmp5_;
					Main* _tmp6_;
					GeeArrayList* _tmp7_;
					const gchar* _tmp8_;
					_tmp4_ = item;
					_tmp5_ = g_strdup (_tmp4_);
					pattern = _tmp5_;
					_tmp6_ = App;
					_tmp7_ = _tmp6_->exclude_list_user;
					_tmp8_ = pattern;
					if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp7_, _tmp8_)) {
						Main* _tmp9_;
						GeeArrayList* _tmp10_;
						const gchar* _tmp11_;
						GtkTreeView* _tmp12_;
						const gchar* _tmp13_;
						const gchar* _tmp14_;
						gchar* _tmp15_;
						gchar* _tmp16_;
						_tmp9_ = App;
						_tmp10_ = _tmp9_->exclude_list_user;
						_tmp11_ = pattern;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, _tmp11_);
						_tmp12_ = self->priv->treeview;
						_tmp13_ = pattern;
						exclude_box_treeview_add_item (self, _tmp12_, _tmp13_);
						_tmp14_ = pattern;
						_tmp15_ = g_strdup_printf ("file: %s", _tmp14_);
						_tmp16_ = _tmp15_;
						tee_jee_logging_log_debug (_tmp16_);
						_g_free0 (_tmp16_);
						main_first_snapshot_size = (guint64) 0;
					} else {
						const gchar* _tmp17_;
						gchar* _tmp18_;
						gchar* _tmp19_;
						_tmp17_ = pattern;
						_tmp18_ = g_strdup_printf ("exclude_list_user contains: %s", _tmp17_);
						_tmp19_ = _tmp18_;
						tee_jee_logging_log_debug (_tmp19_);
						_g_free0 (_tmp19_);
					}
					_g_free0 (pattern);
					_g_free0 (item);
				}
			}
		}
	}
	exclude_box_save_changes (self);
	(list == NULL) ? NULL : (list = (_g_slist_free__g_free0_ (list), NULL));
}

static void
exclude_box_add_folder_clicked (ExcludeBox* self)
{
	GSList* list = NULL;
	GSList* _tmp0_;
	GSList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = exclude_box_browse_folder (self);
	list = _tmp0_;
	_tmp1_ = list;
	if (g_slist_length (_tmp1_) > ((guint) 0)) {
		GSList* _tmp2_;
		_tmp2_ = list;
		{
			GSList* item_collection = NULL;
			GSList* item_it = NULL;
			item_collection = _tmp2_;
			for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
				gchar* _tmp3_;
				gchar* item = NULL;
				_tmp3_ = g_strdup ((const gchar*) item_it->data);
				item = _tmp3_;
				{
					gchar* pattern = NULL;
					const gchar* _tmp4_;
					gchar* _tmp5_;
					const gchar* _tmp6_;
					Main* _tmp9_;
					GeeArrayList* _tmp10_;
					const gchar* _tmp11_;
					_tmp4_ = item;
					_tmp5_ = g_strdup (_tmp4_);
					pattern = _tmp5_;
					_tmp6_ = pattern;
					if (!g_str_has_suffix (_tmp6_, "/***")) {
						const gchar* _tmp7_;
						gchar* _tmp8_;
						_tmp7_ = pattern;
						_tmp8_ = g_strdup_printf ("%s/***", _tmp7_);
						_g_free0 (pattern);
						pattern = _tmp8_;
					}
					_tmp9_ = App;
					_tmp10_ = _tmp9_->exclude_list_user;
					_tmp11_ = pattern;
					if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp10_, _tmp11_)) {
						Main* _tmp12_;
						GeeArrayList* _tmp13_;
						const gchar* _tmp14_;
						GtkTreeView* _tmp15_;
						const gchar* _tmp16_;
						const gchar* _tmp17_;
						gchar* _tmp18_;
						gchar* _tmp19_;
						_tmp12_ = App;
						_tmp13_ = _tmp12_->exclude_list_user;
						_tmp14_ = pattern;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp14_);
						_tmp15_ = self->priv->treeview;
						_tmp16_ = pattern;
						exclude_box_treeview_add_item (self, _tmp15_, _tmp16_);
						_tmp17_ = pattern;
						_tmp18_ = g_strdup_printf ("folder: %s", _tmp17_);
						_tmp19_ = _tmp18_;
						tee_jee_logging_log_debug (_tmp19_);
						_g_free0 (_tmp19_);
						main_first_snapshot_size = (guint64) 0;
					} else {
						const gchar* _tmp20_;
						gchar* _tmp21_;
						gchar* _tmp22_;
						_tmp20_ = pattern;
						_tmp21_ = g_strdup_printf ("exclude_list_user contains: %s", _tmp20_);
						_tmp22_ = _tmp21_;
						tee_jee_logging_log_debug (_tmp22_);
						_g_free0 (_tmp22_);
					}
					_g_free0 (pattern);
					_g_free0 (item);
				}
			}
		}
	}
	exclude_box_save_changes (self);
	(list == NULL) ? NULL : (list = (_g_slist_free__g_free0_ (list), NULL));
}

static GSList*
exclude_box_browse_files (ExcludeBox* self)
{
	GSList* list = NULL;
	GtkFileChooserDialog* dialog = NULL;
	GtkWindow* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	GtkWindow* _tmp4_;
	GtkFileChooserDialog* _tmp5_;
	GtkFileChooserDialog* _tmp6_;
	GtkFileChooserDialog* _tmp7_;
	gint resp = 0;
	GtkFileChooserDialog* _tmp8_;
	GtkFileChooserDialog* _tmp11_;
	GSList* result;
	g_return_val_if_fail (self != NULL, NULL);
	list = NULL;
	_tmp0_ = self->priv->parent_window;
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_ ("Select file(s)"), _tmp0_, GTK_FILE_CHOOSER_ACTION_OPEN, "gtk-cancel", GTK_RESPONSE_CANCEL, "gtk-open", GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	_tmp2_ = dialog;
	gtk_file_chooser_set_action ((GtkFileChooser*) _tmp2_, GTK_FILE_CHOOSER_ACTION_OPEN);
	_tmp3_ = dialog;
	_tmp4_ = self->priv->parent_window;
	gtk_window_set_transient_for ((GtkWindow*) _tmp3_, _tmp4_);
	_tmp5_ = dialog;
	gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp5_, TRUE);
	_tmp6_ = dialog;
	gtk_window_set_modal ((GtkWindow*) _tmp6_, TRUE);
	_tmp7_ = dialog;
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _tmp7_, TRUE);
	_tmp8_ = dialog;
	resp = gtk_dialog_run ((GtkDialog*) _tmp8_);
	if (resp != ((gint) GTK_RESPONSE_CANCEL)) {
		GtkFileChooserDialog* _tmp9_;
		GSList* _tmp10_;
		_tmp9_ = dialog;
		_tmp10_ = gtk_file_chooser_get_filenames ((GtkFileChooser*) _tmp9_);
		(list == NULL) ? NULL : (list = (_g_slist_free__g_free0_ (list), NULL));
		list = _tmp10_;
	}
	_tmp11_ = dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp11_);
	result = list;
	_g_object_unref0 (dialog);
	return result;
}

static GSList*
exclude_box_browse_folder (ExcludeBox* self)
{
	GSList* list = NULL;
	GtkFileChooserDialog* dialog = NULL;
	GtkWindow* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileChooserDialog* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	GtkFileChooserDialog* _tmp4_;
	GtkWindow* _tmp5_;
	GtkFileChooserDialog* _tmp6_;
	GtkFileChooserDialog* _tmp7_;
	gint resp = 0;
	GtkFileChooserDialog* _tmp8_;
	GtkFileChooserDialog* _tmp11_;
	GSList* result;
	g_return_val_if_fail (self != NULL, NULL);
	list = NULL;
	_tmp0_ = self->priv->parent_window;
	_tmp1_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_ ("Select directory"), _tmp0_, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, "gtk-cancel", GTK_RESPONSE_CANCEL, "gtk-open", GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	_tmp2_ = dialog;
	gtk_file_chooser_set_action ((GtkFileChooser*) _tmp2_, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
	_tmp3_ = dialog;
	gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp3_, TRUE);
	_tmp4_ = dialog;
	_tmp5_ = self->priv->parent_window;
	gtk_window_set_transient_for ((GtkWindow*) _tmp4_, _tmp5_);
	_tmp6_ = dialog;
	gtk_window_set_modal ((GtkWindow*) _tmp6_, TRUE);
	_tmp7_ = dialog;
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _tmp7_, FALSE);
	_tmp8_ = dialog;
	resp = gtk_dialog_run ((GtkDialog*) _tmp8_);
	if (resp != ((gint) GTK_RESPONSE_CANCEL)) {
		GtkFileChooserDialog* _tmp9_;
		GSList* _tmp10_;
		_tmp9_ = dialog;
		_tmp10_ = gtk_file_chooser_get_filenames ((GtkFileChooser*) _tmp9_);
		(list == NULL) ? NULL : (list = (_g_slist_free__g_free0_ (list), NULL));
		list = _tmp10_;
	}
	_tmp11_ = dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp11_);
	result = list;
	_g_object_unref0 (dialog);
	return result;
}

void
exclude_box_refresh_treeview (ExcludeBox* self)
{
	GtkListStore* model = NULL;
	GtkListStore* _tmp0_;
	GtkTreeView* _tmp1_;
	GtkListStore* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, -1);
	model = _tmp0_;
	_tmp1_ = self->priv->treeview;
	_tmp2_ = model;
	gtk_tree_view_set_model (_tmp1_, (GtkTreeModel*) _tmp2_);
	{
		GeeArrayList* _pattern_list = NULL;
		Main* _tmp3_;
		GeeArrayList* _tmp4_;
		gint _pattern_size = 0;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _pattern_index = 0;
		_tmp3_ = App;
		_tmp4_ = _tmp3_->exclude_list_user;
		_pattern_list = _tmp4_;
		_tmp5_ = _pattern_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_pattern_size = _tmp7_;
		_pattern_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gchar* pattern = NULL;
			GeeArrayList* _tmp10_;
			gpointer _tmp11_;
			GtkTreeView* _tmp12_;
			const gchar* _tmp13_;
			_pattern_index = _pattern_index + 1;
			_tmp8_ = _pattern_index;
			_tmp9_ = _pattern_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _pattern_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _pattern_index);
			pattern = (gchar*) _tmp11_;
			_tmp12_ = self->priv->treeview;
			_tmp13_ = pattern;
			exclude_box_treeview_add_item (self, _tmp12_, _tmp13_);
			_g_free0 (pattern);
		}
	}
	_g_object_unref0 (model);
}

static void
exclude_box_treeview_add_item (ExcludeBox* self,
                               GtkTreeView* treeview,
                               const gchar* pattern)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GtkTreeIter iter = {0};
	GtkListStore* model = NULL;
	GtkTreeModel* _tmp2_;
	GtkTreeModel* _tmp3_;
	GtkListStore* _tmp4_;
	GtkListStore* _tmp5_;
	GtkTreeIter _tmp6_ = {0};
	gboolean include = FALSE;
	GtkListStore* _tmp7_;
	GtkTreeIter _tmp8_;
	const gchar* _tmp9_ = NULL;
	GtkListStore* _tmp10_;
	GtkTreeIter _tmp11_;
	GtkListStore* _tmp12_;
	GtkTreeIter _tmp13_;
	GtkListStore* _tmp14_;
	GtkTreeIter _tmp15_;
	GtkAdjustment* adj = NULL;
	GtkAdjustment* _tmp16_;
	GtkAdjustment* _tmp17_;
	gdouble _tmp18_;
	gdouble _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (treeview != NULL);
	g_return_if_fail (pattern != NULL);
	_tmp0_ = g_strdup_printf ("treeview_add_item(): %s", pattern);
	_tmp1_ = _tmp0_;
	tee_jee_logging_log_debug (_tmp1_);
	_g_free0 (_tmp1_);
	_tmp2_ = gtk_tree_view_get_model (treeview);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_list_store_get_type (), GtkListStore));
	model = _tmp4_;
	_tmp5_ = model;
	gtk_list_store_append (_tmp5_, &_tmp6_);
	iter = _tmp6_;
	include = g_str_has_prefix (pattern, "+ ");
	_tmp7_ = model;
	_tmp8_ = iter;
	gtk_list_store_set (_tmp7_, &_tmp8_, 0, pattern, -1);
	if (include) {
		_tmp9_ = "list-add";
	} else {
		_tmp9_ = "list-remove";
	}
	_tmp10_ = model;
	_tmp11_ = iter;
	gtk_list_store_set (_tmp10_, &_tmp11_, 1, _tmp9_, -1);
	_tmp12_ = model;
	_tmp13_ = iter;
	gtk_list_store_set (_tmp12_, &_tmp13_, 2, include, -1);
	_tmp14_ = model;
	_tmp15_ = iter;
	gtk_list_store_set (_tmp14_, &_tmp15_, 3, !include, -1);
	_tmp16_ = gtk_scrollable_get_hadjustment (G_TYPE_CHECK_INSTANCE_CAST (treeview, gtk_scrollable_get_type (), GtkScrollable));
	_tmp17_ = _g_object_ref0 (_tmp16_);
	adj = _tmp17_;
	_tmp18_ = gtk_adjustment_get_upper (adj);
	_tmp19_ = _tmp18_;
	gtk_adjustment_set_value (adj, _tmp19_);
	_g_object_unref0 (adj);
	_g_object_unref0 (model);
}

static void
exclude_box_treeview_update_item (ExcludeBox* self,
                                  GtkTreeIter* iter,
                                  const gchar* pattern)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean include = FALSE;
	GtkListStore* model = NULL;
	GtkTreeView* _tmp2_;
	GtkTreeModel* _tmp3_;
	GtkTreeModel* _tmp4_;
	GtkListStore* _tmp5_;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_;
	const gchar* _tmp8_ = NULL;
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	GtkListStore* _tmp11_;
	GtkTreeIter _tmp12_;
	GtkListStore* _tmp13_;
	GtkTreeIter _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (iter != NULL);
	g_return_if_fail (pattern != NULL);
	_tmp0_ = g_strdup_printf ("treeview_update_item(): %s", pattern);
	_tmp1_ = _tmp0_;
	tee_jee_logging_log_debug (_tmp1_);
	_g_free0 (_tmp1_);
	include = g_str_has_prefix (pattern, "+ ");
	_tmp2_ = self->priv->treeview;
	_tmp3_ = gtk_tree_view_get_model (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_store_get_type (), GtkListStore));
	model = _tmp5_;
	_tmp6_ = model;
	_tmp7_ = *iter;
	gtk_list_store_set (_tmp6_, &_tmp7_, 0, pattern, -1);
	if (include) {
		_tmp8_ = "list-add";
	} else {
		_tmp8_ = "list-remove";
	}
	_tmp9_ = model;
	_tmp10_ = *iter;
	gtk_list_store_set (_tmp9_, &_tmp10_, 1, _tmp8_, -1);
	_tmp11_ = model;
	_tmp12_ = *iter;
	gtk_list_store_set (_tmp11_, &_tmp12_, 2, include, -1);
	_tmp13_ = model;
	_tmp14_ = *iter;
	gtk_list_store_set (_tmp13_, &_tmp14_, 3, !include, -1);
	_g_object_unref0 (model);
}

void
exclude_box_save_changes (ExcludeBox* self)
{
	Main* _tmp0_;
	GeeArrayList* _tmp1_;
	GtkTreeIter iter = {0};
	GtkListStore* store = NULL;
	GtkTreeView* _tmp2_;
	GtkTreeModel* _tmp3_;
	GtkTreeModel* _tmp4_;
	GtkListStore* _tmp5_;
	gboolean iterExists = FALSE;
	GtkListStore* _tmp6_;
	GtkTreeIter _tmp7_ = {0};
	gboolean _tmp8_;
	UsersBox* _tmp38_;
	g_return_if_fail (self != NULL);
	_tmp0_ = App;
	_tmp1_ = _tmp0_->exclude_list_user;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp1_);
	_tmp2_ = self->priv->treeview;
	_tmp3_ = gtk_tree_view_get_model (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_store_get_type (), GtkListStore));
	store = _tmp5_;
	_tmp6_ = store;
	_tmp8_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp6_, &_tmp7_);
	iter = _tmp7_;
	iterExists = _tmp8_;
	while (TRUE) {
		gchar* pattern = NULL;
		GtkListStore* _tmp9_;
		GtkTreeIter _tmp10_;
		gchar* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		Main* _tmp14_;
		GeeArrayList* _tmp15_;
		const gchar* _tmp16_;
		GtkListStore* _tmp26_;
		gboolean _tmp27_;
		if (!iterExists) {
			break;
		}
		_tmp9_ = store;
		_tmp10_ = iter;
		gtk_tree_model_get ((GtkTreeModel*) _tmp9_, &_tmp10_, 0, &_tmp11_, -1);
		_g_free0 (pattern);
		pattern = _tmp11_;
		_tmp14_ = App;
		_tmp15_ = _tmp14_->exclude_list_user;
		_tmp16_ = pattern;
		if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp15_, _tmp16_)) {
			Main* _tmp17_;
			GeeArrayList* _tmp18_;
			const gchar* _tmp19_;
			_tmp17_ = App;
			_tmp18_ = _tmp17_->exclude_list_default;
			_tmp19_ = pattern;
			_tmp13_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp18_, _tmp19_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			Main* _tmp20_;
			GeeArrayList* _tmp21_;
			const gchar* _tmp22_;
			_tmp20_ = App;
			_tmp21_ = _tmp20_->exclude_list_home;
			_tmp22_ = pattern;
			_tmp12_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp21_, _tmp22_);
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			Main* _tmp23_;
			GeeArrayList* _tmp24_;
			const gchar* _tmp25_;
			_tmp23_ = App;
			_tmp24_ = _tmp23_->exclude_list_user;
			_tmp25_ = pattern;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, _tmp25_);
		}
		_tmp26_ = store;
		_tmp27_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp26_, &iter);
		iterExists = _tmp27_;
		_g_free0 (pattern);
	}
	tee_jee_logging_log_debug ("save_changes(): exclude_list_user:");
	{
		GeeArrayList* _item_list = NULL;
		Main* _tmp28_;
		GeeArrayList* _tmp29_;
		gint _item_size = 0;
		GeeArrayList* _tmp30_;
		gint _tmp31_;
		gint _tmp32_;
		gint _item_index = 0;
		_tmp28_ = App;
		_tmp29_ = _tmp28_->exclude_list_user;
		_item_list = _tmp29_;
		_tmp30_ = _item_list;
		_tmp31_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp30_);
		_tmp32_ = _tmp31_;
		_item_size = _tmp32_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp33_;
			gint _tmp34_;
			gchar* item = NULL;
			GeeArrayList* _tmp35_;
			gpointer _tmp36_;
			const gchar* _tmp37_;
			_item_index = _item_index + 1;
			_tmp33_ = _item_index;
			_tmp34_ = _item_size;
			if (!(_tmp33_ < _tmp34_)) {
				break;
			}
			_tmp35_ = _item_list;
			_tmp36_ = gee_abstract_list_get ((GeeAbstractList*) _tmp35_, _item_index);
			item = (gchar*) _tmp36_;
			_tmp37_ = item;
			tee_jee_logging_log_debug (_tmp37_);
			_g_free0 (item);
		}
	}
	tee_jee_logging_log_debug ("");
	_tmp38_ = self->priv->users_box;
	users_box_refresh (_tmp38_);
	_g_object_unref0 (store);
}

static void
exclude_box_class_init (ExcludeBoxClass * klass,
                        gpointer klass_data)
{
	exclude_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ExcludeBox_private_offset);
	G_OBJECT_CLASS (klass)->finalize = exclude_box_finalize;
}

static void
exclude_box_instance_init (ExcludeBox * self,
                           gpointer klass)
{
	self->priv = exclude_box_get_instance_private (self);
}

static void
exclude_box_finalize (GObject * obj)
{
	ExcludeBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EXCLUDE_BOX, ExcludeBox);
	_g_object_unref0 (self->priv->treeview);
	_g_object_unref0 (self->priv->parent_window);
	_g_object_unref0 (self->priv->users_box);
	_g_object_unref0 (self->priv->lbl_message);
	G_OBJECT_CLASS (exclude_box_parent_class)->finalize (obj);
}

static GType
exclude_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ExcludeBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) exclude_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExcludeBox), 0, (GInstanceInitFunc) exclude_box_instance_init, NULL };
	GType exclude_box_type_id;
	exclude_box_type_id = g_type_register_static (gtk_box_get_type (), "ExcludeBox", &g_define_type_info, 0);
	ExcludeBox_private_offset = g_type_add_instance_private (exclude_box_type_id, sizeof (ExcludeBoxPrivate));
	return exclude_box_type_id;
}

GType
exclude_box_get_type (void)
{
	static volatile gsize exclude_box_type_id__once = 0;
	if (g_once_init_enter (&exclude_box_type_id__once)) {
		GType exclude_box_type_id;
		exclude_box_type_id = exclude_box_get_type_once ();
		g_once_init_leave (&exclude_box_type_id__once, exclude_box_type_id);
	}
	return exclude_box_type_id__once;
}

