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

/* SPDX-License-Identifier: GPL-3.0-or-later*/

#include "graphs.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gee.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	GRAPHS_PARSER_0_PROPERTY,
	GRAPHS_PARSER_NAME_PROPERTY,
	GRAPHS_PARSER_UI_NAME_PROPERTY,
	GRAPHS_PARSER_FILETYPE_NAME_PROPERTY,
	GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY,
	GRAPHS_PARSER_NUM_PROPERTIES
};
static GParamSpec* graphs_parser_properties[GRAPHS_PARSER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	GRAPHS_DATA_IMPORTER_0_PROPERTY,
	GRAPHS_DATA_IMPORTER_NUM_PROPERTIES
};
static GParamSpec* graphs_data_importer_properties[GRAPHS_DATA_IMPORTER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))
typedef struct _Block6Data Block6Data;
enum  {
	GRAPHS_DATA_IMPORTER_GUESS_IMPORT_MODE_REQUEST_SIGNAL,
	GRAPHS_DATA_IMPORTER_INIT_IMPORT_SETTINGS_REQUEST_SIGNAL,
	GRAPHS_DATA_IMPORTER_APPEND_SETTINGS_WIDGETS_REQUEST_SIGNAL,
	GRAPHS_DATA_IMPORTER_PARSE_REQUEST_SIGNAL,
	GRAPHS_DATA_IMPORTER_NUM_SIGNALS
};
static guint graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_NUM_SIGNALS] = {0};
enum  {
	GRAPHS_IMPORT_SETTINGS_0_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY,
	GRAPHS_IMPORT_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
enum  {
	GRAPHS_IMPORT_SETTINGS_VALUE_CHANGED_SIGNAL,
	GRAPHS_IMPORT_SETTINGS_NUM_SIGNALS
};
static guint graphs_import_settings_signals[GRAPHS_IMPORT_SETTINGS_NUM_SIGNALS] = {0};

struct _GraphsParserPrivate {
	gchar* _name;
	gchar* _ui_name;
	gchar* _filetype_name;
	gchar** _file_suffixes;
	gint _file_suffixes_length1;
	gint __file_suffixes_size_;
};

struct _Block6Data {
	int _ref_count_;
	GraphsImportSettings* settings;
};

struct _GraphsImportSettingsPrivate {
	GFile* _file;
	gchar* _filename;
	guint _mode;
	gchar* _mode_name;
	gboolean _has_schema;
	gboolean _is_valid;
	GeeMap* settings;
	GeeMap* items;
};

static gint GraphsParser_private_offset;
static gpointer graphs_parser_parent_class = NULL;
static gpointer graphs_data_importer_parent_class = NULL;
static GListStore* graphs_data_importer__file_filters;
static GListStore* graphs_data_importer__file_filters = NULL;
static GSettings* graphs_data_importer_mode_settings;
static GSettings* graphs_data_importer_mode_settings = NULL;
static gchar** graphs_data_importer_mode_settings_list;
static gint graphs_data_importer_mode_settings_list_length1;
static gchar** graphs_data_importer_mode_settings_list = NULL;
static gint graphs_data_importer_mode_settings_list_length1 = 0;
static gint _graphs_data_importer_mode_settings_list_size_ = 0;
static GraphsParser** graphs_data_importer_parsers;
static gint graphs_data_importer_parsers_length1;
static GraphsParser** graphs_data_importer_parsers = NULL;
static gint graphs_data_importer_parsers_length1 = 0;
static gint _graphs_data_importer_parsers_size_ = 0;
static GtkStringList* graphs_data_importer_parser_names;
static GtkStringList* graphs_data_importer_parser_names = NULL;
static GraphsDataImporter* graphs_data_importer_instance;
static GraphsDataImporter* graphs_data_importer_instance = NULL;
static gint GraphsImportSettings_private_offset;
static gpointer graphs_import_settings_parent_class = NULL;

static gchar** _vala_array_dup10 (gchar** self,
                           gssize length);
static void graphs_parser_finalize (GObject * obj);
static GType graphs_parser_get_type_once (void);
static void _vala_graphs_parser_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _vala_graphs_parser_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec);
static GraphsParser** _vala_array_dup11 (GraphsParser** self,
                                  gssize length);
static void graphs_data_importer_init_file_filters (void);
static void graphs_data_importer_set_file_filters (GListStore* value);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gboolean graphs_data_importer_init_import_settings (GraphsImportSettings* settings);
static void __lambda37_ (Block6Data* _data6_);
static void ___lambda37__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void g_cclosure_user_marshal_UINT__OBJECT (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data);
static void g_cclosure_user_marshal_BOOLEAN__OBJECT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static void g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_STRING__OBJECT_OBJECT_OBJECT (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data);
static void graphs_data_importer_finalize (GObject * obj);
static GType graphs_data_importer_get_type_once (void);
static void _vala_graphs_data_importer_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_graphs_data_importer_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static void graphs_import_settings_set_has_schema (GraphsImportSettings* self,
                                            gboolean value);
static void g_cclosure_user_marshal_VOID__STRING_VARIANT (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void graphs_import_settings_finalize (GObject * obj);
static GType graphs_import_settings_get_type_once (void);
static void _vala_graphs_import_settings_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_graphs_import_settings_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
graphs_parser_get_instance_private (GraphsParser* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsParser_private_offset);
}

GraphsParser*
graphs_parser_construct (GType object_type)
{
	GraphsParser * self = NULL;
	self = (GraphsParser*) g_object_new (object_type, NULL);
	return self;
}

GraphsParser*
graphs_parser_new (void)
{
	return graphs_parser_construct (GRAPHS_TYPE_PARSER);
}

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

void
graphs_parser_set_name (GraphsParser* self,
                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_parser_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_parser_properties[GRAPHS_PARSER_NAME_PROPERTY]);
	}
}

const gchar*
graphs_parser_get_ui_name (GraphsParser* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ui_name;
	result = _tmp0_;
	return result;
}

void
graphs_parser_set_ui_name (GraphsParser* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_parser_get_ui_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_ui_name);
		self->priv->_ui_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_parser_properties[GRAPHS_PARSER_UI_NAME_PROPERTY]);
	}
}

