/* preferences-theme-row.c generated by valac 0.56.19, the Vala compiler
 * generated from preferences-theme-row.vala, do not modify */

#include "protonplus_core.h"
#include <glib.h>
#include <glib-object.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <pango/pango.h>
#include <glib/gi18n-lib.h>

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

enum  {
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_preferences_theme_row_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_NUM_PROPERTIES];

#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME (proton_plus_widgets_preferences_theme_row_theme_get_type ())
#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowTheme))
#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowThemeClass))
#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME))
#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME))
#define PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowThemeClass))

typedef struct _ProtonPlusWidgetsPreferencesThemeRowTheme ProtonPlusWidgetsPreferencesThemeRowTheme;
typedef struct _ProtonPlusWidgetsPreferencesThemeRowThemeClass ProtonPlusWidgetsPreferencesThemeRowThemeClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ProtonPlusWidgetsPreferencesThemeRowThemePrivate ProtonPlusWidgetsPreferencesThemeRowThemePrivate;
enum  {
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_0_PROPERTY,
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY,
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY,
	PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_preferences_theme_row_theme_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))

struct _ProtonPlusWidgetsPreferencesThemeRowTheme {
	GObject parent_instance;
	ProtonPlusWidgetsPreferencesThemeRowThemePrivate * priv;
};

struct _ProtonPlusWidgetsPreferencesThemeRowThemeClass {
	GObjectClass parent_class;
};

struct _ProtonPlusWidgetsPreferencesThemeRowThemePrivate {
	gchar* _title;
	gint _color_scheme;
};

static gpointer proton_plus_widgets_preferences_theme_row_parent_class = NULL;
static gint ProtonPlusWidgetsPreferencesThemeRowTheme_private_offset;
static gpointer proton_plus_widgets_preferences_theme_row_theme_parent_class = NULL;

static void proton_plus_widgets_preferences_theme_row_selected_item_changed (ProtonPlusWidgetsPreferencesThemeRow* self);
static GType proton_plus_widgets_preferences_theme_row_theme_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gint proton_plus_widgets_preferences_theme_row_theme_get_color_scheme (ProtonPlusWidgetsPreferencesThemeRowTheme* self);
static void proton_plus_widgets_preferences_theme_row_factory_bind (ProtonPlusWidgetsPreferencesThemeRow* self,
                                                             GObject* object);
static const gchar* proton_plus_widgets_preferences_theme_row_theme_get_title (ProtonPlusWidgetsPreferencesThemeRowTheme* self);
static void proton_plus_widgets_preferences_theme_row_factory_setup (ProtonPlusWidgetsPreferencesThemeRow* self,
                                                              GObject* object);
static ProtonPlusWidgetsPreferencesThemeRowTheme* proton_plus_widgets_preferences_theme_row_theme_new (const gchar* title,
                                                                                                gint color_scheme);
static ProtonPlusWidgetsPreferencesThemeRowTheme* proton_plus_widgets_preferences_theme_row_theme_construct (GType object_type,
                                                                                                      const gchar* title,
                                                                                                      gint color_scheme);
static void proton_plus_widgets_preferences_theme_row_theme_set_title (ProtonPlusWidgetsPreferencesThemeRowTheme* self,
                                                                const gchar* value);
static void proton_plus_widgets_preferences_theme_row_theme_set_color_scheme (ProtonPlusWidgetsPreferencesThemeRowTheme* self,
                                                                       gint value);
static void proton_plus_widgets_preferences_theme_row_theme_finalize (GObject * obj);
static GType proton_plus_widgets_preferences_theme_row_theme_get_type_once (void);
static void _vala_proton_plus_widgets_preferences_theme_row_theme_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_proton_plus_widgets_preferences_theme_row_theme_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
static GObject * proton_plus_widgets_preferences_theme_row_constructor (GType type,
                                                                 guint n_construct_properties,
                                                                 GObjectConstructParam * construct_properties);
