/* dconf-model.c generated by valac 0.35.3.1-efc5, the Vala compiler
 * generated from dconf-model.vala, do not modify */

/*
  This file is part of Dconf Editor

  Dconf Editor 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.

  Dconf Editor 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 Dconf Editor.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <dconf.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>


#define TYPE_SETTING_OBJECT (setting_object_get_type ())
#define SETTING_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTING_OBJECT, SettingObject))
#define SETTING_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTING_OBJECT, SettingObjectClass))
#define IS_SETTING_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTING_OBJECT))
#define IS_SETTING_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTING_OBJECT))
#define SETTING_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTING_OBJECT, SettingObjectClass))

typedef struct _SettingObject SettingObject;
typedef struct _SettingObjectClass SettingObjectClass;
typedef struct _SettingObjectPrivate SettingObjectPrivate;

#define TYPE_DIRECTORY (directory_get_type ())
#define DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECTORY, Directory))
#define DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECTORY, DirectoryClass))
#define IS_DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECTORY))
#define IS_DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECTORY))
#define DIRECTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECTORY, DirectoryClass))

typedef struct _Directory Directory;
typedef struct _DirectoryClass DirectoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _DirectoryPrivate DirectoryPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))

#define TYPE_KEY (key_get_type ())
#define KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY, Key))
#define KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY, KeyClass))
#define IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY))
#define IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY))
#define KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY, KeyClass))

typedef struct _Key Key;
typedef struct _KeyClass KeyClass;
#define _g_settings_schema_key_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_key_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

#define TYPE_GSETTINGS_KEY (gsettings_key_get_type ())
#define GSETTINGS_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GSETTINGS_KEY, GSettingsKey))
#define GSETTINGS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GSETTINGS_KEY, GSettingsKeyClass))
#define IS_GSETTINGS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GSETTINGS_KEY))
#define IS_GSETTINGS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GSETTINGS_KEY))
#define GSETTINGS_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GSETTINGS_KEY, GSettingsKeyClass))

typedef struct _GSettingsKey GSettingsKey;
typedef struct _GSettingsKeyClass GSettingsKeyClass;

#define TYPE_DCONF_KEY (dconf_key_get_type ())
#define DCONF_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DCONF_KEY, DConfKey))
#define DCONF_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DCONF_KEY, DConfKeyClass))
#define IS_DCONF_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DCONF_KEY))
#define IS_DCONF_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DCONF_KEY))
#define DCONF_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DCONF_KEY, DConfKeyClass))

typedef struct _DConfKey DConfKey;
typedef struct _DConfKeyClass DConfKeyClass;
typedef struct _Block3Data Block3Data;
enum  {
	DIRECTORY_ITEM_CHANGED_SIGNAL,
	DIRECTORY_LAST_SIGNAL
};
static guint directory_signals[DIRECTORY_LAST_SIGNAL] = {0};
typedef struct _KeyPrivate KeyPrivate;
enum  {
	KEY_VALUE_CHANGED_SIGNAL,
	KEY_LAST_SIGNAL
};
static guint key_signals[KEY_LAST_SIGNAL] = {0};
typedef struct _DConfKeyPrivate DConfKeyPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
typedef struct _GSettingsKeyPrivate GSettingsKeyPrivate;

#define TYPE_SETTINGS_MODEL (settings_model_get_type ())
#define SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_MODEL, SettingsModel))
#define SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_MODEL, SettingsModelClass))
#define IS_SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_MODEL))
#define IS_SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_MODEL))
#define SETTINGS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_MODEL, SettingsModelClass))

typedef struct _SettingsModel SettingsModel;
typedef struct _SettingsModelClass SettingsModelClass;
typedef struct _SettingsModelPrivate SettingsModelPrivate;
#define _g_settings_schema_source_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_source_unref (var), NULL)))
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))

struct _SettingObject {
	GObject parent_instance;
	SettingObjectPrivate * priv;
};

struct _SettingObjectClass {
	GObjectClass parent_class;
};

struct _SettingObjectPrivate {
	Directory* _nullable_parent;
	gchar* _name;
	gchar* _full_name;
};

struct _Directory {
	SettingObject parent_instance;
	DirectoryPrivate * priv;
	GHashTable* child_map;
	GList* children;
};

struct _DirectoryClass {
	SettingObjectClass parent_class;
};

struct _DirectoryPrivate {
	GSettingsSchema* settings_schema;
	gchar** gsettings_key_map;
	gint gsettings_key_map_length1;
	gint _gsettings_key_map_size_;
	GSettings* settings;
	DConfClient* client;
	GListStore* _key_model;
};

struct _Block3Data {
	int _ref_count_;
	Directory* self;
	DConfKey* new_key;
};

struct _Key {
	SettingObject parent_instance;
	KeyPrivate * priv;
};

struct _KeyClass {
	SettingObjectClass parent_class;
	gchar* (*get_descriptor) (Key* self);
	GVariant* (*get_value) (Key* self);
	void (*set_value) (Key* self, GVariant* value);
};

struct _KeyPrivate {
	gchar* _type_string;
	GVariant* _properties;
	gboolean _planned_change;
	GVariant* _planned_value;
};

struct _DConfKey {
	Key parent_instance;
	DConfKeyPrivate * priv;
};

struct _DConfKeyClass {
	KeyClass parent_class;
};

struct _DConfKeyPrivate {
	DConfClient* client;
	gboolean _is_ghost;
};

struct _GSettingsKey {
	Key parent_instance;
	GSettingsKeyPrivate * priv;
};

struct _GSettingsKeyClass {
	KeyClass parent_class;
};

struct _GSettingsKeyPrivate {
	gchar* _schema_id;
	gchar* _summary;
	gchar* _description;
	GVariant* _default_value;
	gchar* _range_type;
	GVariant* _range_content;
	GSettings* settings;
};

struct _SettingsModel {
	GObject parent_instance;
	SettingsModelPrivate * priv;
};

struct _SettingsModelClass {
	GObjectClass parent_class;
};

struct _SettingsModelPrivate {
	DConfClient* client;
	Directory* root;
};


static gpointer setting_object_parent_class = NULL;
static gpointer directory_parent_class = NULL;
static gpointer key_parent_class = NULL;
static gpointer dconf_key_parent_class = NULL;
static gpointer gsettings_key_parent_class = NULL;
static gpointer settings_model_parent_class = NULL;
static GtkTreeModelIface * settings_model_gtk_tree_model_parent_iface = NULL;

GType setting_object_get_type (void) G_GNUC_CONST;
GType directory_get_type (void) G_GNUC_CONST;
#define SETTING_OBJECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SETTING_OBJECT, SettingObjectPrivate))
enum  {
	SETTING_OBJECT_DUMMY_PROPERTY,
	SETTING_OBJECT_NULLABLE_PARENT,
	SETTING_OBJECT_PARENT,
	SETTING_OBJECT_NAME,
	SETTING_OBJECT_FULL_NAME
};
SettingObject* setting_object_construct (GType object_type);
static Directory* setting_object_get_nullable_parent (SettingObject* self);
static void setting_object_set_nullable_parent (SettingObject* self, Directory* value);
Directory* setting_object_get_parent (SettingObject* self);
const gchar* setting_object_get_name (SettingObject* self);
static void setting_object_set_name (SettingObject* self, const gchar* value);
const gchar* setting_object_get_full_name (SettingObject* self);
static void setting_object_set_full_name (SettingObject* self, const gchar* value);
static GObject * setting_object_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void setting_object_finalize (GObject * obj);
static void _vala_setting_object_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_setting_object_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define DIRECTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECTORY, DirectoryPrivate))
enum  {
	DIRECTORY_DUMMY_PROPERTY,
	DIRECTORY_INDEX,
	DIRECTORY_KEY_MODEL
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
Directory* directory_new (Directory* parent, const gchar* name, DConfClient* client);
Directory* directory_construct (GType object_type, Directory* parent, const gchar* name, DConfClient* client);
GType key_get_type (void) G_GNUC_CONST;
static void directory_insert_key (Directory* self, Key* key);
static gint __lambda12_ (Directory* self, GObject* a, GObject* b);
static gint ___lambda12__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
void directory_create_folders (Directory* self);
static void __lambda13_ (Directory* self, Directory* dir);
static gint __lambda14_ (Directory* self, GObject* a, GObject* b);
static gint ___lambda14__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void ___lambda13__gfunc (gconstpointer data, gpointer self);
void directory_init_gsettings_keys (Directory* self, GSettingsSchema* _settings_schema);
static void directory_create_gsettings_keys (Directory* self);
static void directory_create_gsettings_key (Directory* self, const gchar* key_id, GSettingsSchemaKey* settings_schema_key);
GType gsettings_key_get_type (void) G_GNUC_CONST;
GSettingsKey* gsettings_key_new (Directory* parent, const gchar* name, GSettings* settings, const gchar* schema_id, const gchar* summary, const gchar* description, const gchar* type_string, GVariant* default_value, const gchar* range_type, GVariant* range_content);
GSettingsKey* gsettings_key_construct (GType object_type, Directory* parent, const gchar* name, GSettings* settings, const gchar* schema_id, const gchar* summary, const gchar* description, const gchar* type_string, GVariant* default_value, const gchar* range_type, GVariant* range_content);
static void directory_dconf_client_change (Directory* self, DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag);
static void directory_create_dconf_keys (Directory* self);
static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle);
static void directory_create_dconf_key (Directory* self, const gchar* key_id);
static void _directory_dconf_client_change_dconf_client_changed (DConfClient* _sender, const gchar* prefix, gchar** changes, const gchar* tag, gpointer self);
GType dconf_key_get_type (void) G_GNUC_CONST;
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
DConfKey* dconf_key_new (DConfClient* client, Directory* parent, const gchar* name);
DConfKey* dconf_key_construct (GType object_type, DConfClient* client, Directory* parent, const gchar* name);
static void __lambda16_ (Block3Data* _data3_, const gchar* item);
void dconf_key_set_is_ghost (DConfKey* self, gboolean value);
static void ___lambda16__directory_item_changed (Directory* _sender, const gchar* item, gpointer self);
gint directory_get_index (Directory* self);
GListStore* directory_get_key_model (Directory* self);
static void directory_finalize (GObject * obj);
static void _vala_directory_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
#define KEY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY, KeyPrivate))
enum  {
	KEY_DUMMY_PROPERTY,
	KEY_DESCRIPTOR,
	KEY_TYPE_STRING,
	KEY_PROPERTIES,
	KEY_PLANNED_CHANGE,
	KEY_PLANNED_VALUE,
	KEY_VALUE
};
gchar* key_key_to_description (const gchar* type);
void key_get_min_and_max_string (gchar* * min, gchar* * max, const gchar* type_string);
gchar* key_cool_text_value_from_variant (GVariant* variant, const gchar* type);
gchar* key_cool_boolean_text_value (gboolean* nullable_boolean, gboolean capitalized);
static gboolean _bool_equal (const gboolean * s1, const gboolean * s2);
gboolean key_show_min_and_max (const gchar* type);
Key* key_construct (GType object_type);
gchar* key_get_descriptor (Key* self);
const gchar* key_get_type_string (Key* self);
void key_set_type_string (Key* self, const gchar* value);
GVariant* key_get_properties (Key* self);
void key_set_properties (Key* self, GVariant* value);
gboolean key_get_planned_change (Key* self);
void key_set_planned_change (Key* self, gboolean value);
GVariant* key_get_planned_value (Key* self);
void key_set_planned_value (Key* self, GVariant* value);
GVariant* key_get_value (Key* self);
void key_set_value (Key* self, GVariant* value);
static void key_finalize (GObject * obj);
static void _vala_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define DCONF_KEY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DCONF_KEY, DConfKeyPrivate))
enum  {
	DCONF_KEY_DUMMY_PROPERTY,
	DCONF_KEY_DESCRIPTOR,
	DCONF_KEY_IS_GHOST,
	DCONF_KEY_VALUE
};
void dconf_key_erase (DConfKey* self);
gboolean dconf_key_get_is_ghost (DConfKey* self);
static void dconf_key_finalize (GObject * obj);
static void _vala_dconf_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dconf_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define GSETTINGS_KEY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GSETTINGS_KEY, GSettingsKeyPrivate))
enum  {
	GSETTINGS_KEY_DUMMY_PROPERTY,
	GSETTINGS_KEY_SCHEMA_ID,
	GSETTINGS_KEY_SUMMARY,
	GSETTINGS_KEY_DESCRIPTION,
	GSETTINGS_KEY_DEFAULT_VALUE,
	GSETTINGS_KEY_RANGE_TYPE,
	GSETTINGS_KEY_RANGE_CONTENT,
	GSETTINGS_KEY_DESCRIPTOR,
	GSETTINGS_KEY_VALUE,
	GSETTINGS_KEY_IS_DEFAULT
};
void gsettings_key_set_to_default (GSettingsKey* self);
static void __lambda15_ (GSettingsKey* self);
static void ___lambda15__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
gboolean gsettings_key_search_for (GSettingsKey* self, const gchar* text);
const gchar* gsettings_key_get_summary (GSettingsKey* self);
static const gchar* gsettings_key_get_description (GSettingsKey* self);
const gchar* gsettings_key_get_schema_id (GSettingsKey* self);
static void gsettings_key_set_schema_id (GSettingsKey* self, const gchar* value);
static void gsettings_key_set_summary (GSettingsKey* self, const gchar* value);
static void gsettings_key_set_description (GSettingsKey* self, const gchar* value);
static GVariant* gsettings_key_get_default_value (GSettingsKey* self);
static void gsettings_key_set_default_value (GSettingsKey* self, GVariant* value);
const gchar* gsettings_key_get_range_type (GSettingsKey* self);
static void gsettings_key_set_range_type (GSettingsKey* self, const gchar* value);
GVariant* gsettings_key_get_range_content (GSettingsKey* self);
static void gsettings_key_set_range_content (GSettingsKey* self, GVariant* value);
gboolean gsettings_key_get_is_default (GSettingsKey* self);
static void gsettings_key_finalize (GObject * obj);
static void _vala_gsettings_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gsettings_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType settings_model_get_type (void) G_GNUC_CONST;
#define SETTINGS_MODEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SETTINGS_MODEL, SettingsModelPrivate))
enum  {
	SETTINGS_MODEL_DUMMY_PROPERTY
};
SettingsModel* settings_model_new (void);
SettingsModel* settings_model_construct (GType object_type);
static Directory* settings_model_create_gsettings_views (SettingsModel* self, Directory* parent_view, const gchar* remaining);
static void settings_model_create_dconf_views (SettingsModel* self, Directory* view);
Directory* settings_model_get_root_directory (SettingsModel* self);
static Directory* settings_model_get_child (SettingsModel* self, Directory* parent_view, const gchar* name);
static gint __lambda17_ (Directory* a, Directory* b);
static gint ___lambda17__gcompare_func (gconstpointer a, gconstpointer b);
static GtkTreeModelFlags settings_model_real_get_flags (GtkTreeModel* base);
static gint settings_model_real_get_n_columns (GtkTreeModel* base);
static GType settings_model_real_get_column_type (GtkTreeModel* base, gint index);
static void settings_model_set_iter (SettingsModel* self, GtkTreeIter* iter, Directory* directory);
Directory* settings_model_get_directory (SettingsModel* self, GtkTreeIter* iter);
static gboolean settings_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path);
static GtkTreePath* settings_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value);
static gboolean settings_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean settings_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent);
static gboolean settings_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter);
static gint settings_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean settings_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n);
static gboolean settings_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child);
static void settings_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


SettingObject* setting_object_construct (GType object_type) {
	SettingObject * self = NULL;
	self = (SettingObject*) g_object_new (object_type, NULL);
	return self;
}


static Directory* setting_object_get_nullable_parent (SettingObject* self) {
	Directory* result;
	Directory* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_nullable_parent;
	result = _tmp0_;
	return result;
}


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


static void setting_object_set_nullable_parent (SettingObject* self, Directory* value) {
	g_return_if_fail (self != NULL);
	if (setting_object_get_nullable_parent (self) != value) {
		Directory* _tmp0_;
		Directory* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_nullable_parent);
		self->priv->_nullable_parent = _tmp1_;
		g_object_notify ((GObject *) self, "nullable-parent");
	}
}


Directory* setting_object_get_parent (SettingObject* self) {
	Directory* result;
	Directory* _tmp0_ = NULL;
	Directory* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_nullable_parent;
	if (_tmp1_ == NULL) {
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY, Directory);
	} else {
		Directory* _tmp2_;
		_tmp2_ = self->priv->_nullable_parent;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DIRECTORY, Directory);
	}
	result = _tmp0_;
	return result;
}


const gchar* setting_object_get_name (SettingObject* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}


static void setting_object_set_name (SettingObject* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, setting_object_get_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_name);
		self->priv->_name = _tmp1_;
		g_object_notify ((GObject *) self, "name");
	}
}


const gchar* setting_object_get_full_name (SettingObject* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_full_name;
	result = _tmp0_;
	return result;
}


static void setting_object_set_full_name (SettingObject* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, setting_object_get_full_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_full_name);
		self->priv->_full_name = _tmp1_;
		g_object_notify ((GObject *) self, "full-name");
	}
}


static GObject * setting_object_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	SettingObject * self;
	gchar* _tmp0_ = NULL;
	Directory* _tmp1_;
	parent_class = G_OBJECT_CLASS (setting_object_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SETTING_OBJECT, SettingObject);
	_tmp1_ = self->priv->_nullable_parent;
	if (_tmp1_ == NULL) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("/");
		g_free (_tmp0_);
		_tmp0_ = _tmp2_;
	} else {
		const gchar* _tmp3_ = NULL;
		Directory* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (self, TYPE_DIRECTORY)) {
			_tmp3_ = "/";
		} else {
			_tmp3_ = "";
		}
		_tmp4_ = self->priv->_nullable_parent;
		_tmp5_ = ((SettingObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DIRECTORY, Directory))->priv->_full_name;
		_tmp6_ = self->priv->_name;
		_tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strconcat (_tmp8_, _tmp3_, NULL);
		g_free (_tmp0_);
		_tmp0_ = _tmp9_;
		g_free (_tmp8_);
	}
	setting_object_set_full_name (self, _tmp0_);
	g_free (_tmp0_);
	return obj;
}


static void setting_object_class_init (SettingObjectClass * klass) {
	setting_object_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (SettingObjectPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_setting_object_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_setting_object_set_property;
	G_OBJECT_CLASS (klass)->constructor = setting_object_constructor;
	G_OBJECT_CLASS (klass)->finalize = setting_object_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTING_OBJECT_NULLABLE_PARENT, g_param_spec_object ("nullable-parent", "nullable-parent", "nullable-parent", TYPE_DIRECTORY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTING_OBJECT_PARENT, g_param_spec_object ("parent", "parent", "parent", TYPE_DIRECTORY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTING_OBJECT_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTING_OBJECT_FULL_NAME, g_param_spec_string ("full-name", "full-name", "full-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void setting_object_instance_init (SettingObject * self) {
	self->priv = SETTING_OBJECT_GET_PRIVATE (self);
}


static void setting_object_finalize (GObject * obj) {
	SettingObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SETTING_OBJECT, SettingObject);
	_g_object_unref0 (self->priv->_nullable_parent);
	g_free (self->priv->_name);
	g_free (self->priv->_full_name);
	G_OBJECT_CLASS (setting_object_parent_class)->finalize (obj);
}


GType setting_object_get_type (void) {
	static volatile gsize setting_object_type_id__volatile = 0;
	if (g_once_init_enter (&setting_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SettingObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) setting_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingObject), 0, (GInstanceInitFunc) setting_object_instance_init, NULL };
		GType setting_object_type_id;
		setting_object_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingObject", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&setting_object_type_id__volatile, setting_object_type_id);
	}
	return setting_object_type_id__volatile;
}


static void _vala_setting_object_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	SettingObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SETTING_OBJECT, SettingObject);
	switch (property_id) {
		case SETTING_OBJECT_NULLABLE_PARENT:
		g_value_set_object (value, setting_object_get_nullable_parent (self));
		break;
		case SETTING_OBJECT_PARENT:
		g_value_set_object (value, setting_object_get_parent (self));
		break;
		case SETTING_OBJECT_NAME:
		g_value_set_string (value, setting_object_get_name (self));
		break;
		case SETTING_OBJECT_FULL_NAME:
		g_value_set_string (value, setting_object_get_full_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_setting_object_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	SettingObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SETTING_OBJECT, SettingObject);
	switch (property_id) {
		case SETTING_OBJECT_NULLABLE_PARENT:
		setting_object_set_nullable_parent (self, g_value_get_object (value));
		break;
		case SETTING_OBJECT_NAME:
		setting_object_set_name (self, g_value_get_string (value));
		break;
		case SETTING_OBJECT_FULL_NAME:
		setting_object_set_full_name (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


Directory* directory_construct (GType object_type, Directory* parent, const gchar* name, DConfClient* client) {
	Directory * self = NULL;
	Directory* _tmp0_;
	const gchar* _tmp1_;
	DConfClient* _tmp2_;
	DConfClient* _tmp3_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (client != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = name;
	self = (Directory*) g_object_new (object_type, "nullable-parent", _tmp0_, "name", _tmp1_, NULL);
	_tmp2_ = client;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->client);
	self->priv->client = _tmp3_;
	return self;
}


Directory* directory_new (Directory* parent, const gchar* name, DConfClient* client) {
	return directory_construct (TYPE_DIRECTORY, parent, name, client);
}


static gint __lambda12_ (Directory* self, GObject* a, GObject* b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	GObject* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GObject* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = g_strcmp0;
	_tmp1_ = a;
	_tmp2_ = setting_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SETTING_OBJECT, SettingObject));
	_tmp3_ = _tmp2_;
	_tmp4_ = b;
	_tmp5_ = setting_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SETTING_OBJECT, SettingObject));
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp0_ (_tmp3_, _tmp6_);
	result = _tmp7_;
	return result;
}


static gint ___lambda12__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda12_ ((Directory*) self, (GObject*) a, (GObject*) b);
	return result;
}


static void directory_insert_key (Directory* self, Key* key) {
	GListStore* _tmp0_;
	Key* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	_tmp0_ = self->priv->_key_model;
	_tmp1_ = key;
	g_list_store_insert_sorted (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, g_list_store_get_type (), GListStore), (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SETTING_OBJECT, SettingObject), ___lambda12__gcompare_data_func, self);
}


static gint __lambda14_ (Directory* self, GObject* a, GObject* b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	GObject* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GObject* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = g_strcmp0;
	_tmp1_ = a;
	_tmp2_ = setting_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SETTING_OBJECT, SettingObject));
	_tmp3_ = _tmp2_;
	_tmp4_ = b;
	_tmp5_ = setting_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SETTING_OBJECT, SettingObject));
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp0_ (_tmp3_, _tmp6_);
	result = _tmp7_;
	return result;
}


static gint ___lambda14__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda14_ ((Directory*) self, (GObject*) a, (GObject*) b);
	return result;
}


static void __lambda13_ (Directory* self, Directory* dir) {
	GListStore* _tmp0_;
	Directory* _tmp1_;
	g_return_if_fail (dir != NULL);
	_tmp0_ = self->priv->_key_model;
	_tmp1_ = dir;
	g_list_store_insert_sorted (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, g_list_store_get_type (), GListStore), (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SETTING_OBJECT, SettingObject), ___lambda14__gcompare_data_func, self);
}


static void ___lambda13__gfunc (gconstpointer data, gpointer self) {
	__lambda13_ ((Directory*) self, (Directory*) data);
}


void directory_create_folders (Directory* self) {
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->children;
	g_list_foreach (_tmp0_, ___lambda13__gfunc, self);
}


static gpointer _g_settings_schema_ref0 (gpointer self) {
	return self ? g_settings_schema_ref (self) : NULL;
}


void directory_init_gsettings_keys (Directory* self, GSettingsSchema* _settings_schema) {
	GSettingsSchema* _tmp0_;
	GSettingsSchema* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_settings_schema != NULL);
	_tmp0_ = _settings_schema;
	_tmp1_ = _g_settings_schema_ref0 (_tmp0_);
	_g_settings_schema_unref0 (self->priv->settings_schema);
	self->priv->settings_schema = _tmp1_;
}


static void directory_create_gsettings_keys (Directory* self) {
	GSettingsSchema* _tmp0_;
	GSettingsSchema* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	GSettingsSchema* _tmp4_;
	const gchar* _tmp5_;
	GSettings* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings_schema;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->settings_schema;
	_tmp3_ = _tmp2_ = g_settings_schema_list_keys ((GSettingsSchema*) _tmp1_);
	self->priv->gsettings_key_map = (_vala_array_free (self->priv->gsettings_key_map, self->priv->gsettings_key_map_length1, (GDestroyNotify) g_free), NULL);
	self->priv->gsettings_key_map = _tmp3_;
	self->priv->gsettings_key_map_length1 = _vala_array_length (_tmp2_);
	self->priv->_gsettings_key_map_size_ = self->priv->gsettings_key_map_length1;
	_tmp4_ = self->priv->settings_schema;
	_tmp5_ = g_settings_schema_get_id ((GSettingsSchema*) _tmp4_);
	_tmp6_ = g_settings_new (_tmp5_);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp6_;
	_tmp7_ = self->priv->gsettings_key_map;
	_tmp7__length1 = self->priv->gsettings_key_map_length1;
	{
		gchar** key_id_collection = NULL;
		gint key_id_collection_length1 = 0;
		gint _key_id_collection_size_ = 0;
		gint key_id_it = 0;
		key_id_collection = (gchar**) _tmp7_;
		key_id_collection_length1 = (_tmp7__length1 * sizeof (gchar*)) / sizeof (gchar*);
		for (key_id_it = 0; key_id_it < ((_tmp7__length1 * sizeof (gchar*)) / sizeof (gchar*)); key_id_it = key_id_it + 1) {
			gchar* _tmp8_;
			gchar* key_id = NULL;
			_tmp8_ = g_strdup (key_id_collection[key_id_it]);
			key_id = _tmp8_;
			{
				const gchar* _tmp9_;
				GSettingsSchema* _tmp10_;
				const gchar* _tmp11_;
				GSettingsSchemaKey* _tmp12_;
				GSettingsSchemaKey* _tmp13_;
				_tmp9_ = key_id;
				_tmp10_ = self->priv->settings_schema;
				_tmp11_ = key_id;
				_tmp12_ = g_settings_schema_get_key ((GSettingsSchema*) _tmp10_, _tmp11_);
				_tmp13_ = _tmp12_;
				directory_create_gsettings_key (self, _tmp9_, _tmp13_);
				_g_settings_schema_key_unref0 (_tmp13_);
				g_free (key_id);
			}
		}
	}
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static void directory_create_gsettings_key (Directory* self, const gchar* key_id, GSettingsSchemaKey* settings_schema_key) {
	gchar* range_type;
	GSettingsSchemaKey* _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* type_string = NULL;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GQuark _tmp11_ = 0U;
	static GQuark _tmp10_label0 = 0;
	static GQuark _tmp10_label1 = 0;
	gchar* nullable_summary;
	GSettingsSchemaKey* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* nullable_description;
	GSettingsSchemaKey* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	GVariant* default_value;
	GSettings* _tmp23_;
	const gchar* _tmp24_;
	GVariant* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	GSettingsKey* new_key;
	const gchar* _tmp28_;
	GSettings* _tmp29_;
	GSettings* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GSettingsSchemaKey* _tmp40_;
	GVariant* _tmp41_;
	GVariant* _tmp42_;
	GVariant* _tmp43_;
	GVariant* _tmp44_;
	GVariant* _tmp45_;
	GVariant* _tmp46_;
	GSettingsKey* _tmp47_;
	GSettingsKey* _tmp48_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key_id != NULL);
	g_return_if_fail (settings_schema_key != NULL);
	_tmp0_ = settings_schema_key;
	_tmp1_ = g_settings_schema_key_get_range (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_variant_get_child_value (_tmp2_, (gsize) 0);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_variant_get_string (_tmp4_, NULL);
	_tmp6_ = g_strdup (_tmp5_);
	_tmp7_ = _tmp6_;
	_g_variant_unref0 (_tmp4_);
	_g_variant_unref0 (_tmp2_);
	range_type = _tmp7_;
	_tmp8_ = range_type;
	_tmp9_ = _tmp8_;
	_tmp11_ = (NULL == _tmp9_) ? 0 : g_quark_from_string (_tmp9_);
	if (_tmp11_ == ((0 != _tmp10_label0) ? _tmp10_label0 : (_tmp10_label0 = g_quark_from_static_string ("enum")))) {
		switch (0) {
			default:
			{
				gchar* _tmp12_;
				_tmp12_ = g_strdup ("<enum>");
				g_free (type_string);
				type_string = _tmp12_;
				break;
			}
		}
	} else if (_tmp11_ == ((0 != _tmp10_label1) ? _tmp10_label1 : (_tmp10_label1 = g_quark_from_static_string ("flags")))) {
		switch (0) {
			default:
			{
				gchar* _tmp13_;
				_tmp13_ = g_strdup ("<flags>");
				g_free (type_string);
				type_string = _tmp13_;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				GSettingsSchemaKey* _tmp14_;
				const GVariantType* _tmp15_;
				gchar* _tmp16_;
				_tmp14_ = settings_schema_key;
				_tmp15_ = g_settings_schema_key_get_value_type (_tmp14_);
				_tmp16_ = g_variant_type_dup_string (_tmp15_);
				g_free (type_string);
				type_string = _tmp16_;
				break;
			}
		}
	}
	_tmp17_ = settings_schema_key;
	_tmp18_ = g_settings_schema_key_get_summary (_tmp17_);
	_tmp19_ = g_strdup (_tmp18_);
	nullable_summary = _tmp19_;
	_tmp20_ = settings_schema_key;
	_tmp21_ = g_settings_schema_key_get_description (_tmp20_);
	_tmp22_ = g_strdup (_tmp21_);
	nullable_description = _tmp22_;
	_tmp23_ = self->priv->settings;
	_tmp24_ = key_id;
	_tmp25_ = g_settings_get_default_value (_tmp23_, _tmp24_);
	default_value = _tmp25_;
	if (default_value == NULL) {
		g_assert_not_reached ();
	}
	_tmp26_ = nullable_summary;
	if (_tmp26_ == NULL) {
		_tmp26_ = "";
	}
	_tmp27_ = nullable_description;
	if (_tmp27_ == NULL) {
		_tmp27_ = "";
	}
	_tmp28_ = key_id;
	_tmp29_ = self->priv->settings;
	_tmp30_ = self->priv->settings;
	g_object_get (_tmp30_, "schema-id", &_tmp31_, NULL);
	_tmp32_ = _tmp31_;
	_tmp33_ = _tmp32_;
	_tmp34_ = string_strip ((const gchar*) _tmp26_);
	_tmp35_ = _tmp34_;
	_tmp36_ = string_strip ((const gchar*) _tmp27_);
	_tmp37_ = _tmp36_;
	_tmp38_ = type_string;
	_tmp39_ = range_type;
	_tmp40_ = settings_schema_key;
	_tmp41_ = g_settings_schema_key_get_range (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = g_variant_get_child_value (_tmp42_, (gsize) 1);
	_tmp44_ = _tmp43_;
	_tmp45_ = g_variant_get_child_value (_tmp44_, (gsize) 0);
	_tmp46_ = _tmp45_;
	_tmp47_ = gsettings_key_new (self, _tmp28_, _tmp29_, _tmp33_, _tmp35_, _tmp37_, _tmp38_, (GVariant*) default_value, _tmp39_, _tmp46_);
	_tmp48_ = _tmp47_;
	_g_variant_unref0 (_tmp46_);
	_g_variant_unref0 (_tmp44_);
	_g_variant_unref0 (_tmp42_);
	g_free (_tmp37_);
	g_free (_tmp35_);
	g_free (_tmp33_);
	new_key = _tmp48_;
	directory_insert_key (self, (Key*) new_key);
	_g_object_unref0 (new_key);
	_g_variant_unref0 (default_value);
	g_free (nullable_description);
	g_free (nullable_summary);
	g_free (type_string);
	g_free (range_type);
}


static void directory_dconf_client_change (Directory* self, DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag) {
	gchar** _tmp0_;
	gint _tmp0__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (client != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = items;
	_tmp0__length1 = items_length1;
	{
		gchar** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp0_;
		item_collection_length1 = _tmp0__length1;
		for (item_it = 0; item_it < _tmp0__length1; item_it = item_it + 1) {
			gchar* _tmp1_;
			gchar* item = NULL;
			_tmp1_ = g_strdup (item_collection[item_it]);
			item = _tmp1_;
			{
				const gchar* _tmp2_;
				const gchar* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				_tmp2_ = path;
				_tmp3_ = item;
				_tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
				_tmp5_ = _tmp4_;
				g_signal_emit (self, directory_signals[DIRECTORY_ITEM_CHANGED_SIGNAL], 0, _tmp5_);
				g_free (_tmp5_);
				g_free (item);
			}
		}
	}
}


static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


static void _directory_dconf_client_change_dconf_client_changed (DConfClient* _sender, const gchar* prefix, gchar** changes, const gchar* tag, gpointer self) {
	directory_dconf_client_change ((Directory*) self, _sender, prefix, changes, _vala_array_length (changes), tag);
}


static void directory_create_dconf_keys (Directory* self) {
	DConfClient* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gchar** _tmp4_;
	DConfClient* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->client;
	_tmp1_ = setting_object_get_full_name ((SettingObject*) self);
	_tmp2_ = _tmp1_;
	_tmp4_ = dconf_client_list (_tmp0_, _tmp2_, &_tmp3_);
	{
		gchar** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp4_;
		item_collection_length1 = _tmp3_;
		for (item_it = 0; item_it < _tmp3_; item_it = item_it + 1) {
			gchar* _tmp5_;
			gchar* item = NULL;
			_tmp5_ = g_strdup (item_collection[item_it]);
			item = _tmp5_;
			{
				gboolean _tmp6_ = FALSE;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gboolean _tmp12_;
				gboolean _tmp13_;
				_tmp7_ = setting_object_get_full_name ((SettingObject*) self);
				_tmp8_ = _tmp7_;
				_tmp9_ = item;
				_tmp10_ = g_strconcat (_tmp8_, _tmp9_, NULL);
				_tmp11_ = _tmp10_;
				_tmp12_ = dconf_is_key (_tmp11_, NULL);
				_tmp13_ = _tmp12_;
				g_free (_tmp11_);
				if (_tmp13_) {
					gboolean _tmp14_ = FALSE;
					GSettingsSchema* _tmp15_;
					_tmp15_ = self->priv->settings_schema;
					if (_tmp15_ == NULL) {
						_tmp14_ = TRUE;
					} else {
						const gchar* _tmp16_;
						gchar** _tmp17_;
						gint _tmp17__length1;
						_tmp16_ = item;
						_tmp17_ = self->priv->gsettings_key_map;
						_tmp17__length1 = self->priv->gsettings_key_map_length1;
						_tmp14_ = !_vala_string_array_contains (_tmp17_, _tmp17__length1, _tmp16_);
					}
					_tmp6_ = _tmp14_;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					const gchar* _tmp18_;
					_tmp18_ = item;
					directory_create_dconf_key (self, _tmp18_);
				}
				g_free (item);
			}
		}
		item_collection = (_vala_array_free (item_collection, item_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp19_ = self->priv->client;
	g_signal_connect_object (_tmp19_, "changed", (GCallback) _directory_dconf_client_change_dconf_client_changed, self, 0);
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		Directory* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->new_key);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void __lambda16_ (Block3Data* _data3_, const gchar* item) {
	Directory* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	self = _data3_->self;
	g_return_if_fail (item != NULL);
	_tmp2_ = item;
	_tmp3_ = g_str_has_suffix (_tmp2_, "/");
	if (_tmp3_) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gboolean _tmp7_;
		_tmp4_ = setting_object_get_full_name ((SettingObject*) _data3_->new_key);
		_tmp5_ = _tmp4_;
		_tmp6_ = item;
		_tmp7_ = g_str_has_prefix (_tmp5_, _tmp6_);
		_tmp1_ = _tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp8_ = item;
		_tmp9_ = setting_object_get_full_name ((SettingObject*) _data3_->new_key);
		_tmp10_ = _tmp9_;
		_tmp0_ = g_strcmp0 (_tmp8_, _tmp10_) == 0;
	}
	if (_tmp0_) {
		DConfClient* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		GVariant* _tmp14_;
		GVariant* _tmp15_;
		_tmp11_ = self->priv->client;
		_tmp12_ = setting_object_get_full_name ((SettingObject*) _data3_->new_key);
		_tmp13_ = _tmp12_;
		_tmp14_ = dconf_client_read (_tmp11_, _tmp13_);
		_tmp15_ = _tmp14_;
		dconf_key_set_is_ghost (_data3_->new_key, _tmp15_ == NULL);
		_g_variant_unref0 (_tmp15_);
		g_signal_emit ((Key*) _data3_->new_key, key_signals[KEY_VALUE_CHANGED_SIGNAL], 0);
	}
}


static void ___lambda16__directory_item_changed (Directory* _sender, const gchar* item, gpointer self) {
	__lambda16_ (self, item);
}


static void directory_create_dconf_key (Directory* self, const gchar* key_id) {
	Block3Data* _data3_;
	DConfClient* _tmp0_;
	const gchar* _tmp1_;
	DConfKey* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key_id != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = self->priv->client;
	_tmp1_ = key_id;
	_tmp2_ = dconf_key_new (_tmp0_, self, _tmp1_);
	_data3_->new_key = _tmp2_;
	g_signal_connect_data (self, "item-changed", (GCallback) ___lambda16__directory_item_changed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	directory_insert_key (self, G_TYPE_CHECK_INSTANCE_CAST (_data3_->new_key, TYPE_KEY, Key));
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


gint directory_get_index (Directory* self) {
	gint result;
	Directory* _tmp0_;
	Directory* _tmp1_;
	GList* _tmp2_;
	gint _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = setting_object_get_parent ((SettingObject*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->children;
	_tmp3_ = g_list_index (_tmp2_, self);
	result = _tmp3_;
	return result;
}


GListStore* directory_get_key_model (Directory* self) {
	GListStore* result;
	GListStore* _tmp0_;
	GListStore* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key_model;
	if (_tmp0_ == NULL) {
		GListStore* _tmp1_;
		_tmp1_ = g_list_store_new (TYPE_SETTING_OBJECT);
		_g_object_unref0 (self->priv->_key_model);
		self->priv->_key_model = _tmp1_;
		directory_create_folders (self);
		directory_create_gsettings_keys (self);
		directory_create_dconf_keys (self);
	}
	_tmp2_ = self->priv->_key_model;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, g_list_store_get_type (), GListStore);
	return result;
}


static void directory_class_init (DirectoryClass * klass) {
	directory_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DirectoryPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_directory_get_property;
	G_OBJECT_CLASS (klass)->finalize = directory_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_INDEX, g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_KEY_MODEL, g_param_spec_object ("key-model", "key-model", "key-model", g_list_store_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	directory_signals[DIRECTORY_ITEM_CHANGED_SIGNAL] = g_signal_new ("item_changed", TYPE_DIRECTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}


static void directory_instance_init (Directory * self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	self->priv = DIRECTORY_GET_PRIVATE (self);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, g_free, _g_object_unref0_);
	self->child_map = _tmp2_;
	self->children = NULL;
	self->priv->settings_schema = NULL;
	self->priv->gsettings_key_map = NULL;
	self->priv->gsettings_key_map_length1 = 0;
	self->priv->_gsettings_key_map_size_ = self->priv->gsettings_key_map_length1;
	self->priv->_key_model = NULL;
}


static void directory_finalize (GObject * obj) {
	Directory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECTORY, Directory);
	_g_hash_table_unref0 (self->child_map);
	__g_list_free__g_object_unref0_0 (self->children);
	_g_settings_schema_unref0 (self->priv->settings_schema);
	self->priv->gsettings_key_map = (_vala_array_free (self->priv->gsettings_key_map, self->priv->gsettings_key_map_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->client);
	_g_object_unref0 (self->priv->_key_model);
	G_OBJECT_CLASS (directory_parent_class)->finalize (obj);
}


GType directory_get_type (void) {
	static volatile gsize directory_type_id__volatile = 0;
	if (g_once_init_enter (&directory_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DirectoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) directory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Directory), 0, (GInstanceInitFunc) directory_instance_init, NULL };
		GType directory_type_id;
		directory_type_id = g_type_register_static (TYPE_SETTING_OBJECT, "Directory", &g_define_type_info, 0);
		g_once_init_leave (&directory_type_id__volatile, directory_type_id);
	}
	return directory_type_id__volatile;
}


static void _vala_directory_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Directory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DIRECTORY, Directory);
	switch (property_id) {
		case DIRECTORY_INDEX:
		g_value_set_int (value, directory_get_index (self));
		break;
		case DIRECTORY_KEY_MODEL:
		g_value_set_object (value, directory_get_key_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


gchar* key_key_to_description (const gchar* type) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	static GQuark _tmp2_label9 = 0;
	static GQuark _tmp2_label10 = 0;
	static GQuark _tmp2_label11 = 0;
	static GQuark _tmp2_label12 = 0;
	static GQuark _tmp2_label13 = 0;
	static GQuark _tmp2_label14 = 0;
	static GQuark _tmp2_label15 = 0;
	static GQuark _tmp2_label16 = 0;
	g_return_val_if_fail (type != NULL, NULL);
	_tmp0_ = type;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("b")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup (_ ("Boolean"));
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("s")))) {
		switch (0) {
			default:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup (_ ("String"));
				result = _tmp5_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("as")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup (_ ("String array"));
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("<enum>")))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup (_ ("Enumeration"));
				result = _tmp7_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("<flags>")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup (_ ("Flags"));
				result = _tmp8_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("d")))) {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup (_ ("Double"));
				result = _tmp9_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				gchar* _tmp10_;
				_tmp10_ = g_strdup (_ ("D-Bus handle type"));
				result = _tmp10_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("o")))) {
		switch (0) {
			default:
			{
				gchar* _tmp11_;
				_tmp11_ = g_strdup (_ ("D-Bus object path"));
				result = _tmp11_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("ao")))) {
		switch (0) {
			default:
			{
				gchar* _tmp12_;
				_tmp12_ = g_strdup (_ ("D-Bus object path array"));
				result = _tmp12_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("g")))) {
		switch (0) {
			default:
			{
				gchar* _tmp13_;
				_tmp13_ = g_strdup (_ ("D-Bus signature"));
				result = _tmp13_;
				return result;
			}
		}
	} else if (((((((_tmp3_ == ((0 != _tmp2_label10) ? _tmp2_label10 : (_tmp2_label10 = g_quark_from_static_string ("y")))) || (_tmp3_ == ((0 != _tmp2_label11) ? _tmp2_label11 : (_tmp2_label11 = g_quark_from_static_string ("n"))))) || (_tmp3_ == ((0 != _tmp2_label12) ? _tmp2_label12 : (_tmp2_label12 = g_quark_from_static_string ("q"))))) || (_tmp3_ == ((0 != _tmp2_label13) ? _tmp2_label13 : (_tmp2_label13 = g_quark_from_static_string ("i"))))) || (_tmp3_ == ((0 != _tmp2_label14) ? _tmp2_label14 : (_tmp2_label14 = g_quark_from_static_string ("u"))))) || (_tmp3_ == ((0 != _tmp2_label15) ? _tmp2_label15 : (_tmp2_label15 = g_quark_from_static_string ("x"))))) || (_tmp3_ == ((0 != _tmp2_label16) ? _tmp2_label16 : (_tmp2_label16 = g_quark_from_static_string ("t"))))) {
		switch (0) {
			default:
			{
				gchar* _tmp14_;
				_tmp14_ = g_strdup (_ ("Integer"));
				result = _tmp14_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp15_;
				gchar* _tmp16_;
				_tmp15_ = type;
				_tmp16_ = g_strdup (_tmp15_);
				result = _tmp16_;
				return result;
			}
		}
	}
}


static gchar* double_to_string (gdouble self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}


void key_get_min_and_max_string (gchar* * min, gchar* * max, const gchar* type_string) {
	gchar* _vala_min = NULL;
	gchar* _vala_max = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	g_return_if_fail (type_string != NULL);
	_tmp0_ = type_string;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				gchar* _tmp5_;
				_tmp4_ = g_strdup_printf ("%hhu", (guchar) 0U);
				g_free (_vala_min);
				_vala_min = _tmp4_;
				_tmp5_ = g_strdup_printf ("%hhu", (guchar) G_MAXUINT8);
				g_free (_vala_max);
				_vala_max = _tmp5_;
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				gchar* nullable_max;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				const gchar* _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp18_;
				gchar* _tmp19_;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp23_;
				_tmp6_ = g_strdup_printf ("%'hi", G_MININT16);
				_tmp7_ = _tmp6_;
				_tmp8_ = g_locale_to_utf8 (_tmp7_, (gssize) -1, NULL, NULL, NULL);
				_tmp9_ = _tmp8_;
				g_free (_tmp7_);
				nullable_min = _tmp9_;
				_tmp10_ = g_strdup_printf ("%'hi", G_MAXINT16);
				_tmp11_ = _tmp10_;
				_tmp12_ = g_locale_to_utf8 (_tmp11_, (gssize) -1, NULL, NULL, NULL);
				_tmp13_ = _tmp12_;
				g_free (_tmp11_);
				nullable_max = _tmp13_;
				_tmp15_ = nullable_min;
				_tmp16_ = g_strdup (_tmp15_);
				_tmp14_ = _tmp16_;
				if (_tmp14_ == NULL) {
					gchar* _tmp17_;
					_tmp17_ = g_strdup_printf ("%hi", (gshort) G_MININT16);
					g_free (_tmp14_);
					_tmp14_ = _tmp17_;
				}
				_tmp18_ = _tmp14_;
				_tmp14_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp18_;
				_tmp20_ = nullable_max;
				_tmp21_ = g_strdup (_tmp20_);
				_tmp19_ = _tmp21_;
				if (_tmp19_ == NULL) {
					gchar* _tmp22_;
					_tmp22_ = g_strdup_printf ("%hi", (gshort) G_MAXINT16);
					g_free (_tmp19_);
					_tmp19_ = _tmp22_;
				}
				_tmp23_ = _tmp19_;
				_tmp19_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp23_;
				g_free (_tmp19_);
				g_free (_tmp14_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp24_;
				gchar* _tmp25_;
				gchar* _tmp26_;
				gchar* _tmp27_;
				gchar* nullable_max;
				gchar* _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				const gchar* _tmp33_;
				gchar* _tmp34_;
				gchar* _tmp36_;
				gchar* _tmp37_;
				const gchar* _tmp38_;
				gchar* _tmp39_;
				gchar* _tmp41_;
				_tmp24_ = g_strdup_printf ("%'hu", 0U);
				_tmp25_ = _tmp24_;
				_tmp26_ = g_locale_to_utf8 (_tmp25_, (gssize) -1, NULL, NULL, NULL);
				_tmp27_ = _tmp26_;
				g_free (_tmp25_);
				nullable_min = _tmp27_;
				_tmp28_ = g_strdup_printf ("%'hu", G_MAXUINT16);
				_tmp29_ = _tmp28_;
				_tmp30_ = g_locale_to_utf8 (_tmp29_, (gssize) -1, NULL, NULL, NULL);
				_tmp31_ = _tmp30_;
				g_free (_tmp29_);
				nullable_max = _tmp31_;
				_tmp33_ = nullable_min;
				_tmp34_ = g_strdup (_tmp33_);
				_tmp32_ = _tmp34_;
				if (_tmp32_ == NULL) {
					gchar* _tmp35_;
					_tmp35_ = g_strdup_printf ("%hu", (gushort) 0U);
					g_free (_tmp32_);
					_tmp32_ = _tmp35_;
				}
				_tmp36_ = _tmp32_;
				_tmp32_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp36_;
				_tmp38_ = nullable_max;
				_tmp39_ = g_strdup (_tmp38_);
				_tmp37_ = _tmp39_;
				if (_tmp37_ == NULL) {
					gchar* _tmp40_;
					_tmp40_ = g_strdup_printf ("%hu", (gushort) G_MAXUINT16);
					g_free (_tmp37_);
					_tmp37_ = _tmp40_;
				}
				_tmp41_ = _tmp37_;
				_tmp37_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp41_;
				g_free (_tmp37_);
				g_free (_tmp32_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				gchar* nullable_max;
				gchar* _tmp46_;
				gchar* _tmp47_;
				gchar* _tmp48_;
				gchar* _tmp49_;
				gchar* _tmp50_;
				const gchar* _tmp51_;
				gchar* _tmp52_;
				gchar* _tmp54_;
				gchar* _tmp55_;
				const gchar* _tmp56_;
				gchar* _tmp57_;
				gchar* _tmp59_;
				_tmp42_ = g_strdup_printf ("%'i", G_MININT32);
				_tmp43_ = _tmp42_;
				_tmp44_ = g_locale_to_utf8 (_tmp43_, (gssize) -1, NULL, NULL, NULL);
				_tmp45_ = _tmp44_;
				g_free (_tmp43_);
				nullable_min = _tmp45_;
				_tmp46_ = g_strdup_printf ("%'i", G_MAXINT32);
				_tmp47_ = _tmp46_;
				_tmp48_ = g_locale_to_utf8 (_tmp47_, (gssize) -1, NULL, NULL, NULL);
				_tmp49_ = _tmp48_;
				g_free (_tmp47_);
				nullable_max = _tmp49_;
				_tmp51_ = nullable_min;
				_tmp52_ = g_strdup (_tmp51_);
				_tmp50_ = _tmp52_;
				if (_tmp50_ == NULL) {
					gchar* _tmp53_;
					_tmp53_ = g_strdup_printf ("%i", (gint) G_MININT32);
					g_free (_tmp50_);
					_tmp50_ = _tmp53_;
				}
				_tmp54_ = _tmp50_;
				_tmp50_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp54_;
				_tmp56_ = nullable_max;
				_tmp57_ = g_strdup (_tmp56_);
				_tmp55_ = _tmp57_;
				if (_tmp55_ == NULL) {
					gchar* _tmp58_;
					_tmp58_ = g_strdup_printf ("%i", (gint) G_MAXINT32);
					g_free (_tmp55_);
					_tmp55_ = _tmp58_;
				}
				_tmp59_ = _tmp55_;
				_tmp55_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp59_;
				g_free (_tmp55_);
				g_free (_tmp50_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp60_;
				gchar* _tmp61_;
				gchar* _tmp62_;
				gchar* _tmp63_;
				gchar* nullable_max;
				gchar* _tmp64_;
				gchar* _tmp65_;
				gchar* _tmp66_;
				gchar* _tmp67_;
				gchar* _tmp68_;
				const gchar* _tmp69_;
				gchar* _tmp70_;
				gchar* _tmp72_;
				gchar* _tmp73_;
				const gchar* _tmp74_;
				gchar* _tmp75_;
				gchar* _tmp77_;
				_tmp60_ = g_strdup_printf ("%'u", 0U);
				_tmp61_ = _tmp60_;
				_tmp62_ = g_locale_to_utf8 (_tmp61_, (gssize) -1, NULL, NULL, NULL);
				_tmp63_ = _tmp62_;
				g_free (_tmp61_);
				nullable_min = _tmp63_;
				_tmp64_ = g_strdup_printf ("%'u", G_MAXUINT32);
				_tmp65_ = _tmp64_;
				_tmp66_ = g_locale_to_utf8 (_tmp65_, (gssize) -1, NULL, NULL, NULL);
				_tmp67_ = _tmp66_;
				g_free (_tmp65_);
				nullable_max = _tmp67_;
				_tmp69_ = nullable_min;
				_tmp70_ = g_strdup (_tmp69_);
				_tmp68_ = _tmp70_;
				if (_tmp68_ == NULL) {
					gchar* _tmp71_;
					_tmp71_ = g_strdup_printf ("%u", (guint) 0U);
					g_free (_tmp68_);
					_tmp68_ = _tmp71_;
				}
				_tmp72_ = _tmp68_;
				_tmp68_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp72_;
				_tmp74_ = nullable_max;
				_tmp75_ = g_strdup (_tmp74_);
				_tmp73_ = _tmp75_;
				if (_tmp73_ == NULL) {
					gchar* _tmp76_;
					_tmp76_ = g_strdup_printf ("%u", (guint) G_MAXUINT32);
					g_free (_tmp73_);
					_tmp73_ = _tmp76_;
				}
				_tmp77_ = _tmp73_;
				_tmp73_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp77_;
				g_free (_tmp73_);
				g_free (_tmp68_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("x")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp78_;
				gchar* _tmp79_;
				gchar* _tmp80_;
				gchar* _tmp81_;
				gchar* nullable_max;
				gchar* _tmp82_;
				gchar* _tmp83_;
				gchar* _tmp84_;
				gchar* _tmp85_;
				gchar* _tmp86_;
				const gchar* _tmp87_;
				gchar* _tmp88_;
				gchar* _tmp90_;
				gchar* _tmp91_;
				const gchar* _tmp92_;
				gchar* _tmp93_;
				gchar* _tmp95_;
				_tmp78_ = g_strdup_printf ("%'lli", G_MININT64);
				_tmp79_ = _tmp78_;
				_tmp80_ = g_locale_to_utf8 (_tmp79_, (gssize) -1, NULL, NULL, NULL);
				_tmp81_ = _tmp80_;
				g_free (_tmp79_);
				nullable_min = _tmp81_;
				_tmp82_ = g_strdup_printf ("%'lli", G_MAXINT64);
				_tmp83_ = _tmp82_;
				_tmp84_ = g_locale_to_utf8 (_tmp83_, (gssize) -1, NULL, NULL, NULL);
				_tmp85_ = _tmp84_;
				g_free (_tmp83_);
				nullable_max = _tmp85_;
				_tmp87_ = nullable_min;
				_tmp88_ = g_strdup (_tmp87_);
				_tmp86_ = _tmp88_;
				if (_tmp86_ == NULL) {
					gchar* _tmp89_;
					_tmp89_ = g_strdup_printf ("%lli", G_MININT64);
					g_free (_tmp86_);
					_tmp86_ = _tmp89_;
				}
				_tmp90_ = _tmp86_;
				_tmp86_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp90_;
				_tmp92_ = nullable_max;
				_tmp93_ = g_strdup (_tmp92_);
				_tmp91_ = _tmp93_;
				if (_tmp91_ == NULL) {
					gchar* _tmp94_;
					_tmp94_ = g_strdup_printf ("%lli", G_MAXINT64);
					g_free (_tmp91_);
					_tmp91_ = _tmp94_;
				}
				_tmp95_ = _tmp91_;
				_tmp91_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp95_;
				g_free (_tmp91_);
				g_free (_tmp86_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("t")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp96_;
				gchar* _tmp97_;
				gchar* _tmp98_;
				gchar* _tmp99_;
				gchar* nullable_max;
				gchar* _tmp100_;
				gchar* _tmp101_;
				gchar* _tmp102_;
				gchar* _tmp103_;
				gchar* _tmp104_;
				const gchar* _tmp105_;
				gchar* _tmp106_;
				gchar* _tmp108_;
				gchar* _tmp109_;
				const gchar* _tmp110_;
				gchar* _tmp111_;
				gchar* _tmp113_;
				_tmp96_ = g_strdup_printf ("%'llu", 0ULL);
				_tmp97_ = _tmp96_;
				_tmp98_ = g_locale_to_utf8 (_tmp97_, (gssize) -1, NULL, NULL, NULL);
				_tmp99_ = _tmp98_;
				g_free (_tmp97_);
				nullable_min = _tmp99_;
				_tmp100_ = g_strdup_printf ("%'llu", G_MAXUINT64);
				_tmp101_ = _tmp100_;
				_tmp102_ = g_locale_to_utf8 (_tmp101_, (gssize) -1, NULL, NULL, NULL);
				_tmp103_ = _tmp102_;
				g_free (_tmp101_);
				nullable_max = _tmp103_;
				_tmp105_ = nullable_min;
				_tmp106_ = g_strdup (_tmp105_);
				_tmp104_ = _tmp106_;
				if (_tmp104_ == NULL) {
					gchar* _tmp107_;
					_tmp107_ = g_strdup_printf ("%llu", 0ULL);
					g_free (_tmp104_);
					_tmp104_ = _tmp107_;
				}
				_tmp108_ = _tmp104_;
				_tmp104_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp108_;
				_tmp110_ = nullable_max;
				_tmp111_ = g_strdup (_tmp110_);
				_tmp109_ = _tmp111_;
				if (_tmp109_ == NULL) {
					gchar* _tmp112_;
					_tmp112_ = g_strdup_printf ("%llu", G_MAXUINT64);
					g_free (_tmp109_);
					_tmp109_ = _tmp112_;
				}
				_tmp113_ = _tmp109_;
				_tmp109_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp113_;
				g_free (_tmp109_);
				g_free (_tmp104_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("d")))) {
		switch (0) {
			default:
			{
				gchar* _tmp114_;
				gchar* _tmp115_;
				_tmp114_ = double_to_string (DBL_MIN);
				g_free (_vala_min);
				_vala_min = _tmp114_;
				_tmp115_ = double_to_string (DBL_MAX);
				g_free (_vala_max);
				_vala_max = _tmp115_;
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				gchar* nullable_min;
				gchar* _tmp116_;
				gchar* _tmp117_;
				gchar* _tmp118_;
				gchar* _tmp119_;
				gchar* nullable_max;
				gchar* _tmp120_;
				gchar* _tmp121_;
				gchar* _tmp122_;
				gchar* _tmp123_;
				gchar* _tmp124_;
				const gchar* _tmp125_;
				gchar* _tmp126_;
				gchar* _tmp128_;
				gchar* _tmp129_;
				const gchar* _tmp130_;
				gchar* _tmp131_;
				gchar* _tmp133_;
				_tmp116_ = g_strdup_printf ("%'i", G_MININT32);
				_tmp117_ = _tmp116_;
				_tmp118_ = g_locale_to_utf8 (_tmp117_, (gssize) -1, NULL, NULL, NULL);
				_tmp119_ = _tmp118_;
				g_free (_tmp117_);
				nullable_min = _tmp119_;
				_tmp120_ = g_strdup_printf ("%'i", G_MAXINT32);
				_tmp121_ = _tmp120_;
				_tmp122_ = g_locale_to_utf8 (_tmp121_, (gssize) -1, NULL, NULL, NULL);
				_tmp123_ = _tmp122_;
				g_free (_tmp121_);
				nullable_max = _tmp123_;
				_tmp125_ = nullable_min;
				_tmp126_ = g_strdup (_tmp125_);
				_tmp124_ = _tmp126_;
				if (_tmp124_ == NULL) {
					gchar* _tmp127_;
					_tmp127_ = g_strdup_printf ("%i", (gint) G_MININT32);
					g_free (_tmp124_);
					_tmp124_ = _tmp127_;
				}
				_tmp128_ = _tmp124_;
				_tmp124_ = NULL;
				g_free (_vala_min);
				_vala_min = (gchar*) _tmp128_;
				_tmp130_ = nullable_max;
				_tmp131_ = g_strdup (_tmp130_);
				_tmp129_ = _tmp131_;
				if (_tmp129_ == NULL) {
					gchar* _tmp132_;
					_tmp132_ = g_strdup_printf ("%i", (gint) G_MAXINT32);
					g_free (_tmp129_);
					_tmp129_ = _tmp132_;
				}
				_tmp133_ = _tmp129_;
				_tmp129_ = NULL;
				g_free (_vala_max);
				_vala_max = (gchar*) _tmp133_;
				g_free (_tmp129_);
				g_free (_tmp124_);
				g_free (nullable_max);
				g_free (nullable_min);
				if (min) {
					*min = _vala_min;
				} else {
					g_free (_vala_min);
				}
				if (max) {
					*max = _vala_max;
				} else {
					g_free (_vala_max);
				}
				return;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_assert_not_reached ();
			}
		}
	}
	if (min) {
		*min = _vala_min;
	} else {
		g_free (_vala_min);
	}
	if (max) {
		*max = _vala_max;
	} else {
		g_free (_vala_max);
	}
}


gchar* key_cool_text_value_from_variant (GVariant* variant, const gchar* type) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	static GQuark _tmp2_label9 = 0;
	const gchar* _tmp108_;
	gboolean _tmp109_;
	GVariant* _tmp118_;
	gchar* _tmp119_;
	g_return_val_if_fail (variant != NULL, NULL);
	g_return_val_if_fail (type != NULL, NULL);
	_tmp0_ = type;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("b")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp4_;
				gboolean _tmp5_;
				gchar* _tmp6_;
				_tmp4_ = variant;
				_tmp5_ = g_variant_get_boolean (_tmp4_);
				_tmp6_ = key_cool_boolean_text_value (&_tmp5_, FALSE);
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp7_;
				guint8 _tmp8_;
				GVariant* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp7_ = variant;
				_tmp8_ = g_variant_get_byte (_tmp7_);
				_tmp9_ = variant;
				_tmp10_ = g_variant_print (_tmp9_, FALSE);
				_tmp11_ = _tmp10_;
				_tmp12_ = g_strdup_printf ("%hhu (%s)", (guchar) _tmp8_, _tmp11_);
				_tmp13_ = _tmp12_;
				g_free (_tmp11_);
				result = _tmp13_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp14_;
				gint16 _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				gchar* _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				gchar* _tmp26_;
				_tmp14_ = variant;
				_tmp15_ = g_variant_get_int16 (_tmp14_);
				_tmp16_ = g_strdup_printf ("%'hi", _tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = g_locale_to_utf8 (_tmp17_, (gssize) -1, NULL, NULL, NULL);
				_tmp19_ = _tmp18_;
				g_free (_tmp17_);
				nullable_text = _tmp19_;
				_tmp21_ = nullable_text;
				_tmp22_ = g_strdup (_tmp21_);
				_tmp20_ = _tmp22_;
				if (_tmp20_ == NULL) {
					GVariant* _tmp23_;
					gint16 _tmp24_;
					gchar* _tmp25_;
					_tmp23_ = variant;
					_tmp24_ = g_variant_get_int16 (_tmp23_);
					_tmp25_ = g_strdup_printf ("%hi", (gshort) _tmp24_);
					g_free (_tmp20_);
					_tmp20_ = _tmp25_;
				}
				_tmp26_ = _tmp20_;
				_tmp20_ = NULL;
				result = (gchar*) _tmp26_;
				g_free (_tmp20_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp27_;
				guint16 _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				gchar* _tmp33_;
				const gchar* _tmp34_;
				gchar* _tmp35_;
				gchar* _tmp39_;
				_tmp27_ = variant;
				_tmp28_ = g_variant_get_uint16 (_tmp27_);
				_tmp29_ = g_strdup_printf ("%'hu", _tmp28_);
				_tmp30_ = _tmp29_;
				_tmp31_ = g_locale_to_utf8 (_tmp30_, (gssize) -1, NULL, NULL, NULL);
				_tmp32_ = _tmp31_;
				g_free (_tmp30_);
				nullable_text = _tmp32_;
				_tmp34_ = nullable_text;
				_tmp35_ = g_strdup (_tmp34_);
				_tmp33_ = _tmp35_;
				if (_tmp33_ == NULL) {
					GVariant* _tmp36_;
					guint16 _tmp37_;
					gchar* _tmp38_;
					_tmp36_ = variant;
					_tmp37_ = g_variant_get_uint16 (_tmp36_);
					_tmp38_ = g_strdup_printf ("%hu", (gushort) _tmp37_);
					g_free (_tmp33_);
					_tmp33_ = _tmp38_;
				}
				_tmp39_ = _tmp33_;
				_tmp33_ = NULL;
				result = (gchar*) _tmp39_;
				g_free (_tmp33_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp40_;
				gint32 _tmp41_;
				gchar* _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				gchar* _tmp46_;
				const gchar* _tmp47_;
				gchar* _tmp48_;
				gchar* _tmp52_;
				_tmp40_ = variant;
				_tmp41_ = g_variant_get_int32 (_tmp40_);
				_tmp42_ = g_strdup_printf ("%'i", _tmp41_);
				_tmp43_ = _tmp42_;
				_tmp44_ = g_locale_to_utf8 (_tmp43_, (gssize) -1, NULL, NULL, NULL);
				_tmp45_ = _tmp44_;
				g_free (_tmp43_);
				nullable_text = _tmp45_;
				_tmp47_ = nullable_text;
				_tmp48_ = g_strdup (_tmp47_);
				_tmp46_ = _tmp48_;
				if (_tmp46_ == NULL) {
					GVariant* _tmp49_;
					gint32 _tmp50_;
					gchar* _tmp51_;
					_tmp49_ = variant;
					_tmp50_ = g_variant_get_int32 (_tmp49_);
					_tmp51_ = g_strdup_printf ("%i", (gint) _tmp50_);
					g_free (_tmp46_);
					_tmp46_ = _tmp51_;
				}
				_tmp52_ = _tmp46_;
				_tmp46_ = NULL;
				result = (gchar*) _tmp52_;
				g_free (_tmp46_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp53_;
				guint32 _tmp54_;
				gchar* _tmp55_;
				gchar* _tmp56_;
				gchar* _tmp57_;
				gchar* _tmp58_;
				gchar* _tmp59_;
				const gchar* _tmp60_;
				gchar* _tmp61_;
				gchar* _tmp65_;
				_tmp53_ = variant;
				_tmp54_ = g_variant_get_uint32 (_tmp53_);
				_tmp55_ = g_strdup_printf ("%'u", _tmp54_);
				_tmp56_ = _tmp55_;
				_tmp57_ = g_locale_to_utf8 (_tmp56_, (gssize) -1, NULL, NULL, NULL);
				_tmp58_ = _tmp57_;
				g_free (_tmp56_);
				nullable_text = _tmp58_;
				_tmp60_ = nullable_text;
				_tmp61_ = g_strdup (_tmp60_);
				_tmp59_ = _tmp61_;
				if (_tmp59_ == NULL) {
					GVariant* _tmp62_;
					guint32 _tmp63_;
					gchar* _tmp64_;
					_tmp62_ = variant;
					_tmp63_ = g_variant_get_uint32 (_tmp62_);
					_tmp64_ = g_strdup_printf ("%u", (guint) _tmp63_);
					g_free (_tmp59_);
					_tmp59_ = _tmp64_;
				}
				_tmp65_ = _tmp59_;
				_tmp59_ = NULL;
				result = (gchar*) _tmp65_;
				g_free (_tmp59_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("x")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp66_;
				gint64 _tmp67_;
				gchar* _tmp68_;
				gchar* _tmp69_;
				gchar* _tmp70_;
				gchar* _tmp71_;
				gchar* _tmp72_;
				const gchar* _tmp73_;
				gchar* _tmp74_;
				gchar* _tmp78_;
				_tmp66_ = variant;
				_tmp67_ = g_variant_get_int64 (_tmp66_);
				_tmp68_ = g_strdup_printf ("%'lli", _tmp67_);
				_tmp69_ = _tmp68_;
				_tmp70_ = g_locale_to_utf8 (_tmp69_, (gssize) -1, NULL, NULL, NULL);
				_tmp71_ = _tmp70_;
				g_free (_tmp69_);
				nullable_text = _tmp71_;
				_tmp73_ = nullable_text;
				_tmp74_ = g_strdup (_tmp73_);
				_tmp72_ = _tmp74_;
				if (_tmp72_ == NULL) {
					GVariant* _tmp75_;
					gint64 _tmp76_;
					gchar* _tmp77_;
					_tmp75_ = variant;
					_tmp76_ = g_variant_get_int64 (_tmp75_);
					_tmp77_ = g_strdup_printf ("%lli", _tmp76_);
					g_free (_tmp72_);
					_tmp72_ = _tmp77_;
				}
				_tmp78_ = _tmp72_;
				_tmp72_ = NULL;
				result = (gchar*) _tmp78_;
				g_free (_tmp72_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("t")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp79_;
				guint64 _tmp80_;
				gchar* _tmp81_;
				gchar* _tmp82_;
				gchar* _tmp83_;
				gchar* _tmp84_;
				gchar* _tmp85_;
				const gchar* _tmp86_;
				gchar* _tmp87_;
				gchar* _tmp91_;
				_tmp79_ = variant;
				_tmp80_ = g_variant_get_uint64 (_tmp79_);
				_tmp81_ = g_strdup_printf ("%'llu", _tmp80_);
				_tmp82_ = _tmp81_;
				_tmp83_ = g_locale_to_utf8 (_tmp82_, (gssize) -1, NULL, NULL, NULL);
				_tmp84_ = _tmp83_;
				g_free (_tmp82_);
				nullable_text = _tmp84_;
				_tmp86_ = nullable_text;
				_tmp87_ = g_strdup (_tmp86_);
				_tmp85_ = _tmp87_;
				if (_tmp85_ == NULL) {
					GVariant* _tmp88_;
					guint64 _tmp89_;
					gchar* _tmp90_;
					_tmp88_ = variant;
					_tmp89_ = g_variant_get_uint64 (_tmp88_);
					_tmp90_ = g_strdup_printf ("%llu", _tmp89_);
					g_free (_tmp85_);
					_tmp85_ = _tmp90_;
				}
				_tmp91_ = _tmp85_;
				_tmp85_ = NULL;
				result = (gchar*) _tmp91_;
				g_free (_tmp85_);
				g_free (nullable_text);
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("d")))) {
		switch (0) {
			default:
			{
				GVariant* _tmp92_;
				gdouble _tmp93_;
				gchar* _tmp94_;
				_tmp92_ = variant;
				_tmp93_ = g_variant_get_double (_tmp92_);
				_tmp94_ = double_to_string (_tmp93_);
				result = _tmp94_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("h")))) {
		switch (0) {
			default:
			{
				gchar* nullable_text;
				GVariant* _tmp95_;
				gint32 _tmp96_;
				gchar* _tmp97_;
				gchar* _tmp98_;
				gchar* _tmp99_;
				gchar* _tmp100_;
				gchar* _tmp101_;
				const gchar* _tmp102_;
				gchar* _tmp103_;
				gchar* _tmp107_;
				_tmp95_ = variant;
				_tmp96_ = g_variant_get_handle (_tmp95_);
				_tmp97_ = g_strdup_printf ("%'i", _tmp96_);
				_tmp98_ = _tmp97_;
				_tmp99_ = g_locale_to_utf8 (_tmp98_, (gssize) -1, NULL, NULL, NULL);
				_tmp100_ = _tmp99_;
				g_free (_tmp98_);
				nullable_text = _tmp100_;
				_tmp102_ = nullable_text;
				_tmp103_ = g_strdup (_tmp102_);
				_tmp101_ = _tmp103_;
				if (_tmp101_ == NULL) {
					GVariant* _tmp104_;
					gint32 _tmp105_;
					gchar* _tmp106_;
					_tmp104_ = variant;
					_tmp105_ = g_variant_get_int32 (_tmp104_);
					_tmp106_ = g_strdup_printf ("%i", (gint) _tmp105_);
					g_free (_tmp101_);
					_tmp101_ = _tmp106_;
				}
				_tmp107_ = _tmp101_;
				_tmp101_ = NULL;
				result = (gchar*) _tmp107_;
				g_free (_tmp101_);
				g_free (nullable_text);
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				break;
			}
		}
	}
	_tmp108_ = type;
	_tmp109_ = g_str_has_prefix (_tmp108_, "m");
	if (_tmp109_) {
		GVariant* maybe_variant;
		GVariant* _tmp110_;
		GVariant* _tmp111_;
		GVariant* _tmp112_;
		const gchar* _tmp114_;
		_tmp110_ = variant;
		_tmp111_ = g_variant_get_maybe (_tmp110_);
		maybe_variant = _tmp111_;
		_tmp112_ = maybe_variant;
		if (_tmp112_ == NULL) {
			gchar* _tmp113_;
			_tmp113_ = key_cool_boolean_text_value (NULL, FALSE);
			result = _tmp113_;
			_g_variant_unref0 (maybe_variant);
			return result;
		}
		_tmp114_ = type;
		if (g_strcmp0 (_tmp114_, "mb") == 0) {
			GVariant* _tmp115_;
			gboolean _tmp116_;
			gchar* _tmp117_;
			_tmp115_ = maybe_variant;
			_tmp116_ = g_variant_get_boolean ((GVariant*) _tmp115_);
			_tmp117_ = key_cool_boolean_text_value (&_tmp116_, FALSE);
			result = _tmp117_;
			_g_variant_unref0 (maybe_variant);
			return result;
		}
		_g_variant_unref0 (maybe_variant);
	}
	_tmp118_ = variant;
	_tmp119_ = g_variant_print (_tmp118_, FALSE);
	result = _tmp119_;
	return result;
}


static gboolean _bool_equal (const gboolean * s1, const gboolean * s2) {
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}


gchar* key_cool_boolean_text_value (gboolean* nullable_boolean, gboolean capitalized) {
	gchar* result = NULL;
	gboolean _tmp0_;
	_tmp0_ = capitalized;
	if (_tmp0_) {
		gboolean* _tmp1_;
		gboolean _tmp2_;
		gboolean* _tmp4_;
		gboolean _tmp5_;
		gchar* _tmp7_;
		_tmp1_ = nullable_boolean;
		_tmp2_ = TRUE;
		if (_bool_equal (_tmp1_, &_tmp2_) == TRUE) {
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("True"));
			result = _tmp3_;
			return result;
		}
		_tmp4_ = nullable_boolean;
		_tmp5_ = FALSE;
		if (_bool_equal (_tmp4_, &_tmp5_) == TRUE) {
			gchar* _tmp6_;
			_tmp6_ = g_strdup (_ ("False"));
			result = _tmp6_;
			return result;
		}
		_tmp7_ = g_strdup (_ ("Nothing"));
		result = _tmp7_;
		return result;
	} else {
		gboolean* _tmp8_;
		gboolean _tmp9_;
		gboolean* _tmp11_;
		gboolean _tmp12_;
		gchar* _tmp14_;
		_tmp8_ = nullable_boolean;
		_tmp9_ = TRUE;
		if (_bool_equal (_tmp8_, &_tmp9_) == TRUE) {
			gchar* _tmp10_;
			_tmp10_ = g_strdup (_ ("true"));
			result = _tmp10_;
			return result;
		}
		_tmp11_ = nullable_boolean;
		_tmp12_ = FALSE;
		if (_bool_equal (_tmp11_, &_tmp12_) == TRUE) {
			gchar* _tmp13_;
			_tmp13_ = g_strdup (_ ("false"));
			result = _tmp13_;
			return result;
		}
		_tmp14_ = g_strdup (_ ("nothing"));
		result = _tmp14_;
		return result;
	}
}


gboolean key_show_min_and_max (const gchar* type) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	g_return_val_if_fail (type != NULL, FALSE);
	_tmp7_ = type;
	if (g_strcmp0 (_tmp7_, "d") == 0) {
		_tmp6_ = TRUE;
	} else {
		const gchar* _tmp8_;
		_tmp8_ = type;
		_tmp6_ = g_strcmp0 (_tmp8_, "y") == 0;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp9_;
		_tmp9_ = type;
		_tmp5_ = g_strcmp0 (_tmp9_, "n") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp10_;
		_tmp10_ = type;
		_tmp4_ = g_strcmp0 (_tmp10_, "q") == 0;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp11_;
		_tmp11_ = type;
		_tmp3_ = g_strcmp0 (_tmp11_, "i") == 0;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		const gchar* _tmp12_;
		_tmp12_ = type;
		_tmp2_ = g_strcmp0 (_tmp12_, "u") == 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		const gchar* _tmp13_;
		_tmp13_ = type;
		_tmp1_ = g_strcmp0 (_tmp13_, "x") == 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp14_;
		_tmp14_ = type;
		_tmp0_ = g_strcmp0 (_tmp14_, "t") == 0;
	}
	result = _tmp0_;
	return result;
}


Key* key_construct (GType object_type) {
	Key * self = NULL;
	self = (Key*) setting_object_construct (object_type);
	return self;
}


gchar* key_get_descriptor (Key* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return KEY_GET_CLASS (self)->get_descriptor (self);
}


const gchar* key_get_type_string (Key* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_type_string;
	result = _tmp0_;
	return result;
}


void key_set_type_string (Key* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, key_get_type_string (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_type_string);
		self->priv->_type_string = _tmp1_;
		g_object_notify ((GObject *) self, "type-string");
	}
}


static gpointer _g_variant_ref0 (gpointer self) {
	return self ? g_variant_ref (self) : NULL;
}


GVariant* key_get_properties (Key* self) {
	GVariant* result;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_properties;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


void key_set_properties (Key* self, GVariant* value) {
	g_return_if_fail (self != NULL);
	if (key_get_properties (self) != value) {
		GVariant* _tmp0_;
		GVariant* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_variant_ref0 (_tmp0_);
		_g_variant_unref0 (self->priv->_properties);
		self->priv->_properties = _tmp1_;
		g_object_notify ((GObject *) self, "properties");
	}
}


gboolean key_get_planned_change (Key* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_planned_change;
	result = _tmp0_;
	return result;
}


void key_set_planned_change (Key* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (key_get_planned_change (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_planned_change = _tmp0_;
		g_object_notify ((GObject *) self, "planned-change");
	}
}


GVariant* key_get_planned_value (Key* self) {
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_planned_value;
	result = _tmp0_;
	return result;
}


void key_set_planned_value (Key* self, GVariant* value) {
	g_return_if_fail (self != NULL);
	if (key_get_planned_value (self) != value) {
		GVariant* _tmp0_;
		GVariant* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_variant_ref0 (_tmp0_);
		_g_variant_unref0 (self->priv->_planned_value);
		self->priv->_planned_value = _tmp1_;
		g_object_notify ((GObject *) self, "planned-value");
	}
}


GVariant* key_get_value (Key* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return KEY_GET_CLASS (self)->get_value (self);
}


void key_set_value (Key* self, GVariant* value) {
	g_return_if_fail (self != NULL);
	KEY_GET_CLASS (self)->set_value (self, value);
}


static void key_class_init (KeyClass * klass) {
	key_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (KeyPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_key_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_key_set_property;
	G_OBJECT_CLASS (klass)->finalize = key_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_DESCRIPTOR, g_param_spec_string ("descriptor", "descriptor", "descriptor", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_TYPE_STRING, g_param_spec_string ("type-string", "type-string", "type-string", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_PROPERTIES, g_param_spec_variant ("properties", "properties", "properties", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_PLANNED_CHANGE, g_param_spec_boolean ("planned-change", "planned-change", "planned-change", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_PLANNED_VALUE, g_param_spec_variant ("planned-value", "planned-value", "planned-value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_VALUE, g_param_spec_variant ("value", "value", "value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	key_signals[KEY_VALUE_CHANGED_SIGNAL] = g_signal_new ("value_changed", TYPE_KEY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void key_instance_init (Key * self) {
	gchar* _tmp0_;
	self->priv = KEY_GET_PRIVATE (self);
	_tmp0_ = g_strdup ("*");
	self->priv->_type_string = _tmp0_;
	self->priv->_planned_change = FALSE;
	self->priv->_planned_value = NULL;
}


static void key_finalize (GObject * obj) {
	Key * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY, Key);
	g_free (self->priv->_type_string);
	_g_variant_unref0 (self->priv->_properties);
	_g_variant_unref0 (self->priv->_planned_value);
	G_OBJECT_CLASS (key_parent_class)->finalize (obj);
}


GType key_get_type (void) {
	static volatile gsize key_type_id__volatile = 0;
	if (g_once_init_enter (&key_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (KeyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Key), 0, (GInstanceInitFunc) key_instance_init, NULL };
		GType key_type_id;
		key_type_id = g_type_register_static (TYPE_SETTING_OBJECT, "Key", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&key_type_id__volatile, key_type_id);
	}
	return key_type_id__volatile;
}


static void _vala_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Key * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_KEY, Key);
	switch (property_id) {
		case KEY_TYPE_STRING:
		g_value_set_string (value, key_get_type_string (self));
		break;
		case KEY_PROPERTIES:
		g_value_take_variant (value, key_get_properties (self));
		break;
		case KEY_PLANNED_CHANGE:
		g_value_set_boolean (value, key_get_planned_change (self));
		break;
		case KEY_PLANNED_VALUE:
		g_value_set_variant (value, key_get_planned_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	Key * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_KEY, Key);
	switch (property_id) {
		case KEY_TYPE_STRING:
		key_set_type_string (self, g_value_get_string (value));
		break;
		case KEY_PROPERTIES:
		key_set_properties (self, g_value_get_variant (value));
		break;
		case KEY_PLANNED_CHANGE:
		key_set_planned_change (self, g_value_get_boolean (value));
		break;
		case KEY_PLANNED_VALUE:
		key_set_planned_value (self, g_value_get_variant (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


void dconf_key_erase (DConfKey* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		DConfClient* _tmp0_;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp0_ = self->priv->client;
		_tmp1_ = setting_object_get_full_name ((SettingObject*) self);
		_tmp2_ = _tmp1_;
		dconf_client_write_sync (_tmp0_, _tmp2_, NULL, NULL, NULL, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = _error_;
		_tmp4_ = _tmp3_->message;
		g_warning ("dconf-model.vala:374: %s", _tmp4_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	dconf_key_set_is_ghost (self, TRUE);
	key_set_planned_change ((Key*) self, FALSE);
	g_signal_emit ((Key*) self, key_signals[KEY_VALUE_CHANGED_SIGNAL], 0);
}


DConfKey* dconf_key_construct (GType object_type, DConfClient* client, Directory* parent, const gchar* name) {
	DConfKey * self = NULL;
	Directory* _tmp0_;
	const gchar* _tmp1_;
	DConfClient* _tmp2_;
	DConfClient* _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	GVariant* _tmp6_;
	const gchar* _tmp7_;
	GVariantBuilder* builder;
	GVariantType* _tmp8_;
	GVariantType* _tmp9_;
	GVariantBuilder* _tmp10_;
	GVariantBuilder* _tmp11_;
	GVariantBuilder* _tmp12_;
	GVariantBuilder* _tmp13_;
	GVariantType* _tmp14_;
	GVariantType* _tmp15_;
	GVariantBuilder* _tmp16_;
	const gchar* _tmp17_;
	GVariantBuilder* _tmp18_;
	Directory* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	GVariantBuilder* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	GVariantBuilder* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gboolean _tmp32_;
	GVariantBuilder* _tmp41_;
	GVariantBuilder* _tmp42_;
	GVariant* _tmp43_;
	GVariant* _tmp44_;
	g_return_val_if_fail (client != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = name;
	self = (DConfKey*) g_object_new (object_type, "nullable-parent", _tmp0_, "name", _tmp1_, NULL);
	_tmp2_ = client;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->client);
	self->priv->client = _tmp3_;
	_tmp4_ = key_get_value ((Key*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp7_ = g_variant_get_type_string (_tmp6_);
	key_set_type_string ((Key*) self, _tmp7_);
	_g_variant_unref0 (_tmp6_);
	_tmp8_ = g_variant_type_new ("(ba{ss})");
	_tmp9_ = _tmp8_;
	_tmp10_ = g_variant_builder_new (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_variant_type_free0 (_tmp9_);
	builder = _tmp11_;
	_tmp12_ = builder;
	g_variant_builder_add (_tmp12_, "b", FALSE, NULL);
	_tmp13_ = builder;
	_tmp14_ = g_variant_type_new ("a{ss}");
	_tmp15_ = _tmp14_;
	g_variant_builder_open (_tmp13_, _tmp15_);
	_g_variant_type_free0 (_tmp15_);
	_tmp16_ = builder;
	_tmp17_ = name;
	g_variant_builder_add (_tmp16_, "{ss}", "key-name", _tmp17_, NULL);
	_tmp18_ = builder;
	_tmp19_ = parent;
	_tmp20_ = setting_object_get_full_name ((SettingObject*) _tmp19_);
	_tmp21_ = _tmp20_;
	g_variant_builder_add (_tmp18_, "{ss}", "parent-path", _tmp21_, NULL);
	_tmp22_ = builder;
	_tmp23_ = key_get_type_string ((Key*) self);
	_tmp24_ = _tmp23_;
	g_variant_builder_add (_tmp22_, "{ss}", "type-code", _tmp24_, NULL);
	_tmp25_ = builder;
	_tmp26_ = key_get_type_string ((Key*) self);
	_tmp27_ = _tmp26_;
	_tmp28_ = key_key_to_description (_tmp27_);
	_tmp29_ = _tmp28_;
	g_variant_builder_add (_tmp25_, "{ss}", "type-name", _tmp29_, NULL);
	g_free (_tmp29_);
	_tmp30_ = key_get_type_string ((Key*) self);
	_tmp31_ = _tmp30_;
	_tmp32_ = key_show_min_and_max (_tmp31_);
	if (_tmp32_) {
		gchar* min = NULL;
		gchar* max = NULL;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		gchar* _tmp35_ = NULL;
		gchar* _tmp36_ = NULL;
		GVariantBuilder* _tmp37_;
		const gchar* _tmp38_;
		GVariantBuilder* _tmp39_;
		const gchar* _tmp40_;
		_tmp33_ = key_get_type_string ((Key*) self);
		_tmp34_ = _tmp33_;
		key_get_min_and_max_string (&_tmp35_, &_tmp36_, _tmp34_);
		g_free (min);
		min = _tmp35_;
		g_free (max);
		max = _tmp36_;
		_tmp37_ = builder;
		_tmp38_ = min;
		g_variant_builder_add (_tmp37_, "{ss}", "minimum", _tmp38_, NULL);
		_tmp39_ = builder;
		_tmp40_ = max;
		g_variant_builder_add (_tmp39_, "{ss}", "maximum", _tmp40_, NULL);
		g_free (max);
		g_free (min);
	}
	_tmp41_ = builder;
	g_variant_builder_close (_tmp41_);
	_tmp42_ = builder;
	_tmp43_ = g_variant_builder_end (_tmp42_);
	g_variant_ref_sink (_tmp43_);
	_tmp44_ = _tmp43_;
	key_set_properties ((Key*) self, _tmp44_);
	_g_variant_unref0 (_tmp44_);
	_g_variant_builder_unref0 (builder);
	return self;
}


DConfKey* dconf_key_new (DConfClient* client, Directory* parent, const gchar* name) {
	return dconf_key_construct (TYPE_DCONF_KEY, client, parent, name);
}


static gchar* dconf_key_real_get_descriptor (Key* base) {
	gchar* result;
	DConfKey* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	self = (DConfKey*) base;
	_tmp0_ = setting_object_get_full_name ((SettingObject*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


gboolean dconf_key_get_is_ghost (DConfKey* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_ghost;
	result = _tmp0_;
	return result;
}


void dconf_key_set_is_ghost (DConfKey* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (dconf_key_get_is_ghost (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_is_ghost = _tmp0_;
		g_object_notify ((GObject *) self, "is-ghost");
	}
}


static GVariant* dconf_key_real_get_value (Key* base) {
	GVariant* result;
	DConfKey* self;
	DConfClient* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GVariant* _tmp3_;
	self = (DConfKey*) base;
	_tmp0_ = self->priv->client;
	_tmp1_ = setting_object_get_full_name ((SettingObject*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = dconf_client_read (_tmp0_, _tmp2_);
	result = (GVariant*) _tmp3_;
	return result;
}


static void dconf_key_real_set_value (Key* base, GVariant* value) {
	DConfKey* self;
	GError * _inner_error_ = NULL;
	self = (DConfKey*) base;
	if (dconf_key_real_get_value (self) != value) {
		{
			DConfClient* _tmp0_;
			const gchar* _tmp1_;
			const gchar* _tmp2_;
			GVariant* _tmp3_;
			_tmp0_ = self->priv->client;
			_tmp1_ = setting_object_get_full_name ((SettingObject*) self);
			_tmp2_ = _tmp1_;
			_tmp3_ = value;
			dconf_client_write_sync (_tmp0_, _tmp2_, _tmp3_, NULL, NULL, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			GError* _error_ = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			_error_ = _inner_error_;
			_inner_error_ = NULL;
			_tmp4_ = _error_;
			_tmp5_ = _tmp4_->message;
			g_warning ("dconf-model.vala:395: %s", _tmp5_);
			_g_error_free0 (_error_);
		}
		__finally1:
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		g_signal_emit ((Key*) self, key_signals[KEY_VALUE_CHANGED_SIGNAL], 0);
		g_object_notify ((GObject *) self, "value");
	}
}


static void dconf_key_class_init (DConfKeyClass * klass) {
	dconf_key_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DConfKeyPrivate));
	KEY_CLASS (klass)->get_descriptor = dconf_key_real_get_descriptor;
	KEY_CLASS (klass)->get_value = dconf_key_real_get_value;
	KEY_CLASS (klass)->set_value = dconf_key_real_set_value;
	G_OBJECT_CLASS (klass)->get_property = _vala_dconf_key_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dconf_key_set_property;
	G_OBJECT_CLASS (klass)->finalize = dconf_key_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DCONF_KEY_DESCRIPTOR, g_param_spec_string ("descriptor", "descriptor", "descriptor", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DCONF_KEY_IS_GHOST, g_param_spec_boolean ("is-ghost", "is-ghost", "is-ghost", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DCONF_KEY_VALUE, g_param_spec_variant ("value", "value", "value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void dconf_key_instance_init (DConfKey * self) {
	self->priv = DCONF_KEY_GET_PRIVATE (self);
	self->priv->_is_ghost = FALSE;
}


static void dconf_key_finalize (GObject * obj) {
	DConfKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DCONF_KEY, DConfKey);
	_g_object_unref0 (self->priv->client);
	G_OBJECT_CLASS (dconf_key_parent_class)->finalize (obj);
}


GType dconf_key_get_type (void) {
	static volatile gsize dconf_key_type_id__volatile = 0;
	if (g_once_init_enter (&dconf_key_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DConfKeyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dconf_key_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DConfKey), 0, (GInstanceInitFunc) dconf_key_instance_init, NULL };
		GType dconf_key_type_id;
		dconf_key_type_id = g_type_register_static (TYPE_KEY, "DConfKey", &g_define_type_info, 0);
		g_once_init_leave (&dconf_key_type_id__volatile, dconf_key_type_id);
	}
	return dconf_key_type_id__volatile;
}


static void _vala_dconf_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DConfKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DCONF_KEY, DConfKey);
	switch (property_id) {
		case DCONF_KEY_DESCRIPTOR:
		g_value_take_string (value, key_get_descriptor ((Key*) self));
		break;
		case DCONF_KEY_IS_GHOST:
		g_value_set_boolean (value, dconf_key_get_is_ghost (self));
		break;
		case DCONF_KEY_VALUE:
		g_value_take_variant (value, key_get_value ((Key*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_dconf_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DConfKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DCONF_KEY, DConfKey);
	switch (property_id) {
		case DCONF_KEY_IS_GHOST:
		dconf_key_set_is_ghost (self, g_value_get_boolean (value));
		break;
		case DCONF_KEY_VALUE:
		key_set_value ((Key*) self, g_value_get_variant (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


void gsettings_key_set_to_default (GSettingsKey* self) {
	GSettings* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = setting_object_get_name ((SettingObject*) self);
	_tmp2_ = _tmp1_;
	g_settings_reset (_tmp0_, _tmp2_);
}


static void __lambda15_ (GSettingsKey* self) {
	g_signal_emit ((Key*) self, key_signals[KEY_VALUE_CHANGED_SIGNAL], 0);
}


static void ___lambda15__g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
	__lambda15_ ((GSettingsKey*) self);
}


GSettingsKey* gsettings_key_construct (GType object_type, Directory* parent, const gchar* name, GSettings* settings, const gchar* schema_id, const gchar* summary, const gchar* description, const gchar* type_string, GVariant* default_value, const gchar* range_type, GVariant* range_content) {
	GSettingsKey * self = NULL;
	Directory* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GVariant* _tmp5_;
	const gchar* _tmp6_;
	GVariant* _tmp7_;
	GSettings* _tmp8_;
	GSettings* _tmp9_;
	GSettings* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	GVariantBuilder* builder;
	GVariantType* _tmp14_;
	GVariantType* _tmp15_;
	GVariantBuilder* _tmp16_;
	GVariantBuilder* _tmp17_;
	GVariantBuilder* _tmp18_;
	GVariantBuilder* _tmp19_;
	GVariantType* _tmp20_;
	GVariantType* _tmp21_;
	GVariantBuilder* _tmp22_;
	const gchar* _tmp23_;
	GVariantBuilder* _tmp24_;
	Directory* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	GVariantBuilder* _tmp28_;
	const gchar* _tmp29_;
	GVariantBuilder* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	GVariantBuilder* _tmp34_;
	const gchar* _tmp35_;
	GVariantBuilder* _tmp36_;
	const gchar* _tmp37_;
	GVariantBuilder* _tmp38_;
	const gchar* _tmp39_;
	GVariantBuilder* _tmp40_;
	GVariant* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	const gchar* _tmp45_;
	gboolean _tmp46_;
	GVariantBuilder* _tmp65_;
	GVariantBuilder* _tmp66_;
	GVariant* _tmp67_;
	GVariant* _tmp68_;
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (settings != NULL, NULL);
	g_return_val_if_fail (schema_id != NULL, NULL);
	g_return_val_if_fail (summary != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	g_return_val_if_fail (type_string != NULL, NULL);
	g_return_val_if_fail (default_value != NULL, NULL);
	g_return_val_if_fail (range_type != NULL, NULL);
	g_return_val_if_fail (range_content != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = name;
	_tmp2_ = schema_id;
	_tmp3_ = summary;
	_tmp4_ = description;
	_tmp5_ = default_value;
	_tmp6_ = range_type;
	_tmp7_ = range_content;
	self = (GSettingsKey*) g_object_new (object_type, "nullable-parent", _tmp0_, "name", _tmp1_, "schema-id", _tmp2_, "summary", _tmp3_, "description", _tmp4_, "default-value", _tmp5_, "range-type", _tmp6_, "range-content", _tmp7_, NULL);
	_tmp8_ = settings;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp9_;
	_tmp10_ = settings;
	_tmp11_ = name;
	_tmp12_ = g_strconcat ("changed::", _tmp11_, NULL);
	g_signal_connect_object (_tmp10_, _tmp12_, (GCallback) ___lambda15__g_settings_changed, self, 0);
	g_free (_tmp12_);
	_tmp13_ = type_string;
	key_set_type_string ((Key*) self, _tmp13_);
	_tmp14_ = g_variant_type_new ("(ba{ss})");
	_tmp15_ = _tmp14_;
	_tmp16_ = g_variant_builder_new (_tmp15_);
	_tmp17_ = _tmp16_;
	_g_variant_type_free0 (_tmp15_);
	builder = _tmp17_;
	_tmp18_ = builder;
	g_variant_builder_add (_tmp18_, "b", TRUE, NULL);
	_tmp19_ = builder;
	_tmp20_ = g_variant_type_new ("a{ss}");
	_tmp21_ = _tmp20_;
	g_variant_builder_open (_tmp19_, _tmp21_);
	_g_variant_type_free0 (_tmp21_);
	_tmp22_ = builder;
	_tmp23_ = name;
	g_variant_builder_add (_tmp22_, "{ss}", "key-name", _tmp23_, NULL);
	_tmp24_ = builder;
	_tmp25_ = parent;
	_tmp26_ = setting_object_get_full_name ((SettingObject*) _tmp25_);
	_tmp27_ = _tmp26_;
	g_variant_builder_add (_tmp24_, "{ss}", "parent-path", _tmp27_, NULL);
	_tmp28_ = builder;
	_tmp29_ = type_string;
	g_variant_builder_add (_tmp28_, "{ss}", "type-code", _tmp29_, NULL);
	_tmp30_ = builder;
	_tmp31_ = type_string;
	_tmp32_ = key_key_to_description (_tmp31_);
	_tmp33_ = _tmp32_;
	g_variant_builder_add (_tmp30_, "{ss}", "type-name", _tmp33_, NULL);
	g_free (_tmp33_);
	_tmp34_ = builder;
	_tmp35_ = schema_id;
	g_variant_builder_add (_tmp34_, "{ss}", "schema-id", _tmp35_, NULL);
	_tmp36_ = builder;
	_tmp37_ = summary;
	g_variant_builder_add (_tmp36_, "{ss}", "summary", _tmp37_, NULL);
	_tmp38_ = builder;
	_tmp39_ = description;
	g_variant_builder_add (_tmp38_, "{ss}", "description", _tmp39_, NULL);
	_tmp40_ = builder;
	_tmp41_ = default_value;
	_tmp42_ = type_string;
	_tmp43_ = key_cool_text_value_from_variant (_tmp41_, _tmp42_);
	_tmp44_ = _tmp43_;
	g_variant_builder_add (_tmp40_, "{ss}", "default-value", _tmp44_, NULL);
	g_free (_tmp44_);
	_tmp45_ = type_string;
	_tmp46_ = key_show_min_and_max (_tmp45_);
	if (_tmp46_) {
		gchar* min = NULL;
		gchar* max = NULL;
		const gchar* _tmp47_;
		GVariantBuilder* _tmp61_;
		const gchar* _tmp62_;
		GVariantBuilder* _tmp63_;
		const gchar* _tmp64_;
		_tmp47_ = range_type;
		if (g_strcmp0 (_tmp47_, "range") == 0) {
			GVariant* _tmp48_;
			GVariant* _tmp49_;
			GVariant* _tmp50_;
			const gchar* _tmp51_;
			gchar* _tmp52_;
			GVariant* _tmp53_;
			GVariant* _tmp54_;
			GVariant* _tmp55_;
			const gchar* _tmp56_;
			gchar* _tmp57_;
			_tmp48_ = range_content;
			_tmp49_ = g_variant_get_child_value (_tmp48_, (gsize) 0);
			_tmp50_ = _tmp49_;
			_tmp51_ = type_string;
			_tmp52_ = key_cool_text_value_from_variant (_tmp50_, _tmp51_);
			g_free (min);
			min = _tmp52_;
			_g_variant_unref0 (_tmp50_);
			_tmp53_ = range_content;
			_tmp54_ = g_variant_get_child_value (_tmp53_, (gsize) 1);
			_tmp55_ = _tmp54_;
			_tmp56_ = type_string;
			_tmp57_ = key_cool_text_value_from_variant (_tmp55_, _tmp56_);
			g_free (max);
			max = _tmp57_;
			_g_variant_unref0 (_tmp55_);
		} else {
			const gchar* _tmp58_;
			gchar* _tmp59_ = NULL;
			gchar* _tmp60_ = NULL;
			_tmp58_ = type_string;
			key_get_min_and_max_string (&_tmp59_, &_tmp60_, _tmp58_);
			g_free (min);
			min = _tmp59_;
			g_free (max);
			max = _tmp60_;
		}
		_tmp61_ = builder;
		_tmp62_ = min;
		g_variant_builder_add (_tmp61_, "{ss}", "minimum", _tmp62_, NULL);
		_tmp63_ = builder;
		_tmp64_ = max;
		g_variant_builder_add (_tmp63_, "{ss}", "maximum", _tmp64_, NULL);
		g_free (max);
		g_free (min);
	}
	_tmp65_ = builder;
	g_variant_builder_close (_tmp65_);
	_tmp66_ = builder;
	_tmp67_ = g_variant_builder_end (_tmp66_);
	g_variant_ref_sink (_tmp67_);
	_tmp68_ = _tmp67_;
	key_set_properties ((Key*) self, _tmp68_);
	_g_variant_unref0 (_tmp68_);
	_g_variant_builder_unref0 (builder);
	return self;
}


GSettingsKey* gsettings_key_new (Directory* parent, const gchar* name, GSettings* settings, const gchar* schema_id, const gchar* summary, const gchar* description, const gchar* type_string, GVariant* default_value, const gchar* range_type, GVariant* range_content) {
	return gsettings_key_construct (TYPE_GSETTINGS_KEY, parent, name, settings, schema_id, summary, description, type_string, default_value, range_type, range_content);
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = needle;
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


gboolean gsettings_key_search_for (GSettingsKey* self, const gchar* text) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (text != NULL, FALSE);
	_tmp1_ = self->priv->_summary;
	_tmp2_ = text;
	_tmp3_ = string_index_of (_tmp1_, _tmp2_, 0);
	if (_tmp3_ >= 0) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gint _tmp6_;
		_tmp4_ = self->priv->_description;
		_tmp5_ = text;
		_tmp6_ = string_index_of (_tmp4_, _tmp5_, 0);
		_tmp0_ = _tmp6_ >= 0;
	}
	result = _tmp0_;
	return result;
}


const gchar* gsettings_key_get_schema_id (GSettingsKey* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_schema_id;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_schema_id (GSettingsKey* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gsettings_key_get_schema_id (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_schema_id);
		self->priv->_schema_id = _tmp1_;
		g_object_notify ((GObject *) self, "schema-id");
	}
}


const gchar* gsettings_key_get_summary (GSettingsKey* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_summary;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_summary (GSettingsKey* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gsettings_key_get_summary (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_summary);
		self->priv->_summary = _tmp1_;
		g_object_notify ((GObject *) self, "summary");
	}
}


static const gchar* gsettings_key_get_description (GSettingsKey* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_description (GSettingsKey* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gsettings_key_get_description (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_description);
		self->priv->_description = _tmp1_;
		g_object_notify ((GObject *) self, "description");
	}
}


static GVariant* gsettings_key_get_default_value (GSettingsKey* self) {
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_default_value;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_default_value (GSettingsKey* self, GVariant* value) {
	g_return_if_fail (self != NULL);
	if (gsettings_key_get_default_value (self) != value) {
		GVariant* _tmp0_;
		GVariant* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_variant_ref0 (_tmp0_);
		_g_variant_unref0 (self->priv->_default_value);
		self->priv->_default_value = _tmp1_;
		g_object_notify ((GObject *) self, "default-value");
	}
}


const gchar* gsettings_key_get_range_type (GSettingsKey* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_range_type;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_range_type (GSettingsKey* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, gsettings_key_get_range_type (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		g_free (self->priv->_range_type);
		self->priv->_range_type = _tmp1_;
		g_object_notify ((GObject *) self, "range-type");
	}
}


GVariant* gsettings_key_get_range_content (GSettingsKey* self) {
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_range_content;
	result = _tmp0_;
	return result;
}


static void gsettings_key_set_range_content (GSettingsKey* self, GVariant* value) {
	g_return_if_fail (self != NULL);
	if (gsettings_key_get_range_content (self) != value) {
		GVariant* _tmp0_;
		GVariant* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_variant_ref0 (_tmp0_);
		_g_variant_unref0 (self->priv->_range_content);
		self->priv->_range_content = _tmp1_;
		g_object_notify ((GObject *) self, "range-content");
	}
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static gchar* gsettings_key_real_get_descriptor (Key* base) {
	gchar* result;
	GSettingsKey* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	self = (GSettingsKey*) base;
	_tmp0_ = self->priv->_schema_id;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = setting_object_get_name ((SettingObject*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_to_string (_tmp3_);
	_tmp5_ = g_strconcat (_tmp1_, " ", _tmp4_, NULL);
	result = _tmp5_;
	return result;
}


static GVariant* gsettings_key_real_get_value (Key* base) {
	GVariant* result;
	GSettingsKey* self;
	GSettings* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GVariant* _tmp3_;
	self = (GSettingsKey*) base;
	_tmp0_ = self->priv->settings;
	_tmp1_ = setting_object_get_name ((SettingObject*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_settings_get_value (_tmp0_, _tmp2_);
	result = _tmp3_;
	return result;
}


static void gsettings_key_real_set_value (Key* base, GVariant* value) {
	GSettingsKey* self;
	self = (GSettingsKey*) base;
	if (gsettings_key_real_get_value (self) != value) {
		GSettings* _tmp0_;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		GVariant* _tmp3_;
		_tmp0_ = self->priv->settings;
		_tmp1_ = setting_object_get_name ((SettingObject*) self);
		_tmp2_ = _tmp1_;
		_tmp3_ = value;
		g_settings_set_value (_tmp0_, _tmp2_, _tmp3_);
		g_object_notify ((GObject *) self, "value");
	}
}


gboolean gsettings_key_get_is_default (GSettingsKey* self) {
	gboolean result;
	GSettings* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->settings;
	_tmp1_ = setting_object_get_name ((SettingObject*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_settings_get_user_value (_tmp0_, _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_ == NULL;
	_g_variant_unref0 (_tmp4_);
	result = _tmp5_;
	return result;
}


static void gsettings_key_class_init (GSettingsKeyClass * klass) {
	gsettings_key_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GSettingsKeyPrivate));
	KEY_CLASS (klass)->get_descriptor = gsettings_key_real_get_descriptor;
	KEY_CLASS (klass)->get_value = gsettings_key_real_get_value;
	KEY_CLASS (klass)->set_value = gsettings_key_real_set_value;
	G_OBJECT_CLASS (klass)->get_property = _vala_gsettings_key_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gsettings_key_set_property;
	G_OBJECT_CLASS (klass)->finalize = gsettings_key_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_SCHEMA_ID, g_param_spec_string ("schema-id", "schema-id", "schema-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_SUMMARY, g_param_spec_string ("summary", "summary", "summary", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_DESCRIPTION, g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_DEFAULT_VALUE, g_param_spec_variant ("default-value", "default-value", "default-value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_RANGE_TYPE, g_param_spec_string ("range-type", "range-type", "range-type", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_RANGE_CONTENT, g_param_spec_variant ("range-content", "range-content", "range-content", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_DESCRIPTOR, g_param_spec_string ("descriptor", "descriptor", "descriptor", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_VALUE, g_param_spec_variant ("value", "value", "value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GSETTINGS_KEY_IS_DEFAULT, g_param_spec_boolean ("is-default", "is-default", "is-default", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gsettings_key_instance_init (GSettingsKey * self) {
	self->priv = GSETTINGS_KEY_GET_PRIVATE (self);
}


static void gsettings_key_finalize (GObject * obj) {
	GSettingsKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GSETTINGS_KEY, GSettingsKey);
	g_free (self->priv->_schema_id);
	g_free (self->priv->_summary);
	g_free (self->priv->_description);
	_g_variant_unref0 (self->priv->_default_value);
	g_free (self->priv->_range_type);
	_g_variant_unref0 (self->priv->_range_content);
	_g_object_unref0 (self->priv->settings);
	G_OBJECT_CLASS (gsettings_key_parent_class)->finalize (obj);
}


GType gsettings_key_get_type (void) {
	static volatile gsize gsettings_key_type_id__volatile = 0;
	if (g_once_init_enter (&gsettings_key_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GSettingsKeyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gsettings_key_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GSettingsKey), 0, (GInstanceInitFunc) gsettings_key_instance_init, NULL };
		GType gsettings_key_type_id;
		gsettings_key_type_id = g_type_register_static (TYPE_KEY, "GSettingsKey", &g_define_type_info, 0);
		g_once_init_leave (&gsettings_key_type_id__volatile, gsettings_key_type_id);
	}
	return gsettings_key_type_id__volatile;
}


static void _vala_gsettings_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GSettingsKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_GSETTINGS_KEY, GSettingsKey);
	switch (property_id) {
		case GSETTINGS_KEY_SCHEMA_ID:
		g_value_set_string (value, gsettings_key_get_schema_id (self));
		break;
		case GSETTINGS_KEY_SUMMARY:
		g_value_set_string (value, gsettings_key_get_summary (self));
		break;
		case GSETTINGS_KEY_DESCRIPTION:
		g_value_set_string (value, gsettings_key_get_description (self));
		break;
		case GSETTINGS_KEY_DEFAULT_VALUE:
		g_value_set_variant (value, gsettings_key_get_default_value (self));
		break;
		case GSETTINGS_KEY_RANGE_TYPE:
		g_value_set_string (value, gsettings_key_get_range_type (self));
		break;
		case GSETTINGS_KEY_RANGE_CONTENT:
		g_value_set_variant (value, gsettings_key_get_range_content (self));
		break;
		case GSETTINGS_KEY_DESCRIPTOR:
		g_value_take_string (value, key_get_descriptor ((Key*) self));
		break;
		case GSETTINGS_KEY_VALUE:
		g_value_take_variant (value, key_get_value ((Key*) self));
		break;
		case GSETTINGS_KEY_IS_DEFAULT:
		g_value_set_boolean (value, gsettings_key_get_is_default (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gsettings_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GSettingsKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_GSETTINGS_KEY, GSettingsKey);
	switch (property_id) {
		case GSETTINGS_KEY_SCHEMA_ID:
		gsettings_key_set_schema_id (self, g_value_get_string (value));
		break;
		case GSETTINGS_KEY_SUMMARY:
		gsettings_key_set_summary (self, g_value_get_string (value));
		break;
		case GSETTINGS_KEY_DESCRIPTION:
		gsettings_key_set_description (self, g_value_get_string (value));
		break;
		case GSETTINGS_KEY_DEFAULT_VALUE:
		gsettings_key_set_default_value (self, g_value_get_variant (value));
		break;
		case GSETTINGS_KEY_RANGE_TYPE:
		gsettings_key_set_range_type (self, g_value_get_string (value));
		break;
		case GSETTINGS_KEY_RANGE_CONTENT:
		gsettings_key_set_range_content (self, g_value_get_variant (value));
		break;
		case GSETTINGS_KEY_VALUE:
		key_set_value ((Key*) self, g_value_get_variant (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static gpointer _g_settings_schema_source_ref0 (gpointer self) {
	return self ? g_settings_schema_source_ref (self) : NULL;
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length;
	gint _tmp0_;
	gint _tmp1_;
	glong _tmp2_;
	glong _tmp5_;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_;
	glong _tmp16_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	gchar* _tmp21_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	_tmp2_ = start;
	if (_tmp2_ < ((glong) 0)) {
		glong _tmp3_;
		glong _tmp4_;
		_tmp3_ = string_length;
		_tmp4_ = start;
		start = _tmp3_ + _tmp4_;
	}
	_tmp5_ = end;
	if (_tmp5_ < ((glong) 0)) {
		glong _tmp6_;
		glong _tmp7_;
		_tmp6_ = string_length;
		_tmp7_ = end;
		end = _tmp6_ + _tmp7_;
	}
	_tmp9_ = start;
	if (_tmp9_ >= ((glong) 0)) {
		glong _tmp10_;
		glong _tmp11_;
		_tmp10_ = start;
		_tmp11_ = string_length;
		_tmp8_ = _tmp10_ <= _tmp11_;
	} else {
		_tmp8_ = FALSE;
	}
	g_return_val_if_fail (_tmp8_, NULL);
	_tmp13_ = end;
	if (_tmp13_ >= ((glong) 0)) {
		glong _tmp14_;
		glong _tmp15_;
		_tmp14_ = end;
		_tmp15_ = string_length;
		_tmp12_ = _tmp14_ <= _tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	g_return_val_if_fail (_tmp12_, NULL);
	_tmp16_ = start;
	_tmp17_ = end;
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
	_tmp18_ = start;
	_tmp19_ = end;
	_tmp20_ = start;
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
	result = _tmp21_;
	return result;
}


SettingsModel* settings_model_construct (GType object_type) {
	SettingsModel * self = NULL;
	GSettingsSchemaSource* settings_schema_source;
	GSettingsSchemaSource* _tmp0_;
	GSettingsSchemaSource* _tmp1_;
	gchar** non_relocatable_schemas = NULL;
	gint non_relocatable_schemas_length1 = 0;
	gint _non_relocatable_schemas_size_ = 0;
	gchar** relocatable_schemas = NULL;
	gint relocatable_schemas_length1 = 0;
	gint _relocatable_schemas_size_ = 0;
	GSettingsSchemaSource* _tmp2_;
	gchar** _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	DConfClient* _tmp5_;
	Directory* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	Directory* _tmp27_;
	DConfClient* _tmp28_;
	self = (SettingsModel*) g_object_new (object_type, NULL);
	_tmp0_ = g_settings_schema_source_get_default ();
	_tmp1_ = _g_settings_schema_source_ref0 (_tmp0_);
	settings_schema_source = _tmp1_;
	_tmp2_ = settings_schema_source;
	g_settings_schema_source_list_schemas (_tmp2_, TRUE, &_tmp3_, &_tmp4_);
	non_relocatable_schemas = (_vala_array_free (non_relocatable_schemas, non_relocatable_schemas_length1, (GDestroyNotify) g_free), NULL);
	non_relocatable_schemas = _tmp3_;
	non_relocatable_schemas_length1 = -1;
	_non_relocatable_schemas_size_ = non_relocatable_schemas_length1;
	non_relocatable_schemas_length1 = _vala_array_length (non_relocatable_schemas);
	relocatable_schemas = (_vala_array_free (relocatable_schemas, relocatable_schemas_length1, (GDestroyNotify) g_free), NULL);
	relocatable_schemas = _tmp4_;
	relocatable_schemas_length1 = -1;
	_relocatable_schemas_size_ = relocatable_schemas_length1;
	relocatable_schemas_length1 = _vala_array_length (relocatable_schemas);
	_tmp5_ = self->priv->client;
	_tmp6_ = directory_new (NULL, "/", _tmp5_);
	_g_object_unref0 (self->priv->root);
	self->priv->root = _tmp6_;
	_tmp7_ = non_relocatable_schemas;
	_tmp7__length1 = non_relocatable_schemas_length1;
	{
		gchar** schema_id_collection = NULL;
		gint schema_id_collection_length1 = 0;
		gint _schema_id_collection_size_ = 0;
		gint schema_id_it = 0;
		schema_id_collection = _tmp7_;
		schema_id_collection_length1 = _tmp7__length1;
		for (schema_id_it = 0; schema_id_it < _tmp7__length1; schema_id_it = schema_id_it + 1) {
			gchar* _tmp8_;
			gchar* schema_id = NULL;
			_tmp8_ = g_strdup (schema_id_collection[schema_id_it]);
			schema_id = _tmp8_;
			{
				GSettingsSchema* settings_schema;
				GSettingsSchemaSource* _tmp9_;
				const gchar* _tmp10_;
				GSettingsSchema* _tmp11_;
				GSettingsSchema* _tmp12_;
				gchar* schema_path;
				GSettingsSchema* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				Directory* view;
				Directory* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				gint _tmp19_;
				gint _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				Directory* _tmp23_;
				Directory* _tmp24_;
				Directory* _tmp25_;
				GSettingsSchema* _tmp26_;
				_tmp9_ = settings_schema_source;
				_tmp10_ = schema_id;
				_tmp11_ = g_settings_schema_source_lookup (_tmp9_, _tmp10_, TRUE);
				settings_schema = _tmp11_;
				_tmp12_ = settings_schema;
				if (_tmp12_ == NULL) {
					_g_settings_schema_unref0 (settings_schema);
					g_free (schema_id);
					continue;
				}
				_tmp13_ = settings_schema;
				_tmp14_ = g_settings_schema_get_path ((GSettingsSchema*) _tmp13_);
				_tmp15_ = g_strdup (_tmp14_);
				schema_path = _tmp15_;
				_tmp16_ = self->priv->root;
				_tmp17_ = schema_path;
				_tmp18_ = schema_path;
				_tmp19_ = strlen (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = string_slice (_tmp17_, (glong) 1, (glong) _tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = settings_model_create_gsettings_views (self, _tmp16_, _tmp22_);
				_tmp24_ = _tmp23_;
				g_free (_tmp22_);
				view = _tmp24_;
				_tmp25_ = view;
				_tmp26_ = settings_schema;
				directory_init_gsettings_keys (_tmp25_, (GSettingsSchema*) _tmp26_);
				_g_object_unref0 (view);
				g_free (schema_path);
				_g_settings_schema_unref0 (settings_schema);
				g_free (schema_id);
			}
		}
	}
	_tmp27_ = self->priv->root;
	settings_model_create_dconf_views (self, _tmp27_);
	_tmp28_ = self->priv->client;
	dconf_client_watch_sync (_tmp28_, "/");
	relocatable_schemas = (_vala_array_free (relocatable_schemas, relocatable_schemas_length1, (GDestroyNotify) g_free), NULL);
	non_relocatable_schemas = (_vala_array_free (non_relocatable_schemas, non_relocatable_schemas_length1, (GDestroyNotify) g_free), NULL);
	_g_settings_schema_source_unref0 (settings_schema_source);
	return self;
}


SettingsModel* settings_model_new (void) {
	return settings_model_construct (TYPE_SETTINGS_MODEL);
}


Directory* settings_model_get_root_directory (SettingsModel* self) {
	Directory* result = NULL;
	Directory* _tmp0_;
	Directory* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->root;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


static Directory* settings_model_create_gsettings_views (SettingsModel* self, Directory* parent_view, const gchar* remaining) {
	Directory* result = NULL;
	const gchar* _tmp0_;
	gchar** tokens;
	const gchar* _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint tokens_length1;
	gint _tokens_size_;
	Directory* view;
	Directory* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	const gchar* _tmp8_;
	Directory* _tmp9_;
	Directory* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	const gchar* _tmp12_;
	Directory* _tmp13_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent_view != NULL, NULL);
	g_return_val_if_fail (remaining != NULL, NULL);
	_tmp0_ = remaining;
	if (g_strcmp0 (_tmp0_, "") == 0) {
		Directory* _tmp1_;
		Directory* _tmp2_;
		_tmp1_ = parent_view;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = remaining;
	_tmp5_ = _tmp4_ = g_strsplit (_tmp3_, "/", 2);
	tokens = _tmp5_;
	tokens_length1 = _vala_array_length (_tmp4_);
	_tokens_size_ = tokens_length1;
	_tmp6_ = parent_view;
	_tmp7_ = tokens;
	_tmp7__length1 = tokens_length1;
	_tmp8_ = _tmp7_[0];
	_tmp9_ = settings_model_get_child (self, _tmp6_, _tmp8_);
	view = _tmp9_;
	_tmp10_ = view;
	_tmp11_ = tokens;
	_tmp11__length1 = tokens_length1;
	_tmp12_ = _tmp11_[1];
	_tmp13_ = settings_model_create_gsettings_views (self, _tmp10_, _tmp12_);
	result = _tmp13_;
	_g_object_unref0 (view);
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	return result;
}


static void settings_model_create_dconf_views (SettingsModel* self, Directory* view) {
	DConfClient* _tmp0_;
	Directory* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint _tmp4_;
	gchar** _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (view != NULL);
	_tmp0_ = self->priv->client;
	_tmp1_ = view;
	_tmp2_ = setting_object_get_full_name ((SettingObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp5_ = dconf_client_list (_tmp0_, _tmp3_, &_tmp4_);
	{
		gchar** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp5_;
		item_collection_length1 = _tmp4_;
		for (item_it = 0; item_it < _tmp4_; item_it = item_it + 1) {
			gchar* _tmp6_;
			gchar* item = NULL;
			_tmp6_ = g_strdup (item_collection[item_it]);
			item = _tmp6_;
			{
				Directory* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gboolean _tmp13_;
				gboolean _tmp14_;
				_tmp7_ = view;
				_tmp8_ = setting_object_get_full_name ((SettingObject*) _tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = item;
				_tmp11_ = g_strconcat (_tmp9_, _tmp10_, NULL);
				_tmp12_ = _tmp11_;
				_tmp13_ = dconf_is_dir (_tmp12_, NULL);
				_tmp14_ = _tmp13_;
				g_free (_tmp12_);
				if (_tmp14_) {
					Directory* _tmp15_;
					const gchar* _tmp16_;
					gchar* _tmp17_;
					gchar* _tmp18_;
					Directory* _tmp19_;
					Directory* _tmp20_;
					_tmp15_ = view;
					_tmp16_ = item;
					_tmp17_ = string_slice (_tmp16_, (glong) 0, (glong) -1);
					_tmp18_ = _tmp17_;
					_tmp19_ = settings_model_get_child (self, _tmp15_, _tmp18_);
					_tmp20_ = _tmp19_;
					settings_model_create_dconf_views (self, _tmp20_);
					_g_object_unref0 (_tmp20_);
					g_free (_tmp18_);
				}
				g_free (item);
			}
		}
		item_collection = (_vala_array_free (item_collection, item_collection_length1, (GDestroyNotify) g_free), NULL);
	}
}


static gint __lambda17_ (Directory* a, Directory* b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	Directory* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	Directory* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = g_strcmp0;
	_tmp1_ = a;
	_tmp2_ = setting_object_get_name ((SettingObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DIRECTORY, Directory));
	_tmp3_ = _tmp2_;
	_tmp4_ = b;
	_tmp5_ = setting_object_get_name ((SettingObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DIRECTORY, Directory));
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp0_ (_tmp3_, _tmp6_);
	result = _tmp7_;
	return result;
}


static gint ___lambda17__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda17_ ((Directory*) a, (Directory*) b);
	return result;
}


static Directory* settings_model_get_child (SettingsModel* self, Directory* parent_view, const gchar* name) {
	Directory* result = NULL;
	Directory* view;
	Directory* _tmp0_;
	GHashTable* _tmp1_;
	const gchar* _tmp2_;
	gconstpointer _tmp3_;
	Directory* _tmp4_;
	Directory* _tmp5_;
	Directory* new_view;
	Directory* _tmp8_;
	const gchar* _tmp9_;
	DConfClient* _tmp10_;
	Directory* _tmp11_;
	Directory* _tmp12_;
	Directory* _tmp13_;
	Directory* _tmp14_;
	Directory* _tmp15_;
	GHashTable* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	Directory* _tmp19_;
	Directory* _tmp20_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent_view != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = parent_view;
	_tmp1_ = _tmp0_->child_map;
	_tmp2_ = name;
	_tmp3_ = g_hash_table_lookup (_tmp1_, _tmp2_);
	_tmp4_ = _g_object_ref0 ((Directory*) _tmp3_);
	view = _tmp4_;
	_tmp5_ = view;
	if (_tmp5_ != NULL) {
		Directory* _tmp6_;
		Directory* _tmp7_;
		_tmp6_ = view;
		_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DIRECTORY, Directory));
		result = _tmp7_;
		_g_object_unref0 (view);
		return result;
	}
	_tmp8_ = parent_view;
	_tmp9_ = name;
	_tmp10_ = self->priv->client;
	_tmp11_ = directory_new (_tmp8_, _tmp9_, _tmp10_);
	new_view = _tmp11_;
	_tmp12_ = parent_view;
	_tmp13_ = new_view;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	_tmp12_->children = g_list_insert_sorted (_tmp12_->children, _tmp14_, ___lambda17__gcompare_func);
	_tmp15_ = parent_view;
	_tmp16_ = _tmp15_->child_map;
	_tmp17_ = name;
	_tmp18_ = g_strdup (_tmp17_);
	_tmp19_ = new_view;
	_tmp20_ = _g_object_ref0 (_tmp19_);
	g_hash_table_insert (_tmp16_, _tmp18_, _tmp20_);
	result = new_view;
	_g_object_unref0 (view);
	return result;
}


static GtkTreeModelFlags settings_model_real_get_flags (GtkTreeModel* base) {
	SettingsModel * self;
	GtkTreeModelFlags result = 0;
	self = (SettingsModel*) base;
	result = 0;
	return result;
}


static gint settings_model_real_get_n_columns (GtkTreeModel* base) {
	SettingsModel * self;
	gint result = 0;
	self = (SettingsModel*) base;
	result = 3;
	return result;
}


static GType settings_model_real_get_column_type (GtkTreeModel* base, gint index) {
	SettingsModel * self;
	GType result = 0UL;
	GType _tmp0_ = 0UL;
	gint _tmp1_;
	self = (SettingsModel*) base;
	_tmp1_ = index;
	if (_tmp1_ == 0) {
		_tmp0_ = TYPE_DIRECTORY;
	} else {
		_tmp0_ = G_TYPE_STRING;
	}
	result = _tmp0_;
	return result;
}


static void settings_model_set_iter (SettingsModel* self, GtkTreeIter* iter, Directory* directory) {
	Directory* _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (iter != NULL);
	g_return_if_fail (directory != NULL);
	(*iter).stamp = 0;
	_tmp0_ = directory;
	(*iter).user_data = _tmp0_;
	_tmp1_ = directory;
	(*iter).user_data2 = _tmp1_;
	_tmp2_ = directory;
	(*iter).user_data3 = _tmp2_;
}


Directory* settings_model_get_directory (SettingsModel* self, GtkTreeIter* iter) {
	Directory* result = NULL;
	Directory* _tmp0_ = NULL;
	GtkTreeIter* _tmp1_;
	Directory* _tmp5_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = iter;
	if (_tmp1_ == NULL) {
		Directory* _tmp2_;
		_tmp2_ = self->priv->root;
		_tmp0_ = _tmp2_;
	} else {
		GtkTreeIter* _tmp3_;
		void* _tmp4_;
		_tmp3_ = iter;
		_tmp4_ = ((GtkTreeIter) (*_tmp3_)).user_data;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DIRECTORY, Directory);
	}
	_tmp5_ = _g_object_ref0 (_tmp0_);
	result = _tmp5_;
	return result;
}


static gboolean settings_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path) {
	SettingsModel * self;
	GtkTreeIter _vala_iter = {0};
	gboolean result = FALSE;
	GtkTreePath* _tmp0_;
	gint _tmp1_;
	gint* _tmp2_;
	gint _tmp3_;
	GtkTreeIter _tmp4_ = {0};
	gboolean _tmp5_;
	self = (SettingsModel*) base;
	g_return_val_if_fail (path != NULL, FALSE);
	memset (&_vala_iter, 0, sizeof (GtkTreeIter));
	_tmp0_ = path;
	_tmp2_ = gtk_tree_path_get_indices_with_depth (_tmp0_, &_tmp1_);
	_tmp3_ = _tmp2_[0];
	_tmp5_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp4_, NULL, _tmp3_);
	_vala_iter = _tmp4_;
	if (!_tmp5_) {
		result = FALSE;
		if (iter) {
			*iter = _vala_iter;
		}
		return result;
	}
	{
		gint i;
		i = 1;
		{
			gboolean _tmp6_;
			_tmp6_ = TRUE;
			while (TRUE) {
				gint _tmp8_;
				GtkTreePath* _tmp9_;
				gint _tmp10_;
				GtkTreeIter parent;
				GtkTreeIter _tmp11_;
				GtkTreeIter _tmp12_;
				GtkTreePath* _tmp13_;
				gint _tmp14_;
				gint* _tmp15_;
				gint _tmp16_;
				gint _tmp17_;
				GtkTreeIter _tmp18_ = {0};
				gboolean _tmp19_;
				if (!_tmp6_) {
					gint _tmp7_;
					_tmp7_ = i;
					i = _tmp7_ + 1;
				}
				_tmp6_ = FALSE;
				_tmp8_ = i;
				_tmp9_ = path;
				_tmp10_ = gtk_tree_path_get_depth (_tmp9_);
				if (!(_tmp8_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _vala_iter;
				parent = _tmp11_;
				_tmp12_ = parent;
				_tmp13_ = path;
				_tmp15_ = gtk_tree_path_get_indices_with_depth (_tmp13_, &_tmp14_);
				_tmp16_ = i;
				_tmp17_ = _tmp15_[_tmp16_];
				_tmp19_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp18_, &_tmp12_, _tmp17_);
				_vala_iter = _tmp18_;
				if (!_tmp19_) {
					result = FALSE;
					if (iter) {
						*iter = _vala_iter;
					}
					return result;
				}
			}
		}
	}
	result = TRUE;
	if (iter) {
		*iter = _vala_iter;
	}
	return result;
}


static GtkTreePath* settings_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	GtkTreePath* result = NULL;
	GtkTreePath* path;
	GtkTreePath* _tmp0_;
	self = (SettingsModel*) base;
	g_return_val_if_fail (iter != NULL, NULL);
	_tmp0_ = gtk_tree_path_new ();
	path = _tmp0_;
	{
		Directory* d;
		GtkTreeIter _tmp1_;
		Directory* _tmp2_;
		_tmp1_ = *iter;
		_tmp2_ = settings_model_get_directory (self, &_tmp1_);
		d = _tmp2_;
		{
			gboolean _tmp3_;
			_tmp3_ = TRUE;
			while (TRUE) {
				Directory* _tmp8_;
				Directory* _tmp9_;
				GtkTreePath* _tmp10_;
				Directory* _tmp11_;
				gint _tmp12_;
				gint _tmp13_;
				if (!_tmp3_) {
					Directory* _tmp4_;
					Directory* _tmp5_;
					Directory* _tmp6_;
					Directory* _tmp7_;
					_tmp4_ = d;
					_tmp5_ = setting_object_get_parent ((SettingObject*) _tmp4_);
					_tmp6_ = _tmp5_;
					_tmp7_ = _g_object_ref0 (_tmp6_);
					_g_object_unref0 (d);
					d = _tmp7_;
				}
				_tmp3_ = FALSE;
				_tmp8_ = d;
				_tmp9_ = self->priv->root;
				if (!(_tmp8_ != _tmp9_)) {
					break;
				}
				_tmp10_ = path;
				_tmp11_ = d;
				_tmp12_ = directory_get_index (_tmp11_);
				_tmp13_ = _tmp12_;
				gtk_tree_path_prepend_index (_tmp10_, (gint) _tmp13_);
			}
		}
		_g_object_unref0 (d);
	}
	result = path;
	return result;
}


static void settings_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value) {
	SettingsModel * self;
	GValue _vala_value = {0};
	gint _tmp0_;
	self = (SettingsModel*) base;
	g_return_if_fail (iter != NULL);
	_tmp0_ = column;
	switch (_tmp0_) {
		case 0:
		{
			GtkTreeIter _tmp1_;
			Directory* _tmp2_;
			GValue _tmp3_ = {0};
			_tmp1_ = *iter;
			_tmp2_ = settings_model_get_directory (self, &_tmp1_);
			g_value_init (&_tmp3_, TYPE_DIRECTORY);
			g_value_take_object (&_tmp3_, _tmp2_);
			G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL;
			_vala_value = _tmp3_;
			break;
		}
		case 1:
		{
			GtkTreeIter _tmp4_;
			Directory* _tmp5_;
			Directory* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			GValue _tmp9_ = {0};
			_tmp4_ = *iter;
			_tmp5_ = settings_model_get_directory (self, &_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = setting_object_get_name ((SettingObject*) _tmp6_);
			_tmp8_ = _tmp7_;
			g_value_init (&_tmp9_, G_TYPE_STRING);
			g_value_set_string (&_tmp9_, _tmp8_);
			G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL;
			_vala_value = _tmp9_;
			_g_object_unref0 (_tmp6_);
			break;
		}
		case 2:
		{
			GtkTreeIter _tmp10_;
			Directory* _tmp11_;
			Directory* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			GValue _tmp15_ = {0};
			_tmp10_ = *iter;
			_tmp11_ = settings_model_get_directory (self, &_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = setting_object_get_full_name ((SettingObject*) _tmp12_);
			_tmp14_ = _tmp13_;
			g_value_init (&_tmp15_, G_TYPE_STRING);
			g_value_set_string (&_tmp15_, _tmp14_);
			G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL;
			_vala_value = _tmp15_;
			_g_object_unref0 (_tmp12_);
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	if (value) {
		*value = _vala_value;
	} else {
		G_IS_VALUE (&_vala_value) ? (g_value_unset (&_vala_value), NULL) : NULL;
	}
}


static gboolean settings_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	gboolean result = FALSE;
	Directory* directory;
	GtkTreeIter _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	Directory* _tmp5_;
	Directory* _tmp6_;
	Directory* _tmp7_;
	GList* _tmp8_;
	guint _tmp9_;
	Directory* _tmp10_;
	Directory* _tmp11_;
	Directory* _tmp12_;
	GList* _tmp13_;
	Directory* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	gconstpointer _tmp17_;
	self = (SettingsModel*) base;
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = *iter;
	_tmp1_ = settings_model_get_directory (self, &_tmp0_);
	directory = _tmp1_;
	_tmp2_ = directory;
	_tmp3_ = directory_get_index (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = directory;
	_tmp6_ = setting_object_get_parent ((SettingObject*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_->children;
	_tmp9_ = g_list_length (_tmp8_);
	if (((guint) _tmp4_) >= (_tmp9_ - 1)) {
		result = FALSE;
		_g_object_unref0 (directory);
		return result;
	}
	_tmp10_ = directory;
	_tmp11_ = setting_object_get_parent ((SettingObject*) _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = _tmp12_->children;
	_tmp14_ = directory;
	_tmp15_ = directory_get_index (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_list_nth_data (_tmp13_, (guint) (_tmp16_ + 1));
	settings_model_set_iter (self, iter, (Directory*) _tmp17_);
	result = TRUE;
	_g_object_unref0 (directory);
	return result;
}


static gboolean settings_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent) {
	SettingsModel * self;
	GtkTreeIter _vala_iter = {0};
	gboolean result = FALSE;
	Directory* directory;
	GtkTreeIter* _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	GList* _tmp3_;
	guint _tmp4_;
	Directory* _tmp5_;
	GList* _tmp6_;
	gconstpointer _tmp7_;
	self = (SettingsModel*) base;
	memset (&_vala_iter, 0, sizeof (GtkTreeIter));
	_tmp0_ = parent;
	_tmp1_ = settings_model_get_directory (self, _tmp0_);
	directory = _tmp1_;
	_tmp2_ = directory;
	_tmp3_ = _tmp2_->children;
	_tmp4_ = g_list_length (_tmp3_);
	if (_tmp4_ == ((guint) 0)) {
		result = FALSE;
		_g_object_unref0 (directory);
		if (iter) {
			*iter = _vala_iter;
		}
		return result;
	}
	_tmp5_ = directory;
	_tmp6_ = _tmp5_->children;
	_tmp7_ = g_list_nth_data (_tmp6_, (guint) 0);
	settings_model_set_iter (self, &_vala_iter, (Directory*) _tmp7_);
	result = TRUE;
	_g_object_unref0 (directory);
	if (iter) {
		*iter = _vala_iter;
	}
	return result;
}


static gboolean settings_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	gboolean result = FALSE;
	GtkTreeIter _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	GList* _tmp3_;
	guint _tmp4_;
	gboolean _tmp5_;
	self = (SettingsModel*) base;
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = *iter;
	_tmp1_ = settings_model_get_directory (self, &_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->children;
	_tmp4_ = g_list_length (_tmp3_);
	_tmp5_ = _tmp4_ > ((guint) 0);
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}


static gint settings_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	gint result = 0;
	GtkTreeIter* _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	GList* _tmp3_;
	guint _tmp4_;
	gint _tmp5_;
	self = (SettingsModel*) base;
	_tmp0_ = iter;
	_tmp1_ = settings_model_get_directory (self, _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->children;
	_tmp4_ = g_list_length (_tmp3_);
	_tmp5_ = (gint) _tmp4_;
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}


static gboolean settings_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n) {
	SettingsModel * self;
	GtkTreeIter _vala_iter = {0};
	gboolean result = FALSE;
	Directory* directory;
	GtkTreeIter* _tmp0_;
	Directory* _tmp1_;
	gint _tmp2_;
	Directory* _tmp3_;
	GList* _tmp4_;
	guint _tmp5_;
	Directory* _tmp6_;
	GList* _tmp7_;
	gint _tmp8_;
	gconstpointer _tmp9_;
	self = (SettingsModel*) base;
	memset (&_vala_iter, 0, sizeof (GtkTreeIter));
	_tmp0_ = parent;
	_tmp1_ = settings_model_get_directory (self, _tmp0_);
	directory = _tmp1_;
	_tmp2_ = n;
	_tmp3_ = directory;
	_tmp4_ = _tmp3_->children;
	_tmp5_ = g_list_length (_tmp4_);
	if (((guint) _tmp2_) >= _tmp5_) {
		result = FALSE;
		_g_object_unref0 (directory);
		if (iter) {
			*iter = _vala_iter;
		}
		return result;
	}
	_tmp6_ = directory;
	_tmp7_ = _tmp6_->children;
	_tmp8_ = n;
	_tmp9_ = g_list_nth_data (_tmp7_, (guint) _tmp8_);
	settings_model_set_iter (self, &_vala_iter, (Directory*) _tmp9_);
	result = TRUE;
	_g_object_unref0 (directory);
	if (iter) {
		*iter = _vala_iter;
	}
	return result;
}


static gboolean settings_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child) {
	SettingsModel * self;
	GtkTreeIter _vala_iter = {0};
	gboolean result = FALSE;
	Directory* directory;
	GtkTreeIter _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	Directory* _tmp3_;
	Directory* _tmp4_;
	Directory* _tmp5_;
	Directory* _tmp6_;
	Directory* _tmp7_;
	Directory* _tmp8_;
	self = (SettingsModel*) base;
	g_return_val_if_fail (child != NULL, FALSE);
	memset (&_vala_iter, 0, sizeof (GtkTreeIter));
	_tmp0_ = *child;
	_tmp1_ = settings_model_get_directory (self, &_tmp0_);
	directory = _tmp1_;
	_tmp2_ = directory;
	_tmp3_ = setting_object_get_parent ((SettingObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->root;
	if (_tmp4_ == _tmp5_) {
		result = FALSE;
		_g_object_unref0 (directory);
		if (iter) {
			*iter = _vala_iter;
		}
		return result;
	}
	_tmp6_ = directory;
	_tmp7_ = setting_object_get_parent ((SettingObject*) _tmp6_);
	_tmp8_ = _tmp7_;
	settings_model_set_iter (self, &_vala_iter, _tmp8_);
	result = TRUE;
	_g_object_unref0 (directory);
	if (iter) {
		*iter = _vala_iter;
	}
	return result;
}


static void settings_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	GtkTreeIter _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	self = (SettingsModel*) base;
	g_return_if_fail (iter != NULL);
	_tmp0_ = *iter;
	_tmp1_ = settings_model_get_directory (self, &_tmp0_);
	_tmp2_ = _tmp1_;
	g_object_ref ((GObject*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}


static void settings_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter) {
	SettingsModel * self;
	GtkTreeIter _tmp0_;
	Directory* _tmp1_;
	Directory* _tmp2_;
	self = (SettingsModel*) base;
	g_return_if_fail (iter != NULL);
	_tmp0_ = *iter;
	_tmp1_ = settings_model_get_directory (self, &_tmp0_);
	_tmp2_ = _tmp1_;
	g_object_unref ((GObject*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}


static void settings_model_class_init (SettingsModelClass * klass) {
	settings_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (SettingsModelPrivate));
	G_OBJECT_CLASS (klass)->finalize = settings_model_finalize;
}


static void settings_model_gtk_tree_model_interface_init (GtkTreeModelIface * iface) {
	settings_model_gtk_tree_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_flags = (GtkTreeModelFlags (*) (GtkTreeModel *)) settings_model_real_get_flags;
	iface->get_n_columns = (gint (*) (GtkTreeModel *)) settings_model_real_get_n_columns;
	iface->get_column_type = (GType (*) (GtkTreeModel *, gint)) settings_model_real_get_column_type;
	iface->get_iter = (gboolean (*) (GtkTreeModel *, GtkTreeIter*, GtkTreePath*)) settings_model_real_get_iter;
	iface->get_path = (GtkTreePath* (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_get_path;
	iface->get_value = (void (*) (GtkTreeModel *, GtkTreeIter*, gint, GValue*)) settings_model_real_get_value;
	iface->iter_next = (gboolean (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_iter_next;
	iface->iter_children = (gboolean (*) (GtkTreeModel *, GtkTreeIter*, GtkTreeIter*)) settings_model_real_iter_children;
	iface->iter_has_child = (gboolean (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_iter_has_child;
	iface->iter_n_children = (gint (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_iter_n_children;
	iface->iter_nth_child = (gboolean (*) (GtkTreeModel *, GtkTreeIter*, GtkTreeIter*, gint)) settings_model_real_iter_nth_child;
	iface->iter_parent = (gboolean (*) (GtkTreeModel *, GtkTreeIter*, GtkTreeIter*)) settings_model_real_iter_parent;
	iface->ref_node = (void (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_ref_node;
	iface->unref_node = (void (*) (GtkTreeModel *, GtkTreeIter*)) settings_model_real_unref_node;
}


static void settings_model_instance_init (SettingsModel * self) {
	DConfClient* _tmp0_;
	self->priv = SETTINGS_MODEL_GET_PRIVATE (self);
	_tmp0_ = dconf_client_new ();
	self->priv->client = _tmp0_;
}


static void settings_model_finalize (GObject * obj) {
	SettingsModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SETTINGS_MODEL, SettingsModel);
	_g_object_unref0 (self->priv->client);
	_g_object_unref0 (self->priv->root);
	G_OBJECT_CLASS (settings_model_parent_class)->finalize (obj);
}


GType settings_model_get_type (void) {
	static volatile gsize settings_model_type_id__volatile = 0;
	if (g_once_init_enter (&settings_model_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SettingsModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsModel), 0, (GInstanceInitFunc) settings_model_instance_init, NULL };
		static const GInterfaceInfo gtk_tree_model_info = { (GInterfaceInitFunc) settings_model_gtk_tree_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType settings_model_type_id;
		settings_model_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsModel", &g_define_type_info, 0);
		g_type_add_interface_static (settings_model_type_id, GTK_TYPE_TREE_MODEL, &gtk_tree_model_info);
		g_once_init_leave (&settings_model_type_id__volatile, settings_model_type_id);
	}
	return settings_model_type_id__volatile;
}


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


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


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



