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

/* 
 *      Copyright 2011 Julien Lavergne <gilir@ubuntu.com>
 *
 *      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., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
/* TODO Replace other utlity in the start script */

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <lxsettings-daemon/settings-daemon.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 LXSESSION_TYPE_OPTION (lxsession_option_get_type ())
#define LXSESSION_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_OPTION, LxsessionOption))
#define LXSESSION_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_OPTION, LxsessionOptionClass))
#define LXSESSION_IS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_OPTION))
#define LXSESSION_IS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_OPTION))
#define LXSESSION_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_OPTION, LxsessionOptionClass))

typedef struct _LxsessionOption LxsessionOption;
typedef struct _LxsessionOptionClass LxsessionOptionClass;
typedef struct _LxsessionOptionPrivate LxsessionOptionPrivate;
enum  {
	LXSESSION_OPTION_0_PROPERTY,
	LXSESSION_OPTION_NUM_PROPERTIES
};
static GParamSpec* lxsession_option_properties[LXSESSION_OPTION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define LXSESSION_TYPE_LXSESSION_CONFIG (lxsession_lxsession_config_get_type ())
#define LXSESSION_LXSESSION_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfig))
#define LXSESSION_LXSESSION_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfigClass))
#define LXSESSION_IS_LXSESSION_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LXSESSION_CONFIG))
#define LXSESSION_IS_LXSESSION_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LXSESSION_CONFIG))
#define LXSESSION_LXSESSION_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfigClass))

typedef struct _LxsessionLxsessionConfig LxsessionLxsessionConfig;
typedef struct _LxsessionLxsessionConfigClass LxsessionLxsessionConfigClass;

#define LXSESSION_TYPE_KEYMAP_OPTION (lxsession_keymap_option_get_type ())
#define LXSESSION_KEYMAP_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_KEYMAP_OPTION, LxsessionKeymapOption))
#define LXSESSION_KEYMAP_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_KEYMAP_OPTION, LxsessionKeymapOptionClass))
#define LXSESSION_IS_KEYMAP_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_KEYMAP_OPTION))
#define LXSESSION_IS_KEYMAP_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_KEYMAP_OPTION))
#define LXSESSION_KEYMAP_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_KEYMAP_OPTION, LxsessionKeymapOptionClass))

typedef struct _LxsessionKeymapOption LxsessionKeymapOption;
typedef struct _LxsessionKeymapOptionClass LxsessionKeymapOptionClass;
typedef struct _LxsessionKeymapOptionPrivate LxsessionKeymapOptionPrivate;
enum  {
	LXSESSION_KEYMAP_OPTION_0_PROPERTY,
	LXSESSION_KEYMAP_OPTION_NUM_PROPERTIES
};
static GParamSpec* lxsession_keymap_option_properties[LXSESSION_KEYMAP_OPTION_NUM_PROPERTIES];
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

#define LXSESSION_TYPE_CLIPBOARD_OPTION (lxsession_clipboard_option_get_type ())
#define LXSESSION_CLIPBOARD_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_CLIPBOARD_OPTION, LxsessionClipboardOption))
#define LXSESSION_CLIPBOARD_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_CLIPBOARD_OPTION, LxsessionClipboardOptionClass))
#define LXSESSION_IS_CLIPBOARD_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_CLIPBOARD_OPTION))
#define LXSESSION_IS_CLIPBOARD_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_CLIPBOARD_OPTION))
#define LXSESSION_CLIPBOARD_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_CLIPBOARD_OPTION, LxsessionClipboardOptionClass))

typedef struct _LxsessionClipboardOption LxsessionClipboardOption;
typedef struct _LxsessionClipboardOptionClass LxsessionClipboardOptionClass;
typedef struct _LxsessionClipboardOptionPrivate LxsessionClipboardOptionPrivate;
enum  {
	LXSESSION_CLIPBOARD_OPTION_0_PROPERTY,
	LXSESSION_CLIPBOARD_OPTION_NUM_PROPERTIES
};
static GParamSpec* lxsession_clipboard_option_properties[LXSESSION_CLIPBOARD_OPTION_NUM_PROPERTIES];

#define LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION (lxsession_upstart_user_session_option_get_type ())
#define LXSESSION_UPSTART_USER_SESSION_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION, LxsessionUpstartUserSessionOption))
#define LXSESSION_UPSTART_USER_SESSION_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION, LxsessionUpstartUserSessionOptionClass))
#define LXSESSION_IS_UPSTART_USER_SESSION_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION))
#define LXSESSION_IS_UPSTART_USER_SESSION_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION))
#define LXSESSION_UPSTART_USER_SESSION_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION, LxsessionUpstartUserSessionOptionClass))

typedef struct _LxsessionUpstartUserSessionOption LxsessionUpstartUserSessionOption;
typedef struct _LxsessionUpstartUserSessionOptionClass LxsessionUpstartUserSessionOptionClass;
typedef struct _LxsessionUpstartUserSessionOptionPrivate LxsessionUpstartUserSessionOptionPrivate;
enum  {
	LXSESSION_UPSTART_USER_SESSION_OPTION_0_PROPERTY,
	LXSESSION_UPSTART_USER_SESSION_OPTION_NUM_PROPERTIES
};
static GParamSpec* lxsession_upstart_user_session_option_properties[LXSESSION_UPSTART_USER_SESSION_OPTION_NUM_PROPERTIES];

#define LXSESSION_TYPE_XSETTINGS_OPTION (lxsession_xsettings_option_get_type ())
#define LXSESSION_XSETTINGS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOption))
#define LXSESSION_XSETTINGS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOptionClass))
#define LXSESSION_IS_XSETTINGS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_XSETTINGS_OPTION))
#define LXSESSION_IS_XSETTINGS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_XSETTINGS_OPTION))
#define LXSESSION_XSETTINGS_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOptionClass))

typedef struct _LxsessionXSettingsOption LxsessionXSettingsOption;
typedef struct _LxsessionXSettingsOptionClass LxsessionXSettingsOptionClass;
typedef struct _LxsessionXSettingsOptionPrivate LxsessionXSettingsOptionPrivate;
enum  {
	LXSESSION_XSETTINGS_OPTION_0_PROPERTY,
	LXSESSION_XSETTINGS_OPTION_NUM_PROPERTIES
};
static GParamSpec* lxsession_xsettings_option_properties[LXSESSION_XSETTINGS_OPTION_NUM_PROPERTIES];

#define LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE (lxsession_lxsession_config_key_file_get_type ())
#define LXSESSION_LXSESSION_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFile))
#define LXSESSION_LXSESSION_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFileClass))
#define LXSESSION_IS_LXSESSION_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE))
#define LXSESSION_IS_LXSESSION_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE))
#define LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFileClass))

typedef struct _LxsessionLxsessionConfigKeyFile LxsessionLxsessionConfigKeyFile;
typedef struct _LxsessionLxsessionConfigKeyFileClass LxsessionLxsessionConfigKeyFileClass;
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))