static void _proton_plus_widgets_preferences_theme_row_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                  GObject* object,
                                                                                                  gpointer self);
static void _proton_plus_widgets_preferences_theme_row_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                GObject* object,
                                                                                                gpointer self);
static void _proton_plus_widgets_preferences_theme_row_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                       GParamSpec* pspec,
                                                                                       gpointer self);
static GType proton_plus_widgets_preferences_theme_row_get_type_once (void);

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

static void
proton_plus_widgets_preferences_theme_row_selected_item_changed (ProtonPlusWidgetsPreferencesThemeRow* self)
{
	ProtonPlusWidgetsPreferencesThemeRowTheme* theme = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp1_;
	GSettings* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = adw_combo_row_get_selected_item ((AdwComboRow*) self);
	_tmp1_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_IS_THEME (_tmp0_) ? ((ProtonPlusWidgetsPreferencesThemeRowTheme*) _tmp0_) : NULL);
	theme = _tmp1_;
	_tmp2_ = proton_plus_globals_SETTINGS;
	_tmp3_ = proton_plus_widgets_preferences_theme_row_theme_get_color_scheme (theme);
	_tmp4_ = _tmp3_;
	g_settings_set_enum (_tmp2_, "theme", _tmp4_);
	_g_object_unref0 (theme);
}

static void
proton_plus_widgets_preferences_theme_row_factory_bind (ProtonPlusWidgetsPreferencesThemeRow* self,
                                                        GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* theme = NULL;
	GObject* _tmp1_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp2_;
	gconstpointer _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = gtk_list_item_get_item (list_item);
	_tmp2_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_IS_THEME (_tmp1_) ? ((ProtonPlusWidgetsPreferencesThemeRowTheme*) _tmp1_) : NULL);
	theme = _tmp2_;
	_tmp3_ = g_object_get_data (object, "title");
	_tmp4_ = proton_plus_widgets_preferences_theme_row_theme_get_title (theme);
	_tmp5_ = _tmp4_;
	gtk_label_set_label ((GtkLabel*) _tmp3_, _tmp5_);
	_g_object_unref0 (theme);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_preferences_theme_row_factory_setup (ProtonPlusWidgetsPreferencesThemeRow* self,
                                                         GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp1_);
	title_label = _tmp1_;
	gtk_label_set_xalign (title_label, 0.0f);
	gtk_label_set_max_width_chars (title_label, 30);
	gtk_label_set_ellipsize (title_label, PANGO_ELLIPSIZE_END);
	gtk_widget_set_hexpand ((GtkWidget*) title_label, TRUE);
	_tmp2_ = _g_object_ref0 (title_label);
	g_object_set_data_full (object, "title", _tmp2_, g_object_unref);
	gtk_list_item_set_child (list_item, (GtkWidget*) title_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (list_item);
}

