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

/*
 * ScheduleBox.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>
#include <pango/pango.h>
#include <cairo-gobject.h>

#define ICON_MANAGER_SHIELD_HIGH "timeshift-shield-high"
#define ICON_MANAGER_SHIELD_ICON_SIZE 64
#define ICON_MANAGER_SHIELD_LOW "timeshift-shield-low"
#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_SCHEDULE_BOX (schedule_box_get_type ())
#define SCHEDULE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEDULE_BOX, ScheduleBox))
#define SCHEDULE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEDULE_BOX, ScheduleBoxClass))
#define IS_SCHEDULE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEDULE_BOX))
#define IS_SCHEDULE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEDULE_BOX))
#define SCHEDULE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEDULE_BOX, ScheduleBoxClass))

typedef struct _ScheduleBox ScheduleBox;
typedef struct _ScheduleBoxClass ScheduleBoxClass;
typedef struct _ScheduleBoxPrivate ScheduleBoxPrivate;
enum  {
	SCHEDULE_BOX_0_PROPERTY,
	SCHEDULE_BOX_NUM_PROPERTIES
};
static GParamSpec* schedule_box_properties[SCHEDULE_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block9Data Block9Data;

#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;
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block10Data Block10Data;

struct _ScheduleBox {
	GtkBox parent_instance;
	ScheduleBoxPrivate * priv;
};

struct _ScheduleBoxClass {
	GtkBoxClass parent_class;
};

struct _ScheduleBoxPrivate {
	GtkImage* img_shield;
	GtkLabel* lbl_shield;
	GtkLabel* lbl_shield_subnote;
	GtkSizeGroup* sg_title;
	GtkSizeGroup* sg_subtitle;
	GtkSizeGroup* sg_count;
	GtkCheckButton* chk_cron;
	GtkWindow* parent_window;
};

struct _Block9Data {
	int _ref_count_;
	ScheduleBox* self;
	GtkCheckButton* chk_m;
	GtkCheckButton* chk_w;
	GtkCheckButton* chk_d;
	GtkCheckButton* chk_h;
	GtkCheckButton* chk_b;
	GtkSpinButton* spin_m;
	GtkSpinButton* spin_w;
	GtkSpinButton* spin_d;
	GtkSpinButton* spin_h;
	GtkSpinButton* spin_b;
};

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

struct _MainClass {
	GObjectClass parent_class;
};

struct _Block10Data {
	int _ref_count_;
	ScheduleBox* self;
	GtkLabel* label;
	GtkSpinButton* spin2;
};

static gint ScheduleBox_private_offset;
static gpointer schedule_box_parent_class = NULL;
VALA_EXTERN Main* App;

VALA_EXTERN GType schedule_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScheduleBox, g_object_unref)
VALA_EXTERN ScheduleBox* schedule_box_new (GtkWindow* _parent_window);
VALA_EXTERN ScheduleBox* schedule_box_construct (GType object_type,
                                     GtkWindow* _parent_window);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
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);
static void schedule_box_add_schedule_option (ScheduleBox* self,
                                       GtkBox* box,
                                       const gchar* period,
                                       const gchar* period_desc,
                                       GtkCheckButton** chk,
                                       GtkSpinButton** spin);
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 void __lambda54_ (Block9Data* _data9_);
VALA_EXTERN gboolean main_get_scheduled (Main* self);
VALA_EXTERN void schedule_box_update_statusbar (ScheduleBox* self);
static void ___lambda54__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda55_ (Block9Data* _data9_);
static void ___lambda55__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda56_ (Block9Data* _data9_);
static void ___lambda56__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda57_ (Block9Data* _data9_);
static void ___lambda57__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda58_ (Block9Data* _data9_);
static void ___lambda58__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda59_ (Block9Data* _data9_);
static void ___lambda59__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda60_ (Block9Data* _data9_);
static void ___lambda60__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda61_ (Block9Data* _data9_);
static void ___lambda61__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
static void __lambda62_ (Block9Data* _data9_);
static void ___lambda62__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void __lambda63_ (Block9Data* _data9_);
static void ___lambda63__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                 gpointer self);
VALA_EXTERN GtkCheckButton* tee_jee_gtk_helper_add_checkbox (GtkBox* box,
                                                 const gchar* text);
static void __lambda64_ (ScheduleBox* self);
static void ___lambda64__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
VALA_EXTERN cairo_surface_t* icon_manager_lookup_surface (const gchar* icon_name,
                                              gint icon_size,
                                              gint scale,
                                              gboolean symbolic,
                                              gboolean use_hardcoded);
VALA_EXTERN GtkLabel* tee_jee_gtk_helper_add_label (GtkBox* box,
                                        const gchar* text,
                                        gboolean bold,
                                        gboolean italic,
                                        gboolean large);
static void schedule_box_set_shield_label (ScheduleBox* self,
                                    const gchar* text,
                                    gboolean is_bold,
                                    gboolean is_italic,
                                    gboolean is_large);
VALA_EXTERN gchar* tee_jee_misc_escape_html (const gchar* html);
static void schedule_box_set_shield_subnote (ScheduleBox* self,
                                      const gchar* text,
                                      gboolean is_bold,
                                      gboolean is_italic,
                                      gboolean is_large);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
VALA_EXTERN GtkSpinButton* tee_jee_gtk_helper_add_spin (GtkBox* box,
                                            gdouble min,
                                            gdouble max,
                                            gdouble val,
                                            gint digits,
                                            gdouble step,
                                            gdouble step_page);
static void __lambda53_ (Block10Data* _data10_);
static void ___lambda53__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void schedule_box_finalize (GObject * obj);
static GType schedule_box_get_type_once (void);

static inline gpointer
schedule_box_get_instance_private (ScheduleBox* self)
{
	return G_STRUCT_MEMBER_P (self, ScheduleBox_private_offset);
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		ScheduleBox* self;
		self = _data9_->self;
		_g_object_unref0 (_data9_->spin_b);
		_g_object_unref0 (_data9_->spin_h);
		_g_object_unref0 (_data9_->spin_d);
		_g_object_unref0 (_data9_->spin_w);
		_g_object_unref0 (_data9_->spin_m);
		_g_object_unref0 (_data9_->chk_b);
		_g_object_unref0 (_data9_->chk_h);
		_g_object_unref0 (_data9_->chk_d);
		_g_object_unref0 (_data9_->chk_w);
		_g_object_unref0 (_data9_->chk_m);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

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

static void
__lambda54_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp3_;
	Main* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _data9_->chk_m);
	_tmp2_ = _tmp1_;
	_tmp0_->schedule_monthly = _tmp2_;
	_tmp3_ = self->priv->chk_cron;
	_tmp4_ = App;
	_tmp5_ = main_get_scheduled (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp6_);
	schedule_box_update_statusbar (self);
}

static void
___lambda54__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda54_ (self);
}

static void
__lambda55_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp0_->count_monthly = (gint) gtk_spin_button_get_value (_data9_->spin_m);
}

static void
___lambda55__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda55_ (self);
}

static void
__lambda56_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp3_;
	Main* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _data9_->chk_w);
	_tmp2_ = _tmp1_;
	_tmp0_->schedule_weekly = _tmp2_;
	_tmp3_ = self->priv->chk_cron;
	_tmp4_ = App;
	_tmp5_ = main_get_scheduled (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp6_);
	schedule_box_update_statusbar (self);
}

static void
___lambda56__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda56_ (self);
}

static void
__lambda57_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp0_->count_weekly = (gint) gtk_spin_button_get_value (_data9_->spin_w);
}

static void
___lambda57__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda57_ (self);
}

static void
__lambda58_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp3_;
	Main* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _data9_->chk_d);
	_tmp2_ = _tmp1_;
	_tmp0_->schedule_daily = _tmp2_;
	_tmp3_ = self->priv->chk_cron;
	_tmp4_ = App;
	_tmp5_ = main_get_scheduled (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp6_);
	schedule_box_update_statusbar (self);
}

static void
___lambda58__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda58_ (self);
}

static void
__lambda59_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp0_->count_daily = (gint) gtk_spin_button_get_value (_data9_->spin_d);
}

static void
___lambda59__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda59_ (self);
}

static void
__lambda60_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp3_;
	Main* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _data9_->chk_h);
	_tmp2_ = _tmp1_;
	_tmp0_->schedule_hourly = _tmp2_;
	_tmp3_ = self->priv->chk_cron;
	_tmp4_ = App;
	_tmp5_ = main_get_scheduled (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp6_);
	schedule_box_update_statusbar (self);
}

static void
___lambda60__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda60_ (self);
}

static void
__lambda61_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp0_->count_hourly = (gint) gtk_spin_button_get_value (_data9_->spin_h);
}

static void
___lambda61__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda61_ (self);
}

static void
__lambda62_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkCheckButton* _tmp4_;
	Main* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp1_ = _data9_->chk_b;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp0_->schedule_boot = _tmp3_;
	_tmp4_ = self->priv->chk_cron;
	_tmp5_ = App;
	_tmp6_ = main_get_scheduled (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, _tmp7_);
	schedule_box_update_statusbar (self);
}

static void
___lambda62__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda62_ (self);
}

static void
__lambda63_ (Block9Data* _data9_)
{
	ScheduleBox* self;
	Main* _tmp0_;
	self = _data9_->self;
	_tmp0_ = App;
	_tmp0_->count_boot = (gint) gtk_spin_button_get_value (_data9_->spin_b);
}

static void
___lambda63__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                            gpointer self)
{
	__lambda63_ (self);
}

static void
__lambda64_ (ScheduleBox* self)
{
	Main* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = App;
	_tmp1_ = self->priv->chk_cron;
	_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp0_->stop_cron_emails = _tmp3_;
}

static void
___lambda64__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda64_ ((ScheduleBox*) self);
}

ScheduleBox*
schedule_box_construct (GType object_type,
                        GtkWindow* _parent_window)
{
	ScheduleBox * self = NULL;
	Block9Data* _data9_;
	GtkWindow* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkCheckButton* _tmp3_ = NULL;
	GtkSpinButton* _tmp4_ = NULL;
	Main* _tmp5_;
	Main* _tmp6_;
	GtkCheckButton* _tmp7_ = NULL;
	GtkSpinButton* _tmp8_ = NULL;
	Main* _tmp9_;
	Main* _tmp10_;
	GtkCheckButton* _tmp11_ = NULL;
	GtkSpinButton* _tmp12_ = NULL;
	Main* _tmp13_;
	Main* _tmp14_;
	GtkCheckButton* _tmp15_ = NULL;
	GtkSpinButton* _tmp16_ = NULL;
	Main* _tmp17_;
	Main* _tmp18_;
	GtkCheckButton* _tmp19_ = NULL;
	GtkSpinButton* _tmp20_ = NULL;
	GtkCheckButton* _tmp21_;
	Main* _tmp22_;
	GtkCheckButton* _tmp23_;
	Main* _tmp24_;
	GtkCheckButton* _tmp25_;
	GtkCheckButton* _tmp26_;
	GtkCheckButton* _tmp27_;
	GtkCheckButton* _tmp28_;
	GtkCheckButton* _tmp29_;
	Main* _tmp30_;
	GtkCheckButton* _tmp31_;
	gchar* msg = NULL;
	gchar* _tmp32_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp33_;
	GtkLabel* _tmp34_;
	GtkLabel* _tmp35_;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp36_;
	GtkScrolledWindow* _tmp37_;
	GtkScrolledWindow* _tmp38_;
	GtkScrolledWindow* _tmp39_;
	GtkScrolledWindow* _tmp40_;
	GtkScrolledWindow* _tmp41_;
	GtkScrolledWindow* _tmp42_;
	GtkScrolledWindow* _tmp43_;
	GtkLabel* _tmp44_;
	GtkLabel* _tmp45_;
	GtkLabel* _tmp46_;
	GtkLabel* _tmp47_;
	GtkLabel* _tmp48_;
	GtkLabel* _tmp49_;
	GtkScrolledWindow* _tmp50_;
	GtkLabel* _tmp51_;
	GtkScrolledWindow* _tmp52_;
	GtkScrolledWindow* _tmp53_;
	GtkScrolledWindow* _tmp54_;
	GtkScrolledWindow* _tmp55_;
	GtkScrolledWindow* _tmp56_;
	GtkScrolledWindow* _tmp57_;
	GtkBox* hbox = NULL;
	GtkBox* _tmp58_;
	GtkScrolledWindow* _tmp59_;
	GtkImage* _tmp60_;
	GtkImage* _tmp61_;
	GtkImage* _tmp62_;
	gint _tmp63_;
	gint _tmp64_;
	cairo_surface_t* _tmp65_;
	cairo_surface_t* _tmp66_;
	GtkImage* _tmp67_;
	GtkImage* _tmp68_;
	GtkBox* vbox = NULL;
	GtkBox* _tmp69_;
	GtkLabel* _tmp70_;
	GtkLabel* _tmp71_;
	GtkLabel* _tmp72_;
	GtkLabel* _tmp73_;
	GtkLabel* _tmp74_;
	GtkLabel* _tmp75_;
	g_return_val_if_fail (_parent_window != NULL, NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	tee_jee_logging_log_debug ("ScheduleBox: ScheduleBox()");
	self = (ScheduleBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 6, NULL);
	_data9_->self = g_object_ref (self);
	_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_ = tee_jee_gtk_helper_add_label_header ((GtkBox*) self, _ ("Select Snapshot Levels"), TRUE);
	_tmp2_ = _tmp1_;
	_g_object_unref0 (_tmp2_);
	_data9_->chk_b = NULL;
	schedule_box_add_schedule_option (self, (GtkBox*) self, _ ("Monthly"), _ ("Create one per month"), &_tmp3_, &_tmp4_);
	_g_object_unref0 (_data9_->chk_m);
	_data9_->chk_m = _tmp3_;
	_g_object_unref0 (_data9_->spin_m);
	_data9_->spin_m = _tmp4_;
	_tmp5_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _data9_->chk_m, _tmp5_->schedule_monthly);
	g_signal_connect_data ((GtkToggleButton*) _data9_->chk_m, "toggled", (GCallback) ___lambda54__gtk_toggle_button_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp6_ = App;
	gtk_spin_button_set_value (_data9_->spin_m, (gdouble) _tmp6_->count_monthly);
	g_signal_connect_data (_data9_->spin_m, "value-changed", (GCallback) ___lambda55__gtk_spin_button_value_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	schedule_box_add_schedule_option (self, (GtkBox*) self, _ ("Weekly"), _ ("Create one per week"), &_tmp7_, &_tmp8_);
	_g_object_unref0 (_data9_->chk_w);
	_data9_->chk_w = _tmp7_;
	_g_object_unref0 (_data9_->spin_w);
	_data9_->spin_w = _tmp8_;
	_tmp9_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _data9_->chk_w, _tmp9_->schedule_weekly);
	g_signal_connect_data ((GtkToggleButton*) _data9_->chk_w, "toggled", (GCallback) ___lambda56__gtk_toggle_button_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp10_ = App;
	gtk_spin_button_set_value (_data9_->spin_w, (gdouble) _tmp10_->count_weekly);
	g_signal_connect_data (_data9_->spin_w, "value-changed", (GCallback) ___lambda57__gtk_spin_button_value_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	schedule_box_add_schedule_option (self, (GtkBox*) self, _ ("Daily"), _ ("Create one per day"), &_tmp11_, &_tmp12_);
	_g_object_unref0 (_data9_->chk_d);
	_data9_->chk_d = _tmp11_;
	_g_object_unref0 (_data9_->spin_d);
	_data9_->spin_d = _tmp12_;
	_tmp13_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _data9_->chk_d, _tmp13_->schedule_daily);
	g_signal_connect_data ((GtkToggleButton*) _data9_->chk_d, "toggled", (GCallback) ___lambda58__gtk_toggle_button_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp14_ = App;
	gtk_spin_button_set_value (_data9_->spin_d, (gdouble) _tmp14_->count_daily);
	g_signal_connect_data (_data9_->spin_d, "value-changed", (GCallback) ___lambda59__gtk_spin_button_value_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	schedule_box_add_schedule_option (self, (GtkBox*) self, _ ("Hourly"), _ ("Create one per hour"), &_tmp15_, &_tmp16_);
	_g_object_unref0 (_data9_->chk_h);
	_data9_->chk_h = _tmp15_;
	_g_object_unref0 (_data9_->spin_h);
	_data9_->spin_h = _tmp16_;
	_tmp17_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _data9_->chk_h, _tmp17_->schedule_hourly);
	g_signal_connect_data ((GtkToggleButton*) _data9_->chk_h, "toggled", (GCallback) ___lambda60__gtk_toggle_button_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp18_ = App;
	gtk_spin_button_set_value (_data9_->spin_h, (gdouble) _tmp18_->count_hourly);
	g_signal_connect_data (_data9_->spin_h, "value-changed", (GCallback) ___lambda61__gtk_spin_button_value_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	schedule_box_add_schedule_option (self, (GtkBox*) self, _ ("Boot"), _ ("Create one per boot"), &_tmp19_, &_tmp20_);
	_g_object_unref0 (_data9_->chk_b);
	_data9_->chk_b = _tmp19_;
	_g_object_unref0 (_data9_->spin_b);
	_data9_->spin_b = _tmp20_;
	_tmp21_ = _data9_->chk_b;
	_tmp22_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp21_, _tmp22_->schedule_boot);
	_tmp23_ = _data9_->chk_b;
	g_signal_connect_data ((GtkToggleButton*) _tmp23_, "toggled", (GCallback) ___lambda62__gtk_toggle_button_toggled, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp24_ = App;
	gtk_spin_button_set_value (_data9_->spin_b, (gdouble) _tmp24_->count_boot);
	g_signal_connect_data (_data9_->spin_b, "value-changed", (GCallback) ___lambda63__gtk_spin_button_value_changed, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	_tmp25_ = tee_jee_gtk_helper_add_checkbox ((GtkBox*) self, _ ("Stop cron emails for scheduled tasks"));
	_g_object_unref0 (self->priv->chk_cron);
	self->priv->chk_cron = _tmp25_;
	_tmp26_ = self->priv->chk_cron;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp26_, _ ("The cron service sends the output of scheduled tasks as an email to th" \
"e current user. Select this option to suppress the emails for cron tas" \
"ks created by Timeshift."));
	_tmp27_ = self->priv->chk_cron;
	g_object_set ((GtkWidget*) _tmp27_, "margin", 6, NULL);
	_tmp28_ = self->priv->chk_cron;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp28_, 12);
	_tmp29_ = self->priv->chk_cron;
	_tmp30_ = App;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp29_, _tmp30_->stop_cron_emails);
	_tmp31_ = self->priv->chk_cron;
	g_signal_connect_object ((GtkToggleButton*) _tmp31_, "toggled", (GCallback) ___lambda64__gtk_toggle_button_toggled, self, 0);
	_tmp32_ = g_strdup_printf ("<i>• %s\n• %s\n• %s</i>", _ ("Snapshots are not scheduled at fixed times."), _ ("A maintenance task runs once every hour and creates snapshots as neede" \
"d."), _ ("Boot snapshots are created with a delay of 10 minutes after system sta" \
"rtup."));
	msg = _tmp32_;
	_tmp33_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp33_);
	label = _tmp33_;
	_tmp34_ = label;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp34_, TRUE);
	_tmp35_ = label;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp35_);
	_tmp36_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp36_);
	scrolled = _tmp36_;
	_tmp37_ = scrolled;
	gtk_scrolled_window_set_shadow_type (_tmp37_, GTK_SHADOW_ETCHED_IN);
	_tmp38_ = scrolled;
	g_object_set (_tmp38_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp39_ = scrolled;
	g_object_set (_tmp39_, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	_tmp40_ = scrolled;
	gtk_widget_set_size_request ((GtkWidget*) _tmp40_, -1, 100);
	_tmp41_ = scrolled;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 6);
	_tmp42_ = scrolled;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp42_, 6);
	_tmp43_ = scrolled;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp43_);
	_tmp44_ = (GtkLabel*) gtk_label_new (msg);
	g_object_ref_sink (_tmp44_);
	_g_object_unref0 (label);
	label = _tmp44_;
	_tmp45_ = label;
	gtk_label_set_use_markup (_tmp45_, TRUE);
	_tmp46_ = label;
	gtk_label_set_xalign (_tmp46_, 0.0f);
	_tmp47_ = label;
	g_object_set (_tmp47_, "wrap", TRUE, NULL);
	_tmp48_ = label;
	g_object_set (_tmp48_, "wrap-mode", PANGO_WRAP_WORD, NULL);
	_tmp49_ = label;
	g_object_set ((GtkWidget*) _tmp49_, "margin", 6, NULL);
	_tmp50_ = scrolled;
	_tmp51_ = label;
	gtk_container_add ((GtkContainer*) _tmp50_, (GtkWidget*) _tmp51_);
	_tmp52_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp52_);
	_g_object_unref0 (scrolled);
	scrolled = _tmp52_;
	_tmp53_ = scrolled;
	gtk_scrolled_window_set_shadow_type (_tmp53_, GTK_SHADOW_ETCHED_IN);
	_tmp54_ = scrolled;
	g_object_set (_tmp54_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp55_ = scrolled;
	g_object_set (_tmp55_, "vscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp56_ = scrolled;
	gtk_widget_set_size_request ((GtkWidget*) _tmp56_, -1, 100);
	_tmp57_ = scrolled;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp57_);
	_tmp58_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp58_);
	hbox = _tmp58_;
	g_object_set ((GtkWidget*) hbox, "margin", 6, NULL);
	gtk_widget_set_margin_bottom ((GtkWidget*) hbox, 12);
	_tmp59_ = scrolled;
	gtk_container_add ((GtkContainer*) _tmp59_, (GtkWidget*) hbox);
	_tmp60_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp60_);
	_g_object_unref0 (self->priv->img_shield);
	self->priv->img_shield = _tmp60_;
	_tmp61_ = self->priv->img_shield;
	_tmp62_ = self->priv->img_shield;
	_tmp63_ = gtk_widget_get_scale_factor ((GtkWidget*) _tmp62_);
	_tmp64_ = _tmp63_;
	_tmp65_ = icon_manager_lookup_surface (ICON_MANAGER_SHIELD_HIGH, ICON_MANAGER_SHIELD_ICON_SIZE, _tmp64_, FALSE, FALSE);
	_tmp66_ = _tmp65_;
	g_object_set (_tmp61_, "surface", _tmp66_, NULL);
	_cairo_surface_destroy0 (_tmp66_);
	_tmp67_ = self->priv->img_shield;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp67_, 6);
	_tmp68_ = self->priv->img_shield;
	gtk_container_add ((GtkContainer*) hbox, (GtkWidget*) _tmp68_);
	_tmp69_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp69_);
	vbox = _tmp69_;
	gtk_widget_set_margin_top ((GtkWidget*) vbox, 6);
	gtk_container_add ((GtkContainer*) hbox, (GtkWidget*) vbox);
	_tmp70_ = tee_jee_gtk_helper_add_label (vbox, "", FALSE, FALSE, FALSE);
	_g_object_unref0 (self->priv->lbl_shield);
	self->priv->lbl_shield = _tmp70_;
	_tmp71_ = self->priv->lbl_shield;
	gtk_label_set_yalign (_tmp71_, 0.5f);
	_tmp72_ = tee_jee_gtk_helper_add_label (vbox, "", FALSE, FALSE, FALSE);
	_g_object_unref0 (self->priv->lbl_shield_subnote);
	self->priv->lbl_shield_subnote = _tmp72_;
	_tmp73_ = self->priv->lbl_shield_subnote;
	gtk_label_set_yalign (_tmp73_, 0.5f);
	_tmp74_ = self->priv->lbl_shield_subnote;
	g_object_set (_tmp74_, "wrap", TRUE, NULL);
	_tmp75_ = self->priv->lbl_shield_subnote;
	g_object_set (_tmp75_, "wrap-mode", PANGO_WRAP_WORD, NULL);
	schedule_box_update_statusbar (self);
	tee_jee_logging_log_debug ("ScheduleBox: ScheduleBox(): exit");
	_g_object_unref0 (vbox);
	_g_object_unref0 (hbox);
	_g_object_unref0 (scrolled);
	_g_object_unref0 (label);
	_g_free0 (msg);
	block9_data_unref (_data9_);
	_data9_ = NULL;
	return self;
}

ScheduleBox*
schedule_box_new (GtkWindow* _parent_window)
{
	return schedule_box_construct (TYPE_SCHEDULE_BOX, _parent_window);
}

static void
schedule_box_set_shield_label (ScheduleBox* self,
                               const gchar* text,
                               gboolean is_bold,
                               gboolean is_italic,
                               gboolean is_large)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* msg = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkLabel* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	if (is_bold) {
		_tmp0_ = " weight=\"bold\"";
	} else {
		_tmp0_ = "";
	}
	if (is_italic) {
		_tmp1_ = " style=\"italic\"";
	} else {
		_tmp1_ = "";
	}
	if (is_large) {
		_tmp2_ = " size=\"x-large\"";
	} else {
		_tmp2_ = "";
	}
	_tmp3_ = tee_jee_misc_escape_html (text);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf ("<span%s%s%s>%s</span>", _tmp0_, _tmp1_, _tmp2_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	msg = _tmp6_;
	_tmp7_ = self->priv->lbl_shield;
	gtk_label_set_label (_tmp7_, msg);
	_g_free0 (msg);
}

static void
schedule_box_set_shield_subnote (ScheduleBox* self,
                                 const gchar* text,
                                 gboolean is_bold,
                                 gboolean is_italic,
                                 gboolean is_large)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* msg = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkLabel* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	if (is_bold) {
		_tmp0_ = " weight=\"bold\"";
	} else {
		_tmp0_ = "";
	}
	if (is_italic) {
		_tmp1_ = " style=\"italic\"";
	} else {
		_tmp1_ = "";
	}
	if (is_large) {
		_tmp2_ = " size=\"x-large\"";
	} else {
		_tmp2_ = "";
	}
	_tmp3_ = tee_jee_misc_escape_html (text);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf ("<span%s%s%s>%s</span>", _tmp0_, _tmp1_, _tmp2_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	msg = _tmp6_;
	_tmp7_ = self->priv->lbl_shield_subnote;
	gtk_label_set_label (_tmp7_, msg);
	_g_free0 (msg);
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		ScheduleBox* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->spin2);
		_g_object_unref0 (_data10_->label);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

static void
__lambda53_ (Block10Data* _data10_)
{
	ScheduleBox* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = _data10_->self;
	_tmp0_ = gtk_widget_get_sensitive ((GtkWidget*) _data10_->spin2);
	_tmp1_ = _tmp0_;
	gtk_widget_set_sensitive ((GtkWidget*) _data10_->label, _tmp1_);
}

static void
___lambda53__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda53_ (self);
}

static void
schedule_box_add_schedule_option (ScheduleBox* self,
                                  GtkBox* box,
                                  const gchar* period,
                                  const gchar* period_desc,
                                  GtkCheckButton** chk,
                                  GtkSpinButton** spin)
{
	GtkCheckButton* _vala_chk = NULL;
	GtkSpinButton* _vala_spin = NULL;
	Block10Data* _data10_;
	GtkBox* hbox = NULL;
	GtkBox* _tmp0_;
	GtkBox* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkSizeGroup* _tmp5_;
	gchar* txt = NULL;
	gchar* _tmp9_;
	GtkBox* _tmp10_;
	GtkCheckButton* _tmp11_;
	GtkSizeGroup* _tmp12_;
	gchar* tt = NULL;
	gchar* _tmp13_;
	GtkBox* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkBox* _tmp19_;
	GtkSpinButton* _tmp20_;
	GtkSizeGroup* _tmp21_;
	GtkSpinButton* _tmp22_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	g_return_if_fail (period != NULL);
	g_return_if_fail (period_desc != NULL);
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp0_);
	hbox = _tmp0_;
	_tmp1_ = hbox;
	g_object_set ((GtkWidget*) _tmp1_, "margin", 6, NULL);
	_tmp2_ = hbox;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 1);
	_tmp3_ = hbox;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 1);
	_tmp4_ = hbox;
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->sg_title;
	if (_tmp5_ == NULL) {
		GtkSizeGroup* _tmp6_;
		GtkSizeGroup* _tmp7_;
		GtkSizeGroup* _tmp8_;
		_tmp6_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->sg_title);
		self->priv->sg_title = _tmp6_;
		_tmp7_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->sg_subtitle);
		self->priv->sg_subtitle = _tmp7_;
		_tmp8_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_g_object_unref0 (self->priv->sg_count);
		self->priv->sg_count = _tmp8_;
	}
	_tmp9_ = g_strdup_printf ("<b>%s</b>", period);
	txt = _tmp9_;
	_tmp10_ = hbox;
	_tmp11_ = tee_jee_gtk_helper_add_checkbox (_tmp10_, txt);
	_g_object_unref0 (_vala_chk);
	_vala_chk = _tmp11_;
	_tmp12_ = self->priv->sg_title;
	gtk_size_group_add_widget (_tmp12_, (GtkWidget*) _vala_chk);
	_tmp13_ = g_strdup (_ ("Number of snapshots to keep.\n" \
"Older snapshots will be removed once this limit is exceeded."));
	tt = _tmp13_;
	_tmp14_ = hbox;
	_tmp15_ = g_strconcat ("     ", _ ("Keep"), NULL);
	_tmp16_ = _tmp15_;
	_tmp17_ = tee_jee_gtk_helper_add_label (_tmp14_, _tmp16_, FALSE, FALSE, FALSE);
	_tmp18_ = _tmp17_;
	_g_free0 (_tmp16_);
	_data10_->label = _tmp18_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _data10_->label, tt);
	_tmp19_ = hbox;
	_tmp20_ = tee_jee_gtk_helper_add_spin (_tmp19_, (gdouble) 1, (gdouble) 999, (gdouble) 10, 0, (gdouble) 1, (gdouble) 1);
	_data10_->spin2 = _tmp20_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _data10_->spin2, tt);
	_tmp21_ = self->priv->sg_count;
	gtk_size_group_add_widget (_tmp21_, (GtkWidget*) _data10_->spin2);
	g_signal_connect_data ((GObject*) _data10_->spin2, "notify::sensitive", (GCallback) ___lambda53__g_object_notify, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
	_tmp22_ = _g_object_ref0 (_data10_->spin2);
	_g_object_unref0 (_vala_spin);
	_vala_spin = _tmp22_;
	_g_free0 (tt);
	_g_free0 (txt);
	_g_object_unref0 (hbox);
	if (chk) {
		*chk = _vala_chk;
	} else {
		_g_object_unref0 (_vala_chk);
	}
	if (spin) {
		*spin = _vala_spin;
	} else {
		_g_object_unref0 (_vala_spin);
	}
	block10_data_unref (_data10_);
	_data10_ = NULL;
}

void
schedule_box_update_statusbar (ScheduleBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	Main* _tmp4_;
	GtkCheckButton* _tmp21_;
	Main* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp4_ = App;
	if (_tmp4_->schedule_monthly) {
		_tmp3_ = TRUE;
	} else {
		Main* _tmp5_;
		_tmp5_ = App;
		_tmp3_ = _tmp5_->schedule_weekly;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		Main* _tmp6_;
		_tmp6_ = App;
		_tmp2_ = _tmp6_->schedule_daily;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		Main* _tmp7_;
		_tmp7_ = App;
		_tmp1_ = _tmp7_->schedule_hourly;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		Main* _tmp8_;
		_tmp8_ = App;
		_tmp0_ = _tmp8_->schedule_boot;
	}
	if (_tmp0_) {
		GtkImage* _tmp9_;
		GtkImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		cairo_surface_t* _tmp13_;
		cairo_surface_t* _tmp14_;
		_tmp9_ = self->priv->img_shield;
		_tmp10_ = self->priv->img_shield;
		_tmp11_ = gtk_widget_get_scale_factor ((GtkWidget*) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = icon_manager_lookup_surface (ICON_MANAGER_SHIELD_HIGH, ICON_MANAGER_SHIELD_ICON_SIZE, _tmp12_, FALSE, FALSE);
		_tmp14_ = _tmp13_;
		g_object_set (_tmp9_, "surface", _tmp14_, NULL);
		_cairo_surface_destroy0 (_tmp14_);
		schedule_box_set_shield_label (self, _ ("Scheduled snapshots are enabled"), TRUE, FALSE, TRUE);
		schedule_box_set_shield_subnote (self, _ ("Snapshots will be created at selected intervals if snapshot disk has e" \
"nough space (> 1 GB)"), FALSE, TRUE, FALSE);
	} else {
		GtkImage* _tmp15_;
		GtkImage* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		cairo_surface_t* _tmp19_;
		cairo_surface_t* _tmp20_;
		_tmp15_ = self->priv->img_shield;
		_tmp16_ = self->priv->img_shield;
		_tmp17_ = gtk_widget_get_scale_factor ((GtkWidget*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = icon_manager_lookup_surface (ICON_MANAGER_SHIELD_LOW, ICON_MANAGER_SHIELD_ICON_SIZE, _tmp18_, FALSE, FALSE);
		_tmp20_ = _tmp19_;
		g_object_set (_tmp15_, "surface", _tmp20_, NULL);
		_cairo_surface_destroy0 (_tmp20_);
		schedule_box_set_shield_label (self, _ ("Scheduled snapshots are disabled"), TRUE, FALSE, TRUE);
		schedule_box_set_shield_subnote (self, _ ("Select the intervals for creating snapshots"), FALSE, TRUE, FALSE);
	}
	_tmp21_ = self->priv->chk_cron;
	_tmp22_ = App;
	_tmp23_ = main_get_scheduled (_tmp22_);
	_tmp24_ = _tmp23_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp21_, _tmp24_);
}

static void
schedule_box_class_init (ScheduleBoxClass * klass,
                         gpointer klass_data)
{
	schedule_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ScheduleBox_private_offset);
	G_OBJECT_CLASS (klass)->finalize = schedule_box_finalize;
}

static void
schedule_box_instance_init (ScheduleBox * self,
                            gpointer klass)
{
	self->priv = schedule_box_get_instance_private (self);
}

static void
schedule_box_finalize (GObject * obj)
{
	ScheduleBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCHEDULE_BOX, ScheduleBox);
	_g_object_unref0 (self->priv->img_shield);
	_g_object_unref0 (self->priv->lbl_shield);
	_g_object_unref0 (self->priv->lbl_shield_subnote);
	_g_object_unref0 (self->priv->sg_title);
	_g_object_unref0 (self->priv->sg_subtitle);
	_g_object_unref0 (self->priv->sg_count);
	_g_object_unref0 (self->priv->chk_cron);
	_g_object_unref0 (self->priv->parent_window);
	G_OBJECT_CLASS (schedule_box_parent_class)->finalize (obj);
}

static GType
schedule_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScheduleBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) schedule_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScheduleBox), 0, (GInstanceInitFunc) schedule_box_instance_init, NULL };
	GType schedule_box_type_id;
	schedule_box_type_id = g_type_register_static (gtk_box_get_type (), "ScheduleBox", &g_define_type_info, 0);
	ScheduleBox_private_offset = g_type_add_instance_private (schedule_box_type_id, sizeof (ScheduleBoxPrivate));
	return schedule_box_type_id;
}

GType
schedule_box_get_type (void)
{
	static volatile gsize schedule_box_type_id__once = 0;
	if (g_once_init_enter (&schedule_box_type_id__once)) {
		GType schedule_box_type_id;
		schedule_box_type_id = schedule_box_get_type_once ();
		g_once_init_leave (&schedule_box_type_id__once, schedule_box_type_id);
	}
	return schedule_box_type_id__once;
}

