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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*-
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: Michael Terry
 */

#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include "deja.h"
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_DYNAMIC_PREFERENCES_GROUP (dynamic_preferences_group_get_type ())
#define DYNAMIC_PREFERENCES_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroup))
#define DYNAMIC_PREFERENCES_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroupClass))
#define IS_DYNAMIC_PREFERENCES_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP))
#define IS_DYNAMIC_PREFERENCES_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DYNAMIC_PREFERENCES_GROUP))
#define DYNAMIC_PREFERENCES_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DYNAMIC_PREFERENCES_GROUP, DynamicPreferencesGroupClass))

typedef struct _DynamicPreferencesGroup DynamicPreferencesGroup;
typedef struct _DynamicPreferencesGroupClass DynamicPreferencesGroupClass;
typedef struct _DynamicPreferencesGroupPrivate DynamicPreferencesGroupPrivate;

#define TYPE_CONFIG_LOCATION_GROUP (config_location_group_get_type ())
#define CONFIG_LOCATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup))
#define CONFIG_LOCATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroupClass))
#define IS_CONFIG_LOCATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIG_LOCATION_GROUP))
#define IS_CONFIG_LOCATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIG_LOCATION_GROUP))
#define CONFIG_LOCATION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroupClass))

typedef struct _ConfigLocationGroup ConfigLocationGroup;
typedef struct _ConfigLocationGroupClass ConfigLocationGroupClass;
typedef struct _ConfigLocationGroupPrivate ConfigLocationGroupPrivate;

#define TYPE_CONFIG_LOCATION_ROW (config_location_row_get_type ())
#define CONFIG_LOCATION_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIG_LOCATION_ROW, ConfigLocationRow))
#define CONFIG_LOCATION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIG_LOCATION_ROW, ConfigLocationRowClass))
#define IS_CONFIG_LOCATION_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIG_LOCATION_ROW))
#define IS_CONFIG_LOCATION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIG_LOCATION_ROW))
#define CONFIG_LOCATION_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIG_LOCATION_ROW, ConfigLocationRowClass))

typedef struct _ConfigLocationRow ConfigLocationRow;
typedef struct _ConfigLocationRowClass ConfigLocationRowClass;

#define TYPE_HELP_BUTTON (help_button_get_type ())
#define HELP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HELP_BUTTON, HelpButton))
#define HELP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HELP_BUTTON, HelpButtonClass))
#define IS_HELP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HELP_BUTTON))
#define IS_HELP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HELP_BUTTON))
#define HELP_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HELP_BUTTON, HelpButtonClass))

typedef struct _HelpButton HelpButton;
typedef struct _HelpButtonClass HelpButtonClass;

#define TYPE_FOLDER_CHOOSER_BUTTON (folder_chooser_button_get_type ())
#define FOLDER_CHOOSER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FOLDER_CHOOSER_BUTTON, FolderChooserButton))
#define FOLDER_CHOOSER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FOLDER_CHOOSER_BUTTON, FolderChooserButtonClass))
#define IS_FOLDER_CHOOSER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FOLDER_CHOOSER_BUTTON))
#define IS_FOLDER_CHOOSER_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FOLDER_CHOOSER_BUTTON))
#define FOLDER_CHOOSER_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FOLDER_CHOOSER_BUTTON, FolderChooserButtonClass))

typedef struct _FolderChooserButton FolderChooserButton;
typedef struct _FolderChooserButtonClass FolderChooserButtonClass;
enum  {
	CONFIG_LOCATION_GROUP_0_PROPERTY,
	CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY,
	CONFIG_LOCATION_GROUP_NUM_PROPERTIES
};
static GParamSpec* config_location_group_properties[CONFIG_LOCATION_GROUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define CONFIG_LOCATION_ROW_TYPE_ITEM (config_location_row_item_get_type ())
#define CONFIG_LOCATION_ROW_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_LOCATION_ROW_TYPE_ITEM, ConfigLocationRowItem))
#define CONFIG_LOCATION_ROW_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_LOCATION_ROW_TYPE_ITEM, ConfigLocationRowItemClass))
#define CONFIG_LOCATION_ROW_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_LOCATION_ROW_TYPE_ITEM))
#define CONFIG_LOCATION_ROW_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_LOCATION_ROW_TYPE_ITEM))
#define CONFIG_LOCATION_ROW_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_LOCATION_ROW_TYPE_ITEM, ConfigLocationRowItemClass))

typedef struct _ConfigLocationRowItem ConfigLocationRowItem;
typedef struct _ConfigLocationRowItemClass ConfigLocationRowItemClass;
typedef struct _ConfigLocationGroupSetUpGoogleResetData ConfigLocationGroupSetUpGoogleResetData;
typedef struct _ConfigLocationGroupSetUpMicrosoftResetData ConfigLocationGroupSetUpMicrosoftResetData;
typedef struct _ConfigLocationGroupSetUpRcloneResetData ConfigLocationGroupSetUpRcloneResetData;

struct _DynamicPreferencesGroup {
	AdwPreferencesGroup parent_instance;
	DynamicPreferencesGroupPrivate * priv;
};

struct _DynamicPreferencesGroupClass {
	AdwPreferencesGroupClass parent_class;
};

struct _ConfigLocationGroup {
	DynamicPreferencesGroup parent_instance;
	ConfigLocationGroupPrivate * priv;
};

struct _ConfigLocationGroupClass {
	DynamicPreferencesGroupClass parent_class;
};

struct _ConfigLocationGroupPrivate {
	gboolean _read_only;
	ConfigLocationRow* combo;
	AdwEntryRow* google_folder;
	AdwPreferencesGroup* google_reset;
	AdwEntryRow* microsoft_folder;
	AdwPreferencesGroup* microsoft_reset;
	AdwEntryRow* remote_address;
	AdwEntryRow* remote_folder;
	AdwEntryRow* drive_folder;
	AdwEntryRow* local_folder;
	HelpButton* local_warning_button;
	GtkLabel* local_warning_label;
	FolderChooserButton* local_browse;
	AdwEntryRow* rclone_remote;
	AdwEntryRow* rclone_folder;
	AdwPreferencesGroup* rclone_reset;
	GtkLabel* unsupported_label;
	DejaDupFilteredSettings* settings;
	DejaDupFilteredSettings* drive_settings;
	DejaDupFilteredSettings* google_settings;
	DejaDupFilteredSettings* microsoft_settings;
	DejaDupFilteredSettings* local_settings;
	DejaDupFilteredSettings* remote_settings;
	DejaDupFilteredSettings* rclone_settings;
};

struct _ConfigLocationGroupSetUpGoogleResetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ConfigLocationGroup* self;
	DejaDupBackendGoogle* backend;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendGoogle* _tmp1_;
	gchar* token;
	DejaDupBackendGoogle* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	AdwPreferencesGroup* _tmp6_;
};