ProtonPlusWidgetsPreferencesThemeRow*
proton_plus_widgets_preferences_theme_row_construct (GType object_type)
{
	ProtonPlusWidgetsPreferencesThemeRow * self = NULL;
	self = (ProtonPlusWidgetsPreferencesThemeRow*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsPreferencesThemeRow*
proton_plus_widgets_preferences_theme_row_new (void)
{
	return proton_plus_widgets_preferences_theme_row_construct (PROTON_PLUS_WIDGETS_PREFERENCES_TYPE_THEME_ROW);
}

static inline gpointer
proton_plus_widgets_preferences_theme_row_theme_get_instance_private (ProtonPlusWidgetsPreferencesThemeRowTheme* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsPreferencesThemeRowTheme_private_offset);
}

static ProtonPlusWidgetsPreferencesThemeRowTheme*
proton_plus_widgets_preferences_theme_row_theme_construct (GType object_type,
                                                           const gchar* title,
                                                           gint color_scheme)
{
	ProtonPlusWidgetsPreferencesThemeRowTheme * self = NULL;
	g_return_val_if_fail (title != NULL, NULL);
	self = (ProtonPlusWidgetsPreferencesThemeRowTheme*) g_object_new (object_type, NULL);
	proton_plus_widgets_preferences_theme_row_theme_set_title (self, title);
	proton_plus_widgets_preferences_theme_row_theme_set_color_scheme (self, color_scheme);
	return self;
}

static ProtonPlusWidgetsPreferencesThemeRowTheme*
proton_plus_widgets_preferences_theme_row_theme_new (const gchar* title,
                                                     gint color_scheme)
{
	return proton_plus_widgets_preferences_theme_row_theme_construct (PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, title, color_scheme);
}

static const gchar*
proton_plus_widgets_preferences_theme_row_theme_get_title (ProtonPlusWidgetsPreferencesThemeRowTheme* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_preferences_theme_row_theme_set_title (ProtonPlusWidgetsPreferencesThemeRowTheme* self,
                                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_preferences_theme_row_theme_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_preferences_theme_row_theme_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY]);
	}
}

static gint
proton_plus_widgets_preferences_theme_row_theme_get_color_scheme (ProtonPlusWidgetsPreferencesThemeRowTheme* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_color_scheme;
	return result;
}

static void
proton_plus_widgets_preferences_theme_row_theme_set_color_scheme (ProtonPlusWidgetsPreferencesThemeRowTheme* self,
                                                                  gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_preferences_theme_row_theme_get_color_scheme (self);
	if (old_value != value) {
		self->priv->_color_scheme = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_preferences_theme_row_theme_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY]);
	}
}

static void
proton_plus_widgets_preferences_theme_row_theme_class_init (ProtonPlusWidgetsPreferencesThemeRowThemeClass * klass,
                                                            gpointer klass_data)
{
	proton_plus_widgets_preferences_theme_row_theme_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsPreferencesThemeRowTheme_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_preferences_theme_row_theme_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_preferences_theme_row_theme_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_preferences_theme_row_theme_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY, proton_plus_widgets_preferences_theme_row_theme_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY, proton_plus_widgets_preferences_theme_row_theme_properties[PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY] = g_param_spec_int ("color-scheme", "color-scheme", "color-scheme", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_preferences_theme_row_theme_instance_init (ProtonPlusWidgetsPreferencesThemeRowTheme * self,
                                                               gpointer klass)
{
	self->priv = proton_plus_widgets_preferences_theme_row_theme_get_instance_private (self);
}

static void
proton_plus_widgets_preferences_theme_row_theme_finalize (GObject * obj)
{
	ProtonPlusWidgetsPreferencesThemeRowTheme * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowTheme);
	_g_free0 (self->priv->_title);
	G_OBJECT_CLASS (proton_plus_widgets_preferences_theme_row_theme_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_preferences_theme_row_theme_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsPreferencesThemeRowThemeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_preferences_theme_row_theme_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsPreferencesThemeRowTheme), 0, (GInstanceInitFunc) proton_plus_widgets_preferences_theme_row_theme_instance_init, NULL };
	GType proton_plus_widgets_preferences_theme_row_theme_type_id;
	proton_plus_widgets_preferences_theme_row_theme_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsPreferencesThemeRowTheme", &g_define_type_info, 0);
	ProtonPlusWidgetsPreferencesThemeRowTheme_private_offset = g_type_add_instance_private (proton_plus_widgets_preferences_theme_row_theme_type_id, sizeof (ProtonPlusWidgetsPreferencesThemeRowThemePrivate));
	return proton_plus_widgets_preferences_theme_row_theme_type_id;
}