struct _LxsessionOption {
	GObject parent_instance;
	LxsessionOptionPrivate * priv;
	gchar* command;
};

struct _LxsessionOptionClass {
	GObjectClass parent_class;
};

struct _LxsessionKeymapOption {
	LxsessionOption parent_instance;
	LxsessionKeymapOptionPrivate * priv;
};

struct _LxsessionKeymapOptionClass {
	LxsessionOptionClass parent_class;
};

struct _LxsessionClipboardOption {
	LxsessionOption parent_instance;
	LxsessionClipboardOptionPrivate * priv;
};

struct _LxsessionClipboardOptionClass {
	LxsessionOptionClass parent_class;
};

struct _LxsessionUpstartUserSessionOption {
	LxsessionOption parent_instance;
	LxsessionUpstartUserSessionOptionPrivate * priv;
};

struct _LxsessionUpstartUserSessionOptionClass {
	LxsessionOptionClass parent_class;
};

struct _LxsessionUpstartUserSessionOptionPrivate {
	gchar* command1;
};

struct _LxsessionXSettingsOption {
	GObject parent_instance;
	LxsessionXSettingsOptionPrivate * priv;
};

struct _LxsessionXSettingsOptionClass {
	GObjectClass parent_class;
};

struct _LxsessionXSettingsOptionPrivate {
	gchar* command;
};