struct _ConfigLocationGroupSetUpMicrosoftResetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ConfigLocationGroup* self;
	DejaDupBackendMicrosoft* backend;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendMicrosoft* _tmp1_;
	gchar* token;
	gchar* _tmp2_;
	AdwPreferencesGroup* _tmp3_;
};

struct _ConfigLocationGroupSetUpRcloneResetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ConfigLocationGroup* self;
	DejaDupBackendRclone* backend;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendRclone* _tmp1_;
	gchar* token;
	gchar* _tmp2_;
	AdwPreferencesGroup* _tmp3_;
};

static gint ConfigLocationGroup_private_offset;
static gpointer config_location_group_parent_class = NULL;

VALA_EXTERN GType dynamic_preferences_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DynamicPreferencesGroup, g_object_unref)
VALA_EXTERN GType config_location_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigLocationGroup, g_object_unref)
VALA_EXTERN GType config_location_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigLocationRow, g_object_unref)
VALA_EXTERN GType help_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (HelpButton, g_object_unref)
VALA_EXTERN GType folder_chooser_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FolderChooserButton, g_object_unref)
VALA_EXTERN ConfigLocationGroup* config_location_group_new (gboolean read_only);
VALA_EXTERN ConfigLocationGroup* config_location_group_construct (GType object_type,
                                                      gboolean read_only);
VALA_EXTERN DejaDupBackend* config_location_group_get_backend (ConfigLocationGroup* self);
static void config_location_group_update_stack (ConfigLocationGroup* self);
VALA_EXTERN GType config_location_row_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigLocationRowItem, g_object_unref)
VALA_EXTERN const gchar* config_location_row_item_get_page (ConfigLocationRowItem* self);
VALA_EXTERN DejaDupBackendKind config_location_row_item_get_backend_kind (ConfigLocationRowItem* self);
VALA_EXTERN void dynamic_preferences_group_set_mode (DynamicPreferencesGroup* self,
                                         const gchar* value);
static void config_location_group_bind_folder (ConfigLocationGroup* self,
                                        GSettings* settings,
                                        const gchar* key,
                                        AdwEntryRow* entry,
                                        gboolean allow_abs);
static gboolean config_location_group_get_folder_mapping (GValue* val,
                                                   GVariant* variant,
                                                   void* data);
static gboolean _config_location_group_get_folder_mapping_gsettings_bind_get_mapping (GValue* value,
                                                                               GVariant* variant,
                                                                               void* user_data);
static GVariant* config_location_group_set_identity_mapping (GValue* val,
                                                      const GVariantType* expected_type,
                                                      void* data);
static GVariant* _config_location_group_set_identity_mapping_gsettings_bind_set_mapping (GValue* value,
                                                                                  const GVariantType* expected_type,
                                                                                  void* user_data);
static void config_location_group_on_local_file_selected (ConfigLocationGroup* self);
VALA_EXTERN GFile* folder_chooser_button_get_file (FolderChooserButton* self);
VALA_EXTERN const gchar* folder_chooser_button_get_path (FolderChooserButton* self);
static void _config_location_group_on_local_file_selected_folder_chooser_button_file_selected (FolderChooserButton* _sender,
                                                                                        gpointer self);
