/* vtgconfiguration.c generated by valac 0.12.1.1-323029-dirty, the Vala compiler
 * generated from vtgconfiguration.vala, do not modify */

/*
 *  vtgconfigurationdialog.vala - Vala developer toys for GEdit
 *
 *  Copyright (C) 2008 - Andrea Del Signore <sejerpz@tin.it>
 *
 *  This program 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 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330,
 *  Boston, MA 02111-1307, USA.
 */

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


#define VTG_TYPE_CONFIGURATION (vtg_configuration_get_type ())
#define VTG_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VTG_TYPE_CONFIGURATION, VtgConfiguration))
#define VTG_CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VTG_TYPE_CONFIGURATION, VtgConfigurationClass))
#define VTG_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VTG_TYPE_CONFIGURATION))
#define VTG_IS_CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VTG_TYPE_CONFIGURATION))
#define VTG_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VTG_TYPE_CONFIGURATION, VtgConfigurationClass))

typedef struct _VtgConfiguration VtgConfiguration;
typedef struct _VtgConfigurationClass VtgConfigurationClass;
typedef struct _VtgConfigurationPrivate VtgConfigurationPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _VtgConfiguration {
	GObject parent_instance;
	VtgConfigurationPrivate * priv;
};

struct _VtgConfigurationClass {
	GObjectClass parent_class;
};

struct _VtgConfigurationPrivate {
	GSettings* _settings_prefs;
	GSettings* _settings_state;
	gboolean _info_window_visible;
	gboolean _outliner_show_private_symbols;
	gboolean _outliner_show_public_symbols;
	gboolean _outliner_show_protected_symbols;
	gboolean _outliner_show_internal_symbols;
	gboolean _project_only_show_sources;
	gboolean _project_find_root_folder;
	gboolean _bracket_enabled;
	gboolean _symbol_enabled;
	gboolean _sourcecode_outliner_enabled;
	gchar* _author;
	gchar* _email_address;
};


static gpointer vtg_configuration_parent_class = NULL;
static GType vtg_configuration_type_id = 0;