static gpointer lxsession_option_parent_class = NULL;
static gpointer lxsession_keymap_option_parent_class = NULL;
static gpointer lxsession_clipboard_option_parent_class = NULL;
static gint LxsessionUpstartUserSessionOption_private_offset;
static gpointer lxsession_upstart_user_session_option_parent_class = NULL;
static gint LxsessionXSettingsOption_private_offset;
static gpointer lxsession_xsettings_option_parent_class = NULL;
VALA_EXTERN LxsessionLxsessionConfigKeyFile* lxsession_global_settings;

VALA_EXTERN GType lxsession_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionOption, g_object_unref)
VALA_EXTERN GType lxsession_lxsession_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionLxsessionConfig, g_object_unref)
VALA_EXTERN LxsessionOption* lxsession_option_new (LxsessionLxsessionConfig* config);
VALA_EXTERN LxsessionOption* lxsession_option_construct (GType object_type,
                                             LxsessionLxsessionConfig* config);
VALA_EXTERN void lxsession_option_activate (LxsessionOption* self);
VALA_EXTERN void lxsession_lxsession_spawn_command_line_async (const gchar* command_line);
static void lxsession_option_finalize (GObject * obj);
static GType lxsession_option_get_type_once (void);
VALA_EXTERN GType lxsession_keymap_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionKeymapOption, g_object_unref)
VALA_EXTERN LxsessionKeymapOption* lxsession_keymap_option_new (LxsessionLxsessionConfig* config);
VALA_EXTERN LxsessionKeymapOption* lxsession_keymap_option_construct (GType object_type,
                                                          LxsessionLxsessionConfig* config);
VALA_EXTERN gchar* lxsession_lxsession_config_get_item_string (LxsessionLxsessionConfig* self,
                                                   const gchar* categorie,
                                                   const gchar* key1,
                                                   const gchar* key2);
VALA_EXTERN gchar* lxsession_keymap_option_create_user_mode_command (LxsessionKeymapOption* self,
                                                         LxsessionLxsessionConfig* config);
static GType lxsession_keymap_option_get_type_once (void);
VALA_EXTERN GType lxsession_clipboard_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionClipboardOption, g_object_unref)
VALA_EXTERN LxsessionClipboardOption* lxsession_clipboard_option_new (LxsessionLxsessionConfig* config);
VALA_EXTERN LxsessionClipboardOption* lxsession_clipboard_option_construct (GType object_type,
                                                                LxsessionLxsessionConfig* config);
VALA_EXTERN void lxsession_clipboard_option_desactivate (LxsessionClipboardOption* self);
static GType lxsession_clipboard_option_get_type_once (void);
VALA_EXTERN GType lxsession_upstart_user_session_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionUpstartUserSessionOption, g_object_unref)
VALA_EXTERN LxsessionUpstartUserSessionOption* lxsession_upstart_user_session_option_new (LxsessionLxsessionConfig* config);
VALA_EXTERN LxsessionUpstartUserSessionOption* lxsession_upstart_user_session_option_construct (GType object_type,
                                                                                    LxsessionLxsessionConfig* config);
VALA_EXTERN void lxsession_upstart_user_session_option_activate (LxsessionUpstartUserSessionOption* self);
static void lxsession_upstart_user_session_option_finalize (GObject * obj);
static GType lxsession_upstart_user_session_option_get_type_once (void);
VALA_EXTERN GType lxsession_xsettings_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionXSettingsOption, g_object_unref)
VALA_EXTERN LxsessionXSettingsOption* lxsession_xsettings_option_new (void);
VALA_EXTERN LxsessionXSettingsOption* lxsession_xsettings_option_construct (GType object_type);
VALA_EXTERN void lxsession_xsettings_option_activate (LxsessionXSettingsOption* self);
VALA_EXTERN GType lxsession_lxsession_config_key_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionLxsessionConfigKeyFile, g_object_unref)
VALA_EXTERN GKeyFile* lxsession_load_keyfile (const gchar* config_path);
VALA_EXTERN gchar* lxsession_get_config_path (const gchar* conf_file);
VALA_EXTERN void lxsession_xsettings_option_reload (LxsessionXSettingsOption* self);
static void lxsession_xsettings_option_finalize (GObject * obj);
static GType lxsession_xsettings_option_get_type_once (void);