static void config_location_group_local_folder_changed (ConfigLocationGroup* self);
static void config_location_group_on_google_reset_clicked (ConfigLocationGroup* self);
static void _config_location_group_on_google_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                              gpointer self);
static void config_location_group_set_up_google_reset_data_free (gpointer _data);
static void config_location_group_set_up_google_reset (ConfigLocationGroup* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void config_location_group_set_up_google_reset_finish (ConfigLocationGroup* self,
                                                       GAsyncResult* _res_);
static gboolean config_location_group_set_up_google_reset_co (ConfigLocationGroupSetUpGoogleResetData* _data_);
static void config_location_group_set_up_google_reset_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static void config_location_group_on_microsoft_reset_clicked (ConfigLocationGroup* self);
static void _config_location_group_on_microsoft_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                                 gpointer self);
static void config_location_group_set_up_microsoft_reset_data_free (gpointer _data);
static void config_location_group_set_up_microsoft_reset (ConfigLocationGroup* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static void config_location_group_set_up_microsoft_reset_finish (ConfigLocationGroup* self,
                                                          GAsyncResult* _res_);
static gboolean config_location_group_set_up_microsoft_reset_co (ConfigLocationGroupSetUpMicrosoftResetData* _data_);
static void config_location_group_set_up_microsoft_reset_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void config_location_group_on_rclone_reset_clicked (ConfigLocationGroup* self);
static void _config_location_group_on_rclone_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                              gpointer self);
static void config_location_group_set_up_rclone_reset_data_free (gpointer _data);
static void config_location_group_set_up_rclone_reset (ConfigLocationGroup* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void config_location_group_set_up_rclone_reset_finish (ConfigLocationGroup* self,
                                                       GAsyncResult* _res_);
static gboolean config_location_group_set_up_rclone_reset_co (ConfigLocationGroupSetUpRcloneResetData* _data_);
static void config_location_group_set_up_rclone_reset_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean config_location_group_get_read_only (ConfigLocationGroup* self);
static void config_location_group_set_read_only (ConfigLocationGroup* self,
                                          gboolean value);
static GObject * config_location_group_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties);
static void _config_location_group_local_folder_changed_g_settings_changed (GSettings* _sender,
                                                                     const gchar* key,
                                                                     gpointer self);
VALA_EXTERN void config_location_row_setup (ConfigLocationRow* self,
                                DejaDupFilteredSettings* settings,
                                DejaDupFilteredSettings* drive_settings);
static void _config_location_group_update_stack_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
static void config_location_group_finalize (GObject * obj);
static GType config_location_group_get_type_once (void);
static void _vala_config_location_group_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_config_location_group_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);

static inline gpointer
config_location_group_get_instance_private (ConfigLocationGroup* self)
{
	return G_STRUCT_MEMBER_P (self, ConfigLocationGroup_private_offset);
}

ConfigLocationGroup*
config_location_group_construct (GType object_type,
                                 gboolean read_only)
{
	ConfigLocationGroup * self = NULL;
	self = (ConfigLocationGroup*) g_object_new (object_type, "read-only", read_only, NULL);
	return self;
}

ConfigLocationGroup*
config_location_group_new (gboolean read_only)
{
	return config_location_group_construct (TYPE_CONFIG_LOCATION_GROUP, read_only);
}

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

DejaDupBackend*
config_location_group_get_backend (ConfigLocationGroup* self)
{
	gchar* name = NULL;
	DejaDupFilteredSettings* _tmp0_;
	gchar* _tmp1_;
	GSettings* sub_settings = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp20_;
	GSettings* _tmp21_;
	DejaDupBackend* _tmp22_;
	DejaDupBackend* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = deja_dup_backend_get_key_name ((GSettings*) _tmp0_);
	name = _tmp1_;
	sub_settings = NULL;
	_tmp2_ = name;
	if (g_strcmp0 (_tmp2_, "drive") == 0) {
		DejaDupFilteredSettings* _tmp3_;
		GSettings* _tmp4_;
		_tmp3_ = self->priv->drive_settings;
		_tmp4_ = _g_object_ref0 ((GSettings*) _tmp3_);
		_g_object_unref0 (sub_settings);
		sub_settings = _tmp4_;
	} else {
		const gchar* _tmp5_;
		_tmp5_ = name;
		if (g_strcmp0 (_tmp5_, "google") == 0) {
			DejaDupFilteredSettings* _tmp6_;
			GSettings* _tmp7_;
			_tmp6_ = self->priv->google_settings;
			_tmp7_ = _g_object_ref0 ((GSettings*) _tmp6_);
			_g_object_unref0 (sub_settings);
			sub_settings = _tmp7_;
		} else {
			const gchar* _tmp8_;
			_tmp8_ = name;
			if (g_strcmp0 (_tmp8_, "microsoft") == 0) {
				DejaDupFilteredSettings* _tmp9_;
				GSettings* _tmp10_;
				_tmp9_ = self->priv->microsoft_settings;
				_tmp10_ = _g_object_ref0 ((GSettings*) _tmp9_);
				_g_object_unref0 (sub_settings);
				sub_settings = _tmp10_;
			} else {
				const gchar* _tmp11_;
				_tmp11_ = name;
				if (g_strcmp0 (_tmp11_, "local") == 0) {
					DejaDupFilteredSettings* _tmp12_;
					GSettings* _tmp13_;
					_tmp12_ = self->priv->local_settings;
					_tmp13_ = _g_object_ref0 ((GSettings*) _tmp12_);
					_g_object_unref0 (sub_settings);
					sub_settings = _tmp13_;
				} else {
					const gchar* _tmp14_;
					_tmp14_ = name;
					if (g_strcmp0 (_tmp14_, "rclone") == 0) {
						DejaDupFilteredSettings* _tmp15_;
						GSettings* _tmp16_;
						_tmp15_ = self->priv->rclone_settings;
						_tmp16_ = _g_object_ref0 ((GSettings*) _tmp15_);
						_g_object_unref0 (sub_settings);
						sub_settings = _tmp16_;
					} else {
						const gchar* _tmp17_;
						_tmp17_ = name;
						if (g_strcmp0 (_tmp17_, "remote") == 0) {
							DejaDupFilteredSettings* _tmp18_;
							GSettings* _tmp19_;
							_tmp18_ = self->priv->remote_settings;
							_tmp19_ = _g_object_ref0 ((GSettings*) _tmp18_);
							_g_object_unref0 (sub_settings);
							sub_settings = _tmp19_;
						}
					}
				}
			}
		}
	}
	_tmp20_ = name;
	_tmp21_ = sub_settings;
	_tmp22_ = deja_dup_backend_get_for_key (_tmp20_, _tmp21_);
	result = _tmp22_;
	_g_object_unref0 (sub_settings);
	_g_free0 (name);
	return result;
}