const gchar*
graphs_parser_get_filetype_name (GraphsParser* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filetype_name;
	result = _tmp0_;
	return result;
}

void
graphs_parser_set_filetype_name (GraphsParser* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_parser_get_filetype_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_filetype_name);
		self->priv->_filetype_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_parser_properties[GRAPHS_PARSER_FILETYPE_NAME_PROPERTY]);
	}
}

gchar**
graphs_parser_get_file_suffixes (GraphsParser* self,
                                 gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_file_suffixes;
	_tmp0__length1 = self->priv->_file_suffixes_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup10 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
graphs_parser_set_file_suffixes (GraphsParser* self,
                                 gchar** value,
                                 gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = graphs_parser_get_file_suffixes (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup10 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_file_suffixes = (_vala_array_free (self->priv->_file_suffixes, self->priv->_file_suffixes_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_file_suffixes = _tmp0_;
		self->priv->_file_suffixes_length1 = _tmp0__length1;
		self->priv->__file_suffixes_size_ = self->priv->_file_suffixes_length1;
		g_object_notify_by_pspec ((GObject *) self, graphs_parser_properties[GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY]);
	}
}

static void
graphs_parser_class_init (GraphsParserClass * klass,
                          gpointer klass_data)
{
	graphs_parser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsParser_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_parser_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_parser_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_parser_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_PARSER_NAME_PROPERTY, graphs_parser_properties[GRAPHS_PARSER_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_PARSER_UI_NAME_PROPERTY, graphs_parser_properties[GRAPHS_PARSER_UI_NAME_PROPERTY] = g_param_spec_string ("ui-name", "ui-name", "ui-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_PARSER_FILETYPE_NAME_PROPERTY, graphs_parser_properties[GRAPHS_PARSER_FILETYPE_NAME_PROPERTY] = g_param_spec_string ("filetype-name", "filetype-name", "filetype-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY, graphs_parser_properties[GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY] = g_param_spec_boxed ("file-suffixes", "file-suffixes", "file-suffixes", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static void
graphs_parser_instance_init (GraphsParser * self,
                             gpointer klass)
{
	self->priv = graphs_parser_get_instance_private (self);
}

static void
graphs_parser_finalize (GObject * obj)
{
	GraphsParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_PARSER, GraphsParser);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_ui_name);
	_g_free0 (self->priv->_filetype_name);
	self->priv->_file_suffixes = (_vala_array_free (self->priv->_file_suffixes, self->priv->_file_suffixes_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (graphs_parser_parent_class)->finalize (obj);
}

static GType
graphs_parser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsParser), 0, (GInstanceInitFunc) graphs_parser_instance_init, NULL };
	GType graphs_parser_type_id;
	graphs_parser_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsParser", &g_define_type_info, 0);
	GraphsParser_private_offset = g_type_add_instance_private (graphs_parser_type_id, sizeof (GraphsParserPrivate));
	return graphs_parser_type_id;
}

GType
graphs_parser_get_type (void)
{
	static volatile gsize graphs_parser_type_id__once = 0;
	if (g_once_init_enter (&graphs_parser_type_id__once)) {
		GType graphs_parser_type_id;
		graphs_parser_type_id = graphs_parser_get_type_once ();
		g_once_init_leave (&graphs_parser_type_id__once, graphs_parser_type_id);
	}
	return graphs_parser_type_id__once;
}

static void
_vala_graphs_parser_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	GraphsParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_PARSER, GraphsParser);
	switch (property_id) {
		case GRAPHS_PARSER_NAME_PROPERTY:
		g_value_set_string (value, graphs_parser_get_name (self));
		break;
		case GRAPHS_PARSER_UI_NAME_PROPERTY:
		g_value_set_string (value, graphs_parser_get_ui_name (self));
		break;
		case GRAPHS_PARSER_FILETYPE_NAME_PROPERTY:
		g_value_set_string (value, graphs_parser_get_filetype_name (self));
		break;
		case GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, graphs_parser_get_file_suffixes (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_parser_set_property (GObject * object,
                                  guint property_id,
                                  const GValue * value,
                                  GParamSpec * pspec)
{
	GraphsParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_PARSER, GraphsParser);
	switch (property_id) {
		case GRAPHS_PARSER_NAME_PROPERTY:
		graphs_parser_set_name (self, g_value_get_string (value));
		break;
		case GRAPHS_PARSER_UI_NAME_PROPERTY:
		graphs_parser_set_ui_name (self, g_value_get_string (value));
		break;
		case GRAPHS_PARSER_FILETYPE_NAME_PROPERTY:
		graphs_parser_set_filetype_name (self, g_value_get_string (value));
		break;
		case GRAPHS_PARSER_FILE_SUFFIXES_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			graphs_parser_set_file_suffixes (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

static GraphsParser**
_vala_array_dup11 (GraphsParser** self,
                   gssize length)
{
	if (length >= 0) {
		GraphsParser** result;
		gssize i;
		result = g_new0 (GraphsParser*, length + 1);
		for (i = 0; i < length; i++) {
			GraphsParser* _tmp0_;
			_tmp0_ = _g_object_ref0 (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
graphs_data_importer_setup (GraphsDataImporter* self,
                            GraphsParser** parsers,
                            gint parsers_length1)
{
	GraphsParser** _tmp0_;
	gint _tmp0__length1;
	GSettings* _tmp6_;
	GSettings* _tmp7_;
	GSettingsSchema* _tmp8_;
	GSettingsSchema* _tmp9_;
	GSettingsSchema* _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	GraphsDataImporter* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (parsers != NULL) ? _vala_array_dup11 (parsers, parsers_length1) : parsers;
	_tmp0__length1 = parsers_length1;
	graphs_data_importer_parsers = (_vala_array_free (graphs_data_importer_parsers, graphs_data_importer_parsers_length1, (GDestroyNotify) g_object_unref), NULL);
	graphs_data_importer_parsers = _tmp0_;
	graphs_data_importer_parsers_length1 = _tmp0__length1;
	_graphs_data_importer_parsers_size_ = graphs_data_importer_parsers_length1;
	{
		GraphsParser** parser_collection = NULL;
		gint parser_collection_length1 = 0;
		gint _parser_collection_size_ = 0;
		gint parser_it = 0;
		parser_collection = parsers;
		parser_collection_length1 = parsers_length1;
		for (parser_it = 0; parser_it < parser_collection_length1; parser_it = parser_it + 1) {
			GraphsParser* _tmp1_;
			GraphsParser* parser = NULL;
			_tmp1_ = _g_object_ref0 (parser_collection[parser_it]);
			parser = _tmp1_;
			{
				GtkStringList* _tmp2_;
				GraphsParser* _tmp3_;
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				_tmp2_ = graphs_data_importer_parser_names;
				_tmp3_ = parser;
				_tmp4_ = graphs_parser_get_ui_name (_tmp3_);
				_tmp5_ = _tmp4_;
				gtk_string_list_append (_tmp2_, _tmp5_);
				_g_object_unref0 (parser);
			}
		}
	}
	_tmp6_ = graphs_application_get_settings_child ("import-params");
	_g_object_unref0 (graphs_data_importer_mode_settings);
	graphs_data_importer_mode_settings = _tmp6_;
	_tmp7_ = graphs_data_importer_mode_settings;
	g_object_get (_tmp7_, "settings-schema", &_tmp8_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_;
	_tmp12_ = _tmp11_ = g_settings_schema_list_children (_tmp10_);
	graphs_data_importer_mode_settings_list = (_vala_array_free (graphs_data_importer_mode_settings_list, graphs_data_importer_mode_settings_list_length1, (GDestroyNotify) g_free), NULL);
	graphs_data_importer_mode_settings_list = _tmp12_;
	graphs_data_importer_mode_settings_list_length1 = _vala_array_length (_tmp11_);
	_graphs_data_importer_mode_settings_list_size_ = graphs_data_importer_mode_settings_list_length1;
	_g_settings_schema_unref0 (_tmp10_);
	graphs_data_importer_init_file_filters ();
	_tmp13_ = _g_object_ref0 (self);
	_g_object_unref0 (graphs_data_importer_instance);
	graphs_data_importer_instance = _tmp13_;
}

static void
graphs_data_importer_init_file_filters (void)
{
	GListStore* _tmp0_;
	GListStore* _tmp1_;
	GtkFileFilter* supported_filter = NULL;
	gchar* _tmp2_;
	GtkFileFilter* _tmp3_ = NULL;
	GListStore* _tmp4_;
	GListStore* _tmp5_;
	GtkFileFilter* _tmp6_;
	GtkFileFilter* ascii_filter = NULL;
	gchar* _tmp7_;
	GtkFileFilter* _tmp8_ = NULL;
	gchar** ascii_suffixes = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar** _tmp13_;
	gint ascii_suffixes_length1;
	gint _ascii_suffixes_size_;
	gchar** _tmp14_;
	gint _tmp14__length1;
	GListStore* _tmp20_;
	GListStore* _tmp21_;
	GtkFileFilter* _tmp22_;
	GraphsParser** _tmp23_;
	gint _tmp23__length1;
	GListStore* _tmp45_;
	GListStore* _tmp46_;
	GtkFileFilter* _tmp47_;
	GtkFileFilter* _tmp48_;
	_tmp0_ = g_list_store_new (gtk_file_filter_get_type ());
	_tmp1_ = _tmp0_;
	graphs_data_importer_set_file_filters (_tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = g_strdup (C_ ("file-filter", "Supported files"));
	_tmp3_ = gtk_file_filter_new ();
	g_object_set (_tmp3_, "name", _tmp2_, NULL);
	_g_free0 (_tmp2_);
	supported_filter = _tmp3_;
	_tmp4_ = graphs_data_importer_get_file_filters ();
	_tmp5_ = _tmp4_;
	_tmp6_ = supported_filter;
	g_list_store_append (_tmp5_, (GObject*) _tmp6_);
	_tmp7_ = g_strdup (C_ ("file-filter", "ASCII files"));
	_tmp8_ = gtk_file_filter_new ();
	g_object_set (_tmp8_, "name", _tmp7_, NULL);
	_g_free0 (_tmp7_);
	ascii_filter = _tmp8_;
	_tmp9_ = g_strdup ("xy");
	_tmp10_ = g_strdup ("dat");
	_tmp11_ = g_strdup ("txt");
	_tmp12_ = g_strdup ("csv");
	_tmp13_ = g_new0 (gchar*, 4 + 1);
	_tmp13_[0] = _tmp9_;
	_tmp13_[1] = _tmp10_;
	_tmp13_[2] = _tmp11_;
	_tmp13_[3] = _tmp12_;
	ascii_suffixes = _tmp13_;
	ascii_suffixes_length1 = 4;
	_ascii_suffixes_size_ = ascii_suffixes_length1;
	_tmp14_ = ascii_suffixes;
	_tmp14__length1 = ascii_suffixes_length1;
	{
		gchar** suffix_collection = NULL;
		gint suffix_collection_length1 = 0;
		gint _suffix_collection_size_ = 0;
		gint suffix_it = 0;
		suffix_collection = _tmp14_;
		suffix_collection_length1 = _tmp14__length1;
		for (suffix_it = 0; suffix_it < suffix_collection_length1; suffix_it = suffix_it + 1) {
			gchar* _tmp15_;
			gchar* suffix = NULL;
			_tmp15_ = g_strdup (suffix_collection[suffix_it]);
			suffix = _tmp15_;
			{
				GtkFileFilter* _tmp16_;
				const gchar* _tmp17_;
				GtkFileFilter* _tmp18_;
				const gchar* _tmp19_;
				_tmp16_ = ascii_filter;
				_tmp17_ = suffix;
				gtk_file_filter_add_suffix (_tmp16_, _tmp17_);
				_tmp18_ = supported_filter;
				_tmp19_ = suffix;
				gtk_file_filter_add_suffix (_tmp18_, _tmp19_);
				_g_free0 (suffix);
			}
		}
	}
	_tmp20_ = graphs_data_importer_get_file_filters ();
	_tmp21_ = _tmp20_;
	_tmp22_ = ascii_filter;
	g_list_store_append (_tmp21_, (GObject*) _tmp22_);
	_tmp23_ = graphs_data_importer_parsers;
	_tmp23__length1 = graphs_data_importer_parsers_length1;
	{
		GraphsParser** parser_collection = NULL;
		gint parser_collection_length1 = 0;
		gint _parser_collection_size_ = 0;
		gint parser_it = 0;
		parser_collection = _tmp23_;
		parser_collection_length1 = _tmp23__length1;
		for (parser_it = 0; parser_it < parser_collection_length1; parser_it = parser_it + 1) {
			GraphsParser* _tmp24_;
			GraphsParser* parser = NULL;
			_tmp24_ = _g_object_ref0 (parser_collection[parser_it]);
			parser = _tmp24_;
			{
				GraphsParser* _tmp25_;
				const gchar* _tmp26_;
				const gchar* _tmp27_;
				GtkFileFilter* filter = NULL;
				GraphsParser* _tmp28_;
				const gchar* _tmp29_;
				const gchar* _tmp30_;
				gchar* _tmp31_;
				GtkFileFilter* _tmp32_ = NULL;
				GraphsParser* _tmp33_;
				gchar** _tmp34_;
				gint _tmp34__length1;
				gint _tmp35_ = 0;
				gchar** _tmp36_;
				gint _tmp36__length1;
				GListStore* _tmp42_;
				GListStore* _tmp43_;
				GtkFileFilter* _tmp44_;
				_tmp25_ = parser;
				_tmp26_ = graphs_parser_get_name (_tmp25_);
				_tmp27_ = _tmp26_;
				if (g_strcmp0 (_tmp27_, "columns") == 0) {
					_g_object_unref0 (parser);
					continue;
				}
				_tmp28_ = parser;
				_tmp29_ = graphs_parser_get_filetype_name (_tmp28_);
				_tmp30_ = _tmp29_;
				_tmp31_ = g_strdup (_tmp30_);
				_tmp32_ = gtk_file_filter_new ();
				g_object_set (_tmp32_, "name", _tmp31_, NULL);
				_g_free0 (_tmp31_);
				filter = _tmp32_;
				_tmp33_ = parser;
				_tmp34_ = graphs_parser_get_file_suffixes (_tmp33_, &_tmp35_);
				_tmp34__length1 = _tmp35_;
				_tmp36_ = _tmp34_;
				_tmp36__length1 = _tmp34__length1;
				{
					gchar** suffix_collection = NULL;
					gint suffix_collection_length1 = 0;
					gint _suffix_collection_size_ = 0;
					gint suffix_it = 0;
					suffix_collection = _tmp36_;
					suffix_collection_length1 = _tmp36__length1;
					for (suffix_it = 0; suffix_it < suffix_collection_length1; suffix_it = suffix_it + 1) {
						gchar* _tmp37_;
						gchar* suffix = NULL;
						_tmp37_ = g_strdup (suffix_collection[suffix_it]);
						suffix = _tmp37_;
						{
							GtkFileFilter* _tmp38_;
							const gchar* _tmp39_;
							GtkFileFilter* _tmp40_;
							const gchar* _tmp41_;
							_tmp38_ = filter;
							_tmp39_ = suffix;
							gtk_file_filter_add_suffix (_tmp38_, _tmp39_);
							_tmp40_ = supported_filter;
							_tmp41_ = suffix;
							gtk_file_filter_add_suffix (_tmp40_, _tmp41_);
							_g_free0 (suffix);
						}
					}
				}
				_tmp42_ = graphs_data_importer_get_file_filters ();
				_tmp43_ = _tmp42_;
				_tmp44_ = filter;
				g_list_store_append (_tmp43_, (GObject*) _tmp44_);
				_g_object_unref0 (filter);
				_g_object_unref0 (parser);
			}
		}
	}
	_tmp45_ = graphs_data_importer_get_file_filters ();
	_tmp46_ = _tmp45_;
	_tmp47_ = graphs_tools_create_all_filter ();
	_tmp48_ = _tmp47_;
	g_list_store_append (_tmp46_, (GObject*) _tmp48_);
	_g_object_unref0 (_tmp48_);
	ascii_suffixes = (_vala_array_free (ascii_suffixes, ascii_suffixes_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (ascii_filter);
	_g_object_unref0 (supported_filter);
}

GtkWidget*
graphs_data_importer_append_settings_widgets (GraphsImportSettings* settings,
                                              GtkBox* settings_box)
{
	GraphsDataImporter* _tmp0_;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (settings != NULL, NULL);
	g_return_val_if_fail (settings_box != NULL, NULL);
	_tmp0_ = graphs_data_importer_instance;
	g_signal_emit (_tmp0_, graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_APPEND_SETTINGS_WIDGETS_REQUEST_SIGNAL], 0, settings, settings_box, &_tmp1_);
	result = _tmp1_;
	return result;
}

GtkStringList*
graphs_data_importer_get_parser_names (void)
{
	GtkStringList* _tmp0_;
	GtkStringList* _tmp1_;
	GtkStringList* result;
	_tmp0_ = graphs_data_importer_parser_names;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		_g_object_unref0 (_data6_->settings);
		g_slice_free (Block6Data, _data6_);
	}
}

static void
__lambda37_ (Block6Data* _data6_)
{
	graphs_import_settings_set_is_valid (_data6_->settings, graphs_data_importer_init_import_settings (_data6_->settings));
}

static void
___lambda37__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda37_ (self);
}

GraphsImportSettings*
graphs_data_importer_get_settings_for_file (GFile* file)
{
	Block6Data* _data6_;
	GraphsImportSettings* _tmp0_;
	GraphsDataImporter* _tmp1_;
	guint _tmp2_ = 0U;
	GraphsImportSettings* _tmp3_;
	GraphsImportSettings* result;
	g_return_val_if_fail (file != NULL, NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_tmp0_ = graphs_import_settings_new (file);
	_data6_->settings = _tmp0_;
	_tmp1_ = graphs_data_importer_instance;
	g_signal_emit (_tmp1_, graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_GUESS_IMPORT_MODE_REQUEST_SIGNAL], 0, _data6_->settings, &_tmp2_);
	graphs_import_settings_set_mode (_data6_->settings, _tmp2_);
	graphs_import_settings_set_is_valid (_data6_->settings, graphs_data_importer_init_import_settings (_data6_->settings));
	g_signal_connect_data ((GObject*) _data6_->settings, "notify::mode", (GCallback) ___lambda37__g_object_notify, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_tmp3_ = _g_object_ref0 (_data6_->settings);
	result = _tmp3_;
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return result;
}

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

void
graphs_data_importer_set_as_default (GraphsImportSettings* settings)
{
	gchar* name = NULL;
	GraphsParser** _tmp0_;
	gint _tmp0__length1;
	guint _tmp1_;
	guint _tmp2_;
	GraphsParser* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	GSettings* _tmp9_;
	const gchar* _tmp10_;
	GSettings* _tmp11_;
	GSettings* _tmp12_;
	g_return_if_fail (settings != NULL);
	_tmp0_ = graphs_data_importer_parsers;
	_tmp0__length1 = graphs_data_importer_parsers_length1;
	_tmp1_ = graphs_import_settings_get_mode (settings);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp0_[_tmp2_];
	_tmp4_ = graphs_parser_get_name (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup (_tmp5_);
	name = _tmp6_;
	_tmp7_ = name;
	_tmp8_ = graphs_data_importer_mode_settings_list;
	_tmp8__length1 = graphs_data_importer_mode_settings_list_length1;
	if (!_vala_string_array_contains (_tmp8_, _tmp8__length1, _tmp7_)) {
		_g_free0 (name);
		return;
	}
	_tmp9_ = graphs_data_importer_mode_settings;
	_tmp10_ = name;
	_tmp11_ = g_settings_get_child (_tmp9_, _tmp10_);
	_tmp12_ = _tmp11_;
	graphs_import_settings_set_as_default (settings, _tmp12_);
	_g_object_unref0 (_tmp12_);
	_g_free0 (name);
}

void
graphs_data_importer_reset (GraphsImportSettings* settings)
{
	guint guessed_mode = 0U;
	GraphsDataImporter* _tmp0_;
	guint _tmp1_ = 0U;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (settings != NULL);
	_tmp0_ = graphs_data_importer_instance;
	g_signal_emit (_tmp0_, graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_GUESS_IMPORT_MODE_REQUEST_SIGNAL], 0, settings, &_tmp1_);
	guessed_mode = _tmp1_;
	_tmp2_ = graphs_import_settings_get_mode (settings);
	_tmp3_ = _tmp2_;
	if (guessed_mode == _tmp3_) {
		graphs_data_importer_init_import_settings (settings);
	} else {
		graphs_import_settings_set_mode (settings, guessed_mode);
	}
}

gchar*
graphs_data_importer_parse (GraphsItemList* itemlist,
                            GraphsImportSettings* settings,
                            GraphsData* data)
{
	GraphsDataImporter* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* result;
	g_return_val_if_fail (itemlist != NULL, NULL);
	g_return_val_if_fail (settings != NULL, NULL);
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = graphs_data_importer_instance;
	g_signal_emit (_tmp0_, graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_PARSE_REQUEST_SIGNAL], 0, itemlist, settings, data, &_tmp1_);
	result = _tmp1_;
	return result;
}

static gboolean
graphs_data_importer_init_import_settings (GraphsImportSettings* settings)
{
	GtkStringList* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	const gchar* _tmp3_;
	gchar* name = NULL;
	GraphsParser** _tmp4_;
	gint _tmp4__length1;
	guint _tmp5_;
	guint _tmp6_;
	GraphsParser* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	GSettings* _tmp11_ = NULL;
	const gchar* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	GraphsDataImporter* _tmp17_;
	gboolean _tmp18_ = FALSE;
	gboolean result;
	g_return_val_if_fail (settings != NULL, FALSE);
	_tmp0_ = graphs_data_importer_parser_names;
	_tmp1_ = graphs_import_settings_get_mode (settings);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_string_list_get_string (_tmp0_, _tmp2_);
	graphs_import_settings_set_mode_name (settings, _tmp3_);
	_tmp4_ = graphs_data_importer_parsers;
	_tmp4__length1 = graphs_data_importer_parsers_length1;
	_tmp5_ = graphs_import_settings_get_mode (settings);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp4_[_tmp6_];
	_tmp8_ = graphs_parser_get_name (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_strdup (_tmp9_);
	name = _tmp10_;
	_tmp12_ = name;
	_tmp13_ = graphs_data_importer_mode_settings_list;
	_tmp13__length1 = graphs_data_importer_mode_settings_list_length1;
	if (_vala_string_array_contains (_tmp13_, _tmp13__length1, _tmp12_)) {
		GSettings* _tmp14_;
		const gchar* _tmp15_;
		GSettings* _tmp16_;
		_tmp14_ = graphs_data_importer_mode_settings;
		_tmp15_ = name;
		_tmp16_ = g_settings_get_child (_tmp14_, _tmp15_);
		_g_object_unref0 (_tmp11_);
		_tmp11_ = _tmp16_;
	} else {
		_g_object_unref0 (_tmp11_);
		_tmp11_ = NULL;
	}
	graphs_import_settings_load_from_settings (settings, _tmp11_);
	_tmp17_ = graphs_data_importer_instance;
	g_signal_emit (_tmp17_, graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_INIT_IMPORT_SETTINGS_REQUEST_SIGNAL], 0, settings, &_tmp18_);
	result = _tmp18_;
	_g_object_unref0 (_tmp11_);
	_g_free0 (name);
	return result;
}

GraphsDataImporter*
graphs_data_importer_construct (GType object_type)
{
	GraphsDataImporter * self = NULL;
	self = (GraphsDataImporter*) g_object_new (object_type, NULL);
	return self;
}

GraphsDataImporter*
graphs_data_importer_new (void)
{
	return graphs_data_importer_construct (GRAPHS_TYPE_DATA_IMPORTER);
}

GListStore*
graphs_data_importer_get_file_filters (void)
{
	GListStore* result;
	GListStore* _tmp0_;
	_tmp0_ = graphs_data_importer__file_filters;
	result = _tmp0_;
	return result;
}

static void
graphs_data_importer_set_file_filters (GListStore* value)
{
	GListStore* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (graphs_data_importer__file_filters);
	graphs_data_importer__file_filters = _tmp0_;
}

static void
g_cclosure_user_marshal_UINT__OBJECT (GClosure * closure,
                                      GValue * return_value,
                                      guint n_param_values,
                                      const GValue * param_values,
                                      gpointer invocation_hint,
                                      gpointer marshal_data)
{
	typedef guint (*GMarshalFunc_UINT__OBJECT) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_UINT__OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	guint v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_UINT__OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), data2);
	g_value_set_uint (return_value, v_return);
}

static void
g_cclosure_user_marshal_BOOLEAN__OBJECT (GClosure * closure,
                                         GValue * return_value,
                                         guint n_param_values,
                                         const GValue * param_values,
                                         gpointer invocation_hint,
                                         gpointer marshal_data)
{
	typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_BOOLEAN__OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gboolean v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), data2);
	g_value_set_boolean (return_value, v_return);
}

static void
g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_OBJECT__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
	g_value_take_object (return_value, v_return);
}

static void
g_cclosure_user_marshal_STRING__OBJECT_OBJECT_OBJECT (GClosure * closure,
                                                      GValue * return_value,
                                                      guint n_param_values,
                                                      const GValue * param_values,
                                                      gpointer invocation_hint,
                                                      gpointer marshal_data)
{
	typedef const char* (*GMarshalFunc_STRING__OBJECT_OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2);
	register GMarshalFunc_STRING__OBJECT_OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	const char* v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_STRING__OBJECT_OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_object (param_values + 3), data2);
	g_value_take_string (return_value, v_return);
}

static void
graphs_data_importer_class_init (GraphsDataImporterClass * klass,
                                 gpointer klass_data)
{
	GtkStringList* _tmp0_;
	graphs_data_importer_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_data_importer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_data_importer_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_data_importer_finalize;
	graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_GUESS_IMPORT_MODE_REQUEST_SIGNAL] = g_signal_new ("guess-import-mode-request", GRAPHS_TYPE_DATA_IMPORTER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_UINT__OBJECT, G_TYPE_UINT, 1, GRAPHS_TYPE_IMPORT_SETTINGS);
	graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_INIT_IMPORT_SETTINGS_REQUEST_SIGNAL] = g_signal_new ("init-import-settings-request", GRAPHS_TYPE_DATA_IMPORTER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__OBJECT, G_TYPE_BOOLEAN, 1, GRAPHS_TYPE_IMPORT_SETTINGS);
	graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_APPEND_SETTINGS_WIDGETS_REQUEST_SIGNAL] = g_signal_new ("append-settings-widgets-request", GRAPHS_TYPE_DATA_IMPORTER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT, gtk_widget_get_type (), 2, GRAPHS_TYPE_IMPORT_SETTINGS, gtk_box_get_type ());
	graphs_data_importer_signals[GRAPHS_DATA_IMPORTER_PARSE_REQUEST_SIGNAL] = g_signal_new ("parse-request", GRAPHS_TYPE_DATA_IMPORTER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_STRING__OBJECT_OBJECT_OBJECT, G_TYPE_STRING, 3, GRAPHS_TYPE_ITEM_LIST, GRAPHS_TYPE_IMPORT_SETTINGS, GRAPHS_TYPE_DATA);
	_tmp0_ = gtk_string_list_new (NULL);
	graphs_data_importer_parser_names = _tmp0_;
}

static void
graphs_data_importer_instance_init (GraphsDataImporter * self,
                                    gpointer klass)
{
}

static void
graphs_data_importer_finalize (GObject * obj)
{
	GraphsDataImporter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_DATA_IMPORTER, GraphsDataImporter);
	G_OBJECT_CLASS (graphs_data_importer_parent_class)->finalize (obj);
}

static GType
graphs_data_importer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsDataImporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_data_importer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsDataImporter), 0, (GInstanceInitFunc) graphs_data_importer_instance_init, NULL };
	GType graphs_data_importer_type_id;
	graphs_data_importer_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsDataImporter", &g_define_type_info, 0);
	return graphs_data_importer_type_id;
}