LxsessionOption*
lxsession_option_construct (GType object_type,
                            LxsessionLxsessionConfig* config)
{
	LxsessionOption * self = NULL;
	g_return_val_if_fail (config != NULL, NULL);
	self = (LxsessionOption*) g_object_new (object_type, NULL);
	return self;
}

LxsessionOption*
lxsession_option_new (LxsessionLxsessionConfig* config)
{
	return lxsession_option_construct (LXSESSION_TYPE_OPTION, config);
}

void
lxsession_option_activate (LxsessionOption* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->command;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (NULL)))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (" ")))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				_tmp4_ = self->command;
				g_message ("options.vala:44: Options - Launch command %s", _tmp4_);
				_tmp5_ = self->command;
				lxsession_lxsession_spawn_command_line_async (_tmp5_);
				break;
			}
		}
	}
}

static void
lxsession_option_class_init (LxsessionOptionClass * klass,
                             gpointer klass_data)
{
	lxsession_option_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = lxsession_option_finalize;
}

static void
lxsession_option_instance_init (LxsessionOption * self,
                                gpointer klass)
{
}

static void
lxsession_option_finalize (GObject * obj)
{
	LxsessionOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_OPTION, LxsessionOption);
	_g_free0 (self->command);
	G_OBJECT_CLASS (lxsession_option_parent_class)->finalize (obj);
}

static GType
lxsession_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionOption), 0, (GInstanceInitFunc) lxsession_option_instance_init, NULL };
	GType lxsession_option_type_id;
	lxsession_option_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionOption", &g_define_type_info, 0);
	return lxsession_option_type_id;
}

GType
lxsession_option_get_type (void)
{
	static volatile gsize lxsession_option_type_id__once = 0;
	if (g_once_init_enter (&lxsession_option_type_id__once)) {
		GType lxsession_option_type_id;
		lxsession_option_type_id = lxsession_option_get_type_once ();
		g_once_init_leave (&lxsession_option_type_id__once, lxsession_option_type_id);
	}
	return lxsession_option_type_id__once;
}

LxsessionKeymapOption*
lxsession_keymap_option_construct (GType object_type,
                                   LxsessionLxsessionConfig* config)
{
	LxsessionKeymapOption * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (config != NULL, NULL);
	self = (LxsessionKeymapOption*) lxsession_option_construct (object_type, config);
	_tmp0_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "mode", NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "user") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		gchar* _tmp3_;
		_tmp3_ = lxsession_keymap_option_create_user_mode_command (self, config);
		_g_free0 (((LxsessionOption*) self)->command);
		((LxsessionOption*) self)->command = _tmp3_;
	}
	return self;
}

LxsessionKeymapOption*
lxsession_keymap_option_new (LxsessionLxsessionConfig* config)
{
	return lxsession_keymap_option_construct (LXSESSION_TYPE_KEYMAP_OPTION, config);
}

