/* ConfigLocation.c generated by valac 0.12.1, the Vala compiler
 * generated from ConfigLocation.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 <gio/gio.h>
#include <common.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <atk/atk.h>


#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;
typedef struct _DejaDupConfigWidgetPrivate DejaDupConfigWidgetPrivate;

#define DEJA_DUP_TYPE_CONFIG_LOCATION (deja_dup_config_location_get_type ())
#define DEJA_DUP_CONFIG_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION, DejaDupConfigLocation))
#define DEJA_DUP_CONFIG_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION, DejaDupConfigLocationClass))
#define DEJA_DUP_IS_CONFIG_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION))
#define DEJA_DUP_IS_CONFIG_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION))
#define DEJA_DUP_CONFIG_LOCATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION, DejaDupConfigLocationClass))

typedef struct _DejaDupConfigLocation DejaDupConfigLocation;
typedef struct _DejaDupConfigLocationClass DejaDupConfigLocationClass;
typedef struct _DejaDupConfigLocationPrivate DejaDupConfigLocationPrivate;

#define DEJA_DUP_CONFIG_LOCATION_TYPE_GROUP (deja_dup_config_location_group_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE (deja_dup_config_location_table_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE, DejaDupConfigLocationTable))
#define DEJA_DUP_CONFIG_LOCATION_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE, DejaDupConfigLocationTableClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE))
#define DEJA_DUP_IS_CONFIG_LOCATION_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE))
#define DEJA_DUP_CONFIG_LOCATION_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE, DejaDupConfigLocationTableClass))

typedef struct _DejaDupConfigLocationTable DejaDupConfigLocationTable;
typedef struct _DejaDupConfigLocationTableClass DejaDupConfigLocationTableClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_S3 (deja_dup_config_location_s3_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_S3(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_S3, DejaDupConfigLocationS3))
#define DEJA_DUP_CONFIG_LOCATION_S3_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_S3, DejaDupConfigLocationS3Class))
#define DEJA_DUP_IS_CONFIG_LOCATION_S3(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_S3))
#define DEJA_DUP_IS_CONFIG_LOCATION_S3_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_S3))
#define DEJA_DUP_CONFIG_LOCATION_S3_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_S3, DejaDupConfigLocationS3Class))

typedef struct _DejaDupConfigLocationS3 DejaDupConfigLocationS3;
typedef struct _DejaDupConfigLocationS3Class DejaDupConfigLocationS3Class;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_U1 (deja_dup_config_location_u1_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_U1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_U1, DejaDupConfigLocationU1))
#define DEJA_DUP_CONFIG_LOCATION_U1_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_U1, DejaDupConfigLocationU1Class))
#define DEJA_DUP_IS_CONFIG_LOCATION_U1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_U1))
#define DEJA_DUP_IS_CONFIG_LOCATION_U1_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_U1))
#define DEJA_DUP_CONFIG_LOCATION_U1_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_U1, DejaDupConfigLocationU1Class))

typedef struct _DejaDupConfigLocationU1 DejaDupConfigLocationU1;
typedef struct _DejaDupConfigLocationU1Class DejaDupConfigLocationU1Class;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE (deja_dup_config_location_rackspace_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_RACKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE, DejaDupConfigLocationRackspace))
#define DEJA_DUP_CONFIG_LOCATION_RACKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE, DejaDupConfigLocationRackspaceClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_RACKSPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE))
#define DEJA_DUP_IS_CONFIG_LOCATION_RACKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE))
#define DEJA_DUP_CONFIG_LOCATION_RACKSPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_RACKSPACE, DejaDupConfigLocationRackspaceClass))

typedef struct _DejaDupConfigLocationRackspace DejaDupConfigLocationRackspace;
typedef struct _DejaDupConfigLocationRackspaceClass DejaDupConfigLocationRackspaceClass;
typedef struct _Block1Data Block1Data;
#define _g_free0(var) (var = (g_free (var), NULL))

#define DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME (deja_dup_config_location_volume_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME, DejaDupConfigLocationVolume))
#define DEJA_DUP_CONFIG_LOCATION_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME, DejaDupConfigLocationVolumeClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME))
#define DEJA_DUP_IS_CONFIG_LOCATION_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME))
#define DEJA_DUP_CONFIG_LOCATION_VOLUME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_VOLUME, DejaDupConfigLocationVolumeClass))

typedef struct _DejaDupConfigLocationVolume DejaDupConfigLocationVolume;
typedef struct _DejaDupConfigLocationVolumeClass DejaDupConfigLocationVolumeClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define DEJA_DUP_CONFIG_URL_PART_TYPE_PART (deja_dup_config_url_part_part_get_type ())
typedef struct _DejaDupConfigLocationSetFromConfigData DejaDupConfigLocationSetFromConfigData;
typedef struct _DejaDupConfigLocationHandleChangedData DejaDupConfigLocationHandleChangedData;
typedef struct _DejaDupConfigLocationSetLocationInfoData DejaDupConfigLocationSetLocationInfoData;
typedef struct _DejaDupConfigLocationSetVolumeInfoData DejaDupConfigLocationSetVolumeInfoData;
typedef struct _DejaDupConfigLocationSetRemoteInfoData DejaDupConfigLocationSetRemoteInfoData;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_SSH (deja_dup_config_location_ssh_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_SSH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SSH, DejaDupConfigLocationSSH))
#define DEJA_DUP_CONFIG_LOCATION_SSH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_SSH, DejaDupConfigLocationSSHClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_SSH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SSH))
#define DEJA_DUP_IS_CONFIG_LOCATION_SSH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_SSH))
#define DEJA_DUP_CONFIG_LOCATION_SSH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SSH, DejaDupConfigLocationSSHClass))

typedef struct _DejaDupConfigLocationSSH DejaDupConfigLocationSSH;
typedef struct _DejaDupConfigLocationSSHClass DejaDupConfigLocationSSHClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_SMB (deja_dup_config_location_smb_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_SMB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SMB, DejaDupConfigLocationSMB))
#define DEJA_DUP_CONFIG_LOCATION_SMB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_SMB, DejaDupConfigLocationSMBClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_SMB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SMB))
#define DEJA_DUP_IS_CONFIG_LOCATION_SMB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_SMB))
#define DEJA_DUP_CONFIG_LOCATION_SMB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_SMB, DejaDupConfigLocationSMBClass))

typedef struct _DejaDupConfigLocationSMB DejaDupConfigLocationSMB;
typedef struct _DejaDupConfigLocationSMBClass DejaDupConfigLocationSMBClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_FTP (deja_dup_config_location_ftp_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_FTP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FTP, DejaDupConfigLocationFTP))
#define DEJA_DUP_CONFIG_LOCATION_FTP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_FTP, DejaDupConfigLocationFTPClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_FTP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FTP))
#define DEJA_DUP_IS_CONFIG_LOCATION_FTP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_FTP))
#define DEJA_DUP_CONFIG_LOCATION_FTP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FTP, DejaDupConfigLocationFTPClass))

typedef struct _DejaDupConfigLocationFTP DejaDupConfigLocationFTP;
typedef struct _DejaDupConfigLocationFTPClass DejaDupConfigLocationFTPClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_DAV (deja_dup_config_location_dav_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_DAV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_DAV, DejaDupConfigLocationDAV))
#define DEJA_DUP_CONFIG_LOCATION_DAV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_DAV, DejaDupConfigLocationDAVClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_DAV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_DAV))
#define DEJA_DUP_IS_CONFIG_LOCATION_DAV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_DAV))
#define DEJA_DUP_CONFIG_LOCATION_DAV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_DAV, DejaDupConfigLocationDAVClass))

typedef struct _DejaDupConfigLocationDAV DejaDupConfigLocationDAV;
typedef struct _DejaDupConfigLocationDAVClass DejaDupConfigLocationDAVClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM (deja_dup_config_location_custom_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM, DejaDupConfigLocationCustom))
#define DEJA_DUP_CONFIG_LOCATION_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM, DejaDupConfigLocationCustomClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM))
#define DEJA_DUP_IS_CONFIG_LOCATION_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM))
#define DEJA_DUP_CONFIG_LOCATION_CUSTOM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_CUSTOM, DejaDupConfigLocationCustomClass))

typedef struct _DejaDupConfigLocationCustom DejaDupConfigLocationCustom;
typedef struct _DejaDupConfigLocationCustomClass DejaDupConfigLocationCustomClass;

#define DEJA_DUP_TYPE_CONFIG_LOCATION_FILE (deja_dup_config_location_file_get_type ())
#define DEJA_DUP_CONFIG_LOCATION_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FILE, DejaDupConfigLocationFile))
#define DEJA_DUP_CONFIG_LOCATION_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_FILE, DejaDupConfigLocationFileClass))
#define DEJA_DUP_IS_CONFIG_LOCATION_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FILE))
#define DEJA_DUP_IS_CONFIG_LOCATION_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_CONFIG_LOCATION_FILE))
#define DEJA_DUP_CONFIG_LOCATION_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_CONFIG_LOCATION_FILE, DejaDupConfigLocationFileClass))

typedef struct _DejaDupConfigLocationFile DejaDupConfigLocationFile;
typedef struct _DejaDupConfigLocationFileClass DejaDupConfigLocationFileClass;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

struct _DejaDupConfigWidget {
	GtkEventBox parent_instance;
	DejaDupConfigWidgetPrivate * priv;
	gboolean syncing;
	DejaDupSimpleSettings* 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 _DejaDupConfigLocation {
	DejaDupConfigWidget parent_instance;
	DejaDupConfigLocationPrivate * priv;
};

struct _DejaDupConfigLocationClass {
	DejaDupConfigWidgetClass parent_class;
};

struct _DejaDupConfigLocationPrivate {
	GtkEventBox* _extras;
	GtkSizeGroup* _label_sizes;
	gint index_ftp;
	gint index_dav;
	gint index_s3;
	gint index_rackspace;
	gint index_u1;
	gint index_cloud_sep;
	gint index_ssh;
	gint index_smb;
	gint num_volumes;
	gint index_vol_sep;
	gint index_custom;
	gint index_local;
	gint extras_max_width;
	gint extras_max_height;
	GtkComboBox* button;
	GtkListStore* store;
	GtkTreeModelSort* sort_model;
};

typedef enum  {
	DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD = 0,
	DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD_SEP,
	DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE,
	DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_CUSTOM,
	DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_SEP,
	DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES,
	DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES_SEP,
	DEJA_DUP_CONFIG_LOCATION_GROUP_LOCAL
} DejaDupConfigLocationGroup;

typedef void (*DejaDupConfigLocationCloudCallback) (void* user_data);
struct _Block1Data {
	int _ref_count_;
	DejaDupConfigLocation * self;
	DejaDupConfigLocationCloudCallback cb;
	gpointer cb_target;
};

typedef enum  {
	DEJA_DUP_CONFIG_URL_PART_PART_SCHEME,
	DEJA_DUP_CONFIG_URL_PART_PART_SERVER,
	DEJA_DUP_CONFIG_URL_PART_PART_PORT,
	DEJA_DUP_CONFIG_URL_PART_PART_USER,
	DEJA_DUP_CONFIG_URL_PART_PART_FOLDER,
	DEJA_DUP_CONFIG_URL_PART_PART_DOMAIN
} DejaDupConfigURLPartPart;

struct _DejaDupConfigLocationSetFromConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigLocation* self;
	gint index;
	gchar* _tmp0_;
	gchar* backend;
	DejaDupSimpleSettings* _tmp1_;
	DejaDupSimpleSettings* fsettings;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gchar* _tmp6_;
	gchar* uuid;
	GtkTreeIter saved_iter;
	GtkTreeIter _tmp7_;
	gboolean _tmp8_;
	GtkTreeIter iter0;
	GtkTreeIter inner_iter;
	GtkTreeIter _tmp9_;
	gboolean _tmp10_;
	GtkTreeIter _tmp11_;
	gint cur_index;
	gchar* _tmp12_;
	gchar* scheme;
	const gchar* _tmp13_;
	GQuark _tmp14_;
	GtkTreeIter iter;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GtkTreeIter _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
};

struct _DejaDupConfigLocationHandleChangedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigLocation* self;
};

struct _DejaDupConfigLocationSetLocationInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigLocation* self;
	GtkTreeIter iter0;
	GtkTreeIter iter;
	GtkTreeIter _tmp0_;
	gboolean _tmp1_;
	GtkTreeIter _tmp2_;
	gint index;
	gchar* uuid;
	DejaDupSimpleSettings* _tmp3_;
	DejaDupSimpleSettings* fsettings;
	gchar* _tmp4_;
	gchar* scheme;
	gboolean _tmp5_;
	gchar* _tmp6_;
};

struct _DejaDupConfigLocationSetVolumeInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigLocation* self;
	GtkTreeIter iter;
	GValue vol_var;
	GValue _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* uuid;
	gchar* _tmp3_;
	gchar* _tmp4_;
	DejaDupSimpleSettings* _tmp5_;
	DejaDupSimpleSettings* fsettings;
	GVolume* _tmp6_;
	GVolume* vol;
};

struct _DejaDupConfigLocationSetRemoteInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupConfigLocation* self;
	gchar* scheme;
	DejaDupSimpleSettings* _tmp0_;
	DejaDupSimpleSettings* fsettings;
};


static gpointer deja_dup_config_location_parent_class = NULL;

GType deja_dup_config_widget_get_type (void) G_GNUC_CONST;
GType deja_dup_config_location_get_type (void) G_GNUC_CONST;
#define DEJA_DUP_CONFIG_LOCATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_CONFIG_LOCATION, DejaDupConfigLocationPrivate))
enum  {
	DEJA_DUP_CONFIG_LOCATION_DUMMY_PROPERTY,
	DEJA_DUP_CONFIG_LOCATION_EXTRAS,
	DEJA_DUP_CONFIG_LOCATION_LABEL_SIZES
};
static GType deja_dup_config_location_group_get_type (void) G_GNUC_UNUSED;
#define DEJA_DUP_CONFIG_LOCATION_COL_ICON 0
#define DEJA_DUP_CONFIG_LOCATION_COL_TEXT 1
#define DEJA_DUP_CONFIG_LOCATION_COL_SORT 2
#define DEJA_DUP_CONFIG_LOCATION_COL_UUID 3
#define DEJA_DUP_CONFIG_LOCATION_COL_PAGE 4
#define DEJA_DUP_CONFIG_LOCATION_COL_INDEX 5
void deja_dup_config_location_hidden_size (DejaDupConfigLocation* self, GtkRequisition* result);
GtkEventBox* deja_dup_config_location_get_extras (DejaDupConfigLocation* self);
DejaDupConfigLocation* deja_dup_config_location_new (GtkSizeGroup* sg);
DejaDupConfigLocation* deja_dup_config_location_construct (GType object_type, GtkSizeGroup* sg);
static void deja_dup_config_location_insert_s3 (DejaDupConfigLocation* self);
static void deja_dup_config_location_insert_cloud_if_available (DejaDupConfigLocation* self, const gchar* id, DejaDupChecker* checker, GIcon* icon, const gchar* name, GtkWidget* w, gint* index, DejaDupConfigLocationCloudCallback cb, void* cb_target);
GtkSizeGroup* deja_dup_config_location_get_label_sizes (DejaDupConfigLocation* self);
DejaDupConfigLocationS3* deja_dup_config_location_s3_new (GtkSizeGroup* sg);
DejaDupConfigLocationS3* deja_dup_config_location_s3_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_table_get_type (void) G_GNUC_CONST;
GType deja_dup_config_location_s3_get_type (void) G_GNUC_CONST;
static void _deja_dup_config_location_insert_s3_deja_dup_config_location_cloud_callback (gpointer self);
static void deja_dup_config_location_insert_u1 (DejaDupConfigLocation* self);
DejaDupConfigLocationU1* deja_dup_config_location_u1_new (GtkSizeGroup* sg);
DejaDupConfigLocationU1* deja_dup_config_location_u1_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_u1_get_type (void) G_GNUC_CONST;
static void _deja_dup_config_location_insert_u1_deja_dup_config_location_cloud_callback (gpointer self);
static void deja_dup_config_location_insert_rackspace (DejaDupConfigLocation* self);
DejaDupConfigLocationRackspace* deja_dup_config_location_rackspace_new (GtkSizeGroup* sg);
DejaDupConfigLocationRackspace* deja_dup_config_location_rackspace_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_rackspace_get_type (void) G_GNUC_CONST;
static void _deja_dup_config_location_insert_rackspace_deja_dup_config_location_cloud_callback (gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static gint deja_dup_config_location_add_entry (DejaDupConfigLocation* self, GIcon* icon, const gchar* label, DejaDupConfigLocationGroup category, GtkWidget* page, const gchar* uuid);
static gint deja_dup_config_location_add_separator (DejaDupConfigLocation* self, DejaDupConfigLocationGroup category);
static void _lambda1_ (Block1Data* _data1_);
static void __lambda1__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean deja_dup_config_location_is_allowed_volume (DejaDupConfigLocation* self, GIcon* icon_in);
static gboolean deja_dup_config_location_is_separator (DejaDupConfigLocation* self, GtkTreeModel* model, GtkTreeIter* iter);
static gint deja_dup_config_location_next_index (DejaDupConfigLocation* self);
static gboolean deja_dup_config_location_lookup_uuid (DejaDupConfigLocation* self, const gchar* uuid, GtkTreeIter* iter_in);
static void deja_dup_config_location_add_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v);
static void deja_dup_config_location_add_volume_full (DejaDupConfigLocation* self, const gchar* uuid, const gchar* name, GIcon* icon);
static void deja_dup_config_location_update_volume_full (DejaDupConfigLocation* self, const gchar* uuid, const gchar* name, GIcon* icon);
DejaDupConfigLocationVolume* deja_dup_config_location_volume_new (GtkSizeGroup* sg);
DejaDupConfigLocationVolume* deja_dup_config_location_volume_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_volume_get_type (void) G_GNUC_CONST;
static void deja_dup_config_location_update_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v);
static void deja_dup_config_location_remove_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v);
static void deja_dup_config_location_remove_volume_full (DejaDupConfigLocation* self, const gchar* uuid);
static gboolean deja_dup_config_location_update_saved_volume (DejaDupConfigLocation* self);
static void deja_dup_config_location_set_active_iter (DejaDupConfigLocation* self, GtkTreeIter* iter);
static void deja_dup_config_location_real_set_from_config_data_free (gpointer _data);
static void deja_dup_config_location_real_set_from_config (DejaDupConfigWidget* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_config_location_real_set_from_config_co (DejaDupConfigLocationSetFromConfigData* data);
GType deja_dup_config_url_part_part_get_type (void) G_GNUC_CONST;
gchar* deja_dup_config_url_part_read_uri_part (DejaDupSimpleSettings* settings, const gchar* key, DejaDupConfigURLPartPart part);
static void deja_dup_config_location_set_location_widgets (DejaDupConfigLocation* self);
static void deja_dup_config_location_handle_changed_data_free (gpointer _data);
static void deja_dup_config_location_handle_changed (DejaDupConfigLocation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void deja_dup_config_location_handle_changed_finish (DejaDupConfigLocation* self, GAsyncResult* _res_);
static gboolean deja_dup_config_location_handle_changed_co (DejaDupConfigLocationHandleChangedData* data);
static void deja_dup_config_location_set_location_info (DejaDupConfigLocation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void deja_dup_config_location_set_location_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_);
static void deja_dup_config_location_handle_changed_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_config_location_set_location_info_data_free (gpointer _data);
static gboolean deja_dup_config_location_set_location_info_co (DejaDupConfigLocationSetLocationInfoData* data);
static void deja_dup_config_location_set_remote_info (DejaDupConfigLocation* self, const gchar* scheme, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void deja_dup_config_location_set_remote_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_);
static void deja_dup_config_location_set_location_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_config_location_set_volume_info (DejaDupConfigLocation* self, GtkTreeIter* iter, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void deja_dup_config_location_set_volume_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_);
static void deja_dup_config_location_set_volume_info_data_free (gpointer _data);
static gboolean deja_dup_config_location_set_volume_info_co (DejaDupConfigLocationSetVolumeInfoData* data);
static void deja_dup_config_location_set_volume_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_config_location_set_remote_info_data_free (gpointer _data);
static gboolean deja_dup_config_location_set_remote_info_co (DejaDupConfigLocationSetRemoteInfoData* data);
void deja_dup_config_url_part_write_uri_part (DejaDupSimpleSettings* settings, const gchar* key, DejaDupConfigURLPartPart part, const gchar* userval);
static void deja_dup_config_location_set_extras (DejaDupConfigLocation* self, GtkEventBox* value);
static void deja_dup_config_location_set_label_sizes (DejaDupConfigLocation* self, GtkSizeGroup* value);
static GObject * deja_dup_config_location_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static gboolean _deja_dup_config_location_is_separator_gtk_tree_view_row_separator_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self);
DejaDupConfigLocationSSH* deja_dup_config_location_ssh_new (GtkSizeGroup* sg);
DejaDupConfigLocationSSH* deja_dup_config_location_ssh_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_ssh_get_type (void) G_GNUC_CONST;
DejaDupConfigLocationSMB* deja_dup_config_location_smb_new (GtkSizeGroup* sg);
DejaDupConfigLocationSMB* deja_dup_config_location_smb_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_smb_get_type (void) G_GNUC_CONST;
DejaDupConfigLocationFTP* deja_dup_config_location_ftp_new (GtkSizeGroup* sg);
DejaDupConfigLocationFTP* deja_dup_config_location_ftp_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_ftp_get_type (void) G_GNUC_CONST;
DejaDupConfigLocationDAV* deja_dup_config_location_dav_new (GtkSizeGroup* sg);
DejaDupConfigLocationDAV* deja_dup_config_location_dav_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_dav_get_type (void) G_GNUC_CONST;
DejaDupConfigLocationCustom* deja_dup_config_location_custom_new (GtkSizeGroup* sg);
DejaDupConfigLocationCustom* deja_dup_config_location_custom_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_custom_get_type (void) G_GNUC_CONST;
DejaDupConfigLocationFile* deja_dup_config_location_file_new (GtkSizeGroup* sg);
DejaDupConfigLocationFile* deja_dup_config_location_file_construct (GType object_type, GtkSizeGroup* sg);
GType deja_dup_config_location_file_get_type (void) G_GNUC_CONST;
static void _deja_dup_config_location_add_volume_g_volume_monitor_volume_added (GVolumeMonitor* _sender, GVolume* volume, gpointer self);
static void _deja_dup_config_location_update_volume_g_volume_monitor_volume_changed (GVolumeMonitor* _sender, GVolume* volume, gpointer self);
static void _deja_dup_config_location_remove_volume_g_volume_monitor_volume_removed (GVolumeMonitor* _sender, GVolume* volume, gpointer self);
void deja_dup_config_widget_set_mnemonic_widget (DejaDupConfigWidget* self, GtkWidget* value);
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_location_handle_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
void deja_dup_config_widget_watch_key (DejaDupConfigWidget* self, const gchar* key, DejaDupSimpleSettings* s);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void deja_dup_config_location_finalize (GObject* obj);
static void _vala_deja_dup_config_location_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_deja_dup_config_location_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
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);


static GType deja_dup_config_location_group_get_type (void) {
	static volatile gsize deja_dup_config_location_group_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_config_location_group_type_id__volatile)) {
		static const GEnumValue values[] = {{DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD, "DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD", "cloud"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD_SEP, "DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD_SEP", "cloud-sep"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE, "DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE", "remote"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_CUSTOM, "DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_CUSTOM", "remote-custom"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_SEP, "DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_SEP", "remote-sep"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES, "DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES", "volumes"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES_SEP, "DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES_SEP", "volumes-sep"}, {DEJA_DUP_CONFIG_LOCATION_GROUP_LOCAL, "DEJA_DUP_CONFIG_LOCATION_GROUP_LOCAL", "local"}, {0, NULL, NULL}};
		GType deja_dup_config_location_group_type_id;
		deja_dup_config_location_group_type_id = g_enum_register_static ("DejaDupConfigLocationGroup", values);
		g_once_init_leave (&deja_dup_config_location_group_type_id__volatile, deja_dup_config_location_group_type_id);
	}
	return deja_dup_config_location_group_type_id__volatile;
}


void deja_dup_config_location_hidden_size (DejaDupConfigLocation* self, GtkRequisition* result) {
	GtkRequisition pagereq = {0};
	GtkRequisition _tmp0_ = {0};
	g_return_if_fail (self != NULL);
	gtk_widget_get_preferred_size ((GtkWidget*) self->priv->_extras, NULL, &_tmp0_);
	pagereq = _tmp0_;
	pagereq.width = (self->priv->extras_max_width - pagereq.width) + 20;
	pagereq.height = (self->priv->extras_max_height - pagereq.height) + 20;
	*result = pagereq;
	return;
}


DejaDupConfigLocation* deja_dup_config_location_construct (GType object_type, GtkSizeGroup* sg) {
	DejaDupConfigLocation * self = NULL;
	self = (DejaDupConfigLocation*) g_object_new (object_type, "label-sizes", sg, NULL);
	return self;
}


DejaDupConfigLocation* deja_dup_config_location_new (GtkSizeGroup* sg) {
	return deja_dup_config_location_construct (DEJA_DUP_TYPE_CONFIG_LOCATION, sg);
}


static void _deja_dup_config_location_insert_s3_deja_dup_config_location_cloud_callback (gpointer self) {
	deja_dup_config_location_insert_s3 (self);
}


static void deja_dup_config_location_insert_s3 (DejaDupConfigLocation* self) {
	DejaDupChecker* _tmp0_ = NULL;
	DejaDupChecker* _tmp1_;
	GThemedIcon* _tmp2_ = NULL;
	GThemedIcon* _tmp3_;
	const gchar* _tmp4_ = NULL;
	DejaDupConfigLocationS3* _tmp5_ = NULL;
	DejaDupConfigLocationS3* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = deja_dup_backend_s3_get_checker ();
	_tmp1_ = _tmp0_;
	_tmp2_ = (GThemedIcon*) g_themed_icon_new ("deja-dup-cloud");
	_tmp3_ = _tmp2_;
	_tmp4_ = _ ("Amazon S3");
	_tmp5_ = deja_dup_config_location_s3_new (self->priv->_label_sizes);
	_tmp6_ = g_object_ref_sink (_tmp5_);
	deja_dup_config_location_insert_cloud_if_available (self, "s3", _tmp1_, (GIcon*) _tmp3_, _tmp4_, (GtkWidget*) _tmp6_, &self->priv->index_s3, _deja_dup_config_location_insert_s3_deja_dup_config_location_cloud_callback, self);
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}


static void _deja_dup_config_location_insert_u1_deja_dup_config_location_cloud_callback (gpointer self) {
	deja_dup_config_location_insert_u1 (self);
}


static void deja_dup_config_location_insert_u1 (DejaDupConfigLocation* self) {
	DejaDupChecker* _tmp0_ = NULL;
	DejaDupChecker* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_ = NULL;
	gchar** _tmp6_;
	gint _tmp6__length1;
	GThemedIcon* _tmp7_ = NULL;
	GThemedIcon* _tmp8_;
	const gchar* _tmp9_ = NULL;
	DejaDupConfigLocationU1* _tmp10_ = NULL;
	DejaDupConfigLocationU1* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = deja_dup_backend_u1_get_checker ();
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup ("ubuntuone");
	_tmp3_ = g_strdup ("ubuntuone-installer");
	_tmp4_ = g_strdup ("deja-dup-cloud");
	_tmp5_ = g_new0 (gchar*, 3 + 1);
	_tmp5_[0] = _tmp2_;
	_tmp5_[1] = _tmp3_;
	_tmp5_[2] = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp6__length1 = 3;
	_tmp7_ = (GThemedIcon*) g_themed_icon_new_from_names (_tmp6_, 3);
	_tmp8_ = _tmp7_;
	_tmp9_ = _ ("Ubuntu One");
	_tmp10_ = deja_dup_config_location_u1_new (self->priv->_label_sizes);
	_tmp11_ = g_object_ref_sink (_tmp10_);
	deja_dup_config_location_insert_cloud_if_available (self, "u1", _tmp1_, (GIcon*) _tmp8_, _tmp9_, (GtkWidget*) _tmp11_, &self->priv->index_u1, _deja_dup_config_location_insert_u1_deja_dup_config_location_cloud_callback, self);
	_g_object_unref0 (_tmp11_);
	_g_object_unref0 (_tmp8_);
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_tmp1_);
}


static void _deja_dup_config_location_insert_rackspace_deja_dup_config_location_cloud_callback (gpointer self) {
	deja_dup_config_location_insert_rackspace (self);
}


static void deja_dup_config_location_insert_rackspace (DejaDupConfigLocation* self) {
	DejaDupChecker* _tmp0_ = NULL;
	DejaDupChecker* _tmp1_;
	GThemedIcon* _tmp2_ = NULL;
	GThemedIcon* _tmp3_;
	const gchar* _tmp4_ = NULL;
	DejaDupConfigLocationRackspace* _tmp5_ = NULL;
	DejaDupConfigLocationRackspace* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = deja_dup_backend_rackspace_get_checker ();
	_tmp1_ = _tmp0_;
	_tmp2_ = (GThemedIcon*) g_themed_icon_new ("deja-dup-cloud");
	_tmp3_ = _tmp2_;
	_tmp4_ = _ ("Rackspace Cloud Files");
	_tmp5_ = deja_dup_config_location_rackspace_new (self->priv->_label_sizes);
	_tmp6_ = g_object_ref_sink (_tmp5_);
	deja_dup_config_location_insert_cloud_if_available (self, "rackspace", _tmp1_, (GIcon*) _tmp3_, _tmp4_, (GtkWidget*) _tmp6_, &self->priv->index_rackspace, _deja_dup_config_location_insert_rackspace_deja_dup_config_location_cloud_callback, self);
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (Block1Data* _data1_) {
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->self);
		g_slice_free (Block1Data, _data1_);
	}
}


static void _lambda1_ (Block1Data* _data1_) {
	DejaDupConfigLocation * self;
	self = _data1_->self;
	_data1_->cb (_data1_->cb_target);
}


static void __lambda1__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_lambda1_ (self);
}


static void deja_dup_config_location_insert_cloud_if_available (DejaDupConfigLocation* self, const gchar* id, DejaDupChecker* checker, GIcon* icon, const gchar* name, GtkWidget* w, gint* index, DejaDupConfigLocationCloudCallback cb, void* cb_target) {
	Block1Data* _data1_;
	gchar* _tmp0_ = NULL;
	gchar* backend;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	g_return_if_fail (checker != NULL);
	g_return_if_fail (icon != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (w != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_data1_->cb = cb;
	_data1_->cb_target = cb_target;
	_tmp0_ = deja_dup_backend_get_default_type ();
	backend = _tmp0_;
	if (g_strcmp0 (backend, id) == 0) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_;
		_tmp3_ = deja_dup_checker_get_complete (checker);
		if (_tmp3_) {
			gboolean _tmp4_;
			_tmp4_ = deja_dup_checker_get_available (checker);
			_tmp2_ = _tmp4_;
		} else {
			_tmp2_ = FALSE;
		}
		_tmp1_ = _tmp2_;
	}
	if (_tmp1_) {
		gint _tmp5_;
		_tmp5_ = deja_dup_config_location_add_entry (self, icon, name, DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD, w, NULL);
		*index = _tmp5_;
		if (self->priv->index_cloud_sep == (-2)) {
			gint _tmp6_;
			_tmp6_ = deja_dup_config_location_add_separator (self, DEJA_DUP_CONFIG_LOCATION_GROUP_CLOUD_SEP);
			self->priv->index_cloud_sep = _tmp6_;
		}
	} else {
		gboolean _tmp7_;
		_tmp7_ = deja_dup_checker_get_complete (checker);
		if (!_tmp7_) {
			g_signal_connect_data ((GObject*) checker, "notify::complete", (GCallback) __lambda1__g_object_notify, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		}
	}
	_g_free0 (backend);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}


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


static gboolean deja_dup_config_location_is_allowed_volume (DejaDupConfigLocation* self, GIcon* icon_in) {
	gboolean result = FALSE;
	GIcon* _tmp0_;
	GEmblemedIcon* _tmp1_;
	GEmblemedIcon* icon_emblemed;
	GIcon* _tmp3_;
	GThemedIcon* _tmp4_;
	GThemedIcon* icon;
	gchar** _tmp5_;
	gchar** _tmp6_ = NULL;
	gchar** names;
	gint names_length1;
	gint _names_size_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (icon_in != NULL, FALSE);
	_tmp0_ = icon_in;
	_tmp1_ = _g_object_ref0 (G_IS_EMBLEMED_ICON (_tmp0_) ? ((GEmblemedIcon*) _tmp0_) : NULL);
	icon_emblemed = _tmp1_;
	if (icon_emblemed != NULL) {
		GIcon* _tmp2_ = NULL;
		_tmp2_ = g_emblemed_icon_get_icon (icon_emblemed);
		icon_in = _tmp2_;
	}
	_tmp3_ = icon_in;
	_tmp4_ = _g_object_ref0 (G_IS_THEMED_ICON (_tmp3_) ? ((GThemedIcon*) _tmp3_) : NULL);
	icon = _tmp4_;
	if (icon == NULL) {
		result = FALSE;
		_g_object_unref0 (icon);
		_g_object_unref0 (icon_emblemed);
		return result;
	}
	_tmp6_ = _tmp5_ = g_themed_icon_get_names (icon);
	names = _tmp6_;
	names_length1 = _vala_array_length (_tmp5_);
	_names_size_ = _vala_array_length (_tmp5_);
	{
		gchar** name_collection;
		int name_collection_length1;
		int name_it;
		name_collection = names;
		name_collection_length1 = names_length1;
		for (name_it = 0; name_it < names_length1; name_it = name_it + 1) {
			const gchar* name;
			name = name_collection[name_it];
			{
				const gchar* _tmp7_;
				GQuark _tmp8_;
				static GQuark _tmp8__label0 = 0;
				static GQuark _tmp8__label1 = 0;
				static GQuark _tmp8__label2 = 0;
				static GQuark _tmp8__label3 = 0;
				static GQuark _tmp8__label4 = 0;
				_tmp7_ = name;
				_tmp8_ = (NULL == _tmp7_) ? 0 : g_quark_from_string (_tmp7_);
				if (((((_tmp8_ == ((0 != _tmp8__label0) ? _tmp8__label0 : (_tmp8__label0 = g_quark_from_static_string ("drive-harddisk")))) || (_tmp8_ == ((0 != _tmp8__label1) ? _tmp8__label1 : (_tmp8__label1 = g_quark_from_static_string ("drive-removable-media"))))) || (_tmp8_ == ((0 != _tmp8__label2) ? _tmp8__label2 : (_tmp8__label2 = g_quark_from_static_string ("media-flash"))))) || (_tmp8_ == ((0 != _tmp8__label3) ? _tmp8__label3 : (_tmp8__label3 = g_quark_from_static_string ("media-floppy"))))) || (_tmp8_ == ((0 != _tmp8__label4) ? _tmp8__label4 : (_tmp8__label4 = g_quark_from_static_string ("media-tape"))))) {
					switch (0) {
						default:
						{
							result = TRUE;
							_g_object_unref0 (icon);
							_g_object_unref0 (icon_emblemed);
							return result;
						}
					}
				}
			}
		}
	}
	result = FALSE;
	_g_object_unref0 (icon);
	_g_object_unref0 (icon_emblemed);
	return result;
}


static gboolean deja_dup_config_location_is_separator (DejaDupConfigLocation* self, GtkTreeModel* model, GtkTreeIter* iter) {
	gboolean result = FALSE;
	GValue text_var = {0};
	GValue _tmp0_ = {0};
	const gchar* _tmp1_ = NULL;
	const gchar* text;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (model != NULL, FALSE);
	gtk_tree_model_get_value (model, iter, DEJA_DUP_CONFIG_LOCATION_COL_TEXT, &_tmp0_);
	G_IS_VALUE (&text_var) ? (g_value_unset (&text_var), NULL) : NULL;
	text_var = _tmp0_;
	_tmp1_ = g_value_get_string (&text_var);
	text = _tmp1_;
	result = text == NULL;
	G_IS_VALUE (&text_var) ? (g_value_unset (&text_var), NULL) : NULL;
	return result;
}


static gint deja_dup_config_location_next_index (DejaDupConfigLocation* self) {
	gint result = 0;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) self->priv->store, NULL);
	result = _tmp0_;
	return result;
}


static gint deja_dup_config_location_add_entry (DejaDupConfigLocation* self, GIcon* icon, const gchar* label, DejaDupConfigLocationGroup category, GtkWidget* page, const gchar* uuid) {
	gint result = 0;
	gint _tmp0_;
	gint index;
	GtkTreeIter iter = {0};
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	GtkTreeIter _tmp3_ = {0};
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (label != NULL, 0);
	_tmp0_ = deja_dup_config_location_next_index (self);
	index = _tmp0_;
	_tmp1_ = g_strdup_printf ("%d%s", (gint) category, label);
	_tmp2_ = _tmp1_;
	gtk_list_store_insert_with_values (self->priv->store, &_tmp3_, index, DEJA_DUP_CONFIG_LOCATION_COL_ICON, icon, DEJA_DUP_CONFIG_LOCATION_COL_TEXT, label, DEJA_DUP_CONFIG_LOCATION_COL_SORT, _tmp2_, DEJA_DUP_CONFIG_LOCATION_COL_UUID, uuid, DEJA_DUP_CONFIG_LOCATION_COL_PAGE, page, DEJA_DUP_CONFIG_LOCATION_COL_INDEX, index, -1);
	iter = _tmp3_;
	_g_free0 (_tmp2_);
	if (page != NULL) {
		GtkRequisition pagereq = {0};
		GtkRequisition _tmp4_ = {0};
		gint _tmp5_;
		gint _tmp6_;
		gtk_widget_show_all (page);
		gtk_widget_get_preferred_size (page, NULL, &_tmp4_);
		pagereq = _tmp4_;
		_tmp5_ = MAX (self->priv->extras_max_width, pagereq.width);
		self->priv->extras_max_width = _tmp5_;
		_tmp6_ = MAX (self->priv->extras_max_height, pagereq.height);
		self->priv->extras_max_height = _tmp6_;
	}
	result = index;
	return result;
}


static gint deja_dup_config_location_add_separator (DejaDupConfigLocation* self, DejaDupConfigLocationGroup category) {
	gint result = 0;
	gint _tmp0_;
	gint index;
	GtkTreeIter iter = {0};
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	GtkTreeIter _tmp3_ = {0};
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) self->priv->store, NULL);
	index = _tmp0_;
	_tmp1_ = g_strdup_printf ("%d", (gint) category);
	_tmp2_ = _tmp1_;
	gtk_list_store_insert_with_values (self->priv->store, &_tmp3_, index, DEJA_DUP_CONFIG_LOCATION_COL_SORT, _tmp2_, DEJA_DUP_CONFIG_LOCATION_COL_TEXT, NULL, DEJA_DUP_CONFIG_LOCATION_COL_INDEX, index, -1);
	iter = _tmp3_;
	_g_free0 (_tmp2_);
	result = index;
	return result;
}


static gboolean deja_dup_config_location_lookup_uuid (DejaDupConfigLocation* self, const gchar* uuid, GtkTreeIter* iter_in) {
	GtkTreeIter _iter_in = {0};
	gboolean result = FALSE;
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp0_ = {0};
	gboolean _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uuid != NULL, FALSE);
	_tmp1_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) self->priv->store, &_tmp0_);
	iter = _tmp0_;
	if (_tmp1_) {
		{
			gboolean _tmp2_;
			_tmp2_ = TRUE;
			while (TRUE) {
				gchar* iter_uuid = NULL;
				if (!_tmp2_) {
					gboolean _tmp3_;
					_tmp3_ = gtk_tree_model_iter_next ((GtkTreeModel*) self->priv->store, &iter);
					if (!_tmp3_) {
						break;
					}
				}
				_tmp2_ = FALSE;
				gtk_tree_model_get ((GtkTreeModel*) self->priv->store, &iter, DEJA_DUP_CONFIG_LOCATION_COL_UUID, &iter_uuid, -1);
				if (g_strcmp0 (iter_uuid, uuid) == 0) {
					_iter_in = iter;
					result = TRUE;
					_g_free0 (iter_uuid);
					if (iter_in) {
						*iter_in = _iter_in;
					}
					return result;
				}
				_g_free0 (iter_uuid);
			}
		}
	}
	result = FALSE;
	if (iter_in) {
		*iter_in = _iter_in;
	}
	return result;
}


static void deja_dup_config_location_add_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GIcon* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (monitor != NULL);
	g_return_if_fail (v != NULL);
	_tmp0_ = g_volume_get_identifier (v, G_VOLUME_IDENTIFIER_KIND_UUID);
	_tmp1_ = g_volume_get_name (v);
	_tmp2_ = g_volume_get_icon (v);
	deja_dup_config_location_add_volume_full (self, _tmp0_, _tmp1_, _tmp2_);
}


static void deja_dup_config_location_add_volume_full (DejaDupConfigLocation* self, const gchar* uuid, const gchar* name, GIcon* icon) {
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp0_ = {0};
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (icon != NULL);
	_tmp1_ = deja_dup_config_location_lookup_uuid (self, uuid, &_tmp0_);
	iter = _tmp0_;
	if (_tmp1_) {
		deja_dup_config_location_update_volume_full (self, uuid, name, icon);
		return;
	}
	_tmp2_ = deja_dup_config_location_is_allowed_volume (self, icon);
	if (_tmp2_) {
		gint _tmp3_;
		DejaDupConfigLocationVolume* _tmp5_ = NULL;
		DejaDupConfigLocationVolume* _tmp6_;
		_tmp3_ = self->priv->num_volumes;
		self->priv->num_volumes = _tmp3_ + 1;
		if (_tmp3_ == 0) {
			gint _tmp4_;
			_tmp4_ = deja_dup_config_location_add_separator (self, DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES_SEP);
			self->priv->index_vol_sep = _tmp4_;
		}
		_tmp5_ = deja_dup_config_location_volume_new (self->priv->_label_sizes);
		_tmp6_ = g_object_ref_sink (_tmp5_);
		deja_dup_config_location_add_entry (self, icon, name, DEJA_DUP_CONFIG_LOCATION_GROUP_VOLUMES, (GtkWidget*) _tmp6_, uuid);
		_g_object_unref0 (_tmp6_);
	}
}


static void deja_dup_config_location_update_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GIcon* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (monitor != NULL);
	g_return_if_fail (v != NULL);
	_tmp0_ = g_volume_get_identifier (v, G_VOLUME_IDENTIFIER_KIND_UUID);
	_tmp1_ = g_volume_get_name (v);
	_tmp2_ = g_volume_get_icon (v);
	deja_dup_config_location_update_volume_full (self, _tmp0_, _tmp1_, _tmp2_);
}


static void deja_dup_config_location_update_volume_full (DejaDupConfigLocation* self, const gchar* uuid, const gchar* name, GIcon* icon) {
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp0_ = {0};
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (icon != NULL);
	_tmp1_ = deja_dup_config_location_lookup_uuid (self, uuid, &_tmp0_);
	iter = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	gtk_list_store_set (self->priv->store, &iter, DEJA_DUP_CONFIG_LOCATION_COL_ICON, icon, DEJA_DUP_CONFIG_LOCATION_COL_TEXT, name, DEJA_DUP_CONFIG_LOCATION_COL_UUID, uuid, -1);
}


static void deja_dup_config_location_remove_volume (DejaDupConfigLocation* self, GVolumeMonitor* monitor, GVolume* v) {
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (monitor != NULL);
	g_return_if_fail (v != NULL);
	_tmp0_ = g_volume_get_identifier (v, G_VOLUME_IDENTIFIER_KIND_UUID);
	deja_dup_config_location_remove_volume_full (self, _tmp0_);
}


static void deja_dup_config_location_remove_volume_full (DejaDupConfigLocation* self, const gchar* uuid) {
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp0_ = {0};
	gboolean _tmp1_;
	DejaDupSimpleSettings* _tmp2_ = NULL;
	DejaDupSimpleSettings* fsettings;
	gchar* _tmp3_ = NULL;
	gchar* saved_uuid;
	g_return_if_fail (self != NULL);
	g_return_if_fail (uuid != NULL);
	_tmp1_ = deja_dup_config_location_lookup_uuid (self, uuid, &_tmp0_);
	iter = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
	fsettings = _tmp2_;
	_tmp3_ = g_settings_get_string ((GSettings*) fsettings, DEJA_DUP_FILE_UUID_KEY);
	saved_uuid = _tmp3_;
	if (g_strcmp0 (uuid, saved_uuid) == 0) {
		_g_free0 (saved_uuid);
		_g_object_unref0 (fsettings);
		return;
	}
	gtk_list_store_remove (self->priv->store, &iter);
	self->priv->num_volumes = self->priv->num_volumes - 1;
	if (self->priv->num_volumes == 0) {
		GtkTreeIter sep_iter = {0};
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
		GtkTreeIter _tmp6_ = {0};
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp4_ = g_strdup_printf ("%i", self->priv->index_vol_sep);
		_tmp5_ = _tmp4_;
		_tmp7_ = gtk_tree_model_get_iter_from_string ((GtkTreeModel*) self->priv->store, &_tmp6_, _tmp5_);
		sep_iter = _tmp6_;
		_tmp8_ = _tmp7_;
		_g_free0 (_tmp5_);
		if (_tmp8_) {
			gtk_list_store_remove (self->priv->store, &sep_iter);
			self->priv->index_vol_sep = -2;
		}
	}
	_g_free0 (saved_uuid);
	_g_object_unref0 (fsettings);
}


static gboolean deja_dup_config_location_update_saved_volume (DejaDupConfigLocation* self) {
	gboolean result = FALSE;
	DejaDupSimpleSettings* _tmp0_ = NULL;
	DejaDupSimpleSettings* fsettings;
	gchar* _tmp1_ = NULL;
	gchar* uuid;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
	fsettings = _tmp0_;
	_tmp1_ = g_settings_get_string ((GSettings*) fsettings, DEJA_DUP_FILE_UUID_KEY);
	uuid = _tmp1_;
	if (g_strcmp0 (uuid, "") != 0) {
		GIcon* vol_icon;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		GIcon* _tmp4_ = NULL;
		GIcon* _tmp5_;
		GIcon* _tmp6_;
		gchar* _tmp7_ = NULL;
		gchar* vol_name;
		vol_icon = NULL;
		_tmp2_ = g_settings_get_string ((GSettings*) fsettings, DEJA_DUP_FILE_ICON_KEY);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_icon_new_for_string (_tmp3_, &_inner_error_);
		_tmp5_ = _tmp4_;
		_g_free0 (_tmp3_);
		_tmp6_ = _tmp5_;
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		_g_object_unref0 (vol_icon);
		vol_icon = _tmp6_;
		goto __finally4;
		__catch4_g_error:
		{
			GError * e;
			e = _inner_error_;
			_inner_error_ = NULL;
			g_warning ("ConfigLocation.vala:384: %s\n", e->message);
			_g_error_free0 (e);
		}
		__finally4:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (vol_icon);
			_g_free0 (uuid);
			_g_object_unref0 (fsettings);
			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;
		}
		_tmp7_ = g_settings_get_string ((GSettings*) fsettings, DEJA_DUP_FILE_SHORT_NAME_KEY);
		vol_name = _tmp7_;
		deja_dup_config_location_add_volume_full (self, uuid, vol_name, vol_icon);
		result = TRUE;
		_g_free0 (vol_name);
		_g_object_unref0 (vol_icon);
		_g_free0 (uuid);
		_g_object_unref0 (fsettings);
		return result;
	} else {
		result = FALSE;
		_g_free0 (uuid);
		_g_object_unref0 (fsettings);
		return result;
	}
	_g_free0 (uuid);
	_g_object_unref0 (fsettings);
}


static void deja_dup_config_location_set_active_iter (DejaDupConfigLocation* self, GtkTreeIter* iter) {
	GtkTreeIter iter0 = {0};
	GtkTreeIter _tmp0_ = {0};
	g_return_if_fail (self != NULL);
	gtk_tree_model_sort_convert_child_iter_to_iter (self->priv->sort_model, &_tmp0_, iter);
	iter0 = _tmp0_;
	gtk_combo_box_set_active_iter (self->priv->button, &iter0);
}


static void deja_dup_config_location_real_set_from_config_data_free (gpointer _data) {
	DejaDupConfigLocationSetFromConfigData* data;
	data = _data;
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupConfigLocationSetFromConfigData, data);
}


static void deja_dup_config_location_real_set_from_config (DejaDupConfigWidget* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigLocation * self;
	DejaDupConfigLocationSetFromConfigData* _data_;
	self = (DejaDupConfigLocation*) base;
	_data_ = g_slice_new0 (DejaDupConfigLocationSetFromConfigData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_location_real_set_from_config);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_location_real_set_from_config_data_free);
	_data_->self = _g_object_ref0 (self);
	deja_dup_config_location_real_set_from_config_co (_data_);
}


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


static gboolean deja_dup_config_location_real_set_from_config_co (DejaDupConfigLocationSetFromConfigData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	data->index = -1;
	data->_tmp0_ = NULL;
	data->_tmp0_ = deja_dup_backend_get_default_type ();
	data->backend = data->_tmp0_;
	if (g_strcmp0 (data->backend, "s3") == 0) {
		data->index = data->self->priv->index_s3;
	} else {
		if (g_strcmp0 (data->backend, "rackspace") == 0) {
			data->index = data->self->priv->index_rackspace;
		} else {
			if (g_strcmp0 (data->backend, "u1") == 0) {
				data->index = data->self->priv->index_u1;
			} else {
				if (g_strcmp0 (data->backend, "file") == 0) {
					data->_tmp1_ = NULL;
					data->_tmp1_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
					data->fsettings = data->_tmp1_;
					data->_tmp2_ = NULL;
					data->_tmp2_ = g_settings_get_string ((GSettings*) data->fsettings, DEJA_DUP_FILE_TYPE_KEY);
					data->_tmp3_ = data->_tmp2_;
					data->_tmp4_ = g_strcmp0 (data->_tmp3_, "volume") == 0;
					_g_free0 (data->_tmp3_);
					if (data->_tmp4_) {
						data->_tmp5_ = deja_dup_config_location_update_saved_volume (data->self);
						if (data->_tmp5_) {
							data->_tmp6_ = NULL;
							data->_tmp6_ = g_settings_get_string ((GSettings*) data->fsettings, DEJA_DUP_FILE_UUID_KEY);
							data->uuid = data->_tmp6_;
							memset (&data->_tmp7_, 0, sizeof (GtkTreeIter));
							data->_tmp8_ = deja_dup_config_location_lookup_uuid (data->self, data->uuid, &data->_tmp7_);
							data->saved_iter = data->_tmp7_;
							if (data->_tmp8_) {
								deja_dup_config_location_set_active_iter (data->self, &data->saved_iter);
								_g_free0 (data->uuid);
								_g_object_unref0 (data->fsettings);
								_g_free0 (data->backend);
								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;
							}
							_g_free0 (data->uuid);
						}
					} else {
						static GQuark _tmp14__label0 = 0;
						static GQuark _tmp14__label1 = 0;
						static GQuark _tmp14__label2 = 0;
						static GQuark _tmp14__label3 = 0;
						static GQuark _tmp14__label4 = 0;
						static GQuark _tmp14__label5 = 0;
						static GQuark _tmp14__label6 = 0;
						memset (&data->_tmp9_, 0, sizeof (GtkTreeIter));
						data->_tmp10_ = gtk_combo_box_get_active_iter (data->self->priv->button, &data->_tmp9_);
						data->iter0 = data->_tmp9_;
						if (!data->_tmp10_) {
							_g_object_unref0 (data->fsettings);
							_g_free0 (data->backend);
							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;
						}
						memset (&data->_tmp11_, 0, sizeof (GtkTreeIter));
						gtk_tree_model_sort_convert_iter_to_child_iter (data->self->priv->sort_model, &data->_tmp11_, &data->iter0);
						data->inner_iter = data->_tmp11_;
						gtk_tree_model_get ((GtkTreeModel*) data->self->priv->store, &data->inner_iter, DEJA_DUP_CONFIG_LOCATION_COL_INDEX, &data->cur_index, -1);
						if (data->cur_index == data->self->priv->index_custom) {
							_g_object_unref0 (data->fsettings);
							_g_free0 (data->backend);
							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;
						}
						data->_tmp12_ = NULL;
						data->_tmp12_ = deja_dup_config_url_part_read_uri_part (data->fsettings, DEJA_DUP_FILE_PATH_KEY, DEJA_DUP_CONFIG_URL_PART_PART_SCHEME);
						data->scheme = data->_tmp12_;
						data->_tmp13_ = data->scheme;
						data->_tmp14_ = (NULL == data->_tmp13_) ? 0 : g_quark_from_string (data->_tmp13_);
						if ((data->_tmp14_ == ((0 != _tmp14__label0) ? _tmp14__label0 : (_tmp14__label0 = g_quark_from_static_string ("dav")))) || (data->_tmp14_ == ((0 != _tmp14__label1) ? _tmp14__label1 : (_tmp14__label1 = g_quark_from_static_string ("davs"))))) {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_dav;
									break;
								}
							}
						} else if ((data->_tmp14_ == ((0 != _tmp14__label2) ? _tmp14__label2 : (_tmp14__label2 = g_quark_from_static_string ("sftp")))) || (data->_tmp14_ == ((0 != _tmp14__label3) ? _tmp14__label3 : (_tmp14__label3 = g_quark_from_static_string ("ssh"))))) {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_ssh;
									break;
								}
							}
						} else if (data->_tmp14_ == ((0 != _tmp14__label4) ? _tmp14__label4 : (_tmp14__label4 = g_quark_from_static_string ("ftp")))) {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_ftp;
									break;
								}
							}
						} else if (data->_tmp14_ == ((0 != _tmp14__label5) ? _tmp14__label5 : (_tmp14__label5 = g_quark_from_static_string ("smb")))) {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_smb;
									break;
								}
							}
						} else if (data->_tmp14_ == ((0 != _tmp14__label6) ? _tmp14__label6 : (_tmp14__label6 = g_quark_from_static_string ("file")))) {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_local;
									break;
								}
							}
						} else {
							switch (0) {
								default:
								{
									data->index = data->self->priv->index_custom;
									break;
								}
							}
						}
						_g_free0 (data->scheme);
					}
					_g_object_unref0 (data->fsettings);
				}
			}
		}
	}
	if (data->index >= 0) {
		data->_tmp15_ = NULL;
		data->_tmp15_ = g_strdup_printf ("%i", data->index);
		data->_tmp16_ = data->_tmp15_;
		memset (&data->_tmp17_, 0, sizeof (GtkTreeIter));
		data->_tmp18_ = gtk_tree_model_get_iter_from_string ((GtkTreeModel*) data->self->priv->store, &data->_tmp17_, data->_tmp16_);
		data->iter = data->_tmp17_;
		data->_tmp19_ = data->_tmp18_;
		_g_free0 (data->_tmp16_);
		if (data->_tmp19_) {
			deja_dup_config_location_set_active_iter (data->self, &data->iter);
		}
	}
	_g_free0 (data->backend);
	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_location_set_location_widgets (DejaDupConfigLocation* self) {
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* current;
	GtkTreeIter iter0 = {0};
	GtkTreeIter iter = {0};
	GValue page_var = {0};
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_bin_get_child ((GtkBin*) self->priv->_extras);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	current = _tmp1_;
	if (current != NULL) {
		gtk_container_remove ((GtkContainer*) self->priv->_extras, current);
	}
	_tmp3_ = gtk_combo_box_get_active_iter (self->priv->button, &_tmp2_);
	iter0 = _tmp2_;
	if (_tmp3_) {
		GtkTreeIter _tmp4_ = {0};
		GValue _tmp5_ = {0};
		GObject* _tmp6_ = NULL;
		GObject* _tmp7_;
		DejaDupConfigLocationTable* _tmp8_;
		DejaDupConfigLocationTable* page;
		gtk_tree_model_sort_convert_iter_to_child_iter (self->priv->sort_model, &_tmp4_, &iter0);
		iter = _tmp4_;
		gtk_tree_model_get_value ((GtkTreeModel*) self->priv->store, &iter, DEJA_DUP_CONFIG_LOCATION_COL_PAGE, &_tmp5_);
		G_IS_VALUE (&page_var) ? (g_value_unset (&page_var), NULL) : NULL;
		page_var = _tmp5_;
		_tmp6_ = g_value_get_object (&page_var);
		_tmp7_ = _tmp6_;
		_tmp8_ = _g_object_ref0 (DEJA_DUP_IS_CONFIG_LOCATION_TABLE (_tmp7_) ? ((DejaDupConfigLocationTable*) _tmp7_) : NULL);
		page = _tmp8_;
		if (page != NULL) {
			gtk_container_add ((GtkContainer*) self->priv->_extras, (GtkWidget*) page);
		}
		_g_object_unref0 (page);
	}
	G_IS_VALUE (&page_var) ? (g_value_unset (&page_var), NULL) : NULL;
	_g_object_unref0 (current);
}


static void deja_dup_config_location_handle_changed_data_free (gpointer _data) {
	DejaDupConfigLocationHandleChangedData* data;
	data = _data;
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupConfigLocationHandleChangedData, data);
}


static void deja_dup_config_location_handle_changed (DejaDupConfigLocation* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigLocationHandleChangedData* _data_;
	_data_ = g_slice_new0 (DejaDupConfigLocationHandleChangedData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_location_handle_changed);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_location_handle_changed_data_free);
	_data_->self = _g_object_ref0 (self);
	deja_dup_config_location_handle_changed_co (_data_);
}


static void deja_dup_config_location_handle_changed_finish (DejaDupConfigLocation* self, GAsyncResult* _res_) {
	DejaDupConfigLocationHandleChangedData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void deja_dup_config_location_handle_changed_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupConfigLocationHandleChangedData* data;
	data = _user_data_;
	data->_source_object_ = source_object;
	data->_res_ = _res_;
	deja_dup_config_location_handle_changed_co (data);
}


static gboolean deja_dup_config_location_handle_changed_co (DejaDupConfigLocationHandleChangedData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	data->_state_ = 1;
	deja_dup_config_location_set_location_info (data->self, deja_dup_config_location_handle_changed_ready, data);
	return FALSE;
	_state_1:
	deja_dup_config_location_set_location_info_finish (data->self, data->_res_);
	deja_dup_config_location_set_location_widgets (data->self);
	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_location_set_location_info_data_free (gpointer _data) {
	DejaDupConfigLocationSetLocationInfoData* data;
	data = _data;
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupConfigLocationSetLocationInfoData, data);
}


static void deja_dup_config_location_set_location_info (DejaDupConfigLocation* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigLocationSetLocationInfoData* _data_;
	_data_ = g_slice_new0 (DejaDupConfigLocationSetLocationInfoData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_location_set_location_info);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_location_set_location_info_data_free);
	_data_->self = _g_object_ref0 (self);
	deja_dup_config_location_set_location_info_co (_data_);
}


static void deja_dup_config_location_set_location_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_) {
	DejaDupConfigLocationSetLocationInfoData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void deja_dup_config_location_set_location_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupConfigLocationSetLocationInfoData* data;
	data = _user_data_;
	data->_source_object_ = source_object;
	data->_res_ = _res_;
	deja_dup_config_location_set_location_info_co (data);
}


static gboolean deja_dup_config_location_set_location_info_co (DejaDupConfigLocationSetLocationInfoData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	memset (&data->_tmp0_, 0, sizeof (GtkTreeIter));
	data->_tmp1_ = gtk_combo_box_get_active_iter (data->self->priv->button, &data->_tmp0_);
	data->iter0 = data->_tmp0_;
	if (!data->_tmp1_) {
		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;
	}
	memset (&data->_tmp2_, 0, sizeof (GtkTreeIter));
	gtk_tree_model_sort_convert_iter_to_child_iter (data->self->priv->sort_model, &data->_tmp2_, &data->iter0);
	data->iter = data->_tmp2_;
	gtk_tree_model_get ((GtkTreeModel*) data->self->priv->store, &data->iter, DEJA_DUP_CONFIG_LOCATION_COL_INDEX, &data->index, DEJA_DUP_CONFIG_LOCATION_COL_UUID, &data->uuid, -1);
	if (data->index == data->self->priv->index_s3) {
		deja_dup_simple_settings_set_string (((DejaDupConfigWidget*) data->self)->settings, DEJA_DUP_BACKEND_KEY, "s3");
	} else {
		if (data->index == data->self->priv->index_rackspace) {
			deja_dup_simple_settings_set_string (((DejaDupConfigWidget*) data->self)->settings, DEJA_DUP_BACKEND_KEY, "rackspace");
		} else {
			if (data->index == data->self->priv->index_u1) {
				deja_dup_simple_settings_set_string (((DejaDupConfigWidget*) data->self)->settings, DEJA_DUP_BACKEND_KEY, "u1");
			} else {
				if (data->index == data->self->priv->index_ssh) {
					data->_state_ = 1;
					deja_dup_config_location_set_remote_info (data->self, "sftp", deja_dup_config_location_set_location_info_ready, data);
					return FALSE;
					_state_1:
					deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
				} else {
					if (data->index == data->self->priv->index_ftp) {
						data->_state_ = 2;
						deja_dup_config_location_set_remote_info (data->self, "ftp", deja_dup_config_location_set_location_info_ready, data);
						return FALSE;
						_state_2:
						deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
					} else {
						if (data->index == data->self->priv->index_dav) {
							data->_tmp3_ = NULL;
							data->_tmp3_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
							data->fsettings = data->_tmp3_;
							data->_tmp4_ = NULL;
							data->_tmp4_ = deja_dup_config_url_part_read_uri_part (data->fsettings, DEJA_DUP_FILE_PATH_KEY, DEJA_DUP_CONFIG_URL_PART_PART_SCHEME);
							data->scheme = data->_tmp4_;
							if (g_strcmp0 (data->scheme, "dav") != 0) {
								data->_tmp5_ = g_strcmp0 (data->scheme, "davs") != 0;
							} else {
								data->_tmp5_ = FALSE;
							}
							if (data->_tmp5_) {
								data->_tmp6_ = g_strdup ("dav");
								_g_free0 (data->scheme);
								data->scheme = data->_tmp6_;
							}
							data->_state_ = 3;
							deja_dup_config_location_set_remote_info (data->self, data->scheme, deja_dup_config_location_set_location_info_ready, data);
							return FALSE;
							_state_3:
							deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
							_g_free0 (data->scheme);
							_g_object_unref0 (data->fsettings);
						} else {
							if (data->index == data->self->priv->index_smb) {
								data->_state_ = 4;
								deja_dup_config_location_set_remote_info (data->self, "smb", deja_dup_config_location_set_location_info_ready, data);
								return FALSE;
								_state_4:
								deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
							} else {
								if (data->index == data->self->priv->index_local) {
									data->_state_ = 5;
									deja_dup_config_location_set_remote_info (data->self, "file", deja_dup_config_location_set_location_info_ready, data);
									return FALSE;
									_state_5:
									deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
								} else {
									if (data->index == data->self->priv->index_custom) {
										data->_state_ = 6;
										deja_dup_config_location_set_remote_info (data->self, NULL, deja_dup_config_location_set_location_info_ready, data);
										return FALSE;
										_state_6:
										deja_dup_config_location_set_remote_info_finish (data->self, data->_res_);
									} else {
										if (data->uuid != NULL) {
											data->_state_ = 7;
											deja_dup_config_location_set_volume_info (data->self, &data->iter, deja_dup_config_location_set_location_info_ready, data);
											return FALSE;
											_state_7:
											deja_dup_config_location_set_volume_info_finish (data->self, data->_res_);
										} else {
											g_warning ("ConfigLocation.vala:526: Unknown location index %i\n", data->index);
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	g_signal_emit_by_name ((DejaDupConfigWidget*) data->self, "changed");
	_g_free0 (data->uuid);
	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_location_set_volume_info_data_free (gpointer _data) {
	DejaDupConfigLocationSetVolumeInfoData* data;
	data = _data;
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupConfigLocationSetVolumeInfoData, data);
}


static void deja_dup_config_location_set_volume_info (DejaDupConfigLocation* self, GtkTreeIter* iter, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigLocationSetVolumeInfoData* _data_;
	_data_ = g_slice_new0 (DejaDupConfigLocationSetVolumeInfoData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_location_set_volume_info);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_location_set_volume_info_data_free);
	_data_->self = _g_object_ref0 (self);
	_data_->iter = *iter;
	deja_dup_config_location_set_volume_info_co (_data_);
}


static void deja_dup_config_location_set_volume_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_) {
	DejaDupConfigLocationSetVolumeInfoData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void deja_dup_config_location_set_volume_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupConfigLocationSetVolumeInfoData* data;
	data = _user_data_;
	data->_source_object_ = source_object;
	data->_res_ = _res_;
	deja_dup_config_location_set_volume_info_co (data);
}


static gboolean deja_dup_config_location_set_volume_info_co (DejaDupConfigLocationSetVolumeInfoData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	memset (&data->_tmp0_, 0, sizeof (GValue));
	gtk_tree_model_get_value ((GtkTreeModel*) data->self->priv->store, &data->iter, DEJA_DUP_CONFIG_LOCATION_COL_UUID, &data->_tmp0_);
	G_IS_VALUE (&data->vol_var) ? (g_value_unset (&data->vol_var), NULL) : NULL;
	data->vol_var = data->_tmp0_;
	data->_tmp1_ = NULL;
	data->_tmp1_ = g_value_get_string (&data->vol_var);
	data->_tmp2_ = g_strdup (data->_tmp1_);
	data->uuid = data->_tmp2_;
	if (data->uuid == NULL) {
		data->_tmp3_ = NULL;
		data->_tmp3_ = gtk_tree_model_get_string_from_iter ((GtkTreeModel*) data->self->priv->store, &data->iter);
		data->_tmp4_ = data->_tmp3_;
		g_warning ("ConfigLocation.vala:539: Invalid volume location at iter %s\n", data->_tmp4_);
		_g_free0 (data->_tmp4_);
		_g_free0 (data->uuid);
		G_IS_VALUE (&data->vol_var) ? (g_value_unset (&data->vol_var), NULL) : 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;
	}
	data->_tmp5_ = NULL;
	data->_tmp5_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
	data->fsettings = data->_tmp5_;
	deja_dup_simple_settings_set_string (data->fsettings, DEJA_DUP_FILE_TYPE_KEY, "volume");
	deja_dup_simple_settings_set_string (((DejaDupConfigWidget*) data->self)->settings, DEJA_DUP_BACKEND_KEY, "file");
	data->_tmp6_ = NULL;
	data->_tmp6_ = deja_dup_backend_file_find_volume_by_uuid (data->uuid);
	data->vol = data->_tmp6_;
	if (data->vol == NULL) {
		_g_object_unref0 (data->vol);
		_g_object_unref0 (data->fsettings);
		_g_free0 (data->uuid);
		G_IS_VALUE (&data->vol_var) ? (g_value_unset (&data->vol_var), NULL) : 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;
	}
	data->_state_ = 1;
	deja_dup_backend_file_set_volume_info (data->vol, NULL, deja_dup_config_location_set_volume_info_ready, data);
	return FALSE;
	_state_1:
	deja_dup_backend_file_set_volume_info_finish (data->_res_);
	_g_object_unref0 (data->vol);
	_g_object_unref0 (data->fsettings);
	_g_free0 (data->uuid);
	G_IS_VALUE (&data->vol_var) ? (g_value_unset (&data->vol_var), NULL) : 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_location_set_remote_info_data_free (gpointer _data) {
	DejaDupConfigLocationSetRemoteInfoData* data;
	data = _data;
	_g_free0 (data->scheme);
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupConfigLocationSetRemoteInfoData, data);
}


static void deja_dup_config_location_set_remote_info (DejaDupConfigLocation* self, const gchar* scheme, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupConfigLocationSetRemoteInfoData* _data_;
	_data_ = g_slice_new0 (DejaDupConfigLocationSetRemoteInfoData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_config_location_set_remote_info);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_config_location_set_remote_info_data_free);
	_data_->self = _g_object_ref0 (self);
	_data_->scheme = g_strdup (scheme);
	deja_dup_config_location_set_remote_info_co (_data_);
}


static void deja_dup_config_location_set_remote_info_finish (DejaDupConfigLocation* self, GAsyncResult* _res_) {
	DejaDupConfigLocationSetRemoteInfoData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean deja_dup_config_location_set_remote_info_co (DejaDupConfigLocationSetRemoteInfoData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	data->_tmp0_ = NULL;
	data->_tmp0_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
	data->fsettings = data->_tmp0_;
	g_settings_delay ((GSettings*) data->fsettings);
	deja_dup_simple_settings_set_string (data->fsettings, DEJA_DUP_FILE_TYPE_KEY, "normal");
	if (data->scheme != NULL) {
		deja_dup_config_url_part_write_uri_part (data->fsettings, DEJA_DUP_FILE_PATH_KEY, DEJA_DUP_CONFIG_URL_PART_PART_SCHEME, data->scheme);
	}
	deja_dup_simple_settings_apply (data->fsettings);
	deja_dup_simple_settings_set_string (((DejaDupConfigWidget*) data->self)->settings, DEJA_DUP_BACKEND_KEY, "file");
	_g_object_unref0 (data->fsettings);
	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;
}


GtkEventBox* deja_dup_config_location_get_extras (DejaDupConfigLocation* self) {
	GtkEventBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_extras;
	return result;
}


static void deja_dup_config_location_set_extras (DejaDupConfigLocation* self, GtkEventBox* value) {
	GtkEventBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_extras);
	self->priv->_extras = _tmp0_;
	g_object_notify ((GObject *) self, "extras");
}


GtkSizeGroup* deja_dup_config_location_get_label_sizes (DejaDupConfigLocation* self) {
	GtkSizeGroup* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_label_sizes;
	return result;
}


static void deja_dup_config_location_set_label_sizes (DejaDupConfigLocation* self, GtkSizeGroup* value) {
	GtkSizeGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_label_sizes);
	self->priv->_label_sizes = _tmp0_;
	g_object_notify ((GObject *) self, "label-sizes");
}


static gboolean _deja_dup_config_location_is_separator_gtk_tree_view_row_separator_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = deja_dup_config_location_is_separator (self, model, iter);
	return result;
}


static void _deja_dup_config_location_add_volume_g_volume_monitor_volume_added (GVolumeMonitor* _sender, GVolume* volume, gpointer self) {
	deja_dup_config_location_add_volume (self, _sender, volume);
}


static void _deja_dup_config_location_update_volume_g_volume_monitor_volume_changed (GVolumeMonitor* _sender, GVolume* volume, gpointer self) {
	deja_dup_config_location_update_volume (self, _sender, volume);
}


static void _deja_dup_config_location_remove_volume_g_volume_monitor_volume_removed (GVolumeMonitor* _sender, GVolume* volume, gpointer self) {
	deja_dup_config_location_remove_volume (self, _sender, volume);
}


static void _deja_dup_config_location_handle_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
	deja_dup_config_location_handle_changed (self, NULL, NULL);
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


static GObject * deja_dup_config_location_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DejaDupConfigLocation * self;
	GtkBox* _tmp0_ = NULL;
	GtkBox* vbox;
	GtkListStore* _tmp1_ = NULL;
	GtkTreeModelSort* _tmp2_ = NULL;
	GtkComboBox* _tmp3_ = NULL;
	AtkObject* _tmp4_ = NULL;
	AtkObject* _tmp5_;
	AtkObject* accessible;
	GtkTreeIter iter = {0};
	GtkEventBox* _tmp8_ = NULL;
	GtkEventBox* _tmp9_;
	GThemedIcon* _tmp10_ = NULL;
	GThemedIcon* _tmp11_;
	const gchar* _tmp12_ = NULL;
	DejaDupConfigLocationSSH* _tmp13_ = NULL;
	DejaDupConfigLocationSSH* _tmp14_;
	gint _tmp15_;
	GThemedIcon* _tmp16_ = NULL;
	GThemedIcon* _tmp17_;
	const gchar* _tmp18_ = NULL;
	DejaDupConfigLocationSMB* _tmp19_ = NULL;
	DejaDupConfigLocationSMB* _tmp20_;
	gint _tmp21_;
	GThemedIcon* _tmp22_ = NULL;
	GThemedIcon* _tmp23_;
	const gchar* _tmp24_ = NULL;
	DejaDupConfigLocationFTP* _tmp25_ = NULL;
	DejaDupConfigLocationFTP* _tmp26_;
	gint _tmp27_;
	GThemedIcon* _tmp28_ = NULL;
	GThemedIcon* _tmp29_;
	const gchar* _tmp30_ = NULL;
	DejaDupConfigLocationDAV* _tmp31_ = NULL;
	DejaDupConfigLocationDAV* _tmp32_;
	gint _tmp33_;
	GThemedIcon* _tmp34_ = NULL;
	GThemedIcon* _tmp35_;
	const gchar* _tmp36_ = NULL;
	DejaDupConfigLocationCustom* _tmp37_ = NULL;
	DejaDupConfigLocationCustom* _tmp38_;
	gint _tmp39_;
	GThemedIcon* _tmp40_ = NULL;
	GThemedIcon* _tmp41_;
	const gchar* _tmp42_ = NULL;
	DejaDupConfigLocationFile* _tmp43_ = NULL;
	DejaDupConfigLocationFile* _tmp44_;
	gint _tmp45_;
	GVolumeMonitor* _tmp46_ = NULL;
	GVolumeMonitor* mon;
	GList* _tmp47_ = NULL;
	GList* vols;
	GtkCellRendererPixbuf* _tmp49_ = NULL;
	GtkCellRendererPixbuf* pixrenderer;
	GtkCellRendererText* _tmp50_ = NULL;
	GtkCellRendererText* textrenderer;
	DejaDupSimpleSettings* _tmp51_ = NULL;
	DejaDupSimpleSettings* _tmp52_;
	parent_class = G_OBJECT_CLASS (deja_dup_config_location_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = DEJA_DUP_CONFIG_LOCATION (obj);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	vbox = g_object_ref_sink (_tmp0_);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) vbox);
	_tmp1_ = gtk_list_store_new (6, G_TYPE_ICON, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, DEJA_DUP_TYPE_CONFIG_LOCATION_TABLE, G_TYPE_INT);
	_g_object_unref0 (self->priv->store);
	self->priv->store = _tmp1_;
	_tmp2_ = (GtkTreeModelSort*) gtk_tree_model_sort_new_with_model ((GtkTreeModel*) self->priv->store);
	_g_object_unref0 (self->priv->sort_model);
	self->priv->sort_model = _tmp2_;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) self->priv->sort_model, DEJA_DUP_CONFIG_LOCATION_COL_SORT, GTK_SORT_ASCENDING);
	_tmp3_ = (GtkComboBox*) gtk_combo_box_new_with_model ((GtkTreeModel*) self->priv->sort_model);
	_g_object_unref0 (self->priv->button);
	self->priv->button = g_object_ref_sink (_tmp3_);
	gtk_combo_box_set_row_separator_func (self->priv->button, _deja_dup_config_location_is_separator_gtk_tree_view_row_separator_func, g_object_ref (self), g_object_unref);
	gtk_container_add ((GtkContainer*) vbox, (GtkWidget*) self->priv->button);
	_tmp4_ = gtk_widget_get_accessible ((GtkWidget*) self->priv->button);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	accessible = _tmp5_;
	if (accessible != NULL) {
		atk_object_set_name (accessible, "Location");
	}
	if (self->priv->_label_sizes == NULL) {
		GtkSizeGroup* _tmp6_ = NULL;
		GtkSizeGroup* _tmp7_;
		_tmp6_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
		_tmp7_ = _tmp6_;
		deja_dup_config_location_set_label_sizes (self, _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
	_tmp8_ = (GtkEventBox*) gtk_event_box_new ();
	_tmp9_ = g_object_ref_sink (_tmp8_);
	deja_dup_config_location_set_extras (self, _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_container_set_border_width ((GtkContainer*) self->priv->_extras, (guint) 0);
	gtk_widget_show ((GtkWidget*) self->priv->_extras);
	deja_dup_config_location_insert_u1 (self);
	deja_dup_config_location_insert_s3 (self);
	deja_dup_config_location_insert_rackspace (self);
	_tmp10_ = (GThemedIcon*) g_themed_icon_new_with_default_fallbacks ("folder-remote");
	_tmp11_ = _tmp10_;
	_tmp12_ = _ ("SSH");
	_tmp13_ = deja_dup_config_location_ssh_new (self->priv->_label_sizes);
	_tmp14_ = g_object_ref_sink (_tmp13_);
	_tmp15_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp11_, _tmp12_, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE, (GtkWidget*) _tmp14_, NULL);
	self->priv->index_ssh = _tmp15_;
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (_tmp11_);
	_tmp16_ = (GThemedIcon*) g_themed_icon_new_with_default_fallbacks ("folder-remote");
	_tmp17_ = _tmp16_;
	_tmp18_ = _ ("Windows Share");
	_tmp19_ = deja_dup_config_location_smb_new (self->priv->_label_sizes);
	_tmp20_ = g_object_ref_sink (_tmp19_);
	_tmp21_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp17_, _tmp18_, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE, (GtkWidget*) _tmp20_, NULL);
	self->priv->index_smb = _tmp21_;
	_g_object_unref0 (_tmp20_);
	_g_object_unref0 (_tmp17_);
	_tmp22_ = (GThemedIcon*) g_themed_icon_new_with_default_fallbacks ("folder-remote");
	_tmp23_ = _tmp22_;
	_tmp24_ = _ ("FTP");
	_tmp25_ = deja_dup_config_location_ftp_new (self->priv->_label_sizes);
	_tmp26_ = g_object_ref_sink (_tmp25_);
	_tmp27_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp23_, _tmp24_, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE, (GtkWidget*) _tmp26_, NULL);
	self->priv->index_ftp = _tmp27_;
	_g_object_unref0 (_tmp26_);
	_g_object_unref0 (_tmp23_);
	_tmp28_ = (GThemedIcon*) g_themed_icon_new_with_default_fallbacks ("folder-remote");
	_tmp29_ = _tmp28_;
	_tmp30_ = _ ("WebDAV");
	_tmp31_ = deja_dup_config_location_dav_new (self->priv->_label_sizes);
	_tmp32_ = g_object_ref_sink (_tmp31_);
	_tmp33_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp29_, _tmp30_, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE, (GtkWidget*) _tmp32_, NULL);
	self->priv->index_dav = _tmp33_;
	_g_object_unref0 (_tmp32_);
	_g_object_unref0 (_tmp29_);
	_tmp34_ = (GThemedIcon*) g_themed_icon_new_with_default_fallbacks ("folder-remote");
	_tmp35_ = _tmp34_;
	_tmp36_ = _ ("Custom Location");
	_tmp37_ = deja_dup_config_location_custom_new (self->priv->_label_sizes);
	_tmp38_ = g_object_ref_sink (_tmp37_);
	_tmp39_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp35_, _tmp36_, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_CUSTOM, (GtkWidget*) _tmp38_, NULL);
	self->priv->index_custom = _tmp39_;
	_g_object_unref0 (_tmp38_);
	_g_object_unref0 (_tmp35_);
	deja_dup_config_location_add_separator (self, DEJA_DUP_CONFIG_LOCATION_GROUP_REMOTE_SEP);
	_tmp40_ = (GThemedIcon*) g_themed_icon_new ("folder");
	_tmp41_ = _tmp40_;
	_tmp42_ = _ ("Local Folder");
	_tmp43_ = deja_dup_config_location_file_new (self->priv->_label_sizes);
	_tmp44_ = g_object_ref_sink (_tmp43_);
	_tmp45_ = deja_dup_config_location_add_entry (self, (GIcon*) _tmp41_, _tmp42_, DEJA_DUP_CONFIG_LOCATION_GROUP_LOCAL, (GtkWidget*) _tmp44_, NULL);
	self->priv->index_local = _tmp45_;
	_g_object_unref0 (_tmp44_);
	_g_object_unref0 (_tmp41_);
	_tmp46_ = g_volume_monitor_get ();
	mon = _tmp46_;
	g_object_ref ((GObject*) mon);
	_tmp47_ = g_volume_monitor_get_volumes (mon);
	vols = _tmp47_;
	{
		GList* v_collection;
		GList* v_it;
		v_collection = vols;
		for (v_it = v_collection; v_it != NULL; v_it = v_it->next) {
			GVolume* _tmp48_;
			GVolume* v;
			_tmp48_ = _g_object_ref0 ((GVolume*) v_it->data);
			v = _tmp48_;
			{
				deja_dup_config_location_add_volume (self, mon, v);
				_g_object_unref0 (v);
			}
		}
	}
	deja_dup_config_location_update_saved_volume (self);
	g_signal_connect_object (mon, "volume-added", (GCallback) _deja_dup_config_location_add_volume_g_volume_monitor_volume_added, self, 0);
	g_signal_connect_object (mon, "volume-changed", (GCallback) _deja_dup_config_location_update_volume_g_volume_monitor_volume_changed, self, 0);
	g_signal_connect_object (mon, "volume-removed", (GCallback) _deja_dup_config_location_remove_volume_g_volume_monitor_volume_removed, self, 0);
	_tmp49_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	pixrenderer = g_object_ref_sink (_tmp49_);
	gtk_cell_layout_pack_start ((GtkCellLayout*) self->priv->button, (GtkCellRenderer*) pixrenderer, FALSE);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) self->priv->button, (GtkCellRenderer*) pixrenderer, "gicon", DEJA_DUP_CONFIG_LOCATION_COL_ICON);
	_tmp50_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	textrenderer = g_object_ref_sink (_tmp50_);
	gtk_cell_layout_pack_start ((GtkCellLayout*) self->priv->button, (GtkCellRenderer*) textrenderer, TRUE);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) self->priv->button, (GtkCellRenderer*) textrenderer, "text", DEJA_DUP_CONFIG_LOCATION_COL_TEXT);
	deja_dup_config_widget_set_mnemonic_widget ((DejaDupConfigWidget*) self, (GtkWidget*) self->priv->button);
	gtk_combo_box_set_active (self->priv->button, 0);
	deja_dup_config_widget_set_from_config ((DejaDupConfigWidget*) self, NULL, NULL);
	deja_dup_config_location_set_location_widgets (self);
	g_signal_connect_object (self->priv->button, "changed", (GCallback) _deja_dup_config_location_handle_changed_gtk_combo_box_changed, self, 0);
	deja_dup_config_widget_watch_key ((DejaDupConfigWidget*) self, DEJA_DUP_BACKEND_KEY, NULL);
	_tmp51_ = deja_dup_get_settings (DEJA_DUP_FILE_ROOT);
	_tmp52_ = _tmp51_;
	deja_dup_config_widget_watch_key ((DejaDupConfigWidget*) self, DEJA_DUP_FILE_PATH_KEY, _tmp52_);
	_g_object_unref0 (_tmp52_);
	_g_object_unref0 (textrenderer);
	_g_object_unref0 (pixrenderer);
	__g_list_free__g_object_unref0_0 (vols);
	_g_object_unref0 (mon);
	_g_object_unref0 (accessible);
	_g_object_unref0 (vbox);
	return obj;
}


static void deja_dup_config_location_class_init (DejaDupConfigLocationClass * klass) {
	deja_dup_config_location_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupConfigLocationPrivate));
	DEJA_DUP_CONFIG_WIDGET_CLASS (klass)->set_from_config = deja_dup_config_location_real_set_from_config;
	DEJA_DUP_CONFIG_WIDGET_CLASS (klass)->set_from_config_finish = deja_dup_config_location_real_set_from_config_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_config_location_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_config_location_set_property;
	G_OBJECT_CLASS (klass)->constructor = deja_dup_config_location_constructor;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_config_location_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_CONFIG_LOCATION_EXTRAS, g_param_spec_object ("extras", "extras", "extras", GTK_TYPE_EVENT_BOX, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_CONFIG_LOCATION_LABEL_SIZES, g_param_spec_object ("label-sizes", "label-sizes", "label-sizes", GTK_TYPE_SIZE_GROUP, 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_location_instance_init (DejaDupConfigLocation * self) {
	self->priv = DEJA_DUP_CONFIG_LOCATION_GET_PRIVATE (self);
	self->priv->index_s3 = -2;
	self->priv->index_rackspace = -2;
	self->priv->index_u1 = -2;
	self->priv->index_cloud_sep = -2;
	self->priv->num_volumes = 0;
	self->priv->index_vol_sep = -2;
	self->priv->extras_max_width = 0;
	self->priv->extras_max_height = 0;
}


static void deja_dup_config_location_finalize (GObject* obj) {
	DejaDupConfigLocation * self;
	self = DEJA_DUP_CONFIG_LOCATION (obj);
	_g_object_unref0 (self->priv->_extras);
	_g_object_unref0 (self->priv->_label_sizes);
	_g_object_unref0 (self->priv->button);
	_g_object_unref0 (self->priv->store);
	_g_object_unref0 (self->priv->sort_model);
	G_OBJECT_CLASS (deja_dup_config_location_parent_class)->finalize (obj);
}


GType deja_dup_config_location_get_type (void) {
	static volatile gsize deja_dup_config_location_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_config_location_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupConfigLocationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_config_location_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupConfigLocation), 0, (GInstanceInitFunc) deja_dup_config_location_instance_init, NULL };
		GType deja_dup_config_location_type_id;
		deja_dup_config_location_type_id = g_type_register_static (DEJA_DUP_TYPE_CONFIG_WIDGET, "DejaDupConfigLocation", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_config_location_type_id__volatile, deja_dup_config_location_type_id);
	}
	return deja_dup_config_location_type_id__volatile;
}


static void _vala_deja_dup_config_location_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DejaDupConfigLocation * self;
	self = DEJA_DUP_CONFIG_LOCATION (object);
	switch (property_id) {
		case DEJA_DUP_CONFIG_LOCATION_EXTRAS:
		g_value_set_object (value, deja_dup_config_location_get_extras (self));
		break;
		case DEJA_DUP_CONFIG_LOCATION_LABEL_SIZES:
		g_value_set_object (value, deja_dup_config_location_get_label_sizes (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_deja_dup_config_location_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DejaDupConfigLocation * self;
	self = DEJA_DUP_CONFIG_LOCATION (object);
	switch (property_id) {
		case DEJA_DUP_CONFIG_LOCATION_EXTRAS:
		deja_dup_config_location_set_extras (self, g_value_get_object (value));
		break;
		case DEJA_DUP_CONFIG_LOCATION_LABEL_SIZES:
		deja_dup_config_location_set_label_sizes (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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