GType
graphs_data_importer_get_type (void)
{
	static volatile gsize graphs_data_importer_type_id__once = 0;
	if (g_once_init_enter (&graphs_data_importer_type_id__once)) {
		GType graphs_data_importer_type_id;
		graphs_data_importer_type_id = graphs_data_importer_get_type_once ();
		g_once_init_leave (&graphs_data_importer_type_id__once, graphs_data_importer_type_id);
	}
	return graphs_data_importer_type_id__once;
}

static void
_vala_graphs_data_importer_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	GraphsDataImporter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_DATA_IMPORTER, GraphsDataImporter);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_data_importer_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	GraphsDataImporter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_DATA_IMPORTER, GraphsDataImporter);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
graphs_import_settings_get_instance_private (GraphsImportSettings* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsImportSettings_private_offset);
}

GraphsImportSettings*
graphs_import_settings_construct (GType object_type,
                                  GFile* file)
{
	GraphsImportSettings * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (file != NULL, NULL);
	_tmp0_ = graphs_tools_get_filename (file);
	_tmp1_ = _tmp0_;
	self = (GraphsImportSettings*) g_object_new (object_type, "file", file, "filename", _tmp1_, NULL);
	_g_free0 (_tmp1_);
	return self;
}

GraphsImportSettings*
graphs_import_settings_new (GFile* file)
{
	return graphs_import_settings_construct (GRAPHS_TYPE_IMPORT_SETTINGS, file);
}