static void
config_location_group_update_stack (ConfigLocationGroup* self)
{
	ConfigLocationRowItem* item = NULL;
	ConfigLocationRow* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	ConfigLocationRowItem* _tmp3_;
	ConfigLocationRowItem* _tmp4_;
	gchar* page = NULL;
	ConfigLocationRowItem* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* support_explanation = NULL;
	DejaDupToolPlugin* _tmp9_;
	DejaDupToolPlugin* _tmp10_;
	ConfigLocationRowItem* _tmp11_;
	DejaDupBackendKind _tmp12_;
	DejaDupBackendKind _tmp13_;
	gchar* _tmp14_ = NULL;
	gboolean _tmp15_;
	gboolean _tmp16_;
	const gchar* _tmp18_;
	const gchar* _tmp21_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->combo;
	_tmp1_ = adw_combo_row_get_selected_item ((AdwComboRow*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (CONFIG_LOCATION_ROW_IS_ITEM (_tmp2_) ? ((ConfigLocationRowItem*) _tmp2_) : NULL);
	item = _tmp3_;
	_tmp4_ = item;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (item);
		return;
	}
	_tmp5_ = item;
	_tmp6_ = config_location_row_item_get_page (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup (_tmp7_);
	page = _tmp8_;
	support_explanation = NULL;
	_tmp9_ = deja_dup_get_default_tool ();
	_tmp10_ = _tmp9_;
	_tmp11_ = item;
	_tmp12_ = config_location_row_item_get_backend_kind (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp15_ = deja_dup_tool_plugin_supports_backend (_tmp10_, _tmp13_, &_tmp14_);
	_g_free0 (support_explanation);
	support_explanation = _tmp14_;
	_tmp16_ = !_tmp15_;
	_g_object_unref0 (_tmp10_);
	if (_tmp16_) {
		gchar* _tmp17_;
		_tmp17_ = g_strdup ("unsupported");
		_g_free0 (page);
		page = _tmp17_;
	}
	_tmp18_ = page;
	if (g_strcmp0 (_tmp18_, "unsupported") == 0) {
		GtkLabel* _tmp19_;
		const gchar* _tmp20_;
		_tmp19_ = self->priv->unsupported_label;
		_tmp20_ = support_explanation;
		gtk_label_set_label (_tmp19_, _tmp20_);
	}
	_tmp21_ = page;
	dynamic_preferences_group_set_mode ((DynamicPreferencesGroup*) self, _tmp21_);
	_g_free0 (support_explanation);
	_g_free0 (page);
	_g_object_unref0 (item);
}

static gboolean
_config_location_group_get_folder_mapping_gsettings_bind_get_mapping (GValue* value,
                                                                      GVariant* variant,
                                                                      void* user_data)
{
	gboolean result;
	result = config_location_group_get_folder_mapping (value, variant, user_data);
	return result;
}

static GVariant*
_config_location_group_set_identity_mapping_gsettings_bind_set_mapping (GValue* value,
                                                                        const GVariantType* expected_type,
                                                                        void* user_data)
{
	GVariant* result;
	result = config_location_group_set_identity_mapping (value, expected_type, user_data);
	return result;
}

static void
config_location_group_bind_folder (ConfigLocationGroup* self,
                                   GSettings* settings,
                                   const gchar* key,
                                   AdwEntryRow* entry,
                                   gboolean allow_abs)
{
	void* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (settings != NULL);
	g_return_if_fail (key != NULL);
	g_return_if_fail (entry != NULL);
	_tmp0_ = GINT_TO_POINTER ((gint) allow_abs);
	g_settings_bind_with_mapping (settings, key, (GObject*) entry, "text", G_SETTINGS_BIND_DEFAULT, _config_location_group_get_folder_mapping_gsettings_bind_get_mapping, _config_location_group_set_identity_mapping_gsettings_bind_set_mapping, _tmp0_, NULL);
}

static gboolean
config_location_group_get_folder_mapping (GValue* val,
                                          GVariant* variant,
                                          void* data)
{
	gboolean allow_abs = FALSE;
	gchar* folder = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp3_;
	gboolean result;
	g_return_val_if_fail (val != NULL, FALSE);
	g_return_val_if_fail (variant != NULL, FALSE);
	allow_abs = (gboolean) GPOINTER_TO_INT (data);
	_tmp0_ = g_variant_get_string (variant, NULL);
	_tmp1_ = deja_dup_process_folder_key (_tmp0_, allow_abs, NULL);
	folder = _tmp1_;
	if (deja_dup_in_demo_mode ()) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("hostname");
		_g_free0 (folder);
		folder = _tmp2_;
	}
	_tmp3_ = folder;
	g_value_set_string (val, _tmp3_);
	result = TRUE;
	_g_free0 (folder);
	return result;
}

static GVariant*
config_location_group_set_identity_mapping (GValue* val,
                                            const GVariantType* expected_type,
                                            void* data)
{
	const gchar* _tmp0_;
	GVariant* _tmp1_;
	GVariant* result;
	g_return_val_if_fail (val != NULL, NULL);
	g_return_val_if_fail (expected_type != NULL, NULL);
	_tmp0_ = g_value_get_string (val);
	_tmp1_ = g_variant_new_string (_tmp0_);
	g_variant_ref_sink (_tmp1_);
	result = _tmp1_;
	return result;
}

static void
config_location_group_on_local_file_selected (ConfigLocationGroup* self)
{
	FolderChooserButton* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	DejaDupFilteredSettings* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->local_browse;
	_tmp1_ = folder_chooser_button_get_file (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->drive_settings;
	if (deja_dup_backend_drive_set_volume_info_from_file (_tmp2_, (GSettings*) _tmp3_)) {
		DejaDupFilteredSettings* _tmp4_;
		_tmp4_ = self->priv->settings;
		deja_dup_filtered_settings_set_string (_tmp4_, DEJA_DUP_BACKEND_KEY, "drive");
	} else {
		AdwEntryRow* _tmp5_;
		FolderChooserButton* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = self->priv->local_folder;
		_tmp6_ = self->priv->local_browse;
		_tmp7_ = folder_chooser_button_get_path (_tmp6_);
		_tmp8_ = _tmp7_;
		gtk_editable_set_text ((GtkEditable*) _tmp5_, _tmp8_);
	}
}

static void
_config_location_group_on_local_file_selected_folder_chooser_button_file_selected (FolderChooserButton* _sender,
                                                                                   gpointer self)
{
	config_location_group_on_local_file_selected ((ConfigLocationGroup*) self);
}

static void
config_location_group_local_folder_changed (ConfigLocationGroup* self)
{
	DejaDupBackendLocal* backend = NULL;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendLocal* _tmp1_;
	gchar* reason = NULL;
	DejaDupBackendLocal* _tmp2_;
	gchar* _tmp3_ = NULL;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->local_settings;
	_tmp1_ = deja_dup_backend_local_new ((GSettings*) _tmp0_);
	backend = _tmp1_;
	_tmp2_ = backend;
	_tmp4_ = deja_dup_backend_is_acceptable ((DejaDupBackend*) _tmp2_, &_tmp3_);
	_g_free0 (reason);
	reason = _tmp3_;
	if (_tmp4_) {
		HelpButton* _tmp5_;
		AdwEntryRow* _tmp6_;
		_tmp5_ = self->priv->local_warning_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
		_tmp6_ = self->priv->local_folder;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp6_, "error");
	} else {
		GtkLabel* _tmp7_;
		const gchar* _tmp8_;
		HelpButton* _tmp9_;
		AdwEntryRow* _tmp10_;
		_tmp7_ = self->priv->local_warning_label;
		_tmp8_ = reason;
		gtk_label_set_label (_tmp7_, _tmp8_);
		_tmp9_ = self->priv->local_warning_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE);
		_tmp10_ = self->priv->local_folder;
		gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "error");
	}
	_g_free0 (reason);
	_g_object_unref0 (backend);
}

