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

/*
* Copyright (c) 2011-2016 Felipe Escoto (https://github.com/Philip-Scott/Notes-up)
*
* 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.
*
* Authored by: Felipe Escoto <felescoto95@hotmail.com>
*/

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

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

#define ENOTES_SERVICES_TYPE_SETTINGS (enotes_services_settings_get_type ())
#define ENOTES_SERVICES_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettings))
#define ENOTES_SERVICES_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettingsClass))
#define ENOTES_SERVICES_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_SERVICES_TYPE_SETTINGS))
#define ENOTES_SERVICES_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_SERVICES_TYPE_SETTINGS))
#define ENOTES_SERVICES_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettingsClass))

typedef struct _ENotesServicesSettings ENotesServicesSettings;
typedef struct _ENotesServicesSettingsClass ENotesServicesSettingsClass;
typedef struct _ENotesServicesSettingsPrivate ENotesServicesSettingsPrivate;
enum  {
	ENOTES_SERVICES_SETTINGS_0_PROPERTY,
	ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY,
	ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY,
	ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY,
	ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY,
	ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_MODE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY,
	ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY,
	ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY,
	ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY,
	ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY,
	ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY,
	ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY,
	ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY,
	ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY,
	ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY,
	ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY,
	ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY,
	ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY,
	ENOTES_SERVICES_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))

struct _ENotesServicesSettings {
	GraniteServicesSettings parent_instance;
	ENotesServicesSettingsPrivate * priv;
};

struct _ENotesServicesSettingsClass {
	GraniteServicesSettingsClass parent_class;
};

struct _ENotesServicesSettingsPrivate {
	gint _pos_x;
	gint _pos_y;
	gint _window_width;
	gint _window_height;
	gint _panel_size;
	gint _notebook_panel_size;
	gint _mode;
	gint _panes_visible;
	gint _last_notebook;
	gint _last_page;
	gboolean _auto_indent;
	gboolean _line_numbers;
	gboolean _import_files;
	gboolean _spellcheck;
	gboolean _show_page_info;
	gchar* _notes_database;
	gchar* _editor_font;
	gchar* _editor_scheme;
	gchar* _spellcheck_language;
	gchar* _style_scheme;
	gchar* _render_stylesheet;
	gchar* _stylesheet;
	gchar** _recent_files;
	gint _recent_files_length1;
	gint __recent_files_size_;
};

static gint ENotesServicesSettings_private_offset;
static gpointer enotes_services_settings_parent_class = NULL;
static ENotesServicesSettings* enotes_services_settings_instance;
static ENotesServicesSettings* enotes_services_settings_instance = NULL;

VALA_EXTERN GType enotes_services_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesServicesSettings, g_object_unref)
VALA_EXTERN ENotesServicesSettings* enotes_services_settings_get_instance (void);
static ENotesServicesSettings* enotes_services_settings_new (void);
static ENotesServicesSettings* enotes_services_settings_construct (GType object_type);
static void _g_free0_ (gpointer var);
static void _vala_gchar_free_function_content_of (gpointer data);
VALA_EXTERN gchar** enotes_services_settings_get_recent_files (ENotesServicesSettings* self,
                                                   gint* result_length1);
VALA_EXTERN void enotes_services_settings_set_recent_files (ENotesServicesSettings* self,
                                                gchar** value,
                                                gint value_length1);