void
graphs_import_settings_load_from_settings (GraphsImportSettings* self,
                                           GSettings* default_settings)
{
	gchar** keys = NULL;
	GSettingsSchema* _tmp0_;
	GSettingsSchema* _tmp1_;
	GSettingsSchema* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint keys_length1;
	gint _keys_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	gchar** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (self != NULL);
	if (default_settings == NULL) {
		graphs_import_settings_set_has_schema (self, FALSE);
		return;
	}
	g_object_get (default_settings, "settings-schema", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp4_ = _tmp3_ = g_settings_schema_list_keys (_tmp2_);
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _vala_array_length (_tmp3_);
	_g_settings_schema_unref0 (_tmp2_);
	keys = _tmp5_;
	keys_length1 = _tmp5__length1;
	_keys_size_ = keys_length1;
	_tmp6_ = keys;
	_tmp6__length1 = keys_length1;
	graphs_import_settings_set_has_schema (self, _tmp6__length1 > 0);
	_tmp7_ = keys;
	_tmp7__length1 = keys_length1;
	{
		gchar** key_collection = NULL;
		gint key_collection_length1 = 0;
		gint _key_collection_size_ = 0;
		gint key_it = 0;
		key_collection = _tmp7_;
		key_collection_length1 = _tmp7__length1;
		for (key_it = 0; key_it < key_collection_length1; key_it = key_it + 1) {
			gchar* _tmp8_;
			gchar* key = NULL;
			_tmp8_ = g_strdup (key_collection[key_it]);
			key = _tmp8_;
			{
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				GVariant* _tmp11_;
				GVariant* _tmp12_;
				_tmp9_ = key;
				_tmp10_ = key;
				_tmp11_ = g_settings_get_value (default_settings, _tmp10_);
				_tmp12_ = _tmp11_;
				graphs_import_settings_set_value (self, _tmp9_, _tmp12_);
				_g_variant_unref0 (_tmp12_);
				_g_free0 (key);
			}
		}
	}
	keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
}

void
graphs_import_settings_set_as_default (GraphsImportSettings* self,
                                       GSettings* settings)
{
	GSettingsSchema* _tmp0_;
	GSettingsSchema* _tmp1_;
	GSettingsSchema* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (settings != NULL);
	g_object_get (settings, "settings-schema", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp4_ = _tmp3_ = g_settings_schema_list_keys (_tmp2_);
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _vala_array_length (_tmp3_);
	_g_settings_schema_unref0 (_tmp2_);
	{
		gchar** key_collection = NULL;
		gint key_collection_length1 = 0;
		gint _key_collection_size_ = 0;
		gint key_it = 0;
		key_collection = _tmp5_;
		key_collection_length1 = _tmp5__length1;
		for (key_it = 0; key_it < key_collection_length1; key_it = key_it + 1) {
			gchar* _tmp6_;
			gchar* key = NULL;
			_tmp6_ = g_strdup (key_collection[key_it]);
			key = _tmp6_;
			{
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				GVariant* _tmp9_;
				GVariant* _tmp10_;
				_tmp7_ = key;
				_tmp8_ = key;
				_tmp9_ = graphs_import_settings_get_value (self, _tmp8_);
				_tmp10_ = _tmp9_;
				g_settings_set_value (settings, _tmp7_, _tmp10_);
				_g_variant_unref0 (_tmp10_);
				_g_free0 (key);
			}
		}
		key_collection = (_vala_array_free (key_collection, key_collection_length1, (GDestroyNotify) g_free), NULL);
	}
}

void
graphs_import_settings_set_item (GraphsImportSettings* self,
                                 const gchar* key,
                                 GObject* item)
{
	GeeMap* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->items;
	gee_map_set (_tmp0_, key, item);
}

GObject*
graphs_import_settings_get_item (GraphsImportSettings* self,
                                 const gchar* key)
{
	GeeMap* _tmp0_;
	gpointer _tmp1_;
	GObject* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = self->priv->items;
	_tmp1_ = gee_map_get (_tmp0_, key);
	result = (GObject*) _tmp1_;
	return result;
}

void
graphs_import_settings_set_value (GraphsImportSettings* self,
                                  const gchar* key,
                                  GVariant* val)
{
	GeeMap* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	g_return_if_fail (val != NULL);
	_tmp0_ = self->priv->settings;
	gee_map_set (_tmp0_, key, val);
	g_signal_emit (self, graphs_import_settings_signals[GRAPHS_IMPORT_SETTINGS_VALUE_CHANGED_SIGNAL], 0, key, val);
}

GVariant*
graphs_import_settings_get_value (GraphsImportSettings* self,
                                  const gchar* key)
{
	GeeMap* _tmp0_;
	gpointer _tmp1_;
	GVariant* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = gee_map_get (_tmp0_, key);
	result = (GVariant*) _tmp1_;
	return result;
}

void
graphs_import_settings_set_string (GraphsImportSettings* self,
                                   const gchar* key,
                                   const gchar* val)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	g_return_if_fail (val != NULL);
	_tmp0_ = g_variant_new_string (val);
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	graphs_import_settings_set_value (self, key, _tmp1_);
	_g_variant_unref0 (_tmp1_);
}

gchar*
graphs_import_settings_get_string (GraphsImportSettings* self,
                                   const gchar* key)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = graphs_import_settings_get_value (self, key);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_get_string (_tmp1_, NULL);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_g_variant_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

void
graphs_import_settings_set_int (GraphsImportSettings* self,
                                const gchar* key,
                                gint val)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	_tmp0_ = g_variant_new_int32 ((gint32) val);
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	graphs_import_settings_set_value (self, key, _tmp1_);
	_g_variant_unref0 (_tmp1_);
}