static void
config_location_group_on_google_reset_clicked (ConfigLocationGroup* self)
{
	DejaDupBackendGoogle* backend = NULL;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendGoogle* _tmp1_;
	AdwPreferencesGroup* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->google_settings;
	_tmp1_ = deja_dup_backend_google_new ((GSettings*) _tmp0_);
	backend = _tmp1_;
	deja_dup_backend_oauth_clear_refresh_token ((DejaDupBackendOAuth*) backend, NULL, NULL);
	_tmp2_ = self->priv->google_reset;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
	_g_object_unref0 (backend);
}

static void
_config_location_group_on_google_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                         gpointer self)
{
	config_location_group_on_google_reset_clicked ((ConfigLocationGroup*) self);
}

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

static void
config_location_group_set_up_google_reset (ConfigLocationGroup* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	ConfigLocationGroupSetUpGoogleResetData* _data_;
	ConfigLocationGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ConfigLocationGroupSetUpGoogleResetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, config_location_group_set_up_google_reset_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	config_location_group_set_up_google_reset_co (_data_);
}

static void
config_location_group_set_up_google_reset_finish (ConfigLocationGroup* self,
                                                  GAsyncResult* _res_)
{
	ConfigLocationGroupSetUpGoogleResetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
config_location_group_set_up_google_reset_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	ConfigLocationGroupSetUpGoogleResetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	config_location_group_set_up_google_reset_co (_data_);
}