static GType
proton_plus_widgets_preferences_theme_row_theme_get_type (void)
{
	static volatile gsize proton_plus_widgets_preferences_theme_row_theme_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_preferences_theme_row_theme_type_id__once)) {
		GType proton_plus_widgets_preferences_theme_row_theme_type_id;
		proton_plus_widgets_preferences_theme_row_theme_type_id = proton_plus_widgets_preferences_theme_row_theme_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_preferences_theme_row_theme_type_id__once, proton_plus_widgets_preferences_theme_row_theme_type_id);
	}
	return proton_plus_widgets_preferences_theme_row_theme_type_id__once;
}

static void
_vala_proton_plus_widgets_preferences_theme_row_theme_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsPreferencesThemeRowTheme * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowTheme);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_preferences_theme_row_theme_get_title (self));
		break;
		case PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY:
		g_value_set_int (value, proton_plus_widgets_preferences_theme_row_theme_get_color_scheme (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_preferences_theme_row_theme_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	ProtonPlusWidgetsPreferencesThemeRowTheme * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, ProtonPlusWidgetsPreferencesThemeRowTheme);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_TITLE_PROPERTY:
		proton_plus_widgets_preferences_theme_row_theme_set_title (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_THEME_COLOR_SCHEME_PROPERTY:
		proton_plus_widgets_preferences_theme_row_theme_set_color_scheme (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_proton_plus_widgets_preferences_theme_row_factory_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                             GObject* object,
                                                                                             gpointer self)
{
	proton_plus_widgets_preferences_theme_row_factory_setup ((ProtonPlusWidgetsPreferencesThemeRow*) self, object);
}

static void
_proton_plus_widgets_preferences_theme_row_factory_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                           GObject* object,
                                                                                           gpointer self)
{
	proton_plus_widgets_preferences_theme_row_factory_bind ((ProtonPlusWidgetsPreferencesThemeRow*) self, object);
}

static void
_proton_plus_widgets_preferences_theme_row_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                  GParamSpec* pspec,
                                                                                  gpointer self)
{
	proton_plus_widgets_preferences_theme_row_selected_item_changed ((ProtonPlusWidgetsPreferencesThemeRow*) self);
}