gint
graphs_import_settings_get_int (GraphsImportSettings* self,
                                const gchar* key)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	gint _tmp2_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (key != NULL, -1);
	_tmp0_ = graphs_import_settings_get_value (self, key);
	_tmp1_ = _tmp0_;
	_tmp2_ = (gint) g_variant_get_int32 (_tmp1_);
	_g_variant_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

void
graphs_import_settings_set_boolean (GraphsImportSettings* self,
                                    const gchar* key,
                                    gboolean val)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	_tmp0_ = g_variant_new_boolean (val);
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	graphs_import_settings_set_value (self, key, _tmp1_);
	_g_variant_unref0 (_tmp1_);
}

gboolean
graphs_import_settings_get_boolean (GraphsImportSettings* self,
                                    const gchar* key)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp0_ = graphs_import_settings_get_value (self, key);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_get_boolean (_tmp1_);
	_g_variant_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

GFile*
graphs_import_settings_get_file (GraphsImportSettings* self)
{
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_file;
	result = _tmp0_;
	return result;
}

void
graphs_import_settings_set_file (GraphsImportSettings* self,
                                 GFile* value)
{
	GFile* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_file (self);
	if (old_value != value) {
		GFile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_file);
		self->priv->_file = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY]);
	}
}

const gchar*
graphs_import_settings_get_filename (GraphsImportSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filename;
	result = _tmp0_;
	return result;
}

