/* ConfigList.c generated by valac 0.30.2, the Vala compiler
 * generated from ConfigList.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*- */
/*
    This file is part of Déjà Dup.
    For copyright information, see AUTHORS.

    Déjà Dup 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 3 of the License, or
    (at your option) any later version.

    Déjà Dup 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 Déjà Dup.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include "deja.h"
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <atk/atk.h>


#define DEJA_DUP_TYPE_CONFIG_LIST_STORE (deja_dup_config_list_store_get_type ())
#define DEJA_DUP_CONFIG_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStore))
#define DEJA_DUP_CONFIG_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStoreClass))
#define DEJA_DUP_IS_CONFIG_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LIST_STORE))
#define DEJA_DUP_IS_CONFIG_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LIST_STORE))
#define DEJA_DUP_CONFIG_LIST_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStoreClass))

typedef struct _DejaDupConfigListStore DejaDupConfigListStore;
typedef struct _DejaDupConfigListStoreClass DejaDupConfigListStoreClass;
typedef struct _DejaDupConfigListStorePrivate DejaDupConfigListStorePrivate;

#define DEJA_DUP_TYPE_CONFIG_WIDGET (deja_dup_config_widget_get_type ())
#define DEJA_DUP_CONFIG_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_WIDGET, DejaDupConfigWidget))
#define DEJA_DUP_CONFIG_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_WIDGET, DejaDupConfigWidgetClass))
#define DEJA_DUP_IS_CONFIG_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_WIDGET))
#define DEJA_DUP_IS_CONFIG_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_WIDGET))
#define DEJA_DUP_CONFIG_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_WIDGET, DejaDupConfigWidgetClass))

typedef struct _DejaDupConfigWidget DejaDupConfigWidget;
typedef struct _DejaDupConfigWidgetClass DejaDupConfigWidgetClass;

#define DEJA_DUP_TYPE_CONFIG_LIST (deja_dup_config_list_get_type ())
#define DEJA_DUP_CONFIG_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigList))
#define DEJA_DUP_CONFIG_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigListClass))
#define DEJA_DUP_IS_CONFIG_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LIST))
#define DEJA_DUP_IS_CONFIG_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LIST))
#define DEJA_DUP_CONFIG_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigListClass))

typedef struct _DejaDupConfigList DejaDupConfigList;
typedef struct _DejaDupConfigListClass DejaDupConfigListClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_slist_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_free0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DejaDupConfigWidgetPrivate DejaDupConfigWidgetPrivate;
typedef struct _DejaDupConfigListPrivate DejaDupConfigListPrivate;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _DejaDupConfigListSetFromConfigData DejaDupConfigListSetFromConfigData;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define __g_list_free__gtk_tree_path_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__gtk_tree_path_free0_ (var), NULL)))

struct _DejaDupConfigListStore {
	GtkListStore parent_instance;
	DejaDupConfigListStorePrivate * priv;
};

struct _DejaDupConfigListStoreClass {
	GtkListStoreClass parent_class;
};

struct _DejaDupConfigListStorePrivate {
	DejaDupConfigList* _list;
};

struct _DejaDupConfigWidget {
	GtkEventBox parent_instance;
	DejaDupConfigWidgetPrivate * priv;
	gboolean syncing;
	DejaDupFilteredSettings* settings;
	GList* all_settings;
};

struct _DejaDupConfigWidgetClass {
	GtkEventBoxClass parent_class;
	void (*set_from_config) (DejaDupConfigWidget* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*set_from_config_finish) (DejaDupConfigWidget* self, GAsyncResult* _res_);
};

struct _DejaDupConfigList {
	DejaDupConfigWidget parent_instance;
	DejaDupConfigListPrivate * priv;
};

struct _DejaDupConfigListClass {
	DejaDupConfigWidgetClass parent_class;
};

struct _DejaDupConfigListPrivate {
	GtkTreeView* tree;
	GtkToolButton* add_button;
	GtkToolButton* remove_button;
};

struct _DejaDupConfigListSetFromConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigList* self;
	GFile** list;
	DejaDupFilteredSettings* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	GFile** _tmp4_;
	gint list_length1;
	gint _list_size_;
	GtkListStore* model;
	GtkTreeView* _tmp5_;
	GtkListStore* _tmp6_;
	guint _tmp7_;
	GtkListStore* _tmp8_;
	GtkListStore* _tmp9_;
	gint i;
	GFile** _tmp10_;
	gint _tmp10__length1;
	GFile** f_collection;
	gint f_collection_length1;
	gint _f_collection_size_;
	gint f_it;
	GFile* _tmp11_;
	GFile* f;
	gchar* s;
	GFile* _tmp12_;
	gchar* _tmp13_;
	GtkTreeIter iter;
	GtkListStore* _tmp14_;
	gint _tmp15_;
	GFile* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	GtkTreeIter _tmp20_;
};


static gpointer deja_dup_config_list_store_parent_class = NULL;
static GtkTreeDragDestIface* deja_dup_config_list_store_gtk_tree_drag_dest_parent_iface = NULL;
static GtkTreeDragSourceIface* deja_dup_config_list_store_gtk_tree_drag_source_parent_iface = NULL;
static gpointer deja_dup_config_list_parent_class = NULL;

GType deja_dup_config_list_store_get_type (void) G_GNUC_CONST;
GType deja_dup_config_widget_get_type (void) G_GNUC_CONST;
GType deja_dup_config_list_get_type (void) G_GNUC_CONST;
#define DEJA_DUP_CONFIG_LIST_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStorePrivate))
enum  {
	DEJA_DUP_CONFIG_LIST_STORE_DUMMY_PROPERTY,
	DEJA_DUP_CONFIG_LIST_STORE_LIST
};
DejaDupConfigListStore* deja_dup_config_list_store_new (DejaDupConfigList* list);
DejaDupConfigListStore* deja_dup_config_list_store_construct (GType object_type, DejaDupConfigList* list);
static gboolean deja_dup_config_list_store_real_drag_data_received (GtkTreeDragDest* base, GtkTreePath* dest, GtkSelectionData* selection_data);
static void _g_free0_ (gpointer var);
static void _g_slist_free__g_free0_ (GSList* self);
DejaDupConfigList* deja_dup_config_list_store_get_list (DejaDupConfigListStore* self);
gboolean deja_dup_config_list_add_files (DejaDupConfigList* self, GSList* files);
static gboolean deja_dup_config_list_store_real_drag_data_get (GtkTreeDragSource* base, GtkTreePath* path, GtkSelectionData* selection_data);
static void deja_dup_config_list_store_set_list (DejaDupConfigListStore* self, DejaDupConfigList* value);
static GObject * deja_dup_config_list_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void deja_dup_config_list_store_finalize (GObject* obj);
static void _vala_deja_dup_config_list_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_deja_dup_config_list_store_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define DEJA_DUP_CONFIG_LIST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigListPrivate))
enum  {
	DEJA_DUP_CONFIG_LIST_DUMMY_PROPERTY
};
DejaDupConfigList* deja_dup_config_list_new (const gchar* key, const gchar* ns);
DejaDupConfigList* deja_dup_config_list_construct (GType object_type, const gchar* key, const gchar* ns);
static gchar* deja_dup_config_list_convert_key_to_a11y_name (const gchar* key);
static gboolean deja_dup_config_list_on_key_press_event (DejaDupConfigList* self, GtkWidget* w, GdkEventKey* e);
static void deja_dup_config_list_handle_remove (DejaDupConfigList* self);
static void deja_dup_config_list_real_set_from_config_data_free (gpointer _data);
static void deja_dup_config_list_real_set_from_config (DejaDupConfigWidget* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_config_list_real_set_from_config_co (DejaDupConfigListSetFromConfigData* _data_);
const gchar* deja_dup_config_widget_get_key (DejaDupConfigWidget* self);
void deja_dup_config_list_write_to_config (DejaDupConfigList* self, GtkTreeModel* model, GtkTreePath* path);
static void _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self);
static void deja_dup_config_list_set_from_config_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_config_list_handle_selection_change (DejaDupConfigList* self, GtkTreeSelection* sel);
static void deja_dup_config_list_handle_add (DejaDupConfigList* self);
void deja_dup_destroy_widget (GtkWidget* w);
static void _vala_array_add1 (const gchar*** array, int* length, int* size, const gchar* value);
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self);
static void _g_list_free__g_free0_ (GList* self);
static void _gtk_tree_path_free0_ (gpointer var);
static void _g_list_free__gtk_tree_path_free0_ (GList* self);
static GObject * deja_dup_config_list_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
void deja_dup_config_widget_set_mnemonic_widget (DejaDupConfigWidget* self, GtkWidget* value);
static void _deja_dup_config_list_handle_add_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static void _deja_dup_config_list_handle_remove_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
static gboolean _deja_dup_config_list_on_key_press_event_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
void deja_dup_config_widget_set_from_config (DejaDupConfigWidget* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_config_widget_set_from_config_finish (DejaDupConfigWidget* self, GAsyncResult* _res_);
static void _deja_dup_config_list_handle_selection_change_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
static void deja_dup_config_list_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


DejaDupConfigListStore* deja_dup_config_list_store_construct (GType object_type, DejaDupConfigList* list) {
	DejaDupConfigListStore * self = NULL;
	DejaDupConfigList* _tmp0_ = NULL;
	g_return_val_if_fail (list != NULL, NULL);
	_tmp0_ = list;
	self = (DejaDupConfigListStore*) g_object_new (object_type, "list", _tmp0_, NULL);
	return self;
}


DejaDupConfigListStore* deja_dup_config_list_store_new (DejaDupConfigList* list) {
	return deja_dup_config_list_store_construct (DEJA_DUP_TYPE_CONFIG_LIST_STORE, list);
}


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


static void _g_slist_free__g_free0_ (GSList* self) {
	g_slist_foreach (self, (GFunc) _g_free0_, NULL);
	g_slist_free (self);
}


static gboolean deja_dup_config_list_store_real_drag_data_received (GtkTreeDragDest* base, GtkTreePath* dest, GtkSelectionData* selection_data) {
	DejaDupConfigListStore * self;
	gboolean result = FALSE;
	GtkTreePath* _tmp0_ = NULL;
	GtkSelectionData* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gchar** uris = NULL;
	GtkSelectionData* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gchar** _tmp5_ = NULL;
	gint uris_length1 = 0;
	gint _uris_size_ = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	GSList* files = NULL;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	DejaDupConfigList* _tmp23_ = NULL;
	GSList* _tmp24_ = NULL;
	gboolean _tmp25_ = FALSE;
	GError * _inner_error_ = NULL;
	self = (DejaDupConfigListStore*) base;
	g_return_val_if_fail (dest != NULL, FALSE);
	g_return_val_if_fail (selection_data != NULL, FALSE);
	_tmp0_ = dest;
	_tmp1_ = selection_data;
	_tmp2_ = deja_dup_config_list_store_gtk_tree_drag_dest_parent_iface->drag_data_received ((GtkTreeDragDest*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_store_get_type (), GtkListStore), _tmp0_, _tmp1_);
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	_tmp3_ = selection_data;
	_tmp5_ = _tmp4_ = gtk_selection_data_get_uris (_tmp3_);
	uris = _tmp5_;
	uris_length1 = _vala_array_length (_tmp4_);
	_uris_size_ = uris_length1;
	_tmp6_ = uris;
	_tmp6__length1 = uris_length1;
	if (_tmp6_ == NULL) {
		result = FALSE;
		uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	files = NULL;
	_tmp7_ = uris;
	_tmp7__length1 = uris_length1;
	{
		gchar** uri_collection = NULL;
		gint uri_collection_length1 = 0;
		gint _uri_collection_size_ = 0;
		gint uri_it = 0;
		uri_collection = _tmp7_;
		uri_collection_length1 = _tmp7__length1;
		for (uri_it = 0; uri_it < _tmp7__length1; uri_it = uri_it + 1) {
			const gchar* uri = NULL;
			uri = uri_collection[uri_it];
			{
				const gchar* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				gchar* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				_tmp8_ = uri;
				_tmp9_ = g_uri_parse_scheme (_tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = g_strcmp0 (_tmp10_, "file") != 0;
				_g_free0 (_tmp10_);
				if (_tmp11_) {
					continue;
				}
				{
					gchar* file = NULL;
					const gchar* _tmp12_ = NULL;
					gchar* _tmp13_ = NULL;
					const gchar* _tmp14_ = NULL;
					GFile* gfile = NULL;
					const gchar* _tmp15_ = NULL;
					GFile* _tmp16_ = NULL;
					GFile* _tmp17_ = NULL;
					GFileType _tmp18_ = 0;
					_tmp12_ = uri;
					_tmp13_ = g_filename_from_uri (_tmp12_, NULL, &_inner_error_);
					file = _tmp13_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						if (_inner_error_->domain == G_CONVERT_ERROR) {
							goto __catch0_g_convert_error;
						}
						__g_slist_free__g_free0_0 (files);
						uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
						g_clear_error (&_inner_error_);
						return FALSE;
					}
					_tmp14_ = file;
					if (_tmp14_ == NULL) {
						_g_free0 (file);
						continue;
					}
					_tmp15_ = file;
					_tmp16_ = g_file_new_for_path (_tmp15_);
					gfile = _tmp16_;
					_tmp17_ = gfile;
					_tmp18_ = g_file_query_file_type (_tmp17_, G_FILE_QUERY_INFO_NONE, NULL);
					if (_tmp18_ == G_FILE_TYPE_DIRECTORY) {
						const gchar* _tmp19_ = NULL;
						gchar* _tmp20_ = NULL;
						_tmp19_ = file;
						_tmp20_ = g_strdup (_tmp19_);
						files = g_slist_append (files, _tmp20_);
					}
					_g_object_unref0 (gfile);
					_g_free0 (file);
				}
				goto __finally0;
				__catch0_g_convert_error:
				{
					GError* e = NULL;
					GError* _tmp21_ = NULL;
					const gchar* _tmp22_ = NULL;
					e = _inner_error_;
					_inner_error_ = NULL;
					_tmp21_ = e;
					_tmp22_ = _tmp21_->message;
					g_warning ("ConfigList.vala:65: %s", _tmp22_);
					_g_error_free0 (e);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					__g_slist_free__g_free0_0 (files);
					uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
					g_clear_error (&_inner_error_);
					return FALSE;
				}
			}
		}
	}
	_tmp23_ = self->priv->_list;
	_tmp24_ = files;
	_tmp25_ = deja_dup_config_list_add_files (_tmp23_, _tmp24_);
	result = _tmp25_;
	__g_slist_free__g_free0_0 (files);
	uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
	return result;
}


static gboolean deja_dup_config_list_store_real_drag_data_get (GtkTreeDragSource* base, GtkTreePath* path, GtkSelectionData* selection_data) {
	DejaDupConfigListStore * self;
	gboolean result = FALSE;
	GtkTreePath* _tmp0_ = NULL;
	GtkSelectionData* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GtkTreeIter iter = {0};
	GtkTreePath* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	gboolean _tmp5_ = FALSE;
	gchar* file = NULL;
	GtkTreeIter _tmp6_ = {0};
	gchar* uri = NULL;
	gchar** uris = NULL;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar** _tmp15_ = NULL;
	gint uris_length1 = 0;
	gint _uris_size_ = 0;
	GtkSelectionData* _tmp16_ = NULL;
	gchar** _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	gboolean _tmp18_ = FALSE;
	GError * _inner_error_ = NULL;
	self = (DejaDupConfigListStore*) base;
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (selection_data != NULL, FALSE);
	_tmp0_ = path;
	_tmp1_ = selection_data;
	_tmp2_ = deja_dup_config_list_store_gtk_tree_drag_source_parent_iface->drag_data_get ((GtkTreeDragSource*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_store_get_type (), GtkListStore), _tmp0_, _tmp1_);
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	_tmp3_ = path;
	_tmp5_ = gtk_tree_model_get_iter ((GtkTreeModel*) self, &_tmp4_, _tmp3_);
	iter = _tmp4_;
	if (!_tmp5_) {
		result = FALSE;
		return result;
	}
	_tmp6_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) self, &_tmp6_, 0, &file, -1);
	{
		gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		_tmp8_ = file;
		_tmp9_ = g_filename_to_uri (_tmp8_, NULL, &_inner_error_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_CONVERT_ERROR) {
				goto __catch1_g_convert_error;
			}
			_g_free0 (uri);
			_g_free0 (file);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return FALSE;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		_g_free0 (uri);
		uri = _tmp10_;
		_g_free0 (_tmp7_);
	}
	goto __finally1;
	__catch1_g_convert_error:
	{
		GError* e = NULL;
		GError* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp11_ = e;
		_tmp12_ = _tmp11_->message;
		g_warning ("ConfigList.vala:90: %s", _tmp12_);
		result = FALSE;
		_g_error_free0 (e);
		_g_free0 (uri);
		_g_free0 (file);
		return result;
	}
	__finally1:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_free0 (uri);
		_g_free0 (file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	_tmp13_ = uri;
	_tmp14_ = g_strdup (_tmp13_);
	_tmp15_ = g_new0 (gchar*, 1 + 1);
	_tmp15_[0] = _tmp14_;
	uris = _tmp15_;
	uris_length1 = 1;
	_uris_size_ = uris_length1;
	_tmp16_ = selection_data;
	_tmp17_ = uris;
	_tmp17__length1 = uris_length1;
	_tmp18_ = gtk_selection_data_set_uris (_tmp16_, _tmp17_);
	result = _tmp18_;
	uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (uri);
	_g_free0 (file);
	return result;
}


DejaDupConfigList* deja_dup_config_list_store_get_list (DejaDupConfigListStore* self) {
	DejaDupConfigList* result;
	DejaDupConfigList* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_list;
	result = _tmp0_;
	return result;
}


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


static void deja_dup_config_list_store_set_list (DejaDupConfigListStore* self, DejaDupConfigList* value) {
	DejaDupConfigList* _tmp0_ = NULL;
	DejaDupConfigList* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_list);
	self->priv->_list = _tmp1_;
	g_object_notify ((GObject *) self, "list");
}


static GObject * deja_dup_config_list_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DejaDupConfigListStore * self;
	GType* types = NULL;
	GType* _tmp0_ = NULL;
	gint types_length1 = 0;
	gint _types_size_ = 0;
	GType* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	parent_class = G_OBJECT_CLASS (deja_dup_config_list_store_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStore);
	_tmp0_ = g_new0 (GType, 2);
	_tmp0_[0] = G_TYPE_STRING;
	_tmp0_[1] = G_TYPE_STRING;
	types = _tmp0_;
	types_length1 = 2;
	_types_size_ = types_length1;
	_tmp1_ = types;
	_tmp1__length1 = types_length1;
	gtk_list_store_set_column_types ((GtkListStore*) self, _tmp1__length1, _tmp1_);
	types = (g_free (types), NULL);
	return obj;
}


static void deja_dup_config_list_store_class_init (DejaDupConfigListStoreClass * klass) {
	deja_dup_config_list_store_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupConfigListStorePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_config_list_store_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_config_list_store_set_property;
	G_OBJECT_CLASS (klass)->constructor = deja_dup_config_list_store_constructor;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_config_list_store_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_CONFIG_LIST_STORE_LIST, g_param_spec_object ("list", "list", "list", DEJA_DUP_TYPE_CONFIG_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void deja_dup_config_list_store_gtk_tree_drag_dest_interface_init (GtkTreeDragDestIface * iface) {
	deja_dup_config_list_store_gtk_tree_drag_dest_parent_iface = g_type_interface_peek_parent (iface);
	iface->drag_data_received = (gboolean (*)(GtkTreeDragDest*, GtkTreePath*, GtkSelectionData*)) deja_dup_config_list_store_real_drag_data_received;
}


static void deja_dup_config_list_store_gtk_tree_drag_source_interface_init (GtkTreeDragSourceIface * iface) {
	deja_dup_config_list_store_gtk_tree_drag_source_parent_iface = g_type_interface_peek_parent (iface);
	iface->drag_data_get = (gboolean (*)(GtkTreeDragSource*, GtkTreePath*, GtkSelectionData*)) deja_dup_config_list_store_real_drag_data_get;
}


static void deja_dup_config_list_store_instance_init (DejaDupConfigListStore * self) {
	self->priv = DEJA_DUP_CONFIG_LIST_STORE_GET_PRIVATE (self);
}


static void deja_dup_config_list_store_finalize (GObject* obj) {
	DejaDupConfigListStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStore);
	_g_object_unref0 (self->priv->_list);
	G_OBJECT_CLASS (deja_dup_config_list_store_parent_class)->finalize (obj);
}


GType deja_dup_config_list_store_get_type (void) {
	static volatile gsize deja_dup_config_list_store_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_config_list_store_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupConfigListStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_config_list_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupConfigListStore), 0, (GInstanceInitFunc) deja_dup_config_list_store_instance_init, NULL };
		static const GInterfaceInfo gtk_tree_drag_dest_info = { (GInterfaceInitFunc) deja_dup_config_list_store_gtk_tree_drag_dest_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gtk_tree_drag_source_info = { (GInterfaceInitFunc) deja_dup_config_list_store_gtk_tree_drag_source_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType deja_dup_config_list_store_type_id;
		deja_dup_config_list_store_type_id = g_type_register_static (gtk_list_store_get_type (), "DejaDupConfigListStore", &g_define_type_info, 0);
		g_type_add_interface_static (deja_dup_config_list_store_type_id, GTK_TYPE_TREE_DRAG_DEST, &gtk_tree_drag_dest_info);
		g_type_add_interface_static (deja_dup_config_list_store_type_id, GTK_TYPE_TREE_DRAG_SOURCE, &gtk_tree_drag_source_info);
		g_once_init_leave (&deja_dup_config_list_store_type_id__volatile, deja_dup_config_list_store_type_id);
	}
	return deja_dup_config_list_store_type_id__volatile;
}


static void _vala_deja_dup_config_list_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DejaDupConfigListStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStore);
	switch (property_id) {
		case DEJA_DUP_CONFIG_LIST_STORE_LIST:
		g_value_set_object (value, deja_dup_config_list_store_get_list (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_deja_dup_config_list_store_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DejaDupConfigListStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_CONFIG_LIST_STORE, DejaDupConfigListStore);
	switch (property_id) {
		case DEJA_DUP_CONFIG_LIST_STORE_LIST:
		deja_dup_config_list_store_set_list (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


DejaDupConfigList* deja_dup_config_list_construct (GType object_type, const gchar* key, const gchar* ns) {
	DejaDupConfigList * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (key != NULL, NULL);
	g_return_val_if_fail (ns != NULL, NULL);
	_tmp0_ = key;
	_tmp1_ = ns;
	self = (DejaDupConfigList*) g_object_new (object_type, "key", _tmp0_, "ns", _tmp1_, NULL);
	return self;
}


DejaDupConfigList* deja_dup_config_list_new (const gchar* key, const gchar* ns) {
	return deja_dup_config_list_construct (DEJA_DUP_TYPE_CONFIG_LIST, key, ns);
}


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_ = 0L;
	gunichar _tmp1_ = 0U;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	result = _tmp1_;
	return result;
}


static gchar* deja_dup_config_list_convert_key_to_a11y_name (const gchar* key) {
	gchar* result = NULL;
	GString* name = NULL;
	GString* _tmp0_ = NULL;
	gboolean next_upper = FALSE;
	gint i = 0;
	gunichar ch = 0U;
	GString* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = g_string_new ("");
	name = _tmp0_;
	next_upper = TRUE;
	i = 0;
	while (TRUE) {
		const gchar* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gunichar _tmp3_ = 0U;
		gunichar _tmp4_ = 0U;
		gunichar _tmp5_ = 0U;
		gboolean _tmp6_ = FALSE;
		GString* _tmp9_ = NULL;
		gunichar _tmp10_ = 0U;
		_tmp1_ = key;
		_tmp2_ = i;
		i = _tmp2_ + 1;
		_tmp3_ = string_get_char (_tmp1_, (glong) _tmp2_);
		ch = _tmp3_;
		_tmp4_ = ch;
		if (!(_tmp4_ != ((gunichar) 0))) {
			break;
		}
		_tmp5_ = ch;
		if (_tmp5_ == ((gunichar) '-')) {
			next_upper = TRUE;
			continue;
		}
		_tmp6_ = next_upper;
		if (_tmp6_) {
			gunichar _tmp7_ = 0U;
			gunichar _tmp8_ = 0U;
			_tmp7_ = ch;
			_tmp8_ = g_unichar_toupper (_tmp7_);
			ch = _tmp8_;
			next_upper = FALSE;
		}
		_tmp9_ = name;
		_tmp10_ = ch;
		g_string_append_unichar (_tmp9_, _tmp10_);
	}
	_tmp11_ = name;
	_tmp12_ = _tmp11_->str;
	_tmp13_ = g_strdup (_tmp12_);
	result = _tmp13_;
	_g_string_free0 (name);
	return result;
}


static gboolean deja_dup_config_list_on_key_press_event (DejaDupConfigList* self, GtkWidget* w, GdkEventKey* e) {
	gboolean result = FALSE;
	guint modifiers = 0U;
	GdkModifierType _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	GdkEventKey* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = gtk_accelerator_get_default_mod_mask ();
	modifiers = (guint) _tmp0_;
	_tmp3_ = e;
	_tmp4_ = _tmp3_->keyval;
	if (_tmp4_ == ((guint) 0xffff)) {
		_tmp2_ = TRUE;
	} else {
		GdkEventKey* _tmp5_ = NULL;
		guint _tmp6_ = 0U;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->keyval;
		_tmp2_ = _tmp6_ == ((guint) 0xff9f);
	}
	if (_tmp2_) {
		GdkEventKey* _tmp7_ = NULL;
		GdkModifierType _tmp8_ = 0;
		guint _tmp9_ = 0U;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->state;
		_tmp9_ = modifiers;
		_tmp1_ = (_tmp8_ & _tmp9_) == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		deja_dup_config_list_handle_remove (self);
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}


static void deja_dup_config_list_real_set_from_config_data_free (gpointer _data) {
	DejaDupConfigListSetFromConfigData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupConfigListSetFromConfigData, _data_);
}


static void deja_dup_config_list_real_set_from_config (DejaDupConfigWidget* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigList * self;
	DejaDupConfigListSetFromConfigData* _data_;
	DejaDupConfigList* _tmp0_ = NULL;
	self = (DejaDupConfigList*) base;
	_data_ = g_slice_new0 (DejaDupConfigListSetFromConfigData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_list_real_set_from_config);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_list_real_set_from_config_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_config_list_real_set_from_config_co (_data_);
}


static void deja_dup_config_list_real_set_from_config_finish (DejaDupConfigWidget* base, GAsyncResult* _res_) {
	DejaDupConfigListSetFromConfigData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self) {
	deja_dup_config_list_write_to_config ((DejaDupConfigList*) self, _sender, path);
}


static void deja_dup_config_list_set_from_config_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupConfigListSetFromConfigData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_config_list_real_set_from_config_co (_data_);
}


static gboolean deja_dup_config_list_real_set_from_config_co (DejaDupConfigListSetFromConfigData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = ((DejaDupConfigWidget*) _data_->self)->settings;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) _data_->self);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = 0;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = deja_dup_filtered_settings_get_file_list (_data_->_tmp0_, _data_->_tmp2_, &_data_->_tmp3_);
	_data_->list_length1 = 0;
	_data_->_list_size_ = 0;
	_data_->list = _data_->_tmp4_;
	_data_->list_length1 = _data_->_tmp3_;
	_data_->_list_size_ = _data_->list_length1;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->self->priv->tree;
	g_object_get ((GObject*) _data_->_tmp5_, "model", &_data_->model, NULL);
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->model;
	_data_->_tmp7_ = 0U;
	g_signal_parse_name ("row-deleted", GTK_TYPE_TREE_MODEL, &_data_->_tmp7_, NULL, FALSE);
	g_signal_handlers_disconnect_matched ((GtkTreeModel*) _data_->_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _data_->_tmp7_, 0, NULL, (GCallback) _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted, _data_->self);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->model;
	gtk_list_store_clear (_data_->_tmp8_);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->model;
	g_signal_connect_object ((GtkTreeModel*) _data_->_tmp9_, "row-deleted", (GCallback) _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted, _data_->self, 0);
	_data_->i = 0;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10__length1 = 0;
	_data_->_tmp10_ = _data_->list;
	_data_->_tmp10__length1 = _data_->list_length1;
	{
		_data_->f_collection_length1 = 0;
		_data_->_f_collection_size_ = 0;
		_data_->f_collection = _data_->_tmp10_;
		_data_->f_collection_length1 = _data_->_tmp10__length1;
		for (_data_->f_it = 0; _data_->f_it < _data_->_tmp10__length1; _data_->f_it = _data_->f_it + 1) {
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _g_object_ref0 (_data_->f_collection[_data_->f_it]);
			_data_->f = _data_->_tmp11_;
			{
				_data_->_tmp12_ = NULL;
				_data_->_tmp12_ = _data_->f;
				_data_->_state_ = 1;
				deja_dup_get_nickname (_data_->_tmp12_, deja_dup_config_list_set_from_config_ready, _data_);
				return FALSE;
				_state_1:
				_data_->_tmp13_ = NULL;
				_data_->_tmp13_ = deja_dup_get_nickname_finish (_data_->_res_);
				_data_->s = _data_->_tmp13_;
				_data_->_tmp14_ = NULL;
				_data_->_tmp14_ = _data_->model;
				_data_->_tmp15_ = 0;
				_data_->_tmp15_ = _data_->i;
				_data_->i = _data_->_tmp15_ + 1;
				_data_->_tmp16_ = NULL;
				_data_->_tmp16_ = _data_->f;
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = g_file_get_path (_data_->_tmp16_);
				_data_->_tmp18_ = NULL;
				_data_->_tmp18_ = _data_->_tmp17_;
				_data_->_tmp19_ = NULL;
				_data_->_tmp19_ = _data_->s;
				memset (&_data_->_tmp20_, 0, sizeof (GtkTreeIter));
				gtk_list_store_insert_with_values (_data_->_tmp14_, &_data_->_tmp20_, _data_->_tmp15_, 0, _data_->_tmp18_, 1, _data_->_tmp19_, -1);
				_data_->iter = _data_->_tmp20_;
				_g_free0 (_data_->_tmp18_);
				_g_free0 (_data_->s);
				_g_object_unref0 (_data_->f);
			}
		}
	}
	_g_object_unref0 (_data_->model);
	_data_->list = (_vala_array_free (_data_->list, _data_->list_length1, (GDestroyNotify) g_object_unref), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void deja_dup_config_list_handle_selection_change (DejaDupConfigList* self, GtkTreeSelection* sel) {
	gboolean empty = FALSE;
	GtkTreeSelection* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GtkToolButton* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sel != NULL);
	_tmp0_ = sel;
	_tmp1_ = gtk_tree_selection_count_selected_rows (_tmp0_);
	empty = _tmp1_ == 0;
	_tmp2_ = self->priv->remove_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, !empty);
}


static void deja_dup_config_list_handle_add (DejaDupConfigList* self) {
	GtkFileChooserDialog* dlg = NULL;
	const gchar* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkFileChooserDialog* _tmp4_ = NULL;
	GtkFileChooserDialog* _tmp5_ = NULL;
	GtkFileChooserDialog* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	GSList* files = NULL;
	GtkFileChooserDialog* _tmp9_ = NULL;
	GSList* _tmp10_ = NULL;
	GtkFileChooserDialog* _tmp11_ = NULL;
	GSList* _tmp12_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Choose folders");
	_tmp1_ = gtk_widget_get_ancestor ((GtkWidget*) self, gtk_window_get_type ());
	_tmp2_ = _ ("_Cancel");
	_tmp3_ = _ ("_Add");
	_tmp4_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp1_) : NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _tmp2_, GTK_RESPONSE_CANCEL, _tmp3_, GTK_RESPONSE_ACCEPT, NULL);
	g_object_ref_sink (_tmp4_);
	dlg = _tmp4_;
	_tmp5_ = dlg;
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _tmp5_, TRUE);
	_tmp6_ = dlg;
	_tmp7_ = gtk_dialog_run ((GtkDialog*) _tmp6_);
	if (_tmp7_ != ((gint) GTK_RESPONSE_ACCEPT)) {
		GtkFileChooserDialog* _tmp8_ = NULL;
		_tmp8_ = dlg;
		deja_dup_destroy_widget ((GtkWidget*) _tmp8_);
		_g_object_unref0 (dlg);
		return;
	}
	_tmp9_ = dlg;
	_tmp10_ = gtk_file_chooser_get_filenames ((GtkFileChooser*) _tmp9_);
	files = _tmp10_;
	_tmp11_ = dlg;
	deja_dup_destroy_widget ((GtkWidget*) _tmp11_);
	_tmp12_ = files;
	deja_dup_config_list_add_files (self, _tmp12_);
	__g_slist_free__g_free0_0 (files);
	_g_object_unref0 (dlg);
}


static void _vala_array_add1 (const gchar*** array, int* length, int* size, const gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (const gchar*, *array, *size);
	}
	(*array)[(*length)++] = value;
}


gboolean deja_dup_config_list_add_files (DejaDupConfigList* self, GSList* files) {
	gboolean result = FALSE;
	GSList* _tmp0_ = NULL;
	GVariant* slist_val = NULL;
	DejaDupFilteredSettings* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GVariant* _tmp4_ = NULL;
	const gchar** slist = NULL;
	GVariant* _tmp5_ = NULL;
	size_t _tmp6_;
	const gchar** _tmp7_ = NULL;
	gint slist_length1 = 0;
	gint _slist_size_ = 0;
	gboolean rv = FALSE;
	GSList* _tmp8_ = NULL;
	gboolean _tmp25_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = files;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = ((DejaDupConfigWidget*) self)->settings;
	_tmp2_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_settings_get_value ((GSettings*) _tmp1_, _tmp3_);
	slist_val = _tmp4_;
	_tmp5_ = slist_val;
	_tmp7_ = g_variant_get_strv (_tmp5_, &_tmp6_);
	slist = _tmp7_;
	slist_length1 = _tmp6_;
	_slist_size_ = slist_length1;
	rv = FALSE;
	_tmp8_ = files;
	{
		GSList* file_collection = NULL;
		GSList* file_it = NULL;
		file_collection = _tmp8_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			gchar* _tmp9_ = NULL;
			gchar* file = NULL;
			_tmp9_ = g_strdup ((const gchar*) file_it->data);
			file = _tmp9_;
			{
				GFile* folder = NULL;
				const gchar* _tmp10_ = NULL;
				GFile* _tmp11_ = NULL;
				gboolean found = FALSE;
				const gchar** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				gboolean _tmp21_ = FALSE;
				_tmp10_ = file;
				_tmp11_ = g_file_new_for_path (_tmp10_);
				folder = _tmp11_;
				found = FALSE;
				_tmp12_ = slist;
				_tmp12__length1 = slist_length1;
				{
					const gchar** s_collection = NULL;
					gint s_collection_length1 = 0;
					gint _s_collection_size_ = 0;
					gint s_it = 0;
					s_collection = _tmp12_;
					s_collection_length1 = _tmp12__length1;
					for (s_it = 0; s_it < _tmp12__length1; s_it = s_it + 1) {
						gchar* _tmp13_ = NULL;
						gchar* s = NULL;
						_tmp13_ = g_strdup ((gchar*) s_collection[s_it]);
						s = _tmp13_;
						{
							GFile* sfile = NULL;
							const gchar* _tmp14_ = NULL;
							GFile* _tmp15_ = NULL;
							gboolean _tmp16_ = FALSE;
							GFile* _tmp17_ = NULL;
							_tmp14_ = s;
							_tmp15_ = deja_dup_parse_dir (_tmp14_);
							sfile = _tmp15_;
							_tmp17_ = sfile;
							if (_tmp17_ != NULL) {
								GFile* _tmp18_ = NULL;
								GFile* _tmp19_ = NULL;
								gboolean _tmp20_ = FALSE;
								_tmp18_ = sfile;
								_tmp19_ = folder;
								_tmp20_ = g_file_equal (_tmp18_, _tmp19_);
								_tmp16_ = _tmp20_;
							} else {
								_tmp16_ = FALSE;
							}
							if (_tmp16_) {
								found = TRUE;
								_g_object_unref0 (sfile);
								_g_free0 (s);
								break;
							}
							_g_object_unref0 (sfile);
							_g_free0 (s);
						}
					}
				}
				_tmp21_ = found;
				if (!_tmp21_) {
					const gchar** _tmp22_ = NULL;
					gint _tmp22__length1 = 0;
					GFile* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
					_tmp22_ = slist;
					_tmp22__length1 = slist_length1;
					_tmp23_ = folder;
					_tmp24_ = g_file_get_parse_name (_tmp23_);
					_vala_array_add1 (&slist, &slist_length1, &_slist_size_, _tmp24_);
					rv = TRUE;
				}
				_g_object_unref0 (folder);
				_g_free0 (file);
			}
		}
	}
	_tmp25_ = rv;
	if (_tmp25_) {
		DejaDupFilteredSettings* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
		const gchar** _tmp29_ = NULL;
		gint _tmp29__length1 = 0;
		GVariant* _tmp30_ = NULL;
		GVariant* _tmp31_ = NULL;
		_tmp26_ = ((DejaDupConfigWidget*) self)->settings;
		_tmp27_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) self);
		_tmp28_ = _tmp27_;
		_tmp29_ = slist;
		_tmp29__length1 = slist_length1;
		_tmp30_ = g_variant_new_strv (_tmp29_, _tmp29__length1);
		g_variant_ref_sink (_tmp30_);
		_tmp31_ = _tmp30_;
		deja_dup_filtered_settings_set_value (_tmp26_, _tmp28_, _tmp31_);
		_g_variant_unref0 (_tmp31_);
	}
	result = rv;
	slist = (g_free (slist), NULL);
	_g_variant_unref0 (slist_val);
	return result;
}


static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


void deja_dup_config_list_write_to_config (DejaDupConfigList* self, GtkTreeModel* model, GtkTreePath* path) {
	GtkTreeIter iter = {0};
	gchar** paths = NULL;
	gchar** _tmp0_ = NULL;
	gint paths_length1 = 0;
	gint _paths_size_ = 0;
	GtkTreeModel* _tmp1_ = NULL;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
	DejaDupFilteredSettings* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	gchar** _tmp15_ = NULL;
	gint _tmp15__length1 = 0;
	GVariant* _tmp16_ = NULL;
	GVariant* _tmp17_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (model != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	paths = _tmp0_;
	paths_length1 = 0;
	_paths_size_ = paths_length1;
	_tmp1_ = model;
	_tmp3_ = gtk_tree_model_get_iter_first (_tmp1_, &_tmp2_);
	iter = _tmp2_;
	if (_tmp3_) {
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gchar* current = NULL;
				GtkTreeModel* _tmp7_ = NULL;
				GtkTreeIter _tmp8_ = {0};
				gchar** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				const gchar* _tmp10_ = NULL;
				gchar* _tmp11_ = NULL;
				if (!_tmp4_) {
					GtkTreeModel* _tmp5_ = NULL;
					gboolean _tmp6_ = FALSE;
					_tmp5_ = model;
					_tmp6_ = gtk_tree_model_iter_next (_tmp5_, &iter);
					if (!_tmp6_) {
						break;
					}
				}
				_tmp4_ = FALSE;
				_tmp7_ = model;
				_tmp8_ = iter;
				gtk_tree_model_get (_tmp7_, &_tmp8_, 0, &current, -1);
				_tmp9_ = paths;
				_tmp9__length1 = paths_length1;
				_tmp10_ = current;
				_tmp11_ = g_strdup (_tmp10_);
				_vala_array_add2 (&paths, &paths_length1, &_paths_size_, _tmp11_);
				_g_free0 (current);
			}
		}
	}
	_tmp12_ = ((DejaDupConfigWidget*) self)->settings;
	_tmp13_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = paths;
	_tmp15__length1 = paths_length1;
	_tmp16_ = g_variant_new_strv ((const gchar**) _tmp15_, (_tmp15__length1 * sizeof (gchar*)) / sizeof (const gchar*));
	g_variant_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	deja_dup_filtered_settings_set_value (_tmp12_, _tmp14_, _tmp17_);
	_g_variant_unref0 (_tmp17_);
	paths = (_vala_array_free (paths, paths_length1, (GDestroyNotify) g_free), NULL);
}


static gpointer _gtk_tree_path_copy0 (gpointer self) {
	return self ? gtk_tree_path_copy (self) : NULL;
}


static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self) {
	GtkTreeIter* dup;
	dup = g_new0 (GtkTreeIter, 1);
	memcpy (dup, self, sizeof (GtkTreeIter));
	return dup;
}


static gpointer __gtk_tree_iter_dup0 (gpointer self) {
	return self ? _gtk_tree_iter_dup (self) : NULL;
}


static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


static void _gtk_tree_path_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL));
}


static void _g_list_free__gtk_tree_path_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _gtk_tree_path_free0_, NULL);
	g_list_free (self);
}


static void deja_dup_config_list_handle_remove (DejaDupConfigList* self) {
	GtkTreeSelection* sel = NULL;
	GtkTreeView* _tmp0_ = NULL;
	GtkTreeSelection* _tmp1_ = NULL;
	GtkTreeSelection* _tmp2_ = NULL;
	GtkTreeModel* model = NULL;
	GList* paths = NULL;
	GtkTreeSelection* _tmp3_ = NULL;
	GtkTreeModel* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
	GList* iters = NULL;
	GList* _tmp6_ = NULL;
	GtkTreeModel* _tmp14_ = NULL;
	guint _tmp15_ = 0U;
	GList* _tmp16_ = NULL;
	GtkTreeModel* _tmp19_ = NULL;
	GtkTreeModel* _tmp20_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->tree;
	_tmp1_ = gtk_tree_view_get_selection (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	sel = _tmp2_;
	_tmp3_ = sel;
	_tmp5_ = gtk_tree_selection_get_selected_rows (_tmp3_, &_tmp4_);
	model = _tmp4_;
	paths = _tmp5_;
	iters = NULL;
	_tmp6_ = paths;
	{
		GList* path_collection = NULL;
		GList* path_it = NULL;
		path_collection = _tmp6_;
		for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
			GtkTreePath* _tmp7_ = NULL;
			GtkTreePath* path = NULL;
			_tmp7_ = _gtk_tree_path_copy0 ((GtkTreePath*) path_it->data);
			path = _tmp7_;
			{
				GtkTreeIter iter = {0};
				GtkTreeModel* _tmp8_ = NULL;
				GtkTreePath* _tmp9_ = NULL;
				GtkTreeIter _tmp10_ = {0};
				gboolean _tmp11_ = FALSE;
				_tmp8_ = model;
				_tmp9_ = path;
				_tmp11_ = gtk_tree_model_get_iter (_tmp8_, &_tmp10_, _tmp9_);
				iter = _tmp10_;
				if (_tmp11_) {
					GtkTreeIter _tmp12_ = {0};
					GtkTreeIter* _tmp13_ = NULL;
					_tmp12_ = iter;
					_tmp13_ = __gtk_tree_iter_dup0 (&_tmp12_);
					iters = g_list_prepend (iters, _tmp13_);
				}
				_gtk_tree_path_free0 (path);
			}
		}
	}
	_tmp14_ = model;
	g_signal_parse_name ("row-deleted", GTK_TYPE_TREE_MODEL, &_tmp15_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp14_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted, self);
	_tmp16_ = iters;
	{
		GList* iter_collection = NULL;
		GList* iter_it = NULL;
		iter_collection = _tmp16_;
		for (iter_it = iter_collection; iter_it != NULL; iter_it = iter_it->next) {
			GtkTreeIter iter = {0};
			iter = *((GtkTreeIter*) iter_it->data);
			{
				GtkTreeModel* _tmp17_ = NULL;
				GtkTreeIter _tmp18_ = {0};
				_tmp17_ = model;
				_tmp18_ = iter;
				gtk_list_store_remove (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, gtk_list_store_get_type ()) ? ((GtkListStore*) _tmp17_) : NULL, &_tmp18_);
			}
		}
	}
	_tmp19_ = model;
	g_signal_connect_object (_tmp19_, "row-deleted", (GCallback) _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted, self, 0);
	_tmp20_ = model;
	deja_dup_config_list_write_to_config (self, _tmp20_, NULL);
	__g_list_free__g_free0_0 (iters);
	__g_list_free__gtk_tree_path_free0_0 (paths);
	_g_object_unref0 (sel);
}


static void _deja_dup_config_list_handle_add_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	deja_dup_config_list_handle_add ((DejaDupConfigList*) self);
}


static void _deja_dup_config_list_handle_remove_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
	deja_dup_config_list_handle_remove ((DejaDupConfigList*) self);
}


static gboolean _deja_dup_config_list_on_key_press_event_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = deja_dup_config_list_on_key_press_event ((DejaDupConfigList*) self, _sender, event);
	return result;
}


static void _deja_dup_config_list_handle_selection_change_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
	deja_dup_config_list_handle_selection_change ((DejaDupConfigList*) self, _sender);
}


static GObject * deja_dup_config_list_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DejaDupConfigList * self;
	DejaDupConfigListStore* model = NULL;
	DejaDupConfigListStore* _tmp0_ = NULL;
	GtkTreeView* _tmp1_ = NULL;
	GtkTreeView* _tmp2_ = NULL;
	DejaDupConfigListStore* _tmp3_ = NULL;
	GtkTreeView* _tmp4_ = NULL;
	GtkTreeView* _tmp5_ = NULL;
	gchar* a11y_name = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	AtkObject* accessible = NULL;
	GtkTreeView* _tmp9_ = NULL;
	AtkObject* _tmp10_ = NULL;
	AtkObject* _tmp11_ = NULL;
	AtkObject* _tmp12_ = NULL;
	GtkCellRendererText* renderer = NULL;
	GtkCellRendererText* _tmp15_ = NULL;
	GtkCellRendererText* _tmp16_ = NULL;
	GtkCellRendererText* _tmp17_ = NULL;
	GtkTreeView* _tmp18_ = NULL;
	GtkCellRendererText* _tmp19_ = NULL;
	GtkTargetEntry* targets = NULL;
	GtkTargetEntry* _tmp20_ = NULL;
	gint targets_length1 = 0;
	gint _targets_size_ = 0;
	GtkTargetEntry* _tmp21_ = NULL;
	gint _tmp21__length1 = 0;
	GtkTargetEntry* _tmp22_ = NULL;
	gint _tmp22__length1 = 0;
	GtkTargetEntry* _tmp23_ = NULL;
	gint _tmp23__length1 = 0;
	const gchar* _tmp24_ = NULL;
	const gchar* _tmp25_ = NULL;
	GQuark _tmp26_ = 0U;
	GtkTreeView* _tmp27_ = NULL;
	GtkTargetEntry* _tmp28_ = NULL;
	gint _tmp28__length1 = 0;
	GtkTargetEntry* _tmp29_ = NULL;
	gint _tmp29__length1 = 0;
	GtkTreeView* _tmp30_ = NULL;
	GtkTargetEntry* _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	DejaDupConfigListStore* _tmp32_ = NULL;
	GtkScrolledWindow* scroll = NULL;
	GtkScrolledWindow* _tmp33_ = NULL;
	GtkScrolledWindow* _tmp34_ = NULL;
	GtkScrolledWindow* _tmp35_ = NULL;
	GtkScrolledWindow* _tmp36_ = NULL;
	GtkScrolledWindow* _tmp37_ = NULL;
	GtkTreeView* _tmp38_ = NULL;
	GtkToolbar* tbar = NULL;
	GtkToolbar* _tmp39_ = NULL;
	GtkToolbar* _tmp40_ = NULL;
	GtkToolbar* _tmp41_ = NULL;
	GtkToolbar* _tmp42_ = NULL;
	GtkScrolledWindow* _tmp43_ = NULL;
	GtkStyleContext* _tmp44_ = NULL;
	GtkToolbar* _tmp45_ = NULL;
	GtkStyleContext* _tmp46_ = NULL;
	GtkToolbar* _tmp47_ = NULL;
	GtkStyleContext* _tmp48_ = NULL;
	const gchar* _tmp49_ = NULL;
	GtkToolButton* _tmp50_ = NULL;
	GtkToolButton* _tmp51_ = NULL;
	const gchar* _tmp52_ = NULL;
	GtkToolButton* _tmp53_ = NULL;
	GtkToolButton* _tmp54_ = NULL;
	GtkToolButton* _tmp55_ = NULL;
	AtkObject* _tmp56_ = NULL;
	AtkObject* _tmp57_ = NULL;
	AtkObject* _tmp58_ = NULL;
	GtkToolbar* _tmp63_ = NULL;
	GtkToolButton* _tmp64_ = NULL;
	const gchar* _tmp65_ = NULL;
	GtkToolButton* _tmp66_ = NULL;
	GtkToolButton* _tmp67_ = NULL;
	const gchar* _tmp68_ = NULL;
	GtkToolButton* _tmp69_ = NULL;
	GtkToolButton* _tmp70_ = NULL;
	GtkToolButton* _tmp71_ = NULL;
	AtkObject* _tmp72_ = NULL;
	AtkObject* _tmp73_ = NULL;
	AtkObject* _tmp74_ = NULL;
	GtkToolbar* _tmp79_ = NULL;
	GtkToolButton* _tmp80_ = NULL;
	GtkBox* vbox = NULL;
	GtkBox* _tmp81_ = NULL;
	GtkBox* _tmp82_ = NULL;
	GtkScrolledWindow* _tmp83_ = NULL;
	GtkBox* _tmp84_ = NULL;
	GtkToolbar* _tmp85_ = NULL;
	GtkBox* _tmp86_ = NULL;
	GtkTreeSelection* selection = NULL;
	GtkTreeView* _tmp87_ = NULL;
	GtkTreeSelection* _tmp88_ = NULL;
	GtkTreeSelection* _tmp89_ = NULL;
	GtkTreeSelection* _tmp90_ = NULL;
	GtkTreeSelection* _tmp91_ = NULL;
	GtkTreeSelection* _tmp92_ = NULL;
	parent_class = G_OBJECT_CLASS (deja_dup_config_list_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigList);
	_tmp0_ = deja_dup_config_list_store_new (self);
	model = _tmp0_;
	_tmp1_ = (GtkTreeView*) gtk_tree_view_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->tree);
	self->priv->tree = _tmp1_;
	_tmp2_ = self->priv->tree;
	_tmp3_ = model;
	gtk_tree_view_set_model (_tmp2_, (GtkTreeModel*) _tmp3_);
	_tmp4_ = self->priv->tree;
	gtk_tree_view_set_headers_visible (_tmp4_, FALSE);
	_tmp5_ = self->priv->tree;
	deja_dup_config_widget_set_mnemonic_widget ((DejaDupConfigWidget*) self, (GtkWidget*) _tmp5_);
	_tmp6_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) self);
	_tmp7_ = _tmp6_;
	_tmp8_ = deja_dup_config_list_convert_key_to_a11y_name (_tmp7_);
	a11y_name = _tmp8_;
	_tmp9_ = self->priv->tree;
	_tmp10_ = gtk_widget_get_accessible ((GtkWidget*) _tmp9_);
	_tmp11_ = _g_object_ref0 (_tmp10_);
	accessible = _tmp11_;
	_tmp12_ = accessible;
	if (_tmp12_ != NULL) {
		AtkObject* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		_tmp13_ = accessible;
		_tmp14_ = a11y_name;
		atk_object_set_name (_tmp13_, _tmp14_);
	}
	_tmp15_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp15_);
	renderer = _tmp15_;
	_tmp16_ = renderer;
	g_object_set ((GtkCellRenderer*) _tmp16_, "xpad", (guint) 12, NULL);
	_tmp17_ = renderer;
	g_object_set ((GtkCellRenderer*) _tmp17_, "ypad", (guint) 12, NULL);
	_tmp18_ = self->priv->tree;
	_tmp19_ = renderer;
	gtk_tree_view_insert_column_with_attributes (_tmp18_, -1, NULL, (GtkCellRenderer*) _tmp19_, "text", 1, NULL);
	_tmp20_ = g_new0 (GtkTargetEntry, 1);
	targets = _tmp20_;
	targets_length1 = 1;
	_targets_size_ = targets_length1;
	_tmp21_ = targets;
	_tmp21__length1 = targets_length1;
	_tmp21_[0].target = "text/uri-list";
	_tmp22_ = targets;
	_tmp22__length1 = targets_length1;
	_tmp22_[0].flags = (guint) GTK_TARGET_OTHER_WIDGET;
	_tmp23_ = targets;
	_tmp23__length1 = targets_length1;
	_tmp24_ = deja_dup_config_widget_get_key ((DejaDupConfigWidget*) self);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_quark_from_string (_tmp25_);
	_tmp23_[0].info = (guint) _tmp26_;
	_tmp27_ = self->priv->tree;
	_tmp28_ = targets;
	_tmp28__length1 = targets_length1;
	gtk_tree_view_enable_model_drag_dest (_tmp27_, _tmp28_, _tmp28__length1, GDK_ACTION_COPY);
	_tmp29_ = targets;
	_tmp29__length1 = targets_length1;
	_tmp29_[0].flags = (guint) GTK_TARGET_SAME_APP;
	_tmp30_ = self->priv->tree;
	_tmp31_ = targets;
	_tmp31__length1 = targets_length1;
	gtk_tree_view_enable_model_drag_source (_tmp30_, GDK_BUTTON1_MASK, _tmp31_, _tmp31__length1, GDK_ACTION_MOVE);
	_tmp32_ = model;
	g_signal_connect_object ((GtkTreeModel*) _tmp32_, "row-deleted", (GCallback) _deja_dup_config_list_write_to_config_gtk_tree_model_row_deleted, self, 0);
	_tmp33_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp33_);
	scroll = _tmp33_;
	_tmp34_ = scroll;
	g_object_set (_tmp34_, "hscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	_tmp35_ = scroll;
	g_object_set (_tmp35_, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	_tmp36_ = scroll;
	gtk_scrolled_window_set_shadow_type (_tmp36_, GTK_SHADOW_IN);
	_tmp37_ = scroll;
	_tmp38_ = self->priv->tree;
	gtk_container_add ((GtkContainer*) _tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp39_);
	tbar = _tmp39_;
	_tmp40_ = tbar;
	gtk_toolbar_set_style (_tmp40_, GTK_TOOLBAR_ICONS);
	_tmp41_ = tbar;
	gtk_toolbar_set_icon_size (_tmp41_, GTK_ICON_SIZE_SMALL_TOOLBAR);
	_tmp42_ = tbar;
	gtk_toolbar_set_show_arrow (_tmp42_, FALSE);
	_tmp43_ = scroll;
	_tmp44_ = gtk_widget_get_style_context ((GtkWidget*) _tmp43_);
	gtk_style_context_set_junction_sides (_tmp44_, GTK_JUNCTION_BOTTOM);
	_tmp45_ = tbar;
	_tmp46_ = gtk_widget_get_style_context ((GtkWidget*) _tmp45_);
	gtk_style_context_add_class (_tmp46_, GTK_STYLE_CLASS_INLINE_TOOLBAR);
	_tmp47_ = tbar;
	_tmp48_ = gtk_widget_get_style_context ((GtkWidget*) _tmp47_);
	gtk_style_context_set_junction_sides (_tmp48_, GTK_JUNCTION_TOP);
	_tmp49_ = _ ("_Add");
	_tmp50_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp49_);
	g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->priv->add_button);
	self->priv->add_button = _tmp50_;
	_tmp51_ = self->priv->add_button;
	_tmp52_ = _ ("Add");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _tmp51_, _tmp52_);
	_tmp53_ = self->priv->add_button;
	gtk_tool_button_set_icon_name (_tmp53_, "list-add-symbolic");
	_tmp54_ = self->priv->add_button;
	g_signal_connect_object (_tmp54_, "clicked", (GCallback) _deja_dup_config_list_handle_add_gtk_tool_button_clicked, self, 0);
	_tmp55_ = self->priv->add_button;
	_tmp56_ = gtk_widget_get_accessible ((GtkWidget*) _tmp55_);
	_tmp57_ = _g_object_ref0 (_tmp56_);
	_g_object_unref0 (accessible);
	accessible = _tmp57_;
	_tmp58_ = accessible;
	if (_tmp58_ != NULL) {
		AtkObject* _tmp59_ = NULL;
		const gchar* _tmp60_ = NULL;
		gchar* _tmp61_ = NULL;
		gchar* _tmp62_ = NULL;
		_tmp59_ = accessible;
		_tmp60_ = a11y_name;
		_tmp61_ = g_strconcat (_tmp60_, "Add", NULL);
		_tmp62_ = _tmp61_;
		atk_object_set_name (_tmp59_, _tmp62_);
		_g_free0 (_tmp62_);
	}
	_tmp63_ = tbar;
	_tmp64_ = self->priv->add_button;
	gtk_toolbar_insert (_tmp63_, (GtkToolItem*) _tmp64_, -1);
	_tmp65_ = _ ("_Remove");
	_tmp66_ = (GtkToolButton*) gtk_tool_button_new (NULL, _tmp65_);
	g_object_ref_sink (_tmp66_);
	_g_object_unref0 (self->priv->remove_button);
	self->priv->remove_button = _tmp66_;
	_tmp67_ = self->priv->remove_button;
	_tmp68_ = _ ("Remove");
	gtk_tool_item_set_tooltip_text ((GtkToolItem*) _tmp67_, _tmp68_);
	_tmp69_ = self->priv->remove_button;
	gtk_tool_button_set_icon_name (_tmp69_, "list-remove-symbolic");
	_tmp70_ = self->priv->remove_button;
	g_signal_connect_object (_tmp70_, "clicked", (GCallback) _deja_dup_config_list_handle_remove_gtk_tool_button_clicked, self, 0);
	_tmp71_ = self->priv->remove_button;
	_tmp72_ = gtk_widget_get_accessible ((GtkWidget*) _tmp71_);
	_tmp73_ = _g_object_ref0 (_tmp72_);
	_g_object_unref0 (accessible);
	accessible = _tmp73_;
	_tmp74_ = accessible;
	if (_tmp74_ != NULL) {
		AtkObject* _tmp75_ = NULL;
		const gchar* _tmp76_ = NULL;
		gchar* _tmp77_ = NULL;
		gchar* _tmp78_ = NULL;
		_tmp75_ = accessible;
		_tmp76_ = a11y_name;
		_tmp77_ = g_strconcat (_tmp76_, "Remove", NULL);
		_tmp78_ = _tmp77_;
		atk_object_set_name (_tmp75_, _tmp78_);
		_g_free0 (_tmp78_);
	}
	_tmp79_ = tbar;
	_tmp80_ = self->priv->remove_button;
	gtk_toolbar_insert (_tmp79_, (GtkToolItem*) _tmp80_, -1);
	_tmp81_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp81_);
	vbox = _tmp81_;
	_tmp82_ = vbox;
	_tmp83_ = scroll;
	gtk_box_pack_start (_tmp82_, (GtkWidget*) _tmp83_, TRUE, TRUE, (guint) 0);
	_tmp84_ = vbox;
	_tmp85_ = tbar;
	gtk_box_pack_start (_tmp84_, (GtkWidget*) _tmp85_, FALSE, TRUE, (guint) 0);
	_tmp86_ = vbox;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->tree;
	_tmp88_ = gtk_tree_view_get_selection (_tmp87_);
	_tmp89_ = _g_object_ref0 (_tmp88_);
	selection = _tmp89_;
	_tmp90_ = selection;
	gtk_tree_selection_set_mode (_tmp90_, GTK_SELECTION_MULTIPLE);
	g_signal_connect_object ((GtkWidget*) self, "key-press-event", (GCallback) _deja_dup_config_list_on_key_press_event_gtk_widget_key_press_event, self, 0);
	deja_dup_config_widget_set_from_config ((DejaDupConfigWidget*) self, NULL, NULL);
	_tmp91_ = selection;
	deja_dup_config_list_handle_selection_change (self, _tmp91_);
	_tmp92_ = selection;
	g_signal_connect_object (_tmp92_, "changed", (GCallback) _deja_dup_config_list_handle_selection_change_gtk_tree_selection_changed, self, 0);
	_g_object_unref0 (selection);
	_g_object_unref0 (vbox);
	_g_object_unref0 (tbar);
	_g_object_unref0 (scroll);
	targets = (g_free (targets), NULL);
	_g_object_unref0 (renderer);
	_g_object_unref0 (accessible);
	_g_free0 (a11y_name);
	_g_object_unref0 (model);
	return obj;
}


static void deja_dup_config_list_class_init (DejaDupConfigListClass * klass) {
	deja_dup_config_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupConfigListPrivate));
	((DejaDupConfigWidgetClass *) klass)->set_from_config = deja_dup_config_list_real_set_from_config;
	((DejaDupConfigWidgetClass *) klass)->set_from_config_finish = deja_dup_config_list_real_set_from_config_finish;
	G_OBJECT_CLASS (klass)->constructor = deja_dup_config_list_constructor;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_config_list_finalize;
}


static void deja_dup_config_list_instance_init (DejaDupConfigList * self) {
	self->priv = DEJA_DUP_CONFIG_LIST_GET_PRIVATE (self);
}


static void deja_dup_config_list_finalize (GObject* obj) {
	DejaDupConfigList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_CONFIG_LIST, DejaDupConfigList);
	_g_object_unref0 (self->priv->tree);
	_g_object_unref0 (self->priv->add_button);
	_g_object_unref0 (self->priv->remove_button);
	G_OBJECT_CLASS (deja_dup_config_list_parent_class)->finalize (obj);
}


GType deja_dup_config_list_get_type (void) {
	static volatile gsize deja_dup_config_list_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_config_list_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupConfigListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_config_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupConfigList), 0, (GInstanceInitFunc) deja_dup_config_list_instance_init, NULL };
		GType deja_dup_config_list_type_id;
		deja_dup_config_list_type_id = g_type_register_static (DEJA_DUP_TYPE_CONFIG_WIDGET, "DejaDupConfigList", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_config_list_type_id__volatile, deja_dup_config_list_type_id);
	}
	return deja_dup_config_list_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



