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

/*
 * Copyright 2021 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.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 FILES_TYPE_FILE_CHOOSER_CHOICE (files_file_chooser_choice_get_type ())
#define FILES_FILE_CHOOSER_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoice))
#define FILES_FILE_CHOOSER_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoiceClass))
#define FILES_IS_FILE_CHOOSER_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILES_TYPE_FILE_CHOOSER_CHOICE))
#define FILES_IS_FILE_CHOOSER_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILES_TYPE_FILE_CHOOSER_CHOICE))
#define FILES_FILE_CHOOSER_CHOICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoiceClass))

typedef struct _FilesFileChooserChoice FilesFileChooserChoice;
typedef struct _FilesFileChooserChoiceClass FilesFileChooserChoiceClass;
typedef struct _FilesFileChooserChoicePrivate FilesFileChooserChoicePrivate;
enum  {
	FILES_FILE_CHOOSER_CHOICE_0_PROPERTY,
	FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY,
	FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY,
	FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY,
	FILES_FILE_CHOOSER_CHOICE_NUM_PROPERTIES
};
static GParamSpec* files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _FilesFileChooserChoice {
	GtkBox parent_instance;
	FilesFileChooserChoicePrivate * priv;
};

struct _FilesFileChooserChoiceClass {
	GtkBoxClass parent_class;
};

struct _FilesFileChooserChoicePrivate {
	GVariant* _options;
	gchar* _label;
	gchar* _selected;
};

static gint FilesFileChooserChoice_private_offset;
static gpointer files_file_chooser_choice_parent_class = NULL;

VALA_EXTERN GType files_file_chooser_choice_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FilesFileChooserChoice, g_object_unref)
VALA_EXTERN FilesFileChooserChoice* files_file_chooser_choice_new_from_variant (GVariant* variant);
VALA_EXTERN FilesFileChooserChoice* files_file_chooser_choice_construct_from_variant (GType object_type,
                                                                          GVariant* variant);
VALA_EXTERN FilesFileChooserChoice* files_file_chooser_choice_new (void);
VALA_EXTERN FilesFileChooserChoice* files_file_chooser_choice_construct (GType object_type);
VALA_EXTERN GVariant* files_file_chooser_choice_get_options (FilesFileChooserChoice* self);
static void files_file_chooser_choice_set_options (FilesFileChooserChoice* self,
                                            GVariant* value);
VALA_EXTERN const gchar* files_file_chooser_choice_get_label (FilesFileChooserChoice* self);
VALA_EXTERN void files_file_chooser_choice_set_label (FilesFileChooserChoice* self,
                                          const gchar* value);
VALA_EXTERN const gchar* files_file_chooser_choice_get_selected (FilesFileChooserChoice* self);
VALA_EXTERN void files_file_chooser_choice_set_selected (FilesFileChooserChoice* self,
                                             const gchar* value);
static GObject * files_file_chooser_choice_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties);
static gboolean _files_file_chooser_choice____lambda4_ (FilesFileChooserChoice* self,
                                                 GBinding* b,
                                                 GValue* s,
                                                 GValue* t);
static gboolean __files_file_chooser_choice____lambda4__gbinding_transform_func (GBinding* binding,
                                                                          GValue* from_value,
                                                                          GValue* to_value,
                                                                          gpointer self);
static gboolean _files_file_chooser_choice____lambda5_ (FilesFileChooserChoice* self,
                                                 GBinding* b,
                                                 GValue* s,
                                                 GValue* t);
static gboolean __files_file_chooser_choice____lambda5__gbinding_transform_func (GBinding* binding,
                                                                          GValue* from_value,
                                                                          GValue* to_value,
                                                                          gpointer self);
static void files_file_chooser_choice_finalize (GObject * obj);
static GType files_file_chooser_choice_get_type_once (void);
static void _vala_files_file_chooser_choice_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_files_file_chooser_choice_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
files_file_chooser_choice_get_instance_private (FilesFileChooserChoice* self)
{
	return G_STRUCT_MEMBER_P (self, FilesFileChooserChoice_private_offset);
}

FilesFileChooserChoice*
files_file_chooser_choice_construct_from_variant (GType object_type,
                                                  GVariant* variant)
{
	FilesFileChooserChoice * self = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	gchar* id = NULL;
	gchar* label = NULL;
	gchar* selected = NULL;
	GVariant* options = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GVariant* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	g_return_val_if_fail (variant != NULL, NULL);
	_tmp0_ = g_variant_type_new ("(ssa(ss)s)");
	_tmp1_ = _tmp0_;
	_vala_return_val_if_fail (g_variant_is_of_type (variant, _tmp1_), "variant.is_of_type (new VariantType (\"(ssa(ss)s)\"))", NULL);
	g_variant_get (variant, "(ss@a(ss)s)", &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, NULL);
	_g_free0 (id);
	id = _tmp2_;
	_g_free0 (label);
	label = _tmp3_;
	_g_variant_unref0 (options);
	options = _tmp4_;
	_g_free0 (selected);
	selected = _tmp5_;
	_g_variant_type_free0 (_tmp1_);
	self = (FilesFileChooserChoice*) g_object_new (object_type, "name", id, "label", label, "options", options, "selected", selected, NULL);
	_g_variant_unref0 (options);
	_g_free0 (selected);
	_g_free0 (label);
	_g_free0 (id);
	return self;
}

FilesFileChooserChoice*
files_file_chooser_choice_new_from_variant (GVariant* variant)
{
	return files_file_chooser_choice_construct_from_variant (FILES_TYPE_FILE_CHOOSER_CHOICE, variant);
}

FilesFileChooserChoice*
files_file_chooser_choice_construct (GType object_type)
{
	FilesFileChooserChoice * self = NULL;
	self = (FilesFileChooserChoice*) g_object_new (object_type, NULL);
	return self;
}

FilesFileChooserChoice*
files_file_chooser_choice_new (void)
{
	return files_file_chooser_choice_construct (FILES_TYPE_FILE_CHOOSER_CHOICE);
}

GVariant*
files_file_chooser_choice_get_options (FilesFileChooserChoice* self)
{
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_options;
	result = _tmp0_;
	return result;
}

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

static void
files_file_chooser_choice_set_options (FilesFileChooserChoice* self,
                                       GVariant* value)
{
	GVariant* old_value;
	g_return_if_fail (self != NULL);
	old_value = files_file_chooser_choice_get_options (self);
	if (old_value != value) {
		GVariant* _tmp0_;
		_tmp0_ = _g_variant_ref0 (value);
		_g_variant_unref0 (self->priv->_options);
		self->priv->_options = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY]);
	}
}

const gchar*
files_file_chooser_choice_get_label (FilesFileChooserChoice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
files_file_chooser_choice_set_label (FilesFileChooserChoice* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = files_file_chooser_choice_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY]);
	}
}

const gchar*
files_file_chooser_choice_get_selected (FilesFileChooserChoice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected;
	result = _tmp0_;
	return result;
}

void
files_file_chooser_choice_set_selected (FilesFileChooserChoice* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = files_file_chooser_choice_get_selected (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_selected);
		self->priv->_selected = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY]);
	}
}

static gboolean
bool_parse (const gchar* str)
{
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	if (g_strcmp0 (str, "true") == 0) {
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static gboolean
_files_file_chooser_choice____lambda4_ (FilesFileChooserChoice* self,
                                        GBinding* b,
                                        GValue* s,
                                        GValue* t)
{
	GValue _tmp0_;
	gboolean result;
	g_return_val_if_fail (b != NULL, FALSE);
	g_return_val_if_fail (s != NULL, FALSE);
	g_return_val_if_fail (t != NULL, FALSE);
	_tmp0_ = *s;
	g_value_set_boolean (t, bool_parse (g_value_get_string (&_tmp0_)));
	result = TRUE;
	return result;
}

static gboolean
__files_file_chooser_choice____lambda4__gbinding_transform_func (GBinding* binding,
                                                                 GValue* from_value,
                                                                 GValue* to_value,
                                                                 gpointer self)
{
	gboolean result;
	result = _files_file_chooser_choice____lambda4_ ((FilesFileChooserChoice*) self, binding, from_value, to_value);
	return result;
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static gboolean
_files_file_chooser_choice____lambda5_ (FilesFileChooserChoice* self,
                                        GBinding* b,
                                        GValue* s,
                                        GValue* t)
{
	GValue _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean result;
	g_return_val_if_fail (b != NULL, FALSE);
	g_return_val_if_fail (s != NULL, FALSE);
	g_return_val_if_fail (t != NULL, FALSE);
	_tmp0_ = *s;
	_tmp1_ = bool_to_string (g_value_get_boolean (&_tmp0_));
	_tmp2_ = _tmp1_;
	g_value_set_string (t, _tmp2_);
	_g_free0 (_tmp2_);
	result = TRUE;
	return result;
}

static gboolean
__files_file_chooser_choice____lambda5__gbinding_transform_func (GBinding* binding,
                                                                 GValue* from_value,
                                                                 GValue* to_value,
                                                                 gpointer self)
{
	gboolean result;
	result = _files_file_chooser_choice____lambda5_ ((FilesFileChooserChoice*) self, binding, from_value, to_value);
	return result;
}

static GObject *
files_file_chooser_choice_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FilesFileChooserChoice * self;
	GtkLabel* label = NULL;
	const gchar* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GVariant* _tmp4_;
	parent_class = G_OBJECT_CLASS (files_file_chooser_choice_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoice);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_START);
	gtk_box_set_spacing ((GtkBox*) self, 6);
	_tmp0_ = self->priv->_label;
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	label = _tmp1_;
	_tmp2_ = label;
	g_object_bind_property_with_closures ((GObject*) self, "label", (GObject*) _tmp2_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp3_ = label;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->_options;
	if (g_variant_n_children (_tmp4_) == ((gsize) 0)) {
		GtkCheckButton* check = NULL;
		GtkCheckButton* _tmp5_;
		GtkCheckButton* _tmp6_;
		GtkCheckButton* _tmp7_;
		_tmp5_ = (GtkCheckButton*) gtk_check_button_new ();
		g_object_ref_sink (_tmp5_);
		check = _tmp5_;
		_tmp6_ = check;
		g_object_bind_property_with_closures ((GObject*) self, "selected", (GObject*) _tmp6_, "active", G_BINDING_BIDIRECTIONAL, (GClosure*) ((__files_file_chooser_choice____lambda4__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) __files_file_chooser_choice____lambda4__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((__files_file_chooser_choice____lambda5__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) __files_file_chooser_choice____lambda5__gbinding_transform_func, g_object_ref (self), (GClosureNotify) g_object_unref)));
		_tmp7_ = check;
		gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp7_);
		_g_object_unref0 (check);
	} else {
		GtkComboBoxText* combo = NULL;
		GtkComboBoxText* _tmp8_;
		GVariantIter* iter = NULL;
		GVariant* _tmp9_;
		GVariantIter* _tmp10_;
		gchar* key = NULL;
		gchar* val = NULL;
		GtkComboBoxText* _tmp18_;
		GtkComboBoxText* _tmp19_;
		_tmp8_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
		g_object_ref_sink (_tmp8_);
		combo = _tmp8_;
		_tmp9_ = self->priv->_options;
		_tmp10_ = g_variant_iter_new (_tmp9_);
		iter = _tmp10_;
		while (TRUE) {
			GVariantIter* _tmp11_;
			gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			gboolean _tmp14_;
			GtkComboBoxText* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp11_ = iter;
			_tmp14_ = g_variant_iter_next (_tmp11_, "(ss)", &_tmp12_, &_tmp13_, NULL);
			_g_free0 (key);
			key = _tmp12_;
			_g_free0 (val);
			val = _tmp13_;
			if (!_tmp14_) {
				break;
			}
			_tmp15_ = combo;
			_tmp16_ = key;
			_tmp17_ = val;
			gtk_combo_box_text_append (_tmp15_, _tmp16_, _tmp17_);
		}
		_tmp18_ = combo;
		g_object_bind_property_with_closures ((GObject*) self, "selected", (GObject*) _tmp18_, "active-id", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp19_ = combo;
		gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp19_);
		_g_free0 (val);
		_g_free0 (key);
		_g_variant_iter_free0 (iter);
		_g_object_unref0 (combo);
	}
	_g_object_unref0 (label);
	return obj;
}

static void
files_file_chooser_choice_class_init (FilesFileChooserChoiceClass * klass,
                                      gpointer klass_data)
{
	files_file_chooser_choice_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FilesFileChooserChoice_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_files_file_chooser_choice_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_files_file_chooser_choice_set_property;
	G_OBJECT_CLASS (klass)->constructor = files_file_chooser_choice_constructor;
	G_OBJECT_CLASS (klass)->finalize = files_file_chooser_choice_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY] = g_param_spec_variant ("options", "options", "options", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY, files_file_chooser_choice_properties[FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY] = g_param_spec_string ("selected", "selected", "selected", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
files_file_chooser_choice_instance_init (FilesFileChooserChoice * self,
                                         gpointer klass)
{
	self->priv = files_file_chooser_choice_get_instance_private (self);
}

static void
files_file_chooser_choice_finalize (GObject * obj)
{
	FilesFileChooserChoice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoice);
	_g_variant_unref0 (self->priv->_options);
	_g_free0 (self->priv->_label);
	_g_free0 (self->priv->_selected);
	G_OBJECT_CLASS (files_file_chooser_choice_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
files_file_chooser_choice_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FilesFileChooserChoiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) files_file_chooser_choice_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FilesFileChooserChoice), 0, (GInstanceInitFunc) files_file_chooser_choice_instance_init, NULL };
	GType files_file_chooser_choice_type_id;
	files_file_chooser_choice_type_id = g_type_register_static (gtk_box_get_type (), "FilesFileChooserChoice", &g_define_type_info, 0);
	FilesFileChooserChoice_private_offset = g_type_add_instance_private (files_file_chooser_choice_type_id, sizeof (FilesFileChooserChoicePrivate));
	return files_file_chooser_choice_type_id;
}

GType
files_file_chooser_choice_get_type (void)
{
	static volatile gsize files_file_chooser_choice_type_id__once = 0;
	if (g_once_init_enter (&files_file_chooser_choice_type_id__once)) {
		GType files_file_chooser_choice_type_id;
		files_file_chooser_choice_type_id = files_file_chooser_choice_get_type_once ();
		g_once_init_leave (&files_file_chooser_choice_type_id__once, files_file_chooser_choice_type_id);
	}
	return files_file_chooser_choice_type_id__once;
}

static void
_vala_files_file_chooser_choice_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	FilesFileChooserChoice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoice);
	switch (property_id) {
		case FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY:
		g_value_set_variant (value, files_file_chooser_choice_get_options (self));
		break;
		case FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY:
		g_value_set_string (value, files_file_chooser_choice_get_label (self));
		break;
		case FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY:
		g_value_set_string (value, files_file_chooser_choice_get_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_files_file_chooser_choice_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	FilesFileChooserChoice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FILES_TYPE_FILE_CHOOSER_CHOICE, FilesFileChooserChoice);
	switch (property_id) {
		case FILES_FILE_CHOOSER_CHOICE_OPTIONS_PROPERTY:
		files_file_chooser_choice_set_options (self, g_value_get_variant (value));
		break;
		case FILES_FILE_CHOOSER_CHOICE_LABEL_PROPERTY:
		files_file_chooser_choice_set_label (self, g_value_get_string (value));
		break;
		case FILES_FILE_CHOOSER_CHOICE_SELECTED_PROPERTY:
		files_file_chooser_choice_set_selected (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