void
graphs_import_settings_set_filename (GraphsImportSettings* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_filename (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_filename);
		self->priv->_filename = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY]);
	}
}

guint
graphs_import_settings_get_mode (GraphsImportSettings* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_mode;
	return result;
}

void
graphs_import_settings_set_mode (GraphsImportSettings* self,
                                 guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_mode (self);
	if (old_value != value) {
		self->priv->_mode = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY]);
	}
}

const gchar*
graphs_import_settings_get_mode_name (GraphsImportSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mode_name;
	result = _tmp0_;
	return result;
}

void
graphs_import_settings_set_mode_name (GraphsImportSettings* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_mode_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_mode_name);
		self->priv->_mode_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY]);
	}
}

gboolean
graphs_import_settings_get_has_schema (GraphsImportSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_schema;
	return result;
}

static void
graphs_import_settings_set_has_schema (GraphsImportSettings* self,
                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_has_schema (self);
	if (old_value != value) {
		self->priv->_has_schema = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY]);
	}
}

gboolean
graphs_import_settings_get_is_valid (GraphsImportSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_valid;
	return result;
}

void
graphs_import_settings_set_is_valid (GraphsImportSettings* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_import_settings_get_is_valid (self);
	if (old_value != value) {
		self->priv->_is_valid = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_VOID__STRING_VARIANT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_VARIANT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_variant (param_values + 2), data2);
}