gchar*
lxsession_keymap_option_create_user_mode_command (LxsessionKeymapOption* self,
                                                  LxsessionLxsessionConfig* config)
{
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gboolean _tmp12_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gboolean _tmp20_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gboolean _tmp30_;
	GString* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (config != NULL, NULL);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	_tmp1_ = builder;
	g_string_append (_tmp1_, "setxkbmap ");
	_tmp2_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "model", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ != NULL;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		GString* _tmp5_;
		GString* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GString* _tmp9_;
		_tmp5_ = builder;
		g_string_append (_tmp5_, "-model ");
		_tmp6_ = builder;
		_tmp7_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "model", NULL);
		_tmp8_ = _tmp7_;
		g_string_append (_tmp6_, _tmp8_);
		_g_free0 (_tmp8_);
		_tmp9_ = builder;
		g_string_append (_tmp9_, " ");
	}
	_tmp10_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "layout", NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_ != NULL;
	_g_free0 (_tmp11_);
	if (_tmp12_) {
		GString* _tmp13_;
		GString* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		GString* _tmp17_;
		_tmp13_ = builder;
		g_string_append (_tmp13_, "-layout ");
		_tmp14_ = builder;
		_tmp15_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "layout", NULL);
		_tmp16_ = _tmp15_;
		g_string_append (_tmp14_, _tmp16_);
		_g_free0 (_tmp16_);
		_tmp17_ = builder;
		g_string_append (_tmp17_, " ");
	}
	_tmp18_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "variant", NULL);
	_tmp19_ = _tmp18_;
	_tmp20_ = _tmp19_ != NULL;
	_g_free0 (_tmp19_);
	if (_tmp20_) {
		GString* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		GString* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		GString* _tmp27_;
		_tmp21_ = builder;
		g_string_append (_tmp21_, "-variant ");
		_tmp22_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "variant", NULL);
		_tmp23_ = _tmp22_;
		g_message ("options.vala:80: Show keymap variant : %s", _tmp23_);
		_g_free0 (_tmp23_);
		_tmp24_ = builder;
		_tmp25_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "variant", NULL);
		_tmp26_ = _tmp25_;
		g_string_append (_tmp24_, _tmp26_);
		_g_free0 (_tmp26_);
		_tmp27_ = builder;
		g_string_append (_tmp27_, " ");
	}
	_tmp28_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "options", NULL);
	_tmp29_ = _tmp28_;
	_tmp30_ = _tmp29_ != NULL;
	_g_free0 (_tmp29_);
	if (_tmp30_) {
		GString* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		GString* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		GString* _tmp37_;
		_tmp31_ = builder;
		g_string_append (_tmp31_, "-options ");
		_tmp32_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "options", NULL);
		_tmp33_ = _tmp32_;
		g_message ("options.vala:87: Show keymap options : %s", _tmp33_);
		_g_free0 (_tmp33_);
		_tmp34_ = builder;
		_tmp35_ = lxsession_lxsession_config_get_item_string (config, "Keymap", "options", NULL);
		_tmp36_ = _tmp35_;
		g_string_append (_tmp34_, _tmp36_);
		_g_free0 (_tmp36_);
		_tmp37_ = builder;
		g_string_append (_tmp37_, " ");
	}
	_tmp38_ = builder;
	_tmp39_ = _tmp38_->str;
	_tmp40_ = g_strdup (_tmp39_);
	_g_free0 (((LxsessionOption*) self)->command);
	((LxsessionOption*) self)->command = _tmp40_;
	_tmp41_ = ((LxsessionOption*) self)->command;
	g_message ("options.vala:93: Keymap options - return user command %s", _tmp41_);
	_tmp42_ = ((LxsessionOption*) self)->command;
	_tmp43_ = g_strdup (_tmp42_);
	result = _tmp43_;
	_g_string_free0 (builder);
	return result;
}

static void
lxsession_keymap_option_class_init (LxsessionKeymapOptionClass * klass,
                                    gpointer klass_data)
{
	lxsession_keymap_option_parent_class = g_type_class_peek_parent (klass);
}

static void
lxsession_keymap_option_instance_init (LxsessionKeymapOption * self,
                                       gpointer klass)
{
}

static GType
lxsession_keymap_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionKeymapOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_keymap_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionKeymapOption), 0, (GInstanceInitFunc) lxsession_keymap_option_instance_init, NULL };
	GType lxsession_keymap_option_type_id;
	lxsession_keymap_option_type_id = g_type_register_static (LXSESSION_TYPE_OPTION, "LxsessionKeymapOption", &g_define_type_info, 0);
	return lxsession_keymap_option_type_id;
}