static gboolean
config_location_group_set_up_google_reset_co (ConfigLocationGroupSetUpGoogleResetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->google_settings;
	_data_->_tmp1_ = deja_dup_backend_google_new ((GSettings*) _data_->_tmp0_);
	_data_->backend = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->backend;
	_data_->_state_ = 1;
	deja_dup_backend_oauth_lookup_refresh_token ((DejaDupBackendOAuth*) _data_->_tmp2_, config_location_group_set_up_google_reset_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = deja_dup_backend_oauth_lookup_refresh_token_finish ((DejaDupBackendOAuth*) _data_->_tmp2_, _data_->_res_);
	_data_->token = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->token;
	if (_data_->_tmp5_ != NULL) {
		_data_->_tmp4_ = !deja_dup_in_demo_mode ();
	} else {
		_data_->_tmp4_ = FALSE;
	}
	_data_->_tmp6_ = _data_->self->priv->google_reset;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp6_, _data_->_tmp4_);
	_g_free0 (_data_->token);
	_g_object_unref0 (_data_->backend);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
config_location_group_on_microsoft_reset_clicked (ConfigLocationGroup* self)
{
	DejaDupBackendMicrosoft* backend = NULL;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendMicrosoft* _tmp1_;
	AdwPreferencesGroup* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->microsoft_settings;
	_tmp1_ = deja_dup_backend_microsoft_new ((GSettings*) _tmp0_);
	backend = _tmp1_;
	deja_dup_backend_oauth_clear_refresh_token ((DejaDupBackendOAuth*) backend, NULL, NULL);
	_tmp2_ = self->priv->microsoft_reset;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
	_g_object_unref0 (backend);
}

static void
_config_location_group_on_microsoft_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                            gpointer self)
{
	config_location_group_on_microsoft_reset_clicked ((ConfigLocationGroup*) self);
}

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

static void
config_location_group_set_up_microsoft_reset (ConfigLocationGroup* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	ConfigLocationGroupSetUpMicrosoftResetData* _data_;
	ConfigLocationGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ConfigLocationGroupSetUpMicrosoftResetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, config_location_group_set_up_microsoft_reset_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	config_location_group_set_up_microsoft_reset_co (_data_);
}

static void
config_location_group_set_up_microsoft_reset_finish (ConfigLocationGroup* self,
                                                     GAsyncResult* _res_)
{
	ConfigLocationGroupSetUpMicrosoftResetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
config_location_group_set_up_microsoft_reset_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	ConfigLocationGroupSetUpMicrosoftResetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	config_location_group_set_up_microsoft_reset_co (_data_);
}