static void
graphs_import_settings_class_init (GraphsImportSettingsClass * klass,
                                   gpointer klass_data)
{
	graphs_import_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsImportSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_import_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_import_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_import_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY] = g_param_spec_object ("file", "file", "file", g_file_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY] = g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY] = g_param_spec_uint ("mode", "mode", "mode", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY] = g_param_spec_string ("mode-name", "mode-name", "mode-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY] = g_param_spec_boolean ("has-schema", "has-schema", "has-schema", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY, graphs_import_settings_properties[GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY] = g_param_spec_boolean ("is-valid", "is-valid", "is-valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	graphs_import_settings_signals[GRAPHS_IMPORT_SETTINGS_VALUE_CHANGED_SIGNAL] = g_signal_new ("value-changed", GRAPHS_TYPE_IMPORT_SETTINGS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_VARIANT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT);
}

static void
graphs_import_settings_instance_init (GraphsImportSettings * self,
                                      gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = graphs_import_settings_get_instance_private (self);
	self->priv->_has_schema = FALSE;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_VARIANT, (GBoxedCopyFunc) g_variant_ref, (GDestroyNotify) g_variant_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->settings = (GeeMap*) _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->items = (GeeMap*) _tmp1_;
}

static void
graphs_import_settings_finalize (GObject * obj)
{
	GraphsImportSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_IMPORT_SETTINGS, GraphsImportSettings);
	_g_object_unref0 (self->priv->_file);
	_g_free0 (self->priv->_filename);
	_g_free0 (self->priv->_mode_name);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->items);
	G_OBJECT_CLASS (graphs_import_settings_parent_class)->finalize (obj);
}

