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

/*
 * RestoreExcludeBox.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 <pango/pango.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_RESTORE_EXCLUDE_BOX (restore_exclude_box_get_type ())
#define RESTORE_EXCLUDE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESTORE_EXCLUDE_BOX, RestoreExcludeBox))
#define RESTORE_EXCLUDE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RESTORE_EXCLUDE_BOX, RestoreExcludeBoxClass))
#define IS_RESTORE_EXCLUDE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESTORE_EXCLUDE_BOX))
#define IS_RESTORE_EXCLUDE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RESTORE_EXCLUDE_BOX))
#define RESTORE_EXCLUDE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RESTORE_EXCLUDE_BOX, RestoreExcludeBoxClass))

typedef struct _RestoreExcludeBox RestoreExcludeBox;
typedef struct _RestoreExcludeBoxClass RestoreExcludeBoxClass;
typedef struct _RestoreExcludeBoxPrivate RestoreExcludeBoxPrivate;
enum  {
	RESTORE_EXCLUDE_BOX_0_PROPERTY,
	RESTORE_EXCLUDE_BOX_NUM_PROPERTIES
};
static GParamSpec* restore_exclude_box_properties[RESTORE_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_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;
typedef struct _AppExcludeEntryPrivate AppExcludeEntryPrivate;

struct _RestoreExcludeBox {
	GtkBox parent_instance;
	RestoreExcludeBoxPrivate * priv;
};

struct _RestoreExcludeBoxClass {
	GtkBoxClass parent_class;
};

struct _RestoreExcludeBoxPrivate {
	GtkCheckButton* chk_other;
	GtkCheckButton* chk_web;
	GtkCheckButton* chk_torrent;
	GtkWindow* parent_window;
};

struct _AppExcludeEntry {
	GObject parent_instance;
	AppExcludeEntryPrivate * priv;
	gchar* name;
	gboolean is_include;
	gboolean is_file;
	gboolean enabled;
	GeeArrayList* items;
	GeeArrayList* patterns;
};

struct _AppExcludeEntryClass {
	GObjectClass parent_class;
};

static gint RestoreExcludeBox_private_offset;
static gpointer restore_exclude_box_parent_class = NULL;
VALA_EXTERN GeeHashMap* app_exclude_entry_app_map;

VALA_EXTERN GType restore_exclude_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestoreExcludeBox, g_object_unref)
VALA_EXTERN RestoreExcludeBox* restore_exclude_box_new (GtkWindow* _parent_window);
VALA_EXTERN RestoreExcludeBox* restore_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);
VALA_EXTERN GtkCheckButton* tee_jee_gtk_helper_add_checkbox (GtkBox* box,
                                                 const gchar* text);
static void __lambda113_ (RestoreExcludeBox* self);
VALA_EXTERN GType app_exclude_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppExcludeEntry, g_object_unref)
static void ___lambda113__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
static void __lambda114_ (RestoreExcludeBox* self);
static void ___lambda114__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                              gpointer self);
VALA_EXTERN void restore_exclude_box_refresh (RestoreExcludeBox* self);
static void restore_exclude_box_finalize (GObject * obj);
static GType restore_exclude_box_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
restore_exclude_box_get_instance_private (RestoreExcludeBox* self)
{
	return G_STRUCT_MEMBER_P (self, RestoreExcludeBox_private_offset);
}

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

static void
__lambda113_ (RestoreExcludeBox* self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	_tmp0_ = g_strdup ("chromium");
	_tmp1_ = g_strdup ("google-chrome");
	_tmp2_ = g_strdup ("mozilla");
	_tmp3_ = g_strdup ("midori");
	_tmp4_ = g_strdup ("epiphany");
	_tmp5_ = g_strdup ("opera");
	_tmp6_ = g_strdup ("opera-stable");
	_tmp7_ = g_strdup ("opera-beta");
	_tmp8_ = g_strdup ("opera-developer");
	_tmp9_ = g_new0 (gchar*, 9 + 1);
	_tmp9_[0] = _tmp0_;
	_tmp9_[1] = _tmp1_;
	_tmp9_[2] = _tmp2_;
	_tmp9_[3] = _tmp3_;
	_tmp9_[4] = _tmp4_;
	_tmp9_[5] = _tmp5_;
	_tmp9_[6] = _tmp6_;
	_tmp9_[7] = _tmp7_;
	_tmp9_[8] = _tmp8_;
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
		name_collection = _tmp9_;
		name_collection_length1 = 9;
		for (name_it = 0; name_it < name_collection_length1; name_it = name_it + 1) {
			gchar* _tmp10_;
			gchar* name = NULL;
			_tmp10_ = g_strdup (name_collection[name_it]);
			name = _tmp10_;
			{
				GeeHashMap* _tmp11_;
				const gchar* _tmp12_;
				_tmp11_ = app_exclude_entry_app_map;
				_tmp12_ = name;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp11_, _tmp12_)) {
					GeeHashMap* _tmp13_;
					const gchar* _tmp14_;
					gpointer _tmp15_;
					AppExcludeEntry* _tmp16_;
					GtkCheckButton* _tmp17_;
					gboolean _tmp18_;
					gboolean _tmp19_;
					_tmp13_ = app_exclude_entry_app_map;
					_tmp14_ = name;
					_tmp15_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp13_, _tmp14_);
					_tmp16_ = (AppExcludeEntry*) _tmp15_;
					_tmp17_ = self->priv->chk_web;
					_tmp18_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp17_);
					_tmp19_ = _tmp18_;
					_tmp16_->enabled = _tmp19_;
					_g_object_unref0 (_tmp16_);
				}
				_g_free0 (name);
			}
		}
		name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
	}
}

static void
___lambda113__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	__lambda113_ ((RestoreExcludeBox*) self);
}

static void
__lambda114_ (RestoreExcludeBox* self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	_tmp0_ = g_strdup ("deluge");
	_tmp1_ = g_strdup ("transmission");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
		name_collection = _tmp2_;
		name_collection_length1 = 2;
		for (name_it = 0; name_it < name_collection_length1; name_it = name_it + 1) {
			gchar* _tmp3_;
			gchar* name = NULL;
			_tmp3_ = g_strdup (name_collection[name_it]);
			name = _tmp3_;
			{
				GeeHashMap* _tmp4_;
				const gchar* _tmp5_;
				_tmp4_ = app_exclude_entry_app_map;
				_tmp5_ = name;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp4_, _tmp5_)) {
					GeeHashMap* _tmp6_;
					const gchar* _tmp7_;
					gpointer _tmp8_;
					AppExcludeEntry* _tmp9_;
					GtkCheckButton* _tmp10_;
					gboolean _tmp11_;
					gboolean _tmp12_;
					_tmp6_ = app_exclude_entry_app_map;
					_tmp7_ = name;
					_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp7_);
					_tmp9_ = (AppExcludeEntry*) _tmp8_;
					_tmp10_ = self->priv->chk_torrent;
					_tmp11_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp10_);
					_tmp12_ = _tmp11_;
					_tmp9_->enabled = _tmp12_;
					_g_object_unref0 (_tmp9_);
				}
				_g_free0 (name);
			}
		}
		name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
	}
}

static void
___lambda114__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                         gpointer self)
{
	__lambda114_ ((RestoreExcludeBox*) self);
}

RestoreExcludeBox*
restore_exclude_box_construct (GType object_type,
                               GtkWindow* _parent_window)
{
	RestoreExcludeBox * self = NULL;
	GtkWindow* _tmp0_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkCheckButton* chk = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkCheckButton* _tmp8_;
	GtkCheckButton* _tmp9_;
	GtkCheckButton* _tmp10_;
	GtkCheckButton* _tmp11_;
	GtkCheckButton* _tmp12_;
	GtkCheckButton* _tmp13_;
	GtkCheckButton* _tmp14_;
	GtkCheckButton* _tmp15_;
	GtkLabel* _tmp16_;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_;
	gchar* tt = NULL;
	gchar* _tmp22_;
	GtkCheckButton* _tmp23_;
	const gchar* _tmp24_;
	GtkLabel* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	GtkCheckButton* _tmp31_;
	GtkCheckButton* _tmp32_;
	GtkCheckButton* _tmp33_;
	GtkCheckButton* _tmp34_;
	GtkCheckButton* _tmp35_;
	GtkCheckButton* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	GtkLabel* _tmp39_;
	GtkLabel* _tmp40_;
	GtkLabel* _tmp41_;
	GtkLabel* _tmp42_;
	gchar* _tmp43_;
	GtkCheckButton* _tmp44_;
	const gchar* _tmp45_;
	GtkLabel* _tmp46_;
	const gchar* _tmp47_;
	GtkCheckButton* _tmp48_;
	GtkCheckButton* _tmp49_;
	GtkCheckButton* _tmp50_;
	gchar* _tmp51_;
	GtkCheckButton* _tmp52_;
	const gchar* _tmp53_;
	g_return_val_if_fail (_parent_window != NULL, NULL);
	tee_jee_logging_log_debug ("RestoreExcludeBox: RestoreExcludeBox()");
	self = (RestoreExcludeBox*) 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_ = tee_jee_gtk_helper_add_label_header ((GtkBox*) self, _ ("Exclude Application Settings"), TRUE);
	label = _tmp1_;
	_tmp2_ = tee_jee_gtk_helper_add_label ((GtkBox*) self, _ ("Select applications to exclude from restore"), FALSE, FALSE, FALSE);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
	_tmp4_ = g_strdup_printf (" (%s)", _ ("Recommended"));
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strconcat (_ ("Web Browsers"), _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = tee_jee_gtk_helper_add_checkbox ((GtkBox*) self, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	chk = _tmp9_;
	_tmp10_ = chk;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp10_, TRUE);
	_tmp11_ = chk;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp11_, 12);
	_tmp12_ = chk;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp12_, 0);
	_tmp13_ = chk;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	_g_object_unref0 (self->priv->chk_web);
	self->priv->chk_web = _tmp14_;
	_tmp15_ = chk;
	g_signal_connect_object ((GtkToggleButton*) _tmp15_, "toggled", (GCallback) ___lambda113__gtk_toggle_button_toggled, self, 0);
	_tmp16_ = tee_jee_gtk_helper_add_label ((GtkBox*) self, _ ("Firefox, Chromium, Chrome, Opera, Epiphany, Midori"), FALSE, TRUE, FALSE);
	_g_object_unref0 (label);
	label = _tmp16_;
	_tmp17_ = label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, 0);
	_tmp18_ = label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp18_, 6);
	_tmp19_ = label;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp19_, 24);
	_tmp20_ = label;
	g_object_set (_tmp20_, "wrap", TRUE, NULL);
	_tmp21_ = label;
	g_object_set (_tmp21_, "wrap-mode", PANGO_WRAP_WORD_CHAR, NULL);
	_tmp22_ = g_strdup (_ ("Keep configuration files for web browsers like Firefox and Chrome. If " \
"un-checked, previous configuration files will be restored from snapsho" \
"t"));
	tt = _tmp22_;
	_tmp23_ = chk;
	_tmp24_ = tt;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp23_, _tmp24_);
	_tmp25_ = label;
	_tmp26_ = tt;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp25_, _tmp26_);
	_tmp27_ = g_strdup_printf (" (%s)", _ ("Recommended"));
	_tmp28_ = _tmp27_;
	_tmp29_ = g_strconcat (_ ("Bittorrent Clients"), _tmp28_, NULL);
	_tmp30_ = _tmp29_;
	_tmp31_ = tee_jee_gtk_helper_add_checkbox ((GtkBox*) self, _tmp30_);
	_g_object_unref0 (chk);
	chk = _tmp31_;
	_g_free0 (_tmp30_);
	_g_free0 (_tmp28_);
	_tmp32_ = chk;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp32_, TRUE);
	_tmp33_ = chk;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp33_, 0);
	_tmp34_ = chk;
	_tmp35_ = _g_object_ref0 (_tmp34_);
	_g_object_unref0 (self->priv->chk_torrent);
	self->priv->chk_torrent = _tmp35_;
	_tmp36_ = chk;
	g_signal_connect_object ((GtkToggleButton*) _tmp36_, "toggled", (GCallback) ___lambda114__gtk_toggle_button_toggled, self, 0);
	_tmp37_ = tee_jee_gtk_helper_add_label ((GtkBox*) self, _ ("Deluge, Transmission"), FALSE, TRUE, FALSE);
	_g_object_unref0 (label);
	label = _tmp37_;
	_tmp38_ = label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp38_, 0);
	_tmp39_ = label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp39_, 6);
	_tmp40_ = label;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp40_, 24);
	_tmp41_ = label;
	g_object_set (_tmp41_, "wrap", TRUE, NULL);
	_tmp42_ = label;
	g_object_set (_tmp42_, "wrap-mode", PANGO_WRAP_WORD_CHAR, NULL);
	_tmp43_ = g_strdup (_ ("Keep configuration files for bittorrent clients like Deluge, Transmiss" \
"ion, etc. If un-checked, previous configuration files will be restored" \
" from snapshot."));
	_g_free0 (tt);
	tt = _tmp43_;
	_tmp44_ = chk;
	_tmp45_ = tt;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp44_, _tmp45_);
	_tmp46_ = label;
	_tmp47_ = tt;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp46_, _tmp47_);
	_tmp48_ = tee_jee_gtk_helper_add_checkbox ((GtkBox*) self, _ ("Other applications (next page)"));
	_g_object_unref0 (chk);
	chk = _tmp48_;
	_tmp49_ = chk;
	_tmp50_ = _g_object_ref0 (_tmp49_);
	_g_object_unref0 (self->priv->chk_other);
	self->priv->chk_other = _tmp50_;
	_tmp51_ = g_strdup (_ ("Show more applications to exclude on the next page"));
	_g_free0 (tt);
	tt = _tmp51_;
	_tmp52_ = chk;
	_tmp53_ = tt;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp52_, _tmp53_);
	tee_jee_logging_log_debug ("RestoreExcludeBox: RestoreExcludeBox(): exit");
	_g_free0 (tt);
	_g_object_unref0 (chk);
	_g_object_unref0 (label);
	return self;
}

RestoreExcludeBox*
restore_exclude_box_new (GtkWindow* _parent_window)
{
	return restore_exclude_box_construct (TYPE_RESTORE_EXCLUDE_BOX, _parent_window);
}

void
restore_exclude_box_refresh (RestoreExcludeBox* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->chk_web;
	gtk_toggle_button_toggled ((GtkToggleButton*) _tmp0_);
	_tmp1_ = self->priv->chk_torrent;
	gtk_toggle_button_toggled ((GtkToggleButton*) _tmp1_);
}

static void
restore_exclude_box_class_init (RestoreExcludeBoxClass * klass,
                                gpointer klass_data)
{
	restore_exclude_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &RestoreExcludeBox_private_offset);
	G_OBJECT_CLASS (klass)->finalize = restore_exclude_box_finalize;
}

static void
restore_exclude_box_instance_init (RestoreExcludeBox * self,
                                   gpointer klass)
{
	self->priv = restore_exclude_box_get_instance_private (self);
}

static void
restore_exclude_box_finalize (GObject * obj)
{
	RestoreExcludeBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RESTORE_EXCLUDE_BOX, RestoreExcludeBox);
	_g_object_unref0 (self->priv->chk_other);
	_g_object_unref0 (self->priv->chk_web);
	_g_object_unref0 (self->priv->chk_torrent);
	_g_object_unref0 (self->priv->parent_window);
	G_OBJECT_CLASS (restore_exclude_box_parent_class)->finalize (obj);
}

static GType
restore_exclude_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RestoreExcludeBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) restore_exclude_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RestoreExcludeBox), 0, (GInstanceInitFunc) restore_exclude_box_instance_init, NULL };
	GType restore_exclude_box_type_id;
	restore_exclude_box_type_id = g_type_register_static (gtk_box_get_type (), "RestoreExcludeBox", &g_define_type_info, 0);
	RestoreExcludeBox_private_offset = g_type_add_instance_private (restore_exclude_box_type_id, sizeof (RestoreExcludeBoxPrivate));
	return restore_exclude_box_type_id;
}

GType
restore_exclude_box_get_type (void)
{
	static volatile gsize restore_exclude_box_type_id__once = 0;
	if (g_once_init_enter (&restore_exclude_box_type_id__once)) {
		GType restore_exclude_box_type_id;
		restore_exclude_box_type_id = restore_exclude_box_get_type_once ();
		g_once_init_leave (&restore_exclude_box_type_id__once, restore_exclude_box_type_id);
	}
	return restore_exclude_box_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