static gboolean
config_location_group_set_up_microsoft_reset_co (ConfigLocationGroupSetUpMicrosoftResetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->microsoft_settings;
	_data_->_tmp1_ = deja_dup_backend_microsoft_new ((GSettings*) _data_->_tmp0_);
	_data_->backend = _data_->_tmp1_;
	_data_->_state_ = 1;
	deja_dup_backend_oauth_lookup_refresh_token ((DejaDupBackendOAuth*) _data_->backend, config_location_group_set_up_microsoft_reset_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = deja_dup_backend_oauth_lookup_refresh_token_finish ((DejaDupBackendOAuth*) _data_->backend, _data_->_res_);
	_data_->token = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->self->priv->microsoft_reset;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp3_, _data_->token != NULL);
	_g_free0 (_data_->token);
	_g_object_unref0 (_data_->backend);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
config_location_group_on_rclone_reset_clicked (ConfigLocationGroup* self)
{
	DejaDupBackendRclone* backend = NULL;
	DejaDupFilteredSettings* _tmp0_;
	DejaDupBackendRclone* _tmp1_;
	AdwPreferencesGroup* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->rclone_settings;
	_tmp1_ = deja_dup_backend_rclone_new ((GSettings*) _tmp0_);
	backend = _tmp1_;
	deja_dup_backend_rclone_clear_config_password (backend, NULL, NULL);
	_tmp2_ = self->priv->rclone_reset;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
	_g_object_unref0 (backend);
}

static void
_config_location_group_on_rclone_reset_clicked_adw_button_row_activated (AdwButtonRow* _sender,
                                                                         gpointer self)
{
	config_location_group_on_rclone_reset_clicked ((ConfigLocationGroup*) self);
}

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

static void
config_location_group_set_up_rclone_reset (ConfigLocationGroup* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	ConfigLocationGroupSetUpRcloneResetData* _data_;
	ConfigLocationGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ConfigLocationGroupSetUpRcloneResetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, config_location_group_set_up_rclone_reset_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	config_location_group_set_up_rclone_reset_co (_data_);
}

static void
config_location_group_set_up_rclone_reset_finish (ConfigLocationGroup* self,
                                                  GAsyncResult* _res_)
{
	ConfigLocationGroupSetUpRcloneResetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
config_location_group_set_up_rclone_reset_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	ConfigLocationGroupSetUpRcloneResetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	config_location_group_set_up_rclone_reset_co (_data_);
}

static gboolean
config_location_group_set_up_rclone_reset_co (ConfigLocationGroupSetUpRcloneResetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->rclone_settings;
	_data_->_tmp1_ = deja_dup_backend_rclone_new ((GSettings*) _data_->_tmp0_);
	_data_->backend = _data_->_tmp1_;
	_data_->_state_ = 1;
	deja_dup_backend_rclone_lookup_config_password (_data_->backend, config_location_group_set_up_rclone_reset_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = deja_dup_backend_rclone_lookup_config_password_finish (_data_->backend, _data_->_res_);
	_data_->token = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->self->priv->rclone_reset;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp3_, _data_->token != NULL);
	_g_free0 (_data_->token);
	_g_object_unref0 (_data_->backend);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

gboolean
config_location_group_get_read_only (ConfigLocationGroup* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_read_only;
	return result;
}

static void
config_location_group_set_read_only (ConfigLocationGroup* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = config_location_group_get_read_only (self);
	if (old_value != value) {
		self->priv->_read_only = value;
		g_object_notify_by_pspec ((GObject *) self, config_location_group_properties[CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY]);
	}
}

static void
_config_location_group_local_folder_changed_g_settings_changed (GSettings* _sender,
                                                                const gchar* key,
                                                                gpointer self)
{
	config_location_group_local_folder_changed ((ConfigLocationGroup*) self);
}

static void
_config_location_group_update_stack_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	config_location_group_update_stack ((ConfigLocationGroup*) self);
}

static GObject *
config_location_group_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ConfigLocationGroup * self;
	gboolean _tmp0_;
	DejaDupFilteredSettings* _tmp1_;
	gboolean _tmp2_;
	DejaDupFilteredSettings* _tmp3_;
	DejaDupFilteredSettings* _tmp4_;
	AdwEntryRow* _tmp5_;
	gboolean _tmp6_;
	DejaDupFilteredSettings* _tmp7_;
	DejaDupFilteredSettings* _tmp8_;
	AdwEntryRow* _tmp9_;
	gboolean _tmp10_;
	DejaDupFilteredSettings* _tmp11_;
	DejaDupFilteredSettings* _tmp12_;
	AdwEntryRow* _tmp13_;
	DejaDupFilteredSettings* _tmp14_;
	AdwEntryRow* _tmp15_;
	gboolean _tmp16_;
	DejaDupFilteredSettings* _tmp17_;
	DejaDupFilteredSettings* _tmp18_;
	AdwEntryRow* _tmp19_;
	gboolean _tmp20_;
	DejaDupFilteredSettings* _tmp21_;
	DejaDupFilteredSettings* _tmp22_;
	AdwEntryRow* _tmp23_;
	DejaDupFilteredSettings* _tmp24_;
	gchar* _tmp25_;
	gboolean _tmp26_;
	DejaDupFilteredSettings* _tmp27_;
	DejaDupFilteredSettings* _tmp28_;
	AdwEntryRow* _tmp29_;
	DejaDupFilteredSettings* _tmp30_;
	AdwEntryRow* _tmp31_;
	ConfigLocationRow* _tmp32_;
	DejaDupFilteredSettings* _tmp33_;
	DejaDupFilteredSettings* _tmp34_;
	ConfigLocationRow* _tmp35_;
	parent_class = G_OBJECT_CLASS (config_location_group_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup);
	_tmp0_ = self->priv->_read_only;
	_tmp1_ = deja_dup_filtered_settings_new (NULL, _tmp0_);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp1_;
	_tmp2_ = self->priv->_read_only;
	_tmp3_ = deja_dup_filtered_settings_new (DEJA_DUP_GOOGLE_ROOT, _tmp2_);
	_g_object_unref0 (self->priv->google_settings);
	self->priv->google_settings = _tmp3_;
	_tmp4_ = self->priv->google_settings;
	_tmp5_ = self->priv->google_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp4_, DEJA_DUP_GOOGLE_FOLDER_KEY, _tmp5_, FALSE);
	config_location_group_set_up_google_reset (self, NULL, NULL);
	_tmp6_ = self->priv->_read_only;
	_tmp7_ = deja_dup_filtered_settings_new (DEJA_DUP_MICROSOFT_ROOT, _tmp6_);
	_g_object_unref0 (self->priv->microsoft_settings);
	self->priv->microsoft_settings = _tmp7_;
	_tmp8_ = self->priv->microsoft_settings;
	_tmp9_ = self->priv->microsoft_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp8_, DEJA_DUP_MICROSOFT_FOLDER_KEY, _tmp9_, FALSE);
	config_location_group_set_up_microsoft_reset (self, NULL, NULL);
	_tmp10_ = self->priv->_read_only;
	_tmp11_ = deja_dup_filtered_settings_new (DEJA_DUP_REMOTE_ROOT, _tmp10_);
	_g_object_unref0 (self->priv->remote_settings);
	self->priv->remote_settings = _tmp11_;
	_tmp12_ = self->priv->remote_settings;
	_tmp13_ = self->priv->remote_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp12_, DEJA_DUP_REMOTE_FOLDER_KEY, _tmp13_, TRUE);
	_tmp14_ = self->priv->remote_settings;
	_tmp15_ = self->priv->remote_address;
	g_settings_bind ((GSettings*) _tmp14_, DEJA_DUP_REMOTE_URI_KEY, (GObject*) _tmp15_, "text", G_SETTINGS_BIND_DEFAULT);
	_tmp16_ = self->priv->_read_only;
	_tmp17_ = deja_dup_filtered_settings_new (DEJA_DUP_DRIVE_ROOT, _tmp16_);
	_g_object_unref0 (self->priv->drive_settings);
	self->priv->drive_settings = _tmp17_;
	_tmp18_ = self->priv->drive_settings;
	_tmp19_ = self->priv->drive_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp18_, DEJA_DUP_DRIVE_FOLDER_KEY, _tmp19_, FALSE);
	_tmp20_ = self->priv->_read_only;
	_tmp21_ = deja_dup_filtered_settings_new (DEJA_DUP_LOCAL_ROOT, _tmp20_);
	_g_object_unref0 (self->priv->local_settings);
	self->priv->local_settings = _tmp21_;
	_tmp22_ = self->priv->local_settings;
	_tmp23_ = self->priv->local_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp22_, DEJA_DUP_LOCAL_FOLDER_KEY, _tmp23_, TRUE);
	_tmp24_ = self->priv->local_settings;
	_tmp25_ = g_strconcat ("changed::", DEJA_DUP_LOCAL_FOLDER_KEY, NULL);
	g_signal_connect_object ((GSettings*) _tmp24_, _tmp25_, (GCallback) _config_location_group_local_folder_changed_g_settings_changed, self, 0);
	_g_free0 (_tmp25_);
	config_location_group_local_folder_changed (self);
	_tmp26_ = self->priv->_read_only;
	_tmp27_ = deja_dup_filtered_settings_new (DEJA_DUP_RCLONE_ROOT, _tmp26_);
	_g_object_unref0 (self->priv->rclone_settings);
	self->priv->rclone_settings = _tmp27_;
	_tmp28_ = self->priv->rclone_settings;
	_tmp29_ = self->priv->rclone_remote;
	g_settings_bind ((GSettings*) _tmp28_, DEJA_DUP_RCLONE_REMOTE_KEY, (GObject*) _tmp29_, "text", G_SETTINGS_BIND_DEFAULT);
	_tmp30_ = self->priv->rclone_settings;
	_tmp31_ = self->priv->rclone_folder;
	config_location_group_bind_folder (self, (GSettings*) _tmp30_, DEJA_DUP_RCLONE_FOLDER_KEY, _tmp31_, TRUE);
	config_location_group_set_up_rclone_reset (self, NULL, NULL);
	_tmp32_ = self->priv->combo;
	_tmp33_ = self->priv->settings;
	_tmp34_ = self->priv->drive_settings;
	config_location_row_setup (_tmp32_, _tmp33_, _tmp34_);
	_tmp35_ = self->priv->combo;
	g_signal_connect_object ((GObject*) _tmp35_, "notify::selected-item", (GCallback) _config_location_group_update_stack_g_object_notify, self, 0);
	config_location_group_update_stack (self);
	return obj;
}