VALA_EXTERN gint enotes_services_settings_get_pos_x (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_pos_x (ENotesServicesSettings* self,
                                         gint value);
VALA_EXTERN gint enotes_services_settings_get_pos_y (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_pos_y (ENotesServicesSettings* self,
                                         gint value);
VALA_EXTERN gint enotes_services_settings_get_window_width (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_window_width (ENotesServicesSettings* self,
                                                gint value);
VALA_EXTERN gint enotes_services_settings_get_window_height (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_window_height (ENotesServicesSettings* self,
                                                 gint value);
VALA_EXTERN gint enotes_services_settings_get_panel_size (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_panel_size (ENotesServicesSettings* self,
                                              gint value);
VALA_EXTERN gint enotes_services_settings_get_notebook_panel_size (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_notebook_panel_size (ENotesServicesSettings* self,
                                                       gint value);
VALA_EXTERN gint enotes_services_settings_get_mode (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_mode (ENotesServicesSettings* self,
                                        gint value);
VALA_EXTERN gint enotes_services_settings_get_panes_visible (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_panes_visible (ENotesServicesSettings* self,
                                                 gint value);
VALA_EXTERN gint enotes_services_settings_get_last_notebook (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_last_notebook (ENotesServicesSettings* self,
                                                 gint value);
VALA_EXTERN gint enotes_services_settings_get_last_page (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_last_page (ENotesServicesSettings* self,
                                             gint value);
VALA_EXTERN gboolean enotes_services_settings_get_auto_indent (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_auto_indent (ENotesServicesSettings* self,
                                               gboolean value);
VALA_EXTERN gboolean enotes_services_settings_get_line_numbers (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_line_numbers (ENotesServicesSettings* self,
                                                gboolean value);
VALA_EXTERN gboolean enotes_services_settings_get_import_files (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_import_files (ENotesServicesSettings* self,
                                                gboolean value);
VALA_EXTERN gboolean enotes_services_settings_get_spellcheck (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_spellcheck (ENotesServicesSettings* self,
                                              gboolean value);
VALA_EXTERN gboolean enotes_services_settings_get_show_page_info (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_show_page_info (ENotesServicesSettings* self,
                                                  gboolean value);
VALA_EXTERN const gchar* enotes_services_settings_get_notes_database (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_notes_database (ENotesServicesSettings* self,
                                                  const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_editor_font (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_editor_font (ENotesServicesSettings* self,
                                               const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_editor_scheme (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_editor_scheme (ENotesServicesSettings* self,
                                                 const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_spellcheck_language (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_spellcheck_language (ENotesServicesSettings* self,
                                                       const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_style_scheme (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_style_scheme (ENotesServicesSettings* self,
                                                const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_render_stylesheet (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_render_stylesheet (ENotesServicesSettings* self,
                                                     const gchar* value);
VALA_EXTERN const gchar* enotes_services_settings_get_stylesheet (ENotesServicesSettings* self);
VALA_EXTERN void enotes_services_settings_set_stylesheet (ENotesServicesSettings* self,
                                              const gchar* value);
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
static void enotes_services_settings_finalize (GObject * obj);
static GType enotes_services_settings_get_type_once (void);
static void _vala_enotes_services_settings_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_enotes_services_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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
enotes_services_settings_get_instance_private (ENotesServicesSettings* self)
{
	return G_STRUCT_MEMBER_P (self, ENotesServicesSettings_private_offset);
}

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

ENotesServicesSettings*
enotes_services_settings_get_instance (void)
{
	ENotesServicesSettings* _tmp0_;
	ENotesServicesSettings* _tmp2_;
	ENotesServicesSettings* _tmp3_;
	ENotesServicesSettings* result;
	_tmp0_ = enotes_services_settings_instance;
	if (_tmp0_ == NULL) {
		ENotesServicesSettings* _tmp1_;
		_tmp1_ = enotes_services_settings_new ();
		_g_object_unref0 (enotes_services_settings_instance);
		enotes_services_settings_instance = _tmp1_;
	}
	_tmp2_ = enotes_services_settings_instance;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_vala_gchar_free_function_content_of (gpointer data)
{
	gchar* self;
	self = *((gchar**) data);
	_g_free0_ (self);
}

static ENotesServicesSettings*
enotes_services_settings_construct (GType object_type)
{
	ENotesServicesSettings * self = NULL;
	GArray* checked_files = NULL;
	GArray* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_ = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	GArray* _tmp11_;
	gpointer* _tmp12_;
	gint _tmp12__length1;
	self = (ENotesServicesSettings*) granite_services_settings_construct (object_type, "org.notes");
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (gchar*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_gchar_free_function_content_of);
	checked_files = _tmp0_;
	_tmp1_ = enotes_services_settings_get_recent_files (self, &_tmp2_);
	_tmp1__length1 = _tmp2_;
	_tmp3_ = _tmp1_;
	_tmp3__length1 = _tmp1__length1;
	{
		gchar** path_collection = NULL;
		gint path_collection_length1 = 0;
		gint _path_collection_size_ = 0;
		gint path_it = 0;
		path_collection = _tmp3_;
		path_collection_length1 = _tmp3__length1;
		for (path_it = 0; path_it < path_collection_length1; path_it = path_it + 1) {
			gchar* _tmp4_;
			gchar* path = NULL;
			_tmp4_ = g_strdup (path_collection[path_it]);
			path = _tmp4_;
			{
				GFile* file = NULL;
				const gchar* _tmp5_;
				GFile* _tmp6_;
				GFile* _tmp7_;
				_tmp5_ = path;
				_tmp6_ = g_file_new_for_path (_tmp5_);
				file = _tmp6_;
				_tmp7_ = file;
				if (g_file_query_exists (_tmp7_, NULL)) {
					GArray* _tmp8_;
					const gchar* _tmp9_;
					gchar* _tmp10_;
					_tmp8_ = checked_files;
					_tmp9_ = path;
					_tmp10_ = g_strdup (_tmp9_);
					g_array_append_val (_tmp8_, _tmp10_);
				}
				_g_object_unref0 (file);
				_g_free0 (path);
			}
		}
	}
	_tmp11_ = checked_files;
	_tmp12_ = _tmp11_->data;
	_tmp12__length1 = _tmp11_->len;
	enotes_services_settings_set_recent_files (self, _tmp12_, _tmp12__length1);
	_g_array_unref0 (checked_files);
	return self;
}

static ENotesServicesSettings*
enotes_services_settings_new (void)
{
	return enotes_services_settings_construct (ENOTES_SERVICES_TYPE_SETTINGS);
}

gint
enotes_services_settings_get_pos_x (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_pos_x;
	return result;
}

void
enotes_services_settings_set_pos_x (ENotesServicesSettings* self,
                                    gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_pos_x (self);
	if (old_value != value) {
		self->priv->_pos_x = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY]);
	}
}

gint
enotes_services_settings_get_pos_y (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_pos_y;
	return result;
}

void
enotes_services_settings_set_pos_y (ENotesServicesSettings* self,
                                    gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_pos_y (self);
	if (old_value != value) {
		self->priv->_pos_y = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY]);
	}
}

gint
enotes_services_settings_get_window_width (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_window_width;
	return result;
}

void
enotes_services_settings_set_window_width (ENotesServicesSettings* self,
                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_window_width (self);
	if (old_value != value) {
		self->priv->_window_width = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY]);
	}
}

gint
enotes_services_settings_get_window_height (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_window_height;
	return result;
}

void
enotes_services_settings_set_window_height (ENotesServicesSettings* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_window_height (self);
	if (old_value != value) {
		self->priv->_window_height = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY]);
	}
}

gint
enotes_services_settings_get_panel_size (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_panel_size;
	return result;
}

void
enotes_services_settings_set_panel_size (ENotesServicesSettings* self,
                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_panel_size (self);
	if (old_value != value) {
		self->priv->_panel_size = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY]);
	}
}

gint
enotes_services_settings_get_notebook_panel_size (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_notebook_panel_size;
	return result;
}

void
enotes_services_settings_set_notebook_panel_size (ENotesServicesSettings* self,
                                                  gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_notebook_panel_size (self);
	if (old_value != value) {
		self->priv->_notebook_panel_size = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY]);
	}
}

gint
enotes_services_settings_get_mode (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_mode;
	return result;
}

void
enotes_services_settings_set_mode (ENotesServicesSettings* self,
                                   gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_mode (self);
	if (old_value != value) {
		self->priv->_mode = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_MODE_PROPERTY]);
	}
}

gint
enotes_services_settings_get_panes_visible (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_panes_visible;
	return result;
}

void
enotes_services_settings_set_panes_visible (ENotesServicesSettings* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_panes_visible (self);
	if (old_value != value) {
		self->priv->_panes_visible = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY]);
	}
}

gint
enotes_services_settings_get_last_notebook (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_last_notebook;
	return result;
}

void
enotes_services_settings_set_last_notebook (ENotesServicesSettings* self,
                                            gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_last_notebook (self);
	if (old_value != value) {
		self->priv->_last_notebook = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY]);
	}
}

gint
enotes_services_settings_get_last_page (ENotesServicesSettings* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_last_page;
	return result;
}

void
enotes_services_settings_set_last_page (ENotesServicesSettings* self,
                                        gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_last_page (self);
	if (old_value != value) {
		self->priv->_last_page = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY]);
	}
}

gboolean
enotes_services_settings_get_auto_indent (ENotesServicesSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_auto_indent;
	return result;
}

void
enotes_services_settings_set_auto_indent (ENotesServicesSettings* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_auto_indent (self);
	if (old_value != value) {
		self->priv->_auto_indent = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY]);
	}
}

gboolean
enotes_services_settings_get_line_numbers (ENotesServicesSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_line_numbers;
	return result;
}

void
enotes_services_settings_set_line_numbers (ENotesServicesSettings* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_line_numbers (self);
	if (old_value != value) {
		self->priv->_line_numbers = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY]);
	}
}

gboolean
enotes_services_settings_get_import_files (ENotesServicesSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_import_files;
	return result;
}

void
enotes_services_settings_set_import_files (ENotesServicesSettings* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_import_files (self);
	if (old_value != value) {
		self->priv->_import_files = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY]);
	}
}

gboolean
enotes_services_settings_get_spellcheck (ENotesServicesSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_spellcheck;
	return result;
}

void
enotes_services_settings_set_spellcheck (ENotesServicesSettings* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_spellcheck (self);
	if (old_value != value) {
		self->priv->_spellcheck = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY]);
	}
}