static GObject *
proton_plus_widgets_preferences_theme_row_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ProtonPlusWidgetsPreferencesThemeRow * self;
	GListStore* model = NULL;
	GListStore* _tmp0_;
	GListStore* _tmp1_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp2_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp3_;
	GListStore* _tmp4_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp5_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp6_;
	GListStore* _tmp7_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp8_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp9_;
	GListStore* _tmp10_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp11_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp12_;
	GListStore* _tmp13_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp14_;
	ProtonPlusWidgetsPreferencesThemeRowTheme* _tmp15_;
	GtkPropertyExpression* expression = NULL;
	GtkPropertyExpression* _tmp16_;
	GtkSignalListItemFactory* factory = NULL;
	GtkSignalListItemFactory* _tmp17_;
	GtkSignalListItemFactory* _tmp18_;
	GtkSignalListItemFactory* _tmp19_;
	GListStore* _tmp20_;
	GtkPropertyExpression* _tmp21_;
	GtkSignalListItemFactory* _tmp22_;
	GSettings* _tmp23_;
	parent_class = G_OBJECT_CLASS (proton_plus_widgets_preferences_theme_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_PREFERENCES_TYPE_THEME_ROW, ProtonPlusWidgetsPreferencesThemeRow);
	_tmp0_ = g_list_store_new (PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME);
	model = _tmp0_;
	_tmp1_ = model;
	_tmp2_ = proton_plus_widgets_preferences_theme_row_theme_new (_ ("System"), 0);
	_tmp3_ = _tmp2_;
	g_list_store_append (_tmp1_, (GObject*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = model;
	_tmp5_ = proton_plus_widgets_preferences_theme_row_theme_new (_ ("Adwaita"), 1);
	_tmp6_ = _tmp5_;
	g_list_store_append (_tmp4_, (GObject*) _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = model;
	_tmp8_ = proton_plus_widgets_preferences_theme_row_theme_new (_ ("Breeze"), 2);
	_tmp9_ = _tmp8_;
	g_list_store_append (_tmp7_, (GObject*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = model;
	_tmp11_ = proton_plus_widgets_preferences_theme_row_theme_new (_ ("SteamOS"), 3);
	_tmp12_ = _tmp11_;
	g_list_store_append (_tmp10_, (GObject*) _tmp12_);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = model;
	_tmp14_ = proton_plus_widgets_preferences_theme_row_theme_new (_ ("OLED"), 4);
	_tmp15_ = _tmp14_;
	g_list_store_append (_tmp13_, (GObject*) _tmp15_);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = (GtkPropertyExpression*) gtk_property_expression_new (PROTON_PLUS_WIDGETS_PREFERENCES_THEME_ROW_TYPE_THEME, NULL, "title");
	expression = _tmp16_;
	_tmp17_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	factory = _tmp17_;
	_tmp18_ = factory;
	g_signal_connect_object (_tmp18_, "setup", (GCallback) _proton_plus_widgets_preferences_theme_row_factory_setup_gtk_signal_list_item_factory_setup, self, 0);
	_tmp19_ = factory;
	g_signal_connect_object (_tmp19_, "bind", (GCallback) _proton_plus_widgets_preferences_theme_row_factory_bind_gtk_signal_list_item_factory_bind, self, 0);
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _ ("Theme"));
	_tmp20_ = model;
	adw_combo_row_set_model ((AdwComboRow*) self, (GListModel*) _tmp20_);
	_tmp21_ = expression;
	adw_combo_row_set_expression ((AdwComboRow*) self, (GtkExpression*) _tmp21_);
	_tmp22_ = factory;
	adw_combo_row_set_list_factory ((AdwComboRow*) self, (GtkListItemFactory*) _tmp22_);
	_tmp23_ = proton_plus_globals_SETTINGS;
	adw_combo_row_set_selected ((AdwComboRow*) self, (guint) g_settings_get_enum (_tmp23_, "theme"));
	g_signal_connect_object ((GObject*) self, "notify::selected-item", (GCallback) _proton_plus_widgets_preferences_theme_row_selected_item_changed_g_object_notify, self, 0);
	_g_object_unref0 (factory);
	_gtk_expression_unref0 (expression);
	_g_object_unref0 (model);
	return obj;
}

static void
proton_plus_widgets_preferences_theme_row_class_init (ProtonPlusWidgetsPreferencesThemeRowClass * klass,
                                                      gpointer klass_data)
{
	proton_plus_widgets_preferences_theme_row_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = proton_plus_widgets_preferences_theme_row_constructor;
}

static void
proton_plus_widgets_preferences_theme_row_instance_init (ProtonPlusWidgetsPreferencesThemeRow * self,
                                                         gpointer klass)
{
}

static GType
proton_plus_widgets_preferences_theme_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsPreferencesThemeRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_preferences_theme_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsPreferencesThemeRow), 0, (GInstanceInitFunc) proton_plus_widgets_preferences_theme_row_instance_init, NULL };
	GType proton_plus_widgets_preferences_theme_row_type_id;
	proton_plus_widgets_preferences_theme_row_type_id = g_type_register_static (adw_combo_row_get_type (), "ProtonPlusWidgetsPreferencesThemeRow", &g_define_type_info, 0);
	return proton_plus_widgets_preferences_theme_row_type_id;
}

GType
proton_plus_widgets_preferences_theme_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_preferences_theme_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_preferences_theme_row_type_id__once)) {
		GType proton_plus_widgets_preferences_theme_row_type_id;
		proton_plus_widgets_preferences_theme_row_type_id = proton_plus_widgets_preferences_theme_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_preferences_theme_row_type_id__once, proton_plus_widgets_preferences_theme_row_type_id);
	}
	return proton_plus_widgets_preferences_theme_row_type_id__once;
}

