/* launch-options-presentation-registry.c generated by valac 0.56.19, the Vala compiler
 * generated from launch-options-presentation-registry.vala, do not modify */

#include "protonplus_core.h"
#include <glib.h>
#include <gee.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.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_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_REGISTRY_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_REGISTRY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_REGISTRY_NUM_PROPERTIES];
#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 _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _metadata;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _option;
	gboolean _movable;
	gboolean _currently_visible;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _eligibility;
	GeeArrayList* _widgets;
	GeeArrayList* _selection_sources;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistryPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog;
	GeeHashMap* by_id;
	GeeArrayList* registered_selection_sources;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_presentation_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_parent_class = NULL;

static void proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_widgets (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                             GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_selection_sources (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                                       GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_option_presentation_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    GValue * value,
                                                                                                    GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_property (GObject * object,
                                                                                                    guint property_id,
                                                                                                    const GValue * value,
                                                                                                    GParamSpec * pspec);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_ensure_presentation (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                                                                                            const gchar* id,
                                                                                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                                                                                                            gboolean movable);
static void proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_construct (GType object_type,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                      gboolean movable)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation * self = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	g_return_val_if_fail (metadata != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) g_object_new (object_type, "metadata", metadata, "option", option, "movable", movable, NULL);
	_tmp0_ = gee_array_list_new (gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_widgets (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_COMMAND_SELECTION_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_selection_sources (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata,
                                                                                ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                gboolean movable)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, metadata, option, movable);
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_is_active (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_option;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp2_;
		_tmp2_ = self->priv->_option;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active (_tmp2_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_add_widget (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                       GtkWidget* widget)
{
	GeeArrayList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->_widgets;
	if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp0_, widget)) {
		GeeArrayList* _tmp1_;
		_tmp1_ = self->priv->_widgets;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, widget);
	}
}

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

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_apply_metadata (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                           gboolean searching)
{
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _widget_list = NULL;
		GeeArrayList* _tmp0_;
		gint _widget_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _widget_index = 0;
		_tmp0_ = self->priv->_widgets;
		_widget_list = _tmp0_;
		_tmp1_ = _widget_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_widget_size = _tmp3_;
		_widget_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			GtkWidget* widget = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			AdwPreferencesRow* row = NULL;
			GtkWidget* _tmp8_;
			AdwPreferencesRow* _tmp9_;
			AdwPreferencesRow* _tmp10_;
			AdwPreferencesRow* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			gchar* _tmp15_ = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gchar* context = NULL;
			gchar* _tmp27_;
			gchar* detail = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			gchar* _tmp31_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp35_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionExpertise _tmp36_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionExpertise _tmp37_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp45_;
			const gchar* _tmp46_;
			const gchar* _tmp47_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp53_;
			gchar** _tmp54_;
			gint _tmp54__length1;
			gint _tmp55_ = 0;
			gchar** _tmp56_;
			gint _tmp56__length1;
			gboolean _tmp59_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp60_;
			AdwActionRow* action_row = NULL;
			GtkWidget* _tmp69_;
			AdwActionRow* _tmp70_;
			AdwActionRow* _tmp71_;
			AdwExpanderRow* expander_row = NULL;
			GtkWidget* _tmp74_;
			AdwExpanderRow* _tmp75_;
			AdwExpanderRow* _tmp76_;
			_widget_index = _widget_index + 1;
			_tmp4_ = _widget_index;
			_tmp5_ = _widget_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _widget_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _widget_index);
			widget = (GtkWidget*) _tmp7_;
			_tmp8_ = widget;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, adw_preferences_row_get_type ()) ? ((AdwPreferencesRow*) _tmp8_) : NULL);
			row = _tmp9_;
			_tmp10_ = row;
			if (_tmp10_ == NULL) {
				_g_object_unref0 (row);
				_g_object_unref0 (widget);
				continue;
			}
			_tmp11_ = row;
			_tmp12_ = self->priv->_metadata;
			_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_title (_tmp12_);
			_tmp14_ = _tmp13_;
			adw_preferences_row_set_title (_tmp11_, _tmp14_);
			_tmp16_ = self->priv->_metadata;
			_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_subsection (_tmp16_);
			_tmp18_ = _tmp17_;
			if (g_strcmp0 (_tmp18_, "") != 0) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp19_ = self->priv->_metadata;
				_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_subsection (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = g_strdup (_tmp21_);
				_g_free0 (_tmp15_);
				_tmp15_ = _tmp22_;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp23_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp24_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp25_;
				gchar* _tmp26_;
				_tmp23_ = self->priv->_metadata;
				_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_category (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp26_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_category_title (_tmp25_);
				_g_free0 (_tmp15_);
				_tmp15_ = _tmp26_;
			}
			_tmp27_ = _tmp15_;
			_tmp15_ = NULL;
			context = _tmp27_;
			_tmp28_ = self->priv->_metadata;
			_tmp29_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_description (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = g_strdup (_tmp30_);
			detail = _tmp31_;
			if (searching) {
				const gchar* _tmp32_;
				const gchar* _tmp33_;
				gchar* _tmp34_;
				_tmp32_ = context;
				_tmp33_ = detail;
				_tmp34_ = g_strdup_printf ("%s — %s", _tmp32_, _tmp33_);
				_g_free0 (detail);
				detail = _tmp34_;
			}
			_tmp35_ = self->priv->_metadata;
			_tmp36_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_expertise (_tmp35_);
			_tmp37_ = _tmp36_;
			if (_tmp37_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EXPERTISE_ADVANCED) {
				const gchar* _tmp38_;
				gchar* _tmp39_;
				_tmp38_ = detail;
				_tmp39_ = g_strdup_printf ("%s • %s", _tmp38_, _ ("Advanced"));
				_g_free0 (detail);
				detail = _tmp39_;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp40_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionExpertise _tmp41_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionExpertise _tmp42_;
				_tmp40_ = self->priv->_metadata;
				_tmp41_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_expertise (_tmp40_);
				_tmp42_ = _tmp41_;
				if (_tmp42_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EXPERTISE_EXPERIMENTAL) {
					const gchar* _tmp43_;
					gchar* _tmp44_;
					_tmp43_ = detail;
					_tmp44_ = g_strdup_printf ("%s • %s", _tmp43_, _ ("Experimental"));
					_g_free0 (detail);
					detail = _tmp44_;
				}
			}
			_tmp45_ = self->priv->_metadata;
			_tmp46_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_applicability (_tmp45_);
			_tmp47_ = _tmp46_;
			if (g_strcmp0 (_tmp47_, "") != 0) {
				const gchar* _tmp48_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp49_;
				const gchar* _tmp50_;
				const gchar* _tmp51_;
				gchar* _tmp52_;
				_tmp48_ = detail;
				_tmp49_ = self->priv->_metadata;
				_tmp50_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_applicability (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = g_strdup_printf ("%s • %s", _tmp48_, _tmp51_);
				_g_free0 (detail);
				detail = _tmp52_;
			}
			_tmp53_ = self->priv->_metadata;
			_tmp54_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_dependencies (_tmp53_, &_tmp55_);
			_tmp54__length1 = _tmp55_;
			_tmp56_ = _tmp54_;
			_tmp56__length1 = _tmp54__length1;
			if (_tmp56__length1 > 0) {
				const gchar* _tmp57_;
				gchar* _tmp58_;
				_tmp57_ = detail;
				_tmp58_ = g_strdup_printf ("%s • %s", _tmp57_, _ ("Requires related option"));
				_g_free0 (detail);
				detail = _tmp58_;
			}
			_tmp60_ = self->priv->_eligibility;
			if (_tmp60_ != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp61_;
				const gchar* _tmp62_;
				const gchar* _tmp63_;
				_tmp61_ = self->priv->_eligibility;
				_tmp62_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_reason (_tmp61_);
				_tmp63_ = _tmp62_;
				_tmp59_ = g_strcmp0 (_tmp63_, "") != 0;
			} else {
				_tmp59_ = FALSE;
			}
			if (_tmp59_) {
				const gchar* _tmp64_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp65_;
				const gchar* _tmp66_;
				const gchar* _tmp67_;
				gchar* _tmp68_;
				_tmp64_ = detail;
				_tmp65_ = self->priv->_eligibility;
				_tmp66_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_reason (_tmp65_);
				_tmp67_ = _tmp66_;
				_tmp68_ = g_strdup_printf ("%s • %s", _tmp64_, _tmp67_);
				_g_free0 (detail);
				detail = _tmp68_;
			}
			_tmp69_ = widget;
			_tmp70_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp69_, adw_action_row_get_type ()) ? ((AdwActionRow*) _tmp69_) : NULL);
			action_row = _tmp70_;
			_tmp71_ = action_row;
			if (_tmp71_ != NULL) {
				AdwActionRow* _tmp72_;
				const gchar* _tmp73_;
				_tmp72_ = action_row;
				_tmp73_ = detail;
				adw_action_row_set_subtitle (_tmp72_, _tmp73_);
			}
			_tmp74_ = widget;
			_tmp75_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, adw_expander_row_get_type ()) ? ((AdwExpanderRow*) _tmp74_) : NULL);
			expander_row = _tmp75_;
			_tmp76_ = expander_row;
			if (_tmp76_ != NULL) {
				AdwExpanderRow* _tmp77_;
				const gchar* _tmp78_;
				_tmp77_ = expander_row;
				_tmp78_ = detail;
				adw_expander_row_set_subtitle (_tmp77_, _tmp78_);
			}
			_g_object_unref0 (expander_row);
			_g_object_unref0 (action_row);
			_g_free0 (detail);
			_g_free0 (context);
			_g_free0 (_tmp15_);
			_g_object_unref0 (row);
			_g_object_unref0 (widget);
		}
	}
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_metadata;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_metadata (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (self);
	if (old_value != value) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_metadata);
		self->priv->_metadata = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY]);
	}
}

ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_option (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_option;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_option (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_option (self);
	if (old_value != value) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_option);
		self->priv->_option = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_movable (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_movable;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_movable (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_movable (self);
	if (old_value != value) {
		self->priv->_movable = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_currently_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_currently_visible;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_currently_visible (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_currently_visible (self);
	if (old_value != value) {
		self->priv->_currently_visible = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY]);
	}
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_eligibility;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_eligibility (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (self);
	if (old_value != value) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_eligibility);
		self->priv->_eligibility = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_widgets (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_widgets;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_widgets (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                        GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_widgets (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_widgets);
		self->priv->_widgets = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selection_sources;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_selection_sources (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* self,
                                                                                                  GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_selection_sources);
		self->priv->_selection_sources = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationClass * klass,
                                                                                       gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY] = g_param_spec_object ("metadata", "metadata", "metadata", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_METADATA, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY] = g_param_spec_object ("option", "option", "option", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY] = g_param_spec_boolean ("movable", "movable", "movable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY] = g_param_spec_boolean ("currently-visible", "currently-visible", "currently-visible", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY] = g_param_spec_object ("eligibility", "eligibility", "eligibility", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_ELIGIBILITY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY] = g_param_spec_object ("widgets", "widgets", "widgets", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY] = g_param_spec_object ("selection-sources", "selection-sources", "selection-sources", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation * self,
                                                                                          gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_instance_private (self);
	self->priv->_currently_visible = FALSE;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation);
	_g_object_unref0 (self->priv->_metadata);
	_g_object_unref0 (self->priv->_option);
	_g_object_unref0 (self->priv->_eligibility);
	_g_object_unref0 (self->priv->_widgets);
	_g_object_unref0 (self->priv->_selection_sources);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_presentation_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_presentation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_presentation_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_property (GObject * object,
                                                                                               guint property_id,
                                                                                               GValue * value,
                                                                                               GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_option (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_movable (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_currently_visible (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_widgets (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_property (GObject * object,
                                                                                               guint property_id,
                                                                                               const GValue * value,
                                                                                               GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_METADATA_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_metadata (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_OPTION_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_option (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_MOVABLE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_movable (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_CURRENTLY_VISIBLE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_currently_visible (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_ELIGIBILITY_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_eligibility (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_WIDGETS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_widgets (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_PRESENTATION_SELECTION_SOURCES_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_selection_sources (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_construct (GType object_type,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry * self = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeArrayList* _tmp2_;
	g_return_val_if_fail (catalog != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (catalog);
	_g_object_unref0 (self->priv->catalog);
	self->priv->catalog = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->by_id);
	self->priv->by_id = _tmp1_;
	_tmp2_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_COMMAND_SELECTION_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->registered_selection_sources);
	self->priv->registered_selection_sources = _tmp2_;
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION_REGISTRY, catalog);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                              const gchar* id,
                                                                                              GtkWidget* widget,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                              gboolean movable)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* source = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_ensure_presentation (self, id, option, movable);
	presentation = _tmp0_;
	if (widget != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp1_;
		_tmp1_ = presentation;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_add_widget (_tmp1_, widget);
	}
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_adapter_factory_create (id, widget, option);
	source = _tmp2_;
	_tmp3_ = source;
	if (_tmp3_ != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp4_;
		_tmp4_ = source;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register_selection_source (self, id, _tmp4_);
	}
	_g_object_unref0 (source);
	_g_object_unref0 (presentation);
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register_display_only (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                           const gchar* id,
                                                                                                           GtkWidget* widget,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                                           gboolean movable)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_ensure_presentation (self, id, option, movable);
	presentation = _tmp0_;
	if (widget != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp1_;
		_tmp1_ = presentation;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_add_widget (_tmp1_, widget);
	}
	_g_object_unref0 (presentation);
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_ensure_presentation (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                         const gchar* id,
                                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option,
                                                                                                         gboolean movable)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	_tmp0_ = self->priv->by_id;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, id);
	presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp1_;
	_tmp2_ = presentation;
	if (_tmp2_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp3_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp4_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp5_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp7_;
		GeeHashMap* _tmp8_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp9_;
		_tmp3_ = self->priv->catalog;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp3_, id);
		metadata = _tmp4_;
		_tmp5_ = metadata;
		_vala_assert (_tmp5_ != NULL, "metadata != null");
		_tmp6_ = metadata;
		_tmp7_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_new (_tmp6_, option, movable);
		_g_object_unref0 (presentation);
		presentation = _tmp7_;
		_tmp8_ = self->priv->by_id;
		_tmp9_ = presentation;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, id, _tmp9_);
		_g_object_unref0 (metadata);
	} else {
		if (option != NULL) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp10_;
			_tmp10_ = presentation;
			proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_option (_tmp10_, option);
		}
	}
	result = presentation;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_register_selection_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                               const gchar* id,
                                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* source)
{
	GeeArrayList* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
	GeeHashMap* _tmp1_;
	gpointer _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	g_return_if_fail (source != NULL);
	_tmp0_ = self->priv->registered_selection_sources;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, source);
	_tmp1_ = self->priv->by_id;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, id);
	presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp2_;
	_tmp3_ = presentation;
	if (_tmp3_ != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp4_;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		_tmp4_ = presentation;
		_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (_tmp4_);
		_tmp6_ = _tmp5_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, source);
	}
	_g_object_unref0 (presentation);
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_selection_sources (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self)
{
	GeeArrayList* _tmp0_;
	GeeList* _tmp1_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->registered_selection_sources;
	_tmp1_ = _g_object_ref0 ((GeeList*) _tmp0_);
	result = _tmp1_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_validate_selection_sources (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self)
{
	GeeArrayList* diagnostics = NULL;
	GeeArrayList* _tmp0_;
	GeeHashSet* owners = NULL;
	GeeHashSet* _tmp1_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	diagnostics = _tmp0_;
	_tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	owners = _tmp1_;
	{
		GeeArrayList* _source_list = NULL;
		GeeArrayList* _tmp2_;
		gint _source_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _source_index = 0;
		_tmp2_ = self->priv->registered_selection_sources;
		_source_list = _tmp2_;
		_tmp3_ = _source_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_source_size = _tmp5_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* source = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp15_;
			gboolean _tmp16_;
			_source_index = _source_index + 1;
			_tmp6_ = _source_index;
			_tmp7_ = _source_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _source_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _source_index);
			source = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource*) _tmp9_;
			_tmp10_ = self->priv->catalog;
			_tmp11_ = source;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp10_, _tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = _tmp15_ == NULL;
			_g_object_unref0 (_tmp15_);
			if (_tmp16_) {
				GeeArrayList* _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp17_ = diagnostics;
				_tmp18_ = source;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = g_strdup_printf ("Selection source registered for unknown option '%s'.", _tmp20_);
				_tmp22_ = _tmp21_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _tmp22_);
				_g_free0 (_tmp22_);
			}
			_g_object_unref0 (source);
		}
	}
	{
		GeeList* _presentation_list = NULL;
		GeeList* _tmp23_;
		gint _presentation_size = 0;
		GeeList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		gint _presentation_index = 0;
		_tmp23_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_ordered (self);
		_presentation_list = _tmp23_;
		_tmp24_ = _presentation_list;
		_tmp25_ = gee_collection_get_size ((GeeCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		_presentation_size = _tmp26_;
		_presentation_index = -1;
		while (TRUE) {
			gint _tmp27_;
			gint _tmp28_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeList* _tmp29_;
			gpointer _tmp30_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* semantics = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp31_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp32_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp33_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp34_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp35_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp36_;
			gboolean _tmp37_ = FALSE;
			gboolean _tmp38_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp39_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp56_;
			GeeArrayList* _tmp57_;
			GeeArrayList* _tmp58_;
			gint _tmp59_;
			gint _tmp60_;
			_presentation_index = _presentation_index + 1;
			_tmp27_ = _presentation_index;
			_tmp28_ = _presentation_size;
			if (!(_tmp27_ < _tmp28_)) {
				break;
			}
			_tmp29_ = _presentation_list;
			_tmp30_ = gee_list_get (_tmp29_, _presentation_index);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp30_;
			_tmp31_ = presentation;
			_tmp32_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = _g_object_ref0 (_tmp35_);
			semantics = _tmp36_;
			_tmp39_ = semantics;
			if (_tmp39_ != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp40_;
				gboolean _tmp41_;
				gboolean _tmp42_;
				_tmp40_ = semantics;
				_tmp41_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_managed_emission (_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp38_ = _tmp42_;
			} else {
				_tmp38_ = FALSE;
			}
			if (_tmp38_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp43_;
				GeeArrayList* _tmp44_;
				GeeArrayList* _tmp45_;
				gint _tmp46_;
				gint _tmp47_;
				_tmp43_ = presentation;
				_tmp44_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (_tmp43_);
				_tmp45_ = _tmp44_;
				_tmp46_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp45_);
				_tmp47_ = _tmp46_;
				_tmp37_ = _tmp47_ == 0;
			} else {
				_tmp37_ = FALSE;
			}
			if (_tmp37_) {
				GeeArrayList* _tmp48_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp49_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp50_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp51_;
				const gchar* _tmp52_;
				const gchar* _tmp53_;
				gchar* _tmp54_;
				gchar* _tmp55_;
				_tmp48_ = diagnostics;
				_tmp49_ = presentation;
				_tmp50_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_id (_tmp51_);
				_tmp53_ = _tmp52_;
				_tmp54_ = g_strdup_printf ("Managed presentation '%s' has no selection source.", _tmp53_);
				_tmp55_ = _tmp54_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp48_, _tmp55_);
				_g_free0 (_tmp55_);
			}
			_tmp56_ = presentation;
			_tmp57_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (_tmp56_);
			_tmp58_ = _tmp57_;
			_tmp59_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp58_);
			_tmp60_ = _tmp59_;
			if (_tmp60_ > 1) {
				GeeArrayList* _tmp61_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp62_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp63_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp64_;
				const gchar* _tmp65_;
				const gchar* _tmp66_;
				gchar* _tmp67_;
				gchar* _tmp68_;
				_tmp61_ = diagnostics;
				_tmp62_ = presentation;
				_tmp63_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp62_);
				_tmp64_ = _tmp63_;
				_tmp65_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_id (_tmp64_);
				_tmp66_ = _tmp65_;
				_tmp67_ = g_strdup_printf ("Presentation '%s' has duplicate selection ownership.", _tmp66_);
				_tmp68_ = _tmp67_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp61_, _tmp68_);
				_g_free0 (_tmp68_);
			}
			{
				GeeArrayList* _source_list = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp69_;
				GeeArrayList* _tmp70_;
				GeeArrayList* _tmp71_;
				gint _source_size = 0;
				GeeArrayList* _tmp72_;
				gint _tmp73_;
				gint _tmp74_;
				gint _source_index = 0;
				_tmp69_ = presentation;
				_tmp70_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_selection_sources (_tmp69_);
				_tmp71_ = _tmp70_;
				_source_list = _tmp71_;
				_tmp72_ = _source_list;
				_tmp73_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp72_);
				_tmp74_ = _tmp73_;
				_source_size = _tmp74_;
				_source_index = -1;
				while (TRUE) {
					gint _tmp75_;
					gint _tmp76_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* source = NULL;
					GeeArrayList* _tmp77_;
					gpointer _tmp78_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp79_;
					const gchar* _tmp80_;
					const gchar* _tmp81_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp82_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp83_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp84_;
					const gchar* _tmp85_;
					const gchar* _tmp86_;
					GeeHashSet* _tmp98_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp99_;
					const gchar* _tmp100_;
					const gchar* _tmp101_;
					GeeHashSet* _tmp108_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp109_;
					const gchar* _tmp110_;
					const gchar* _tmp111_;
					_source_index = _source_index + 1;
					_tmp75_ = _source_index;
					_tmp76_ = _source_size;
					if (!(_tmp75_ < _tmp76_)) {
						break;
					}
					_tmp77_ = _source_list;
					_tmp78_ = gee_abstract_list_get ((GeeAbstractList*) _tmp77_, _source_index);
					source = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource*) _tmp78_;
					_tmp79_ = source;
					_tmp80_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp79_);
					_tmp81_ = _tmp80_;
					_tmp82_ = presentation;
					_tmp83_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp82_);
					_tmp84_ = _tmp83_;
					_tmp85_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_id (_tmp84_);
					_tmp86_ = _tmp85_;
					if (g_strcmp0 (_tmp81_, _tmp86_) != 0) {
						GeeArrayList* _tmp87_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp88_;
						const gchar* _tmp89_;
						const gchar* _tmp90_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp91_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp92_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp93_;
						const gchar* _tmp94_;
						const gchar* _tmp95_;
						gchar* _tmp96_;
						gchar* _tmp97_;
						_tmp87_ = diagnostics;
						_tmp88_ = source;
						_tmp89_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp88_);
						_tmp90_ = _tmp89_;
						_tmp91_ = presentation;
						_tmp92_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp91_);
						_tmp93_ = _tmp92_;
						_tmp94_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_id (_tmp93_);
						_tmp95_ = _tmp94_;
						_tmp96_ = g_strdup_printf ("Selection source '%s' disagrees with presentation '%s'.", _tmp90_, _tmp95_);
						_tmp97_ = _tmp96_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp87_, _tmp97_);
						_g_free0 (_tmp97_);
					}
					_tmp98_ = owners;
					_tmp99_ = source;
					_tmp100_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp99_);
					_tmp101_ = _tmp100_;
					if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp98_, _tmp101_)) {
						GeeArrayList* _tmp102_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchCommandSelectionSource* _tmp103_;
						const gchar* _tmp104_;
						const gchar* _tmp105_;
						gchar* _tmp106_;
						gchar* _tmp107_;
						_tmp102_ = diagnostics;
						_tmp103_ = source;
						_tmp104_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp103_);
						_tmp105_ = _tmp104_;
						_tmp106_ = g_strdup_printf ("Selection source '%s' has duplicate ownership.", _tmp105_);
						_tmp107_ = _tmp106_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp102_, _tmp107_);
						_g_free0 (_tmp107_);
					}
					_tmp108_ = owners;
					_tmp109_ = source;
					_tmp110_ = proton_plus_widgets_games_launch_options_editor_ilaunch_command_selection_source_get_option_id (_tmp109_);
					_tmp111_ = _tmp110_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp108_, _tmp111_);
					_g_object_unref0 (source);
				}
			}
			_g_object_unref0 (semantics);
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_list);
	}
	result = (GeeList*) diagnostics;
	_g_object_unref0 (owners);
	return result;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_lookup (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                            const gchar* id)
{
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	_tmp0_ = self->priv->by_id;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, id);
	result = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp1_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_ordered (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self)
{
	GeeArrayList* presentations = NULL;
	GeeArrayList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	presentations = _tmp0_;
	{
		GeeList* _metadata_list = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp1_;
		GeeList* _tmp2_;
		gint _metadata_size = 0;
		GeeList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _metadata_index = 0;
		_tmp1_ = self->priv->catalog;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_get_ordered (_tmp1_);
		_metadata_list = _tmp2_;
		_tmp3_ = _metadata_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_metadata_size = _tmp5_;
		_metadata_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			GeeList* _tmp8_;
			gpointer _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeHashMap* _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gpointer _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp15_;
			_metadata_index = _metadata_index + 1;
			_tmp6_ = _metadata_index;
			_tmp7_ = _metadata_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _metadata_list;
			_tmp9_ = gee_list_get (_tmp8_, _metadata_index);
			metadata = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata*) _tmp9_;
			_tmp10_ = self->priv->by_id;
			_tmp11_ = metadata;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_id (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, _tmp13_);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp14_;
			_tmp15_ = presentation;
			if (_tmp15_ != NULL) {
				GeeArrayList* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp17_;
				_tmp16_ = presentations;
				_tmp17_ = presentation;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp17_);
			}
			_g_object_unref0 (presentation);
			_g_object_unref0 (metadata);
		}
		_g_object_unref0 (_metadata_list);
	}
	result = (GeeList*) presentations;
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_has_visible_in_category (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory category)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeIterator* _presentation_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->by_id;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_presentation_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			gboolean _tmp9_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp14_;
			_tmp6_ = _presentation_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _presentation_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp8_;
			_tmp10_ = presentation;
			_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_category (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_ == category) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				_tmp15_ = presentation;
				_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_currently_visible (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp9_ = _tmp17_;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				result = TRUE;
				_g_object_unref0 (presentation);
				_g_object_unref0 (_presentation_it);
				return result;
			}
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_it);
	}
	result = FALSE;
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_has_registered_in_category (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                                ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory category)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeIterator* _presentation_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->by_id;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_presentation_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp13_;
			_tmp6_ = _presentation_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _presentation_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp8_;
			_tmp9_ = presentation;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_category (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_ == category) {
				result = TRUE;
				_g_object_unref0 (presentation);
				_g_object_unref0 (_presentation_it);
				return result;
			}
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_it);
	}
	result = FALSE;
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_has_presentable_in_category (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory category)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeIterator* _presentation_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->by_id;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_presentation_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* eligibility = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp16_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp17_;
			gboolean _tmp18_ = FALSE;
			gboolean _tmp19_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp20_;
			_tmp6_ = _presentation_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _presentation_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp8_;
			_tmp9_ = presentation;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_category (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_ != category) {
				_g_object_unref0 (presentation);
				continue;
			}
			_tmp14_ = presentation;
			_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = _g_object_ref0 (_tmp16_);
			eligibility = _tmp17_;
			_tmp20_ = eligibility;
			if (_tmp20_ == NULL) {
				_tmp19_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp21_;
				gboolean _tmp22_;
				gboolean _tmp23_;
				_tmp21_ = eligibility;
				_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_show_when_inactive (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp19_ = _tmp23_;
			}
			if (_tmp19_) {
				_tmp18_ = TRUE;
			} else {
				gboolean _tmp24_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp25_;
				_tmp25_ = presentation;
				if (proton_plus_widgets_games_launch_options_editor_launch_option_presentation_is_active (_tmp25_)) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp26_;
					gboolean _tmp27_;
					gboolean _tmp28_;
					_tmp26_ = eligibility;
					_tmp27_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_keep_visible_when_active (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp24_ = _tmp28_;
				} else {
					_tmp24_ = FALSE;
				}
				_tmp18_ = _tmp24_;
			}
			if (_tmp18_) {
				result = TRUE;
				_g_object_unref0 (eligibility);
				_g_object_unref0 (presentation);
				_g_object_unref0 (_presentation_it);
				return result;
			}
			_g_object_unref0 (eligibility);
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_it);
	}
	result = FALSE;
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_has_visible_in_subsection (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory category,
                                                                                                               const gchar* subsection)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (subsection != NULL, FALSE);
	{
		GeeIterator* _presentation_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->by_id;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_presentation_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			gboolean _tmp9_ = FALSE;
			gboolean _tmp10_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCategory _tmp15_;
			_tmp6_ = _presentation_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _presentation_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp8_;
			_tmp11_ = presentation;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_category (_tmp13_);
			_tmp15_ = _tmp14_;
			if (_tmp15_ == category) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				_tmp16_ = presentation;
				_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_subsection (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp10_ = g_strcmp0 (_tmp20_, subsection) == 0;
			} else {
				_tmp10_ = FALSE;
			}
			if (_tmp10_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp21_;
				gboolean _tmp22_;
				gboolean _tmp23_;
				_tmp21_ = presentation;
				_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_currently_visible (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp9_ = _tmp23_;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				result = TRUE;
				_g_object_unref0 (presentation);
				_g_object_unref0 (_presentation_it);
				return result;
			}
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_it);
	}
	result = FALSE;
	return result;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_apply_filter (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionView view,
                                                                                                  const gchar* query,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapabilityResolver* resolver,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* context)
{
	gboolean searching = FALSE;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (query != NULL);
	_tmp0_ = string_strip (query);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") != 0;
	_g_free0 (_tmp1_);
	searching = _tmp2_;
	{
		GeeList* _presentation_list = NULL;
		GeeList* _tmp3_;
		gint _presentation_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _presentation_index = 0;
		_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_ordered (self);
		_presentation_list = _tmp3_;
		_tmp4_ = _presentation_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_presentation_size = _tmp6_;
		_presentation_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* presentation = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			gboolean active = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp11_;
			gboolean visible = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp31_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp70_;
			_presentation_index = _presentation_index + 1;
			_tmp7_ = _presentation_index;
			_tmp8_ = _presentation_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _presentation_list;
			_tmp10_ = gee_list_get (_tmp9_, _presentation_index);
			presentation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation*) _tmp10_;
			_tmp11_ = presentation;
			active = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_is_active (_tmp11_);
			_tmp12_ = self->priv->catalog;
			_tmp13_ = presentation;
			_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp13_);
			_tmp15_ = _tmp14_;
			visible = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_should_display (_tmp12_, _tmp15_, view, query, active);
			if (resolver != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* eligibility = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp18_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp19_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp20_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp21_;
				gboolean _tmp22_ = FALSE;
				gboolean eligible_for_view = FALSE;
				gboolean _tmp29_ = FALSE;
				_tmp16_ = presentation;
				_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_metadata (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_option_capability_resolver_evaluate (resolver, _tmp18_, context, active);
				eligibility = _tmp19_;
				_tmp20_ = presentation;
				_tmp21_ = eligibility;
				proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_eligibility (_tmp20_, _tmp21_);
				if (active) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp23_;
					gboolean _tmp24_;
					gboolean _tmp25_;
					_tmp23_ = eligibility;
					_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_keep_visible_when_active (_tmp23_);
					_tmp25_ = _tmp24_;
					_tmp22_ = _tmp25_;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp26_;
					gboolean _tmp27_;
					gboolean _tmp28_;
					_tmp26_ = eligibility;
					_tmp27_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_show_when_inactive (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp22_ = _tmp28_;
				}
				eligible_for_view = _tmp22_;
				if (eligible_for_view) {
					_tmp29_ = visible;
				} else {
					_tmp29_ = FALSE;
				}
				visible = _tmp29_;
				_g_object_unref0 (eligibility);
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp30_;
				_tmp30_ = presentation;
				proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_eligibility (_tmp30_, NULL);
			}
			_tmp31_ = presentation;
			proton_plus_widgets_games_launch_options_editor_launch_option_presentation_set_currently_visible (_tmp31_, visible);
			{
				GeeArrayList* _widget_list = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp32_;
				GeeArrayList* _tmp33_;
				GeeArrayList* _tmp34_;
				gint _widget_size = 0;
				GeeArrayList* _tmp35_;
				gint _tmp36_;
				gint _tmp37_;
				gint _widget_index = 0;
				_tmp32_ = presentation;
				_tmp33_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_widgets (_tmp32_);
				_tmp34_ = _tmp33_;
				_widget_list = _tmp34_;
				_tmp35_ = _widget_list;
				_tmp36_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp35_);
				_tmp37_ = _tmp36_;
				_widget_size = _tmp37_;
				_widget_index = -1;
				while (TRUE) {
					gint _tmp38_;
					gint _tmp39_;
					GtkWidget* widget = NULL;
					GeeArrayList* _tmp40_;
					gpointer _tmp41_;
					GtkWidget* _tmp42_;
					_widget_index = _widget_index + 1;
					_tmp38_ = _widget_index;
					_tmp39_ = _widget_size;
					if (!(_tmp38_ < _tmp39_)) {
						break;
					}
					_tmp40_ = _widget_list;
					_tmp41_ = gee_abstract_list_get ((GeeAbstractList*) _tmp40_, _widget_index);
					widget = (GtkWidget*) _tmp41_;
					_tmp42_ = widget;
					gtk_widget_set_visible (_tmp42_, visible);
					_g_object_unref0 (widget);
				}
			}
			{
				GeeArrayList* _widget_list = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp43_;
				GeeArrayList* _tmp44_;
				GeeArrayList* _tmp45_;
				gint _widget_size = 0;
				GeeArrayList* _tmp46_;
				gint _tmp47_;
				gint _tmp48_;
				gint _widget_index = 0;
				_tmp43_ = presentation;
				_tmp44_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_widgets (_tmp43_);
				_tmp45_ = _tmp44_;
				_widget_list = _tmp45_;
				_tmp46_ = _widget_list;
				_tmp47_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp46_);
				_tmp48_ = _tmp47_;
				_widget_size = _tmp48_;
				_widget_index = -1;
				while (TRUE) {
					gint _tmp49_;
					gint _tmp50_;
					GtkWidget* widget = NULL;
					GeeArrayList* _tmp51_;
					gpointer _tmp52_;
					gboolean _tmp53_ = FALSE;
					gboolean _tmp54_ = FALSE;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp55_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp56_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp57_;
					GtkWidget* _tmp69_;
					_widget_index = _widget_index + 1;
					_tmp49_ = _widget_index;
					_tmp50_ = _widget_size;
					if (!(_tmp49_ < _tmp50_)) {
						break;
					}
					_tmp51_ = _widget_list;
					_tmp52_ = gee_abstract_list_get ((GeeAbstractList*) _tmp51_, _widget_index);
					widget = (GtkWidget*) _tmp52_;
					_tmp55_ = presentation;
					_tmp56_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (_tmp55_);
					_tmp57_ = _tmp56_;
					if (_tmp57_ == NULL) {
						_tmp54_ = TRUE;
					} else {
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp58_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp59_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp60_;
						gboolean _tmp61_;
						gboolean _tmp62_;
						_tmp58_ = presentation;
						_tmp59_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (_tmp58_);
						_tmp60_ = _tmp59_;
						_tmp61_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_may_modify (_tmp60_);
						_tmp62_ = _tmp61_;
						_tmp54_ = _tmp62_;
					}
					if (_tmp54_) {
						_tmp53_ = TRUE;
					} else {
						gboolean _tmp63_ = FALSE;
						if (active) {
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentation* _tmp64_;
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp65_;
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp66_;
							gboolean _tmp67_;
							gboolean _tmp68_;
							_tmp64_ = presentation;
							_tmp65_ = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_get_eligibility (_tmp64_);
							_tmp66_ = _tmp65_;
							_tmp67_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_keep_visible_when_active (_tmp66_);
							_tmp68_ = _tmp67_;
							_tmp63_ = _tmp68_;
						} else {
							_tmp63_ = FALSE;
						}
						_tmp53_ = _tmp63_;
					}
					_tmp69_ = widget;
					gtk_widget_set_sensitive (_tmp69_, _tmp53_);
					_g_object_unref0 (widget);
				}
			}
			_tmp70_ = presentation;
			proton_plus_widgets_games_launch_options_editor_launch_option_presentation_apply_metadata (_tmp70_, searching);
			_g_object_unref0 (presentation);
		}
		_g_object_unref0 (_presentation_list);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistryClass * klass,
                                                                                                gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry * self,
                                                                                                   gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_PRESENTATION_REGISTRY, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry);
	_g_object_unref0 (self->priv->catalog);
	_g_object_unref0 (self->priv->by_id);
	_g_object_unref0 (self->priv->registered_selection_sources);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistry_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionPresentationRegistryPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_presentation_registry_type_id__once;
}

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;
}