gboolean
enotes_services_settings_get_show_page_info (ENotesServicesSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_page_info;
	return result;
}

void
enotes_services_settings_set_show_page_info (ENotesServicesSettings* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_show_page_info (self);
	if (old_value != value) {
		self->priv->_show_page_info = value;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_notes_database (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_notes_database;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_notes_database (ENotesServicesSettings* self,
                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_notes_database (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_notes_database);
		self->priv->_notes_database = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_editor_font (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_editor_font;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_editor_font (ENotesServicesSettings* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_editor_font (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_editor_font);
		self->priv->_editor_font = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_editor_scheme (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_editor_scheme;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_editor_scheme (ENotesServicesSettings* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_editor_scheme (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_editor_scheme);
		self->priv->_editor_scheme = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_spellcheck_language (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_spellcheck_language;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_spellcheck_language (ENotesServicesSettings* self,
                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_spellcheck_language (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_spellcheck_language);
		self->priv->_spellcheck_language = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_style_scheme (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_style_scheme;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_style_scheme (ENotesServicesSettings* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_style_scheme (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_style_scheme);
		self->priv->_style_scheme = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_render_stylesheet (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_render_stylesheet;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_render_stylesheet (ENotesServicesSettings* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_render_stylesheet (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_render_stylesheet);
		self->priv->_render_stylesheet = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY]);
	}
}

const gchar*
enotes_services_settings_get_stylesheet (ENotesServicesSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_stylesheet;
	result = _tmp0_;
	return result;
}

void
enotes_services_settings_set_stylesheet (ENotesServicesSettings* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_stylesheet (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_stylesheet);
		self->priv->_stylesheet = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY]);
	}
}

gchar**
enotes_services_settings_get_recent_files (ENotesServicesSettings* 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->_recent_files;
	_tmp0__length1 = self->priv->_recent_files_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup3 (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
enotes_services_settings_set_recent_files (ENotesServicesSettings* self,
                                           gchar** value,
                                           gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = enotes_services_settings_get_recent_files (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup3 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_recent_files = (_vala_array_free (self->priv->_recent_files, self->priv->_recent_files_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_recent_files = _tmp0_;
		self->priv->_recent_files_length1 = _tmp0__length1;
		self->priv->__recent_files_size_ = self->priv->_recent_files_length1;
		g_object_notify_by_pspec ((GObject *) self, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY]);
	}
}

static void
enotes_services_settings_class_init (ENotesServicesSettingsClass * klass,
                                     gpointer klass_data)
{
	enotes_services_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ENotesServicesSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_enotes_services_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_enotes_services_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = enotes_services_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY] = g_param_spec_int ("pos-x", "pos-x", "pos-x", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY] = g_param_spec_int ("pos-y", "pos-y", "pos-y", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY] = g_param_spec_int ("window-width", "window-width", "window-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY] = g_param_spec_int ("window-height", "window-height", "window-height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY] = g_param_spec_int ("panel-size", "panel-size", "panel-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY] = g_param_spec_int ("notebook-panel-size", "notebook-panel-size", "notebook-panel-size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_MODE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_MODE_PROPERTY] = g_param_spec_int ("mode", "mode", "mode", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY] = g_param_spec_int ("panes-visible", "panes-visible", "panes-visible", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY] = g_param_spec_int ("last-notebook", "last-notebook", "last-notebook", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY] = g_param_spec_int ("last-page", "last-page", "last-page", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY] = g_param_spec_boolean ("auto-indent", "auto-indent", "auto-indent", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY] = g_param_spec_boolean ("line-numbers", "line-numbers", "line-numbers", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY] = g_param_spec_boolean ("import-files", "import-files", "import-files", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY] = g_param_spec_boolean ("spellcheck", "spellcheck", "spellcheck", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY] = g_param_spec_boolean ("show-page-info", "show-page-info", "show-page-info", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY] = g_param_spec_string ("notes-database", "notes-database", "notes-database", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY] = g_param_spec_string ("editor-font", "editor-font", "editor-font", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY] = g_param_spec_string ("editor-scheme", "editor-scheme", "editor-scheme", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY] = g_param_spec_string ("spellcheck-language", "spellcheck-language", "spellcheck-language", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY] = g_param_spec_string ("style-scheme", "style-scheme", "style-scheme", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY] = g_param_spec_string ("render-stylesheet", "render-stylesheet", "render-stylesheet", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY] = g_param_spec_string ("stylesheet", "stylesheet", "stylesheet", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY, enotes_services_settings_properties[ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY] = g_param_spec_boxed ("recent-files", "recent-files", "recent-files", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
enotes_services_settings_instance_init (ENotesServicesSettings * self,
                                        gpointer klass)
{
	self->priv = enotes_services_settings_get_instance_private (self);
}

static void
enotes_services_settings_finalize (GObject * obj)
{
	ENotesServicesSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettings);
	_g_free0 (self->priv->_notes_database);
	_g_free0 (self->priv->_editor_font);
	_g_free0 (self->priv->_editor_scheme);
	_g_free0 (self->priv->_spellcheck_language);
	_g_free0 (self->priv->_style_scheme);
	_g_free0 (self->priv->_render_stylesheet);
	_g_free0 (self->priv->_stylesheet);
	self->priv->_recent_files = (_vala_array_free (self->priv->_recent_files, self->priv->_recent_files_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (enotes_services_settings_parent_class)->finalize (obj);
}

static GType
enotes_services_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ENotesServicesSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enotes_services_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ENotesServicesSettings), 0, (GInstanceInitFunc) enotes_services_settings_instance_init, NULL };
	GType enotes_services_settings_type_id;
	enotes_services_settings_type_id = g_type_register_static (GRANITE_SERVICES_TYPE_SETTINGS, "ENotesServicesSettings", &g_define_type_info, 0);
	ENotesServicesSettings_private_offset = g_type_add_instance_private (enotes_services_settings_type_id, sizeof (ENotesServicesSettingsPrivate));
	return enotes_services_settings_type_id;
}

GType
enotes_services_settings_get_type (void)
{
	static volatile gsize enotes_services_settings_type_id__once = 0;
	if (g_once_init_enter (&enotes_services_settings_type_id__once)) {
		GType enotes_services_settings_type_id;
		enotes_services_settings_type_id = enotes_services_settings_get_type_once ();
		g_once_init_leave (&enotes_services_settings_type_id__once, enotes_services_settings_type_id);
	}
	return enotes_services_settings_type_id__once;
}

static void
_vala_enotes_services_settings_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	ENotesServicesSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettings);
	switch (property_id) {
		case ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_pos_x (self));
		break;
		case ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_pos_y (self));
		break;
		case ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_window_width (self));
		break;
		case ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_window_height (self));
		break;
		case ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_panel_size (self));
		break;
		case ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_notebook_panel_size (self));
		break;
		case ENOTES_SERVICES_SETTINGS_MODE_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_mode (self));
		break;
		case ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_panes_visible (self));
		break;
		case ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_last_notebook (self));
		break;
		case ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY:
		g_value_set_int (value, enotes_services_settings_get_last_page (self));
		break;
		case ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY:
		g_value_set_boolean (value, enotes_services_settings_get_auto_indent (self));
		break;
		case ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY:
		g_value_set_boolean (value, enotes_services_settings_get_line_numbers (self));
		break;
		case ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY:
		g_value_set_boolean (value, enotes_services_settings_get_import_files (self));
		break;
		case ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY:
		g_value_set_boolean (value, enotes_services_settings_get_spellcheck (self));
		break;
		case ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY:
		g_value_set_boolean (value, enotes_services_settings_get_show_page_info (self));
		break;
		case ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_notes_database (self));
		break;
		case ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_editor_font (self));
		break;
		case ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_editor_scheme (self));
		break;
		case ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_spellcheck_language (self));
		break;
		case ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_style_scheme (self));
		break;
		case ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_render_stylesheet (self));
		break;
		case ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY:
		g_value_set_string (value, enotes_services_settings_get_stylesheet (self));
		break;
		case ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, enotes_services_settings_get_recent_files (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_enotes_services_settings_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	ENotesServicesSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ENOTES_SERVICES_TYPE_SETTINGS, ENotesServicesSettings);
	switch (property_id) {
		case ENOTES_SERVICES_SETTINGS_POS_X_PROPERTY:
		enotes_services_settings_set_pos_x (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_POS_Y_PROPERTY:
		enotes_services_settings_set_pos_y (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_WINDOW_WIDTH_PROPERTY:
		enotes_services_settings_set_window_width (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_WINDOW_HEIGHT_PROPERTY:
		enotes_services_settings_set_window_height (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_PANEL_SIZE_PROPERTY:
		enotes_services_settings_set_panel_size (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_NOTEBOOK_PANEL_SIZE_PROPERTY:
		enotes_services_settings_set_notebook_panel_size (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_MODE_PROPERTY:
		enotes_services_settings_set_mode (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_PANES_VISIBLE_PROPERTY:
		enotes_services_settings_set_panes_visible (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_LAST_NOTEBOOK_PROPERTY:
		enotes_services_settings_set_last_notebook (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_LAST_PAGE_PROPERTY:
		enotes_services_settings_set_last_page (self, g_value_get_int (value));
		break;
		case ENOTES_SERVICES_SETTINGS_AUTO_INDENT_PROPERTY:
		enotes_services_settings_set_auto_indent (self, g_value_get_boolean (value));
		break;
		case ENOTES_SERVICES_SETTINGS_LINE_NUMBERS_PROPERTY:
		enotes_services_settings_set_line_numbers (self, g_value_get_boolean (value));
		break;
		case ENOTES_SERVICES_SETTINGS_IMPORT_FILES_PROPERTY:
		enotes_services_settings_set_import_files (self, g_value_get_boolean (value));
		break;
		case ENOTES_SERVICES_SETTINGS_SPELLCHECK_PROPERTY:
		enotes_services_settings_set_spellcheck (self, g_value_get_boolean (value));
		break;
		case ENOTES_SERVICES_SETTINGS_SHOW_PAGE_INFO_PROPERTY:
		enotes_services_settings_set_show_page_info (self, g_value_get_boolean (value));
		break;
		case ENOTES_SERVICES_SETTINGS_NOTES_DATABASE_PROPERTY:
		enotes_services_settings_set_notes_database (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_EDITOR_FONT_PROPERTY:
		enotes_services_settings_set_editor_font (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_EDITOR_SCHEME_PROPERTY:
		enotes_services_settings_set_editor_scheme (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_SPELLCHECK_LANGUAGE_PROPERTY:
		enotes_services_settings_set_spellcheck_language (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_STYLE_SCHEME_PROPERTY:
		enotes_services_settings_set_style_scheme (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_RENDER_STYLESHEET_PROPERTY:
		enotes_services_settings_set_render_stylesheet (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_STYLESHEET_PROPERTY:
		enotes_services_settings_set_stylesheet (self, g_value_get_string (value));
		break;
		case ENOTES_SERVICES_SETTINGS_RECENT_FILES_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			enotes_services_settings_set_recent_files (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		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 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;
}