GType
lxsession_keymap_option_get_type (void)
{
	static volatile gsize lxsession_keymap_option_type_id__once = 0;
	if (g_once_init_enter (&lxsession_keymap_option_type_id__once)) {
		GType lxsession_keymap_option_type_id;
		lxsession_keymap_option_type_id = lxsession_keymap_option_get_type_once ();
		g_once_init_leave (&lxsession_keymap_option_type_id__once, lxsession_keymap_option_type_id);
	}
	return lxsession_keymap_option_type_id__once;
}

LxsessionClipboardOption*
lxsession_clipboard_option_construct (GType object_type,
                                      LxsessionLxsessionConfig* config)
{
	LxsessionClipboardOption * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	g_return_val_if_fail (config != NULL, NULL);
	self = (LxsessionClipboardOption*) lxsession_option_construct (object_type, config);
	_tmp0_ = lxsession_lxsession_config_get_item_string (config, "Session", "clipboard", "command");
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	g_free (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("lxclipboard")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				g_message ("options.vala:110: Create Option Clipboard");
				_tmp4_ = g_strdup ("lxclipboard");
				_g_free0 (((LxsessionOption*) self)->command);
				((LxsessionOption*) self)->command = _tmp4_;
				break;
			}
		}
	}
	return self;
}

LxsessionClipboardOption*
lxsession_clipboard_option_new (LxsessionLxsessionConfig* config)
{
	return lxsession_clipboard_option_construct (LXSESSION_TYPE_CLIPBOARD_OPTION, config);
}

void
lxsession_clipboard_option_desactivate (LxsessionClipboardOption* self)
{
	g_return_if_fail (self != NULL);
}

static void
lxsession_clipboard_option_class_init (LxsessionClipboardOptionClass * klass,
                                       gpointer klass_data)
{
	lxsession_clipboard_option_parent_class = g_type_class_peek_parent (klass);
}

static void
lxsession_clipboard_option_instance_init (LxsessionClipboardOption * self,
                                          gpointer klass)
{
}

static GType
lxsession_clipboard_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionClipboardOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_clipboard_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionClipboardOption), 0, (GInstanceInitFunc) lxsession_clipboard_option_instance_init, NULL };
	GType lxsession_clipboard_option_type_id;
	lxsession_clipboard_option_type_id = g_type_register_static (LXSESSION_TYPE_OPTION, "LxsessionClipboardOption", &g_define_type_info, 0);
	return lxsession_clipboard_option_type_id;
}

GType
lxsession_clipboard_option_get_type (void)
{
	static volatile gsize lxsession_clipboard_option_type_id__once = 0;
	if (g_once_init_enter (&lxsession_clipboard_option_type_id__once)) {
		GType lxsession_clipboard_option_type_id;
		lxsession_clipboard_option_type_id = lxsession_clipboard_option_get_type_once ();
		g_once_init_leave (&lxsession_clipboard_option_type_id__once, lxsession_clipboard_option_type_id);
	}
	return lxsession_clipboard_option_type_id__once;
}

static inline gpointer
lxsession_upstart_user_session_option_get_instance_private (LxsessionUpstartUserSessionOption* self)
{
	return G_STRUCT_MEMBER_P (self, LxsessionUpstartUserSessionOption_private_offset);
}

LxsessionUpstartUserSessionOption*
lxsession_upstart_user_session_option_construct (GType object_type,
                                                 LxsessionLxsessionConfig* config)
{
	LxsessionUpstartUserSessionOption * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (config != NULL, NULL);
	self = (LxsessionUpstartUserSessionOption*) lxsession_option_construct (object_type, config);
	_tmp0_ = lxsession_lxsession_config_get_item_string (config, "Session", "upstart_user_session", NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "true") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		gchar* _tmp3_;
		_tmp3_ = g_strdup ("init --user");
		_g_free0 (self->priv->command1);
		self->priv->command1 = _tmp3_;
	}
	return self;
}

LxsessionUpstartUserSessionOption*
lxsession_upstart_user_session_option_new (LxsessionLxsessionConfig* config)
{
	return lxsession_upstart_user_session_option_construct (LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION, config);
}

void
lxsession_upstart_user_session_option_activate (LxsessionUpstartUserSessionOption* self)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->command1;
	lxsession_lxsession_spawn_command_line_async (_tmp0_);
}