GType vtg_configuration_get_type (void) G_GNUC_CONST;
GType vtg_configuration_register_type (GTypeModule * module);
#define VTG_CONFIGURATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VTG_TYPE_CONFIGURATION, VtgConfigurationPrivate))
enum  {
	VTG_CONFIGURATION_DUMMY_PROPERTY,
	VTG_CONFIGURATION_BRACKET_ENABLED,
	VTG_CONFIGURATION_SYMBOL_ENABLED,
	VTG_CONFIGURATION_SOURCECODE_OUTLINER_ENABLED,
	VTG_CONFIGURATION_AUTHOR,
	VTG_CONFIGURATION_EMAIL_ADDRESS,
	VTG_CONFIGURATION_INFO_WINDOW_VISIBLE,
	VTG_CONFIGURATION_OUTLINER_SHOW_PRIVATE_SYMBOLS,
	VTG_CONFIGURATION_OUTLINER_SHOW_PUBLIC_SYMBOLS,
	VTG_CONFIGURATION_OUTLINER_SHOW_PROTECTED_SYMBOLS,
	VTG_CONFIGURATION_OUTLINER_SHOW_INTERNAL_SYMBOLS,
	VTG_CONFIGURATION_PROJECT_ONLY_SHOW_SOURCES,
	VTG_CONFIGURATION_PROJECT_FIND_ROOT_FOLDER,
	VTG_CONFIGURATION_SAVE_BEFORE_BUILD
};
#define VTG_CONFIGURATION_VTG_SCHEMA_PREFERENCES "org.gnome.gedit.plugins.vala-toys.preferences"
#define VTG_CONFIGURATION_VTG_SCHEMA_STATE "org.gnome.gedit.plugins.vala-toys.state"
VtgConfiguration* vtg_configuration_new (void);
VtgConfiguration* vtg_configuration_construct (GType object_type);
static void vtg_configuration_on_conf_value_changed (VtgConfiguration* self, GSettings* sender, const gchar* key);
static void _vtg_configuration_on_conf_value_changed_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self);
GtkWidget* vtg_configuration_get_configuration_dialog (VtgConfiguration* self);
gchar* vtg_utils_get_ui_path (const gchar* id);
static void vtg_configuration_on_checkbutton_toggled (VtgConfiguration* self, GtkToggleButton* sender);
static void _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void vtg_configuration_on_text_changed (VtgConfiguration* self, GObject* sender, GParamSpec* pspec);
static void _vtg_configuration_on_text_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void vtg_configuration_set_bracket_enabled (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_symbol_enabled (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_sourcecode_outliner_enabled (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_author (VtgConfiguration* self, const gchar* value);
void vtg_configuration_set_email_address (VtgConfiguration* self, const gchar* value);
void vtg_configuration_set_outliner_show_private_symbols (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_outliner_show_public_symbols (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_outliner_show_protected_symbols (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_outliner_show_internal_symbols (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_project_only_show_sources (VtgConfiguration* self, gboolean value);
void vtg_configuration_set_project_find_root_folder (VtgConfiguration* self, gboolean value);
gboolean vtg_configuration_get_bracket_enabled (VtgConfiguration* self);
gboolean vtg_configuration_get_symbol_enabled (VtgConfiguration* self);
gboolean vtg_configuration_get_sourcecode_outliner_enabled (VtgConfiguration* self);
const gchar* vtg_configuration_get_author (VtgConfiguration* self);
const gchar* vtg_configuration_get_email_address (VtgConfiguration* self);
gboolean vtg_configuration_get_info_window_visible (VtgConfiguration* self);
void vtg_configuration_set_info_window_visible (VtgConfiguration* self, gboolean value);
gboolean vtg_configuration_get_outliner_show_private_symbols (VtgConfiguration* self);
gboolean vtg_configuration_get_outliner_show_public_symbols (VtgConfiguration* self);
gboolean vtg_configuration_get_outliner_show_protected_symbols (VtgConfiguration* self);
gboolean vtg_configuration_get_outliner_show_internal_symbols (VtgConfiguration* self);
gboolean vtg_configuration_get_project_only_show_sources (VtgConfiguration* self);
gboolean vtg_configuration_get_project_find_root_folder (VtgConfiguration* self);
gboolean vtg_configuration_get_save_before_build (VtgConfiguration* self);
static void vtg_configuration_finalize (GObject* obj);
static void _vala_vtg_configuration_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_vtg_configuration_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void _vtg_configuration_on_conf_value_changed_g_settings_changed (GSettings* _sender, const gchar* key, gpointer self) {
	vtg_configuration_on_conf_value_changed (self, _sender, key);
}


VtgConfiguration* vtg_configuration_construct (GType object_type) {
	VtgConfiguration * self = NULL;
	GSettings* _tmp0_ = NULL;
	GSettings* _tmp1_ = NULL;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gboolean _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	self = (VtgConfiguration*) g_object_new (object_type, NULL);
	_tmp0_ = g_settings_new (VTG_CONFIGURATION_VTG_SCHEMA_PREFERENCES);
	_g_object_unref0 (self->priv->_settings_prefs);
	self->priv->_settings_prefs = _tmp0_;
	_tmp1_ = g_settings_new (VTG_CONFIGURATION_VTG_SCHEMA_STATE);
	_g_object_unref0 (self->priv->_settings_state);
	self->priv->_settings_state = _tmp1_;
	_tmp2_ = g_settings_get_boolean (self->priv->_settings_prefs, "symbol-completion-enabled");
	self->priv->_symbol_enabled = _tmp2_;
	_tmp3_ = g_settings_get_boolean (self->priv->_settings_prefs, "bracket-completion-enabled");
	self->priv->_bracket_enabled = _tmp3_;
	_tmp4_ = g_settings_get_boolean (self->priv->_settings_prefs, "sourcecode-outliner-enabled");
	self->priv->_sourcecode_outliner_enabled = _tmp4_;
	_tmp5_ = g_settings_get_string (self->priv->_settings_prefs, "author");
	_g_free0 (self->priv->_author);
	self->priv->_author = _tmp5_;
	_tmp6_ = g_settings_get_string (self->priv->_settings_prefs, "email");
	_g_free0 (self->priv->_email_address);
	self->priv->_email_address = _tmp6_;
	_tmp7_ = g_settings_get_boolean (self->priv->_settings_prefs, "project-find-root-folder");
	self->priv->_project_find_root_folder = _tmp7_;
	_tmp8_ = g_settings_get_boolean (self->priv->_settings_state, "info-window-visible");
	self->priv->_info_window_visible = _tmp8_;
	_tmp9_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-private-symbols");
	self->priv->_outliner_show_private_symbols = _tmp9_;
	_tmp10_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-public-symbols");
	self->priv->_outliner_show_public_symbols = _tmp10_;
	_tmp11_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-protected-symbols");
	self->priv->_outliner_show_protected_symbols = _tmp11_;
	_tmp12_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-internal-symbols");
	self->priv->_outliner_show_internal_symbols = _tmp12_;
	_tmp13_ = g_settings_get_boolean (self->priv->_settings_state, "project-view-show-only-sources");
	self->priv->_project_only_show_sources = _tmp13_;
	g_signal_connect_object (self->priv->_settings_prefs, "changed", (GCallback) _vtg_configuration_on_conf_value_changed_g_settings_changed, self, 0);
	g_signal_connect_object (self->priv->_settings_state, "changed", (GCallback) _vtg_configuration_on_conf_value_changed_g_settings_changed, self, 0);
	return self;
}


VtgConfiguration* vtg_configuration_new (void) {
	return vtg_configuration_construct (VTG_TYPE_CONFIGURATION);
}


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


static void _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
	vtg_configuration_on_checkbutton_toggled (self, _sender);
}


static void _vtg_configuration_on_text_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	vtg_configuration_on_text_changed (self, _sender, pspec);
}


GtkWidget* vtg_configuration_get_configuration_dialog (VtgConfiguration* self) {
	GtkWidget* result = NULL;
	GtkBuilder* _tmp0_ = NULL;
	GtkBuilder* builder;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_ = NULL;
	gchar** _tmp5_;
	gint _tmp5__length1;
	GObject* _tmp6_ = NULL;
	GtkWidget* _tmp7_;
	GtkWidget* config_widget;
	GObject* _tmp8_ = NULL;
	GtkCheckButton* _tmp9_;
	GtkCheckButton* check;
	GObject* _tmp10_ = NULL;
	GtkCheckButton* _tmp11_;
	GObject* _tmp12_ = NULL;
	GtkCheckButton* _tmp13_;
	GObject* _tmp14_ = NULL;
	GtkCheckButton* _tmp15_;
	GObject* _tmp16_ = NULL;
	GtkEntry* _tmp17_;
	GtkEntry* text;
	GObject* _tmp18_ = NULL;
	GtkEntry* _tmp19_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gtk_builder_new ();
	builder = _tmp0_;
	_tmp1_ = vtg_utils_get_ui_path ("vtg.ui");
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup ("vbox-settings-main");
	_tmp4_ = g_new0 (gchar*, 1 + 1);
	_tmp4_[0] = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp5__length1 = 1;
	gtk_builder_add_objects_from_file (builder, _tmp2_, _tmp5_, &_inner_error_);
	_tmp5_ = (_vala_array_free (_tmp5_, _tmp5__length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_tmp2_);
	if (_inner_error_ != NULL) {
		_g_object_unref0 (builder);
		goto __catch43_g_error;
	}
	_tmp6_ = gtk_builder_get_object (builder, "vbox-settings-main");
	_tmp7_ = _g_object_ref0 (GTK_WIDGET (_tmp6_));
	config_widget = _tmp7_;
	g_assert (config_widget != NULL);
	_tmp8_ = gtk_builder_get_object (builder, "checkbutton-settings-bracket-completion");
	_tmp9_ = _g_object_ref0 (GTK_CHECK_BUTTON (_tmp8_));
	check = _tmp9_;
	g_assert (check != NULL);
	gtk_toggle_button_set_active ((GtkToggleButton*) check, self->priv->_bracket_enabled);
	g_signal_connect_object ((GtkToggleButton*) check, "toggled", (GCallback) _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp10_ = gtk_builder_get_object (builder, "checkbutton-settings-symbol-completion");
	_tmp11_ = _g_object_ref0 (GTK_CHECK_BUTTON (_tmp10_));
	_g_object_unref0 (check);
	check = _tmp11_;
	g_assert (check != NULL);
	gtk_toggle_button_set_active ((GtkToggleButton*) check, self->priv->_symbol_enabled);
	g_signal_connect_object ((GtkToggleButton*) check, "toggled", (GCallback) _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp12_ = gtk_builder_get_object (builder, "checkbutton-settings-sourcecode-outliner");
	_tmp13_ = _g_object_ref0 (GTK_CHECK_BUTTON (_tmp12_));
	_g_object_unref0 (check);
	check = _tmp13_;
	g_assert (check != NULL);
	gtk_toggle_button_set_active ((GtkToggleButton*) check, self->priv->_sourcecode_outliner_enabled);
	g_signal_connect_object ((GtkToggleButton*) check, "toggled", (GCallback) _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp14_ = gtk_builder_get_object (builder, "checkbutton-settings-project-find-root");
	_tmp15_ = _g_object_ref0 (GTK_CHECK_BUTTON (_tmp14_));
	_g_object_unref0 (check);
	check = _tmp15_;
	g_assert (check != NULL);
	gtk_toggle_button_set_active ((GtkToggleButton*) check, self->priv->_project_find_root_folder);
	g_signal_connect_object ((GtkToggleButton*) check, "toggled", (GCallback) _vtg_configuration_on_checkbutton_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp16_ = gtk_builder_get_object (builder, "entry-settings-author");
	_tmp17_ = _g_object_ref0 (GTK_ENTRY (_tmp16_));
	text = _tmp17_;
	g_assert (text != NULL);
	gtk_entry_set_text (text, self->priv->_author);
	g_signal_connect_object ((GObject*) text, "notify::text", (GCallback) _vtg_configuration_on_text_changed_g_object_notify, self, 0);
	_tmp18_ = gtk_builder_get_object (builder, "entry-settings-email");
	_tmp19_ = _g_object_ref0 (GTK_ENTRY (_tmp18_));
	_g_object_unref0 (text);
	text = _tmp19_;
	g_assert (text != NULL);
	gtk_entry_set_text (text, self->priv->_email_address);
	g_signal_connect_object ((GObject*) text, "notify::text", (GCallback) _vtg_configuration_on_text_changed_g_object_notify, self, 0);
	result = config_widget;
	_g_object_unref0 (text);
	_g_object_unref0 (check);
	_g_object_unref0 (builder);
	return result;
	_g_object_unref0 (text);
	_g_object_unref0 (check);
	_g_object_unref0 (config_widget);
	_g_object_unref0 (builder);
	goto __finally43;
	__catch43_g_error:
	{
		GError * err;
		err = _inner_error_;
		_inner_error_ = NULL;
		g_warning ("vtgconfiguration.vala:211: (get_configuration_dialog): %s", err->message);
		result = NULL;
		_g_error_free0 (err);
		return result;
	}
	__finally43:
	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 NULL;
}


static void vtg_configuration_on_conf_value_changed (VtgConfiguration* self, GSettings* sender, const gchar* key) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (sender != NULL);
	g_return_if_fail (key != NULL);
	if (g_strcmp0 (key, "bracket-completion-enabled") == 0) {
		gboolean _tmp0_;
		gboolean new_val;
		_tmp0_ = g_settings_get_boolean (self->priv->_settings_prefs, "bracket-completion-enabled");
		new_val = _tmp0_;
		if (self->priv->_bracket_enabled != new_val) {
			vtg_configuration_set_bracket_enabled (self, new_val);
		}
	} else {
		if (g_strcmp0 (key, "symbol-completion-enabled") == 0) {
			gboolean _tmp1_;
			gboolean new_val;
			_tmp1_ = g_settings_get_boolean (self->priv->_settings_prefs, "symbol-completion-enabled");
			new_val = _tmp1_;
			if (self->priv->_symbol_enabled != new_val) {
				vtg_configuration_set_symbol_enabled (self, new_val);
			}
		} else {
			if (g_strcmp0 (key, "sourcecode-outliner-enabled") == 0) {
				gboolean _tmp2_;
				gboolean new_val;
				_tmp2_ = g_settings_get_boolean (self->priv->_settings_prefs, "sourcecode-outliner-enabled");
				new_val = _tmp2_;
				if (self->priv->_sourcecode_outliner_enabled != new_val) {
					vtg_configuration_set_sourcecode_outliner_enabled (self, new_val);
				}
			} else {
				if (g_strcmp0 (key, "author") == 0) {
					gchar* _tmp3_ = NULL;
					gchar* new_val;
					_tmp3_ = g_settings_get_string (self->priv->_settings_prefs, "author");
					new_val = _tmp3_;
					if (g_strcmp0 (self->priv->_author, new_val) != 0) {
						vtg_configuration_set_author (self, new_val);
					}
					_g_free0 (new_val);
				} else {
					if (g_strcmp0 (key, "email") == 0) {
						gchar* _tmp4_ = NULL;
						gchar* new_val;
						_tmp4_ = g_settings_get_string (self->priv->_settings_prefs, "email");
						new_val = _tmp4_;
						if (g_strcmp0 (self->priv->_email_address, new_val) != 0) {
							vtg_configuration_set_email_address (self, new_val);
						}
						_g_free0 (new_val);
					} else {
						if (g_strcmp0 (key, "outliner-show-private-symbols") == 0) {
							gboolean _tmp5_;
							gboolean new_val;
							_tmp5_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-private-symbols");
							new_val = _tmp5_;
							if (self->priv->_outliner_show_private_symbols != new_val) {
								vtg_configuration_set_outliner_show_private_symbols (self, new_val);
							}
						} else {
							if (g_strcmp0 (key, "outliner-show-public-symbols") == 0) {
								gboolean _tmp6_;
								gboolean new_val;
								_tmp6_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-public-symbols");
								new_val = _tmp6_;
								if (self->priv->_outliner_show_public_symbols != new_val) {
									vtg_configuration_set_outliner_show_public_symbols (self, new_val);
								}
							} else {
								if (g_strcmp0 (key, "outliner-show-protected-symbols") == 0) {
									gboolean _tmp7_;
									gboolean new_val;
									_tmp7_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-protected-symbols");
									new_val = _tmp7_;
									if (self->priv->_outliner_show_protected_symbols != new_val) {
										vtg_configuration_set_outliner_show_protected_symbols (self, new_val);
									}
								} else {
									if (g_strcmp0 (key, "outliner-show-internal-symbols") == 0) {
										gboolean _tmp8_;
										gboolean new_val;
										_tmp8_ = g_settings_get_boolean (self->priv->_settings_state, "outliner-show-internal-symbols");
										new_val = _tmp8_;
										if (self->priv->_outliner_show_internal_symbols != new_val) {
											vtg_configuration_set_outliner_show_internal_symbols (self, new_val);
										}
									} else {
										if (g_strcmp0 (key, "project-view-show-only-sources") == 0) {
											gboolean _tmp9_;
											gboolean new_val;
											_tmp9_ = g_settings_get_boolean (self->priv->_settings_state, "project-view-show-only-sources");
											new_val = _tmp9_;
											if (self->priv->_project_only_show_sources != new_val) {
												vtg_configuration_set_project_only_show_sources (self, new_val);
											}
										} else {
											if (g_strcmp0 (key, "project-find-root-folder") == 0) {
												gboolean _tmp10_;
												gboolean new_val;
												_tmp10_ = g_settings_get_boolean (self->priv->_settings_prefs, "project-find-root-folder");
												new_val = _tmp10_;
												if (self->priv->_project_find_root_folder != new_val) {
													vtg_configuration_set_project_find_root_folder (self, new_val);
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}


static void vtg_configuration_on_checkbutton_toggled (VtgConfiguration* self, GtkToggleButton* sender) {
	gboolean _tmp0_;
	gboolean new_val;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* name;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sender != NULL);
	_tmp0_ = gtk_toggle_button_get_active (sender);
	new_val = _tmp0_;
	_tmp1_ = gtk_buildable_get_name ((GtkBuildable*) sender);
	_tmp2_ = g_strdup (_tmp1_);
	name = _tmp2_;
	if (g_strcmp0 (name, "checkbutton-settings-bracket-completion") == 0) {
		g_settings_set_boolean (self->priv->_settings_prefs, "bracket-completion-enabled", new_val);
	} else {
		if (g_strcmp0 (name, "checkbutton-settings-symbol-completion") == 0) {
			g_settings_set_boolean (self->priv->_settings_prefs, "symbol-completion-enabled", new_val);
		} else {
			if (g_strcmp0 (name, "checkbutton-settings-sourcecode-outliner") == 0) {
				g_settings_set_boolean (self->priv->_settings_prefs, "sourcecode-outliner-enabled", new_val);
			} else {
				if (g_strcmp0 (name, "checkbutton-settings-project-find-root") == 0) {
					g_settings_set_boolean (self->priv->_settings_prefs, "project-find-root-folder", new_val);
				}
			}
		}
	}
	_g_free0 (name);
}


static void vtg_configuration_on_text_changed (VtgConfiguration* self, GObject* sender, GParamSpec* pspec) {
	GtkEntry* _tmp0_;
	GtkEntry* entry;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* new_val;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar* name;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sender != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = _g_object_ref0 (GTK_ENTRY (sender));
	entry = _tmp0_;
	_tmp1_ = gtk_entry_get_text (entry);
	_tmp2_ = g_strdup (_tmp1_);
	new_val = _tmp2_;
	_tmp3_ = gtk_buildable_get_name ((GtkBuildable*) entry);
	_tmp4_ = g_strdup (_tmp3_);
	name = _tmp4_;
	if (g_strcmp0 (name, "entry-settings-author") == 0) {
		g_settings_set_string (self->priv->_settings_prefs, "author", new_val);
	} else {
		if (g_strcmp0 (name, "entry-settings-email") == 0) {
			g_settings_set_string (self->priv->_settings_prefs, "email", new_val);
		}
	}
	_g_free0 (name);
	_g_free0 (new_val);
	_g_object_unref0 (entry);
}


gboolean vtg_configuration_get_bracket_enabled (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_bracket_enabled;
	return result;
}


void vtg_configuration_set_bracket_enabled (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	self->priv->_bracket_enabled = value;
	g_object_notify ((GObject *) self, "bracket-enabled");
}


gboolean vtg_configuration_get_symbol_enabled (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_symbol_enabled;
	return result;
}


void vtg_configuration_set_symbol_enabled (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	self->priv->_symbol_enabled = value;
	g_object_notify ((GObject *) self, "symbol-enabled");
}


gboolean vtg_configuration_get_sourcecode_outliner_enabled (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_sourcecode_outliner_enabled;
	return result;
}


void vtg_configuration_set_sourcecode_outliner_enabled (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	self->priv->_sourcecode_outliner_enabled = value;
	g_object_notify ((GObject *) self, "sourcecode-outliner-enabled");
}


const gchar* vtg_configuration_get_author (VtgConfiguration* self) {
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_author;
	return result;
}


void vtg_configuration_set_author (VtgConfiguration* self, const gchar* value) {
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_author);
	self->priv->_author = _tmp0_;
	g_object_notify ((GObject *) self, "author");
}


const gchar* vtg_configuration_get_email_address (VtgConfiguration* self) {
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_email_address;
	return result;
}


void vtg_configuration_set_email_address (VtgConfiguration* self, const gchar* value) {
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_email_address);
	self->priv->_email_address = _tmp0_;
	g_object_notify ((GObject *) self, "email-address");
}


gboolean vtg_configuration_get_info_window_visible (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_info_window_visible;
	return result;
}


void vtg_configuration_set_info_window_visible (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_info_window_visible != value) {
		self->priv->_info_window_visible = value;
		g_settings_set_boolean (self->priv->_settings_state, "info-window-visible", self->priv->_info_window_visible);
	}
	g_object_notify ((GObject *) self, "info-window-visible");
}


gboolean vtg_configuration_get_outliner_show_private_symbols (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_outliner_show_private_symbols;
	return result;
}


void vtg_configuration_set_outliner_show_private_symbols (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_outliner_show_private_symbols != value) {
		self->priv->_outliner_show_private_symbols = value;
		g_settings_set_boolean (self->priv->_settings_state, "outliner-show-private-symbols", self->priv->_outliner_show_private_symbols);
	}
	g_object_notify ((GObject *) self, "outliner-show-private-symbols");
}


gboolean vtg_configuration_get_outliner_show_public_symbols (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_outliner_show_public_symbols;
	return result;
}


void vtg_configuration_set_outliner_show_public_symbols (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_outliner_show_public_symbols != value) {
		self->priv->_outliner_show_public_symbols = value;
		g_settings_set_boolean (self->priv->_settings_state, "outliner-show-public-symbols", self->priv->_outliner_show_public_symbols);
	}
	g_object_notify ((GObject *) self, "outliner-show-public-symbols");
}


gboolean vtg_configuration_get_outliner_show_protected_symbols (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_outliner_show_protected_symbols;
	return result;
}


void vtg_configuration_set_outliner_show_protected_symbols (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_outliner_show_protected_symbols != value) {
		self->priv->_outliner_show_protected_symbols = value;
		g_settings_set_boolean (self->priv->_settings_state, "outliner-show-protected-symbols", self->priv->_outliner_show_protected_symbols);
	}
	g_object_notify ((GObject *) self, "outliner-show-protected-symbols");
}


gboolean vtg_configuration_get_outliner_show_internal_symbols (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_outliner_show_internal_symbols;
	return result;
}


void vtg_configuration_set_outliner_show_internal_symbols (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_outliner_show_internal_symbols != value) {
		self->priv->_outliner_show_internal_symbols = value;
		g_settings_set_boolean (self->priv->_settings_state, "outliner-show-internal-symbols", self->priv->_outliner_show_internal_symbols);
	}
	g_object_notify ((GObject *) self, "outliner-show-internal-symbols");
}


gboolean vtg_configuration_get_project_only_show_sources (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_project_only_show_sources;
	return result;
}


void vtg_configuration_set_project_only_show_sources (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_project_only_show_sources != value) {
		self->priv->_project_only_show_sources = value;
		g_settings_set_boolean (self->priv->_settings_state, "project-view-show-only-sources", self->priv->_project_only_show_sources);
	}
	g_object_notify ((GObject *) self, "project-only-show-sources");
}


gboolean vtg_configuration_get_project_find_root_folder (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_project_find_root_folder;
	return result;
}


void vtg_configuration_set_project_find_root_folder (VtgConfiguration* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (self->priv->_project_find_root_folder != value) {
		self->priv->_project_find_root_folder = value;
		g_settings_set_boolean (self->priv->_settings_prefs, "project-find-root-folder", self->priv->_project_find_root_folder);
	}
	g_object_notify ((GObject *) self, "project-find-root-folder");
}


gboolean vtg_configuration_get_save_before_build (VtgConfiguration* self) {
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = TRUE;
	return result;
}


static void vtg_configuration_class_init (VtgConfigurationClass * klass) {
	vtg_configuration_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (VtgConfigurationPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_vtg_configuration_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_vtg_configuration_set_property;
	G_OBJECT_CLASS (klass)->finalize = vtg_configuration_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VTG_CONFIGURATION_BRACKET_ENABLED, g_param_spec_boolean ("bracket-enabled", "bracket-enabled", "bracket-enabled", 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), VTG_CONFIGURATION_SYMBOL_ENABLED, g_param_spec_boolean ("symbol-enabled", "symbol-enabled", "symbol-enabled", 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), VTG_CONFIGURATION_SOURCECODE_OUTLINER_ENABLED, g_param_spec_boolean ("sourcecode-outliner-enabled", "sourcecode-outliner-enabled", "sourcecode-outliner-enabled", 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), VTG_CONFIGURATION_AUTHOR, g_param_spec_string ("author", "author", "author", 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), VTG_CONFIGURATION_EMAIL_ADDRESS, g_param_spec_string ("email-address", "email-address", "email-address", 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), VTG_CONFIGURATION_INFO_WINDOW_VISIBLE, g_param_spec_boolean ("info-window-visible", "info-window-visible", "info-window-visible", 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), VTG_CONFIGURATION_OUTLINER_SHOW_PRIVATE_SYMBOLS, g_param_spec_boolean ("outliner-show-private-symbols", "outliner-show-private-symbols", "outliner-show-private-symbols", 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), VTG_CONFIGURATION_OUTLINER_SHOW_PUBLIC_SYMBOLS, g_param_spec_boolean ("outliner-show-public-symbols", "outliner-show-public-symbols", "outliner-show-public-symbols", 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), VTG_CONFIGURATION_OUTLINER_SHOW_PROTECTED_SYMBOLS, g_param_spec_boolean ("outliner-show-protected-symbols", "outliner-show-protected-symbols", "outliner-show-protected-symbols", 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), VTG_CONFIGURATION_OUTLINER_SHOW_INTERNAL_SYMBOLS, g_param_spec_boolean ("outliner-show-internal-symbols", "outliner-show-internal-symbols", "outliner-show-internal-symbols", 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), VTG_CONFIGURATION_PROJECT_ONLY_SHOW_SOURCES, g_param_spec_boolean ("project-only-show-sources", "project-only-show-sources", "project-only-show-sources", 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), VTG_CONFIGURATION_PROJECT_FIND_ROOT_FOLDER, g_param_spec_boolean ("project-find-root-folder", "project-find-root-folder", "project-find-root-folder", 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), VTG_CONFIGURATION_SAVE_BEFORE_BUILD, g_param_spec_boolean ("save-before-build", "save-before-build", "save-before-build", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void vtg_configuration_instance_init (VtgConfiguration * self) {
	self->priv = VTG_CONFIGURATION_GET_PRIVATE (self);
	self->priv->_info_window_visible = FALSE;
	self->priv->_outliner_show_private_symbols = FALSE;
	self->priv->_outliner_show_public_symbols = FALSE;
	self->priv->_outliner_show_protected_symbols = FALSE;
	self->priv->_outliner_show_internal_symbols = FALSE;
	self->priv->_project_only_show_sources = TRUE;
	self->priv->_project_find_root_folder = TRUE;
}


static void vtg_configuration_finalize (GObject* obj) {
	VtgConfiguration * self;
	self = VTG_CONFIGURATION (obj);
	_g_object_unref0 (self->priv->_settings_prefs);
	_g_object_unref0 (self->priv->_settings_state);
	_g_free0 (self->priv->_author);
	_g_free0 (self->priv->_email_address);
	G_OBJECT_CLASS (vtg_configuration_parent_class)->finalize (obj);
}


GType vtg_configuration_get_type (void) {
	return vtg_configuration_type_id;
}


GType vtg_configuration_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (VtgConfigurationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vtg_configuration_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VtgConfiguration), 0, (GInstanceInitFunc) vtg_configuration_instance_init, NULL };
	vtg_configuration_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "VtgConfiguration", &g_define_type_info, 0);
	return vtg_configuration_type_id;
}


static void _vala_vtg_configuration_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	VtgConfiguration * self;
	self = VTG_CONFIGURATION (object);
	switch (property_id) {
		case VTG_CONFIGURATION_BRACKET_ENABLED:
		g_value_set_boolean (value, vtg_configuration_get_bracket_enabled (self));
		break;
		case VTG_CONFIGURATION_SYMBOL_ENABLED:
		g_value_set_boolean (value, vtg_configuration_get_symbol_enabled (self));
		break;
		case VTG_CONFIGURATION_SOURCECODE_OUTLINER_ENABLED:
		g_value_set_boolean (value, vtg_configuration_get_sourcecode_outliner_enabled (self));
		break;
		case VTG_CONFIGURATION_AUTHOR:
		g_value_set_string (value, vtg_configuration_get_author (self));
		break;
		case VTG_CONFIGURATION_EMAIL_ADDRESS:
		g_value_set_string (value, vtg_configuration_get_email_address (self));
		break;
		case VTG_CONFIGURATION_INFO_WINDOW_VISIBLE:
		g_value_set_boolean (value, vtg_configuration_get_info_window_visible (self));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PRIVATE_SYMBOLS:
		g_value_set_boolean (value, vtg_configuration_get_outliner_show_private_symbols (self));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PUBLIC_SYMBOLS:
		g_value_set_boolean (value, vtg_configuration_get_outliner_show_public_symbols (self));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PROTECTED_SYMBOLS:
		g_value_set_boolean (value, vtg_configuration_get_outliner_show_protected_symbols (self));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_INTERNAL_SYMBOLS:
		g_value_set_boolean (value, vtg_configuration_get_outliner_show_internal_symbols (self));
		break;
		case VTG_CONFIGURATION_PROJECT_ONLY_SHOW_SOURCES:
		g_value_set_boolean (value, vtg_configuration_get_project_only_show_sources (self));
		break;
		case VTG_CONFIGURATION_PROJECT_FIND_ROOT_FOLDER:
		g_value_set_boolean (value, vtg_configuration_get_project_find_root_folder (self));
		break;
		case VTG_CONFIGURATION_SAVE_BEFORE_BUILD:
		g_value_set_boolean (value, vtg_configuration_get_save_before_build (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_vtg_configuration_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	VtgConfiguration * self;
	self = VTG_CONFIGURATION (object);
	switch (property_id) {
		case VTG_CONFIGURATION_BRACKET_ENABLED:
		vtg_configuration_set_bracket_enabled (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_SYMBOL_ENABLED:
		vtg_configuration_set_symbol_enabled (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_SOURCECODE_OUTLINER_ENABLED:
		vtg_configuration_set_sourcecode_outliner_enabled (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_AUTHOR:
		vtg_configuration_set_author (self, g_value_get_string (value));
		break;
		case VTG_CONFIGURATION_EMAIL_ADDRESS:
		vtg_configuration_set_email_address (self, g_value_get_string (value));
		break;
		case VTG_CONFIGURATION_INFO_WINDOW_VISIBLE:
		vtg_configuration_set_info_window_visible (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PRIVATE_SYMBOLS:
		vtg_configuration_set_outliner_show_private_symbols (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PUBLIC_SYMBOLS:
		vtg_configuration_set_outliner_show_public_symbols (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_PROTECTED_SYMBOLS:
		vtg_configuration_set_outliner_show_protected_symbols (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_OUTLINER_SHOW_INTERNAL_SYMBOLS:
		vtg_configuration_set_outliner_show_internal_symbols (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_PROJECT_ONLY_SHOW_SOURCES:
		vtg_configuration_set_project_only_show_sources (self, g_value_get_boolean (value));
		break;
		case VTG_CONFIGURATION_PROJECT_FIND_ROOT_FOLDER:
		vtg_configuration_set_project_find_root_folder (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, 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);
}