static GType
graphs_import_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsImportSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_import_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsImportSettings), 0, (GInstanceInitFunc) graphs_import_settings_instance_init, NULL };
	GType graphs_import_settings_type_id;
	graphs_import_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsImportSettings", &g_define_type_info, 0);
	GraphsImportSettings_private_offset = g_type_add_instance_private (graphs_import_settings_type_id, sizeof (GraphsImportSettingsPrivate));
	return graphs_import_settings_type_id;
}

GType
graphs_import_settings_get_type (void)
{
	static volatile gsize graphs_import_settings_type_id__once = 0;
	if (g_once_init_enter (&graphs_import_settings_type_id__once)) {
		GType graphs_import_settings_type_id;
		graphs_import_settings_type_id = graphs_import_settings_get_type_once ();
		g_once_init_leave (&graphs_import_settings_type_id__once, graphs_import_settings_type_id);
	}
	return graphs_import_settings_type_id__once;
}

static void
_vala_graphs_import_settings_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GraphsImportSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_IMPORT_SETTINGS, GraphsImportSettings);
	switch (property_id) {
		case GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY:
		g_value_set_object (value, graphs_import_settings_get_file (self));
		break;
		case GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY:
		g_value_set_string (value, graphs_import_settings_get_filename (self));
		break;
		case GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY:
		g_value_set_uint (value, graphs_import_settings_get_mode (self));
		break;
		case GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY:
		g_value_set_string (value, graphs_import_settings_get_mode_name (self));
		break;
		case GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY:
		g_value_set_boolean (value, graphs_import_settings_get_has_schema (self));
		break;
		case GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY:
		g_value_set_boolean (value, graphs_import_settings_get_is_valid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_import_settings_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GraphsImportSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_IMPORT_SETTINGS, GraphsImportSettings);
	switch (property_id) {
		case GRAPHS_IMPORT_SETTINGS_FILE_PROPERTY:
		graphs_import_settings_set_file (self, g_value_get_object (value));
		break;
		case GRAPHS_IMPORT_SETTINGS_FILENAME_PROPERTY:
		graphs_import_settings_set_filename (self, g_value_get_string (value));
		break;
		case GRAPHS_IMPORT_SETTINGS_MODE_PROPERTY:
		graphs_import_settings_set_mode (self, g_value_get_uint (value));
		break;
		case GRAPHS_IMPORT_SETTINGS_MODE_NAME_PROPERTY:
		graphs_import_settings_set_mode_name (self, g_value_get_string (value));
		break;
		case GRAPHS_IMPORT_SETTINGS_HAS_SCHEMA_PROPERTY:
		graphs_import_settings_set_has_schema (self, g_value_get_boolean (value));
		break;
		case GRAPHS_IMPORT_SETTINGS_IS_VALID_PROPERTY:
		graphs_import_settings_set_is_valid (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