static void
lxsession_upstart_user_session_option_class_init (LxsessionUpstartUserSessionOptionClass * klass,
                                                  gpointer klass_data)
{
	lxsession_upstart_user_session_option_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LxsessionUpstartUserSessionOption_private_offset);
	G_OBJECT_CLASS (klass)->finalize = lxsession_upstart_user_session_option_finalize;
}

static void
lxsession_upstart_user_session_option_instance_init (LxsessionUpstartUserSessionOption * self,
                                                     gpointer klass)
{
	self->priv = lxsession_upstart_user_session_option_get_instance_private (self);
}

static void
lxsession_upstart_user_session_option_finalize (GObject * obj)
{
	LxsessionUpstartUserSessionOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_UPSTART_USER_SESSION_OPTION, LxsessionUpstartUserSessionOption);
	_g_free0 (self->priv->command1);
	G_OBJECT_CLASS (lxsession_upstart_user_session_option_parent_class)->finalize (obj);
}

static GType
lxsession_upstart_user_session_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionUpstartUserSessionOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_upstart_user_session_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionUpstartUserSessionOption), 0, (GInstanceInitFunc) lxsession_upstart_user_session_option_instance_init, NULL };
	GType lxsession_upstart_user_session_option_type_id;
	lxsession_upstart_user_session_option_type_id = g_type_register_static (LXSESSION_TYPE_OPTION, "LxsessionUpstartUserSessionOption", &g_define_type_info, 0);
	LxsessionUpstartUserSessionOption_private_offset = g_type_add_instance_private (lxsession_upstart_user_session_option_type_id, sizeof (LxsessionUpstartUserSessionOptionPrivate));
	return lxsession_upstart_user_session_option_type_id;
}

GType
lxsession_upstart_user_session_option_get_type (void)
{
	static volatile gsize lxsession_upstart_user_session_option_type_id__once = 0;
	if (g_once_init_enter (&lxsession_upstart_user_session_option_type_id__once)) {
		GType lxsession_upstart_user_session_option_type_id;
		lxsession_upstart_user_session_option_type_id = lxsession_upstart_user_session_option_get_type_once ();
		g_once_init_leave (&lxsession_upstart_user_session_option_type_id__once, lxsession_upstart_user_session_option_type_id);
	}
	return lxsession_upstart_user_session_option_type_id__once;
}

static inline gpointer
lxsession_xsettings_option_get_instance_private (LxsessionXSettingsOption* self)
{
	return G_STRUCT_MEMBER_P (self, LxsessionXSettingsOption_private_offset);
}

LxsessionXSettingsOption*
lxsession_xsettings_option_construct (GType object_type)
{
	LxsessionXSettingsOption * self = NULL;
	self = (LxsessionXSettingsOption*) g_object_new (object_type, NULL);
	return self;
}

LxsessionXSettingsOption*
lxsession_xsettings_option_new (void)
{
	return lxsession_xsettings_option_construct (LXSESSION_TYPE_XSETTINGS_OPTION);
}

void
lxsession_xsettings_option_activate (LxsessionXSettingsOption* self)
{
	LxsessionLxsessionConfigKeyFile* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	static GQuark _tmp4_label2 = 0;
	static GQuark _tmp4_label3 = 0;
	static GQuark _tmp4_label4 = 0;
	static GQuark _tmp4_label5 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = lxsession_global_settings;
	_tmp1_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) _tmp0_, "Session", "xsettings_manager", "command");
	_g_free0 (self->priv->command);
	self->priv->command = _tmp1_;
	_tmp2_ = self->priv->command;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string (NULL)))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("")))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string (" ")))) {
		switch (0) {
			default:
			{
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label3) ? _tmp4_label3 : (_tmp4_label3 = g_quark_from_static_string ("build-in")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				gchar* _tmp7_;
				GKeyFile* _tmp8_;
				GKeyFile* _tmp9_;
				g_message ("options.vala:164: Activate xsettings_manager build-in");
				_tmp6_ = lxsession_get_config_path ("desktop.conf");
				_tmp7_ = _tmp6_;
				_tmp8_ = lxsession_load_keyfile (_tmp7_);
				_tmp9_ = _tmp8_;
				settings_daemon_start (_tmp9_);
				_g_key_file_unref0 (_tmp9_);
				_g_free0 (_tmp7_);
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label4) ? _tmp4_label4 : (_tmp4_label4 = g_quark_from_static_string ("gnome")))) {
		switch (0) {
			default:
			{
				lxsession_lxsession_spawn_command_line_async ("gnome-settings-daemon");
				break;
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label5) ? _tmp4_label5 : (_tmp4_label5 = g_quark_from_static_string ("xfce")))) {
		switch (0) {
			default:
			{
				lxsession_lxsession_spawn_command_line_async ("xfsettingsd");
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp10_;
				_tmp10_ = self->priv->command;
				lxsession_lxsession_spawn_command_line_async (_tmp10_);
				break;
			}
		}
	}
}