static void
config_location_group_class_init (ConfigLocationGroupClass * klass,
                                  gpointer klass_data)
{
	config_location_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ConfigLocationGroup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_config_location_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_config_location_group_set_property;
	G_OBJECT_CLASS (klass)->constructor = config_location_group_constructor;
	G_OBJECT_CLASS (klass)->finalize = config_location_group_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY, config_location_group_properties[CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/DejaDup/ConfigLocationGroup.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "combo", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, combo));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "google_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, google_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "google_reset", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, google_reset));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "microsoft_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, microsoft_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "microsoft_reset", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, microsoft_reset));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remote_address", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, remote_address));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "remote_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, remote_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "drive_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, drive_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "local_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, local_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "local_warning_button", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, local_warning_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "local_warning_label", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, local_warning_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "local_browse", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, local_browse));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "rclone_remote", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, rclone_remote));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "rclone_folder", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, rclone_folder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "rclone_reset", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, rclone_reset));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "unsupported_label", FALSE, ConfigLocationGroup_private_offset + G_STRUCT_OFFSET (ConfigLocationGroupPrivate, unsupported_label));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_local_file_selected", G_CALLBACK(_config_location_group_on_local_file_selected_folder_chooser_button_file_selected));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_google_reset_clicked", G_CALLBACK(_config_location_group_on_google_reset_clicked_adw_button_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_microsoft_reset_clicked", G_CALLBACK(_config_location_group_on_microsoft_reset_clicked_adw_button_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_rclone_reset_clicked", G_CALLBACK(_config_location_group_on_rclone_reset_clicked_adw_button_row_activated));
}

static void
config_location_group_instance_init (ConfigLocationGroup * self,
                                     gpointer klass)
{
	self->priv = config_location_group_get_instance_private (self);
	g_type_ensure (TYPE_CONFIG_LOCATION_ROW);
	g_type_ensure (TYPE_HELP_BUTTON);
	g_type_ensure (TYPE_FOLDER_CHOOSER_BUTTON);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
config_location_group_finalize (GObject * obj)
{
	ConfigLocationGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->drive_settings);
	_g_object_unref0 (self->priv->google_settings);
	_g_object_unref0 (self->priv->microsoft_settings);
	_g_object_unref0 (self->priv->local_settings);
	_g_object_unref0 (self->priv->remote_settings);
	_g_object_unref0 (self->priv->rclone_settings);
	G_OBJECT_CLASS (config_location_group_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
config_location_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConfigLocationGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) config_location_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConfigLocationGroup), 0, (GInstanceInitFunc) config_location_group_instance_init, NULL };
	GType config_location_group_type_id;
	config_location_group_type_id = g_type_register_static (TYPE_DYNAMIC_PREFERENCES_GROUP, "ConfigLocationGroup", &g_define_type_info, 0);
	ConfigLocationGroup_private_offset = g_type_add_instance_private (config_location_group_type_id, sizeof (ConfigLocationGroupPrivate));
	return config_location_group_type_id;
}

GType
config_location_group_get_type (void)
{
	static gsize config_location_group_type_id__once = 0;
	if (g_once_init_enter (&config_location_group_type_id__once)) {
		GType config_location_group_type_id;
		config_location_group_type_id = config_location_group_get_type_once ();
		g_once_init_leave (&config_location_group_type_id__once, config_location_group_type_id);
	}
	return config_location_group_type_id__once;
}

static void
_vala_config_location_group_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	ConfigLocationGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup);
	switch (property_id) {
		case CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, config_location_group_get_read_only (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_config_location_group_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	ConfigLocationGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CONFIG_LOCATION_GROUP, ConfigLocationGroup);
	switch (property_id) {
		case CONFIG_LOCATION_GROUP_READ_ONLY_PROPERTY:
		config_location_group_set_read_only (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