void
lxsession_xsettings_option_reload (LxsessionXSettingsOption* self)
{
	LxsessionLxsessionConfigKeyFile* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_ = 0U;
	static GQuark _tmp4_label0 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = lxsession_global_settings;
	_tmp1_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) _tmp0_, "Session", "xsettings_manager", "command");
	_g_free0 (self->priv->command);
	self->priv->command = _tmp1_;
	_tmp2_ = self->priv->command;
	_tmp3_ = _tmp2_;
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("build-in")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				gchar* _tmp7_;
				GKeyFile* _tmp8_;
				GKeyFile* _tmp9_;
				g_message ("options.vala:186: Reload xsettings_manager build-in");
				_tmp6_ = lxsession_get_config_path ("desktop.conf");
				_tmp7_ = _tmp6_;
				_tmp8_ = lxsession_load_keyfile (_tmp7_);
				_tmp9_ = _tmp8_;
				settings_daemon_reload (_tmp9_);
				_g_key_file_unref0 (_tmp9_);
				_g_free0 (_tmp7_);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_message ("options.vala:190: Reload xsettings_manager default");
				lxsession_xsettings_option_activate (self);
				break;
			}
		}
	}
}

static void
lxsession_xsettings_option_class_init (LxsessionXSettingsOptionClass * klass,
                                       gpointer klass_data)
{
	lxsession_xsettings_option_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LxsessionXSettingsOption_private_offset);
	G_OBJECT_CLASS (klass)->finalize = lxsession_xsettings_option_finalize;
}

static void
lxsession_xsettings_option_instance_init (LxsessionXSettingsOption * self,
                                          gpointer klass)
{
	self->priv = lxsession_xsettings_option_get_instance_private (self);
}

static void
lxsession_xsettings_option_finalize (GObject * obj)
{
	LxsessionXSettingsOption * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOption);
	_g_free0 (self->priv->command);
	G_OBJECT_CLASS (lxsession_xsettings_option_parent_class)->finalize (obj);
}

static GType
lxsession_xsettings_option_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionXSettingsOptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_xsettings_option_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionXSettingsOption), 0, (GInstanceInitFunc) lxsession_xsettings_option_instance_init, NULL };
	GType lxsession_xsettings_option_type_id;
	lxsession_xsettings_option_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionXSettingsOption", &g_define_type_info, 0);
	LxsessionXSettingsOption_private_offset = g_type_add_instance_private (lxsession_xsettings_option_type_id, sizeof (LxsessionXSettingsOptionPrivate));
	return lxsession_xsettings_option_type_id;
}

GType
lxsession_xsettings_option_get_type (void)
{
	static volatile gsize lxsession_xsettings_option_type_id__once = 0;
	if (g_once_init_enter (&lxsession_xsettings_option_type_id__once)) {
		GType lxsession_xsettings_option_type_id;
		lxsession_xsettings_option_type_id = lxsession_xsettings_option_get_type_once ();
		g_once_init_leave (&lxsession_xsettings_option_type_id__once, lxsession_xsettings_option_type_id);
	}
	return lxsession_xsettings_option_type_id__once;
}

